Switch to standalone repo kleopatra
authorAndre Heinecke <aheinecke@intevation.de>
Wed, 9 Mar 2016 14:02:21 +0000 (15:02 +0100)
committerAndre Heinecke <aheinecke@intevation.de>
Wed, 9 Mar 2016 14:02:21 +0000 (15:02 +0100)
* packages/packages.current (kleopatra): Update.
* patches/kleopatra/*: Rebase patches to new src layout.

packages/packages.current
patches/kleopatra/0001-Implement-KDBusService-alternative-for-Windows.patch
patches/kleopatra/0002-Add-alternative-configuredialog-wihout-KCMUtils.patch
patches/kleopatra/0003-Add-option-to-disable-KWatchGnuPG.patch
patches/kleopatra/0004-Make-DBus-integration-of-the-smime-conf-optional.patch
patches/kleopatra/0005-Hack-generated-conf-files-for-Crosscompiling.patch

index ddef2d7..5c58f16 100644 (file)
@@ -537,5 +537,5 @@ chk 76257cc32d5eeeb9e9e2b19a0bc60eb89d5807f7
 # last changed: see package date.
 # by: ah
 # verified: Tarball created by ah.
-file kleopatra/kleopatra-201603021128.tar.gz
-chk 4798bf3abfc51c623ae7f77cef915ad22aef847e
+file kleopatra/kleopatra-201603091447.tar.gz
+chk d77bd562b1729d38b5d4d104c76a0b6481165e2f
index 9b3ea4f..7cff6ed 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
-patch -p2 -l -f $* < $0
+patch -p1 -l -f $* < $0
 exit $?
 
-From 0af0ec9c52422aa23cfd4881880ceed44f57c17b Mon Sep 17 00:00:00 2001
+From 243a5fccc82d7b398ec3cc8509e0900eac5d35af Mon Sep 17 00:00:00 2001
 From: Andre Heinecke <aheinecke@intevation.de>
 Date: Fri, 29 Jan 2016 17:00:54 +0100
 Subject: [PATCH 1/5] Implement KDBusService alternative for Windows
@@ -10,38 +10,38 @@ Subject: [PATCH 1/5] Implement KDBusService alternative for Windows
 Instead of using KDBusService we can just use Window
 Messages to communicate with other processes on Windows.
 ---
kleopatra/CMakeLists.txt                   |  31 +++-
kleopatra/autotests/CMakeLists.txt         |  13 ++
kleopatra/autotests/kuniqueservicetest.cpp | 177 +++++++++++++++++++++++
kleopatra/kleopatraapplication.cpp         |   2 +
kleopatra/kwatchgnupg/CMakeLists.txt       |   6 +
kleopatra/kwatchgnupg/main.cpp             |   4 +-
kleopatra/main.cpp                         |   7 +-
kleopatra/utils/kuniqueservice.h           |  91 ++++++++++++
kleopatra/utils/kuniqueservice_dbus.cpp    |  64 +++++++++
kleopatra/utils/kuniqueservice_win.cpp     | 219 +++++++++++++++++++++++++++++
- 10 files changed, 606 insertions(+), 8 deletions(-)
- create mode 100644 kleopatra/autotests/CMakeLists.txt
- create mode 100644 kleopatra/autotests/kuniqueservicetest.cpp
- create mode 100644 kleopatra/utils/kuniqueservice.h
- create mode 100644 kleopatra/utils/kuniqueservice_dbus.cpp
- create mode 100644 kleopatra/utils/kuniqueservice_win.cpp
CMakeLists.txt                    |  15 ++-
autotests/CMakeLists.txt          |  13 +++
autotests/kuniqueservicetest.cpp  | 177 ++++++++++++++++++++++++++++++
src/kleopatraapplication.cpp      |   2 +
src/kwatchgnupg/CMakeLists.txt    |   6 ++
src/kwatchgnupg/main.cpp          |   4 +-
src/main.cpp                      |   7 +-
src/utils/kuniqueservice.h        |  91 ++++++++++++++++
src/utils/kuniqueservice_dbus.cpp |  64 +++++++++++
src/utils/kuniqueservice_win.cpp  | 219 ++++++++++++++++++++++++++++++++++++++
+ 10 files changed, 591 insertions(+), 7 deletions(-)
+ create mode 100644 autotests/CMakeLists.txt
+ create mode 100644 autotests/kuniqueservicetest.cpp
+ create mode 100644 src/utils/kuniqueservice.h
+ create mode 100644 src/utils/kuniqueservice_dbus.cpp
+ create mode 100644 src/utils/kuniqueservice_win.cpp
 
-diff --git a/kleopatra/CMakeLists.txt b/kleopatra/CMakeLists.txt
-index e2135c5..9d049f1 100644
---- a/kleopatra/CMakeLists.txt
-+++ b/kleopatra/CMakeLists.txt
-@@ -33,7 +33,6 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${kleopatra_SOURCE_DIR})
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2fddf22..7970ffe 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -32,7 +32,6 @@ include(ECMQtDeclareLoggingCategory)
 
  # Find KF5 packages
  find_package(KF5Codecs ${KF5_VERSION} CONFIG REQUIRED)
--  find_package(KF5DBusAddons ${KF5_VERSION} CONFIG REQUIRED)
  find_package(KF5KCMUtils ${KF5_VERSION} CONFIG REQUIRED)
  find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
  find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
-@@ -43,6 +42,19 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${kleopatra_SOURCE_DIR})
-   find_package(KF5WindowSystem ${KF5_VERSION} CONFIG REQUIRED)
  find_package(KF5TextWidgets ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5Codecs ${KF5_VERSION} CONFIG REQUIRED)
+-find_package(KF5DBusAddons ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5KCMUtils ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
+@@ -45,6 +44,19 @@ find_package(KF5DocTools REQUIRED)
+
set_package_properties(KF5DocTools PROPERTIES DESCRIPTION "Documentation tools" TYPE OPTIONAL PURPOSE "Required to generate Kleopatra documentation.")
 
 +# Optional packages
 +if (WIN32)
@@ -57,55 +57,21 @@ index e2135c5..9d049f1 100644
 +endif()
 +
  # Kdepimlibs packages
-   find_package(KF5Libkleo ${LIBKLEO_VERSION} CONFIG REQUIRED)
-   find_package(KF5Mime ${KMIME_VERSION} CONFIG REQUIRED)
-@@ -338,6 +350,13 @@ set(_kleopatra_SRCS
-   main.cpp
- )
-
-+if (KF5DBusAddons_FOUND)
-+  set(_kleopatra_SRCS ${_kleopatra_SRCS} utils/kuniqueservice_dbus.cpp)
-+else()
-+  # Alternative currently only implemented for windows
-+  set(_kleopatra_SRCS ${_kleopatra_SRCS} utils/kuniqueservice_win.cpp)
-+endif()
-+
- ecm_qt_declare_logging_category(_kleopatra_SRCS HEADER kleopatra_debug.h IDENTIFIER KLEOPATRA_LOG CATEGORY_NAME log_kleopatra)
-
- if(KLEO_MODEL_TEST)
-@@ -381,6 +400,10 @@ qt5_add_resources(_kleopatra_SRCS kleopatra.qrc)
- add_executable(kleopatra_bin ${_kleopatra_SRCS} ${_kleopatra_uiserver_SRCS})
- set_target_properties(kleopatra_bin PROPERTIES OUTPUT_NAME kleopatra)
+ find_package(KF5Libkleo ${LIBKLEO_VERSION} CONFIG REQUIRED)
+ find_package(KF5Mime ${KMIME_VERSION} CONFIG REQUIRED)
+@@ -116,6 +128,7 @@ add_subdirectory(src)
 
-+if (KF5DBusAddons_FOUND)
-+  set(_kleopatra_dbusaddons_libs KF5::DBusAddons)
-+endif()
-+
- target_link_libraries(kleopatra_bin
-   ${_kleopatra_extra_libs}
-   KF5::Libkleo
-@@ -390,7 +413,7 @@ target_link_libraries(kleopatra_bin
-   KF5::XmlGui
-   KF5::IconThemes
-   KF5::WindowSystem
--  KF5::DBusAddons
-+  ${_kleopatra_dbusaddons_libs}
-   Qt5::Network
-   ${_kleopatra_uiserver_extra_libs}
-   kleopatraclientcore
-@@ -416,3 +439,7 @@ install(
- )
-
- add_subdirectory(icons)
-+
-+if(BUILD_TESTING)
+ if(BUILD_TESTING)
+     add_subdirectory(tests)
 +    add_subdirectory(autotests)
-+endif()
-diff --git a/kleopatra/autotests/CMakeLists.txt b/kleopatra/autotests/CMakeLists.txt
+ endif()
+ install( FILES kleopatra.categories DESTINATION ${KDE_INSTALL_CONFDIR} )
+
+diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt
 new file mode 100644
 index 0000000..b987250
 --- /dev/null
-+++ b/kleopatra/autotests/CMakeLists.txt
++++ b/autotests/CMakeLists.txt
 @@ -0,0 +1,13 @@
 +set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
 +
@@ -120,11 +86,11 @@ index 0000000..b987250
 +add_test(kuniqueservicetest kuniqueservicetest)
 +ecm_mark_as_test(kuniqueservicetest)
 +target_link_libraries(kuniqueservicetest Qt5::Test ${_kleopatra_dbusaddons_libs})
-diff --git a/kleopatra/autotests/kuniqueservicetest.cpp b/kleopatra/autotests/kuniqueservicetest.cpp
+diff --git a/autotests/kuniqueservicetest.cpp b/autotests/kuniqueservicetest.cpp
 new file mode 100644
 index 0000000..1a83a5e
 --- /dev/null
-+++ b/kleopatra/autotests/kuniqueservicetest.cpp
++++ b/autotests/kuniqueservicetest.cpp
 @@ -0,0 +1,177 @@
 +/* This file is part of Kleopatra
 +
@@ -303,10 +269,10 @@ index 0000000..1a83a5e
 +
 +#include "kuniqueservicetest.moc"
 +
-diff --git a/kleopatra/kleopatraapplication.cpp b/kleopatra/kleopatraapplication.cpp
-index 457aacc..b22a573 100644
---- a/kleopatra/kleopatraapplication.cpp
-+++ b/kleopatra/kleopatraapplication.cpp
+diff --git a/src/kleopatraapplication.cpp b/src/kleopatraapplication.cpp
+index f4b3b55..1f58c54 100644
+--- a/src/kleopatraapplication.cpp
++++ b/src/kleopatraapplication.cpp
 @@ -236,7 +236,9 @@ void KleopatraApplication::slotActivateRequested(const QStringList &arguments,
      if (!err.isEmpty()) {
          KMessageBox::sorry(NULL, err.toHtmlEscaped(), i18n("Failed to execute command"));
@@ -317,10 +283,10 @@ index 457aacc..b22a573 100644
  }
 
  QString KleopatraApplication::newInstance(const QCommandLineParser &parser,
-diff --git a/kleopatra/kwatchgnupg/CMakeLists.txt b/kleopatra/kwatchgnupg/CMakeLists.txt
-index 26034c1..a1488af 100644
---- a/kleopatra/kwatchgnupg/CMakeLists.txt
-+++ b/kleopatra/kwatchgnupg/CMakeLists.txt
+diff --git a/src/kwatchgnupg/CMakeLists.txt b/src/kwatchgnupg/CMakeLists.txt
+index beda545..338cad5 100644
+--- a/src/kwatchgnupg/CMakeLists.txt
++++ b/src/kwatchgnupg/CMakeLists.txt
 @@ -9,6 +9,12 @@ set(kwatchgnupg_SRCS
    tray.cpp
    main.cpp
@@ -334,10 +300,10 @@ index 26034c1..a1488af 100644
  ecm_qt_declare_logging_category(kwatchgnupg_SRCS HEADER kwatchgnupg_debug.h IDENTIFIER KWATCHGNUPG_LOG CATEGORY_NAME log_kwatchgnupg)
  qt5_add_resources(kwatchgnupg_SRCS kwatchgnupg.qrc)
 
-diff --git a/kleopatra/kwatchgnupg/main.cpp b/kleopatra/kwatchgnupg/main.cpp
+diff --git a/src/kwatchgnupg/main.cpp b/src/kwatchgnupg/main.cpp
 index af7a4fd..78d2d7f 100644
---- a/kleopatra/kwatchgnupg/main.cpp
-+++ b/kleopatra/kwatchgnupg/main.cpp
+--- a/src/kwatchgnupg/main.cpp
++++ b/src/kwatchgnupg/main.cpp
 @@ -35,7 +35,7 @@
  #include "aboutdata.h"
  #include "kwatchgnupgmainwin.h"
@@ -356,10 +322,10 @@ index af7a4fd..78d2d7f 100644
 
      KWatchGnuPGMainWindow *mMainWin = new KWatchGnuPGMainWindow();
      mMainWin->show();
-diff --git a/kleopatra/main.cpp b/kleopatra/main.cpp
-index 61d441c..fada938 100644
---- a/kleopatra/main.cpp
-+++ b/kleopatra/main.cpp
+diff --git a/src/main.cpp b/src/main.cpp
+index 4b909d5..4a91273 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
 @@ -43,6 +43,7 @@
 
  #include <utils/gnupg-helper.h>
@@ -388,11 +354,11 @@ index 61d441c..fada938 100644
                       &app, &KleopatraApplication::slotActivateRequested);
      QObject::connect(&app, &KleopatraApplication::setExitValue,
      &service, [&service](int i) {
-diff --git a/kleopatra/utils/kuniqueservice.h b/kleopatra/utils/kuniqueservice.h
+diff --git a/src/utils/kuniqueservice.h b/src/utils/kuniqueservice.h
 new file mode 100644
 index 0000000..074cf01
 --- /dev/null
-+++ b/kleopatra/utils/kuniqueservice.h
++++ b/src/utils/kuniqueservice.h
 @@ -0,0 +1,91 @@
 +#ifndef KUNIQUESERVICE_H
 +#define KUNIQUESERVICE_H
@@ -485,11 +451,11 @@ index 0000000..074cf01
 +    KUniqueServicePrivate *d_ptr;
 +};
 +#endif // KUNIQUESERVICE_H
-diff --git a/kleopatra/utils/kuniqueservice_dbus.cpp b/kleopatra/utils/kuniqueservice_dbus.cpp
+diff --git a/src/utils/kuniqueservice_dbus.cpp b/src/utils/kuniqueservice_dbus.cpp
 new file mode 100644
 index 0000000..cf4ef96
 --- /dev/null
-+++ b/kleopatra/utils/kuniqueservice_dbus.cpp
++++ b/src/utils/kuniqueservice_dbus.cpp
 @@ -0,0 +1,64 @@
 +/*
 +    kuniqueservice_dbus.cpp
@@ -555,11 +521,11 @@ index 0000000..cf4ef96
 +}
 +
 +#include "moc_kuniqueservice.cpp"
-diff --git a/kleopatra/utils/kuniqueservice_win.cpp b/kleopatra/utils/kuniqueservice_win.cpp
+diff --git a/src/utils/kuniqueservice_win.cpp b/src/utils/kuniqueservice_win.cpp
 new file mode 100644
 index 0000000..2ea830e
 --- /dev/null
-+++ b/kleopatra/utils/kuniqueservice_win.cpp
++++ b/src/utils/kuniqueservice_win.cpp
 @@ -0,0 +1,219 @@
 +/*
 +    kuniqueservice_win.cpp
index d025a80..806b8b7 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
-patch -p2 -l -f $* < $0
+patch -p1 -l -f $* < $0
 exit $?
 
-From cbf48c48727025c585b3647c89ae668ba0d14d0d Mon Sep 17 00:00:00 2001
+From 91fdfe448e3dbe3cae5d2ae8a7b81dabfbc4e3d3 Mon Sep 17 00:00:00 2001
 From: Andre Heinecke <aheinecke@intevation.de>
 Date: Tue, 16 Feb 2016 17:48:44 +0100
 Subject: [PATCH 2/5] Add alternative configuredialog wihout KCMUtils
@@ -11,96 +11,60 @@ KCMUtils heavily depends on QDbus and KService for
 a standalone deployment, like on Windows, we don't
 want those dependencies.
 ---
- kleopatra/CMakeLists.txt                |  22 ++-
- kleopatra/conf/CMakeLists.txt           |  12 +-
- kleopatra/conf/configuredialog.cpp      |  59 +++----
- kleopatra/conf/configuredialog.h        |  23 ++-
- kleopatra/conf/dirservconfigpage.h      |   2 +-
- kleopatra/conf/kleopageconfigdialog.cpp | 304 ++++++++++++++++++++++++++++++++
- kleopatra/conf/kleopageconfigdialog.h   |  73 ++++++++
- kleopatra/config-kleopatra.h.cmake      |   4 +-
- 8 files changed, 449 insertions(+), 50 deletions(-)
- create mode 100644 kleopatra/conf/kleopageconfigdialog.cpp
- create mode 100644 kleopatra/conf/kleopageconfigdialog.h
+ CMakeLists.txt                    |  11 +-
+ src/conf/CMakeLists.txt           |  12 +-
+ src/conf/configuredialog.cpp      |  59 ++++----
+ src/conf/configuredialog.h        |  23 ++-
+ src/conf/dirservconfigpage.h      |   2 +-
+ src/conf/kleopageconfigdialog.cpp | 304 ++++++++++++++++++++++++++++++++++++++
+ src/conf/kleopageconfigdialog.h   |  73 +++++++++
+ 7 files changed, 437 insertions(+), 47 deletions(-)
+ create mode 100644 src/conf/kleopageconfigdialog.cpp
+ create mode 100644 src/conf/kleopageconfigdialog.h
 
-diff --git a/kleopatra/CMakeLists.txt b/kleopatra/CMakeLists.txt
-index 9d049f1..2cb7b63 100644
---- a/kleopatra/CMakeLists.txt
-+++ b/kleopatra/CMakeLists.txt
-@@ -10,6 +10,9 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${kleopatra_SOURCE_DIR})
-   set(LIBKLEO_VERSION "5.1.41")
-   set(QT_REQUIRED_VERSION "5.4.0")
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7970ffe..951fd53 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -2,6 +2,8 @@ project(kleopatra)
 
-+  option(FORCE_DISABLE_KCMUTILS "Force building Kleopatra without KCMUtils. Doing this will disable configuration KCM Plugins. [default=OFF]" OFF)
-+
-+
-   find_package(ECM ${KF5_VERSION} REQUIRED NO_MODULE)
-   set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
+ cmake_minimum_required(VERSION 2.8.12)
 
-@@ -33,7 +36,6 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${kleopatra_SOURCE_DIR})
++option(FORCE_DISABLE_KCMUTILS "Force building Kleopatra without KCMUtils. Doing this will disable configuration KCM Plugins. [default=OFF]" OFF)
++
+ # Standalone build. Find / include everything neccessary.
+ set(KF5_VERSION "5.17.0")
+ set(GPGMEPP_VERSION "5.1.41")
+@@ -31,8 +33,13 @@ include(ECMAddAppIcon)
+ include(ECMQtDeclareLoggingCategory)
 
  # Find KF5 packages
-   find_package(KF5Codecs ${KF5_VERSION} CONFIG REQUIRED)
--  find_package(KF5KCMUtils ${KF5_VERSION} CONFIG REQUIRED)
-   find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
-   find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
-   find_package(KF5IconThemes ${KF5_VERSION} CONFIG REQUIRED)
-@@ -41,6 +43,13 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${kleopatra_SOURCE_DIR})
-   find_package(KF5XmlGui ${KF5_VERSION} CONFIG REQUIRED)
-   find_package(KF5WindowSystem ${KF5_VERSION} CONFIG REQUIRED)
-   find_package(KF5TextWidgets ${KF5_VERSION} CONFIG REQUIRED)
-+  find_package(KF5WidgetsAddons ${KF5_VERSION} CONFIG REQUIRED)
-+  find_package(KF5ConfigWidgets ${KF5_VERSION} CONFIG REQUIRED)
-+  find_package(KF5CoreAddons ${KF5_VERSION} CONFIG REQUIRED)
-+
 +if (NOT FORCE_DISABLE_KCMUTILS)
 +  find_package(KF5KCMUtils ${KF5_VERSION} CONFIG REQUIRED)
 +endif()
++find_package(KF5WidgetsAddons ${KF5_VERSION} CONFIG REQUIRED)
++find_package(KF5ConfigWidgets ${KF5_VERSION} CONFIG REQUIRED)
++find_package(KF5CoreAddons ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5Codecs ${KF5_VERSION} CONFIG REQUIRED)
+-find_package(KF5KCMUtils ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5IconThemes ${KF5_VERSION} CONFIG REQUIRED)
+@@ -65,6 +72,8 @@ find_package(KF5Gpgmepp ${GPGMEPP_VERSION} CONFIG REQUIRED)
+ find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test Network)
 
- # Optional packages
- if (WIN32)
-@@ -63,6 +72,8 @@ endif()
-   find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test Network)
- endif() # Standalone build
 
 +set(HAVE_KCMUTILS ${KF5KCMUtils_FOUND})
 +
  find_package(Boost 1.34.0 REQUIRED)
 
  find_path(Boost_TOPOLOGICAL_SORT_DIR NAMES boost/graph/topological_sort.hpp PATHS ${Boost_INCLUDE_DIRS})
-@@ -357,6 +368,13 @@ else()
-   set(_kleopatra_SRCS ${_kleopatra_SRCS} utils/kuniqueservice_win.cpp)
- endif()
-
-+if (KF5KCMUtils_FOUND)
-+  set(_kleopatra_SRCS ${_kleopatra_SRCS} conf/kcmconfiguredialog.cpp)
-+  set(_kleopatra_extra_libs ${_kleopatra_extra_libs} KF5::KCMUtils)
-+else()
-+  set(_kleopatra_SRCS ${_kleopatra_SRCS} conf/kleopageconfigdialog.cpp)
-+endif()
-+
- ecm_qt_declare_logging_category(_kleopatra_SRCS HEADER kleopatra_debug.h IDENTIFIER KLEOPATRA_LOG CATEGORY_NAME log_kleopatra)
-
- if(KLEO_MODEL_TEST)
-@@ -408,11 +426,11 @@ target_link_libraries(kleopatra_bin
-   ${_kleopatra_extra_libs}
-   KF5::Libkleo
-   KF5::Mime
--  KF5::KCMUtils
-   KF5::I18n
-   KF5::XmlGui
-   KF5::IconThemes
-   KF5::WindowSystem
-+  KF5::CoreAddons
-   ${_kleopatra_dbusaddons_libs}
-   Qt5::Network
-   ${_kleopatra_uiserver_extra_libs}
-diff --git a/kleopatra/conf/CMakeLists.txt b/kleopatra/conf/CMakeLists.txt
-index b74fbc4..7a57933 100644
---- a/kleopatra/conf/CMakeLists.txt
-+++ b/kleopatra/conf/CMakeLists.txt
-@@ -55,18 +55,18 @@ kconfig_add_kcfg_files(kcm_kleopatra_PART_SRCS
-   ${kleopatra_SOURCE_DIR}/kcfg/fileoperationspreferences.kcfgc
+diff --git a/src/conf/CMakeLists.txt b/src/conf/CMakeLists.txt
+index 390f112..bd46c88 100644
+--- a/src/conf/CMakeLists.txt
++++ b/src/conf/CMakeLists.txt
+@@ -54,18 +54,18 @@ kconfig_add_kcfg_files(kcm_kleopatra_PART_SRCS
+   ${kleopatra_SOURCE_DIR}/src/kcfg/fileoperationspreferences.kcfgc
  )
 
 -if(KLEO_STATIC_KCMODULES)
@@ -124,10 +88,10 @@ index b74fbc4..7a57933 100644
    ${_kcm_kleopatra_extra_libs}
    ${_kcm_kleopatra_libkleopatraclient_extra_LIBS}
  )
-diff --git a/kleopatra/conf/configuredialog.cpp b/kleopatra/conf/configuredialog.cpp
+diff --git a/src/conf/configuredialog.cpp b/src/conf/configuredialog.cpp
 index 3cb3104..b9ef7e4 100644
---- a/kleopatra/conf/configuredialog.cpp
-+++ b/kleopatra/conf/configuredialog.cpp
+--- a/src/conf/configuredialog.cpp
++++ b/src/conf/configuredialog.cpp
 @@ -31,53 +31,43 @@
      your version.
  */
