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

Adam Treat treat at kde.org
Tue Feb 20 20:02:20 CET 2007


SVN commit 635728 by treat:

* Various QString api changes


 M  +2 -2      enodes.cpp  
 M  +1 -1      kstcplugin.cpp  
 M  +3 -3      pluginloader.cpp  
 M  +9 -9      pluginxmlparser.cpp  


--- branches/work/kst/portto4/kst/src/libkstmath/enodes.cpp #635727:635728
@@ -809,7 +809,7 @@
   if (_isEquation) {
     if (!_equation) {
       mutex().lock();
-      YY_BUFFER_STATE b = yy_scan_bytes(_tagName.latin1(), _tagName.length());
+      YY_BUFFER_STATE b = yy_scan_bytes(_tagName.toLatin1(), _tagName.length());
       int rc = yyparse();
       yy_delete_buffer(b);
       if (rc == 0 && ParsedEquation) {
@@ -833,7 +833,7 @@
   } else if (_vector) {
     if (!_equation && !_vectorIndex.isEmpty()) {
       mutex().lock();
-      YY_BUFFER_STATE b = yy_scan_bytes(_vectorIndex.latin1(), _vectorIndex.length());
+      YY_BUFFER_STATE b = yy_scan_bytes(_vectorIndex.toLatin1(), _vectorIndex.length());
       int rc = yyparse();
       yy_delete_buffer(b);
       if (rc == 0 && ParsedEquation) {
--- branches/work/kst/portto4/kst/src/libkstmath/kstcplugin.cpp #635727:635728
@@ -319,7 +319,7 @@
       }
       doUpdate = (UPDATE == is->update(update_counter)) || doUpdate;
       // Maybe we should use UTF-8 instead?
-      _inStrings[sitcnt++] = strdup(is->value().latin1());
+      _inStrings[sitcnt++] = strdup(is->value().toLatin1());
     } else if ((*it)._type == Plugin::Data::IOValue::PidType) {
       _inScalars[itcnt++] = getpid();
     }
--- branches/work/kst/portto4/kst/src/libkstmath/pluginloader.cpp #635727:635728
@@ -59,15 +59,15 @@
   plug->_data = _parser->data();
 
   // Load the plugin
-  plug->_lib = KLibLoader::self()->library(object.local8Bit().data());
+  plug->_lib = KLibLoader::self()->library(object.toLocal8Bit().data());
   if (!plug->_lib) {
     KstDebug::self()->log(i18n("Error trying to load plugin %1 [%2].").arg(object).arg(KLibLoader::self()->lastErrorMessage()), KstDebug::Error);
     delete plug;
     return 0L;
   }
 
-  if (plug->_lib->hasSymbol(plug->_data._name.latin1())) {
-    plug->_symbol = plug->_lib->symbol(plug->_data._name.latin1());
+  if (plug->_lib->hasSymbol(plug->_data._name.toLatin1())) {
+    plug->_symbol = plug->_lib->symbol(plug->_data._name.toLatin1());
   }
 
   if (plug->_lib->hasSymbol("freeLocalData")) {
--- branches/work/kst/portto4/kst/src/libkstmath/pluginxmlparser.cpp #635727:635728
@@ -105,12 +105,12 @@
 int PluginXMLParser::parseDOM(const QDomDocument& doc) {
 QDomElement topElem = doc.documentElement();
 
-  if (topElem.tagName().lower() == QString::fromLatin1("module")) {
+  if (topElem.tagName().toLower() == QString::fromLatin1("module")) {
     QDomNode n = topElem.firstChild();
 
     while (!n.isNull()) {
       QDomElement e = n.toElement();
-      QString tn = e.tagName().lower();
+      QString tn = e.tagName().toLower();
       int rc = 0;
 
       if (tn == QS_interface) {
@@ -203,7 +203,7 @@
       continue;
     }
 
-    QString tn = e.tagName().lower();
+    QString tn = e.tagName().toLower();
     if (tn == QS_modulename) {
       _pluginData._readableName = e.attribute(QS_readableName);
       _pluginData._name = e.attribute(QS_name);
@@ -230,7 +230,7 @@
       _pluginData._version = QString("%1.%2").arg(e.attribute(QS_major))
                                              .arg(e.attribute(QS_minor));
     } else if (tn == QS_state) {
-      QString st = e.attribute(QS_devstate).lower();
+      QString st = e.attribute(QS_devstate).toLower();
       _pluginData._state = Plugin::Data::Unknown;
 
       if (st == QS_prealpha) {
@@ -279,7 +279,7 @@
       continue;
     }
 
-    QString tn = e.tagName().lower();
+    QString tn = e.tagName().toLower();
     if (tn == QS_input) {
       rc = parseIO(e, _pluginData._inputs);
     } else if (tn == QS_output) {
@@ -312,7 +312,7 @@
 
     Plugin::Data::IOValue iov;
 
-    QString tn = e.tagName().lower();
+    QString tn = e.tagName().toLower();
     if (tn == QS_table) {
       iov._type = Plugin::Data::IOValue::TableType;
 //    } else if (tn == QS_integer) {
@@ -337,7 +337,7 @@
       iov._name = e.attribute(QS_name);
       iov._description = e.attribute(QS_descr);
       iov._default = e.attribute(QS_default);
-      QString subtype = e.attribute(QS_type).lower();
+      QString subtype = e.attribute(QS_type).toLower();
       if (subtype == QS_float) {
         iov._subType = Plugin::Data::IOValue::FloatSubType;
       } else if (subtype == QS_floatNonVector) {
@@ -380,7 +380,7 @@
       continue;
     }
 
-    QString tn = e.tagName().lower();
+    QString tn = e.tagName().toLower();
     if (tn == QS_hint) {
       QString n = e.attribute(QS_name);
       QString x = e.attribute("x");
@@ -416,7 +416,7 @@
       continue;
     }
 
-    QString tn = e.tagName().lower();
+    QString tn = e.tagName().toLower();
     if (tn == QS_string) {
       _pluginData._parameters[e.attribute(QS_name)] = qMakePair(Plugin::Data::String, e.attribute(QS_helptext));
     } else if (tn == QS_int) {


More information about the Kst mailing list