[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:06:35 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=78c6149

The following commit has been merged in the master branch:
commit 78c61499394d0cbb3b7649b204b0f68e94cec4ea
Author: Rohan Garg <rohangarg at kubuntu.org>
Date:   Sat Jun 4 16:04:13 2011 +0530

    Do not start the job if a user does not choose a file, just return instead
    Reviewed by : Dario Freddi and Martin Klapetek
---
 main-widget.cpp | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/main-widget.cpp b/main-widget.cpp
index 7b72e74..f96964d 100644
--- a/main-widget.cpp
+++ b/main-widget.cpp
@@ -1054,14 +1054,19 @@ void MainWidget::loadAvatarFromFile()
             return;
         }
     } else {
-        FetchAvatarJob *job = new FetchAvatarJob(KFileDialog::getImageOpenUrl(KUrl(), this,
-                                                                              i18n("Please choose your avatar")),
-                                                                              this);
+        KUrl fileUrl = KFileDialog::getImageOpenUrl(KUrl(), this,
+                                     i18n("Please choose your avatar"));
 
-        connect(job, SIGNAL(result(KJob*)),
-                this, SLOT(onAvatarFetched(KJob*)));
+        if (!fileUrl.isEmpty()) {
+            FetchAvatarJob *job = new FetchAvatarJob(fileUrl, this);
 
-        job->start();
+            connect(job, SIGNAL(result(KJob*)),
+                    this, SLOT(onAvatarFetched(KJob*)));
+
+            job->start();
+        } else {
+            return;
+        }
     }
 }
 

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list