@@ -221,10 +185,10 @@ index 3cb3104..b9ef7e4 100644
 -#undef addMyModule
 -#undef KCM_IMPORT_PLUGIN
 -
-diff --git a/kleopatra/conf/configuredialog.h b/kleopatra/conf/configuredialog.h
+diff --git a/src/conf/configuredialog.h b/src/conf/configuredialog.h
 index 8096bbe..16fa2c0 100644
---- a/kleopatra/conf/configuredialog.h
-+++ b/kleopatra/conf/configuredialog.h
+--- a/src/conf/configuredialog.h
++++ b/src/conf/configuredialog.h
 @@ -1,16 +1,17 @@
  /*
 -    configuredialog.cpp
@@ -270,10 +234,10 @@ index 8096bbe..16fa2c0 100644
  {
      Q_OBJECT
  public:
-diff --git a/kleopatra/conf/dirservconfigpage.h b/kleopatra/conf/dirservconfigpage.h
+diff --git a/src/conf/dirservconfigpage.h b/src/conf/dirservconfigpage.h
 index 28bf6c4..5660208 100644
---- a/kleopatra/conf/dirservconfigpage.h
-+++ b/kleopatra/conf/dirservconfigpage.h
+--- a/src/conf/dirservconfigpage.h
++++ b/src/conf/dirservconfigpage.h
 @@ -33,7 +33,7 @@
  #ifndef DIRSERVCONFIGPAGE_H
  #define DIRSERVCONFIGPAGE_H
@@ -283,11 +247,11 @@ index 28bf6c4..5660208 100644
 
  #include "Libkleo/CryptoConfig"
 
-diff --git a/kleopatra/conf/kleopageconfigdialog.cpp b/kleopatra/conf/kleopageconfigdialog.cpp
+diff --git a/src/conf/kleopageconfigdialog.cpp b/src/conf/kleopageconfigdialog.cpp
 new file mode 100644
 index 0000000..ccc70ce
 --- /dev/null
-+++ b/kleopatra/conf/kleopageconfigdialog.cpp
++++ b/src/conf/kleopageconfigdialog.cpp
 @@ -0,0 +1,304 @@
 +/*
 +    kleopageconfigdialog.cpp
@@ -593,11 +557,11 @@ index 0000000..ccc70ce
 +        applyButton->setEnabled(change);
 +    }
 +}
-diff --git a/kleopatra/conf/kleopageconfigdialog.h b/kleopatra/conf/kleopageconfigdialog.h
+diff --git a/src/conf/kleopageconfigdialog.h b/src/conf/kleopageconfigdialog.h
 new file mode 100644
 index 0000000..809c930
 --- /dev/null
-+++ b/kleopatra/conf/kleopageconfigdialog.h
++++ b/src/conf/kleopageconfigdialog.h
 @@ -0,0 +1,73 @@
 +/*
 +    kleopageconfigdialog.h.h
@@ -672,17 +636,5 @@ index 0000000..809c930
 +};
 +
 +#endif /* __KLEOPATRA_CONF_KLEOPAGECONFIGDIALOG_H__ */
