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

List:       kde-commits
Subject:    koffice/kexi/widget
From:       Jarosław Staniek <staniek () kde ! org>
Date:       2009-05-10 21:50:44
Message-ID: 1241992244.857377.3568.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 966297 by staniek:

Widgets
= use Set::propertyValue() for simplicity



 M  +8 -11     kexipropertyeditorview.cpp  
 M  +1 -1      kexipropertyeditorview.h  
 M  +1 -1      tableview/kexidataawarepropertyset.cpp  


--- trunk/koffice/kexi/widget/kexipropertyeditorview.cpp #966296:966297
@@ -1,6 +1,6 @@
 /* This file is part of the KDE project
    Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
-   Copyright (C) 2004-2008 Jarosław Staniek <staniek@kde.org>
+   Copyright (C) 2004-2009 Jarosław Staniek <staniek@kde.org>
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
@@ -131,16 +131,13 @@
 {
     QString className, iconName, objectName;
     if (set) {
-        if (set->contains("this:classString"))
-            className = (*set)["this:classString"].value().toString();
-        if (set->contains("this:iconName"))
-            iconName = (*set)["this:iconName"].value().toString();
-        const bool useCaptionAsObjectName = \
                set->contains("this:useCaptionAsObjectName")
-                                            && \
                (*set)["this:useCaptionAsObjectName"].value().toBool();
-        if (set->contains(useCaptionAsObjectName ? "caption" : "name"))
-            objectName = (*set)[useCaptionAsObjectName ? "caption" : \
                "name"].value().toString();
-        if (objectName.isEmpty() && useCaptionAsObjectName && set->contains("name")) \
                // get name if there is no caption
-            objectName = (*set)["name"].value().toString();
+        className = set->propertyValue("this:classString").toString();
+        iconName = set->propertyValue("this:iconName").toString();
+        const bool useCaptionAsObjectName = \
set->propertyValue("this:useCaptionAsObjectName", false).toBool(); +        \
objectName = set->propertyValue(useCaptionAsObjectName ? "caption" : \
"objectName").toString(); +        if (objectName.isEmpty() && \
useCaptionAsObjectName) { // get name if there is no caption +            objectName \
= set->propertyValue("objectName").toString(); +        }
     }
     if (!set || objectName.isEmpty()) {
         objectName = textToDisplayForNullSet;
--- trunk/koffice/kexi/widget/kexipropertyeditorview.h #966296:966297
@@ -1,6 +1,6 @@
 /* This file is part of the KDE project
    Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
-   Copyright (C) 2004-2008 Jarosław Staniek <staniek@kde.org>
+   Copyright (C) 2004-2009 Jarosław Staniek <staniek@kde.org>
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public
--- trunk/koffice/kexi/widget/tableview/kexidataawarepropertyset.cpp #966296:966297
@@ -268,7 +268,7 @@
         KoProperty::Set *set = m_sets.at(i);
         if (!set || !set->contains(propertyName))
             continue;
-        if (set->property(propertyName).value() == value)
+        if (set->propertyValue(propertyName) == value)
             return i;
     }
     return -1;


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

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