diff --git a/CMakeLists.txt b/CMakeLists.txt index 407e726..3c72d25 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,86 +1,84 @@ project(kmag) cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) set(QT_MIN_VERSION "5.2.0") find_package(ECM 1.3.0 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) -add_definitions(-DTRANSLATION_DOMAIN="kmag") - include(KDEInstallDirs) include(KDECompilerSettings NO_POLICY_SCOPE) include(KDECMakeSettings) include(ECMInstallIcons) include(FeatureSummary) find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Widgets PrintSupport ) find_package(KF5 REQUIRED COMPONENTS DocTools I18n KIO XmlGui ) find_package(QAccessibilityClient) set_package_properties(QAccessibilityClient PROPERTIES DESCRIPTION "KDE client-side accessibility library" URL "https://projects.kde.org/projects/playground/accessibility/libkdeaccessibilityclient" TYPE OPTIONAL PURPOSE "Required to enable keyboard focus tracking." ) configure_file( "${PROJECT_SOURCE_DIR}/focustrackconfig.h.in" "${PROJECT_BINARY_DIR}/focustrackconfig.h") add_definitions( -DQT_NO_CAST_FROM_ASCII ) add_definitions( -DQT_NO_CAST_TO_ASCII ) add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}) if(QAccessibilityClient_FOUND) include_directories(${QACCESSIBILITYCLIENT_INCLUDE_DIR}) endif(QAccessibilityClient_FOUND) add_subdirectory( doc ) add_subdirectory( pics ) ########### next target ############### set(kmag_SRCS kmagzoomview.cpp kmagselrect.cpp kmag.cpp colorsim.cpp main.cpp ) add_executable(kmag ${kmag_SRCS}) target_link_libraries(kmag Qt5::Core Qt5::Widgets Qt5::PrintSupport KF5::KIOCore KF5::I18n KF5::XmlGui ) if(QAccessibilityClient_FOUND) target_link_libraries(kmag ${QACCESSIBILITYCLIENT_LIBRARY}) endif(QAccessibilityClient_FOUND) install(TARGETS kmag ${INSTALL_TARGETS_DEFAULT_ARGS} ) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) ########### install files ############### install( PROGRAMS org.kde.kmag.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) install( FILES kmagui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kmag ) ecm_install_icons( ICONS 16-apps-kmag.png 32-apps-kmag.png DESTINATION ${ICON_INSTALL_DIR} ) diff --git a/main.cpp b/main.cpp index 6557293..9ccb585 100644 --- a/main.cpp +++ b/main.cpp @@ -1,77 +1,79 @@ /*************************************************************************** main.cpp - description ------------------- begin : Mon Feb 12 23:45:41 EST 2001 copyright : (C) 2001-2003 by Sarang Lakare email : sarang#users.sf.net ***************************************************************************/ /*************************************************************************** * * * 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. * * * ***************************************************************************/ // Qt #include #include // KF5 #include #include #include "kmag.h" #include "version.h" KmagApp *kmagapp; // Not needed, not used. //static const char description[] = // I18N_NOOP("Kmag"); // INSERT A DESCRIPTION FOR YOUR APPLICATION HERE int main(int argc, char *argv[]) { + QApplication app(argc, argv); + KLocalizedString::setApplicationDomain("kmag"); + // about the application KAboutData aboutData(QStringLiteral("kmag"), i18n("KMagnifier"), QStringLiteral(KMAG_VERSION), i18n("Screen magnifier for the K Desktop Environment (KDE)"), KAboutLicense::GPL, i18n("Copyright 2001-2003 Sarang Lakare\nCopyright 2003-2004 Olaf Schmidt\nCopyright 2008 Matthew Woehlke"), QString(), QStringLiteral("http://accessibility.kde.org/")); // about the authors aboutData.addAuthor(i18n("Sarang Lakare"), i18n("Rewrite"),QStringLiteral("sarang@users.sf.net"), QStringLiteral("http://www.cs.sunysb.edu/~lsarang/linux")); aboutData.addAuthor(i18n("Michael Forster"), i18n("Original idea and author (KDE1)"), QStringLiteral("forster@fmi.uni-passau.de")); aboutData.addAuthor(i18n("Olaf Schmidt"), i18n("Rework of the user interface, improved selection window, speed optimization, rotation, bug fixes"), QStringLiteral("ojschmidt@kde.org")); aboutData.addCredit(i18n("Matthew Woehlke"), i18n("Color-blindness simulation"), QStringLiteral("mw_triad@users.sourceforge.net")); aboutData.addCredit(i18n("Sebastian Sauer"), i18n("Focus tracking"), QStringLiteral("sebsauer@kdab.com")); aboutData.addCredit(i18n("Claudiu Costin"), i18n("Some tips"), QStringLiteral("claudiuc@work.ro"), QStringLiteral("http://www.ro.kde.org")); - QApplication app(argc, argv); KAboutData::setApplicationData(aboutData); if (app.isSessionRestored()) { RESTORE(KmagApp); } else { QCommandLineParser parser; parser.addHelpOption(); parser.addVersionOption(); parser.process(app); kmagapp = new KmagApp(); kmagapp->show(); } return app.exec(); }