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

List:       kde-commits
Subject:    [kstars] kstars/indi: Make group as unknown if it is empty
From:       Jasem Mutlaq <mutlaqja () ikarustech ! com>
Date:       2016-11-01 7:44:15
Message-ID: E1c1Tjz-0006j8-I3 () code ! kde ! org
[Download RAW message or body]

Git commit 31240e60138af9890001b38b330ff7bcc4a10498 by Jasem Mutlaq.
Committed on 01/11/2016 at 07:43.
Pushed by mutlaqja into branch 'master'.

Make group as unknown if it is empty

M  +3    -3    kstars/indi/indigroup.cpp

http://commits.kde.org/kstars/31240e60138af9890001b38b330ff7bcc4a10498

diff --git a/kstars/indi/indigroup.cpp b/kstars/indi/indigroup.cpp
index e7cbbcc..d1c4f71 100644
--- a/kstars/indi/indigroup.cpp
+++ b/kstars/indi/indigroup.cpp
@@ -25,6 +25,8 @@
 #include <QDebug>
 #include <QScrollArea>
 
+#include <KLocalizedString>
+
 /*******************************************************************
 ** INDI Group: a tab widget for common properties. All properties
 ** belong to a group, whether they have one or not but how the group
@@ -33,7 +35,7 @@
 INDI_G::INDI_G(INDI_D *idv, const QString &inName)
 {
     dp = idv;
-    name = inName;
+    name = (inName.isEmpty()) ? i18n("Unknown") : inName;
 
     propertyContainer = new QFrame(idv);
     propertyLayout    = new QVBoxLayout(propertyContainer);
@@ -78,8 +80,6 @@ bool INDI_G::addProperty(INDI::Property *prop)
 
 bool INDI_G::removeProperty(const QString &probName)
 {
-
-
     foreach(INDI_P * pp, propList)
     {
         if (pp->getName() == probName)

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

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