From: <mrj...@us...> - 2007-12-21 00:54:26
|
Revision: 2367 http://tora.svn.sourceforge.net/tora/?rev=2367&view=rev Author: mrjohnson0 Date: 2007-12-20 16:54:24 -0800 (Thu, 20 Dec 2007) Log Message: ----------- no more q3cstring. most of this port uses qstring except where qbytearray made more sense. Modified Paths: -------------- branches/tora-1.4/tora/src/main.cpp branches/tora-1.4/tora/src/tobrowser.cpp branches/tora-1.4/tora/src/tobrowser.h branches/tora-1.4/tora/src/tochartmanager.cpp branches/tora-1.4/tora/src/toconfiguration.cpp branches/tora-1.4/tora/src/toconfiguration.h branches/tora-1.4/tora/src/toconnection.cpp branches/tora-1.4/tora/src/toconnection.h branches/tora-1.4/tora/src/todebug.cpp branches/tora-1.4/tora/src/todebug.h branches/tora-1.4/tora/src/todebugtext.cpp branches/tora-1.4/tora/src/todebugtext.h branches/tora-1.4/tora/src/toextract.cpp branches/tora-1.4/tora/src/toextract.h branches/tora-1.4/tora/src/tofyracleconnection.cpp branches/tora-1.4/tora/src/toglobalsetting.cpp branches/tora-1.4/tora/src/tohelp.cpp branches/tora-1.4/tora/src/tohighlightedtext.h branches/tora-1.4/tora/src/tohtml.cpp branches/tora-1.4/tora/src/tohtml.h branches/tora-1.4/tora/src/tolinechart.cpp branches/tora-1.4/tora/src/tolinechart.h branches/tora-1.4/tora/src/tolistviewformattersql.cpp branches/tora-1.4/tora/src/tomain.cpp branches/tora-1.4/tora/src/tomain.h branches/tora-1.4/tora/src/tomarkedtext.cpp branches/tora-1.4/tora/src/tomarkedtext.h branches/tora-1.4/tora/src/tonewconnection.cpp branches/tora-1.4/tora/src/tooracleconnection.cpp branches/tora-1.4/tora/src/tooraclepreload.cpp branches/tora-1.4/tora/src/topreferences.cpp branches/tora-1.4/tora/src/toproject.cpp branches/tora-1.4/tora/src/toproject.h branches/tora-1.4/tora/src/toqsqlconnection.cpp branches/tora-1.4/tora/src/toqvalue.h branches/tora-1.4/tora/src/toresultcontent.cpp branches/tora-1.4/tora/src/toresultcontent.h branches/tora-1.4/tora/src/toresultview.cpp branches/tora-1.4/tora/src/toresultview.h branches/tora-1.4/tora/src/toscript.cpp branches/tora-1.4/tora/src/tosql.cpp branches/tora-1.4/tora/src/tosql.h branches/tora-1.4/tora/src/tosqledit.cpp branches/tora-1.4/tora/src/tosqledit.h branches/tora-1.4/tora/src/tosqlparse.cpp branches/tora-1.4/tora/src/tosyntaxsetup.cpp branches/tora-1.4/tora/src/tosyntaxsetup.h branches/tora-1.4/tora/src/totemplate.cpp branches/tora-1.4/tora/src/totemplate.h branches/tora-1.4/tora/src/totemplateprovider.cpp branches/tora-1.4/tora/src/totool.cpp branches/tora-1.4/tora/src/totool.h branches/tora-1.4/tora/src/totuning.cpp branches/tora-1.4/tora/src/totuning.h branches/tora-1.4/tora/src/towaitevents.cpp branches/tora-1.4/tora/src/towaitevents.h branches/tora-1.4/tora/src/toworksheet.cpp branches/tora-1.4/tora/src/toworksheet.h branches/tora-1.4/tora/src/toworksheetstatistic.cpp branches/tora-1.4/tora/src/toworksheetstatistic.h branches/tora-1.4/tora/src/utils.cpp branches/tora-1.4/tora/src/utils.h Modified: branches/tora-1.4/tora/src/main.cpp =================================================================== --- branches/tora-1.4/tora/src/main.cpp 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/main.cpp 2007-12-21 00:54:24 UTC (rev 2367) @@ -63,7 +63,7 @@ #include <qmessagebox.h> #include <qtextcodec.h> //Added by qt3to4: -#include <Q3CString> +#include <QString> #include <QTranslator> #ifndef TOMONOLITHIC @@ -198,7 +198,7 @@ toConnectionProvider::initializeAll(); { - Q3CString nls = getenv("NLS_LANG"); + QString nls = getenv("NLS_LANG"); if (nls.isEmpty()) nls = "american_america.UTF8"; else Modified: branches/tora-1.4/tora/src/tobrowser.cpp =================================================================== --- branches/tora-1.4/tora/src/tobrowser.cpp 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/tobrowser.cpp 2007-12-21 00:54:24 UTC (rev 2367) @@ -90,7 +90,7 @@ #include <qworkspace.h> //Added by qt3to4: #include <QPixmap> -#include <Q3CString> +#include <QString> #include "icons/addindex.xpm" #include "icons/addtable.xpm" @@ -263,7 +263,7 @@ Type = QString(BrowserTool.config(CONF_FILTER_TYPE, "0")).toInt(); TablespaceType = QString(BrowserTool.config(CONF_FILTER_TABLESPACE_TYPE, "0")).toInt(); } - virtual void exportData(std::map<Q3CString, QString> &data, const Q3CString &prefix) { + virtual void exportData(std::map<QString, QString> &data, const QString &prefix) { data[prefix + ":Type"] = QString::number(Type); if (IgnoreCase) data[prefix + ":Ignore"] = "Yes"; @@ -277,7 +277,7 @@ if (OnlyOwnSchema) data[prefix + ":OwnlyOwnSchema"] = "Yes"; } - virtual void importData(std::map<Q3CString, QString> &data, const Q3CString &prefix) { + virtual void importData(std::map<QString, QString> &data, const QString &prefix) { Type = data[prefix + ":Type"].toInt(); OnlyOwnSchema = !data[prefix + ":OnlyOwnSchema"].isEmpty(); TablespaceType = data[prefix + ":SpaceType"].toInt(); @@ -289,7 +289,7 @@ Match.setCaseSensitive(IgnoreCase); } int id = 1; - std::map<Q3CString, QString>::iterator i; + std::map<QString, QString>::iterator i; Tablespaces.clear(); while ((i = data.find(prefix + ":Space:" + QString::number(id).latin1())) != data.end()) { Tablespaces.insert(Tablespaces.end(), (*i).second); @@ -1064,7 +1064,7 @@ disconnect(FilterButton, SIGNAL(toggled(bool)), this, SLOT(defineFilter())); FilterButton->setOn(filter); connect(FilterButton, SIGNAL(toggled(bool)), this, SLOT(defineFilter())); - for (std::map<Q3CString, toResultView *>::iterator i = Map.begin();i != Map.end();i++) + for (std::map<QString, toResultView *>::iterator i = Map.begin();i != Map.end();i++) (*i).second->setFilter(Filter->clone()); refresh(); } @@ -2224,12 +2224,12 @@ return toToolWidget::close(); } -void toBrowser::exportData(std::map<Q3CString, QString> &data, const Q3CString &prefix) +void toBrowser::exportData(std::map<QString, QString> &data, const QString &prefix) { data[prefix + ":Schema"] = Schema->selected(); data[prefix + ":FirstTab"] = TopTab->currentPage()->name(); data[prefix + ":SecondText"] = SecondText; - for (std::map<Q3CString, toResult *>::iterator i = SecondMap.begin();i != SecondMap.end();i++) { + for (std::map<QString, toResult *>::iterator i = SecondMap.begin();i != SecondMap.end();i++) { if ((*i).second == SecondTab && Map.find((*i).first) == Map.end()) { data[prefix + ":SecondTab"] = (*i).first; break; @@ -2244,7 +2244,7 @@ Filter->exportData(data, prefix + ":Filter"); } -void toBrowser::importData(std::map<Q3CString, QString> &data, const Q3CString &prefix) +void toBrowser::importData(std::map<QString, QString> &data, const QString &prefix) { disconnect(Schema, SIGNAL(activated(int)), this, SLOT(changeSchema(int))); @@ -2789,7 +2789,7 @@ TOCATCH } -void toBrowseTemplate::importData(std::map<Q3CString, QString> &data, const Q3CString &prefix) +void toBrowseTemplate::importData(std::map<QString, QString> &data, const QString &prefix) { if (data.find(prefix + ":Filter:Type") != data.end()) { Filter = new toBrowserFilter; @@ -2797,7 +2797,7 @@ } } -void toBrowseTemplate::exportData(std::map<Q3CString, QString> &data, const Q3CString &prefix) +void toBrowseTemplate::exportData(std::map<QString, QString> &data, const QString &prefix) { if (Filter) Filter->exportData(data, prefix + ":Filter"); Modified: branches/tora-1.4/tora/src/tobrowser.h =================================================================== --- branches/tora-1.4/tora/src/tobrowser.h 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/tobrowser.h 2007-12-21 00:54:24 UTC (rev 2367) @@ -43,7 +43,7 @@ #include "totool.h" #include <map> -#include <Q3CString> +#include <QString> #include <Q3PopupMenu> #include <QAction> @@ -80,8 +80,8 @@ toResultContent *TableContent; toResultContent *AccessContent; - std::map<Q3CString, toResultView *> Map; - std::map<Q3CString, toResult *> SecondMap; + std::map<QString, toResultView *> Map; + std::map<QString, toResult *> SecondMap; void setNewFilter(toBrowserFilter *filter); QTimer Poll; @@ -112,10 +112,10 @@ virtual bool canHandle(toConnection &conn); - virtual void exportData(std::map<Q3CString, QString> &data, - const Q3CString &prefix); - virtual void importData(std::map<Q3CString, QString> &data, - const Q3CString &prefix); + virtual void exportData(std::map<QString, QString> &data, + const QString &prefix); + virtual void importData(std::map<QString, QString> &data, + const QString &prefix); virtual bool close(); @@ -183,10 +183,10 @@ toBrowserFilter *filter(void) { return Filter; } - virtual void exportData(std::map<Q3CString, QString> &data, - const Q3CString &prefix); - virtual void importData(std::map<Q3CString, QString> &data, - const Q3CString &prefix); + virtual void exportData(std::map<QString, QString> &data, + const QString &prefix); + virtual void importData(std::map<QString, QString> &data, + const QString &prefix); public slots: void addDatabase(const QString &); Modified: branches/tora-1.4/tora/src/tochartmanager.cpp =================================================================== --- branches/tora-1.4/tora/src/tochartmanager.cpp 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/tochartmanager.cpp 2007-12-21 00:54:24 UTC (rev 2367) @@ -61,7 +61,7 @@ #include <qvalidator.h> #include <qworkspace.h> //Added by qt3to4: -#include <Q3CString> +#include <QString> #include <QPixmap> #include "ui_tochartalarmui.h" @@ -728,7 +728,7 @@ if ((*i).second.Persistent) { num++; - Q3CString name = Q3CString("Files:") + QString::number(num).latin1(); + QString name = QString("Files:") + QString::number(num).latin1(); ChartTool.setConfig(name + ":Name", (*i).first); ChartTool.setConfig(name + ":Spec", (*i).second.File.name()); } @@ -745,7 +745,7 @@ if ((*j).Persistent) { num++; - Q3CString name = Q3CString("Alarms:") + QString::number(num).latin1(); + QString name = QString("Alarms:") + QString::number(num).latin1(); ChartTool.setConfig(name + ":Name", (*i).first); ChartTool.setConfig(name + ":Spec", (*j).toString()); } @@ -761,7 +761,7 @@ { for (int num = ChartTool.config("FilesCount", "0").toInt();num > 0;num--) { - Q3CString name = Q3CString("Files:") + QString::number(num).latin1(); + QString name = QString("Files:") + QString::number(num).latin1(); QString t = ChartTool.config(name + ":Name", ""); QString s = ChartTool.config(name + ":Spec", ""); if (!t.isEmpty() && !s.isEmpty()) @@ -771,7 +771,7 @@ { for (int num = ChartTool.config("AlarmCount", "0").toInt();num > 0;num--) { - Q3CString name = Q3CString("Alarms:") + QString::number(num).latin1(); + QString name = QString("Alarms:") + QString::number(num).latin1(); QString t = ChartTool.config(name + ":Name", ""); QString s = ChartTool.config(name + ":Spec", ""); if (!t.isEmpty() && !s.isEmpty()) @@ -822,7 +822,7 @@ if (file.isOpen()) { static QRegExp quote(QString::fromLatin1("\"")); - Q3CString out = "\""; + QString out = "\""; if (header) { QString t = chart->title(); @@ -852,9 +852,9 @@ } } -static QString ReadCSV(const Q3CString &data, unsigned int &pos, bool &nl) +static QString ReadCSV(const QString &data, int &pos, bool &nl) { - Q3CString ret; + QString ret; if (data.at(pos) != '\"') throw qApp->translate("toChartManager", "Initial value didn't start with \" in CSV file"); pos++; @@ -871,13 +871,13 @@ throw qApp->translate("toChartManager", "Missing closing \" in CSV file"); pos++; nl = false; - while (pos < data.length() && (isspace(data.at(pos)) || data.at(pos) == ',' || data.at(pos) == ';')) + while (pos < data.length() && (data.at(pos).isSpace() || data.at(pos) == ',' || data.at(pos) == ';')) { if (data.at(pos) == '\n') nl = true; pos++; } - return QString::fromUtf8(ret); + return ret; } void toChartManager::openChart(void) @@ -887,8 +887,8 @@ { try { - Q3CString data = toReadFile(name); - unsigned int pos = 0; + QString data = toReadFile(name); + int pos = 0; toLineChart *chart; switch (TOMessageBox::information(toMainWidget(), Modified: branches/tora-1.4/tora/src/toconfiguration.cpp =================================================================== --- branches/tora-1.4/tora/src/toconfiguration.cpp 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/toconfiguration.cpp 2007-12-21 00:54:24 UTC (rev 2367) @@ -2,8 +2,6 @@ #include <qapplication.h> #include <qregexp.h> -//Added by qt3to4: -#include <Q3CString> #include "utils.h" @@ -85,9 +83,9 @@ #endif } -void toConfiguration::loadMap(const QString &filename, std::map<Q3CString, QString> &pairs) +void toConfiguration::loadMap(const QString &filename, std::map<QString, QString> &pairs) { - Q3CString data = toReadFile(filename); + QByteArray data = toReadFile(filename); int pos = 0; int bol = 0; @@ -103,8 +101,8 @@ if (endtag == -1) throw QT_TRANSLATE_NOOP("toTool", "Malformed tag in config file. Missing = on row. (%1)").arg(QString(data.mid(bol, wpos - bol))); { - Q3CString tag = ((const char *)data) + bol; - Q3CString val = ((const char *)data) + endtag + 1; + QString tag = ((const char *)data) + bol; + QString val = ((const char *)data) + endtag + 1; pairs[tag] = QString::fromUtf8(val); } bol = pos + 1; @@ -152,11 +150,11 @@ try { #ifdef Q_OS_WIN32 - for (std::map<Q3CString, QString>::iterator i = Configuration.begin(); + for (std::map<QString, QString>::iterator i = Configuration.begin(); i != Configuration.end(); i++) { - Q3CString path = (*i).first; + QString path = (*i).first; QString value = (*i).second; path.prepend(APPLICATION_NAME); path.replace(':', '\\'); @@ -204,7 +202,7 @@ #else if (Configuration.empty()) return; - Q3CString conf; + QString conf; if (getenv("HOME")) { conf = getenv("HOME"); @@ -216,18 +214,18 @@ TOCATCH } -bool toConfiguration::saveMap(const QString &file, std::map<Q3CString, QString> &pairs) +bool toConfiguration::saveMap(const QString &file, std::map<QString, QString> &pairs) { - Q3CString data; + QString data; { // qt4 QRegExp newline(QString::fromLatin1("\n")); // qt4 QRegExp backslash(QString::fromLatin1("\\")); char* newline = "\n"; char* backslash = "\\"; - for (std::map<Q3CString, QString>::iterator i = pairs.begin();i != pairs.end();i++) + for (std::map<QString, QString>::iterator i = pairs.begin();i != pairs.end();i++) { - Q3CString str = (*i).first; + QString str = (*i).first; str.append(QString::fromLatin1("=")); str.replace(backslash, QString::fromLatin1("\\\\")); str.replace(newline, QString::fromLatin1("\\n")); @@ -242,18 +240,18 @@ return toWriteFile(file, data); } -const QString &toConfiguration::globalConfig(const Q3CString &tag, const Q3CString &def) +const QString &toConfiguration::globalConfig(const QString &tag, const QString &def) { if (Configuration.empty()) loadConfig(); - std::map<Q3CString, QString>::iterator i = Configuration.find(tag); + std::map<QString, QString>::iterator i = Configuration.find(tag); if (i == Configuration.end()) { #if defined(Q_OS_WIN32) - Q3CString path = tag; + QString path = tag; path.prepend(APPLICATION_NAME); path.replace(':', '\\'); LONG siz = 1024; @@ -305,42 +303,42 @@ -const QString& toConfiguration::config(const Q3CString &tag, const Q3CString &def, const Q3CString &name) +const QString& toConfiguration::config(const QString &tag, const QString &def, const QString &name) { - Q3CString str = name; + QString str = name; str.append(":"); str.append(tag); return globalConfig(str, def); } -void toConfiguration::eraseConfig(const Q3CString &tag, const Q3CString &name) +void toConfiguration::eraseConfig(const QString &tag, const QString &name) { - Q3CString str = name; + QString str = name; str.append(":"); str.append(tag); globalEraseConfig(str); } -void toConfiguration::setConfig(const Q3CString &tag, const QString &def, const Q3CString name) +void toConfiguration::setConfig(const QString &tag, const QString &def, const QString name) { - Q3CString str = name; + QString str = name; str.append(":"); str.append(tag); globalSetConfig(str, def); } -void toConfiguration::globalEraseConfig(const Q3CString &tag) +void toConfiguration::globalEraseConfig(const QString &tag) { if (Configuration.empty()) loadConfig(); - std::map<Q3CString, QString>::iterator i = Configuration.find(tag); + std::map<QString, QString>::iterator i = Configuration.find(tag); if (i != Configuration.end()) { Configuration.erase(i); #if defined(Q_OS_WIN32) - Q3CString path = tag; + QString path = tag; path.prepend(APPLICATION_NAME); path.replace(':', '\\'); RegDeleteKeyA(HKEY_CURRENT_USER, path); // Don't really care if it works. @@ -349,7 +347,7 @@ } } -void toConfiguration::globalSetConfig(const Q3CString &tag, const QString &value) +void toConfiguration::globalSetConfig(const QString &tag, const QString &value) { if ( Configuration.empty() ) loadConfig(); Modified: branches/tora-1.4/tora/src/toconfiguration.h =================================================================== --- branches/tora-1.4/tora/src/toconfiguration.h 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/toconfiguration.h 2007-12-21 00:54:24 UTC (rev 2367) @@ -12,8 +12,7 @@ #include <qstring.h> #include <qapplication.h> -//Added by qt3to4: -#include <Q3CString> + // // A little magic to get lrefresh to work and get a check on qApp @@ -47,14 +46,14 @@ * @param tag The name of the configuration setting. * @param def Default value of the setting, if it is not available. */ - const QString &globalConfig(const Q3CString &tag, const Q3CString &def); + const QString &globalConfig(const QString &tag, const QString &def); /** * Load a string to string map from file saved by the @ref saveMap function. * @param filename Filename to load * @param map Reference to the map to fill with the new values. */ - void loadMap(const QString &filename, std::map<Q3CString, QString> &map); + void loadMap(const QString &filename, std::map<QString, QString> &map); /** * A map containing the available configuration settings. By convention the @@ -65,7 +64,7 @@ * @see config * @see setConfig */ - bool saveMap(const QString &file, std::map<Q3CString, QString> &pairs); + bool saveMap(const QString &file, std::map<QString, QString> &pairs); /** * Change a setting. Depending on the implementation this can change the @@ -78,12 +77,12 @@ * @param tag The name of the configuration setting. * @param def Contents of this setting. */ - void globalSetConfig(const Q3CString &tag, const QString &value); + void globalSetConfig(const QString &tag, const QString &value); /** * Remove a setting. Can be usefull for removing sensetive information. * @param tag The name of the configuration setting to remove. */ - void globalEraseConfig(const Q3CString &tag); + void globalEraseConfig(const QString &tag); /** * Get tool specific settings. @@ -95,7 +94,7 @@ * @param tag The name of the configuration setting. * @param def Contents of this setting. */ - const QString &config(const Q3CString &tag, const Q3CString &def, const Q3CString &name); + const QString &config(const QString &tag, const QString &def, const QString &name); /** * Change toolspecific setting. Depending on the implementation this can change the * contents on disk or not. @@ -107,15 +106,15 @@ * @param tag The name of the configuration setting. * @param def Default value of the setting, if it is not available. */ - void setConfig(const Q3CString &tag, const QString &value, const Q3CString name = ""); + void setConfig(const QString &tag, const QString &value, const QString name = ""); /** * Remove a toolspecific setting. Can be usefull for removing sensetive information. * @param tag The name of the configuration setting to remove. */ - void eraseConfig(const Q3CString &tag, const Q3CString& name); + void eraseConfig(const QString &tag, const QString& name); private : - std::map<Q3CString, QString> Configuration; + std::map<QString, QString> Configuration; }; typedef Loki::SingletonHolder<toConfiguration> toConfigurationSingle; Modified: branches/tora-1.4/tora/src/toconnection.cpp =================================================================== --- branches/tora-1.4/tora/src/toconnection.cpp 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/toconnection.cpp 2007-12-21 00:54:24 UTC (rev 2367) @@ -53,7 +53,7 @@ #include <q3textstream.h> #include <qwidget.h> -#include <Q3CString> +#include <QString> #include <QDateTime> #include <QPointer> @@ -64,41 +64,41 @@ // Connection provider implementation -std::map<Q3CString, toConnectionProvider *> *toConnectionProvider::Providers; -std::map<Q3CString, toConnectionProvider *> *toConnectionProvider::Types; +std::map<QString, toConnectionProvider *> *toConnectionProvider::Providers; +std::map<QString, toConnectionProvider *> *toConnectionProvider::Types; static int NumberFormat; static int NumberDecimals; void toConnectionProvider::checkAlloc(void) { if (!Providers) - Providers = new std::map<Q3CString, toConnectionProvider *>; + Providers = new std::map<QString, toConnectionProvider *>; } -void toConnectionProvider::addProvider(const Q3CString &provider) { +void toConnectionProvider::addProvider(const QString &provider) { checkAlloc(); Provider = provider; (*Providers)[Provider] = this; } -toConnectionProvider::toConnectionProvider(const Q3CString &provider, bool add +toConnectionProvider::toConnectionProvider(const QString &provider, bool add ) { Provider = provider; if (add ) addProvider(provider); if (!Types) - Types = new std::map<Q3CString, toConnectionProvider *>; + Types = new std::map<QString, toConnectionProvider *>; (*Types)[provider] = this; } -std::list<QString> toConnectionProvider::providedOptions(const Q3CString &) { +std::list<QString> toConnectionProvider::providedOptions(const QString &) { std::list<QString> ret; return ret; } -void toConnectionProvider::removeProvider(const Q3CString &provider) { - std::map<Q3CString, toConnectionProvider *>::iterator i = Providers->find(provider); +void toConnectionProvider::removeProvider(const QString &provider) { + std::map<QString, toConnectionProvider *>::iterator i = Providers->find(provider); if (i != Providers->end()) Providers->erase(i); } @@ -107,79 +107,79 @@ try { if (!Provider.isEmpty()) removeProvider(Provider); - std::map<Q3CString, toConnectionProvider *>::iterator i = Types->find(Provider); + std::map<QString, toConnectionProvider *>::iterator i = Types->find(Provider); if (i != Types->end()) Types->erase(i); } catch (...) {} } -std::list<QString> toConnectionProvider::providedHosts(const Q3CString &) { +std::list<QString> toConnectionProvider::providedHosts(const QString &) { std::list<QString> ret; return ret; } -std::list<Q3CString> toConnectionProvider::providers() { - std::list<Q3CString> ret; +std::list<QString> toConnectionProvider::providers() { + std::list<QString> ret; if (!Providers) return ret; - for (std::map<Q3CString, toConnectionProvider *>::iterator i = Providers->begin();i != Providers->end();i++) + for (std::map<QString, toConnectionProvider *>::iterator i = Providers->begin();i != Providers->end();i++) ret.insert(ret.end(), (*i).first); return ret; } void toConnectionProvider::initializeAll(void) { if (Types) - for (std::map<Q3CString, toConnectionProvider *>::iterator i = Types->begin(); + for (std::map<QString, toConnectionProvider *>::iterator i = Types->begin(); i != Types->end();i++) (*i).second->initialize(); } -toConnectionProvider &toConnectionProvider::fetchProvider(const Q3CString &provider) { +toConnectionProvider &toConnectionProvider::fetchProvider(const QString &provider) { checkAlloc(); - std::map<Q3CString, toConnectionProvider *>::iterator i = Providers->find(provider); + std::map<QString, toConnectionProvider *>::iterator i = Providers->find(provider); if (i == Providers->end()) throw QT_TRANSLATE_NOOP("toConnectionProvider", "Tried to fetch unknown provider %1").arg(QString(provider)); return *((*i).second); } -std::list<QString> toConnectionProvider::options(const Q3CString &provider) { +std::list<QString> toConnectionProvider::options(const QString &provider) { return fetchProvider(provider).providedOptions(provider); } -QWidget *toConnectionProvider::configurationTab(const Q3CString &provider, QWidget *parent) { +QWidget *toConnectionProvider::configurationTab(const QString &provider, QWidget *parent) { return fetchProvider(provider).providerConfigurationTab(provider, parent); } -toConnection::connectionImpl *toConnectionProvider::connection(const Q3CString &provider, +toConnection::connectionImpl *toConnectionProvider::connection(const QString &provider, toConnection *conn) { return fetchProvider(provider).provideConnection(provider, conn); } -std::list<QString> toConnectionProvider::hosts(const Q3CString &provider) { +std::list<QString> toConnectionProvider::hosts(const QString &provider) { return fetchProvider(provider).providedHosts(provider); } -std::list<QString> toConnectionProvider::databases(const Q3CString &provider, const QString &host, +std::list<QString> toConnectionProvider::databases(const QString &provider, const QString &host, const QString &user, const QString &pwd) { return fetchProvider(provider).providedDatabases(provider, host, user, pwd); } -const QString &toConnectionProvider::config(const Q3CString &tag, const Q3CString &def) { - Q3CString str = Provider; +const QString &toConnectionProvider::config(const QString &tag, const QString &def) { + QString str = Provider; str.append(":"); str.append(tag); return toConfigurationSingle::Instance().globalConfig(str, def); } -void toConnectionProvider::setConfig(const Q3CString &tag, const Q3CString &def) { - Q3CString str = Provider; +void toConnectionProvider::setConfig(const QString &tag, const QString &def) { + QString str = Provider; str.append(":"); str.append(tag); toConfigurationSingle::Instance().globalSetConfig(str, def); } -QWidget *toConnectionProvider::providerConfigurationTab(const Q3CString &, QWidget *) { +QWidget *toConnectionProvider::providerConfigurationTab(const QString &, QWidget *) { return NULL; } @@ -309,19 +309,19 @@ static char HexString[] = "0123456789ABCDEF"; -Q3CString toQValue::utf8(void) const { +QString toQValue::utf8(void) const { switch (Type) { case nullType: { - Q3CString ret; + QString ret; return ret; } case intType: { - Q3CString ret; + QString ret; ret.setNum(Value.Int); return ret; } case doubleType: { - Q3CString ret; + QString ret; if (Value.Double != int(Value.Double)) { ret.setNum(Value.Double); return ret; @@ -345,7 +345,7 @@ case stringType: return Value.String->utf8(); case binaryType: { - Q3CString ret(Value.Array->size()*2 + 1); + QString ret(Value.Array->size()*2 + 1); for (int i = 0;i < Value.Array->size();i++) { unsigned char c = (unsigned char)Value.Array->at(i); // ret.at(i*2) = HexString[(c / 16) % 16]; @@ -432,7 +432,7 @@ return ret; } -toQValue toQValue::createFromHex(const Q3CString &hex) { +toQValue toQValue::createFromHex(const QByteArray &hex) { QByteArray arr((hex.length() + 1) / 2); for (int i = 0;i < hex.length();i += 2) { int num; @@ -957,7 +957,7 @@ } } -toConnection::toConnection(const Q3CString &provider, +toConnection::toConnection(const QString &provider, const QString &user, const QString &password, const QString &host, const QString &database, const std::set<QString> &options, bool cache) @@ -1498,7 +1498,7 @@ } } -const Q3CString &toConnection::provider(void) const { +const QString &toConnection::provider(void) const { return Provider; } @@ -1921,7 +1921,7 @@ } void toConnection::connectionImpl::parse(toConnectionSub *, - const Q3CString &) { + const QString &) { throw qApp->translate( "toConnection", "Parse only not implemented for this type of connection"); Modified: branches/tora-1.4/tora/src/toconnection.h =================================================================== --- branches/tora-1.4/tora/src/toconnection.h 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/toconnection.h 2007-12-21 00:54:24 UTC (rev 2367) @@ -47,7 +47,7 @@ #include <set> #include <QString> -#include <Q3CString> +#include <QString> #include <QPointer> class QWidget; @@ -203,7 +203,7 @@ toConnection &Connection; toConnectionSub *ConnectionSub; std::list<toQValue> Params; - Q3CString SQL; + QString SQL; queryMode Mode; queryImpl *Query; @@ -301,7 +301,7 @@ } /** SQL to run. Observe that this string is in UTF8 format. */ - Q3CString sql(void) + QString sql(void) { return SQL; } @@ -446,12 +446,12 @@ */ class toConnection { - Q3CString Provider; + QString Provider; QString User; QString Password; QString Host; QString Database; - Q3CString Version; + QString Version; std::list<QPointer<QWidget> > Widgets; std::list<QString> InitStrings; std::set @@ -578,7 +578,7 @@ /** Get the version of the database connected to. */ - virtual Q3CString version(toConnectionSub *) = 0; + virtual QString version(toConnectionSub *) = 0; /** Return a string representation to address an object. * @param name The name to be quoted. @@ -633,13 +633,13 @@ * @param sql SQL to execute. * @param params Parameters to pass to query. */ - virtual void execute(toConnectionSub *conn, const Q3CString &sql, toQList ¶ms) = 0; + virtual void execute(toConnectionSub *conn, const QString &sql, toQList ¶ms) = 0; /** Parse a query on an actual connection and report any syntax problems encountered. * Defaults to not implemented. * @param conn Connection to execute on. * @param sql SQL to parse */ - virtual void parse(toConnectionSub *conn, const Q3CString &sql); + virtual void parse(toConnectionSub *conn, const QString &sql); }; private: @@ -688,7 +688,7 @@ * @param options Options used to connect to the database with. * @param cache Enable object cache for this connection. */ - toConnection(const Q3CString &provider, const QString &user, const QString &password, + toConnection(const QString &provider, const QString &user, const QString &password, const QString &host, const QString &database, const std::set <QString> &options, bool cache = true); @@ -743,13 +743,13 @@ } /** Get version of connection. */ - const Q3CString &version() const + const QString &version() const { return Version; } /** Get provider of connection. */ - const Q3CString &provider() const; + const QString &provider() const; /** Change the current database. Observe that this only changes the record of what is the current database. You will still need * to change the database oppinion on what database is the current one. @@ -996,28 +996,28 @@ class toConnectionProvider { - static std::map<Q3CString, toConnectionProvider *> *Providers; - static std::map<Q3CString, toConnectionProvider *> *Types; - Q3CString Provider; + static std::map<QString, toConnectionProvider *> *Providers; + static std::map<QString, toConnectionProvider *> *Types; + QString Provider; static void checkAlloc(void); /** Get the provider object for a given provider name. * @param provider Name of provider. * @return Reference to provider object. */ - static toConnectionProvider &fetchProvider(const Q3CString &provider); + static toConnectionProvider &fetchProvider(const QString &provider); protected: /** Add a provider to the list that this provider can handle. */ - void addProvider(const Q3CString &provider); + void addProvider(const QString &provider); /** Remove a provider from the list that this provider can handle. */ - void removeProvider(const Q3CString &provider); + void removeProvider(const QString &provider); public: /** Create a new provider with the specified name. * @param provider Name of the provider. */ - toConnectionProvider(const Q3CString &provider, bool add + toConnectionProvider(const QString &provider, bool add = true); /** Destructor. */ @@ -1028,19 +1028,19 @@ * @param conn The connection object to use the created connection. * @return A connection implementation created with new. */ - virtual toConnection::connectionImpl *provideConnection(const Q3CString &provider, + virtual toConnection::connectionImpl *provideConnection(const QString &provider, toConnection *conn) = 0; /** List the available hosts this database provider knows about. * @return A list of hosts. */ - virtual std::list<QString> providedHosts(const Q3CString &provider); + virtual std::list<QString> providedHosts(const QString &provider); /** List the available databases this provider knows about for a given host. * @param host Host to return connections for. * @param user That might be needed. * @param password That might be needed. * @return A list of databases available for a given host. */ - virtual std::list<QString> providedDatabases(const Q3CString &provider, + virtual std::list<QString> providedDatabases(const QString &provider, const QString &host, const QString &user, const QString &pwd) = 0; @@ -1055,7 +1055,7 @@ * options. An option preceeded by "*" means selected by default. The * shoul be stripped before * before passing it to the connection call. */ - virtual std::list<QString> providedOptions(const Q3CString &provider); + virtual std::list<QString> providedOptions(const QString &provider); /** * Create and return configuration tab for this connectiontype. The returned widget should also @@ -1064,25 +1064,25 @@ * @return A pointer to the widget containing the setup tab for this tool or NULL of * no settings are available. */ - virtual QWidget *providerConfigurationTab(const Q3CString &provider, QWidget *parent); + virtual QWidget *providerConfigurationTab(const QString &provider, QWidget *parent); /** Get a list of names for providers. */ - static QWidget *configurationTab(const Q3CString &provider, QWidget *parent); + static QWidget *configurationTab(const QString &provider, QWidget *parent); /** Get a list of names for providers. */ - static std::list<Q3CString> providers(); + static std::list<QString> providers(); /** Get a list of options for a given provider. */ - static std::list<QString> options(const Q3CString &provider); + static std::list<QString> options(const QString &provider); /** Implement a connection for a given provider. * @param provider Provider to implement. * @param conn Connection to create implementation for. */ - static toConnection::connectionImpl *connection(const Q3CString &provider, toConnection *conn); + static toConnection::connectionImpl *connection(const QString &provider, toConnection *conn); /** Get a list of hosts this provider knows about. */ - static std::list<QString> hosts(const Q3CString &provider); + static std::list<QString> hosts(const QString &provider); /** Get a list of databases for a given provider and host. * @param provider Provider to fetch databases for. * @param host Host to fetch databases for. @@ -1090,7 +1090,7 @@ * @param password That might be needed. * @return List of known databases. */ - static std::list<QString> databases(const Q3CString &provider, const QString &host, + static std::list<QString> databases(const QString &provider, const QString &host, const QString &user, const QString &pwd); /** * Get connection specific settings. @@ -1103,7 +1103,7 @@ * @param tag The name of the configuration setting. * @param def Contents of this setting. */ - const QString &config(const Q3CString &tag, const Q3CString &def); + const QString &config(const QString &tag, const QString &def); /** * Change connectionspecific setting. Depending on the implementation this can change the * contents on disk or not. @@ -1116,7 +1116,7 @@ * @param tag The name of the configuration setting. * @param def Default value of the setting, if it is not available. */ - void setConfig(const Q3CString &tag, const Q3CString &value); + void setConfig(const QString &tag, const QString &value); /** Call all initializers */ Modified: branches/tora-1.4/tora/src/todebug.cpp =================================================================== --- branches/tora-1.4/tora/src/todebug.cpp 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/todebug.cpp 2007-12-21 00:54:24 UTC (rev 2367) @@ -77,7 +77,7 @@ //Added by qt3to4: #include <QPixmap> #include <Q3ValueList> -#include <Q3CString> +#include <QString> #include <Q3PopupMenu> #include "icons/addwatch.xpm" @@ -2779,13 +2779,13 @@ } } -void toDebug::exportData(std::map<Q3CString, QString> &data, const Q3CString &prefix) +void toDebug::exportData(std::map<QString, QString> &data, const QString &prefix) { data[prefix + ":Editors"] = Editors->count(); for (int i = 0;i < Editors->count();i++) { toHighlightedText *editor = dynamic_cast<toHighlightedText *>(Editors->page(i)); - Q3CString num; + QString num; num.setNum(i); editor->exportData(data, prefix + ":Editor:" + num); } @@ -2798,7 +2798,7 @@ if (point) { - Q3CString key = prefix + ":Breaks:" + QString::number(id).latin1(); + QString key = prefix + ":Breaks:" + QString::number(id).latin1(); data[key + ":Schema"] = point->text(2); data[key + ":Object"] = point->text(0); @@ -2816,7 +2816,7 @@ toResultViewItem * item = dynamic_cast<toResultViewItem *>(qitem); if (item) { - Q3CString key = prefix + ":Watch:" + QString::number(id).latin1(); + QString key = prefix + ":Watch:" + QString::number(id).latin1(); data[key + ":Schema"] = item->allText(0); data[key + ":Object"] = item->allText(1); data[key + ":Item"] = item->allText(2); @@ -2830,7 +2830,7 @@ toToolWidget::exportData(data, prefix); } -void toDebug::importData(std::map<Q3CString, QString> &data, const Q3CString &prefix) +void toDebug::importData(std::map<QString, QString> &data, const QString &prefix) { QString str = data[prefix + ":Schema"]; { @@ -2849,18 +2849,18 @@ toDebugText *text = new toDebugText(Breakpoints, Editors, this); connect(text, SIGNAL(insertedLines(int, int)), this, SLOT(reorderContent(int, int))); - Q3CString num; + QString num; num.setNum(j); text->importData(data, prefix + ":Editor:" + num); Editors->addTab(text, editorName(text)); } int id = 1; - std::map<Q3CString, QString>::iterator i; + std::map<QString, QString>::iterator i; toBreakpointItem *debug = NULL; while ((i = data.find(prefix + ":Breaks:" + QString::number(id).latin1() + ":Line")) != data.end()) { - Q3CString key = prefix + ":Breaks:" + QString::number(id).latin1(); + QString key = prefix + ":Breaks:" + QString::number(id).latin1(); int line = (*i).second.toInt(); debug = new toBreakpointItem(Breakpoints, debug, data[key + ":Schema"], @@ -2875,7 +2875,7 @@ toResultViewItem *item = NULL; while ((i = data.find(prefix + ":Watch:" + QString::number(id).latin1() + ":Item")) != data.end()) { - Q3CString key = prefix + ":Watch:" + QString::number(id).latin1(); + QString key = prefix + ":Watch:" + QString::number(id).latin1(); item = new toResultViewItem(Watch, NULL, data[key + ":Schema"]); item->setText(1, data[key + ":Object"]); item->setText(2, data[key + ":Item"]); Modified: branches/tora-1.4/tora/src/todebug.h =================================================================== --- branches/tora-1.4/tora/src/todebug.h 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/todebug.h 2007-12-21 00:54:24 UTC (rev 2367) @@ -49,7 +49,7 @@ #include <qtimer.h> //Added by qt3to4: -#include <Q3CString> +#include <QString> #include <Q3PopupMenu> #define TO_SUCCESS 0 @@ -223,8 +223,8 @@ QString checkWatch(const QString &name); - virtual void exportData(std::map<Q3CString, QString> &data, const Q3CString &prefix); - virtual void importData(std::map<Q3CString, QString> &data, const Q3CString &prefix); + virtual void exportData(std::map<QString, QString> &data, const QString &prefix); + virtual void importData(std::map<QString, QString> &data, const QString &prefix); public slots: void stop(void); void compile(void); Modified: branches/tora-1.4/tora/src/todebugtext.cpp =================================================================== --- branches/tora-1.4/tora/src/todebugtext.cpp 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/todebugtext.cpp 2007-12-21 00:54:24 UTC (rev 2367) @@ -46,7 +46,7 @@ #include <qpainter.h> #include <qpixmap.h> //Added by qt3to4: -#include <Q3CString> +#include <QString> #include <QMouseEvent> #include "icons/breakpoint.xpm" @@ -434,7 +434,7 @@ } -void toDebugText::exportData(std::map<Q3CString, QString> &data, const Q3CString &prefix) +void toDebugText::exportData(std::map<QString, QString> &data, const QString &prefix) { toHighlightedText::exportData(data, prefix); data[prefix + ":Schema"] = Schema; @@ -442,7 +442,7 @@ data[prefix + ":Type"] = Type; } -void toDebugText::importData(std::map<Q3CString, QString> &data, const Q3CString &prefix) +void toDebugText::importData(std::map<QString, QString> &data, const QString &prefix) { toHighlightedText::importData(data, prefix); Schema = data[prefix + ":Schema"]; Modified: branches/tora-1.4/tora/src/todebugtext.h =================================================================== --- branches/tora-1.4/tora/src/todebugtext.h 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/todebugtext.h 2007-12-21 00:54:24 UTC (rev 2367) @@ -43,7 +43,7 @@ #include <q3listview.h> //Added by qt3to4: -#include <Q3CString> +#include <QString> #include <QMouseEvent> #include <algorithm> @@ -121,8 +121,8 @@ bool readErrors(toConnection &connection); bool compile(void); - virtual void exportData(std::map<Q3CString, QString> &data, const Q3CString &prefix); - virtual void importData(std::map<Q3CString, QString> &data, const Q3CString &prefix); + virtual void exportData(std::map<QString, QString> &data, const QString &prefix); + virtual void importData(std::map<QString, QString> &data, const QString &prefix); protected slots: virtual void toggleBreakpoint(int margin, int line, Qt::ButtonState state); protected: Modified: branches/tora-1.4/tora/src/toextract.cpp =================================================================== --- branches/tora-1.4/tora/src/toextract.cpp 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/toextract.cpp 2007-12-21 00:54:24 UTC (rev 2367) @@ -48,7 +48,7 @@ #include <q3progressdialog.h> #include <qdatetime.h> //Added by qt3to4: -#include <Q3CString> +#include <QString> #ifdef Q_OS_WIN32 #include <winsock2.h> #endif @@ -188,12 +188,12 @@ BlockSize = 8192; } -void toExtract::setState(const Q3CString &name, const QVariant &val) +void toExtract::setState(const QString &name, const QVariant &val) { Context[name] = val; } -QVariant toExtract::state(const Q3CString &name) +QVariant toExtract::state(const QString &name) { return Context[name]; } Modified: branches/tora-1.4/tora/src/toextract.h =================================================================== --- branches/tora-1.4/tora/src/toextract.h 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/toextract.h 2007-12-21 00:54:24 UTC (rev 2367) @@ -48,7 +48,7 @@ #include <q3textstream.h> #include <qvariant.h> //Added by qt3to4: -#include <Q3CString> +#include <QString> class QWidget; class toConnection; @@ -270,7 +270,7 @@ std::list<QString> Limit; // Context, can be used by the extractor to save context - std::map<Q3CString, QVariant> Context; + std::map<QString, QVariant> Context; // Stuff to handle extractors static std::map<QString, extractor *> *Extractors; @@ -421,12 +421,12 @@ * @param name Name of this context * @param val Value of this context */ - void setState(const Q3CString &name, const QVariant &val); + void setState(const QString &name, const QVariant &val); /** Get the value of a context for the current extractor. * @param name Name of the context to extract. * @return The value of the context. */ - QVariant state(const Q3CString &name); + QVariant state(const QString &name); /** Set the schema of the extraction. * @param schema Specify the schema of the output script or description. If empty Modified: branches/tora-1.4/tora/src/tofyracleconnection.cpp =================================================================== --- branches/tora-1.4/tora/src/tofyracleconnection.cpp 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/tofyracleconnection.cpp 2007-12-21 00:54:24 UTC (rev 2367) @@ -35,7 +35,7 @@ #include <qfile.h> #include <qregexp.h> //Added by qt3to4: -#include <Q3CString> +#include <QString> #ifdef Q_OS_WIN32 #include <winsock.h> @@ -477,7 +477,7 @@ return new fyracleQuery(query, sub); } - virtual void execute(toConnectionSub *sub, const Q3CString &sql, toQList ¶ms) + virtual void execute(toConnectionSub *sub, const QString &sql, toQList ¶ms) { } }; @@ -545,7 +545,7 @@ dpb[i] = *pwd++; // combine host and database path - Q3CString path; + QString path; if ( connection().host().isEmpty() ) { path = connection().database().utf8(); Modified: branches/tora-1.4/tora/src/toglobalsetting.cpp =================================================================== --- branches/tora-1.4/tora/src/toglobalsetting.cpp 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/toglobalsetting.cpp 2007-12-21 00:54:24 UTC (rev 2367) @@ -64,7 +64,7 @@ #include <q3whatsthis.h> #include <qcolordialog.h> //Added by qt3to4: -#include <Q3CString> +#include <QString> #include <QFileDialog> @@ -354,11 +354,11 @@ { setupUi(this); - std::map<Q3CString, toTool *> &tools = toTool::tools(); + std::map<QString, toTool *> &tools = toTool::tools(); QString first; Enabled->setSorting(0); - for (std::map<Q3CString, toTool *>::iterator i = tools.begin();i != tools.end();i++) + for (std::map<QString, toTool *>::iterator i = tools.begin();i != tools.end();i++) { if ((*i).second->menuItem()) { @@ -372,7 +372,7 @@ for (Q3ListViewItem *item = Enabled->firstChild();item;item = item->nextSibling()) { - Q3CString tmp = item->text(2).latin1(); + QString tmp = item->text(2).latin1(); tmp += CONF_TOOL_ENABLE; if (!toConfigurationSingle::Instance().globalConfig(tmp, "Yes").isEmpty()) item->setSelected(true); @@ -406,7 +406,7 @@ { for (Q3ListViewItem *item = Enabled->firstChild();item;item = item->nextSibling()) { - Q3CString str = item->text(2).latin1(); + QString str = item->text(2).latin1(); str += CONF_TOOL_ENABLE; toConfigurationSingle::Instance().globalSetConfig(str, item->isSelected() ? "Yes" : ""); Modified: branches/tora-1.4/tora/src/tohelp.cpp =================================================================== --- branches/tora-1.4/tora/src/tohelp.cpp 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/tohelp.cpp 2007-12-21 00:54:24 UTC (rev 2367) @@ -66,7 +66,7 @@ #include <qtooltip.h> #include <q3vbox.h> //Added by qt3to4: -#include <Q3CString> +#include <QString> #include <Q3VBoxLayout> #include <QToolBar> @@ -283,7 +283,7 @@ toHtml file(toReadFile(filename)); bool inA = false; QString dsc; - Q3CString href; + QString href; QTreeWidgetItem * last = NULL; while (!file.eof()) { @@ -474,8 +474,8 @@ std::list<QString> Context; bool inDsc = false; bool aRestart = true; - Q3CString dsc; - Q3CString href; + QString dsc; + QString href; while (!file.eof()) { file.nextToken(); @@ -523,7 +523,7 @@ bool incl = true; { - for (size_t i = 0;i < words.count();i++) + for (int i = 0;i < words.count();i++) if (!tmp.contains(words[i], false)) { incl = false; Modified: branches/tora-1.4/tora/src/tohighlightedtext.h =================================================================== --- branches/tora-1.4/tora/src/tohighlightedtext.h 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/tohighlightedtext.h 2007-12-21 00:54:24 UTC (rev 2367) @@ -45,7 +45,7 @@ #include <Qsci/qscilexer.h> #include <Qsci/qsciapis.h> //Added by qt3to4: -#include <Q3CString> +#include <QString> #include <QKeyEvent> #include <list> @@ -127,12 +127,12 @@ * @param typ @ref infoType to get string for. * @return Description of infotype. */ - static Q3CString typeString(infoType typ); + static QString typeString(infoType typ); /** Get an @ref infoType from a string representation of it. * @param str Description of @ref infoType. * @return @ref infoType described by string. */ - static infoType typeString(const Q3CString &str); + static infoType typeString(const QString &str); /** Update configuration settings from this class color values. */ void updateSettings(void); Modified: branches/tora-1.4/tora/src/tohtml.cpp =================================================================== --- branches/tora-1.4/tora/src/tohtml.cpp 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/tohtml.cpp 2007-12-21 00:54:24 UTC (rev 2367) @@ -47,9 +47,9 @@ #include <qapplication.h> #include <qregexp.h> //Added by qt3to4: -#include <Q3CString> +#include <QString> -toHtml::toHtml(const Q3CString &data) +toHtml::toHtml(const QString &data) { Length = strlen(data); Data = new char[Length + 1]; @@ -213,7 +213,7 @@ } } -const char *toHtml::value(const Q3CString &q) +const char *toHtml::value(const QString &q) { for (int i = 0;i < QualifierNum;i++) { @@ -223,9 +223,9 @@ return NULL; } -Q3CString toHtml::text() +QString toHtml::text() { - Q3CString ret; + QString ret; for (const char *cur = Text;*cur;cur++) { char c = *cur; @@ -234,7 +234,7 @@ const char *start = cur + 1; while (*cur && *cur != ';') cur++; - Q3CString tmp(start, cur - start); + QString tmp(QByteArray(start, cur - start)); if (tmp[0] == '#') { tmp = tmp.right(tmp.length() - 1); @@ -269,9 +269,9 @@ return Data + start; } -bool toHtml::search(const Q3CString &all, const QString &str) +bool toHtml::search(const QString &all, const QString &str) { - Q3CString data(str.lower().latin1()); + QString data(str.lower().latin1()); enum { beginning, @@ -280,10 +280,10 @@ inWord } lastState = beginning, state = beginning; int pos = 0; - char endString = 0; + QChar endString = 0; for (int i = 0;i < all.length();i++) { - char c = tolower(all.at(i)); + QChar c = all.at(i).toLower(); if (c == '\'' || c == '\"') { endString = c; @@ -312,7 +312,7 @@ pos++; if (pos >= data.length()) { - if (i + 1 >= all.length() || !isalnum(all.at(i + 1))) + if (i + 1 >= all.length() || !all.at(i + 1).isLetterOrNumber()) return true; pos = 0; } @@ -320,7 +320,7 @@ } // Intentionally no break here case inWord: - if (!isalnum(c)) + if(!c.isLetterOrNumber()) state = beginning; break; case inTag: Modified: branches/tora-1.4/tora/src/tohtml.h =================================================================== --- branches/tora-1.4/tora/src/tohtml.h 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/tohtml.h 2007-12-21 00:54:24 UTC (rev 2367) @@ -43,7 +43,6 @@ #include <map> #include <qstring.h> -#include <q3cstring.h> #define TO_HTML_MAX_QUAL 100 @@ -126,7 +125,7 @@ /** Create a HTML parser. * @param data Data to parse. */ - toHtml(const Q3CString &data); + toHtml(const QString &data); ~toHtml(); /** Read the next token which can be either a open tag, close tag or text. @@ -142,7 +141,7 @@ * @param name Name of qualifier in lowercase. * @return Value of qualifier or NULL. */ - const char *value(const Q3CString &name); + const char *value(const QString &name); /** Return true if current token is a tag. * @return True if tag. */ @@ -163,7 +162,7 @@ * @return The parsed text. */ - Q3CString text(void); + QString text(void); /** Get name of tag in lowercase. Only valid if @ref isTag returns true. * @return Name of tag (Excluding / if close tag). @@ -182,7 +181,7 @@ * @param data Data to search. * @param str Substring to search for in data. */ - static bool search(const Q3CString &data, const QString &str); + static bool search(const QString &data, const QString &str); /** Escape text to be HTML. */ Modified: branches/tora-1.4/tora/src/tolinechart.cpp =================================================================== --- branches/tora-1.4/tora/src/tolinechart.cpp 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/tolinechart.cpp 2007-12-21 00:54:24 UTC (rev 2367) @@ -58,7 +58,7 @@ #include <qvalidator.h> #include <qworkspace.h> //Added by qt3to4: -#include <Q3CString> +#include <QString> #include <QPixmap> #include <QMouseEvent> #include <QPaintEvent> @@ -893,7 +893,7 @@ toMainWidget()->addChart(this); } -void toLineChart::exportData(std::map<Q3CString, QString> &ret, const Q3CString &prefix) +void toLineChart::exportData(std::map<QString, QString> &ret, const QString &prefix) { int id = 0; { @@ -928,10 +928,10 @@ ret[prefix + ":Title"] = Title; } -void toLineChart::importData(std::map<Q3CString, QString> &ret, const Q3CString &prefix) +void toLineChart::importData(std::map<QString, QString> &ret, const QString &prefix) { int id; - std::map<Q3CString, QString>::iterator i; + std::map<QString, QString>::iterator i; id = 1; Labels.clear(); Modified: branches/tora-1.4/tora/src/tolinechart.h =================================================================== --- branches/tora-1.4/tora/src/tolinechart.h 2007-12-20 22:44:51 UTC (rev 2366) +++ branches/tora-1.4/tora/src/tolinechart.h 2007-12-21 00:54:24 UTC (rev 2367) @@ -46,7 +46,7 @@ #include <qwidget.h> //Added by qt3to4: -#include <Q3CString> +#include <QString> #include <QPaintEvent> #include <QMouseEvent> #include <Q3PopupMenu> @@ -316,12 +316,12 @@ * @param data A map that can be used to recreate the data of a chart. * @param prefix Prefix to add to the map. */ - virtual void exportData(std::map<Q3CString, QString> &data, const Q3CString &prefix); + virtual void exportData(std::map<QString, QString> &data, const QString &prefix); /** Import data * @param data Data to read from a map. * @param prefix Prefix to read data from. */ - virtual void importData(std::map<Q3CString, QString> &data, const Q3CString &prefix); + virtual void importData(std::map<QString, QString> &data, const QString &prefix); /** Get enabled datavalues. Values in this list with false are not drawn in the chart. * Could be an empty list if everything is enabled. Modified: branches/tora-1.4/tora/src/tolist... [truncated message content] |