diff --git a/CMakeLists.txt b/CMakeLists.txt index b6df2b2..5acfa0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,136 +1,136 @@ project(kinfocenter) set(PROJECT_VERSION "5.15.80") cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) set(QT_MIN_VERSION "5.11.0") set(KF5_MIN_VERSION "5.50") find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) include(KDEInstallDirs) include(KDECMakeSettings) include(KDECompilerSettings NO_POLICY_SCOPE) include(FeatureSummary) find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Widgets) find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Completion Config ConfigWidgets CoreAddons Crash DBusAddons DocTools I18n IconThemes KCMUtils KIO Service Solid WidgetsAddons WindowSystem XmlGui Declarative Package Solid ) if(${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL "GL") find_package(OpenGL) set_package_properties(OpenGL PROPERTIES DESCRIPTION "The OpenGL libraries" URL "http://www.opengl.org" TYPE OPTIONAL ) else() find_package(OpenGLES) set_package_properties(OpenGLES PROPERTIES DESCRIPTION "The OpenGLES libraries" URL "http://www.khronos.org/opengles" TYPE OPTIONAL ) endif() find_package(EGL) set_package_properties(EGL PROPERTIES TYPE OPTIONAL PURPOSE "Required for OpenGL Information Module" ) find_package(KF5Wayland CONFIG) set_package_properties(KF5Wayland PROPERTIES TYPE OPTIONAL ) add_feature_info("KF5Wayland" KF5Wayland_FOUND "Required for Wayland Compositor Information Module") if(NOT APPLE) find_package(X11) set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries" URL "http://www.x.org" TYPE OPTIONAL PURPOSE "Required for building the X11 based workspace" ) if(X11_FOUND) set(HAVE_X11 TRUE) endif() else() set(X11_FOUND False) endif() -configure_file(config-workspace.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-workspace.h) +configure_file(config-project-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-project-version.h) configure_file(config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h) include_directories(${CMAKE_CURRENT_BINARY_DIR}) remove_definitions(-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_KEYWORDS) add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT) add_definitions(-DQT_NO_URL_CAST_FROM_STRING) add_definitions(-DQT_USE_QSTRINGBUILDER) add_subdirectory( Categories ) add_subdirectory( kcontrol/menus ) add_subdirectory( Modules ) include(ECMOptionalAddSubdirectory) ecm_optional_add_subdirectory( doc ) include_directories( ToolTips ) set( kinfocenter_SRCS infocenter.cpp main.cpp sidepanel.cpp kcmcontainer.cpp kcmtreeitem.cpp kcmcategoryitem.cpp infokcmmodel.cpp infokcmproxymodel.cpp ToolTips/tooltipmanager.cpp ) add_executable( kinfocenter ${kinfocenter_SRCS} ) target_compile_definitions(kinfocenter PRIVATE -DPROJECT_VERSION="${PROJECT_VERSION}") target_link_libraries( kinfocenter KF5::Completion KF5::ConfigWidgets KF5::CoreAddons KF5::Crash KF5::DBusAddons KF5::I18n KF5::IconThemes KF5::KCMUtils KF5::Service KF5::Solid KF5::WidgetsAddons KF5::WindowSystem KF5::XmlGui ) ##install install( TARGETS kinfocenter ${INSTALL_TARGETS_DEFAULT_ARGS} ) install( PROGRAMS org.kde.kinfocenter.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) install( FILES kinfocenterui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kinfocenter ) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/config-X11.h.cmake b/config-X11.h.cmake index 7ed1b8c..48c2470 100644 --- a/config-X11.h.cmake +++ b/config-X11.h.cmake @@ -1,44 +1,2 @@ -/* Define if you have the XRandR extension */ -#cmakedefine HAVE_XRANDR 1 - -/* Define if you have the XDamage extension */ -#cmakedefine HAVE_XDAMAGE 1 - -/* Define if you have the XKB extension */ -#cmakedefine HAVE_XKB 1 - -/* Define if you have the Xinerama extension */ -#cmakedefine HAVE_XINERAMA 1 - -/* Define if you have the XSHM (MIT SHM) extension */ -#cmakedefine HAVE_XSHM 1 - -/* Define if you have the XComposite extension */ -#cmakedefine HAVE_XCOMPOSITE 1 - -/* Define to 1 if you have Xcursor */ -#cmakedefine HAVE_XCURSOR 1 - -/* Define if you have the xf86misc extension */ -#cmakedefine HAVE_XF86MISC 1 - -/* Define if you have the XFixes extension */ -#cmakedefine HAVE_XFIXES 1 - -/* Define if you have the XTest extension */ -#cmakedefine HAVE_XTEST 1 - -/* Define if your system has XRender support */ -#cmakedefine HAVE_XRENDER 1 - -/* Define if you have OpenGL */ -#cmakedefine HAVE_OPENGL 1 - -/* Define if you have the XSync extension */ -#cmakedefine HAVE_XSYNC 1 - -/* Define if you have XRandR 1.3 */ -#cmakedefine HAS_RANDR_1_3 1 - -/* Define if you have X11 at all */ -#cmakedefine HAVE_X11 1 +/* Set to 1 if you have X11 at all */ +#cmakedefine01 HAVE_X11 diff --git a/config-project-version.h.cmake b/config-project-version.h.cmake new file mode 100644 index 0000000..bfcd42a --- /dev/null +++ b/config-project-version.h.cmake @@ -0,0 +1 @@ +#define PROJECT_VERSION "${PROJECT_VERSION}" diff --git a/config-workspace.h.cmake b/config-workspace.h.cmake deleted file mode 100644 index 7cbd756..0000000 --- a/config-workspace.h.cmake +++ /dev/null @@ -1,159 +0,0 @@ -/* config-workspace.h. Generated by cmake from config-workspace.h.cmake */ - -#cmakedefine HAVE_QIMAGEBLITZ - -/* Define if you have DPMS support */ -#cmakedefine HAVE_DPMS 1 - -/* Define if you have the DPMSCapable prototype in */ -#cmakedefine HAVE_DPMSCAPABLE_PROTO 1 - -/* Define if you have the DPMSInfo prototype in */ -#cmakedefine HAVE_DPMSINFO_PROTO 1 - -/* Defines if your system has the libfontconfig library */ -#cmakedefine HAVE_FONTCONFIG 1 - -/* Defines if your system has the freetype library */ -#cmakedefine HAVE_FREETYPE 1 - -/* Define if you have gethostname */ -#cmakedefine HAVE_GETHOSTNAME 1 - -/* Define if you have the gethostname prototype */ -#cmakedefine HAVE_GETHOSTNAME_PROTO 1 - -/* Define to 1 if you have the `getpeereid' function. */ -#cmakedefine HAVE_GETPEEREID 1 - -/* Defines if you have Solaris' libkstat */ -/* #undef HAVE_KSTAT */ - -/* Define if you have long long as datatype */ -#cmakedefine HAVE_LONG_LONG 1 - -/* Define to 1 if you have the `nice' function. */ -#cmakedefine HAVE_NICE 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SASL_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SASL_SASL_H 1 - -/* Define to 1 if you have the `setpriority' function. */ -#cmakedefine HAVE_SETPRIORITY 1 - -/* Define to 1 if you have the `sigaction' function. */ -#cmakedefine HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigset' function. */ -#cmakedefine HAVE_SIGSET 1 - -/* Define to 1 if you have statvfs */ -#cmakedefine HAVE_STATVFS 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRING_H 1 - -/* Define if you have the struct ucred */ -#cmakedefine HAVE_STRUCT_UCRED 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_LOADAVG_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_MOUNT_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_STATFS_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_STATVFS_H 1 - -/* Define to 1 if you have statfs(). */ -#cmakedefine HAVE_STATFS 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_VFS_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_WAIT_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_UNISTD_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_MALLOC_H 1 - -/* Define if you have unsetenv */ -#cmakedefine HAVE_UNSETENV 1 - -/* Define if you have the unsetenv prototype */ -#cmakedefine HAVE_UNSETENV_PROTO 1 - -/* Define if you have usleep */ -#cmakedefine HAVE_USLEEP 1 - -/* Define if you have the usleep prototype */ -#cmakedefine HAVE_USLEEP_PROTO 1 - -/* Define to 1 if you have the `vsnprintf' function. */ -#cmakedefine HAVE_VSNPRINTF 1 - -/* Define to 1 if you have the Wayland libraries. */ -#cmakedefine WAYLAND_FOUND 1 - -/* KDE's default home directory */ -#cmakedefine KDE_DEFAULT_HOME "${KDE_DEFAULT_HOME}" - -/* KDE's binaries directory */ -#define KDE_BINDIR "${BIN_INSTALL_DIR}" - -/* KDE's configuration directory */ -#define KDE_CONFDIR "${CONFIG_INSTALL_DIR}" - -/* KDE's static data directory */ -#define KDE_DATADIR "${DATA_INSTALL_DIR}" - -/* Define where your java executable is */ -#undef PATH_JAVA - -/* Define to 1 if you can safely include both and . */ -#cmakedefine TIME_WITH_SYS_TIME 1 - -/* X binaries directory */ -#cmakedefine XBINDIR "${XBINDIR}" - -/* X libraries directory */ -#cmakedefine XLIBDIR "${XLIBDIR}" - -/* Number of bits in a file offset, on hosts where this is settable. */ -#define _FILE_OFFSET_BITS 64 - -/* - * On HP-UX, the declaration of vsnprintf() is needed every time ! - */ - -/* type to use in place of socklen_t if not defined */ -#define kde_socklen_t socklen_t - -#define PROJECT_VERSION "${PROJECT_VERSION}" \ No newline at end of file diff --git a/main.cpp b/main.cpp index a81120d..0feb8fd 100644 --- a/main.cpp +++ b/main.cpp @@ -1,80 +1,80 @@ /* * main.cpp * * Copyright (C) 2010 David Hubner * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ //Local #include "main.h" //KDE #include #include #include -#include +#include #include #include //Qt #include KicApp::KicApp(int &argc, char **argv) : QApplication(argc, argv) { QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); KLocalizedString::setApplicationDomain("kinfocenter"); const auto displayName = i18n("Info Center"); KAboutData aboutData( QStringLiteral("kinfocenter"), displayName, QLatin1String(PROJECT_VERSION), displayName, KAboutLicense::GPL, i18n("Copyright 2009-2018 KDE")); aboutData.addAuthor(i18n("David Hubner"),i18n("Current Maintainer"), QStringLiteral("hubnerd@ntlworld.com")); aboutData.addAuthor(i18n("Helge Deller"), i18n("Previous Maintainer"), QStringLiteral("deller@kde.org")); aboutData.addAuthor(i18n("Matthias Hoelzer-Kluepfel"),QString(), QStringLiteral("hoelzer@kde.org")); aboutData.addAuthor(i18n("Matthias Elter"), QString(), QStringLiteral("elter@kde.org")); aboutData.addAuthor(i18n("Matthias Ettrich"), QString(), QStringLiteral("ettrich@kde.org")); aboutData.addAuthor(i18n("Waldo Bastian"), QString(), QStringLiteral("bastian@kde.org")); aboutData.addAuthor(i18n("Nicolas Ternisien"), QString(), QStringLiteral("nicolas.ternisien@gmail.com")); KAboutData::setApplicationData(aboutData); QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("hwinfo"))); QCommandLineParser parser; aboutData.setupCommandLine(&parser); parser.process(*this); aboutData.processCommandLine(&parser); auto *service = new KDBusService(KDBusService::Unique, this); display = new KInfoCenter(); display->show(); connect(service, &KDBusService::activateRequested, this, [this]() { KWindowSystem::forceActiveWindow(display->winId()); }); } int main(int argc, char *argv[]) { KicApp Kic(argc, argv); KCrash::initialize(); return Kic.exec(); }