-diff --git a/kleopatra/config-kleopatra.h.cmake b/kleopatra/config-kleopatra.h.cmake
-index 4fb4a8f..d0c7092 100644
---- a/kleopatra/config-kleopatra.h.cmake
-+++ b/kleopatra/config-kleopatra.h.cmake
-@@ -21,5 +21,5 @@
- /* Define to 1 if you build libkleopatraclient */
- #cmakedefine HAVE_KLEOPATRACLIENT_LIBRARY 1
-
--/* Mirrored from cmake option */
--#cmakedefine KLEO_STATIC_KCMODULES 1
-+/* KF5KCMUtils available */
-+#cmakedefine01 HAVE_KCMUTILS
 --
 2.1.4
index ff97a26..5081a7b 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
-patch -p2 -l -f $* < $0
+patch -p1 -l -f $* < $0
 exit $?
 
-From a10a900e0719f50dab4cdc862d6f7f1258cf5e62 Mon Sep 17 00:00:00 2001
+From b2d4cf198d9b703f6769ccd42e044b2a552ead98 Mon Sep 17 00:00:00 2001
 From: Andre Heinecke <aheinecke@intevation.de>
 Date: Tue, 16 Feb 2016 18:15:47 +0100
 Subject: [PATCH 3/5] Add option to disable KWatchGnuPG
