1 --- MEGAsync_ori/src/MEGASync/main.cpp Wed Jan 26 20:25:17 2022
2 +++ MEGAsync_patched/src/MEGASync/main.cpp Sun Mar 6 00:21:32 2022
4 #include <QFontDatabase>
8 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
10 #include <condition_variable>
16 -#if defined(WIN32) || defined(Q_OS_LINUX)
17 +#if defined(WIN32) || defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
26 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
27 MegaApplication *theapp = NULL;
28 bool waitForRestartSignal = false;
29 std::mutex mtxcondvar;
35 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
37 // Ensure interesting signals are unblocked.
38 sigset_t signalstounblock;
43 -#if defined(Q_OS_LINUX)
44 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
45 if (!(getenv("DO_NOT_SET_QT_PLUGIN_PATH")))
47 if (QDir(QString::fromUtf8("/opt/mega/plugins")).exists())
52 -#if defined(Q_OS_LINUX) && QT_VERSION >= 0x050C00
53 +#if (defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)) && QT_VERSION >= 0x050C00
54 // Linux && Qt >= 5.12.0
55 if (!(getenv("DO_NOT_UNSET_XDG_SESSION_TYPE")))
58 ScaleFactorManager scaleFactorManager(OsType::WIN);
61 -#if defined(Q_OS_LINUX)
62 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
63 ScaleFactorManager scaleFactorManager(OsType::LINUX);
70 -#if defined(Q_OS_LINUX)
71 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
72 #if QT_VERSION >= 0x050000
73 if (!(getenv("DO_NOT_UNSET_QT_QPA_PLATFORMTHEME")) && getenv("QT_QPA_PLATFORMTHEME"))
78 MegaApplication app(argc, argv);
79 -#if defined(Q_OS_LINUX)
80 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
82 appToWaitForSignal = QString::fromUtf8("\"%1\"").arg(MegaApplication::applicationFilePath());
83 for (int i = 1; i < argc; i++)
88 -#if defined(Q_OS_LINUX) && QT_VERSION >= 0x050600
89 +#if (defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)) && QT_VERSION >= 0x050600
90 for (const auto& screen : app.screens())
92 MegaApi::log(MegaApi::LOG_LEVEL_INFO, ("Device pixel ratio on '" +
94 int toret = app.exec();
98 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)