Skip to content

Commit

Permalink
Flatpak Temporary file workaround
Browse files Browse the repository at this point in the history
I don't know how to openn image file in sandbox via QDesktop::openurl
therefore QLog creates a temp directory in home directory (home is allowed for flatpak)
  • Loading branch information
foldynl committed Nov 28, 2023
1 parent 520d75b commit a10dc9f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion core/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@
MODULE_IDENTIFICATION("qlog.core.main");

QMutex debug_mutex;
QTemporaryDir tempDir;
QTemporaryDir tempDir
#ifdef QLOG_FLATPAK
// hack: I don't know how to openn image file
// in sandbox via QDesktop::openurl
// therefore QLog creates a temp directory in home directory (home is allowed for flatpak)
(QDir::homePath() + "/.qlogXXXXXX");
#else
;
#endif

static void setupTranslator(QApplication* app) {
FCT_IDENTIFICATION;
Expand Down

0 comments on commit a10dc9f

Please sign in to comment.