@@ -11,54 +11,98 @@ KWatchGnuPG currently pulls in KTextWidgets and KNotifications
 which are heavy dependencies for Kleopatra. So this can be disabled.
 A better solution would probably be to make the features optional.
 ---
- kleopatra/CMakeLists.txt | 12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
+ CMakeLists.txt                 |  6 ++++++
+ src/CMakeLists.txt             | 23 ++++++++++++++++++++---
+ src/kwatchgnupg/CMakeLists.txt |  4 ++++
+ 3 files changed, 30 insertions(+), 3 deletions(-)
 
-diff --git a/kleopatra/CMakeLists.txt b/kleopatra/CMakeLists.txt
-index 2cb7b63..0c8b20b 100644
---- a/kleopatra/CMakeLists.txt
-+++ b/kleopatra/CMakeLists.txt
-@@ -11,6 +11,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${kleopatra_SOURCE_DIR})
  set(QT_REQUIRED_VERSION "5.4.0")
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 951fd53..441e2fe 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -3,6 +3,7 @@ project(kleopatra)
cmake_minimum_required(VERSION 2.8.12)
 
  option(FORCE_DISABLE_KCMUTILS "Force building Kleopatra without KCMUtils. Doing this will disable configuration KCM Plugins. [default=OFF]" OFF)
