[Kst] branches/work/kst/kst1kde4/kst/src/libkst
Zongyi Zhang
freebody.kst at gmail.com
Mon Apr 12 23:57:16 CEST 2010
SVN commit 1114175 by zhang:
remove klocale
M +2 -2 defaultprimitivenames.cpp
M +1 -1 defaultprimitivenames.h
M +2 -2 ksdebug.cpp
M +1 -1 ksdebug.h
M +2 -2 kstamatrix.cpp
M +7 -7 kstdataplugin.h
M +9 -9 kstdebug.cpp
M +2 -2 kstmatrix.cpp
M +4 -4 kstrmatrix.cpp
M +4 -4 kstrvector.cpp
M +2 -2 kstscalar.cpp
M +2 -2 kststring.cpp
M +4 -4 kstvector.cpp
--- branches/work/kst/kst1kde4/kst/src/libkst/defaultprimitivenames.cpp #1114174:1114175
@@ -20,8 +20,8 @@
#include "kstobjectcollection.h"
#include "defaultprimitivenames.h"
-#include <qregexp.h>
-#include <klocale.h>
+#include <QRegExp>
+// xxx #include <klocale.h>
#include <stdio.h>
// takes a field name and returns a unique tag name, which will be
--- branches/work/kst/kst1kde4/kst/src/libkst/defaultprimitivenames.h #1114174:1114175
@@ -18,7 +18,7 @@
#ifndef DEFAULTPRIMITIVENAMES_H
#define DEFAULTPRIMITIVENAMES_H
-#include <qstring.h>
+#include <QString>
#include "kst_export.h"
#include "kstobject.h"
--- branches/work/kst/kst1kde4/kst/src/libkst/ksdebug.cpp #1114174:1114175
@@ -32,8 +32,8 @@
#include <kglobal.h>
#include <kinstance.h>
#include <kstandarddirs.h>
+// xxx #include <klocale.h>
-#include <klocale.h>
#include <qbrush.h>
#include <qdatetime.h>
#include <qfile.h>
@@ -296,7 +296,7 @@
// QMessageBox instead
if ( !kstDebug_data->aAreaName.isEmpty() )
aCaption += QString("(%1)").arg( kstDebug_data->aAreaName );
- QMessageBox::warning( 0L, aCaption, data, i18n("&OK") );
+ QMessageBox::warning( 0L, aCaption, data, QObject::tr("&OK") );
break;
}
case 2: // Shell
--- branches/work/kst/kst1kde4/kst/src/libkst/ksdebug.h #1114174:1114175
@@ -22,7 +22,7 @@
#ifndef _KSDEBUG_H_
#define _KSDEBUG_H_
-#include <qstring.h>
+#include <QString>
#include "kst_export.h"
class QWidget;
--- branches/work/kst/kst1kde4/kst/src/libkst/kstamatrix.cpp #1114174:1114175
@@ -17,7 +17,7 @@
#include <QTextDocument>
-#include <klocale.h>
+// xxx #include <klocale.h>
#include "kstamatrix.h"
#include "kstdebug.h"
@@ -80,7 +80,7 @@
qds >> _z[i]; // stored in the same order as it was saved
}
if (i < in_nX*in_nY) {
- KstDebug::self()->log(i18n("Saved matrix contains less data than it claims."), KstDebug::Warning);
+ KstDebug::self()->log(QObject::tr("Saved matrix contains less data than it claims."), KstDebug::Warning);
resizeZ(i, false);
}
}
--- branches/work/kst/kst1kde4/kst/src/libkst/kstdataplugin.h #1114174:1114175
@@ -17,13 +17,13 @@
#include <assert.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <QFile>
+#include <QFileInfo>
#include <kdebug.h>
#include <kio/netaccess.h>
#include <klibloader.h>
-#include <klocale.h>
+// xxx #include <klocale.h>
#include <kservice.h>
#include <kservicetype.h>
@@ -87,13 +87,13 @@
QByteArray libname = QFile::encodeName((!isDataObject ? QString("kstdata_") : QString()) + _plugLib);
_lib = KLibLoader::self()->library(libname);
if (!_lib) {
- KstDebug::self()->log(i18n("Error loading data plugin [%1]: %2").arg(libname.data()).arg(KLibLoader::self()->lastErrorMessage()), KstDebug::Error);
+ KstDebug::self()->log(QObject::tr("Error loading data plugin [%1]: %2").arg(libname.data()).arg(KLibLoader::self()->lastErrorMessage()), KstDebug::Error);
return false;
}
if (key() != (isDataObject ? KST_CURRENT_DATAOBJECT_KEY : KST_CURRENT_DATASOURCE_KEY)) {
- KstDebug::self()->log(i18n("Error loading data plugin [%1]: %2").arg(libname.data()).arg(i18n("Plugin is too old and needs to be recompiled.")), KstDebug::Error);
- KstDebug::self()->log(i18n("Error loading data plugin key = [%1]: %2").arg(key()).arg(QFile::encodeName("key_" + _plugLib).data()), KstDebug::Error);
+ KstDebug::self()->log(QObject::tr("Error loading data plugin [%1]: %2").arg(libname.data()).arg(QObject::tr("Plugin is too old and needs to be recompiled.")), KstDebug::Error);
+ KstDebug::self()->log(QObject::tr("Error loading data plugin key = [%1]: %2").arg(key()).arg(QFile::encodeName("key_" + _plugLib).data()), KstDebug::Error);
return false;
}
return true;
@@ -261,7 +261,7 @@
return cw;
}
if (rc) {
- KstDebug::self()->log(i18n("Error in plugin %1: Configuration widget is of the wrong type.").arg(service->property("Name").toString()), KstDebug::Error);
+ KstDebug::self()->log(QObject::tr("Error in plugin %1: Configuration widget is of the wrong type.").arg(service->property("Name").toString()), KstDebug::Error);
delete rc;
}
}
--- branches/work/kst/kst1kde4/kst/src/libkst/kstdebug.cpp #1114174:1114175
@@ -120,28 +120,28 @@
QString KstDebug::label(LogLevel level) const {
switch (level) {
case Notice:
- return i18n("log level notice", "Notice");
+ return QObject::tr("log level notice", "Notice");
case Warning:
- return i18n("log level warning", "Warning");
+ return QObject::tr("log level warning", "Warning");
case Error:
- return i18n("log level error", "Error");
+ return QObject::tr("log level error", "Error");
case Debug:
- return i18n("log level debug", "Debug");
+ return QObject::tr("log level debug", "Debug");
default:
- return i18n("log level other", "Other");
+ return QObject::tr("log level other", "Other");
}
}
QString KstDebug::text() {
QMutexLocker ml(&_lock);
- QString body = i18n("Kst version %1\n\n\nKst log:\n").arg( _kstVersion );
+ QString body = QObject::tr("Kst version %1\n\n\nKst log:\n").arg( _kstVersion );
for (QLinkedList<LogMessage>::const_iterator i=_messages.begin(); i != _messages.end(); ++i) {
- body += i18n("date leveltext: message", "%1 %2: %3\n").arg(KGlobal::locale()->formatDateTime(i->date)).arg(label(i->level)).arg(i->msg);
+ body += QObject::tr("date leveltext: message", "%1 %2: %3\n").arg(KGlobal::locale()->formatDateTime(i->date)).arg(label(i->level)).arg(i->msg);
}
- body += i18n("\n\nData-source plugins:");
+ body += QObject::tr("\n\nData-source plugins:");
QStringList dsp = dataSourcePlugins();
for (QStringList::ConstIterator it = dsp.begin(); it != dsp.end(); ++it) {
body += '\n';
@@ -162,7 +162,7 @@
void KstDebug::sendEmail() {
-// kapp->invokeMailer(QString::null, QString::null, QString::null, i18n("Kst Debugging Information"), text());
+// kapp->invokeMailer(QString::null, QString::null, QString::null, QObject::tr("Kst Debugging Information"), text());
}
--- branches/work/kst/kst1kde4/kst/src/libkst/kstmatrix.cpp #1114174:1114175
@@ -22,7 +22,7 @@
#include <QMultiHash>
#include <kdebug.h>
-#include <klocale.h>
+// xxx #include <klocale.h>
#include "defaultprimitivenames.h"
#include "kstdatacollection.h"
@@ -51,7 +51,7 @@
QString _tag = in_tag.tag();
if (!in_tag.isValid()) {
- QString nt = i18n("Anonymous Matrix %1");
+ QString nt = QObject::tr("Anonymous Matrix %1");
do {
_tag = nt.arg(anonymousMatrixCounter++);
--- branches/work/kst/kst1kde4/kst/src/libkst/kstrmatrix.cpp #1114174:1114175
@@ -22,7 +22,7 @@
#include <QTextDocument>
-#include <klocale.h>
+// xxx #include <klocale.h>
#include "kstdatacollection.h"
#include "kstdebug.h"
@@ -209,7 +209,7 @@
if (ok && _file) {
_file->readLock();
if (_file->fileType() == "ASCII") {
- returnLabel = i18n("Column %1").arg(_field);
+ returnLabel = QObject::tr("Column %1").arg(_field);
} else {
returnLabel = _field;
}
@@ -541,7 +541,7 @@
_editable = true;
if (!_file) {
- KstDebug::self()->log(i18n("Data file for matrix %1 was not opened.").arg(tagName()), KstDebug::Warning);
+ KstDebug::self()->log(QObject::tr("Data file for matrix %1 was not opened.").arg(tagName()), KstDebug::Warning);
} else {
_samplesPerFrameCache = _file->samplesPerFrame(_field);
}
@@ -596,7 +596,7 @@
Q_ASSERT(myLockStatus() == KstRWLock::WRITELOCKED);
if (!file) {
- KstDebug::self()->log(i18n("Data file for vector %1 was not opened.").arg(tagName()), KstDebug::Warning);
+ KstDebug::self()->log(QObject::tr("Data file for vector %1 was not opened.").arg(tagName()), KstDebug::Warning);
}
_file = file;
if (_file) {
--- branches/work/kst/kst1kde4/kst/src/libkst/kstrvector.cpp #1114174:1114175
@@ -21,7 +21,7 @@
#include <stdlib.h>
#include <QTextDocument>
-#include <klocale.h>
+// xxx #include <klocale.h>
#include "kstdatacollection.h"
#include "kstdebug.h"
@@ -167,7 +167,7 @@
_dirty = true;
if (!in_file) {
- KstDebug::self()->log(i18n("Data file for vector %1 was not opened.").arg(tagName()), KstDebug::Warning);
+ KstDebug::self()->log(QObject::tr("Data file for vector %1 was not opened.").arg(tagName()), KstDebug::Warning);
}
}
@@ -217,7 +217,7 @@
Q_ASSERT(myLockStatus() == KstRWLock::WRITELOCKED);
if (!in_file) {
- KstDebug::self()->log(i18n("Data file for vector %1 was not opened.").arg(tagName()), KstDebug::Warning);
+ KstDebug::self()->log(QObject::tr("Data file for vector %1 was not opened.").arg(tagName()), KstDebug::Warning);
}
_file = in_file;
if (_file) {
@@ -384,7 +384,7 @@
if (ok && _file) {
_file->readLock();
if (_file->fileType() == "ASCII") {
- label = i18n("Column %1").arg(_field);
+ label = QObject::tr("Column %1").arg(_field);
} else {
label = _field;
}
--- branches/work/kst/kst1kde4/kst/src/libkst/kstscalar.cpp #1114174:1114175
@@ -18,7 +18,7 @@
#include <QTextDocument>
#include <kdebug.h>
-#include <klocale.h>
+// xxx #include <klocale.h>
#include "kstscalar.h"
#include "kstdatacollection.h"
@@ -44,7 +44,7 @@
: KstPrimitive(provider), _value(val), _orphan(orphan), _displayable(displayable), _editable(editable) {
QString _tag = in_tag.tag();
if (_tag.isEmpty()) {
- QString nt = i18n("Anonymous Scalar %1");
+ QString nt = QObject::tr("Anonymous Scalar %1");
do {
_tag = nt.arg(iAnonymousScalarCounter++);
--- branches/work/kst/kst1kde4/kst/src/libkst/kststring.cpp #1114174:1114175
@@ -17,7 +17,7 @@
#include <QTextDocument>
-#include <klocale.h>
+// xxx #include <klocale.h>
#include "kstdatacollection.h"
#include "defaultprimitivenames.h"
@@ -28,7 +28,7 @@
: KstPrimitive(provider), _value(val), _orphan(orphan), _editable(false) {
QString _tag = in_tag.tag();
if (!in_tag.isValid()) {
- QString nt = i18n("Anonymous String %1");
+ QString nt = QObject::tr("Anonymous String %1");
do {
_tag = nt.arg(anonymousStringCounter++);
--- branches/work/kst/kst1kde4/kst/src/libkst/kstvector.cpp #1114174:1114175
@@ -24,8 +24,8 @@
#include <QTextDocument>
#include <kdebug.h>
-#include <kglobal.h>
-#include <klocale.h>
+// xxx #include <kglobal.h>
+// xxx #include <klocale.h>
#include "defaultprimitivenames.h"
#include "kstdatacollection.h"
@@ -52,7 +52,7 @@
}
if (!in_tag.isValid()) {
- QString nt = i18n("Anonymous Vector %1");
+ QString nt = QObject::tr("Anonymous Vector %1");
do {
KstObject::setTagName(KstObjectTag(nt.arg(anonymousVectorCounter++), in_tag.context()));
@@ -112,7 +112,7 @@
}
if (!in_tag.isValid()) {
- QString nt = i18n("Anonymous Vector %1");
+ QString nt = QObject::tr("Anonymous Vector %1");
do {
KstObject::setTagName(KstObjectTag(nt.arg(anonymousVectorCounter++), in_tag.context()));
More information about the Kst
mailing list