diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | b6edfe41c9395f2e20784cbf0e630af6426950a3 (patch) | |
tree | 56ed9b871d4296e6c15949c24e16420be1b28697 /kexi/plugins/importexport | |
parent | ef39e8e4178a8f98cf5f154916ba0f03e4855206 (diff) | |
download | koffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.tar.gz koffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/plugins/importexport')
4 files changed, 14 insertions, 14 deletions
diff --git a/kexi/plugins/importexport/csv/kexicsv_importexportpart.cpp b/kexi/plugins/importexport/csv/kexicsv_importexportpart.cpp index 4112bf52..7037b29a 100644 --- a/kexi/plugins/importexport/csv/kexicsv_importexportpart.cpp +++ b/kexi/plugins/importexport/csv/kexicsv_importexportpart.cpp @@ -76,7 +76,7 @@ bool KexiCSVImportExportPart::executeCommand(KexiMainWindow* mainWin, const char KexiDB::TableOrQuerySchema tableOrQuery( mainWin->project()->dbConnection(), options.itemId); TQTextStream *stream = 0; - if (args->tqcontains("textStream")) + if (args->contains("textStream")) stream = KexiUtils::stringToPtr<TQTextStream>( (*args)["textStream"] ); return KexiCSVExport::exportData(tableOrQuery, options, -1, stream); } diff --git a/kexi/plugins/importexport/csv/kexicsvexport.cpp b/kexi/plugins/importexport/csv/kexicsvexport.cpp index 5af3d8ed..f3347676 100644 --- a/kexi/plugins/importexport/csv/kexicsvexport.cpp +++ b/kexi/plugins/importexport/csv/kexicsvexport.cpp @@ -55,12 +55,12 @@ bool Options::assign( TQMap<TQString,TQString>& args ) mode = (args["destinationType"]=="file") ? KexiCSVExport::File : KexiCSVExport::Clipboard; - if (args.tqcontains("delimiter")) + if (args.contains("delimiter")) delimiter = args["delimiter"]; else delimiter = (mode==File) ? KEXICSV_DEFAULT_FILE_DELIMITER : KEXICSV_DEFAULT_CLIPBOARD_DELIMITER; - if (args.tqcontains("textQuote")) + if (args.contains("textQuote")) textQuote = args["textQuote"]; else textQuote = (mode==File) ? KEXICSV_DEFAULT_FILE_TEXT_TQUOTE : KEXICSV_DEFAULT_CLIPBOARD_TEXT_TQUOTE; @@ -69,9 +69,9 @@ bool Options::assign( TQMap<TQString,TQString>& args ) itemId = args["itemId"].toInt(&ok); if (!ok || itemId<=0) return false; - if (args.tqcontains("forceDelimiter")) + if (args.contains("forceDelimiter")) forceDelimiter = args["forceDelimiter"]; - if (args.tqcontains("addColumnNames")) + if (args.contains("addColumnNames")) addColumnNames = (args["addColumnNames"]=="1"); return true; } @@ -193,7 +193,7 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery, if (i>0) APPEND( delimiter ); if (hasTextQuote){ - APPEND( textQuote + fields[i]->captionOrAliasOrName().tqreplace(textQuote, escapedTextQuote) + textQuote ); + APPEND( textQuote + fields[i]->captionOrAliasOrName().replace(textQuote, escapedTextQuote) + textQuote ); } else { APPEND( fields[i]->captionOrAliasOrName() ); @@ -218,7 +218,7 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery, continue; if (isText[real_i]) { if (hasTextQuote) - APPEND( textQuote + TQString(cursor->value(real_i).toString()).tqreplace(textQuote, escapedTextQuote) + textQuote ); + APPEND( textQuote + TQString(cursor->value(real_i).toString()).replace(textQuote, escapedTextQuote) + textQuote ); else APPEND( cursor->value(real_i).toString() ); } diff --git a/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp b/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp index 931eab73..956681b1 100644 --- a/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp +++ b/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp @@ -378,9 +378,9 @@ static TQString convertKey(const char *key, KexiCSVExport::Mode mode) { TQString _key(TQString::tqfromLatin1(key)); if (mode == KexiCSVExport::Clipboard) { - _key.tqreplace("Exporting", "Copying"); - _key.tqreplace("Export", "Copy"); - _key.tqreplace("CSVFiles", "CSVToClipboard"); + _key.replace("Exporting", "Copying"); + _key.replace("Export", "Copy"); + _key.replace("CSVFiles", "CSVToClipboard"); } return _key; } diff --git a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp index 3060db2a..01601230 100644 --- a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp +++ b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp @@ -1104,7 +1104,7 @@ void KexiCSVImportDialog::setText(int row, int col, const TQString& text, bool i //! @todo what about time and float/double types and different integer subtypes? } else if (detectedType==_FP_NUMBER_TYPE) { - //tqreplace ',' with '.' + //replace ',' with '.' TQCString t(text.latin1()); const int textLen = t.length(); for (int i=0; i<textLen; i++) { @@ -1348,7 +1348,7 @@ void KexiCSVImportDialog::accept() suggestedName = KURL::fromPathOrURL(m_fname).fileName(); //remove extension if (!suggestedName.isEmpty()) { - const int idx = suggestedName.tqfindRev("."); + const int idx = suggestedName.findRev("."); if (idx!=-1) suggestedName = suggestedName.mid(0, idx ).simplifyWhiteSpace(); } @@ -1414,9 +1414,9 @@ void KexiCSVImportDialog::accept() for (uint col = 0; col < numCols; col++) colnames.append( m_table->text(0, col).lower().simplifyWhiteSpace() ); - if (colnames.tqfind(fieldName)!=colnames.end()) { + if (colnames.find(fieldName)!=colnames.end()) { int num = 1; - while (colnames.tqfind(fieldName+TQString::number(num))!=colnames.end()) + while (colnames.find(fieldName+TQString::number(num))!=colnames.end()) num++; fieldName += TQString::number(num); fieldCaption += TQString::number(num); |