[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kapptemplate/Applications/16.04] src/application: Fix selecting templates without a preview picture
From:       Friedrich W. H. Kossebau <kossebau () kde ! org>
Date:       2016-03-31 19:25:34
Message-ID: E1aliDm-0000vv-9U () scm ! kde ! org
[Download RAW message or body]

Git commit 0b0860e96fd2f93d2300195a0494149ba9fb6024 by Friedrich W. H. Koss=
ebau.
Committed on 31/03/2016 at 19:24.
Pushed by kossebau into branch 'Applications/16.04'.

Fix selecting templates without a preview picture

M  +7    -5    src/application/choicepage.cpp

http://commits.kde.org/kapptemplate/0b0860e96fd2f93d2300195a0494149ba9fb6024

diff --git a/src/application/choicepage.cpp b/src/application/choicepage.cpp
index 280172c..719de50 100644
--- a/src/application/choicepage.cpp
+++ b/src/application/choicepage.cpp
@@ -82,11 +82,13 @@ void ChoicePage::itemSelected(const QModelIndex &index)
         }
     }
 =

-    if (picPath.isEmpty())
-        return;
-
-    QPixmap pixmap(picPath);
-    ui_choice.pictureLabel->setPixmap(pixmap);
+    if (picPath.isEmpty()) {
+        // TODO: i18n
+        ui_choice.pictureLabel->setText("No sample picture available.");
+    } else {
+        QPixmap pixmap(picPath);
+        ui_choice.pictureLabel->setPixmap(pixmap);
+    }
 =

     //and description
     QString description;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic