[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:21:38 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=29f9f6d

The following commit has been merged in the master branch:
commit 29f9f6d342b45991d08e5677d09043d08d64ebd7
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date:   Wed Mar 21 18:59:33 2012 +0100

    Do not leak objects
    
    Also fix a couple of cut&paste errors and cleanup a little
---
 .../adiumxtra-protocol-handler.cpp                 | 44 ++++++++++++----------
 adiumxtra-protocol-handler/main.cpp                |  8 ++--
 2 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/adiumxtra-protocol-handler/adiumxtra-protocol-handler.cpp b/adiumxtra-protocol-handler/adiumxtra-protocol-handler.cpp
index 2dcd718..b80e99a 100644
--- a/adiumxtra-protocol-handler/adiumxtra-protocol-handler.cpp
+++ b/adiumxtra-protocol-handler/adiumxtra-protocol-handler.cpp
@@ -100,38 +100,42 @@ void AdiumxtraProtocolHandler::install()
         return;// BundleInstaller::BundleCannotOpen;
     }
 
-    ChatStyleInstaller *chatStyleInstaller = new ChatStyleInstaller(archive, tmpFile);
-    if (chatStyleInstaller->validate() == BundleInstaller::BundleValid) {
-        chatStyleInstaller->showRequest();
+    ChatStyleInstaller chatStyleInstaller(archive, tmpFile);
+    if (chatStyleInstaller.validate() == BundleInstaller::BundleValid) {
+        chatStyleInstaller.showRequest();
         kDebug() << "Sent messagestyle request";
 
-        QObject::connect(chatStyleInstaller, SIGNAL(finished(BundleInstaller::BundleStatus)),
-                         chatStyleInstaller, SLOT(showResult()));
-        QObject::connect(chatStyleInstaller, SIGNAL(showedResult()), this, SIGNAL(finished()));
-        QObject::connect(chatStyleInstaller, SIGNAL(showedResult()), chatStyleInstaller, SLOT(deleteLater()));
-        QObject::connect(chatStyleInstaller, SIGNAL(ignoredRequest()), this, SIGNAL(finished()));
-        QObject::connect(chatStyleInstaller, SIGNAL(ignoredRequest()), chatStyleInstaller, SLOT(deleteLater()));
+        QObject::connect(&chatStyleInstaller, SIGNAL(finished(BundleInstaller::BundleStatus)),
+                         &chatStyleInstaller, SLOT(showResult()));
+        QObject::connect(&chatStyleInstaller, SIGNAL(showedResult()), this, SIGNAL(finished()));
+        QObject::connect(&chatStyleInstaller, SIGNAL(showedResult()),
+                         &chatStyleInstaller, SLOT(deleteLater()));
+        QObject::connect(&chatStyleInstaller, SIGNAL(ignoredRequest()), this, SIGNAL(finished()));
+        QObject::connect(&chatStyleInstaller, SIGNAL(ignoredRequest()),
+                         &chatStyleInstaller, SLOT(deleteLater()));
 
         kDebug() << "Starting installation";
-        chatStyleInstaller->install();
+        chatStyleInstaller.install();
 
         return;// BundleInstaller::BundleValid;
     }
 
-    EmoticonSetInstaller *emoticonSetInstaller = new EmoticonSetInstaller(archive, tmpFile);
-    if(emoticonSetInstaller->validate() == BundleInstaller::BundleValid) {
-        emoticonSetInstaller->showRequest();
+    EmoticonSetInstaller emoticonSetInstaller(archive, tmpFile);
+    if(emoticonSetInstaller.validate() == BundleInstaller::BundleValid) {
+        emoticonSetInstaller.showRequest();
         kDebug() << "Sent emoticonset request";
 
-        QObject::connect(emoticonSetInstaller, SIGNAL(finished(BundleInstaller::BundleStatus)),
-                         emoticonSetInstaller, SLOT(showResult()));
-        QObject::connect(emoticonSetInstaller, SIGNAL(showedResult()), this, SIGNAL(finished()));
-        QObject::connect(emoticonSetInstaller, SIGNAL(showedResult()), chatStyleInstaller, SLOT(deleteLater()));
-        QObject::connect(emoticonSetInstaller, SIGNAL(ignoredRequest()), this, SIGNAL(finished()));
-        QObject::connect(emoticonSetInstaller, SIGNAL(ignoredRequest()), chatStyleInstaller, SLOT(deleteLater()));
+        QObject::connect(&emoticonSetInstaller, SIGNAL(finished(BundleInstaller::BundleStatus)),
+                         &emoticonSetInstaller, SLOT(showResult()));
+        QObject::connect(&emoticonSetInstaller, SIGNAL(showedResult()), this, SIGNAL(finished()));
+        QObject::connect(&emoticonSetInstaller, SIGNAL(showedResult()),
+                         &emoticonSetInstaller, SLOT(deleteLater()));
+        QObject::connect(&emoticonSetInstaller, SIGNAL(ignoredRequest()), this, SIGNAL(finished()));
+        QObject::connect(&emoticonSetInstaller, SIGNAL(ignoredRequest()),
+                         &emoticonSetInstaller, SLOT(deleteLater()));
 
         kDebug() << "Starting installation";
-        emoticonSetInstaller->install();
+        emoticonSetInstaller.install();
 
         return;// BundleInstaller::BundleValid;
     }
diff --git a/adiumxtra-protocol-handler/main.cpp b/adiumxtra-protocol-handler/main.cpp
index 9577b9d..8610008 100644
--- a/adiumxtra-protocol-handler/main.cpp
+++ b/adiumxtra-protocol-handler/main.cpp
@@ -45,11 +45,11 @@ int main(int argc, char *argv[])
         return -1;
     }
 
-    AdiumxtraProtocolHandler *handler = new AdiumxtraProtocolHandler;
-    handler->setUrl(KCmdLineArgs::parsedArgs()->arg(0));
+    AdiumxtraProtocolHandler handler;
+    handler.setUrl(KCmdLineArgs::parsedArgs()->arg(0));
 
-    app.connect(handler, SIGNAL(finished()), SLOT(quit()));
-    QTimer::singleShot(0, handler, SLOT(install()));
+    app.connect(&handler, SIGNAL(finished()), SLOT(quit()));
+    QTimer::singleShot(0, &handler, SLOT(install()));
 
     return app.exec();
 }

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list