summaryrefslogtreecommitdiffstats
path: root/kfilereplace/kfilereplacepart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kfilereplace/kfilereplacepart.cpp')
-rw-r--r--kfilereplace/kfilereplacepart.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/kfilereplace/kfilereplacepart.cpp b/kfilereplace/kfilereplacepart.cpp
index 2a7934e2..15ea6ef8 100644
--- a/kfilereplace/kfilereplacepart.cpp
+++ b/kfilereplace/kfilereplacepart.cpp
@@ -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>").tqarg(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>").arg(m_option->m_encoding), i18n("File Encoding Warning"), KStdGuiItem::cont(), "ShowEncodingWarning") == KMessageBox::Cancel)
return;
if(!checkBeforeOperation())
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>").tqarg(documentName));
+ KMessageBox::error(m_w, i18n("<qt>A folder or a file named <b>%1</b> already exists.</qt>").arg(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>").tqarg(documentName));
+ KMessageBox::error(m_w, i18n("<qt>Cannot create the <b>%1</b> folder.</qt>").arg(documentName));
return ;
}
@@ -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>").tqarg(oldFileName),TQString(), rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(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>").tqarg(oldFileName),TQString(), rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for writing.</qt>").arg(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]").tqarg(oldFileInfo.owner()).tqarg(oldFileInfo.ownerId()));
- item->setText(6,TQString("%1[%2]").tqarg(oldFileInfo.group()).tqarg(oldFileInfo.groupId()));
+ item->setText(5,TQString("%1[%2]").arg(oldFileInfo.owner()).arg(oldFileInfo.ownerId()));
+ item->setText(6,TQString("%1[%2]").arg(oldFileInfo.group()).arg(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>").tqarg(oldFile.name()),TQString(), rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(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>").tqarg(newFile.name()),TQString(), rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for writing.</qt>").arg(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]").tqarg(oldFileInfo.owner()).tqarg(oldFileInfo.ownerId()));
- item->setText(6,TQString("%1[%2]").tqarg(oldFileInfo.group()).tqarg(oldFileInfo.groupId()));
+ item->setText(5,TQString("%1[%2]").arg(oldFileInfo.owner()).arg(oldFileInfo.ownerId()));
+ item->setText(6,TQString("%1[%2]").arg(oldFileInfo.group()).arg(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>").tqarg(it.key()).tqarg(it.data()),
+ 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("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>").tqarg(fileName), TQString(), rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(fileName), TQString(), rcNotifyOnErrors);
return ;
}
// Creates a stream with the file
@@ -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\"").tqarg(capturedText).tqarg(TQString::number(lineNumber,10)).tqarg(TQString::number(columnNumber,10));
+ msg = i18n(" Line:%2, Col:%3 - \"%1\"").arg(capturedText).arg(TQString::number(lineNumber,10)).arg(TQString::number(columnNumber,10));
tempItem->setMultiLinesEnabled(true);
tempItem->setText(0,msg);
occurrence = 1;
@@ -1443,7 +1443,7 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa
pos = line.find(strKey,pos+strKey.length());
}
- msg = i18n(" Line:%2, Col:%3 - \"%1\"").tqarg(capturedText).tqarg(TQString::number(lineNumber,10)).tqarg(TQString::number(columnNumber,10));
+ msg = i18n(" Line:%2, Col:%3 - \"%1\"").arg(capturedText).arg(TQString::number(lineNumber,10)).arg(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]").tqarg(fileInfo.owner()).tqarg(fileInfo.ownerId()));
- item->setText(5,TQString("%1[%2]").tqarg(fileInfo.group()).tqarg(fileInfo.groupId()));
+ item->setText(4,TQString("%1[%2]").arg(fileInfo.owner()).arg(fileInfo.ownerId()));
+ item->setText(5,TQString("%1[%2]").arg(fileInfo.group()).arg(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>").tqarg(fileName));
+ KMessageBox::error(m_w, i18n("<qt>Cannot open the file <b>%1</b> and load the string list.</qt>").arg(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>").tqarg(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>").arg(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>").tqarg(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>").arg(fileName),i18n("Warning"),i18n("Load"),i18n("Do Not Load"));
if(answer == KMessageBox::Yes)
searchAttribute = "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>").tqarg(directory));
+ KMessageBox::error(m_w, i18n("<qt>The main folder of the project <b>%1</b> does not exist.</qt>").arg(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>").tqarg(directory));
+ KMessageBox::error(m_w, i18n("<qt>Access denied in the main folder of the project:<br><b>%1</b></qt>").arg(directory));
return false;
}