diff options
author | Darrell Anderson <humanreadable@yahoo.com> | 2014-01-15 17:20:20 -0600 |
---|---|---|
committer | Darrell Anderson <humanreadable@yahoo.com> | 2014-01-15 17:20:20 -0600 |
commit | 80f849ebbb4bac48afd2bf50f0e8af2ffd9e4a65 (patch) | |
tree | d200f3206607ae1a50c7873a80ab5ffd325d6c2a /tdefilereplace/tdefilereplacepart.cpp | |
parent | b23d738404d2fdf3445371a97fa267646b294394 (diff) | |
download | tdewebdev-80f849ebbb4bac48afd2bf50f0e8af2ffd9e4a65.tar.gz tdewebdev-80f849ebbb4bac48afd2bf50f0e8af2ffd9e4a65.zip |
Finish renaming KFileReplace->TDEFileReplace and fix related Quanta Plus internal references.
Diffstat (limited to 'tdefilereplace/tdefilereplacepart.cpp')
-rw-r--r-- | tdefilereplace/tdefilereplacepart.cpp | 172 |
1 files changed, 86 insertions, 86 deletions
diff --git a/tdefilereplace/tdefilereplacepart.cpp b/tdefilereplace/tdefilereplacepart.cpp index ffbc029d..e196a15c 100644 --- a/tdefilereplace/tdefilereplacepart.cpp +++ b/tdefilereplace/tdefilereplacepart.cpp @@ -56,11 +56,11 @@ using namespace whatthisNameSpace; //PUBLIC CONSTRUCTORS // Factory code for KDE 3 -typedef KParts::GenericFactory<KFileReplacePart> FileReplaceFactory; +typedef KParts::GenericFactory<TDEFileReplacePart> FileReplaceFactory; K_EXPORT_COMPONENT_FACTORY( libtdefilereplacepart, FileReplaceFactory ) -KFileReplacePart::KFileReplacePart(TQWidget* parentWidget, const char* , TQObject* parent, const char* name, const TQStringList & ) : KParts::ReadOnlyPart(parent,name) +TDEFileReplacePart::TDEFileReplacePart(TQWidget* parentWidget, const char* , TQObject* parent, const char* name, const TQStringList & ) : KParts::ReadOnlyPart(parent,name) { setInstance(FileReplaceFactory::instance()); TDEGlobal::locale()->insertCatalogue("tdefilereplace"); @@ -79,7 +79,7 @@ KFileReplacePart::KFileReplacePart(TQWidget* parentWidget, const char* , TQObjec whatsThis(); } -KFileReplacePart::~KFileReplacePart() +TDEFileReplacePart::~TDEFileReplacePart() { m_view = 0; //it's already deleted, so set it to NULL @@ -95,14 +95,14 @@ KFileReplacePart::~KFileReplacePart() } //PRIVATE SLOTS -void KFileReplacePart::slotSetNewParameters() +void TDEFileReplacePart::slotSetNewParameters() { launchNewProjectDialog(KURL()); m_view->changeView(m_option->m_searchingOnlyMode); emit setStatusBarText(i18n("Ready.")); } -void KFileReplacePart::slotSearchingOperation() +void TDEFileReplacePart::slotSearchingOperation() { if(!checkBeforeOperation()) return; @@ -159,7 +159,7 @@ void KFileReplacePart::slotSearchingOperation() m_view->showSemaphore("green"); } -void KFileReplacePart::slotReplacingOperation() +void TDEFileReplacePart::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) return; @@ -221,14 +221,14 @@ void KFileReplacePart::slotReplacingOperation() m_view->showSemaphore("green"); } -void KFileReplacePart::slotSimulatingOperation() +void TDEFileReplacePart::slotSimulatingOperation() { m_option->m_simulation = true; slotReplacingOperation(); m_option->m_simulation = false; } -void KFileReplacePart::slotStop() +void TDEFileReplacePart::slotStop() { emit setStatusBarText(i18n("Stopping...")); m_stop = true; @@ -236,7 +236,7 @@ void KFileReplacePart::slotStop() resetActions(); } -void KFileReplacePart::slotCreateReport() +void TDEFileReplacePart::slotCreateReport() { // Check there are results TDEListView* rv = m_view->getResultsView(), @@ -280,13 +280,13 @@ void KFileReplacePart::slotCreateReport() //resetActions(); } -void KFileReplacePart::slotStringsAdd() +void TDEFileReplacePart::slotStringsAdd() { m_view->slotStringsAdd(); resetActions(); } -void KFileReplacePart::slotQuickStringsAdd() +void TDEFileReplacePart::slotQuickStringsAdd() { //this slot handles a pair of strings that come from project dialog, //if the control character 'N' is found at the position 0 of the two strings, @@ -318,33 +318,33 @@ void KFileReplacePart::slotQuickStringsAdd() slotReplacingOperation(); } -void KFileReplacePart::slotStringsDeleteItem() +void TDEFileReplacePart::slotStringsDeleteItem() { m_view->slotStringsDeleteItem(); resetActions(); } -void KFileReplacePart::slotStringsEmpty() +void TDEFileReplacePart::slotStringsEmpty() { m_view->slotStringsEmpty(); resetActions(); } -void KFileReplacePart::slotStringsEdit() +void TDEFileReplacePart::slotStringsEdit() { m_view->slotStringsEdit(); resetActions(); } -void KFileReplacePart::slotStringsSave() +void TDEFileReplacePart::slotStringsSave() { m_view->slotStringsSave(); } -void KFileReplacePart::slotStringsLoad() +void TDEFileReplacePart::slotStringsLoad() { // Selects the file to load from - TQString menu = "*.kfr|" + i18n("KFileReplace strings") + " (*.kfr)\n*|"+i18n("All Files") + " (*)"; + TQString menu = "*.kfr|" + i18n("TDEFileReplace strings") + " (*.kfr)\n*|"+i18n("All Files") + " (*)"; TQString fileName = KFileDialog::getOpenFileName(TQString(), menu, m_w, i18n("Load Strings From File")); if(!fileName.isEmpty()) @@ -353,19 +353,19 @@ void KFileReplacePart::slotStringsLoad() resetActions(); } -void KFileReplacePart::slotStringsInvertCur() +void TDEFileReplacePart::slotStringsInvertCur() { m_view->stringsInvert(false); resetActions(); } -void KFileReplacePart::slotStringsInvertAll() +void TDEFileReplacePart::slotStringsInvertAll() { m_view->stringsInvert(true); resetActions(); } -void KFileReplacePart::slotOpenRecentStringFile(const KURL& urlFile) +void TDEFileReplacePart::slotOpenRecentStringFile(const KURL& urlFile) { TQString fileName; @@ -386,37 +386,37 @@ void KFileReplacePart::slotOpenRecentStringFile(const KURL& urlFile) resetActions(); } -void KFileReplacePart::slotOptionRecursive() +void TDEFileReplacePart::slotOptionRecursive() { m_option->m_recursive = !m_option->m_recursive; resetActions(); } -void KFileReplacePart::slotOptionBackup() +void TDEFileReplacePart::slotOptionBackup() { m_option->m_backup = !m_option->m_backup; resetActions(); } -void KFileReplacePart::slotOptionCaseSensitive() +void TDEFileReplacePart::slotOptionCaseSensitive() { m_option->m_caseSensitive = !m_option->m_caseSensitive; resetActions(); } -void KFileReplacePart::slotOptionVariables() +void TDEFileReplacePart::slotOptionVariables() { m_option->m_variables = !m_option->m_variables; resetActions(); } -void KFileReplacePart::slotOptionRegularExpressions() +void TDEFileReplacePart::slotOptionRegularExpressions() { m_option->m_regularExpressions = !m_option->m_regularExpressions; resetActions(); } -void KFileReplacePart::slotOptionPreferences() +void TDEFileReplacePart::slotOptionPreferences() { KOptionsDlg dlg(m_option, m_w, 0); @@ -429,7 +429,7 @@ void KFileReplacePart::slotOptionPreferences() resetActions(); } -void KFileReplacePart::showAboutApplication() +void TDEFileReplacePart::showAboutApplication() { m_aboutDlg = new TDEAboutApplication(createAboutData(), (TQWidget *)0, (const char *)0, false); if(m_aboutDlg == 0) @@ -441,18 +441,18 @@ void KFileReplacePart::showAboutApplication() m_aboutDlg->raise(); } -void KFileReplacePart::appHelpActivated() +void TDEFileReplacePart::appHelpActivated() { kapp->invokeHelp(TQString(), "tdefilereplace"); } -void KFileReplacePart::reportBug() +void TDEFileReplacePart::reportBug() { KBugReport dlg(m_w, true, createAboutData()); dlg.exec(); } -void KFileReplacePart::resetActions() +void TDEFileReplacePart::resetActions() { TDEListView* rv = m_view->getResultsView(), * sv = m_view->getStringsView(); @@ -507,16 +507,16 @@ void KFileReplacePart::resetActions() } //PUBLIC METHODS -TDEAboutData* KFileReplacePart::createAboutData() +TDEAboutData* TDEFileReplacePart::createAboutData() { TDEAboutData * aboutData = new TDEAboutData("tdefilereplacepart", - I18N_NOOP("KFileReplacePart"), + I18N_NOOP("TDEFileReplacePart"), KFR_VERSION, I18N_NOOP( "Batch search and replace tool."), TDEAboutData::License_GPL_V2, "(C) 1999-2002 Fran�is Dupoux\n(C) 2003-2004 Andras Mantia\n(C) 2004 Emiliano Gulmini", I18N_NOOP("Part of the KDEWebDev module."), "http://www.kdewebdev.org"); aboutData->addAuthor("Fran�is Dupoux", - I18N_NOOP("Original author of the KFileReplace tool"), + I18N_NOOP("Original author of the TDEFileReplace tool"), "dupoux@dupoux.com"); aboutData->addAuthor("Emiliano Gulmini", I18N_NOOP("Current maintainer, code cleaner and rewriter"), @@ -531,11 +531,11 @@ TDEAboutData* KFileReplacePart::createAboutData() } //PROTECTED METHODS -bool KFileReplacePart::openURL(const KURL &url) +bool TDEFileReplacePart::openURL(const KURL &url) { if(!url.isEmpty() && (url.protocol() != "file")) { - KMessageBox::sorry(m_w, i18n("Sorry, currently the KFileReplace part works only for local files."), i18n("Non Local File")); + KMessageBox::sorry(m_w, i18n("Sorry, currently the TDEFileReplace part works only for local files."), i18n("Non Local File")); emit canceled(""); return false; } @@ -549,7 +549,7 @@ bool KFileReplacePart::openURL(const KURL &url) } //PRIVATE METHODS -void KFileReplacePart::initGUI() +void TDEFileReplacePart::initGUI() { setXMLFile("tdefilereplacepartui.rc"); @@ -592,7 +592,7 @@ void KFileReplacePart::initGUI() (void)new TDEToggleAction(i18n("Case &Sensitive"), "casesensitive_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionCaseSensitive()), actionCollection(), "options_case"); (void)new TDEToggleAction(i18n("Enable Commands &in Replace String: [$command:option$]"), "command_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionVariables()), actionCollection(), "options_var"); (void)new TDEToggleAction(i18n("Enable &Regular Expressions"), "regularexpression_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionRegularExpressions()), actionCollection(), "options_regularexpressions"); - (void)new TDEAction(i18n("Configure &KFileReplace..."), "configure", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionPreferences()), actionCollection(), "configure_tdefilereplace"); + (void)new TDEAction(i18n("Configure &TDEFileReplace..."), "configure", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionPreferences()), actionCollection(), "configure_tdefilereplace"); // Results (void)new TDEAction(i18n("&Properties"), "informations", 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultProperties()), actionCollection(), "results_infos"); @@ -606,15 +606,15 @@ void KFileReplacePart::initGUI() (void)new TDEAction(i18n("&Delete"), "editdelete", 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultDelete()), actionCollection(), "results_delete"); (void)new TDEAction(i18n("E&xpand Tree"), 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultTreeExpand()), actionCollection(), "results_treeexpand"); (void)new TDEAction(i18n("&Reduce Tree"), 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultTreeReduce()), actionCollection(), "results_treereduce"); - (void)new TDEAction(i18n("&About KFileReplace"), "tdefilereplace", 0, TQT_TQOBJECT(this), TQT_SLOT(showAboutApplication()), actionCollection(), "help_about_tdefilereplace"); - (void)new TDEAction(i18n("KFileReplace &Handbook"), "help", 0, TQT_TQOBJECT(this), TQT_SLOT(appHelpActivated()), actionCollection(), "help_tdefilereplace"); + (void)new TDEAction(i18n("&About TDEFileReplace"), "tdefilereplace", 0, TQT_TQOBJECT(this), TQT_SLOT(showAboutApplication()), actionCollection(), "help_about_tdefilereplace"); + (void)new TDEAction(i18n("TDEFileReplace &Handbook"), "help", 0, TQT_TQOBJECT(this), TQT_SLOT(appHelpActivated()), actionCollection(), "help_tdefilereplace"); (void)new TDEAction(i18n("&Report Bug"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(reportBug()), actionCollection(), "report_bug"); } -void KFileReplacePart::initView() +void TDEFileReplacePart::initView() { - m_view = new KFileReplaceView(m_option, m_parentWidget, "view"); + m_view = new TDEFileReplaceView(m_option, m_parentWidget, "view"); setWidget(m_view); @@ -623,7 +623,7 @@ void KFileReplacePart::initView() m_view->showSemaphore("green"); } -void KFileReplacePart::freezeActions() +void TDEFileReplacePart::freezeActions() { //Disables actions during search/replace operation actionCollection()->action("new_project")->setEnabled(false); @@ -661,7 +661,7 @@ void KFileReplacePart::freezeActions() ((TDEToggleAction* ) actionCollection()->action("options_regularexpressions"))->setChecked(false); } -void KFileReplacePart::loadOptionsFromRC() +void TDEFileReplacePart::loadOptionsFromRC() { m_option = new RCOptions(); @@ -674,7 +674,7 @@ void KFileReplacePart::loadOptionsFromRC() loadBackupExtensionOptions(); } -void KFileReplacePart::loadOptions() +void TDEFileReplacePart::loadOptions() { m_config->setGroup("General Options"); @@ -709,7 +709,7 @@ void KFileReplacePart::loadOptions() m_option->m_askConfirmReplace = false; } -void KFileReplacePart::loadFileSizeOptions() +void TDEFileReplacePart::loadFileSizeOptions() { m_config->setGroup("Size options"); @@ -717,7 +717,7 @@ void KFileReplacePart::loadFileSizeOptions() m_option->m_maxSize = m_config->readNumEntry(rcMaxFileSize, FileSizeOption); } -void KFileReplacePart::loadDateAccessOptions() +void TDEFileReplacePart::loadDateAccessOptions() { m_config->setGroup("Access options"); @@ -726,7 +726,7 @@ void KFileReplacePart::loadDateAccessOptions() m_option->m_maxDate = m_config->readEntry(rcMaxDate, AccessDateOption); } -void KFileReplacePart::loadOwnerOptions() +void TDEFileReplacePart::loadOwnerOptions() { m_config->setGroup("Owner options"); @@ -752,7 +752,7 @@ void KFileReplacePart::loadOwnerOptions() m_option->m_ownerGroupValue = ownerList[3]; } -void KFileReplacePart::loadLocationsList() +void TDEFileReplacePart::loadLocationsList() { m_config->setGroup("Directories"); TQStringList locationsEntryList; @@ -768,7 +768,7 @@ void KFileReplacePart::loadLocationsList() m_option->m_directories = locationsEntryList; } -void KFileReplacePart::loadFiltersList() +void TDEFileReplacePart::loadFiltersList() { TQStringList filtersEntryList; @@ -785,7 +785,7 @@ void KFileReplacePart::loadFiltersList() m_option->m_filters = filtersEntryList; } -void KFileReplacePart::loadBackupExtensionOptions() +void TDEFileReplacePart::loadBackupExtensionOptions() { m_config->setGroup("Options"); TQStringList bkList = TQStringList::split(',', @@ -799,7 +799,7 @@ void KFileReplacePart::loadBackupExtensionOptions() m_option->m_backupExtension = bkList[1]; } -void KFileReplacePart::saveOptionsToRC() +void TDEFileReplacePart::saveOptionsToRC() { saveOptions(); saveFileSizeOptions(); @@ -810,7 +810,7 @@ void KFileReplacePart::saveOptionsToRC() saveBackupExtensionOptions(); } -void KFileReplacePart::saveOptions() +void TDEFileReplacePart::saveOptions() { m_config->setGroup("General Options"); @@ -841,7 +841,7 @@ void KFileReplacePart::saveOptions() m_config->sync(); } -void KFileReplacePart::saveFileSizeOptions() +void TDEFileReplacePart::saveFileSizeOptions() { m_config->setGroup("Size options"); @@ -851,7 +851,7 @@ void KFileReplacePart::saveFileSizeOptions() m_config->sync(); } -void KFileReplacePart::saveDateAccessOptions() +void TDEFileReplacePart::saveDateAccessOptions() { m_config->setGroup("Access options"); @@ -862,7 +862,7 @@ void KFileReplacePart::saveDateAccessOptions() m_config->sync(); } -void KFileReplacePart::saveOwnerOptions() +void TDEFileReplacePart::saveOwnerOptions() { m_config->setGroup("Owner options"); @@ -895,7 +895,7 @@ void KFileReplacePart::saveOwnerOptions() m_config->sync(); } -void KFileReplacePart::saveLocationsList() +void TDEFileReplacePart::saveLocationsList() { m_config->setGroup("Directories"); #if KDE_IS_VERSION(3,1,3) @@ -906,14 +906,14 @@ void KFileReplacePart::saveLocationsList() m_config->sync(); } -void KFileReplacePart::saveFiltersList() +void TDEFileReplacePart::saveFiltersList() { m_config->setGroup("Filters"); m_config->writeEntry(rcFiltersList, m_option->m_filters); m_config->sync(); } -void KFileReplacePart::saveBackupExtensionOptions() +void TDEFileReplacePart::saveBackupExtensionOptions() { m_config->setGroup("Options"); TQString bkOptions; @@ -926,7 +926,7 @@ void KFileReplacePart::saveBackupExtensionOptions() m_config->sync(); } -void KFileReplacePart::fileReplace() +void TDEFileReplacePart::fileReplace() { TQString directoryName = m_option->m_directories[0]; TQDir d(directoryName); @@ -949,7 +949,7 @@ void KFileReplacePart::fileReplace() break; // Avoids files that not match requirements - if(!KFileReplaceLib::isAnAccessibleFile(d.canonicalPath(), fileName, m_option)) + if(!TDEFileReplaceLib::isAnAccessibleFile(d.canonicalPath(), fileName, m_option)) continue; kapp->processEvents(); if(m_option->m_backup) @@ -962,7 +962,7 @@ void KFileReplacePart::fileReplace() } } -void KFileReplacePart::recursiveFileReplace(const TQString& directoryName, int& filesNumber) +void TDEFileReplacePart::recursiveFileReplace(const TQString& directoryName, int& filesNumber) { //if m_stop == true then interrupts recursion if(m_stop) @@ -987,7 +987,7 @@ void KFileReplacePart::recursiveFileReplace(const TQString& directoryName, int& TQString fileName = (*filesIt); // Avoids files that not match requirements - if(!KFileReplaceLib::isAnAccessibleFile(d.canonicalPath(),fileName, m_option)) + if(!TDEFileReplaceLib::isAnAccessibleFile(d.canonicalPath(),fileName, m_option)) continue; TQString filePath = d.canonicalPath()+"/"+fileName; @@ -1014,7 +1014,7 @@ void KFileReplacePart::recursiveFileReplace(const TQString& directoryName, int& } } -void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQString& oldFileName) +void TDEFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQString& oldFileName) { //Creates a path string TQString oldPathString = currentDir+"/"+oldFileName; @@ -1033,7 +1033,7 @@ void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQStri TQString line = currentStream.read(), backupLine = line; - TQString backupSize = KFileReplaceLib::formatFileSize(currentFile.size()); + TQString backupSize = TDEFileReplaceLib::formatFileSize(currentFile.size()); currentFile.close(); @@ -1081,10 +1081,10 @@ void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQStri if(atLeastOneStringFound && item/* && atLeastOneStringConfirmed*/) { - KFileReplaceLib::setIconForFileEntry(item,currentDir+"/"+oldFileName); + TDEFileReplaceLib::setIconForFileEntry(item,currentDir+"/"+oldFileName); item->setText(0,oldFileName); item->setText(1,currentDir); - TQString newSize = KFileReplaceLib::formatFileSize(oldFileInfo.size()); + TQString newSize = TDEFileReplaceLib::formatFileSize(oldFileInfo.size()); if(!m_option->m_simulation) { item->setText(2, backupSize); @@ -1102,7 +1102,7 @@ void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQStri } } -void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQString& oldFileName) +void TDEFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQString& oldFileName) { TQString oldPathString = currentDir+"/"+oldFileName; TQFile oldFile(oldPathString); @@ -1114,7 +1114,7 @@ void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQS return ; } - TQString fileSizeBeforeReplacing = KFileReplaceLib::formatFileSize(oldFileInfo.size()); + TQString fileSizeBeforeReplacing = TDEFileReplaceLib::formatFileSize(oldFileInfo.size()); TDEListViewItem *item = 0; TQTextStream oldStream( &oldFile ); @@ -1153,7 +1153,7 @@ void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQS } TQFileInfo nf(oldPathString); - TQString fileSizeAfterReplacing = KFileReplaceLib::formatFileSize(nf.size()); + TQString fileSizeAfterReplacing = TDEFileReplaceLib::formatFileSize(nf.size()); //if ignoreFiles == false then every files must be show if(!m_option->m_ignoreFiles) @@ -1161,7 +1161,7 @@ void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQS if(atLeastOneStringFound && item/*&& atLeastOneStringConfirmed*/) { - KFileReplaceLib::setIconForFileEntry(item,currentDir+"/"+oldFileName); + TDEFileReplaceLib::setIconForFileEntry(item,currentDir+"/"+oldFileName); item->setText(0,oldFileName); item->setText(1,currentDir); item->setText(2,fileSizeBeforeReplacing); @@ -1176,7 +1176,7 @@ void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQS } } -void KFileReplacePart::replacingLoop(TQString& line, TDEListViewItem** item, bool& atLeastOneStringFound, int& occur, bool regularExpression, bool& askConfirmReplace) +void TDEFileReplacePart::replacingLoop(TQString& line, TDEListViewItem** item, bool& atLeastOneStringFound, int& occur, bool regularExpression, bool& askConfirmReplace) { KeyValueMap tempMap = m_replacementMap; KeyValueMap::Iterator it; @@ -1244,7 +1244,7 @@ void KFileReplacePart::replacingLoop(TQString& line, TDEListViewItem** item, boo } } -void KFileReplacePart::fileSearch(const TQString& directoryName, const TQString& filters) +void TDEFileReplacePart::fileSearch(const TQString& directoryName, const TQString& filters) { TQDir d(directoryName); @@ -1267,7 +1267,7 @@ void KFileReplacePart::fileSearch(const TQString& directoryName, const TQString& TQString fileName = (*filesIt); // Avoids files that not match - if(!KFileReplaceLib::isAnAccessibleFile(filePath, fileName, m_option)) + if(!TDEFileReplaceLib::isAnAccessibleFile(filePath, fileName, m_option)) continue; TQFileInfo fileInfo(filePath+"/"+fileName); @@ -1280,7 +1280,7 @@ void KFileReplacePart::fileSearch(const TQString& directoryName, const TQString& } } -void KFileReplacePart::recursiveFileSearch(const TQString& directoryName, const TQString& filters, uint& filesNumber) +void TDEFileReplacePart::recursiveFileSearch(const TQString& directoryName, const TQString& filters, uint& filesNumber) { // if m_stop == true then interrupt recursion if(m_stop) @@ -1304,7 +1304,7 @@ void KFileReplacePart::recursiveFileSearch(const TQString& directoryName, const TQString fileName = (*filesIt); // Avoids files that not match - if(!KFileReplaceLib::isAnAccessibleFile(filePath, fileName, m_option)) + if(!TDEFileReplaceLib::isAnAccessibleFile(filePath, fileName, m_option)) continue; // Composes file path string @@ -1326,7 +1326,7 @@ void KFileReplacePart::recursiveFileSearch(const TQString& directoryName, const } } -void KFileReplacePart::search(const TQString& currentDir, const TQString& fileName) +void TDEFileReplacePart::search(const TQString& currentDir, const TQString& fileName) { TQFile file(currentDir+"/"+fileName); @@ -1470,17 +1470,17 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa if(atLeastOneStringFound && item) { - KFileReplaceLib::setIconForFileEntry(item,currentDir+"/"+fileName); + TDEFileReplaceLib::setIconForFileEntry(item,currentDir+"/"+fileName); item->setText(0,fileName); item->setText(1,currentDir); - item->setText(2,KFileReplaceLib::formatFileSize(fileInfo.size())); + item->setText(2,TDEFileReplaceLib::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())); } } -void KFileReplacePart::loadViewContent() +void TDEFileReplacePart::loadViewContent() { /* Maps the content of the strings view to a TQMap */ KeyValueMap tempMap; @@ -1499,7 +1499,7 @@ void KFileReplacePart::loadViewContent() m_replacementMap = tempMap; } -void KFileReplacePart::loadRulesFile(const TQString& fileName) +void TDEFileReplacePart::loadRulesFile(const TQString& fileName) { /* Loads a file with kfr extension. * creates a xml document and browses it*/ @@ -1519,7 +1519,7 @@ void KFileReplacePart::loadRulesFile(const TQString& fileName) 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 tdefilereplace.</qt>").arg(fileName),i18n("Warning")); - KFileReplaceLib::convertOldToNewKFRFormat(fileName, sv); + TDEFileReplaceLib::convertOldToNewKFRFormat(fileName, sv); return; } @@ -1583,7 +1583,7 @@ void KFileReplacePart::loadRulesFile(const TQString& fileName) //resetActions(); } -bool KFileReplacePart::launchNewProjectDialog(const KURL & startURL) +bool TDEFileReplacePart::launchNewProjectDialog(const KURL & startURL) { if(!startURL.isEmpty()) m_option->m_directories.prepend(startURL.path()); @@ -1607,7 +1607,7 @@ bool KFileReplacePart::launchNewProjectDialog(const KURL & startURL) return true; } -void KFileReplacePart::setOptionMask() +void TDEFileReplacePart::setOptionMask() { m_optionMask |= TQDir::Dirs; @@ -1618,7 +1618,7 @@ void KFileReplacePart::setOptionMask() m_optionMask |= TQDir::NoSymLinks; } -bool KFileReplacePart::checkBeforeOperation() +bool TDEFileReplacePart::checkBeforeOperation() { loadViewContent(); TDEListView* sv = m_view->getStringsView(); @@ -1657,7 +1657,7 @@ bool KFileReplacePart::checkBeforeOperation() return true; } -bool KFileReplacePart::dontAskAgain() +bool TDEFileReplacePart::dontAskAgain() { m_config->setGroup("Notification Messages"); TQString dontAskAgain = m_config->readEntry(rcDontAskAgain, "no"); @@ -1667,7 +1667,7 @@ bool KFileReplacePart::dontAskAgain() return false; } -void KFileReplacePart::whatsThis() +void TDEFileReplacePart::whatsThis() { actionCollection()->action("options_backup")->setWhatsThis(optionsBackupWhatthis); actionCollection()->action("options_case")->setWhatsThis(optionsCaseWhatthis); |