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

Adam Treat treat at kde.org
Tue Feb 20 19:16:14 CET 2007


SVN commit 635698 by treat:

* Typo, KService changes, Q3ValueList semantic problems in KstObjectCollection::findTag



 M  +3 -1      PORTINGTODO  
 M  +16 -15    src/libkst/kstobjectcollection.h  
 M  +1 -3      src/libkstmath/kstdataobject.cpp  
 M  +1 -1      src/libkstmath/labelparser.cpp  


--- branches/work/kst/portto4/kst/PORTINGTODO #635697:635698
@@ -16,10 +16,12 @@
   B. Switch to using Qt4's container classes eg Q3ValueList --> QList
     1. No longer need to use QDeepCopy as all implicitly shared objects in Qt4 are reentrant and
        use atomic reference counting.  See the threading docs...
+    2. KstObjectList::findTag is broken for now as Q3ValueList does not have same semantics as
+       QValueList had...
   C. Revamp the plugin manager to use Qt4's plugin system?
   D. We relied upon a hack in KDE3 version that used a private header
      from qt.  This is no longer installed in Qt4.  This can be taken care of by getting rid of
      KstWaitCondition as described above.
   E. Rename kstdebug classes as they really are loggers and should be named as such.
 
-  **** libkstmath ****:
+**** libkstmath ****:
--- branches/work/kst/portto4/kst/src/libkst/kstobjectcollection.h #635697:635698
@@ -612,21 +612,22 @@
 }
 
 template <class T>
-typename KstObjectList<KstSharedPtr<T> >::Iterator KstObjectCollection<T>::findTag(const KstObjectTag& x) {
-  T *obj = retrieveObject(x);
-  if (obj) {
-    return _list.find(obj);
-  } else {
-    // For historical compatibility:
-    // previously, output vectors of equations, PSDs, etc. were named PSD1-ABCDE-freq
-    // now, they are PSD1-ABCDE/freq
-    QString newTag = x.tagString();
-    newTag.replace(newTag.lastIndexOf('-'), 1, KstObjectTag::tagSeparator);
-    obj = retrieveObject(KstObjectTag::fromString(newTag));
-    if (obj) {
-      return _list.find(obj);
-    }
-  }
+typename KstObjectList<KstSharedPtr<T> >::Iterator KstObjectCollection<T>::findTag(const KstObjectTag& /*x*/) {
+  //FIXME Break this for now as Q3ValueList semantics are problematic... Noted in PORTINGTODO
+//  T *obj = retrieveObject(x);
+//   if (obj) {
+//     return _list.find(obj);
+//   } else {
+//     // For historical compatibility:
+//     // previously, output vectors of equations, PSDs, etc. were named PSD1-ABCDE-freq
+//     // now, they are PSD1-ABCDE/freq
+//     QString newTag = x.tagString();
+//     newTag.replace(newTag.lastIndexOf('-'), 1, KstObjectTag::tagSeparator);
+//     obj = retrieveObject(KstObjectTag::fromString(newTag));
+//     if (obj) {
+//       return _list.find(obj);
+//     }
+//   }
   return _list.end();
 }
 
--- branches/work/kst/portto4/kst/src/libkstmath/kstdataobject.cpp #635697:635698
@@ -97,9 +97,7 @@
 
 KstDataObjectPtr KstDataObject::createPlugin(KService::Ptr service) {
   int err = 0;
-  KstDataObject *object =
-      KParts::ComponentFactory::createInstanceFromService<KstDataObject>(service, 0, "",
-      QStringList(), &err);
+  KstDataObject *object = KService::createInstance<KstDataObject>(service, 0, QStringList(), &err);
 
   KstSharedPtr<KST::Plugin> p = new KST::DataObjectPlugin(service);
 
--- branches/work/kst/portto4/kst/src/libkstmath/labelparser.cpp #635697:635698
@@ -118,7 +118,7 @@
 
 
 inline QColor parseColor(const QString& txt, int *skip) {
-  const int end = txt.index('}');
+  const int end = txt.indexOf('}');
   if (skip) {
     *skip = end;
   }


More information about the Kst mailing list