mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-28 03:49:20 +03:00
Use a macro THEME_CLASS from CMakeLists.txt instead of ifdefs.
This commit is contained in:
parent
910803cacf
commit
a9c7b9304e
3 changed files with 7 additions and 5 deletions
|
@ -37,6 +37,7 @@ find_package(INotify)
|
|||
|
||||
set(WITH_CSYNC CSYNC_FOUND)
|
||||
set(USE_INOTIFY ${INOTIFY_FOUND})
|
||||
set(THEME_CLASS "ownCloudTheme")
|
||||
|
||||
configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#cmakedefine USE_INOTIFY 1
|
||||
#cmakedefine WITH_CSYNC 1
|
||||
|
||||
#cmakedefine THEME_CLASS @THEME_CLASS@
|
||||
#endif
|
||||
|
|
|
@ -75,15 +75,12 @@ Application::Application(int &argc, char **argv) :
|
|||
_networkMgr(new QNetworkConfigurationManager(this)),
|
||||
#endif
|
||||
_contextMenu(0),
|
||||
_theme(0),
|
||||
_updateDetector(0),
|
||||
_helpOnly(false)
|
||||
{
|
||||
|
||||
#ifdef OWNCLOUD_CLIENT
|
||||
_theme = new ownCloudTheme();
|
||||
#else
|
||||
_theme = new mirallTheme();
|
||||
#endif
|
||||
_theme = new THEME_CLASS;
|
||||
setApplicationName( _theme->appName() );
|
||||
setWindowIcon( _theme->applicationIcon() );
|
||||
|
||||
|
|
Loading…
Reference in a new issue