-+  option(DISABLE_KWATCHGNUPG "Don't build the kwatchgnupg tool [default=OFF]" OFF)
+ option(FORCE_DISABLE_KCMUTILS "Force building Kleopatra without KCMUtils. Doing this will disable configuration KCM Plugins. [default=OFF]" OFF)
++option(DISABLE_KWATCHGNUPG "Don't build the kwatchgnupg tool [default=OFF]" OFF)
 
+ # Standalone build. Find / include everything neccessary.
+ set(KF5_VERSION "5.17.0")
+@@ -43,10 +44,8 @@ find_package(KF5Codecs ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5IconThemes ${KF5_VERSION} CONFIG REQUIRED)
+-find_package(KF5Notifications ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5XmlGui ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5WindowSystem ${KF5_VERSION} CONFIG REQUIRED)
+-find_package(KF5TextWidgets ${KF5_VERSION} CONFIG REQUIRED)
+ find_package(KF5DocTools ${KF5_VERSION} CONFIG)
 
-   find_package(ECM ${KF5_VERSION} REQUIRED NO_MODULE)
-@@ -39,10 +40,8 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${kleopatra_SOURCE_DIR})
-   find_package(KF5Config ${KF5_VERSION} CONFIG REQUIRED)
-   find_package(KF5I18n ${KF5_VERSION} CONFIG REQUIRED)
-   find_package(KF5IconThemes ${KF5_VERSION} CONFIG REQUIRED)
--  find_package(KF5Notifications ${KF5_VERSION} CONFIG REQUIRED)
-   find_package(KF5XmlGui ${KF5_VERSION} CONFIG REQUIRED)
-   find_package(KF5WindowSystem ${KF5_VERSION} CONFIG REQUIRED)
--  find_package(KF5TextWidgets ${KF5_VERSION} CONFIG REQUIRED)
-   find_package(KF5WidgetsAddons ${KF5_VERSION} CONFIG REQUIRED)
-   find_package(KF5ConfigWidgets ${KF5_VERSION} CONFIG REQUIRED)
-   find_package(KF5CoreAddons ${KF5_VERSION} CONFIG REQUIRED)
-@@ -51,6 +50,11 @@ if (NOT FORCE_DISABLE_KCMUTILS)
-   find_package(KF5KCMUtils ${KF5_VERSION} CONFIG REQUIRED)
- endif()
+ set_package_properties(KF5DocTools PROPERTIES DESCRIPTION "Documentation tools" TYPE OPTIONAL PURPOSE "Required to generate Kleopatra documentation.")
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 1abaa6b..6799187 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -3,7 +3,9 @@ add_subdirectory(icons)
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
 
+-add_subdirectory(kwatchgnupg)
 +if (NOT DISABLE_KWATCHGNUPG)
-+  find_package(KF5Notifications ${KF5_VERSION} CONFIG REQUIRED)
-+  find_package(KF5TextWidgets ${KF5_VERSION} CONFIG REQUIRED)
++    add_subdirectory(kwatchgnupg)
 +endif()
