[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:08:25 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=10e5b3f

The following commit has been merged in the master branch:
commit 10e5b3f59d44d2c59eaa7c3d38c019062abb97f6
Author: Marcin Ziemiński <zieminn at gmail.com>
Date:   Tue Aug 19 22:15:12 2014 +0200

    Save OTR policy settings on disk
    
    Signed-off-by: Marcin Ziemiński <zieminn at gmail.com>
---
 otr-proxy/KTpProxy/CMakeLists.txt |  2 +-
 otr-proxy/KTpProxy/otr-config.cpp | 14 ++++++++++----
 otr-proxy/KTpProxy/otr-config.h   |  1 +
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/otr-proxy/KTpProxy/CMakeLists.txt b/otr-proxy/KTpProxy/CMakeLists.txt
index 97ce903..c636508 100644
--- a/otr-proxy/KTpProxy/CMakeLists.txt
+++ b/otr-proxy/KTpProxy/CMakeLists.txt
@@ -16,7 +16,6 @@ set(ktp-proxy_SRCS
 )
 
 kde4_add_kcfg_files(ktp-proxy_SRCS ktp-proxy-config.kcfgc)
-install(FILES ktp-proxy-config.kcfg DESTINATION ${KCFG_INSTALL_DIR})
 
 kde4_add_library(ktp-proxy-lib STATIC ${ktp-proxy_SRCS})
 
@@ -37,3 +36,4 @@ kde4_add_executable(ktp-proxy main.cpp)
 target_link_libraries(ktp-proxy ktp-proxy-lib)
 
 install(TARGETS ktp-proxy DESTINATION ${LIBEXEC_INSTALL_DIR})
+install(FILES ktp-proxy-config.kcfg DESTINATION ${KCFG_INSTALL_DIR})
diff --git a/otr-proxy/KTpProxy/otr-config.cpp b/otr-proxy/KTpProxy/otr-config.cpp
index e63016d..c969172 100644
--- a/otr-proxy/KTpProxy/otr-config.cpp
+++ b/otr-proxy/KTpProxy/otr-config.cpp
@@ -27,6 +27,11 @@
 
 namespace OTR
 {
+    Config::Config()
+    {
+        KTpProxyConfig::self()->readConfig();
+    }
+
     QString Config::saveLocation()
     {
         return KGlobal::dirs()->saveLocation("data", QLatin1String("ktelepathy/ktp-proxy/"), true);
@@ -55,16 +60,17 @@ namespace OTR
         switch(policy) {
             case OTRL_POLICY_ALWAYS:
                 KTpProxyConfig::setOTRPolicy(KTpProxyConfig::Always);
-                return;
+                break;
             case OTRL_POLICY_OPPORTUNISTIC:
                 KTpProxyConfig::setOTRPolicy(KTpProxyConfig::Opportunistic);
-                return;
+                break;
             case OTRL_POLICY_MANUAL:
                 KTpProxyConfig::setOTRPolicy(KTpProxyConfig::Manual);
-                return;
+                break;
             case OTRL_POLICY_NEVER:
                 KTpProxyConfig::setOTRPolicy(KTpProxyConfig::Never);
-                return;
+                break;
         }
+        KTpProxyConfig::self()->writeConfig();
     }
 }
diff --git a/otr-proxy/KTpProxy/otr-config.h b/otr-proxy/KTpProxy/otr-config.h
index f85210b..ce42c00 100644
--- a/otr-proxy/KTpProxy/otr-config.h
+++ b/otr-proxy/KTpProxy/otr-config.h
@@ -32,6 +32,7 @@ namespace OTR
     class Config
     {
         public:
+            Config();
             virtual ~Config() = default;
 
             virtual QString saveLocation();

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list