Relative paths now relative to app.exe instead of current dir.
This commit is contained in:
parent
b0c745b61e
commit
692ccc133b
@ -2,6 +2,7 @@
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <QSettings>
|
||||
#include <QApplication>
|
||||
|
||||
#include "RecognizerHelper.h"
|
||||
|
||||
@ -10,6 +11,8 @@ RecognizerHelper::RecognizerHelper ()
|
||||
#ifdef Q_OS_LINUX
|
||||
QDir settingDir = QFileInfo (QSettings ().fileName ()).dir ();
|
||||
fileName_ = settingDir.absoluteFilePath (fileName_);
|
||||
#else
|
||||
fileName_ = QApplication::applicationDirPath () + QDir::separator () + fileName_;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,14 @@
|
||||
#include <QSettings>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QApplication>
|
||||
|
||||
#include "TranslatorHelper.h"
|
||||
#include "Settings.h"
|
||||
|
||||
TranslatorHelper::TranslatorHelper ()
|
||||
: translatorsDir_ ("translators"), currentIndex_ (0) {
|
||||
translatorsDir_ = QApplication::applicationDirPath () + QDir::separator () + translatorsDir_;
|
||||
}
|
||||
|
||||
void TranslatorHelper::setEnabledTranslators (const QStringList &enabled) const {
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <QNetworkRequest>
|
||||
#include <QNetworkReply>
|
||||
#include <QMessageBox>
|
||||
#include <QApplication>
|
||||
|
||||
#include "Updater.h"
|
||||
#include "StAssert.h"
|
||||
@ -44,7 +45,7 @@ Updater::Updater (QObject *parent)
|
||||
: QObject (parent),
|
||||
network_ (new QNetworkAccessManager (this)),
|
||||
componentsUpdating_ (0) {
|
||||
updatesFileName_ = "updates.json";
|
||||
updatesFileName_ = QApplication::applicationDirPath () + QDir::separator () + "updates.json";
|
||||
backupSuffix_ = "_backup";
|
||||
connect (network_, SIGNAL (finished (QNetworkReply *)),
|
||||
SLOT (replyFinished (QNetworkReply *)));
|
||||
|
Loading…
Reference in New Issue
Block a user