-+
- # Optional packages
- if (WIN32)
-   # Only a replacement available for Windows so this
-@@ -141,7 +145,9 @@ if(USABLE_ASSUAN_FOUND)
-   add_subdirectory(libkleopatraclient)
- endif()
+ add_subdirectory(libkleopatraclient)
+ add_subdirectory(conf)
+ add_subdirectory(kconf_update)
+@@ -215,6 +217,21 @@ set(_kleopatra_SRCS
+   main.cpp
+ )
 
--add_subdirectory(kwatchgnupg)
-+if (NOT DISABLE_KWATCHGNUPG)
-+  add_subdirectory(kwatchgnupg)
++if (KF5DBusAddons_FOUND)
++  set(_kleopatra_SRCS ${_kleopatra_SRCS} utils/kuniqueservice_dbus.cpp)
++  set(_kleopatra_dbusaddons_libs KF5::DBusAddons)
++else()
++  # Alternative currently only implemented for windows
++  set(_kleopatra_SRCS ${_kleopatra_SRCS} utils/kuniqueservice_win.cpp)
 +endif()
++
++if (KF5KCMUtils_FOUND)
++  set(_kleopatra_SRCS ${_kleopatra_SRCS} conf/kcmconfiguredialog.cpp)
++  set(_kleopatra_extra_libs ${_kleopatra_extra_libs} KF5::KCMUtils)
++else()
++  set(_kleopatra_SRCS ${_kleopatra_SRCS} conf/kleopageconfigdialog.cpp)
++endif()
++
+ ecm_qt_declare_logging_category(_kleopatra_SRCS HEADER kleopatra_debug.h IDENTIFIER KLEOPATRA_LOG CATEGORY_NAME log_kleopatra)
 
- if(BUILD_TESTING)
-     add_subdirectory(tests)
+ if(KLEO_MODEL_TEST)
+@@ -261,13 +278,13 @@ target_link_libraries(kleopatra_bin
+   ${_kleopatra_extra_libs}
+   KF5::Libkleo
+   KF5::Mime
+-  KF5::KCMUtils
+   KF5::I18n
+   KF5::XmlGui
+   KF5::IconThemes
+   KF5::WindowSystem
+-  KF5::DBusAddons
++  ${_kleopatra_dbusaddons_libs}
+   Qt5::Network
++  KF5::CoreAddons
+   ${_kleopatra_uiserver_extra_libs}
+   kleopatraclientcore
+ )
+diff --git a/src/kwatchgnupg/CMakeLists.txt b/src/kwatchgnupg/CMakeLists.txt
+index 338cad5..5f9e370 100644
+--- a/src/kwatchgnupg/CMakeLists.txt
++++ b/src/kwatchgnupg/CMakeLists.txt
+@@ -1,3 +1,7 @@
++
++find_package(KF5Notifications ${KF5_VERSION} CONFIG REQUIRED)
++find_package(KF5TextWidgets ${KF5_VERSION} CONFIG REQUIRED)
++
+ set(kwatchgnupg_SRCS
+   ../utils/kdlogtextwidget.cpp
+   ../utils/gnupg-helper.cpp
 --
 2.1.4
index 4dc96e1..573bb5e 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
-patch -p2 -l -f $* < $0
+patch -p1 -l -f $* < $0
 exit $?
 
-From 5e9fd7ef2c4550b3893bbd52b2d15e4ad5f2fe9c Mon Sep 17 00:00:00 2001
+From a88a947afb03cf1d12d9758fd8009ef3d4008c3b Mon Sep 17 00:00:00 2001
 From: Andre Heinecke <aheinecke@intevation.de>
 Date: Tue, 16 Feb 2016 18:17:17 +0100
 Subject: [PATCH 4/5] Make DBus integration of the smime conf optional
@@ -11,14 +11,29 @@ This is indirect because if you have KCMUtils you already
 have DBus and so you want to integrate with DBus in the
 S/MIME Config widget.
 ---
kleopatra/conf/smimevalidationconfigurationwidget.cpp | 6 +++++-
- kleopatra/config-kleopatra.h.cmake                    | 3 +++
- 2 files changed, 8 insertions(+), 1 deletion(-)
config-kleopatra.h.cmake                        | 7 +++++--
+ src/conf/smimevalidationconfigurationwidget.cpp | 6 +++++-
+ 2 files changed, 10 insertions(+), 3 deletions(-)
 
-diff --git a/kleopatra/conf/smimevalidationconfigurationwidget.cpp b/kleopatra/conf/smimevalidationconfigurationwidget.cpp
+diff --git a/config-kleopatra.h.cmake b/config-kleopatra.h.cmake
+index 4fb4a8f..4842cca 100644
+--- a/config-kleopatra.h.cmake
++++ b/config-kleopatra.h.cmake
+@@ -21,5 +21,8 @@
+ /* Define to 1 if you build libkleopatraclient */
+ #cmakedefine HAVE_KLEOPATRACLIENT_LIBRARY 1
+
+-/* Mirrored from cmake option */
+-#cmakedefine KLEO_STATIC_KCMODULES 1
++/* KF5KCMUtils available */
++#cmakedefine01 HAVE_KCMUTILS
++
++/* DBus available */
++#cmakedefine01 HAVE_QDBUS
+diff --git a/src/conf/smimevalidationconfigurationwidget.cpp b/src/conf/smimevalidationconfigurationwidget.cpp
 index aab1e98..e3ba39f 100644
---- a/kleopatra/conf/smimevalidationconfigurationwidget.cpp
-+++ b/kleopatra/conf/smimevalidationconfigurationwidget.cpp
+--- a/src/conf/smimevalidationconfigurationwidget.cpp
++++ b/src/conf/smimevalidationconfigurationwidget.cpp
 @@ -44,7 +44,9 @@
  #include <KLocalizedString>
  #include "kleopatra_debug.h"
@@ -40,16 +55,5 @@ index aab1e98..e3ba39f 100644
      }
 
      bool customHTTPProxyWritable;
-diff --git a/kleopatra/config-kleopatra.h.cmake b/kleopatra/config-kleopatra.h.cmake
-index d0c7092..4842cca 100644
---- a/kleopatra/config-kleopatra.h.cmake
-+++ b/kleopatra/config-kleopatra.h.cmake
-@@ -23,3 +23,6 @@
-
- /* KF5KCMUtils available */
- #cmakedefine01 HAVE_KCMUTILS
-+
-+/* DBus available */
-+#cmakedefine01 HAVE_QDBUS
 --
 2.1.4
index 90ac0aa..17a65cc 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
-patch -p2 -l -f $* < $0
+patch -p1 -l -f $* < $0
 exit $?
 
