[Kst] branches/work/kst/portto4/kst/src/libkst

Mike Fenton mike at staikos.net
Fri Oct 17 20:47:05 CEST 2008


SVN commit 872653 by fenton:

Add orphan / non-orphan handling for string names.


 M  +7 -2      string_kst.cpp  
 M  +1 -0      string_kst.h  


--- branches/work/kst/portto4/kst/src/libkst/string_kst.cpp #872652:872653
@@ -94,19 +94,24 @@
 
 
 QString String::_automaticDescriptiveName() const {
-  return _value;
+  if (_orphan) {
+    return value();
+  } else {
+    return Primitive::_automaticDescriptiveName();
+  }
 }
 
 
-
 QString String::descriptionTip() const {
   return i18n("String: %1").arg(Name());
 }
 
+
 QString String::sizeString() const {
   return QString::number(_value.size());
 }
 
+
 QString String::propertyString() const {
   return _value;
 }
--- branches/work/kst/portto4/kst/src/libkst/string_kst.h #872652:872653
@@ -42,6 +42,7 @@
 
     friend class ObjectStore;
     virtual QString _automaticDescriptiveName() const;
+
   public:
     /** Save information */
     void save(QXmlStreamWriter &s);


More information about the Kst mailing list