main.cpp   main.cpp 
skipping to change at line 59 skipping to change at line 59
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
#include <QTextStream> #include <QTextStream>
#include <QTranslator> #include <QTranslator>
#include <QNetworkDiskCache> #include <QNetworkDiskCache>
#include <clocale> #include <clocale>
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
#include <windows.h> #include <windows.h>
#ifdef _MSC_BUILD //we use WIN32_LEAN_AND_MEAN so this needs to be included
#include <MMSystem.h> //to use timeBeginPeriod/timeEndPeriod
#pragma comment(lib,"Winmm.lib") #include <mmsystem.h>
#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTSt
artup") // Hide console
#endif
#endif //Q_OS_WIN #endif //Q_OS_WIN
//! @class CustomQTranslator //! @class CustomQTranslator
//! Provides custom i18n support. //! Provides custom i18n support.
class CustomQTranslator : public QTranslator class CustomQTranslator : public QTranslator
{ {
using QTranslator::translate; using QTranslator::translate;
public: public:
virtual bool isEmpty() const { return false; } virtual bool isEmpty() const { return false; }
skipping to change at line 186 skipping to change at line 184
argList << argv[i]; argList << argv[i];
argStr += QString("%1 ").arg(argv[i]); argStr += QString("%1 ").arg(argv[i]);
} }
// add contents of STEL_OPTS environment variable. // add contents of STEL_OPTS environment variable.
QString envStelOpts(qgetenv("STEL_OPTS").constData()); QString envStelOpts(qgetenv("STEL_OPTS").constData());
if (envStelOpts.length()>0) if (envStelOpts.length()>0)
{ {
argList+= envStelOpts.split(" "); argList+= envStelOpts.split(" ");
argStr += " " + envStelOpts; argStr += " " + envStelOpts;
} }
//save the modified arg list as an app property for later use
qApp->setProperty("stelCommandLine", argList);
// Parse for first set of CLI arguments - stuff we want to process b efore other // Parse for first set of CLI arguments - stuff we want to process b efore other
// output, such as --help and --version // output, such as --help and --version
CLIProcessor::parseCLIArgsPreConfig(argList); CLIProcessor::parseCLIArgsPreConfig(argList);
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
#if QT_VERSION >= 0x050300 #if QT_VERSION >= 0x050300
if (qApp->property("onetime_angle_mode").isValid()) if (qApp->property("onetime_angle_mode").isValid())
{ {
app.setAttribute(Qt::AA_UseOpenGLES, true); app.setAttribute(Qt::AA_UseOpenGLES, true);
} }
skipping to change at line 247 skipping to change at line 248
} }
QString configFileFullPath = StelFileMgr::findFile(configName, StelF ileMgr::Flags(StelFileMgr::Writable|StelFileMgr::File)); QString configFileFullPath = StelFileMgr::findFile(configName, StelF ileMgr::Flags(StelFileMgr::Writable|StelFileMgr::File));
if (configFileFullPath.isEmpty()) if (configFileFullPath.isEmpty())
{ {
configFileFullPath = StelFileMgr::findFile(configName, StelF ileMgr::New); configFileFullPath = StelFileMgr::findFile(configName, StelF ileMgr::New);
if (configFileFullPath.isEmpty()) if (configFileFullPath.isEmpty())
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 = Q_NULLPTR;
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;
} }
else else
{ {
confSettings = new QSettings(configFileFullPath, Ste lIniFormat, NULL); confSettings = new QSettings(configFileFullPath, Ste lIniFormat, Q_NULLPTR);
restoreDefaultConfigFile = confSettings->value("main /restore_defaults", false).toBool(); restoreDefaultConfigFile = confSettings->value("main /restore_defaults", false).toBool();
} }
if (!restoreDefaultConfigFile) if (!restoreDefaultConfigFile)
{ {
QString version = confSettings->value("main/version" , "0.0.0").toString(); QString version = confSettings->value("main/version" , "0.0.0").toString();
if (version!=QString(PACKAGE_VERSION)) if (version!=QString(PACKAGE_VERSION))
{ {
QTextStream istr(&version); QTextStream istr(&version);
char tmp; char tmp;
int v1=0; int v1=0;
 End of changes. 4 change blocks. 
8 lines changed or deleted 8 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/