-From eb0adaf1064e6344540abfb576ae4e52c1172bfa Mon Sep 17 00:00:00 2001
+From 4bf713fdca3a549d12b76afcb64533516f6436ec Mon Sep 17 00:00:00 2001
 From: Andre Heinecke <aheinecke@intevation.de>
 Date: Tue, 16 Feb 2016 18:19:07 +0100
 Subject: [PATCH 5/5] Hack generated conf files for Crosscompiling
@@ -10,31 +10,31 @@ Subject: [PATCH 5/5] Hack generated conf files for Crosscompiling
 This patch can be removed once Gpg4win is built on a platform
 that has a packaged kconfig_compiler5.
 ---
kleopatra/CMakeLists.txt                 | 22 ++++++---
kleopatra/conf/CMakeLists.txt            | 20 ++++----
kleopatra/emailoperationspreferences.cpp | 27 ++++++++++
kleopatra/emailoperationspreferences.h   | 84 ++++++++++++++++++++++++++++++++
kleopatra/fileoperationspreferences.cpp  | 21 ++++++++
kleopatra/fileoperationspreferences.h    | 48 ++++++++++++++++++
kleopatra/smimevalidationpreferences.cpp | 22 +++++++++
kleopatra/smimevalidationpreferences.h   | 55 +++++++++++++++++++++
kleopatra/tooltippreferences.cpp         | 27 ++++++++++
kleopatra/tooltippreferences.h           | 84 ++++++++++++++++++++++++++++++++
- 10 files changed, 394 insertions(+), 16 deletions(-)
- create mode 100644 kleopatra/emailoperationspreferences.cpp
- create mode 100644 kleopatra/emailoperationspreferences.h
- create mode 100644 kleopatra/fileoperationspreferences.cpp
- create mode 100644 kleopatra/fileoperationspreferences.h
- create mode 100644 kleopatra/smimevalidationpreferences.cpp
- create mode 100644 kleopatra/smimevalidationpreferences.h
- create mode 100644 kleopatra/tooltippreferences.cpp
- create mode 100644 kleopatra/tooltippreferences.h
src/CMakeLists.txt                 | 21 +++++++---
src/conf/CMakeLists.txt            | 20 +++++----
src/emailoperationspreferences.cpp | 27 ++++++++++++
src/emailoperationspreferences.h   | 84 ++++++++++++++++++++++++++++++++++++++
src/fileoperationspreferences.cpp  | 21 ++++++++++
src/fileoperationspreferences.h    | 48 ++++++++++++++++++++++
src/smimevalidationpreferences.cpp | 22 ++++++++++
src/smimevalidationpreferences.h   | 55 +++++++++++++++++++++++++
src/tooltippreferences.cpp         | 27 ++++++++++++
src/tooltippreferences.h           | 84 ++++++++++++++++++++++++++++++++++++++
+ 10 files changed, 394 insertions(+), 15 deletions(-)
+ create mode 100644 src/emailoperationspreferences.cpp
+ create mode 100644 src/emailoperationspreferences.h
+ create mode 100644 src/fileoperationspreferences.cpp
+ create mode 100644 src/fileoperationspreferences.h
+ create mode 100644 src/smimevalidationpreferences.cpp
+ create mode 100644 src/smimevalidationpreferences.h
+ create mode 100644 src/tooltippreferences.cpp
+ create mode 100644 src/tooltippreferences.h
 
-diff --git a/kleopatra/CMakeLists.txt b/kleopatra/CMakeLists.txt
-index 0c8b20b..056e20a 100644
---- a/kleopatra/CMakeLists.txt
-+++ b/kleopatra/CMakeLists.txt
-@@ -408,13 +408,21 @@ ki18n_wrap_ui(_kleopatra_SRCS
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 6799187..8c8193c 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -259,12 +259,21 @@ ki18n_wrap_ui(_kleopatra_SRCS
    newcertificatewizard/advancedsettingsdialog.ui
  )
 
@@ -44,7 +44,6 @@ index 0c8b20b..056e20a 100644
 -  kcfg/fileoperationspreferences.kcfgc
 -  kcfg/smimevalidationpreferences.kcfgc
 -)
