Fix building without Qt Widgets GUI support
This commit is contained in:
parent
67025418ff
commit
1582048a22
|
@ -163,8 +163,18 @@ use_qt_utilities()
|
||||||
find_package(passwordfile 3.1.0 REQUIRED)
|
find_package(passwordfile 3.1.0 REQUIRED)
|
||||||
use_password_file()
|
use_password_file()
|
||||||
|
|
||||||
# require Qt AndroidExtras and Kirigami2
|
# add further Qt/KF modules required by the
|
||||||
if(ANDROID AND QUICK_GUI)
|
if(ANDROID AND QUICK_GUI)
|
||||||
|
if(NOT WIDGETS_GUI)
|
||||||
|
option(ENABLE_UNDO_SUPPORT_FOR_QUICK_GUI "enables with undo/redo support for the Qt Quick GUI (requires Qt Widgets)" ON)
|
||||||
|
if(ENABLE_UNDO_SUPPORT_FOR_QUICK_GUI)
|
||||||
|
list(APPEND ADDITIONAL_QT_MODULES Widgets)
|
||||||
|
set_property(
|
||||||
|
SOURCE quickgui/controller.cpp
|
||||||
|
APPEND PROPERTY COMPILE_DEFINITIONS ${META_PROJECT_VARNAME}_ENABLE_UNDO_SUPPORT_FOR_QUICK_GUI
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
list(APPEND ADDITIONAL_QT_MODULES AndroidExtras)
|
list(APPEND ADDITIONAL_QT_MODULES AndroidExtras)
|
||||||
list(APPEND ADDITIONAL_KF_MODULES Kirigami2)
|
list(APPEND ADDITIONAL_KF_MODULES Kirigami2)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -12,9 +12,11 @@
|
||||||
|
|
||||||
QT_FORWARD_DECLARE_CLASS(QSettings)
|
QT_FORWARD_DECLARE_CLASS(QSettings)
|
||||||
|
|
||||||
#ifdef PASSWORD_MANAGER_GUI_QTWIDGETS
|
#if defined(PASSWORD_MANAGER_GUI_QTWIDGETS) || defined(PASSWORD_MANAGER_ENABLE_UNDO_SUPPORT_FOR_QUICK_GUI)
|
||||||
#define PASSWORD_MANAGER_UNDO_SUPPORT
|
#define PASSWORD_MANAGER_UNDO_SUPPORT
|
||||||
#include <QUndoStack>
|
#include <QUndoStack>
|
||||||
|
#else
|
||||||
|
QT_FORWARD_DECLARE_CLASS(QUndoStack)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace QtGui {
|
namespace QtGui {
|
||||||
|
|
Loading…
Reference in New Issue