mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-03 14:07:26 -04:00
portable: use portable storage folder to store QML disk cache
This commit is contained in:
@@ -190,6 +190,20 @@ int main(int argc, char *argv[])
|
||||
// Turn off colors in monerod log output.
|
||||
qputenv("TERM", "goaway");
|
||||
|
||||
#if defined(Q_OS_MACOS)
|
||||
QDir::setCurrent(QDir(MacOSHelper::bundlePath() + QDir::separator() + "..").canonicalPath());
|
||||
#endif
|
||||
|
||||
if (MoneroSettings::portableConfigExists())
|
||||
{
|
||||
const QString cacheDir(MoneroSettings::portableFolderName() + QDir::separator() + ".cache");
|
||||
if (!qputenv("QML_DISK_CACHE_PATH", cacheDir.toUtf8()))
|
||||
{
|
||||
qCritical() << "Error: failed to set QML disk cache path";
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
MainApp app(argc, argv);
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
@@ -326,10 +340,6 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
|
||||
// start listening
|
||||
QTimer::singleShot(0, ipc, SLOT(bind()));
|
||||
|
||||
#if defined(Q_OS_MACOS)
|
||||
QDir::setCurrent(QDir(MacOSHelper::bundlePath() + QDir::separator() + "..").canonicalPath());
|
||||
#endif
|
||||
|
||||
// screen settings
|
||||
// Mobile is designed on 128dpi
|
||||
qreal ref_dpi = 128;
|
||||
|
||||
Reference in New Issue
Block a user