From 790c169c02d8a5580b8a081c01a33376f450d757 Mon Sep 17 00:00:00 2001 From: defnax Date: Wed, 28 Feb 2024 19:47:01 +0100 Subject: [PATCH] Fix for macos --- retroshare-gui/src/main.cpp | 2 +- retroshare-gui/src/rshare.cpp | 6 ++++++ retroshare-gui/src/rshare.h | 7 +++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/retroshare-gui/src/main.cpp b/retroshare-gui/src/main.cpp index 3bc8e3c76..0eeca919d 100644 --- a/retroshare-gui/src/main.cpp +++ b/retroshare-gui/src/main.cpp @@ -705,7 +705,7 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO); * only on the first run - as the user might want to change it ;) */ QString osx_style("cleanlooks"); - Rshare::setStyle(osx_style); + RsApplication::setStyle(osx_style); Settings->setInterfaceStyle(osx_style); #endif diff --git a/retroshare-gui/src/rshare.cpp b/retroshare-gui/src/rshare.cpp index a5ecbf17d..01ca5304b 100644 --- a/retroshare-gui/src/rshare.cpp +++ b/retroshare-gui/src/rshare.cpp @@ -99,6 +99,12 @@ QStringList RsApplication::_files; /**< List of files passed by argume bool RsApplication::useConfigDir; QString RsApplication::configDir; #endif + +#ifdef __APPLE__ +QStringList RsApplication::_links; /**< List of links passed by arguments. */ +QStringList RsApplication::_files; /**< List of files passed by arguments. */ +#endif + Log RsApplication::log_output; /**< Logs debugging messages to file or stdout. */ RsGUIConfigOptions RsApplication::options; QDateTime RsApplication::mStartupTime; diff --git a/retroshare-gui/src/rshare.h b/retroshare-gui/src/rshare.h index e16a0049f..37847fa5e 100644 --- a/retroshare-gui/src/rshare.h +++ b/retroshare-gui/src/rshare.h @@ -138,7 +138,7 @@ public: static void setOpMode(const QString& op ) { options.opModeStr = op.toStdString(); } static QString opmode() { return QString::fromStdString(options.opModeStr); } -#ifdef TO_REMOVE +#ifdef __APPLE__ /** Returns links passed by arguments. */ static QStringList* links() { return &_links; } /** Returns files passed by arguments. */ @@ -209,7 +209,10 @@ private: static bool argNeedsValue(const QString &argName); #endif - +#ifdef __APPLE__ + static QStringList _links; /**< List of links passed by arguments. */ + static QStringList _files; /**< List of files passed by arguments. */ +#endif static QDateTime mStartupTime; // startup time bool mBlink; static QLocalServer* localServer;