--
 +if (NOT CMAKE_CROSSCOMPILING)
 +  kconfig_add_kcfg_files(_kleopatra_SRCS
 +    kcfg/tooltippreferences.kcfgc
@@ -63,56 +62,50 @@ index 0c8b20b..056e20a 100644
 
  file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/icons/*-apps-kleopatra.png")
  ecm_add_app_icon(_kleopatra_SRCS ICONS ${ICONS_SRCS})
-diff --git a/kleopatra/conf/CMakeLists.txt b/kleopatra/conf/CMakeLists.txt
-index 7a57933..c0d4e3d 100644
---- a/kleopatra/conf/CMakeLists.txt
-+++ b/kleopatra/conf/CMakeLists.txt
+diff --git a/src/conf/CMakeLists.txt b/src/conf/CMakeLists.txt
+index bd46c88..d7351e2 100644
+--- a/src/conf/CMakeLists.txt
++++ b/src/conf/CMakeLists.txt
 @@ -14,10 +14,6 @@ if(BUILD_libkleopatraclient)
      cryptooperationsconfigwidget.ui
    )
 
 -  kconfig_add_kcfg_files(_kcm_kleopatra_libkleopatraclient_extra_SRCS
--    ${kleopatra_SOURCE_DIR}/kcfg/smimevalidationpreferences.kcfgc
+-    ${kleopatra_SOURCE_DIR}/src/kcfg/smimevalidationpreferences.kcfgc
 -  )
 -
    set(_kcm_kleopatra_libkleopatraclient_extra_LIBS kleopatraclientgui)
 
    set(_kcm_kleopatra_libkleopatraclient_extra_install_FILES
-@@ -34,7 +30,6 @@ else()
- endif()
-
- set(kcm_kleopatra_PART_SRCS
--  ${_kcm_kleopatra_kleo_only_SRCS}
-   dirservconfigpage.cpp
-   appearanceconfigpage.cpp
-   appearanceconfigwidget.cpp
-@@ -49,10 +44,17 @@ ki18n_wrap_ui(kcm_kleopatra_PART_SRCS
+@@ -48,12 +44,18 @@ ki18n_wrap_ui(kcm_kleopatra_PART_SRCS
    smimevalidationconfigurationwidget.ui
  )
 
 -kconfig_add_kcfg_files(kcm_kleopatra_PART_SRCS
--  ${kleopatra_SOURCE_DIR}/kcfg/tooltippreferences.kcfgc
--  ${kleopatra_SOURCE_DIR}/kcfg/emailoperationspreferences.kcfgc
--  ${kleopatra_SOURCE_DIR}/kcfg/fileoperationspreferences.kcfgc
+-  ${kleopatra_SOURCE_DIR}/src/kcfg/tooltippreferences.kcfgc
+-  ${kleopatra_SOURCE_DIR}/src/kcfg/emailoperationspreferences.kcfgc
+-  ${kleopatra_SOURCE_DIR}/src/kcfg/fileoperationspreferences.kcfgc
+-)
 +if(CMAKE_CROSSCOMPILING)
-+  set(_kcfg_generated_files_dir ${kleopatra_SOURCE_DIR})
++  set(_kcfg_generated_files_dir ${kleopatra_SOURCE_DIR}/src)
 +else()
-+  set(_kcfg_generated_files_dir ${kleopatra_BINARY_DIR})
++  set(_kcfg_generated_files_dir ${kleopatra_BINARY_DIR}/src)
 +endif()
-+
+
 +set(kcm_kleopatra_PART_SRCS ${kcm_kleopatra_PART_SRCS}
 +  ${_kcfg_generated_files_dir}/tooltippreferences.cpp
 +  ${_kcfg_generated_files_dir}/emailoperationspreferences.cpp
 +  ${_kcfg_generated_files_dir}/fileoperationspreferences.cpp
 +  ${_kcfg_generated_files_dir}/smimevalidationpreferences.cpp
- )
-
++ )
  add_library(kcm_kleopatra MODULE ${kcm_kleopatra_PART_SRCS})
-diff --git a/kleopatra/emailoperationspreferences.cpp b/kleopatra/emailoperationspreferences.cpp
+
+ if(HAVE_KCMUTILS)
+diff --git a/src/emailoperationspreferences.cpp b/src/emailoperationspreferences.cpp
 new file mode 100644
 index 0000000..730db97
 --- /dev/null
-+++ b/kleopatra/emailoperationspreferences.cpp
++++ b/src/emailoperationspreferences.cpp
 @@ -0,0 +1,27 @@
 +// This file is generated by kconfig_compiler_kf5 from emailoperationspreferences.kcfg.
 +// All changes you do to this file will be lost.
@@ -141,11 +134,11 @@ index 0000000..730db97
 +{
 +}
 +
-diff --git a/kleopatra/emailoperationspreferences.h b/kleopatra/emailoperationspreferences.h
+diff --git a/src/emailoperationspreferences.h b/src/emailoperationspreferences.h
 new file mode 100644
 index 0000000..58881f8
 --- /dev/null
-+++ b/kleopatra/emailoperationspreferences.h
++++ b/src/emailoperationspreferences.h
 @@ -0,0 +1,84 @@
 +// This file is generated by kconfig_compiler_kf5 from emailoperationspreferences.kcfg.
 +// All changes you do to this file will be lost.
@@ -231,11 +224,11 @@ index 0000000..58881f8
 +
 +#endif
 +
-diff --git a/kleopatra/fileoperationspreferences.cpp b/kleopatra/fileoperationspreferences.cpp
+diff --git a/src/fileoperationspreferences.cpp b/src/fileoperationspreferences.cpp
 new file mode 100644
 index 0000000..d2d20fc
 --- /dev/null
-+++ b/kleopatra/fileoperationspreferences.cpp
++++ b/src/fileoperationspreferences.cpp
 @@ -0,0 +1,21 @@
 +// This file is generated by kconfig_compiler_kf5 from fileoperationspreferences.kcfg.
 +// All changes you do to this file will be lost.
@@ -258,11 +251,11 @@ index 0000000..d2d20fc
 +{
 +}
 +
-diff --git a/kleopatra/fileoperationspreferences.h b/kleopatra/fileoperationspreferences.h
+diff --git a/src/fileoperationspreferences.h b/src/fileoperationspreferences.h
 new file mode 100644
 index 0000000..9866a70
 --- /dev/null
-+++ b/kleopatra/fileoperationspreferences.h
++++ b/src/fileoperationspreferences.h
 @@ -0,0 +1,48 @@
 +// This file is generated by kconfig_compiler_kf5 from fileoperationspreferences.kcfg.
 +// All changes you do to this file will be lost.
@@ -312,11 +305,11 @@ index 0000000..9866a70
 +
 +#endif
 +
-diff --git a/kleopatra/smimevalidationpreferences.cpp b/kleopatra/smimevalidationpreferences.cpp
+diff --git a/src/smimevalidationpreferences.cpp b/src/smimevalidationpreferences.cpp
 new file mode 100644
 index 0000000..3d9a16f
 --- /dev/null
-+++ b/kleopatra/smimevalidationpreferences.cpp
++++ b/src/smimevalidationpreferences.cpp
 @@ -0,0 +1,22 @@
 +// This file is generated by kconfig_compiler_kf5 from smimevalidationpreferences.kcfg.
 +// All changes you do to this file will be lost.
@@ -340,11 +333,11 @@ index 0000000..3d9a16f
 +{
 +}
 +
-diff --git a/kleopatra/smimevalidationpreferences.h b/kleopatra/smimevalidationpreferences.h
+diff --git a/src/smimevalidationpreferences.h b/src/smimevalidationpreferences.h
 new file mode 100644
 index 0000000..9617bd5
 --- /dev/null
-+++ b/kleopatra/smimevalidationpreferences.h
++++ b/src/smimevalidationpreferences.h
 @@ -0,0 +1,55 @@
 +// This file is generated by kconfig_compiler_kf5 from smimevalidationpreferences.kcfg.
 +// All changes you do to this file will be lost.
@@ -401,11 +394,11 @@ index 0000000..9617bd5
 +
 +#endif
 +
-diff --git a/kleopatra/tooltippreferences.cpp b/kleopatra/tooltippreferences.cpp
+diff --git a/src/tooltippreferences.cpp b/src/tooltippreferences.cpp
 new file mode 100644
 index 0000000..7e85c6a
 --- /dev/null
-+++ b/kleopatra/tooltippreferences.cpp
++++ b/src/tooltippreferences.cpp
 @@ -0,0 +1,27 @@
 +// This file is generated by kconfig_compiler_kf5 from tooltippreferences.kcfg.
 +// All changes you do to this file will be lost.
@@ -434,11 +427,11 @@ index 0000000..7e85c6a
 +{
 +}
 +
-diff --git a/kleopatra/tooltippreferences.h b/kleopatra/tooltippreferences.h
+diff --git a/src/tooltippreferences.h b/src/tooltippreferences.h
 new file mode 100644
 index 0000000..44f77a2
 --- /dev/null
-+++ b/kleopatra/tooltippreferences.h
++++ b/src/tooltippreferences.h
 @@ -0,0 +1,84 @@
 +// This file is generated by kconfig_compiler_kf5 from tooltippreferences.kcfg.
 +// All changes you do to this file will be lost.