CLIProcessor.cpp   CLIProcessor.cpp 
skipping to change at line 30 skipping to change at line 30
#include "CLIProcessor.hpp" #include "CLIProcessor.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelUtils.hpp" #include "StelUtils.hpp"
#include <QSettings> #include <QSettings>
#include <QDateTime> #include <QDateTime>
#include <QDebug> #include <QDebug>
#include <iostream> #include <iostream>
#include <QApplication> #include <QApplication>
#include <QDir>
void CLIProcessor::parseCLIArgsPreConfig(const QStringList& argList) void CLIProcessor::parseCLIArgsPreConfig(const QStringList& argList)
{ {
if (argsGetOption(argList, "-v", "--version")) if (argsGetOption(argList, "-v", "--version"))
{ {
std::cout << qPrintable(StelUtils::getApplicationName()) << std::endl; std::cout << qPrintable(StelUtils::getApplicationName()) << std::endl;
exit(0); exit(0);
} }
if (argsGetOption(argList, "-h", "--help")) if (argsGetOption(argList, "-h", "--help"))
skipping to change at line 222 skipping to change at line 223
{ {
qApp->setProperty("onetime_startup_script", startupScript); qApp->setProperty("onetime_startup_script", startupScript);
} }
if (fov>0.0) confSettings->setValue("navigation/init_fov", fov); if (fov>0.0) confSettings->setValue("navigation/init_fov", fov);
if (!projectionType.isEmpty()) confSettings->setValue("projection/ty pe", projectionType); if (!projectionType.isEmpty()) confSettings->setValue("projection/ty pe", projectionType);
if (!screenshotDir.isEmpty()) if (!screenshotDir.isEmpty())
{ {
try try
{ {
QString newShotDir = argsGetOptionWithArg(argList, " ", "--screenshot-dir", "").toString(); QString newShotDir = QDir::fromNativeSeparators(args GetOptionWithArg(argList, "", "--screenshot-dir", "").toString());
if (!newShotDir.isEmpty()) if (!newShotDir.isEmpty())
StelFileMgr::setScreenshotDir(newShotDir); StelFileMgr::setScreenshotDir(newShotDir);
} }
catch (std::runtime_error& e) catch (std::runtime_error& e)
{ {
qWarning() << "WARNING: problem while setting screen shot directory for --screenshot-dir option: " << e.what(); qWarning() << "WARNING: problem while setting screen shot directory for --screenshot-dir option: " << e.what();
} }
} }
else else
{ {
const QString& confScreenshotDir = confSettings->value("main /screenshot_dir", "").toString(); const QString& confScreenshotDir = QDir::fromNativeSeparator s(confSettings->value("main/screenshot_dir", "").toString());
if (!confScreenshotDir.isEmpty()) if (!confScreenshotDir.isEmpty())
{ {
try try
{ {
StelFileMgr::setScreenshotDir(confScreenshot Dir); StelFileMgr::setScreenshotDir(confScreenshot Dir);
} }
catch (std::runtime_error& e) catch (std::runtime_error& e)
{ {
qWarning() << "WARNING: problem while settin g screenshot from config file setting: " << e.what(); qWarning() << "WARNING: problem while settin g screenshot from config file setting: " << e.what();
} }
 End of changes. 3 change blocks. 
2 lines changed or deleted 3 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/