diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e45ba83..bf01ee76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,9 +23,11 @@ enable_testing() # disable experimental Qt Quick GUI by default except on mobile platforms, enable libsyncthing by default if (ANDROID OR IOS) + set(WIDGET_GUI_ENABLED_BY_DEFAULT OFF) set(QUICK_GUI_ENABLED_BY_DEFAULT ON) set(LIBSYNCTHING_DISABLED_BY_DEFAULT OFF) else () + set(WIDGET_GUI_ENABLED_BY_DEFAULT ON) set(QUICK_GUI_ENABLED_BY_DEFAULT OFF) set(LIBSYNCTHING_DISABLED_BY_DEFAULT ON) endif () @@ -63,6 +65,7 @@ option(NO_FILE_ITEM_ACTION_PLUGIN "whether building the file item action plugin option(NO_MODEL "whether building models should be skipped, implies NO_TRAY" OFF) option(NO_WIDGETS "whether building widgets should be skipped, implies NO_TRAY" OFF) option(NO_PLASMOID "whether building the Plasmoid for the Plasma desktop should be skipped" "${PLASMOID_DISABLED_BY_DEFAULT}") +option(WIDGETS_GUI "enables/disables building the Qt Widgets GUI (disabled by default)" ${WIDGET_GUI_ENABLED_BY_DEFAULT}) option(QUICK_GUI "enables/disables building the experimental Qt Quick GUI (disabled by default)" ${QUICK_GUI_ENABLED_BY_DEFAULT}) # allow using non-default configuration diff --git a/syncthingmodel/CMakeLists.txt b/syncthingmodel/CMakeLists.txt index 0d635484..e26fc766 100644 --- a/syncthingmodel/CMakeLists.txt +++ b/syncthingmodel/CMakeLists.txt @@ -8,13 +8,13 @@ set(META_APP_DESCRIPTION "Data models of Syncthing Tray") set(META_PROJECT_VARNAME_UPPER LIB_SYNCTHING_MODEL) set(META_PUBLIC_QT_MODULES Gui Widgets) set(META_SRCDIR_REFS "${CMAKE_CURRENT_SOURCE_DIR}/../syncthingconnector") +set(META_GUI_OPTIONAL ON) # add project files set(HEADER_FILES syncthingmodel.h syncthingdirectorymodel.h syncthingdevicemodel.h - syncthingdownloadmodel.h syncthingerrormodel.h syncthingfilemodel.h syncthingrecentchangesmodel.h @@ -27,7 +27,6 @@ set(SRC_FILES syncthingmodel.cpp syncthingdirectorymodel.cpp syncthingdevicemodel.cpp - syncthingdownloadmodel.cpp syncthingerrormodel.cpp syncthingfilemodel.cpp syncthingrecentchangesmodel.cpp @@ -35,6 +34,8 @@ set(SRC_FILES syncthingstatuscomputionmodel.cpp syncthingstatusselectionmodel.cpp syncthingicons.cpp) +set(WIDGETS_HEADER_FILES syncthingdownloadmodel.h) +set(WIDGETS_SRC_FILES syncthingdownloadmodel.cpp) set(RES_FILES resources/${META_PROJECT_NAME}icons.qrc) set(TS_FILES translations/${META_PROJECT_NAME}_zh_CN.ts translations/${META_PROJECT_NAME}_cs_CZ.ts @@ -61,14 +62,7 @@ find_package(${PACKAGE_NAMESPACE_PREFIX}qtforkawesome${CONFIGURATION_PACKAGE_SUF use_qt_fork_awesome(VISIBILITY PUBLIC) # link also explicitly against the following Qt modules -list( - APPEND - ADDITIONAL_QT_MODULES - Concurrent - Network - Gui - Widgets - Svg) +list(APPEND ADDITIONAL_QT_MODULES Concurrent Network Gui Svg) # include modules to apply configuration include(BasicConfig) diff --git a/syncthingwidgets/CMakeLists.txt b/syncthingwidgets/CMakeLists.txt index 6d9eb08e..521cbea4 100644 --- a/syncthingwidgets/CMakeLists.txt +++ b/syncthingwidgets/CMakeLists.txt @@ -3,11 +3,14 @@ cmake_minimum_required(VERSION 3.17.0 FATAL_ERROR) # metadata set(META_PROJECT_NAME syncthingwidgets) set(META_PROJECT_TYPE library) -set(META_APP_NAME "Widgets of Syncthing Tray") +set(META_APP_NAME "UI elements of Syncthing Tray") set(META_PUBLIC_QT_MODULES Gui Widgets) set(META_WEBVIEW_SRC_DIR webview) +set(META_GUI_OPTIONAL ON) # add project files +set(HEADER_FILES misc/diffhighlighter.h misc/internalerror.h misc/statusinfo.h misc/syncthinglauncher.h misc/utils.h) +set(SRC_FILES misc/diffhighlighter.cpp misc/internalerror.cpp misc/statusinfo.cpp misc/syncthinglauncher.cpp misc/utils.cpp) set(WIDGETS_HEADER_FILES settings/settings.h settings/settingsdialog.h @@ -18,13 +21,9 @@ set(WIDGETS_HEADER_FILES misc/textviewdialog.h misc/internalerrorsdialog.h misc/direrrorsdialog.h - misc/statusinfo.h misc/dbusstatusnotifier.h - misc/internalerror.h misc/otherdialogs.h - misc/syncthinglauncher.h - misc/syncthingkiller.h - misc/utils.h) + misc/syncthingkiller.h) set(WIDGETS_SRC_FILES settings/settings.cpp settings/settingsdialog.cpp @@ -38,13 +37,9 @@ set(WIDGETS_SRC_FILES misc/textviewdialog.cpp misc/internalerrorsdialog.cpp misc/direrrorsdialog.cpp - misc/statusinfo.cpp misc/dbusstatusnotifier.cpp - misc/internalerror.cpp misc/otherdialogs.cpp - misc/syncthinglauncher.cpp - misc/syncthingkiller.cpp - misc/utils.cpp) + misc/syncthingkiller.cpp) set(RES_FILES resources/${META_PROJECT_NAME}icons.qrc) set(WIDGETS_UI_FILES settings/connectionoptionpage.ui diff --git a/syncthingwidgets/misc/diffhighlighter.cpp b/syncthingwidgets/misc/diffhighlighter.cpp new file mode 100644 index 00000000..d72bc955 --- /dev/null +++ b/syncthingwidgets/misc/diffhighlighter.cpp @@ -0,0 +1,37 @@ +#include "./diffhighlighter.h" + +#include + +#include +#include +#include + +using namespace std; +using namespace Data; + +namespace QtGui { + +DiffHighlighter::DiffHighlighter(QTextDocument *parent) + : QSyntaxHighlighter(parent) + , m_enabled(true) +{ + auto font = QFontDatabase::systemFont(QFontDatabase::FixedFont); + m_baseFormat.setFont(font); + + font.setBold(true); + m_addedFormat.setFont(font); + m_addedFormat.setForeground(Colors::green(true)); + m_deletedFormat.setFont(font); + m_deletedFormat.setForeground(Colors::red(true)); +} + +void DiffHighlighter::highlightBlock(const QString &text) +{ + if (text.startsWith(QChar('-'))) { + setFormat(0, static_cast(text.size()), QColor(Qt::red)); + } else if (text.startsWith(QChar('+'))) { + setFormat(0, static_cast(text.size()), QColor(Qt::green)); + } +} + +} // namespace QtGui diff --git a/syncthingwidgets/misc/diffhighlighter.h b/syncthingwidgets/misc/diffhighlighter.h new file mode 100644 index 00000000..785108da --- /dev/null +++ b/syncthingwidgets/misc/diffhighlighter.h @@ -0,0 +1,39 @@ +#ifndef SYNCTHINGWIDGETS_DIFF_HIGHLIGHTER_H +#define SYNCTHINGWIDGETS_DIFF_HIGHLIGHTER_H + +#include "../global.h" + +#include +#include + +namespace QtGui { + +class SYNCTHINGWIDGETS_EXPORT DiffHighlighter : public QSyntaxHighlighter { + Q_OBJECT + Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled) +public: + explicit DiffHighlighter(QTextDocument *parent = nullptr); + + bool isEnabled() const + { + return m_enabled; + } + void setEnabled(bool enabled) + { + if (enabled != m_enabled) { + m_enabled = enabled; + rehighlight(); + } + } + +protected: + void highlightBlock(const QString &text) override; + +private: + QTextCharFormat m_baseFormat, m_addedFormat, m_deletedFormat; + bool m_enabled; +}; + +} // namespace QtGui + +#endif // SYNCTHINGWIDGETS_DIFF_HIGHLIGHTER_H diff --git a/syncthingwidgets/misc/internalerror.cpp b/syncthingwidgets/misc/internalerror.cpp index 61e88af0..144fe542 100644 --- a/syncthingwidgets/misc/internalerror.cpp +++ b/syncthingwidgets/misc/internalerror.cpp @@ -1,7 +1,9 @@ #include "./internalerror.h" #include "./syncthinglauncher.h" +#if defined(SYNCTHINGWIDGETS_GUI_QTWIDGETS) #include "../settings/settings.h" +#endif #include #include @@ -12,6 +14,7 @@ using namespace Data; namespace QtGui { +#if defined(SYNCTHINGWIDGETS_GUI_QTWIDGETS) /*! * \brief Returns whether to ignore inavailability after start or standby-wakeup. */ @@ -61,6 +64,7 @@ static bool ignoreInavailabilityAfterStart(const Settings::Settings &settings, c #endif return false; } +#endif /*! * \brief Returns whether the error is relevant. Only in this case a notification for the error should be shown. @@ -78,6 +82,7 @@ bool InternalError::isRelevant(const SyncthingConnection &connection, SyncthingE return true; } +#if defined(SYNCTHINGWIDGETS_GUI_QTWIDGETS) // ignore configuration errors on first launch (to avoid greeting people with an error message) const auto &settings = Settings::values(); if ((settings.firstLaunch || settings.fakeFirstLaunch) @@ -105,5 +110,8 @@ bool InternalError::isRelevant(const SyncthingConnection &connection, SyncthingE service, #endif message, networkError); +#else + return true; +#endif } } // namespace QtGui diff --git a/syncthingwidgets/misc/otherdialogs.cpp b/syncthingwidgets/misc/otherdialogs.cpp index e2d173e8..117a60c6 100644 --- a/syncthingwidgets/misc/otherdialogs.cpp +++ b/syncthingwidgets/misc/otherdialogs.cpp @@ -1,4 +1,6 @@ #include "./otherdialogs.h" + +#include "./diffhighlighter.h" #include "./textviewdialog.h" #include @@ -36,29 +38,6 @@ using namespace Data; namespace QtGui { -DiffHighlighter::DiffHighlighter(QTextDocument *parent) - : QSyntaxHighlighter(parent) - , m_enabled(true) -{ - auto font = QFontDatabase::systemFont(QFontDatabase::FixedFont); - m_baseFormat.setFont(font); - - font.setBold(true); - m_addedFormat.setFont(font); - m_addedFormat.setForeground(Colors::green(true)); - m_deletedFormat.setFont(font); - m_deletedFormat.setForeground(Colors::red(true)); -} - -void DiffHighlighter::highlightBlock(const QString &text) -{ - if (text.startsWith(QChar('-'))) { - setFormat(0, static_cast(text.size()), QColor(Qt::red)); - } else if (text.startsWith(QChar('+'))) { - setFormat(0, static_cast(text.size()), QColor(Qt::green)); - } -} - static void setupOwnDeviceIdDialog(Data::SyncthingConnection &connection, int size, QWidget *dlg) { dlg->setWindowTitle(QCoreApplication::translate("QtGui::OtherDialogs", "Own device ID") + QStringLiteral(" - " APP_NAME)); diff --git a/syncthingwidgets/misc/otherdialogs.h b/syncthingwidgets/misc/otherdialogs.h index 7ea228d0..154d1c08 100644 --- a/syncthingwidgets/misc/otherdialogs.h +++ b/syncthingwidgets/misc/otherdialogs.h @@ -5,9 +5,6 @@ #include -#include -#include - QT_FORWARD_DECLARE_CLASS(QDialog) QT_FORWARD_DECLARE_CLASS(QWidget) @@ -19,32 +16,6 @@ struct SyncthingDir; namespace QtGui { class TextViewDialog; -class SYNCTHINGWIDGETS_EXPORT DiffHighlighter : public QSyntaxHighlighter { - Q_OBJECT - Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled) -public: - explicit DiffHighlighter(QTextDocument *parent = nullptr); - - bool isEnabled() const - { - return m_enabled; - } - void setEnabled(bool enabled) - { - if (enabled != m_enabled) { - m_enabled = enabled; - rehighlight(); - } - } - -protected: - void highlightBlock(const QString &text) override; - -private: - QTextCharFormat m_baseFormat, m_addedFormat, m_deletedFormat; - bool m_enabled; -}; - SYNCTHINGWIDGETS_EXPORT QDialog *ownDeviceIdDialog(Data::SyncthingConnection &connection); SYNCTHINGWIDGETS_EXPORT QWidget *ownDeviceIdWidget(Data::SyncthingConnection &connection, int size, QWidget *parent = nullptr); SYNCTHINGWIDGETS_EXPORT QDialog *browseRemoteFilesDialog( diff --git a/syncthingwidgets/misc/syncthinglauncher.cpp b/syncthingwidgets/misc/syncthinglauncher.cpp index 50956ac6..a33a542f 100644 --- a/syncthingwidgets/misc/syncthinglauncher.cpp +++ b/syncthingwidgets/misc/syncthinglauncher.cpp @@ -3,7 +3,9 @@ #include #include +#if defined(SYNCTHINGWIDGETS_GUI_QTWIDGETS) #include "../settings/settings.h" +#endif #include @@ -41,7 +43,9 @@ SyncthingLauncher *SyncthingLauncher::s_mainInstance = nullptr; */ SyncthingLauncher::SyncthingLauncher(QObject *parent) : QObject(parent) +#if defined(SYNCTHINGWIDGETS_GUI_QTWIDGETS) , m_lastLauncherSettings(nullptr) +#endif , m_relevantConnection(nullptr) , m_guiListeningUrlSearch("Access the GUI via the following URL: ", "\n\r", std::string_view(), BufferSearch::CallbackType()) , m_exitSearch("Syncthing exited: ", "\n\r", std::string_view(), BufferSearch::CallbackType()) @@ -92,7 +96,9 @@ void SyncthingLauncher::setRunning(bool running, LibSyncthing::RuntimeOptions && tearDownLibSyncthing(); } // save runtime options so Syncthing can resume in case runtime conditions allow it +#if defined(SYNCTHINGWIDGETS_GUI_QTWIDGETS) m_lastLauncherSettings = nullptr; +#endif m_lastRuntimeOptions = std::move(runtimeOptions); // emit signal in any case (even if there's no change) so runningStatus() is re-evaluated emit runningChanged(shouldBeRunning); @@ -155,13 +161,19 @@ void SyncthingLauncher::setNetworkConnectionMetered(std::optional metered) if (metered.value_or(false)) { terminateDueToMeteredConnection(); } else if (!metered.value_or(true) && m_stoppedMetered) { +#if defined(SYNCTHINGWIDGETS_GUI_QTWIDGETS) if (m_lastLauncherSettings) { launch(*m_lastLauncherSettings); -#ifdef SYNCTHINGWIDGETS_USE_LIBSYNCTHING - } else if (m_lastRuntimeOptions) { - launch(*m_lastRuntimeOptions); + } #endif +#if defined(SYNCTHINGWIDGETS_GUI_QTWIDGETS) && defined(SYNCTHINGWIDGETS_USE_LIBSYNCTHING) + else +#endif +#if defined(SYNCTHINGWIDGETS_USE_LIBSYNCTHING) + if (m_lastRuntimeOptions) { + launch(*m_lastRuntimeOptions); } +#endif } } emit networkConnectionMeteredChanged(metered); @@ -231,6 +243,7 @@ void SyncthingLauncher::launch(const QString &program, const QStringList &argume #endif } +#if defined(SYNCTHINGWIDGETS_GUI_QTWIDGETS) /*! * \brief Launches a Syncthing instance according to the specified \a launcherSettings. * \remarks Does nothing if already running an instance. @@ -267,6 +280,7 @@ void SyncthingLauncher::launch(const Settings::Launcher &launcherSettings) m_lastRuntimeOptions.reset(); #endif } +#endif #ifdef SYNCTHINGWIDGETS_USE_LIBSYNCTHING /*! @@ -438,9 +452,11 @@ void SyncthingLauncher::terminateDueToMeteredConnection() // running before) return; } +#if defined(SYNCTHINGWIDGETS_GUI_QTWIDGETS) if (m_lastLauncherSettings && !m_relevantConnection) { m_relevantConnection = m_lastLauncherSettings->connectionForLauncher(this); } +#endif terminate(m_relevantConnection); m_stoppedMetered = true; } diff --git a/syncthingwidgets/misc/syncthinglauncher.h b/syncthingwidgets/misc/syncthinglauncher.h index d590e13e..2d51d936 100644 --- a/syncthingwidgets/misc/syncthinglauncher.h +++ b/syncthingwidgets/misc/syncthinglauncher.h @@ -98,7 +98,9 @@ class SYNCTHINGWIDGETS_EXPORT SyncthingLauncher : public QObject { public Q_SLOTS: void launch(const QString &program, const QStringList &arguments); +#if defined(SYNCTHINGWIDGETS_GUI_QTWIDGETS) void launch(const Settings::Launcher &launcherSettings); +#endif void terminate(Data::SyncthingConnection *relevantConnection = nullptr); void kill(); void tearDownLibSyncthing(); @@ -124,7 +126,9 @@ private Q_SLOTS: SyncthingProcess m_process; QUrl m_guiListeningUrl; +#if defined(SYNCTHINGWIDGETS_GUI_QTWIDGETS) const Settings::Launcher *m_lastLauncherSettings; +#endif #ifdef SYNCTHINGWIDGETS_USE_LIBSYNCTHING std::optional m_lastRuntimeOptions; #endif diff --git a/tray/CMakeLists.txt b/tray/CMakeLists.txt index 8b6f65b1..f7bfbf35 100644 --- a/tray/CMakeLists.txt +++ b/tray/CMakeLists.txt @@ -4,8 +4,7 @@ cmake_minimum_required(VERSION 3.17.0 FATAL_ERROR) set(META_PROJECT_TYPE application) set(META_APP_NAME "Syncthing Tray") set(META_APP_NAME_QUICK_GUI "Syncthing App") -set(META_HAS_QUICK_GUI ON) -set(META_QUICK_GUI_OPTIONAL ON) +set(META_GUI_OPTIONAL ON) set(META_USE_QQC2 ON) if (QUICK_GUI) set(META_QT_VERSION 6.8.0) @@ -15,6 +14,8 @@ endif () set(META_SRCDIR_REFS "${CMAKE_CURRENT_SOURCE_DIR}\n${CMAKE_CURRENT_SOURCE_DIR}/../syncthingconnector") # add project files +set(HEADER_FILES) +set(SRC_FILES application/main.cpp) set(WIDGETS_HEADER_FILES application/singleinstance.h gui/trayicon.h @@ -28,7 +29,6 @@ set(WIDGETS_HEADER_FILES gui/downloadview.h gui/helper.h) set(WIDGETS_SRC_FILES - application/main.cpp application/singleinstance.cpp gui/trayicon.cpp gui/traywidget.cpp diff --git a/tray/application/main.cpp b/tray/application/main.cpp index 6b8feac5..5d6d174f 100644 --- a/tray/application/main.cpp +++ b/tray/application/main.cpp @@ -2,17 +2,21 @@ #define QT_UTILITIES_GUI_QTQUICK #endif +#ifdef GUI_QTWIDGETS #include "./singleinstance.h" #include "../gui/trayicon.h" #include "../gui/traywidget.h" +#endif #ifdef GUI_QTQUICK #include "../gui/quick/app.h" #endif #include +#ifdef GUI_QTWIDGETS #include +#endif #include @@ -39,13 +43,13 @@ #include #include -#include #include #include #include #ifdef GUI_QTWIDGETS #include +#include using QtApp = QApplication; #else #include @@ -83,6 +87,8 @@ Q_IMPORT_PLUGIN(ForkAwesomeIconEnginePlugin) ENABLE_QT_RESOURCES_OF_STATIC_DEPENDENCIES +#ifdef GUI_QTWIDGETS + #ifdef LIB_SYNCTHING_CONNECTOR_SUPPORT_SYSTEMD static void handleSystemdServiceError(const QString &context, const QString &name, const QString &message) { @@ -184,11 +190,16 @@ static void shutdownSyncthingTray() Settings::Launcher::terminate(); } +#endif + static int runApplication(int argc, const char *const *argv) { // setup argument parser auto parser = ArgumentParser(); auto qtConfigArgs = QT_CONFIG_ARGUMENTS(); + auto insecureArg = ConfigValueArgument("insecure", '\0', "allow any self-signed certificate"); + insecureArg.setFlags(Argument::Flags::Deprecated, true); // hide as it is only for development +#ifdef GUI_QTWIDGETS auto windowedArg = ConfigValueArgument("windowed", 'w', "opens the tray menu as a regular window"); auto showWebUiArg = ConfigValueArgument("webui", '\0', "instantly shows the web UI - meant for creating shortcut to web UI"); auto triggerArg = ConfigValueArgument("trigger", '\0', "instantly shows the left-click tray menu - meant for creating a shortcut"); @@ -197,8 +208,6 @@ static int runApplication(int argc, const char *const *argv) assumeFirstLaunchArg.setFlags(Argument::Flags::Deprecated, true); // hide as it is debug-only auto wipArg = ConfigValueArgument("wip", '\0', "enables WIP features"); wipArg.setFlags(Argument::Flags::Deprecated, true); // hide as it is debug-only - auto insecureArg = ConfigValueArgument("insecure", '\0', "allow any self-signed certificate"); - insecureArg.setFlags(Argument::Flags::Deprecated, true); // hide as it is only for development auto waitForTrayArg = ConfigValueArgument("wait", '\0', "wait until the system tray becomes available instead of showing an error message if the system tray is not available on start-up"); auto connectionArg = ConfigValueArgument("connection", '\0', "specifies one or more connection configurations to be used", { "config name" }); @@ -213,6 +222,7 @@ static int runApplication(int argc, const char *const *argv) auto &widgetsGuiArg = qtConfigArgs.qtWidgetsGuiArg(); widgetsGuiArg.addSubArguments({ &windowedArg, &showWebUiArg, &triggerArg, &waitForTrayArg, &connectionArg, &configPathArg, &singleInstanceArg, &newInstanceArg, &replaceArg, &showWizardArg, &assumeFirstLaunchArg, &wipArg, &insecureArg }); +#endif #ifdef GUI_QTQUICK auto &quickGuiArg = qtConfigArgs.qtQuickGuiArg(); quickGuiArg.addSubArgument(&insecureArg); @@ -240,14 +250,21 @@ static int runApplication(int argc, const char *const *argv) syncthingArg.setSubArguments({ &syncthingHelp }); #endif - parser.setMainArguments({ &widgetsGuiArg, + parser.setMainArguments({ +#ifdef GUI_QTWIDGETS + &widgetsGuiArg, +#endif #ifdef GUI_QTQUICK &quickGuiArg, #endif #ifdef SYNCTHINGTRAY_USE_LIBSYNCTHING &cliArg, &syncthingArg, #endif - &parser.noColorArg(), &parser.helpArg(), &quitArg }); + &parser.noColorArg(), &parser.helpArg(), +#ifdef GUI_QTWIDGETS + &quitArg +#endif + }); // parse arguments #if defined(Q_OS_ANDROID) @@ -259,6 +276,7 @@ static int runApplication(int argc, const char *const *argv) #endif parser.parseArgs(argc, argv); +#ifdef GUI_QTWIDGETS // quit already running application if quit is present static auto firstRun = true; if (quitArg.isPresent() && !firstRun) { @@ -266,6 +284,7 @@ static int runApplication(int argc, const char *const *argv) QCoreApplication::quit(); return EXIT_SUCCESS; } +#endif #ifdef GUI_QTQUICK if (quickGuiArg.isPresent()) { @@ -293,6 +312,7 @@ static int runApplication(int argc, const char *const *argv) } #endif +#ifdef GUI_QTWIDGETS // quit unless Qt Widgets GUI should be shown if (!widgetsGuiArg.isPresent()) { return EXIT_SUCCESS; @@ -389,6 +409,9 @@ static int runApplication(int argc, const char *const *argv) trigger(triggerArg.isPresent(), showWebUiArg.isPresent(), showWizardArg.isPresent()); } return res; +#else + return EXIT_SUCCESS; +#endif } int main(int argc, char *argv[]) diff --git a/tray/gui/quick/app.cpp b/tray/gui/quick/app.cpp index fdf8a23f..a69ef683 100644 --- a/tray/gui/quick/app.cpp +++ b/tray/gui/quick/app.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include diff --git a/tray/gui/quick/app.h b/tray/gui/quick/app.h index a575a035..d202ad22 100644 --- a/tray/gui/quick/app.h +++ b/tray/gui/quick/app.h @@ -3,6 +3,7 @@ #include "./quickicon.h" +#include #include #include #include