[Kst] branches/work/kst/kst1kde4/kst/src/libkstapp

Zongyi Zhang freebody.kst at gmail.com
Wed Mar 24 22:33:07 CET 2010


SVN commit 1107101 by zhang:

continue kst1kde4

 M  +1 -1      extensionmgr.cpp  
 M  +2 -2      extensionmgr.h  
 M  +1 -1      kstviewobjectimagedrag.cpp  


--- branches/work/kst/kst1kde4/kst/src/libkstapp/extensionmgr.cpp #1107100:1107101
@@ -132,7 +132,7 @@
 
 
 void ExtensionMgr::doRegister(const QString& name, KstExtension *inst) {
-  assert(!_registry.contains(name));
+  assert(!_registry.count(name));
   _registry[name] = inst;
 }
 
--- branches/work/kst/kst1kde4/kst/src/libkstapp/extensionmgr.h #1107100:1107101
@@ -35,7 +35,7 @@
 
     const QMap<QString,bool>& extensions() const { return _extensions; }
     void setEnabled(const QString& extension, bool enabled) { _extensions[extension] = enabled; }
-    bool enabled(const QString& extension) { return _extensions.contains(extension) && _extensions[extension]; }
+    bool enabled(const QString& extension) { return _extensions.count(extension) && _extensions[extension]; }
     void updateExtensions();
 
     KstExtension *extension(const QString& name) const;
@@ -43,7 +43,7 @@
     void doRegister(const QString& name, KstExtension *inst);
     void unregister(KstExtension *inst);
     void unregister(const QString& name) { _registry.remove(name); }
-    bool registered(const QString& name) const { return _registry.contains(name); }
+    bool registered(const QString& name) const { return _registry.count(name); }
 
     void loadExtension(const QString& name);
     void loadExtension(const KService::Ptr& service);
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kstviewobjectimagedrag.cpp #1107100:1107101
@@ -123,5 +123,5 @@
 
 
 bool KstViewObjectImageDrag::provides(const char *mimeType) const {
-  return _mimeTypes.contains(QString::fromLatin1(mimeType));
+  return _mimeTypes.count(QString::fromLatin1(mimeType));
 }


More information about the Kst mailing list