Use a macro THEME_CLASS from CMakeLists.txt instead of ifdefs.

This commit is contained in:
Klaas Freitag 2012-09-18 13:52:52 +03:00
parent 910803cacf
commit a9c7b9304e
3 changed files with 7 additions and 5 deletions

View file

@ -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)

View file

@ -1,4 +1,8 @@
#ifndef CONFIG_H
#define CONFIG_H
#cmakedefine USE_INOTIFY 1
#cmakedefine WITH_CSYNC 1
#cmakedefine THEME_CLASS @THEME_CLASS@
#endif

View file

@ -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() );