Use absolute paths in portable mode

This commit is contained in:
Gres 2020-04-15 19:57:08 +03:00
parent 351ac398b4
commit 1a44e17739
2 changed files with 14 additions and 2 deletions

View File

@ -2,7 +2,7 @@
#include "runatsystemstart.h" #include "runatsystemstart.h"
#include <QApplication> #include <QApplication>
#include <QFile> #include <QDir>
#include <QFont> #include <QFont>
#include <QSettings> #include <QSettings>
#include <QStandardPaths> #include <QStandardPaths>
@ -327,7 +327,7 @@ void Settings::setPortable(bool isPortable)
const auto baseDataPath = const auto baseDataPath =
isPortable isPortable
? "." ? QDir().absolutePath()
: QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); : QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
tessdataPath = baseDataPath + "/tessdata"; tessdataPath = baseDataPath + "/tessdata";
translatorsDir = baseDataPath + "/translators"; translatorsDir = baseDataPath + "/translators";

View File

@ -277,6 +277,9 @@
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags"> <property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set> <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property> </property>
@ -335,6 +338,9 @@
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -397,6 +403,9 @@
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags"> <property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set> <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property> </property>
@ -679,6 +688,9 @@
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
<item> <item>