Obsolete library/mozjs-60
[oi-userland.git] / components / encumbered / megasync / patches / 14-main.cpp.patch
blobb92c649da5224f8425768a9910e0158d225eb06d
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
3 @@ -9,7 +9,7 @@
4 #include <QFontDatabase>
5 #include <assert.h>
7 -#ifdef Q_OS_LINUX
8 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
9 #include <signal.h>
10 #include <condition_variable>
11 #endif
12 @@ -24,7 +24,7 @@
13 #include <Shellapi.h>
14 #endif
16 -#if defined(WIN32) || defined(Q_OS_LINUX)
17 +#if defined(WIN32) || defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
18 #include <QScreen>
19 #endif
21 @@ -59,7 +59,7 @@
25 -#ifdef Q_OS_LINUX
26 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
27 MegaApplication *theapp = NULL;
28 bool waitForRestartSignal = false;
29 std::mutex mtxcondvar;
30 @@ -229,7 +229,7 @@
31 return 0;
34 -#ifdef Q_OS_LINUX
35 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
37 // Ensure interesting signals are unblocked.
38 sigset_t signalstounblock;
39 @@ -315,7 +315,7 @@
41 #endif
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())
48 @@ -333,7 +333,7 @@
50 #endif
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")))
57 @@ -350,7 +350,7 @@
58 ScaleFactorManager scaleFactorManager(OsType::WIN);
59 #endif
61 -#if defined(Q_OS_LINUX)
62 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
63 ScaleFactorManager scaleFactorManager(OsType::LINUX);
64 #endif
66 @@ -364,7 +364,7 @@
68 #endif
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"))
75 @@ -389,7 +389,7 @@
78 MegaApplication app(argc, argv);
79 -#if defined(Q_OS_LINUX)
80 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
81 theapp = &app;
82 appToWaitForSignal = QString::fromUtf8("\"%1\"").arg(MegaApplication::applicationFilePath());
83 for (int i = 1; i < argc; i++)
84 @@ -413,7 +413,7 @@
86 #endif
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 '" +
93 @@ -560,7 +560,7 @@
94 int toret = app.exec();
97 -#ifdef Q_OS_LINUX
98 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
99 theapp = nullptr;
100 #endif
101 return toret;