summaryrefslogtreecommitdiffstats
path: root/kfilereplace/kfilereplacepart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kfilereplace/kfilereplacepart.cpp')
-rw-r--r--kfilereplace/kfilereplacepart.cpp146
1 files changed, 73 insertions, 73 deletions
diff --git a/kfilereplace/kfilereplacepart.cpp b/kfilereplace/kfilereplacepart.cpp
index 3955e643..25f6c7ca 100644
--- a/kfilereplace/kfilereplacepart.cpp
+++ b/kfilereplace/kfilereplacepart.cpp
@@ -60,11 +60,11 @@ typedef KParts::GenericFactory<KFileReplacePart> FileReplaceFactory;
K_EXPORT_COMPONENT_FACTORY( libkfilereplacepart, FileReplaceFactory )
-KFileReplacePart::KFileReplacePart(TQWidget* parentWidget, const char* , TQObject* parent, const char* name, const TQStringList & ) : KParts::ReadOnlyPart(parent,name)
+KFileReplacePart::KFileReplacePart(TQWidget* tqparentWidget, const char* , TQObject* tqparent, const char* name, const TQStringList & ) : KParts::ReadOnlyPart(tqparent,name)
{
setInstance(FileReplaceFactory::instance());
KGlobal::locale()->insertCatalogue("kfilereplace");
- m_parentWidget = parentWidget;
+ m_parentWidget = tqparentWidget;
m_config = new KConfig("kfilereplacerc");
m_aboutDlg = 0;
m_stop = false;
@@ -114,7 +114,7 @@ void KFileReplacePart::slotSearchingOperation()
rv->setSorting(-1);
// show wait cursor
- TQApplication::setOverrideCursor( Qt::waitCursor );
+ TQApplication::setOverrideCursor( TQt::waitCursor );
freezeActions();
@@ -161,7 +161,7 @@ void KFileReplacePart::slotSearchingOperation()
void KFileReplacePart::slotReplacingOperation()
{
- if (KMessageBox::warningContinueCancel(m_w, i18n("<qt>You have selected <b>%1</b> as the encoding of the files.<br>Selecting the correct encoding is very important as if you have files that have some other encoding than the selected one, after a replace you may damage those files.<br><br>In case you do not know the encoding of your files, select <i>utf8</i> and <b>enable</b> the creation of backup files. This setting will autodetect <i>utf8</i> and <i>utf16</i> files, but the changed files will be converted to <i>utf8</i>.</qt>").arg(m_option->m_encoding), i18n("File Encoding Warning"), KStdGuiItem::cont(), "ShowEncodingWarning") == KMessageBox::Cancel)
+ if (KMessageBox::warningContinueCancel(m_w, i18n("<qt>You have selected <b>%1</b> as the encoding of the files.<br>Selecting the correct encoding is very important as if you have files that have some other encoding than the selected one, after a replace you may damage those files.<br><br>In case you do not know the encoding of your files, select <i>utf8</i> and <b>enable</b> the creation of backup files. This setting will autodetect <i>utf8</i> and <i>utf16</i> files, but the changed files will be converted to <i>utf8</i>.</qt>").tqarg(m_option->m_encoding), i18n("File Encoding Warning"), KStdGuiItem::cont(), "ShowEncodingWarning") == KMessageBox::Cancel)
return;
if(!checkBeforeOperation())
return;
@@ -179,7 +179,7 @@ void KFileReplacePart::slotReplacingOperation()
rv->setColumnText(4,i18n("Replaced strings"));
}
// show wait cursor
- TQApplication::setOverrideCursor( Qt::waitCursor );
+ TQApplication::setOverrideCursor( TQt::waitCursor );
freezeActions();
@@ -248,7 +248,7 @@ void KFileReplacePart::slotCreateReport()
return ;
}
// Select the file where results will be saved
- TQString documentName = KFileDialog::getSaveFileName(TQString::null, "*.xml|XML " + i18n("Files") + " (*.xml)", m_w, i18n("Save Report"));
+ TQString documentName = KFileDialog::getSaveFileName(TQString(), "*.xml|XML " + i18n("Files") + " (*.xml)", m_w, i18n("Save Report"));
if (documentName.isEmpty())
return ;
@@ -258,7 +258,7 @@ void KFileReplacePart::slotCreateReport()
TQFileInfo fileInfo(documentName);
if(fileInfo.exists())
{
- KMessageBox::error(m_w, i18n("<qt>A folder or a file named <b>%1</b> already exists.</qt>").arg(documentName));
+ KMessageBox::error(m_w, i18n("<qt>A folder or a file named <b>%1</b> already exists.</qt>").tqarg(documentName));
return ;
}
@@ -266,7 +266,7 @@ void KFileReplacePart::slotCreateReport()
if(!directoryName.mkdir(documentName, true))
{
- KMessageBox::error(m_w, i18n("<qt>Cannot create the <b>%1</b> folder.</qt>").arg(documentName));
+ KMessageBox::error(m_w, i18n("<qt>Cannot create the <b>%1</b> folder.</qt>").tqarg(documentName));
return ;
}
@@ -345,7 +345,7 @@ void KFileReplacePart::slotStringsLoad()
{
// Selects the file to load from
TQString menu = "*.kfr|" + i18n("KFileReplace strings") + " (*.kfr)\n*|"+i18n("All Files") + " (*)";
- TQString fileName = KFileDialog::getOpenFileName(TQString::null, menu, m_w, i18n("Load Strings From File"));
+ TQString fileName = KFileDialog::getOpenFileName(TQString(), menu, m_w, i18n("Load Strings From File"));
if(!fileName.isEmpty())
loadRulesFile(fileName);
@@ -443,7 +443,7 @@ void KFileReplacePart::showAboutApplication()
void KFileReplacePart::appHelpActivated()
{
- kapp->invokeHelp(TQString::null, "kfilereplace");
+ kapp->invokeHelp(TQString(), "kfilereplace");
}
void KFileReplacePart::reportBug()
@@ -464,7 +464,7 @@ void KFileReplacePart::resetActions()
actionCollection()->action("new_project")->setEnabled(true);
actionCollection()->action("search")->setEnabled(hasItems && searchOnlyMode);
actionCollection()->action("file_simulate")->setEnabled(hasItems && !searchOnlyMode);
- actionCollection()->action("replace")->setEnabled(hasItems && !searchOnlyMode);
+ actionCollection()->action("tqreplace")->setEnabled(hasItems && !searchOnlyMode);
actionCollection()->action("save_results")->setEnabled(hasItems);
actionCollection()->action("stop")->setEnabled(false);
@@ -567,48 +567,48 @@ void KFileReplacePart::initGUI()
}
}
// File
- (void)new KAction(i18n("Customize Search/Replace Session..."), "projectopen", 0, this, TQT_SLOT(slotSetNewParameters()), actionCollection(), "new_project");
- (void)new KAction(i18n("&Search"), "filesearch", 0, this, TQT_SLOT(slotSearchingOperation()), actionCollection(), "search");
- (void)new KAction(i18n("S&imulate"), "filesimulate", 0, this, TQT_SLOT(slotSimulatingOperation()), actionCollection(), "file_simulate");
- (void)new KAction(i18n("&Replace"), "filereplace", 0, this, TQT_SLOT(slotReplacingOperation()), actionCollection(), "replace");
- (void)new KAction(i18n("Sto&p"), "stop", 0, this, TQT_SLOT(slotStop()), actionCollection(), "stop");
- (void)new KAction(i18n("Cre&ate Report File..."), "filesaveas", 0, this, TQT_SLOT(slotCreateReport()), actionCollection(), "save_results");
+ (void)new KAction(i18n("Customize Search/Replace Session..."), "projectopen", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetNewParameters()), actionCollection(), "new_project");
+ (void)new KAction(i18n("&Search"), "filesearch", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSearchingOperation()), actionCollection(), "search");
+ (void)new KAction(i18n("S&imulate"), "filesimulate", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSimulatingOperation()), actionCollection(), "file_simulate");
+ (void)new KAction(i18n("&Replace"), "filereplace", 0, TQT_TQOBJECT(this), TQT_SLOT(slotReplacingOperation()), actionCollection(), "tqreplace");
+ (void)new KAction(i18n("Sto&p"), "stop", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStop()), actionCollection(), "stop");
+ (void)new KAction(i18n("Cre&ate Report File..."), "filesaveas", 0, TQT_TQOBJECT(this), TQT_SLOT(slotCreateReport()), actionCollection(), "save_results");
// Strings
- (void)new KAction(i18n("&Add String..."), "editadd", 0, this, TQT_SLOT(slotStringsAdd()), actionCollection(), "strings_add");
+ (void)new KAction(i18n("&Add String..."), "editadd", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsAdd()), actionCollection(), "strings_add");
- (void)new KAction(i18n("&Delete String"), "editremove", 0, this, TQT_SLOT(slotStringsDeleteItem()), actionCollection(), "strings_del");
- (void)new KAction(i18n("&Empty Strings List"), "editdelete", 0, this, TQT_SLOT(slotStringsEmpty()), actionCollection(), "strings_empty");
- (void)new KAction(i18n("Edit Selected String..."), "edit", 0, this, TQT_SLOT(slotStringsEdit()), actionCollection(), "strings_edit");
- (void)new KAction(i18n("&Save Strings List to File..."), "filesaveas", 0, this, TQT_SLOT(slotStringsSave()), actionCollection(), "strings_save");
- (void)new KAction(i18n("&Load Strings List From File..."), "unsortedList", 0, this, TQT_SLOT(slotStringsLoad()), actionCollection(), "strings_load");
- (void)new KRecentFilesAction(i18n("&Load Recent Strings Files"), "fileopen", 0, this, TQT_SLOT(slotOpenRecentStringFile(const KURL&)), actionCollection(),"strings_load_recent");
- (void)new KAction(i18n("&Invert Current String (search <--> replace)"), "invert", 0, this, TQT_SLOT(slotStringsInvertCur()), actionCollection(), "strings_invert");
- (void)new KAction(i18n("&Invert All Strings (search <--> replace)"), "invert", 0, this, TQT_SLOT(slotStringsInvertAll()), actionCollection(), "strings_invert_all");
+ (void)new KAction(i18n("&Delete String"), "editremove", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsDeleteItem()), actionCollection(), "strings_del");
+ (void)new KAction(i18n("&Empty Strings List"), "editdelete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsEmpty()), actionCollection(), "strings_empty");
+ (void)new KAction(i18n("Edit Selected String..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsEdit()), actionCollection(), "strings_edit");
+ (void)new KAction(i18n("&Save Strings List to File..."), "filesaveas", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsSave()), actionCollection(), "strings_save");
+ (void)new KAction(i18n("&Load Strings List From File..."), "unsortedList", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsLoad()), actionCollection(), "strings_load");
+ (void)new KRecentFilesAction(i18n("&Load Recent Strings Files"), "fileopen", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenRecentStringFile(const KURL&)), actionCollection(),"strings_load_recent");
+ (void)new KAction(i18n("&Invert Current String (search <--> tqreplace)"), "invert", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsInvertCur()), actionCollection(), "strings_invert");
+ (void)new KAction(i18n("&Invert All Strings (search <--> tqreplace)"), "invert", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsInvertAll()), actionCollection(), "strings_invert_all");
// Options
- (void)new KToggleAction(i18n("&Include Sub-Folders"), "recursive_option", 0, this, TQT_SLOT(slotOptionRecursive()), actionCollection(), "options_recursive");
- (void)new KToggleAction(i18n("Create &Backup Files"), "backup_option", 0, this, TQT_SLOT(slotOptionBackup()), actionCollection(), "options_backup");
- (void)new KToggleAction(i18n("Case &Sensitive"), "casesensitive_option", 0, this, TQT_SLOT(slotOptionCaseSensitive()), actionCollection(), "options_case");
- (void)new KToggleAction(i18n("Enable Commands &in Replace String: [$command:option$]"), "command_option", 0, this, TQT_SLOT(slotOptionVariables()), actionCollection(), "options_var");
- (void)new KToggleAction(i18n("Enable &Regular Expressions"), "regularexpression_option", 0, this, TQT_SLOT(slotOptionRegularExpressions()), actionCollection(), "options_regularexpressions");
- (void)new KAction(i18n("Configure &KFileReplace..."), "configure", 0, this, TQT_SLOT(slotOptionPreferences()), actionCollection(), "configure_kfilereplace");
+ (void)new KToggleAction(i18n("&Include Sub-Folders"), "recursive_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionRecursive()), actionCollection(), "options_recursive");
+ (void)new KToggleAction(i18n("Create &Backup Files"), "backup_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionBackup()), actionCollection(), "options_backup");
+ (void)new KToggleAction(i18n("Case &Sensitive"), "casesensitive_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionCaseSensitive()), actionCollection(), "options_case");
+ (void)new KToggleAction(i18n("Enable Commands &in Replace String: [$command:option$]"), "command_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionVariables()), actionCollection(), "options_var");
+ (void)new KToggleAction(i18n("Enable &Regular Expressions"), "regularexpression_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionRegularExpressions()), actionCollection(), "options_regularexpressions");
+ (void)new KAction(i18n("Configure &KFileReplace..."), "configure", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionPreferences()), actionCollection(), "configure_kfilereplace");
// Results
- (void)new KAction(i18n("&Properties"), "informations", 0, m_view, TQT_SLOT(slotResultProperties()), actionCollection(), "results_infos");
- (void)new KAction(i18n("&Open"), "filenew", 0, m_view, TQT_SLOT(slotResultOpen()), actionCollection(), "results_openfile");
+ (void)new KAction(i18n("&Properties"), "informations", 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultProperties()), actionCollection(), "results_infos");
+ (void)new KAction(i18n("&Open"), "filenew", 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultOpen()), actionCollection(), "results_openfile");
if(quantaFound)
{
- (void)new KAction(i18n("&Edit in Quanta"), "quanta", 0, m_view, TQT_SLOT(slotResultEdit()), actionCollection(), "results_editfile");
+ (void)new KAction(i18n("&Edit in Quanta"), "quanta", 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultEdit()), actionCollection(), "results_editfile");
}
- (void)new KAction(i18n("Open Parent &Folder"), "fileopen", 0, m_view, TQT_SLOT(slotResultDirOpen()), actionCollection(), "results_opendir");
- (void)new KAction(i18n("&Delete"), "editdelete", 0, m_view, TQT_SLOT(slotResultDelete()), actionCollection(), "results_delete");
- (void)new KAction(i18n("E&xpand Tree"), 0, m_view, TQT_SLOT(slotResultTreeExpand()), actionCollection(), "results_treeexpand");
- (void)new KAction(i18n("&Reduce Tree"), 0, m_view, TQT_SLOT(slotResultTreeReduce()), actionCollection(), "results_treereduce");
- (void)new KAction(i18n("&About KFileReplace"), "kfilereplace", 0, this, TQT_SLOT(showAboutApplication()), actionCollection(), "help_about_kfilereplace");
- (void)new KAction(i18n("KFileReplace &Handbook"), "help", 0, this, TQT_SLOT(appHelpActivated()), actionCollection(), "help_kfilereplace");
- (void)new KAction(i18n("&Report Bug"), 0, 0, this, TQT_SLOT(reportBug()), actionCollection(), "report_bug");
+ (void)new KAction(i18n("Open Parent &Folder"), "fileopen", 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultDirOpen()), actionCollection(), "results_opendir");
+ (void)new KAction(i18n("&Delete"), "editdelete", 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultDelete()), actionCollection(), "results_delete");
+ (void)new KAction(i18n("E&xpand Tree"), 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultTreeExpand()), actionCollection(), "results_treeexpand");
+ (void)new KAction(i18n("&Reduce Tree"), 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultTreeReduce()), actionCollection(), "results_treereduce");
+ (void)new KAction(i18n("&About KFileReplace"), "kfilereplace", 0, TQT_TQOBJECT(this), TQT_SLOT(showAboutApplication()), actionCollection(), "help_about_kfilereplace");
+ (void)new KAction(i18n("KFileReplace &Handbook"), "help", 0, TQT_TQOBJECT(this), TQT_SLOT(appHelpActivated()), actionCollection(), "help_kfilereplace");
+ (void)new KAction(i18n("&Report Bug"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(reportBug()), actionCollection(), "report_bug");
}
@@ -630,7 +630,7 @@ void KFileReplacePart::freezeActions()
actionCollection()->action("stop")->setEnabled(true);
actionCollection()->action("file_simulate")->setEnabled(false);
- actionCollection()->action("replace")->setEnabled(false);
+ actionCollection()->action("tqreplace")->setEnabled(false);
actionCollection()->action("search")->setEnabled(false);
actionCollection()->action("strings_add")->setEnabled(false);
actionCollection()->action("strings_del")->setEnabled(false);
@@ -1022,7 +1022,7 @@ void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQStri
TQFile currentFile(oldPathString);
if(!currentFile.open(IO_ReadOnly))
{
- KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(oldFileName),TQString::null, rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").tqarg(oldFileName),TQString(), rcNotifyOnErrors);
return ;
}
TQTextStream currentStream(&currentFile);
@@ -1061,7 +1061,7 @@ void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQStri
TQFile newFile(oldPathString);
if(!newFile.open(IO_WriteOnly))
{
- KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for writing.</qt>").arg(oldFileName),TQString::null, rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for writing.</qt>").tqarg(oldFileName),TQString(), rcNotifyOnErrors);
return ;
}
TQTextStream newStream(&newFile);
@@ -1097,8 +1097,8 @@ void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQStri
}
item->setText(4,TQString::number(occurrence,10));
- item->setText(5,TQString("%1[%2]").arg(oldFileInfo.owner()).arg(oldFileInfo.ownerId()));
- item->setText(6,TQString("%1[%2]").arg(oldFileInfo.group()).arg(oldFileInfo.groupId()));
+ item->setText(5,TQString("%1[%2]").tqarg(oldFileInfo.owner()).tqarg(oldFileInfo.ownerId()));
+ item->setText(6,TQString("%1[%2]").tqarg(oldFileInfo.group()).tqarg(oldFileInfo.groupId()));
}
}
@@ -1110,7 +1110,7 @@ void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQS
if (!oldFile.open(IO_ReadOnly))
{
- KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(oldFile.name()),TQString::null, rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").tqarg(oldFile.name()),TQString(), rcNotifyOnErrors);
return ;
}
@@ -1139,7 +1139,7 @@ void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQS
TQFile newFile(oldPathString);
if(!newFile.open(IO_WriteOnly))
{
- KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for writing.</qt>").arg(newFile.name()),TQString::null, rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for writing.</qt>").tqarg(newFile.name()),TQString(), rcNotifyOnErrors);
return ;
}
TQTextStream newStream( &newFile );
@@ -1171,8 +1171,8 @@ void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQS
item->setText(3,"-");
item->setText(4,TQString::number(occurrence,10));
- item->setText(5,TQString("%1[%2]").arg(oldFileInfo.owner()).arg(oldFileInfo.ownerId()));
- item->setText(6,TQString("%1[%2]").arg(oldFileInfo.group()).arg(oldFileInfo.groupId()));
+ item->setText(5,TQString("%1[%2]").tqarg(oldFileInfo.owner()).tqarg(oldFileInfo.ownerId()));
+ item->setText(6,TQString("%1[%2]").tqarg(oldFileInfo.group()).tqarg(oldFileInfo.groupId()));
}
}
@@ -1196,7 +1196,7 @@ void KFileReplacePart::replacingLoop(TQString& line, KListViewItem** item, bool&
if(askConfirmReplace)
{
int answer = KMessageBox::questionYesNo(0,
- i18n("<qt>Do you want to replace the string <b>%1</b> with the string <b>%2</b>?</qt>").arg(it.key()).arg(it.data()),
+ i18n("<qt>Do you want to replace the string <b>%1</b> with the string <b>%2</b>?</qt>").tqarg(it.key()).tqarg(it.data()),
i18n("Confirm Replace"),
i18n("Replace"),
i18n("Do Not Replace"),
@@ -1332,7 +1332,7 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa
if(!file.open(IO_ReadOnly))
{
- KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(fileName), TQString::null, rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").tqarg(fileName), TQString(), rcNotifyOnErrors);
return ;
}
// Creates a stream with the file
@@ -1381,15 +1381,15 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa
int pos;
if(m_option->m_regularExpressions)
- pos = line.find(rxKey);
+ pos = line.tqfind(rxKey);
else
- pos = line.find(strKey, 0 ,m_option->m_caseSensitive);
+ pos = line.tqfind(strKey, 0 ,m_option->m_caseSensitive);
if(pos != -1)
{
atLeastOneStringFound = true;
- int lineNumber = line.mid(0,pos).contains('\n')+1;
- int columnNumber = pos - line.findRev('\n',pos);
+ int lineNumber = line.mid(0,pos).tqcontains('\n')+1;
+ int columnNumber = pos - line.tqfindRev('\n',pos);
if (!item)
item = new KListViewItem(rv);
@@ -1403,7 +1403,7 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa
else
capturedText = line.mid(pos,strKey.length());
- msg = i18n(" Line:%2, Col:%3 - \"%1\"").arg(capturedText).arg(TQString::number(lineNumber,10)).arg(TQString::number(columnNumber,10));
+ msg = i18n(" Line:%2, Col:%3 - \"%1\"").tqarg(capturedText).tqarg(TQString::number(lineNumber,10)).tqarg(TQString::number(columnNumber,10));
tempItem->setMultiLinesEnabled(true);
tempItem->setText(0,msg);
occurrence = 1;
@@ -1418,7 +1418,7 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa
if(m_option->m_regularExpressions)
pos = rxKey.search(line,pos);
else
- pos = line.find(strKey, pos ,m_option->m_caseSensitive);
+ pos = line.tqfind(strKey, pos ,m_option->m_caseSensitive);
while(pos != -1)
{
@@ -1429,8 +1429,8 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa
atLeastOneStringFound = true;
TQString msg,
capturedText;
- int lineNumber = line.mid(0,pos).contains('\n')+1;
- int columnNumber = pos - line.findRev('\n',pos);
+ int lineNumber = line.mid(0,pos).tqcontains('\n')+1;
+ int columnNumber = pos - line.tqfindRev('\n',pos);
if(m_option->m_regularExpressions)
{
@@ -1440,10 +1440,10 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa
else
{
capturedText = line.mid(pos,strKey.length());
- pos = line.find(strKey,pos+strKey.length());
+ pos = line.tqfind(strKey,pos+strKey.length());
}
- msg = i18n(" Line:%2, Col:%3 - \"%1\"").arg(capturedText).arg(TQString::number(lineNumber,10)).arg(TQString::number(columnNumber,10));
+ msg = i18n(" Line:%2, Col:%3 - \"%1\"").tqarg(capturedText).tqarg(TQString::number(lineNumber,10)).tqarg(TQString::number(columnNumber,10));
if(!item)
item = new KListViewItem(rv);
@@ -1475,8 +1475,8 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa
item->setText(1,currentDir);
item->setText(2,KFileReplaceLib::formatFileSize(fileInfo.size()));
item->setText(3,TQString::number(occurrence,10));
- item->setText(4,TQString("%1[%2]").arg(fileInfo.owner()).arg(fileInfo.ownerId()));
- item->setText(5,TQString("%1[%2]").arg(fileInfo.group()).arg(fileInfo.groupId()));
+ item->setText(4,TQString("%1[%2]").tqarg(fileInfo.owner()).tqarg(fileInfo.ownerId()));
+ item->setText(5,TQString("%1[%2]").tqarg(fileInfo.group()).tqarg(fileInfo.groupId()));
}
}
@@ -1509,7 +1509,7 @@ void KFileReplacePart::loadRulesFile(const TQString& fileName)
if(!file.open(IO_ReadOnly))
{
- KMessageBox::error(m_w, i18n("<qt>Cannot open the file <b>%1</b> and load the string list.</qt>").arg(fileName));
+ KMessageBox::error(m_w, i18n("<qt>Cannot open the file <b>%1</b> and load the string list.</qt>").tqarg(fileName));
return ;
}
@@ -1517,7 +1517,7 @@ void KFileReplacePart::loadRulesFile(const TQString& fileName)
{
file.close();
- KMessageBox::information(m_w, i18n("<qt>File <b>%1</b> seems not to be written in new kfr format. Remember that the old kfr format will be soon abandoned. You can convert your old rules files by simply saving them with kfilereplace.</qt>").arg(fileName),i18n("Warning"));
+ KMessageBox::information(m_w, i18n("<qt>File <b>%1</b> seems not to be written in new kfr format. Remember that the old kfr format will be soon abandoned. You can convert your old rules files by simply saving them with kfilereplace.</qt>").tqarg(fileName),i18n("Warning"));
KFileReplaceLib::convertOldToNewKFRFormat(fileName, sv);
@@ -1537,7 +1537,7 @@ void KFileReplacePart::loadRulesFile(const TQString& fileName)
if(searchAttribute.isNull() || searchAttribute.isEmpty())
{
- int answer = KMessageBox::warningYesNo(m_w, i18n("<qt>The format of kfr files has been changed; attempting to load <b>%1</b>. Please see the KFilereplace manual for details. Do you want to load a search-and-replace list of strings?</qt>").arg(fileName),i18n("Warning"),i18n("Load"),i18n("Do Not Load"));
+ int answer = KMessageBox::warningYesNo(m_w, i18n("<qt>The format of kfr files has been changed; attempting to load <b>%1</b>. Please see the KFilereplace manual for details. Do you want to load a search-and-replace list of strings?</qt>").tqarg(fileName),i18n("Warning"),i18n("Load"),i18n("Do Not Load"));
if(answer == KMessageBox::Yes)
searchAttribute = "false";
@@ -1569,7 +1569,7 @@ void KFileReplacePart::loadRulesFile(const TQString& fileName)
// Adds file to "load strings form file" menu
TQStringList fileList = m_option->m_recentStringFileList;
- if(!fileList.contains(fileName))
+ if(!fileList.tqcontains(fileName))
{
fileList.append(fileName);
((KRecentFilesAction* ) actionCollection()->action("strings_load_recent"))->setItems(fileList);
@@ -1623,10 +1623,10 @@ bool KFileReplacePart::checkBeforeOperation()
loadViewContent();
KListView* sv = m_view->getStringsView();
- // Checks if there are strings to replace (not need in search operation)
+ // Checks if there are strings to tqreplace (not need in search operation)
if (sv->childCount() == 0)
{
- KMessageBox::error(m_w, i18n("There are no strings to search and replace."));
+ KMessageBox::error(m_w, i18n("There are no strings to search and tqreplace."));
return false;
}
@@ -1639,7 +1639,7 @@ bool KFileReplacePart::checkBeforeOperation()
if(!dir.exists())
{
- KMessageBox::error(m_w, i18n("<qt>The main folder of the project <b>%1</b> does not exist.</qt>").arg(directory));
+ KMessageBox::error(m_w, i18n("<qt>The main folder of the project <b>%1</b> does not exist.</qt>").tqarg(directory));
return false;
}
@@ -1647,7 +1647,7 @@ bool KFileReplacePart::checkBeforeOperation()
if(!(dirInfo.isReadable() && dirInfo.isExecutable())
|| (!m_option->m_searchingOnlyMode && !m_option->m_simulation && !(dirInfo.isWritable())))
{
- KMessageBox::error(m_w, i18n("<qt>Access denied in the main folder of the project:<br><b>%1</b></qt>").arg(directory));
+ KMessageBox::error(m_w, i18n("<qt>Access denied in the main folder of the project:<br><b>%1</b></qt>").tqarg(directory));
return false;
}