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

View File

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