Commit 3ded4172 authored by Jonah Brüchert's avatar Jonah Brüchert 🌳 Committed by Linus Jahn

Fix non-QWidgets enabled builds

parent 42460ae8
......@@ -43,13 +43,16 @@ if(NOT UBUNTU_TOUCH)
DESCRIPTION "Integration with QWidget based desktop styles"
TYPE OPTIONAL
)
if(Qt5Widgets_FOUND)
set(HAVE_QWIDGETS 1)
add_definitions(-DHAVE_QWIDGETS)
endif()
if(Qt5Widgets_FOUND)
add_definitions(-DHAVE_QWIDGETS -DQAPPLICATION_CLASS=QApplication)
set(__Qt5Widgets_LIBRARIES Qt5::Widgets)
endif()
else()
add_definitions(-DQAPPLICATION_CLASS=QGuiApplication)
endif()
#
# Load submodules
#
......
......@@ -32,11 +32,6 @@
#include <QCommandLineParser>
#include <QCommandLineOption>
#include <QDebug>
#if HAVE_QWIDGETS
#include <QApplication>
#else
#include <QGuiApplication>
#endif
#include <QLocale>
#include <qqml.h>
#include <QQmlApplicationEngine>
......@@ -54,6 +49,12 @@
#include "Globals.h"
#include "Enums.h"
#include "StatusBar.h"
#ifndef QAPPLICATION_CLASS
#define QAPPLICATION_CLASS QApplication
#endif
#include QT_STRINGIFY(QAPPLICATION_CLASS)
// SingleApplication (Qt5 replacement for QtSingleApplication)
#include "singleapp/singleapplication.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment