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

Adam Treat treat at kde.org
Wed Jul 4 17:05:44 CEST 2007


SVN commit 683302 by treat:

* Provide alternative to i18n for some configurations


 M  +1 -1      libkst/defaultprimitivenames.cpp  
 A             libkst/kst_i18n.h   [License: GPL (v2+)]
 M  +1 -1      libkst/kstamatrix.cpp  
 M  +8 -8      libkst/kstdatasource.cpp  
 M  +4 -2      libkst/kstdebug.cpp  
 M  +1 -1      libkst/kstmatrix.cpp  
 M  +1 -1      libkst/kstrmatrix.cpp  
 M  +1 -1      libkst/kstrvector.cpp  
 M  +1 -1      libkst/kstscalar.cpp  
 M  +1 -1      libkst/kststring.cpp  
 M  +1 -2      libkst/kstvector.cpp  
 M  +1 -1      libkstmath/enodes.cpp  
 M  +1 -1      libkstmath/eparse-eh.cpp  
 M  +1 -1      libkstmath/kstbasicplugin.cpp  
 M  +1 -2      libkstmath/kstcsd.cpp  
 M  +0 -1      libkstmath/kstcurvepointsymbol.cpp  
 M  +1 -1      libkstmath/kstdataobject.cpp  
 M  +1 -1      libkstmath/kstdefaultnames.cpp  
 M  +1 -1      libkstmath/kstequation.cpp  
 M  +1 -2      libkstmath/ksthistogram.cpp  
 M  +1 -1      libkstmath/kstimage.cpp  
 M  +1 -5      libkstmath/kstplotdefines.h  
 M  +1 -2      libkstmath/kstpsd.cpp  
 M  +1 -1      libkstmath/kstvcurve.cpp  
 M  +1 -2      libkstmath/psdcalculator.cpp  


--- branches/work/kst/portto4/kst/src/libkst/defaultprimitivenames.cpp #683301:683302
@@ -21,7 +21,7 @@
 #include "defaultprimitivenames.h"
 
 #include <qregexp.h>
-#include <klocale.h>
+#include "kst_i18n.h"
 #include <stdio.h>
 
 // takes a field name and returns a unique tag name, which will be
--- branches/work/kst/portto4/kst/src/libkst/kstamatrix.cpp #683301:683302
@@ -22,7 +22,7 @@
 #include "kstdebug.h"
 #include <qbytearray.h>
 #include <qtextdocument.h>
