[SCM] ktp-accounts-kcm packaging branch, master, updated. debian/15.12.1-1-1157-gc4589c5

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


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=febaa0f

The following commit has been merged in the master branch:
commit febaa0f51835e481131191fc5b6412071f923bf4
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Fri Jul 19 12:59:00 2013 +0000

    Don't run dialog to select region of pixmap for empty pixmaps
    
    BUG: 322427
---
 src/avatar-button.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/avatar-button.cpp b/src/avatar-button.cpp
index 745bdcc..8e0338e 100644
--- a/src/avatar-button.cpp
+++ b/src/avatar-button.cpp
@@ -160,9 +160,14 @@ void AvatarButton::onLoadAvatarFromFile()
     Q_EMIT avatarChanged();
 }
 
-QPixmap AvatarButton::cropPixmap(const QPixmap& pixmap, int maxWidth, int maxHeight,
+QPixmap AvatarButton::cropPixmap(const QPixmap &pixmap, int maxWidth, int maxHeight,
                                  int minWidth, int minHeight) const
 {
+    //if there's no image we don't need to select a region
+    if (pixmap.isNull()) {
+        return pixmap;
+    }
+
     QPointer<KPixmapRegionSelectorDialog> regionDlg = new KPixmapRegionSelectorDialog();
     KPixmapRegionSelectorWidget *widget = regionDlg->pixmapRegionSelectorWidget();
     widget->setPixmap(pixmap);

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list