main.cpp   main.cpp 
skipping to change at line 21 skipping to change at line 21
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#include "StelMainWindow.hpp" #include "StelMainView.hpp"
#include "StelTranslator.hpp" #include "StelTranslator.hpp"
#include "StelLogger.hpp" #include "StelLogger.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "CLIProcessor.hpp" #include "CLIProcessor.hpp"
#include "StelIniParser.hpp" #include "StelIniParser.hpp"
#include "StelUtils.hpp"
#include <QDebug> #include <QDebug>
#include <QApplication>
#include <QMessageBox> #ifndef USE_QUICKVIEW
#include <QTranslator> #include <QApplication>
#include <QGLFormat> #include <QMessageBox>
#include <QPlastiqueStyle> #include <QStyleFactory>
#else
#include <QGuiApplication>
#endif
#include <QCoreApplication>
#include <QDir>
#include <QFile>
#include <QFileInfo> #include <QFileInfo>
#include <QFontDatabase> #include <QFontDatabase>
#include <QDir> #include <QGLFormat>
#include <QGuiApplication>
#include <QSettings>
#include <QSplashScreen>
#include <QString>
#include <QStringList>
#include <QTextStream>
#include <QTranslator>
#include <QNetworkDiskCache>
#include <clocale>
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
#include <windows.h> #include <windows.h>
#ifdef _MSC_BUILD #ifdef _MSC_BUILD
#include <MMSystem.h> #include <MMSystem.h>
#pragma comment(lib,"Winmm.lib") #pragma comment(lib,"Winmm.lib")
#endif #pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTSt
artup") // Hide console
#endif
#endif //Q_OS_WIN #endif //Q_OS_WIN
//! @class GettextStelTranslator //! @class CustomQTranslator
//! Provides i18n support through gettext. //! Provides custom i18n support.
class GettextStelTranslator : public QTranslator class CustomQTranslator : public QTranslator
{ {
using QTranslator::translate;
public: public:
virtual bool isEmpty() const { return false; } virtual bool isEmpty() const { return false; }
//! Overrides QTranslator::translate(). //! Overrides QTranslator::translate().
//! Calls StelTranslator::qtranslate(). //! Calls StelTranslator::qtranslate().
//! Can handle the Qt disambiguation strings of translatable
//! widgets from compiled .ui files - they are interpreted as
//! gettext context strings. See http://www.gnu.org/software/gettext
/manual/gettext.html#Contexts
//! @param context Qt context string - IGNORED. //! @param context Qt context string - IGNORED.
//! @param sourceText the source message. //! @param sourceText the source message.
//! @param comment optional parameter, Qt disambiguation //! @param comment optional parameter
//! comment string is interpreted as a gettext context. virtual QString translate(const char *context, const char *sourceTex
//! (msgctxt) string. t, const char *disambiguation = 0, int n = -1) const
virtual QString translate(const char* context, const char* sourceTex
t, const char* comment=0) const
{ {
Q_UNUSED(context); Q_UNUSED(context);
if (comment) Q_UNUSED(n);
return StelTranslator::globalTranslator.qtranslate(s return StelTranslator::globalTranslator->qtranslate(sourceTe
ourceText, comment); xt, disambiguation);
else
return q_(sourceText);
} }
}; };
//! Copies the default configuration file. //! Copies the default configuration file.
//! This function copies the default_config.ini file to config.ini (or othe r //! This function copies the default_config.ini file to config.ini (or othe r
//! name specified on the command line located in the user data directory. //! name specified on the command line located in the user data directory.
void copyDefaultConfigFile(const QString& newPath) void copyDefaultConfigFile(const QString& newPath)
{ {
QString defaultConfigFilePath; QString defaultConfigFilePath = StelFileMgr::findFile("data/default_
try config.ini");
{ if (defaultConfigFilePath.isEmpty())
defaultConfigFilePath = StelFileMgr::findFile("data/default_
config.ini");
}
catch (std::runtime_error& e)
{
qFatal("ERROR copyDefaultConfigFile failed to locate data/de fault_config.ini. Please check your installation."); qFatal("ERROR copyDefaultConfigFile failed to locate data/de fault_config.ini. Please check your installation.");
}
QFile::copy(defaultConfigFilePath, newPath); QFile::copy(defaultConfigFilePath, newPath);
if (!StelFileMgr::exists(newPath)) if (!StelFileMgr::exists(newPath))
{ {
qFatal("ERROR copyDefaultConfigFile failed to copy file %s to %s. You could try to copy it by hand.", qFatal("ERROR copyDefaultConfigFile failed to copy file %s to %s. You could try to copy it by hand.",
qPrintable(defaultConfigFilePath), qPrintable(newPat h)); qPrintable(defaultConfigFilePath), qPrintable(newPat h));
} }
QFile::setPermissions(newPath, QFile::permissions(newPath) | QFileDe
vice::WriteOwner);
}
//! Removes all items from the cache.
void clearCache()
{
QNetworkDiskCache* cacheMgr = new QNetworkDiskCache();
cacheMgr->setCacheDirectory(StelFileMgr::getCacheDir());
cacheMgr->clear(); // Removes all items from the cache.
} }
// Main stellarium procedure // Main stellarium procedure
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
// Fix for the speeding system clock bug on systems that use ACPI // Fix for the speeding system clock bug on systems that use ACPI
// See http://support.microsoft.com/kb/821893 // See http://support.microsoft.com/kb/821893
UINT timerGrain = 1; UINT timerGrain = 1;
if (timeBeginPeriod(timerGrain) == TIMERR_NOCANDO) if (timeBeginPeriod(timerGrain) == TIMERR_NOCANDO)
{ {
// If this is too fine a grain, try the lowest value used by a timer // If this is too fine a grain, try the lowest value used by a timer
timerGrain = 5; timerGrain = 5;
if (timeBeginPeriod(timerGrain) == TIMERR_NOCANDO) if (timeBeginPeriod(timerGrain) == TIMERR_NOCANDO)
timerGrain = 0; timerGrain = 0;
} }
#endif #endif
#ifdef Q_OS_MAC
char ** newArgv = (char**) malloc((argc + 2) * sizeof(*newArgv));
memmove(newArgv, argv, sizeof(*newArgv) * argc);
char * option = new char[20];
char * value = new char[21];
strcpy( option, "-platformpluginpath");
strcpy( value, "../plugins/platforms");
newArgv[argc++] = option;
newArgv[argc++] = value;
argv = newArgv;
#endif
QCoreApplication::setApplicationName("stellarium"); QCoreApplication::setApplicationName("stellarium");
QCoreApplication::setApplicationVersion(StelUtils::getApplicationVer sion()); QCoreApplication::setApplicationVersion(StelUtils::getApplicationVer sion());
QCoreApplication::setOrganizationDomain("stellarium.org"); QCoreApplication::setOrganizationDomain("stellarium.org");
QCoreApplication::setOrganizationName("stellarium"); QCoreApplication::setOrganizationName("stellarium");
#ifndef BUILD_FOR_MAEMO // LP:1335611: Avoid troubles with search of the paths of the plugin
QApplication::setStyle(new QPlastiqueStyle()); s (deployments troubles) --AW
#endif #if QT_VERSION==QT_VERSION_CHECK(5, 3, 1)
QCoreApplication::addLibraryPath(".");
#endif
// Handle command line options for alternative Qt graphics system ty QGuiApplication::setDesktopSettingsAware(false);
pes.
// DEFAULT_GRAPHICS_SYSTEM is defined per platform in the main CMake
Lists.txt file.
// Avoid overriding if the user already specified the mode on the CL
I.
bool doSetDefaultGraphicsSystem=true;
for (int i = 1; i < argc; ++i)
{
//QApplication accepts -graphicssystem only if
//its value is a separate argument (the next value in argv)
if (QString(argv[i]) == "-graphicssystem")
{
doSetDefaultGraphicsSystem = false;
}
}
// If the user didn't set the graphics-system on the command line, u
se the one provided at compile time.
if (doSetDefaultGraphicsSystem)
{
qDebug() << "Using default graphics system specified at buil
d time: " << DEFAULT_GRAPHICS_SYSTEM;
QApplication::setGraphicsSystem(DEFAULT_GRAPHICS_SYSTEM);
}
#ifndef USE_QUICKVIEW
QApplication::setStyle(QStyleFactory::create("Fusion"));
// The QApplication MUST be created before the StelFileMgr is initia lized. // The QApplication MUST be created before the StelFileMgr is initia lized.
QApplication app(argc, argv); QApplication app(argc, argv);
#else
QGuiApplication::setDesktopSettingsAware(false);
QGuiApplication app(argc, argv);
#endif
QPixmap pixmap(":/splash.png");
QSplashScreen splash(pixmap);
splash.show();
app.processEvents();
// QApplication sets current locale, but // QApplication sets current locale, but
// we need scanf()/printf() and friends to always work in the C loca le, // we need scanf()/printf() and friends to always work in the C loca le,
// otherwise configuration/INI file parsing will be erroneous. // otherwise configuration/INI file parsing will be erroneous.
setlocale(LC_NUMERIC, "C"); setlocale(LC_NUMERIC, "C");
// Init the file manager // Init the file manager
StelFileMgr::init(); StelFileMgr::init();
// Log command line arguments // Log command line arguments
skipping to change at line 169 skipping to change at line 190
// output, such as --help and --version // output, such as --help and --version
CLIProcessor::parseCLIArgsPreConfig(argList); CLIProcessor::parseCLIArgsPreConfig(argList);
// Start logging. // Start logging.
StelLogger::init(StelFileMgr::getUserDir()+"/log.txt"); StelLogger::init(StelFileMgr::getUserDir()+"/log.txt");
StelLogger::writeLog(argStr); StelLogger::writeLog(argStr);
// OK we start the full program. // OK we start the full program.
// Print the console splash and get on with loading the program // Print the console splash and get on with loading the program
QString versionLine = QString("This is %1 - http://www.stellarium.or g").arg(StelUtils::getApplicationName()); QString versionLine = QString("This is %1 - http://www.stellarium.or g").arg(StelUtils::getApplicationName());
QString copyrightLine = QString("Copyright (C) 2000-2013 Fabien Cher eau et al"); QString copyrightLine = QString("Copyright (C) 2000-2014 Fabien Cher eau et al");
int maxLength = qMax(versionLine.size(), copyrightLine.size()); int maxLength = qMax(versionLine.size(), copyrightLine.size());
qDebug() << qPrintable(QString(" %1").arg(QString().fill('-', maxLen gth+2))); qDebug() << qPrintable(QString(" %1").arg(QString().fill('-', maxLen gth+2)));
qDebug() << qPrintable(QString("[ %1 ]").arg(versionLine.leftJustifi ed(maxLength, ' '))); qDebug() << qPrintable(QString("[ %1 ]").arg(versionLine.leftJustifi ed(maxLength, ' ')));
qDebug() << qPrintable(QString("[ %1 ]").arg(copyrightLine.leftJusti fied(maxLength, ' '))); qDebug() << qPrintable(QString("[ %1 ]").arg(copyrightLine.leftJusti fied(maxLength, ' ')));
qDebug() << qPrintable(QString(" %1").arg(QString().fill('-', maxLen gth+2))); qDebug() << qPrintable(QString(" %1").arg(QString().fill('-', maxLen gth+2)));
qDebug() << "Writing log file to:" << QDir::toNativeSeparators(StelL ogger::getLogFileName()); qDebug() << "Writing log file to:" << QDir::toNativeSeparators(StelL ogger::getLogFileName());
qDebug() << "File search paths:"; qDebug() << "File search paths:";
int n=0; int n=0;
foreach (QString i, StelFileMgr::getSearchPaths()) foreach (const QString& i, StelFileMgr::getSearchPaths())
{ {
qDebug() << " " << n << ". " << QDir::toNativeSeparators(i); qDebug() << " " << n << ". " << QDir::toNativeSeparators(i);
++n; ++n;
} }
// Now manage the loading of the proper config file // Now manage the loading of the proper config file
QString configName; QString configName;
try try
{ {
configName = CLIProcessor::argsGetOptionWithArg(argList, "-c ", "--config-file", "config.ini").toString(); configName = CLIProcessor::argsGetOptionWithArg(argList, "-c ", "--config-file", "config.ini").toString();
} }
catch (std::runtime_error& e) catch (std::runtime_error& e)
{ {
qWarning() << "WARNING: while looking for --config-file opti on: " << e.what() << ". Using \"config.ini\""; qWarning() << "WARNING: while looking for --config-file opti on: " << e.what() << ". Using \"config.ini\"";
configName = "config.ini"; configName = "config.ini";
} }
QString configFileFullPath; QString configFileFullPath = StelFileMgr::findFile(configName, StelF
try ileMgr::Flags(StelFileMgr::Writable|StelFileMgr::File));
if (configFileFullPath.isEmpty())
{ {
configFileFullPath = StelFileMgr::findFile(configName, StelF configFileFullPath = StelFileMgr::findFile(configName, StelF
ileMgr::Flags(StelFileMgr::Writable|StelFileMgr::File)); ileMgr::New);
} if (configFileFullPath.isEmpty())
catch (std::runtime_error& e)
{
try
{
configFileFullPath = StelFileMgr::findFile(configNam
e, StelFileMgr::New);
}
catch (std::runtime_error& e)
{
qFatal("Could not create configuration file %s.", qP rintable(configName)); qFatal("Could not create configuration file %s.", qP rintable(configName));
}
} }
QSettings* confSettings = NULL; QSettings* confSettings = NULL;
if (StelFileMgr::exists(configFileFullPath)) if (StelFileMgr::exists(configFileFullPath))
{ {
// Implement "restore default settings" feature. // Implement "restore default settings" feature.
bool restoreDefaultConfigFile = false; bool restoreDefaultConfigFile = false;
if (CLIProcessor::argsGetOption(argList, "", "--restore-defa ults")) if (CLIProcessor::argsGetOption(argList, "", "--restore-defa ults"))
{ {
restoreDefaultConfigFile=true; restoreDefaultConfigFile=true;
skipping to change at line 249 skipping to change at line 261
{ {
// The config file is too old to try an importation // The config file is too old to try an importation
qDebug() << "The current config file is from a version too old for parameters to be imported (" qDebug() << "The current config file is from a version too old for parameters to be imported ("
<< (version.isEmpty () ? "<0.6.0" : version) << ").\n" << (version.isEmpty () ? "<0.6.0" : version) << ").\n"
<< "It will be repl aced by the default config file."; << "It will be repl aced by the default config file.";
restoreDefaultConfigFile = true; restoreDefaultConfigFile = true;
} }
else else
{ {
qDebug() << "Attempting to use an ex isting older config file."; qDebug() << "Attempting to use an ex isting older config file.";
confSettings->setValue("main/version
", QString(PACKAGE_VERSION)); // Upgrade version of config.ini
clearCache();
qDebug() << "Clear cache and update
config.ini...";
} }
} }
} }
if (restoreDefaultConfigFile) if (restoreDefaultConfigFile)
{ {
if (confSettings) if (confSettings)
delete confSettings; delete confSettings;
QString backupFile(configFileFullPath.left(configFil eFullPath.length()-3) + QString("old")); QString backupFile(configFileFullPath.left(configFil eFullPath.length()-3) + QString("old"));
if (QFileInfo(backupFile).exists()) if (QFileInfo(backupFile).exists())
QFile(backupFile).remove(); QFile(backupFile).remove();
QFile(configFileFullPath).rename(backupFile); QFile(configFileFullPath).rename(backupFile);
copyDefaultConfigFile(configFileFullPath); copyDefaultConfigFile(configFileFullPath);
confSettings = new QSettings(configFileFullPath, Ste lIniFormat); confSettings = new QSettings(configFileFullPath, Ste lIniFormat);
qWarning() << "Resetting defaults config file. Previ ous config file was backed up in " << QDir::toNativeSeparators(backupFile); qWarning() << "Resetting defaults config file. Previ ous config file was backed up in " << QDir::toNativeSeparators(backupFile);
clearCache();
} }
} }
else else
{ {
qDebug() << "Config file " << QDir::toNativeSeparators(confi gFileFullPath) << " does not exist. Copying the default file."; qDebug() << "Config file " << QDir::toNativeSeparators(confi gFileFullPath) << " does not exist. Copying the default file.";
copyDefaultConfigFile(configFileFullPath); copyDefaultConfigFile(configFileFullPath);
confSettings = new QSettings(configFileFullPath, StelIniForm at); confSettings = new QSettings(configFileFullPath, StelIniForm at);
} }
Q_ASSERT(confSettings); Q_ASSERT(confSettings);
qDebug() << "Config file is: " << QDir::toNativeSeparators(configFil eFullPath); qDebug() << "Config file is: " << QDir::toNativeSeparators(configFil eFullPath);
// Override config file values from CLI. // Override config file values from CLI.
CLIProcessor::parseCLIArgsPostConfig(argList, confSettings); CLIProcessor::parseCLIArgsPostConfig(argList, confSettings);
#ifdef Q_OS_WIN // Support hi-dpi pixmaps
bool safeMode = false; // used in Q_OS_WIN, but need the QGL::setPre app.setAttribute(Qt::AA_UseHighDpiPixmaps);
ferredPaintEngine() call here.
#endif
if (!confSettings->value("main/use_qpaintenginegl2", true).toBool()
|| qApp->property("onetime_safe_mode").isValid()) {
// The user explicitely request to use the older paint engin
e.
QGL::setPreferredPaintEngine(QPaintEngine::OpenGL);
#ifdef Q_OS_WIN
safeMode = true;
#endif
}
#ifdef Q_OS_MAC
// On Leopard (10.5) + ppc architecture, text display is buggy if Op
enGL2 Qt paint engine is used.
if ((QSysInfo::MacintoshVersion == QSysInfo::MV_LEOPARD) && (QSysInf
o::ByteOrder == QSysInfo::BigEndian))
QGL::setPreferredPaintEngine(QPaintEngine::OpenGL);
#endif
// On maemo we'll use the standard OS font
#ifndef BUILD_FOR_MAEMO
// Add the DejaVu font that we use everywhere in the program // Add the DejaVu font that we use everywhere in the program
try const QString& fName = StelFileMgr::findFile("data/DejaVuSans.ttf");
{ if (!fName.isEmpty())
const QString& fName = StelFileMgr::findFile("data/DejaVuSan QFontDatabase::addApplicationFont(fName);
s.ttf");
if (!fName.isEmpty())
QFontDatabase::addApplicationFont(fName);
}
catch (std::runtime_error& e)
{
// Removed this warning practically allowing to package the
program without the font file.
// This is useful for distribution having already a package
for DejaVu font.
// qWarning() << "ERROR while loading font DejaVuSans : " <<
e.what();
}
QString fileFont = confSettings->value("gui/base_font_file", "").toS tring(); QString fileFont = confSettings->value("gui/base_font_file", "").toS tring();
if (!fileFont.isEmpty()) if (!fileFont.isEmpty())
{ {
try const QString& afName = StelFileMgr::findFile(QString("data/
{ %1").arg(fileFont));
const QString& afName = StelFileMgr::findFile(QStrin if (!afName.isEmpty() && !afName.contains("file not found"))
g("data/%1").arg(fileFont)); QFontDatabase::addApplicationFont(afName);
if (!afName.isEmpty() && !afName.contains("file not else
found")) qWarning() << "ERROR while loading custom font " <<
QFontDatabase::addApplicationFont(afName); QDir::toNativeSeparators(fileFont);
}
catch (std::runtime_error& e)
{
qWarning() << "ERROR while loading custom font " <<
QDir::toNativeSeparators(fileFont) << " : " << e.what();
}
} }
QString baseFont = confSettings->value("gui/base_font_name", "DejaVu Sans").toString(); QString baseFont = confSettings->value("gui/base_font_name", "DejaVu Sans").toString();
QString safeFont = confSettings->value("gui/safe_font_name", "Verdan a").toString();
// Set the default application font and font size. // Set the default application font and font size.
// Note that style sheet will possibly override this setting. // Note that style sheet will possibly override this setting.
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
QFont tmpFont(baseFont);
// On windows use Verdana font, to avoid unresolved bug with OpenGL1
Qt paint engine.
// See Launchpad question #111823 for more info
QFont tmpFont(safeMode ? safeFont : baseFont);
tmpFont.setStyleHint(QFont::AnyStyle, QFont::OpenGLCompatible); tmpFont.setStyleHint(QFont::AnyStyle, QFont::OpenGLCompatible);
// Activate verdana by defaut for all win32 builds to see if it impr
oves things.
// -> this seems to bring crippled arabic fonts with OpenGL2 paint e
ngine..
// QFont tmpFont("Verdana");
#else
#ifdef Q_OS_MAC
QFont tmpFont(safeFont);
#else #else
QFont tmpFont(baseFont); QFont tmpFont(baseFont);
#endif #endif
#endif
tmpFont.setPixelSize(confSettings->value("gui/base_font_size", 13).t oInt()); tmpFont.setPixelSize(confSettings->value("gui/base_font_size", 13).t oInt());
//tmpFont.setFamily("Verdana"); QGuiApplication::setFont(tmpFont);
//tmpFont.setBold(true);
QApplication::setFont(tmpFont);
#endif
// Initialize translator feature // Initialize translator feature
try StelTranslator::init(StelFileMgr::getInstallationDir() + "/data/iso6
{ 39-1.utf8");
StelTranslator::init(StelFileMgr::findFile("data/iso639-1.ut
f8")); // Use our custom translator for Qt translations as well
} CustomQTranslator trans;
catch (std::runtime_error& e)
{
qWarning() << "ERROR while loading translations: " << e.what
() << endl;
}
// Use our gettext translator for Qt translations as well
GettextStelTranslator trans;
app.installTranslator(&trans); app.installTranslator(&trans);
if (!QGLFormat::hasOpenGL()) // Check support of OpenGL StelMainView mainWin;
{
bool appCanRun = true;
// some basic diagnostics
if (!QGLFormat::hasOpenGL()){
qWarning() << "Oops... This system does not support OpenGL." ; qWarning() << "Oops... This system does not support OpenGL." ;
QMessageBox::warning(0, "Stellarium", q_("This system does n ot support OpenGL.")); QMessageBox::warning(0, "Stellarium", q_("This system does n ot support OpenGL."));
app.quit(); appCanRun = false;
} }
else if (!(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Versi
on_1_2)) // Check supported version of OpenGL if (!(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_2_
1) && !(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0)
) // Check supported version of OpenGL
{ {
// OK, minimal required version of OpenGL is 1.2. If platfor m does not support this // OK, minimal required version of OpenGL is 2.1 (OpenGL ES is 2.0). If platform does not support this
// version then say to user about troubles and quit from app lication. // version then say to user about troubles and quit from app lication.
qWarning() << "Oops... This platform support only OpenGL 1.1 #ifdef Q_OS_WIN
."; qWarning() << "Oops... Insufficient OpenGL version. Please u
QMessageBox::warning(0, "Stellarium", q_("Your platform does pdate drivers, graphics hardware, or use MESA (or ANGLE) version.";
not support minimal required OpenGL 1.2. Please upgrade drivers for graphi QMessageBox::warning(0, "Stellarium", q_("Insufficient OpenG
cs card.")); L version. Please update drivers, graphics hardware, or use MESA (or ANGLE)
app.quit(); version."));
#else
qWarning() << "Oops... Insufficient OpenGL version. Please u
pdate drivers, or graphics hardware.";
QMessageBox::warning(0, "Stellarium", q_("Insufficient OpenG
L version. Please update drivers, or graphics hardware."));
#endif
appCanRun = false;
} }
else
if (appCanRun)
{ {
StelMainWindow mainWin;
mainWin.init(confSettings); mainWin.init(confSettings);
splash.finish(&mainWin);
app.exec(); app.exec();
mainWin.deinit(); mainWin.deinit();
delete confSettings; delete confSettings;
StelLogger::deinit(); StelLogger::deinit();
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
if(timerGrain) if(timerGrain)
timeEndPeriod(timerGrain); timeEndPeriod(timerGrain);
#endif //Q_OS_WIN #endif //Q_OS_WIN
#ifdef Q_OS_MAC
delete(newArgv);
delete(option);
delete(value);
#endif
return 0; return 0;
} }
else
{
app.quit();
}
} }
 End of changes. 45 change blocks. 
180 lines changed or deleted 152 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/