Commit db23f049 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Port away from widgets

parent 0274ed70
......@@ -20,7 +20,7 @@ include(FeatureSummary)
include(KDEClangFormat)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Widgets
Gui
)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
......@@ -60,7 +60,7 @@ configure_file(config-kwrited.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwrited
if (BUILD_AS_EXECUTABLE)
add_executable(kwrited kwrited.cpp)
target_compile_definitions(kwrited PRIVATE -DPROJECT_VERSION="${PROJECT_VERSION}")
target_link_libraries(kwrited Qt5::Widgets KF5::CoreAddons KF5::I18n KF5::Notifications KF5::Pty)
target_link_libraries(kwrited Qt5::Gui KF5::CoreAddons KF5::I18n KF5::Notifications KF5::Pty)
install(TARGETS kwrited ${INSTALL_TARGETS_DEFAULT_ARGS} )
if(IS_ABSOLUTE BIN_INSTALL_DIR)
set(ABS_BIN_INSTALL_DIR "${BIN_INSTALL_DIR}")
......
......@@ -30,7 +30,7 @@
#include <kaboutdata.h>
#if defined(BUILD_AS_EXECUTABLE)
# include <QApplication>
# include <QGuiApplication>
# include <QSessionManager>
# include <signal.h>
# include <sys/types.h>
......@@ -53,7 +53,7 @@ static gid_t original_egid;
static void sigterm_handler(int signal)
{
Q_UNUSED(signal)
QApplication::quit();
QGuiApplication::quit();
}
int main(int argc, char **argv)
......@@ -70,8 +70,8 @@ int main(int argc, char **argv)
signal(SIGINT, sigterm_handler);
signal(SIGHUP, sigterm_handler);
QApplication::setDesktopSettingsAware(false);
QApplication a(argc, argv);
QGuiApplication::setDesktopSettingsAware(false);
QGuiApplication a(argc, argv);
KAboutData::setApplicationData(aboutData());
QGuiApplication::setFallbackSessionManagementEnabled(false);
auto disableSessionManagement = [](QSessionManager &sm) {
......
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