-#include <klocale.h>
+#include "kst_i18n.h"
 #include <kcodecs.h>
 
 KstAMatrix::KstAMatrix(const QDomElement &e) : KstMatrix() {
--- branches/work/kst/portto4/kst/src/libkst/kstdatasource.cpp #683301:683302
@@ -19,16 +19,16 @@
 
 #include <assert.h>
 
+#include <qdir.h>
+#include <qurl.h>
+#include <qfile.h>
 #include <qdebug.h>
-#include <klocale.h>
-
-#include <qfile.h>
 #include <qfileinfo.h>
 #include <qtextdocument.h>
-#include <qdir.h>
 #include <qapplication.h>
 #include <qpluginloader.h>
 
+#include "kst_i18n.h"
 #include "kstdatacollection.h"
 #include "kstdebug.h"
 #include "kstscalar.h"
@@ -55,17 +55,17 @@
 
 
 static QString obtainFile(const QString& source) {
-  KUrl url;
+  QUrl url;
   
   if (QFile::exists(source) && QFileInfo(source).isRelative()) {
     url.setPath(source);
   } else {
-    url = KUrl(source);
+    url = QUrl(source);
   }
 
-  if (url.isLocalFile() || url.protocol().isEmpty() || url.protocol().toLower() == "nad") {
+//   if (url.isLocalFile() || url.protocol().isEmpty() || url.protocol().toLower() == "nad") {
     return source;
-  }
+//   }
 
   if (urlMap.contains(source)) {
     return urlMap[source];
--- branches/work/kst/portto4/kst/src/libkst/kstdebug.cpp #683301:683302
@@ -20,9 +20,10 @@
 #include "kstrevision.h"
 #include "logevents.h"
 
+#include <qlocale.h>
 #include <qapplication.h>
 #include <qdebug.h>
-#include <klocale.h>
+#include "kst_i18n.h"
 
 #include <ksttimers.h>
 
@@ -137,8 +138,9 @@
   QMutexLocker ml(&_lock);
   QString body = i18n("Kst version %1\n\n\nKst log:\n", QString::fromLatin1(KSTVERSION));
 
+  QLocale locale;
   for (int i = 0; i < _messages.count(); i++ ) {
-    body += i18nc("date leveltext: message", "%1 %2: %3\n", KGlobal::locale()->formatDateTime(_messages[i].date), label(_messages[i].level), _messages[i].msg);
+    body += i18nc("date leveltext: message", "%1 %2: %3\n", _messages[i].date.toString(locale.dateFormat()), label(_messages[i].level), _messages[i].msg);
   }
 
   body += i18n("\n\nData-source plugins:");
--- branches/work/kst/portto4/kst/src/libkst/kstmatrix.cpp #683301:683302
@@ -19,7 +19,7 @@
 #include <stdlib.h>
 #include <math.h>
 
-#include <klocale.h>
+#include "kst_i18n.h"
 
 #include "defaultprimitivenames.h"
 #include "kstdatacollection.h"
--- branches/work/kst/portto4/kst/src/libkst/kstrmatrix.cpp #683301:683302
@@ -22,7 +22,7 @@
 
 #include <qtextdocument.h>
 
-#include <klocale.h>
+#include "kst_i18n.h"
 
 #include "kstdatacollection.h"
 #include "kstdebug.h"
--- branches/work/kst/portto4/kst/src/libkst/kstrvector.cpp #683301:683302
@@ -23,7 +23,7 @@
 #include <qtextdocument.h>
 
 #include <qdebug.h>
-#include <klocale.h>
+#include "kst_i18n.h"
 
 #include "kstdatacollection.h"
 #include "kstdebug.h"
--- branches/work/kst/portto4/kst/src/libkst/kstscalar.cpp #683301:683302
@@ -17,7 +17,7 @@
 
 #include <qtextdocument.h>
 
-#include <klocale.h>
+#include "kst_i18n.h"
 
 #include "kstscalar.h"
 #include "kstdatacollection.h"
--- branches/work/kst/portto4/kst/src/libkst/kststring.cpp #683301:683302
@@ -20,7 +20,7 @@
 
 #include <qtextdocument.h>
 
-#include <klocale.h>
+#include "kst_i18n.h"
 
 static int anonymousStringCounter = 0;
 
--- branches/work/kst/portto4/kst/src/libkst/kstvector.cpp #683301:683302
@@ -22,8 +22,7 @@
 
 #include <qtextdocument.h>
 
-#include <kglobal.h>
-#include <klocale.h>
+#include "kst_i18n.h"
 #include <kcodecs.h>
 
 #include <qdebug.h>
--- branches/work/kst/portto4/kst/src/libkstmath/enodes.cpp #683301:683302
@@ -21,7 +21,7 @@
 #include <string.h>
 #include <unistd.h>
 
-#include <klocale.h>
+#include "kst_i18n.h"
 
 #include <qmutex.h>
 #include <qregexp.h>
--- branches/work/kst/portto4/kst/src/libkstmath/eparse-eh.cpp #683301:683302
@@ -18,7 +18,7 @@
 #include <qstring.h>
 #include <qstringlist.h>
 
-#include <klocale.h>
+#include "kst_i18n.h"
 #include "kst_export.h"
 
 namespace Equation {
--- branches/work/kst/portto4/kst/src/libkstmath/kstbasicplugin.cpp #683301:683302
@@ -20,7 +20,7 @@
 
 #include <QTextDocument>
 
-#include <klocale.h>
+#include "kst_i18n.h"
 
 #include "kstdebug.h"
 #include "kstbasicplugin.h"
--- branches/work/kst/portto4/kst/src/libkstmath/kstcsd.cpp #683301:683302
@@ -24,8 +24,7 @@
 
 #include <QTextDocument>
 
-#include <kglobal.h>
-#include <klocale.h>
+#include "kst_i18n.h"
 
 #include "dialoglauncher.h"
 #include "kstcsd.h"
--- branches/work/kst/portto4/kst/src/libkstmath/kstcurvepointsymbol.cpp #683301:683302
@@ -18,7 +18,6 @@
 
 
 #include "kstcurvepointsymbol.h"
-#include <kglobal.h>
 #include <QPolygon>
 
 namespace KstCurvePointSymbol {
--- branches/work/kst/portto4/kst/src/libkstmath/kstdataobject.cpp #683301:683302
@@ -27,7 +27,7 @@
 
 #include <assert.h>
 
-#include <klocale.h>
+#include "kst_i18n.h"
 #include <klibloader.h>
 #include <kparts/componentfactory.h>
 
--- branches/work/kst/portto4/kst/src/libkstmath/kstdefaultnames.cpp #683301:683302
@@ -23,7 +23,7 @@
 #include "kstvcurve.h"
 
 #include <qregexp.h>
-#include <klocale.h>
+#include "kst_i18n.h"
 #include <stdio.h>
 
 QString KST::suggestPlotName() {
--- branches/work/kst/portto4/kst/src/libkstmath/kstequation.cpp #683301:683302
@@ -25,7 +25,7 @@
 
 #include <qtextdocument.h>
 
-#include <klocale.h>
+#include "kst_i18n.h"
 
 #include "dialoglauncher.h"
 #include "enodes.h"
--- branches/work/kst/portto4/kst/src/libkstmath/ksthistogram.cpp #683301:683302
@@ -20,8 +20,7 @@
 #include <stdlib.h>
 
 #include <QTextDocument>
-#include <kglobal.h>
-#include <klocale.h>
+#include "kst_i18n.h"
 
 #include "dialoglauncher.h"
 #include "kstdatacollection.h"
--- branches/work/kst/portto4/kst/src/libkstmath/kstimage.cpp #683301:683302
@@ -22,7 +22,7 @@
 #include "kstimage.h"
 #include "kstmath.h"
 
-#include <klocale.h>
+#include "kst_i18n.h"
 
 #include <qimage.h>
 #include <qpainter.h>
--- branches/work/kst/portto4/kst/src/libkstmath/kstplotdefines.h #683301:683302
@@ -21,12 +21,8 @@
 #define MARKER_LABEL_PRECISION        15
 
 #include <qstringlist.h>
-#include <klocale.h>
+#include "kst_i18n.h"
 
-#ifndef I18N_NOOP2
-#define I18N_NOOP2( comment,x ) x
-#endif
-
 enum KstAxisInterpretation { 
   AXIS_INTERP_YEAR,
   AXIS_INTERP_CTIME,
--- branches/work/kst/portto4/kst/src/libkstmath/kstpsd.cpp #683301:683302
@@ -24,8 +24,7 @@
 
 #include <QTextDocument>
 
-#include <kglobal.h>
-#include <klocale.h>
+#include "kst_i18n.h"
 #include <qdebug.h>
 
 #include "dialoglauncher.h"
--- branches/work/kst/portto4/kst/src/libkstmath/kstvcurve.cpp #683301:683302
@@ -16,7 +16,7 @@
  ***************************************************************************/
 
 // includes for KDE
-#include <klocale.h>
+#include "kst_i18n.h"
 #include <qdebug.h>
 #include <QPolygon>
 #include <QTextDocument>
--- branches/work/kst/portto4/kst/src/libkstmath/psdcalculator.cpp #683301:683302
@@ -21,8 +21,7 @@
 #include <assert.h>
 #include <math.h>
 
-#include <kglobal.h>
-#include <klocale.h>
+#include "kst_i18n.h"
 
 #include "kstdebug.h"
 #include "psdcalculator.h"


More information about the Kst mailing list