summaryrefslogtreecommitdiffstats
path: root/kfilereplace
diff options
context:
space:
mode:
Diffstat (limited to 'kfilereplace')
-rw-r--r--kfilereplace/commandengine.cpp80
-rw-r--r--kfilereplace/commandengine.h20
-rw-r--r--kfilereplace/configurationclasses.cpp24
-rw-r--r--kfilereplace/configurationclasses.h116
-rw-r--r--kfilereplace/kaddstringdlg.cpp68
-rw-r--r--kfilereplace/kaddstringdlg.h6
-rw-r--r--kfilereplace/kfilereplace.cpp16
-rw-r--r--kfilereplace/kfilereplaceiface.h2
-rw-r--r--kfilereplace/kfilereplacelib.cpp62
-rw-r--r--kfilereplace/kfilereplacelib.h12
-rw-r--r--kfilereplace/kfilereplacepart.cpp352
-rw-r--r--kfilereplace/kfilereplacepart.h24
-rw-r--r--kfilereplace/kfilereplaceview.cpp128
-rw-r--r--kfilereplace/kfilereplaceview.h20
-rw-r--r--kfilereplace/knewprojectdlg.cpp124
-rw-r--r--kfilereplace/knewprojectdlg.h12
-rw-r--r--kfilereplace/koptionsdlg.cpp54
-rw-r--r--kfilereplace/koptionsdlg.h4
-rw-r--r--kfilereplace/report.cpp36
-rw-r--r--kfilereplace/report.h4
-rw-r--r--kfilereplace/whatthis.h70
21 files changed, 617 insertions, 617 deletions
diff --git a/kfilereplace/commandengine.cpp b/kfilereplace/commandengine.cpp
index 56cc50b1..ffb1919d 100644
--- a/kfilereplace/commandengine.cpp
+++ b/kfilereplace/commandengine.cpp
@@ -17,10 +17,10 @@
***************************************************************************/
// QT
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdom.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdom.h>
// KDE
#include <kuser.h>
@@ -30,24 +30,24 @@
// local
#include "commandengine.h"
-QString CommandEngine::datetime(const QString& opt, const QString& arg)
+TQString CommandEngine::datetime(const TQString& opt, const TQString& arg)
{
Q_UNUSED(arg);
if(opt == "iso")
- return QDateTime::currentDateTime(Qt::LocalTime).toString(Qt::ISODate);
+ return TQDateTime::currentDateTime(Qt::LocalTime).toString(Qt::ISODate);
if(opt == "local")
- return QDateTime::currentDateTime(Qt::LocalTime).toString(Qt::LocalDate);
- return QString::null;
+ return TQDateTime::currentDateTime(Qt::LocalTime).toString(Qt::LocalDate);
+ return TQString::null;
}
-QString CommandEngine::user(const QString& opt, const QString& arg)
+TQString CommandEngine::user(const TQString& opt, const TQString& arg)
{
Q_UNUSED(arg);
KUser u;
if(opt == "uid")
- return QString::number(u.uid(),10);
+ return TQString::number(u.uid(),10);
if(opt == "gid")
- return QString::number(u.gid(),10);
+ return TQString::number(u.gid(),10);
if(opt == "loginname")
return u.loginName();
if(opt == "fullname")
@@ -56,47 +56,47 @@ QString CommandEngine::user(const QString& opt, const QString& arg)
return u.homeDir();
if(opt == "shell")
return u.shell();
- return QString::null;
+ return TQString::null;
}
-QString CommandEngine::loadfile(const QString& opt, const QString& arg)
+TQString CommandEngine::loadfile(const TQString& opt, const TQString& arg)
{
Q_UNUSED(arg);
- QFile f(opt);
- if(!f.open(IO_ReadOnly)) return QString::null;
+ TQFile f(opt);
+ if(!f.open(IO_ReadOnly)) return TQString::null;
- QTextStream t(&f);
+ TQTextStream t(&f);
- QString s = t.read();
+ TQString s = t.read();
f.close();
return s;
}
-QString CommandEngine::empty(const QString& opt, const QString& arg)
+TQString CommandEngine::empty(const TQString& opt, const TQString& arg)
{
Q_UNUSED(opt);
Q_UNUSED(arg);
return "";
}
-QString CommandEngine::mathexp(const QString& opt, const QString& arg)
+TQString CommandEngine::mathexp(const TQString& opt, const TQString& arg)
{
/* We will use bc 1.06 by Philip A. Nelson <[email protected]> */
//Q_UNUSED(opt);
Q_UNUSED(arg);
- QString tempOpt = opt;
+ TQString tempOpt = opt;
tempOpt.replace("ln","l");
tempOpt.replace("sin","s");
tempOpt.replace("cos","c");
tempOpt.replace("arctan","a");
tempOpt.replace("exp","e");
- QString program = "var=("+tempOpt+");print var";
- QString script = "echo '"+program+"' | bc -l;";
+ TQString program = "var=("+tempOpt+");print var";
+ TQString script = "echo '"+program+"' | bc -l;";
KProcess* proc = new KProcess();
@@ -104,14 +104,14 @@ QString CommandEngine::mathexp(const QString& opt, const QString& arg)
*(proc) << script;
- connect(proc, SIGNAL(receivedStdout(KProcess*,char*,int)), this, SLOT(slotGetScriptOutput(KProcess*,char*,int)));
- connect(proc, SIGNAL(receivedStderr(KProcess*,char*,int)), this, SLOT(slotGetScriptError(KProcess*,char*,int)));
- connect(proc, SIGNAL(processExited(KProcess*)), this, SLOT(slotProcessExited(KProcess*)));
+ connect(proc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), this, TQT_SLOT(slotGetScriptOutput(KProcess*,char*,int)));
+ connect(proc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), this, TQT_SLOT(slotGetScriptError(KProcess*,char*,int)));
+ connect(proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotProcessExited(KProcess*)));
//Through slotGetScriptOutput, m_processOutput contains the result of the KProcess call
if(!proc->start(KProcess::Block, KProcess::All))
{
- return QString::null;
+ return TQString::null;
}
else
{
@@ -120,39 +120,39 @@ QString CommandEngine::mathexp(const QString& opt, const QString& arg)
if(proc)
delete proc;
- QString tempbuf = m_processOutput;
- m_processOutput = QString::null;
+ TQString tempbuf = m_processOutput;
+ m_processOutput = TQString::null;
return tempbuf;
}
-QString CommandEngine::random(const QString& opt, const QString& arg)
+TQString CommandEngine::random(const TQString& opt, const TQString& arg)
{
Q_UNUSED(arg);
long seed;
if(opt.isEmpty())
{
- QDateTime dt;
+ TQDateTime dt;
seed = dt.toTime_t();
}
else
seed = opt.toLong();
KRandomSequence seq(seed);
- return QString::number(seq.getLong(1000000),10);
+ return TQString::number(seq.getLong(1000000),10);
}
-QString CommandEngine::stringmanip(const QString& opt, const QString& arg)
+TQString CommandEngine::stringmanip(const TQString& opt, const TQString& arg)
{
Q_UNUSED(opt);
Q_UNUSED(arg);
return "";
}
-QString CommandEngine::variableValue(const QString &variable)
+TQString CommandEngine::variableValue(const TQString &variable)
{
- QString s = variable;
+ TQString s = variable;
s.remove("[$").remove("$]").remove(" ");
@@ -160,12 +160,12 @@ QString CommandEngine::variableValue(const QString &variable)
return variable;
else
{
- QString leftValue = s.section(":",0,0),
+ TQString leftValue = s.section(":",0,0),
midValue = s.section(":",1,1),
rightValue = s.section(":",2,2);
- QString opt = midValue;
- QString arg = rightValue;
+ TQString opt = midValue;
+ TQString arg = rightValue;
if(leftValue == "stringmanip")
return stringmanip(opt, arg);
@@ -191,18 +191,18 @@ void CommandEngine::slotGetScriptError(KProcess* proc, char* s, int i)
{
Q_UNUSED(proc);
Q_UNUSED(proc);
- QCString temp(s,i+1);
+ TQCString temp(s,i+1);
if(temp.isEmpty() || temp == "\n") return;
}
void CommandEngine::slotGetScriptOutput(KProcess* proc, char* s, int i)
{
Q_UNUSED(proc);
- QCString temp(s,i+1);
+ TQCString temp(s,i+1);
if(temp.isEmpty() || temp == "\n") return;
- m_processOutput += QString::fromLocal8Bit(temp);
+ m_processOutput += TQString::fromLocal8Bit(temp);
}
void CommandEngine::slotProcessExited(KProcess* proc)
diff --git a/kfilereplace/commandengine.h b/kfilereplace/commandengine.h
index cff15b29..a3b7d374 100644
--- a/kfilereplace/commandengine.h
+++ b/kfilereplace/commandengine.h
@@ -21,7 +21,7 @@
// QT
class QString;
-#include <qobject.h>
+#include <tqobject.h>
//KDE
class KProcess;
@@ -30,7 +30,7 @@ class CommandEngine : public QObject
{
Q_OBJECT
private:
- QString m_processOutput;
+ TQString m_processOutput;
public:
CommandEngine() {}
@@ -39,14 +39,14 @@ class CommandEngine : public QObject
/**
These functions implement the KFR commands
*/
- QString datetime(const QString& opt, const QString& arg);
- QString user(const QString& opt, const QString& arg);
- QString loadfile(const QString& opt, const QString& arg);
- QString empty(const QString& opt, const QString& arg);
- QString mathexp(const QString& opt, const QString& arg);
- QString random(const QString& opt, const QString& arg);
- QString stringmanip(const QString& opt, const QString& arg);
- QString variableValue(const QString &variable);
+ TQString datetime(const TQString& opt, const TQString& arg);
+ TQString user(const TQString& opt, const TQString& arg);
+ TQString loadfile(const TQString& opt, const TQString& arg);
+ TQString empty(const TQString& opt, const TQString& arg);
+ TQString mathexp(const TQString& opt, const TQString& arg);
+ TQString random(const TQString& opt, const TQString& arg);
+ TQString stringmanip(const TQString& opt, const TQString& arg);
+ TQString variableValue(const TQString &variable);
private slots:
void slotGetScriptOutput(KProcess*,char*,int);
diff --git a/kfilereplace/configurationclasses.cpp b/kfilereplace/configurationclasses.cpp
index 848eafdc..f0c6bcc4 100644
--- a/kfilereplace/configurationclasses.cpp
+++ b/kfilereplace/configurationclasses.cpp
@@ -84,14 +84,14 @@ RCOptions& RCOptions::operator=(const RCOptions& ci)
}
//ResultViewEntry Class
-ResultViewEntry::ResultViewEntry(QString nkey, QString ndata, bool regexp, bool caseSensitive)
+ResultViewEntry::ResultViewEntry(TQString nkey, TQString ndata, bool regexp, bool caseSensitive)
{
m_caseSensitive = caseSensitive;
m_regexp = regexp;
if(regexp)
{
- m_rxKey = QRegExp("("+nkey+")", caseSensitive, false);
+ m_rxKey = TQRegExp("("+nkey+")", caseSensitive, false);
}
else
{
@@ -102,12 +102,12 @@ ResultViewEntry::ResultViewEntry(QString nkey, QString ndata, bool regexp, bool
m_pos = 0;
}
-int ResultViewEntry::lineNumber(const QString& line) const
+int ResultViewEntry::lineNumber(const TQString& line) const
{
return line.mid(0,m_pos).contains('\n')+1;
}
-int ResultViewEntry::columnNumber(const QString& line) const
+int ResultViewEntry::columnNumber(const TQString& line) const
{
return(m_pos - line.findRev('\n',m_pos));
}
@@ -127,7 +127,7 @@ bool ResultViewEntry::regexp()const
return m_regexp;
}
-int ResultViewEntry::pos(const QString& line)
+int ResultViewEntry::pos(const TQString& line)
{
if(m_regexp)
m_pos = m_rxKey.search(line,m_pos);
@@ -149,9 +149,9 @@ void ResultViewEntry::incPos()
}
-QString ResultViewEntry::capturedText(const QString& line)
+TQString ResultViewEntry::capturedText(const TQString& line)
{
- QString cap;
+ TQString cap;
if(m_regexp)
cap = m_rxKey.cap(1);
@@ -161,11 +161,11 @@ QString ResultViewEntry::capturedText(const QString& line)
return cap;
}
-QString ResultViewEntry::message(const QString& capturedText, int x, int y) const
+TQString ResultViewEntry::message(const TQString& capturedText, int x, int y) const
{
- QString data = m_data;
- //return i18n(" captured text \"%1\" replaced with \"%2\" at line: %3, column: %4 ").arg(capturedText).arg(data).arg(QString::number(x,10)).arg(QString::number(y,10));
- return i18n(" Line:%3,Col:%4 - \"%1\" -> \"%2\"").arg(capturedText).arg(data).arg(QString::number(x,10)).arg(QString::number(y,10));
+ TQString data = m_data;
+ //return i18n(" captured text \"%1\" replaced with \"%2\" at line: %3, column: %4 ").arg(capturedText).arg(data).arg(TQString::number(x,10)).arg(TQString::number(y,10));
+ return i18n(" Line:%3,Col:%4 - \"%1\" -> \"%2\"").arg(capturedText).arg(data).arg(TQString::number(x,10)).arg(TQString::number(y,10));
}
int ResultViewEntry::keyLength() const
@@ -181,7 +181,7 @@ int ResultViewEntry::dataLength() const
return m_data.length();
}
-void ResultViewEntry::updateLine(QString& line)
+void ResultViewEntry::updateLine(TQString& line)
{
line.insert(m_pos, m_data);
line.remove(m_pos + dataLength(), keyLength());
diff --git a/kfilereplace/configurationclasses.h b/kfilereplace/configurationclasses.h
index 82bff991..0d36261b 100644
--- a/kfilereplace/configurationclasses.h
+++ b/kfilereplace/configurationclasses.h
@@ -18,44 +18,44 @@
#define CONFIGURATIONCLASSES_H
// QT
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
-#include <qmap.h>
-#include <qregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
+#include <tqmap.h>
+#include <tqregexp.h>
-typedef QMap<QString,QString> KeyValueMap;
+typedef TQMap<TQString,TQString> KeyValueMap;
// entry strings in the kfilereplacerc file
-const QString rcDirectoriesList = "Directories list";
-const QString rcFiltersList = "Filters list";
-const QString rcRecentFiles = "Recent files";
-const QString rcAllStringsMustBeFound = "All strings must be found";
-const QString rcEncoding = "Encoding";
-const QString rcCaseSensitive = "Case sensitive";
-const QString rcConfirmStrings = "Confirm strings";
-const QString rcConfirmFiles = "Confirm files";
-const QString rcConfirmDirs = "Confirm directories";
-const QString rcFollowSymLinks = "Follow symbolic links";
-const QString rcHaltOnFirstOccur = "Halt on first occurrence";
-const QString rcIgnoreHidden = "Ignore hidden files";
-const QString rcRecursive = "Search/replace in sub folders";
-const QString rcVariables = "Enable variables";
-const QString rcRegularExpressions = "Enable regular expressions";
-const QString rcMinFileSize = "Minimum file size";
-const QString rcMaxFileSize = "Maximum file size";
-const QString rcValidAccessDate = "Access mode";
-const QString rcMinDate = "Minimum access date";
-const QString rcMaxDate = "Maximum access date";
-const QString rcOwnerUser = "Owner user filters";
-const QString rcOwnerGroup = "Owner group filters";
-const QString rcSearchMode = "Search only mode";
-const QString rcBackupExtension = "Backup file extension";
-const QString rcIgnoreFiles = "Ignore files if there is no match";
-const QString rcNotifyOnErrors = "NotifyOnErrors";
-const QString rcAskConfirmReplace = "Ask confirmation on replace";
-const QString rcDontAskAgain = "Dont ask again";
+const TQString rcDirectoriesList = "Directories list";
+const TQString rcFiltersList = "Filters list";
+const TQString rcRecentFiles = "Recent files";
+const TQString rcAllStringsMustBeFound = "All strings must be found";
+const TQString rcEncoding = "Encoding";
+const TQString rcCaseSensitive = "Case sensitive";
+const TQString rcConfirmStrings = "Confirm strings";
+const TQString rcConfirmFiles = "Confirm files";
+const TQString rcConfirmDirs = "Confirm directories";
+const TQString rcFollowSymLinks = "Follow symbolic links";
+const TQString rcHaltOnFirstOccur = "Halt on first occurrence";
+const TQString rcIgnoreHidden = "Ignore hidden files";
+const TQString rcRecursive = "Search/replace in sub folders";
+const TQString rcVariables = "Enable variables";
+const TQString rcRegularExpressions = "Enable regular expressions";
+const TQString rcMinFileSize = "Minimum file size";
+const TQString rcMaxFileSize = "Maximum file size";
+const TQString rcValidAccessDate = "Access mode";
+const TQString rcMinDate = "Minimum access date";
+const TQString rcMaxDate = "Maximum access date";
+const TQString rcOwnerUser = "Owner user filters";
+const TQString rcOwnerGroup = "Owner group filters";
+const TQString rcSearchMode = "Search only mode";
+const TQString rcBackupExtension = "Backup file extension";
+const TQString rcIgnoreFiles = "Ignore files if there is no match";
+const TQString rcNotifyOnErrors = "NotifyOnErrors";
+const TQString rcAskConfirmReplace = "Ask confirmation on replace";
+const TQString rcDontAskAgain = "Dont ask again";
// Default configuration options
-const QString EncodingOption = "utf8";
+const TQString EncodingOption = "utf8";
const bool RecursiveOption = true;
const bool CaseSensitiveOption = false;
const bool FollowSymbolicLinksOption = false;
@@ -64,11 +64,11 @@ const bool VariablesOption = false;
const bool StopWhenFirstOccurenceOption = false;
const bool IgnoreHiddenOption = false;
const int FileSizeOption = -1;
-const QString AccessDateOption="unknown";
-const QString ValidAccessDateOption="unknown";
-const QString OwnerOption="false,Name,Equals To";
+const TQString AccessDateOption="unknown";
+const TQString ValidAccessDateOption="unknown";
+const TQString OwnerOption="false,Name,Equals To";
const bool SearchModeOption=true;
-const QString BackupExtensionOption="false,~";
+const TQString BackupExtensionOption="false,~";
const bool IgnoreFilesOption = true;
const bool NotifyOnErrorsOption = false;
const bool AskConfirmReplaceOption = false;
@@ -82,18 +82,18 @@ class RCOptions
bool m_askConfirmReplace,
m_dontAskAgain;
- QStringList m_directories;
- QStringList m_filters;
- QString m_currentDirectory;
+ TQStringList m_directories;
+ TQStringList m_filters;
+ TQString m_currentDirectory;
int m_minSize,
m_maxSize;
- QString m_dateAccess,
+ TQString m_dateAccess,
m_minDate,
m_maxDate;
- QString m_encoding;
+ TQString m_encoding;
bool m_caseSensitive,
m_recursive,
@@ -111,23 +111,23 @@ class RCOptions
bool m_ownerUserIsChecked,
m_ownerGroupIsChecked;
- QString m_ownerUserType,
+ TQString m_ownerUserType,
m_ownerGroupType,
m_ownerUserValue,
m_ownerGroupValue,
m_ownerUserBool,
m_ownerGroupBool;
- QString m_backupExtension;
+ TQString m_backupExtension;
bool m_ignoreFiles;
KeyValueMap m_mapStringsView;
- QString m_quickSearchString,
+ TQString m_quickSearchString,
m_quickReplaceString;
- QStringList m_recentStringFileList;
+ TQStringList m_recentStringFileList;
bool m_notifyOnErrors;
@@ -139,27 +139,27 @@ class RCOptions
class ResultViewEntry
{
private:
- QString m_key;
- QString m_data;
- QRegExp m_rxKey;
+ TQString m_key;
+ TQString m_data;
+ TQRegExp m_rxKey;
bool m_regexp;
bool m_caseSensitive;
int m_pos;
int m_matchedStringsOccurrence;
public:
- ResultViewEntry(QString nkey, QString ndata, bool regexp, bool caseSensitive);
- int lineNumber(const QString& line) const ;
- int columnNumber(const QString& line) const ;
+ ResultViewEntry(TQString nkey, TQString ndata, bool regexp, bool caseSensitive);
+ int lineNumber(const TQString& line) const ;
+ int columnNumber(const TQString& line) const ;
void incOccurrences();
int occurrences() const ;
bool regexp()const ;
- int pos(const QString& line) ;
+ int pos(const TQString& line) ;
void incPos();
- QString capturedText(const QString& line) ;
- QString message(const QString& capturedText, int x, int y) const;
+ TQString capturedText(const TQString& line) ;
+ TQString message(const TQString& capturedText, int x, int y) const;
int keyLength() const;
int dataLength() const;
- void updateLine(QString& line);
+ void updateLine(TQString& line);
};
#endif
diff --git a/kfilereplace/kaddstringdlg.cpp b/kfilereplace/kaddstringdlg.cpp
index 44b51f30..18f8895d 100644
--- a/kfilereplace/kaddstringdlg.cpp
+++ b/kfilereplace/kaddstringdlg.cpp
@@ -16,13 +16,13 @@
* *
***************************************************************************/
// QT
-#include <qtextedit.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qlistview.h>
-#include <qwhatsthis.h>
-#include <qwidgetstack.h>
+#include <tqtextedit.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqlistview.h>
+#include <tqwhatsthis.h>
+#include <tqwidgetstack.h>
// KDE
#include <kmessagebox.h>
@@ -37,7 +37,7 @@
using namespace whatthisNameSpace;
-KAddStringDlg::KAddStringDlg(RCOptions* info, bool wantEdit, QWidget *parent, const char *name) : KAddStringDlgS(parent,name,true)
+KAddStringDlg::KAddStringDlg(RCOptions* info, bool wantEdit, TQWidget *parent, const char *name) : KAddStringDlgS(parent,name,true)
{
m_option = info;
m_wantEdit = wantEdit;
@@ -45,12 +45,12 @@ KAddStringDlg::KAddStringDlg(RCOptions* info, bool wantEdit, QWidget *parent, co
initGUI();
- connect(m_pbOK, SIGNAL(clicked()), this, SLOT(slotOK()));
- connect(m_rbSearchOnly, SIGNAL(pressed()), this, SLOT(slotSearchOnly()));
- connect(m_rbSearchReplace, SIGNAL(pressed()), this, SLOT(slotSearchReplace()));
- connect(m_pbAdd, SIGNAL(clicked()), this, SLOT(slotAddStringToView()));
- connect(m_pbDel, SIGNAL(clicked()), this, SLOT(slotDeleteStringFromView()));
- connect(m_pbHelp, SIGNAL(clicked()), this ,SLOT(slotHelp()));
+ connect(m_pbOK, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOK()));
+ connect(m_rbSearchOnly, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotSearchOnly()));
+ connect(m_rbSearchReplace, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotSearchReplace()));
+ connect(m_pbAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddStringToView()));
+ connect(m_pbDel, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeleteStringFromView()));
+ connect(m_pbHelp, TQT_SIGNAL(clicked()), this ,TQT_SLOT(slotHelp()));
whatsThis();
}
@@ -58,8 +58,8 @@ KAddStringDlg::KAddStringDlg(RCOptions* info, bool wantEdit, QWidget *parent, co
//PRIVATE
void KAddStringDlg::initGUI()
{
- m_pbAdd->setIconSet(SmallIconSet(QString::fromLatin1("forward")));
- m_pbDel->setIconSet(SmallIconSet(QString::fromLatin1("back")));
+ m_pbAdd->setIconSet(SmallIconSet(TQString::fromLatin1("forward")));
+ m_pbDel->setIconSet(SmallIconSet(TQString::fromLatin1("back")));
m_stack->addWidget(m_stringView);
m_stack->addWidget(m_stringView_2);
@@ -94,14 +94,14 @@ void KAddStringDlg::initGUI()
void KAddStringDlg::eraseViewItems()
{
- QListViewItem* item = m_sv->firstChild();
+ TQListViewItem* item = m_sv->firstChild();
if(item == 0)
return;
else
{
while(item)
{
- QListViewItem* tempItem = item;
+ TQListViewItem* tempItem = item;
item = item->nextSibling();
delete tempItem;
}
@@ -118,9 +118,9 @@ void KAddStringDlg::raiseView()
m_stack->raiseWidget(m_sv);
}
-bool KAddStringDlg::columnContains(QListView* lv,const QString& s, int column)
+bool KAddStringDlg::columnContains(TQListView* lv,const TQString& s, int column)
{
- QListViewItem* i = lv->firstChild();
+ TQListViewItem* i = lv->firstChild();
while (i != 0)
{
if(i->text(column) == s)
@@ -132,11 +132,11 @@ bool KAddStringDlg::columnContains(QListView* lv,const QString& s, int column)
void KAddStringDlg::saveViewContentIntoMap()
{
- QListViewItem* i = m_sv->firstChild();
+ TQListViewItem* i = m_sv->firstChild();
while(i != 0)
{
if(m_option->m_searchingOnlyMode)
- m_currentMap[i->text(0)] = QString::null;
+ m_currentMap[i->text(0)] = TQString::null;
else
m_currentMap[i->text(0)] = i->text(1);
i = i->nextSibling();
@@ -149,7 +149,7 @@ void KAddStringDlg::loadMapIntoView()
for (itMap = m_currentMap.begin(); itMap != m_currentMap.end(); ++itMap)
{
- QListViewItem* temp = new QListViewItem(m_sv);
+ TQListViewItem* temp = new TQListViewItem(m_sv);
temp->setText(0,itMap.key());
if(!m_option->m_searchingOnlyMode)
temp->setText(1,itMap.data());
@@ -158,10 +158,10 @@ void KAddStringDlg::loadMapIntoView()
void KAddStringDlg::whatsThis()
{
- QWhatsThis::add(m_rbSearchOnly, rbSearchOnlyWhatthis);
- QWhatsThis::add(m_rbSearchReplace, rbSearchReplaceWhatthis);
- QWhatsThis::add(m_edSearch, edSearchWhatthis);
- QWhatsThis::add(m_edReplace, edReplaceWhatthis);
+ TQWhatsThis::add(m_rbSearchOnly, rbSearchOnlyWhatthis);
+ TQWhatsThis::add(m_rbSearchReplace, rbSearchReplaceWhatthis);
+ TQWhatsThis::add(m_edSearch, edSearchWhatthis);
+ TQWhatsThis::add(m_edReplace, edReplaceWhatthis);
}
//PRIVATE SLOTS
@@ -208,24 +208,24 @@ void KAddStringDlg::slotAddStringToView()
{
if(m_option->m_searchingOnlyMode)
{
- QString text = m_edSearch->text();
+ TQString text = m_edSearch->text();
if(!(text.isEmpty() || columnContains(m_sv, text, 0)))
{
- QListViewItem* lvi = new QListViewItem(m_sv);
+ TQListViewItem* lvi = new TQListViewItem(m_sv);
lvi->setMultiLinesEnabled(true);
lvi->setText(0,text);
- m_currentMap[text] = QString::null;
+ m_currentMap[text] = TQString::null;
m_edSearch->clear();
}
}
else
{
- QString searchText = m_edSearch->text(),
+ TQString searchText = m_edSearch->text(),
replaceText = m_edReplace->text();
if(!(searchText.isEmpty() || replaceText.isEmpty() || columnContains(m_sv,searchText,0) || columnContains(m_sv,replaceText,1)))
{
- QListViewItem* lvi = new QListViewItem(m_sv);
+ TQListViewItem* lvi = new TQListViewItem(m_sv);
lvi->setMultiLinesEnabled(true);
lvi->setText(0,searchText);
m_edSearch->clear();
@@ -239,7 +239,7 @@ void KAddStringDlg::slotAddStringToView()
void KAddStringDlg::slotDeleteStringFromView()
{
// Choose current item or selected item
- QListViewItem* currentItem = m_sv->currentItem();
+ TQListViewItem* currentItem = m_sv->currentItem();
// Do nothing if list is empty
if(currentItem == 0)
@@ -266,7 +266,7 @@ void KAddStringDlg::slotDeleteStringFromView()
void KAddStringDlg::slotHelp()
{
- kapp->invokeHelp(QString::null, "kfilereplace");
+ kapp->invokeHelp(TQString::null, "kfilereplace");
}
#include "kaddstringdlg.moc"
diff --git a/kfilereplace/kaddstringdlg.h b/kfilereplace/kaddstringdlg.h
index f51e7f77..23c446f4 100644
--- a/kfilereplace/kaddstringdlg.h
+++ b/kfilereplace/kaddstringdlg.h
@@ -30,12 +30,12 @@ class KAddStringDlg : public KAddStringDlgS
Q_OBJECT
private:
RCOptions* m_option;
- QListView* m_sv;
+ TQListView* m_sv;
KeyValueMap m_currentMap;
bool m_wantEdit;
public: //Constructors
- KAddStringDlg(RCOptions* info, bool wantEdit, QWidget *parent=0, const char *name=0);
+ KAddStringDlg(RCOptions* info, bool wantEdit, TQWidget *parent=0, const char *name=0);
private slots:
void slotOK();
@@ -65,7 +65,7 @@ class KAddStringDlg : public KAddStringDlgS
/**
* Verifies whether 'lv' contains 's'
*/
- bool columnContains(QListView* lv,const QString& s, int column);
+ bool columnContains(TQListView* lv,const TQString& s, int column);
void saveViewContentIntoMap();
void loadMapIntoView();
void whatsThis();
diff --git a/kfilereplace/kfilereplace.cpp b/kfilereplace/kfilereplace.cpp
index a6ade0fe..48b26f83 100644
--- a/kfilereplace/kfilereplace.cpp
+++ b/kfilereplace/kfilereplace.cpp
@@ -36,9 +36,9 @@ KFileReplace::KFileReplace()
if (m_part)
{
setCentralWidget(m_part->widget());
- KStdAction::quit(this, SLOT(close()), actionCollection());
- KStdAction::keyBindings(this, SLOT(slotConfigureKeys()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(slotConfigureToolbars()), actionCollection());
+ KStdAction::quit(this, TQT_SLOT(close()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(slotConfigureKeys()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(slotConfigureToolbars()), actionCollection());
setStandardToolBarMenuEnabled(true);
createGUI(m_part);
removeDuplicatedActions();
@@ -65,8 +65,8 @@ void KFileReplace::openURL(const KURL &url)
void KFileReplace::slotConfigureKeys()
{
KKeyDialog dlg( false, this );
- QPtrList<KXMLGUIClient> clients = guiFactory()->clients();
- for( QPtrListIterator<KXMLGUIClient> it( clients );
+ TQPtrList<KXMLGUIClient> clients = guiFactory()->clients();
+ for( TQPtrListIterator<KXMLGUIClient> it( clients );
it.current(); ++it )
{
dlg.insert( (*it)->actionCollection() );
@@ -78,8 +78,8 @@ void KFileReplace::slotConfigureToolbars()
{
saveMainWindowSettings(KGlobal::config(), autoSaveGroup());
KEditToolbar dlg(factory());
- connect(&dlg, SIGNAL(newToolbarConfig()),
- this, SLOT(applyNewToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()),
+ this, TQT_SLOT(applyNewToolbarConfig()));
dlg.exec();
}
@@ -99,7 +99,7 @@ void KFileReplace::removeDuplicatedActions()
if (!part_about_action || !part_report_action || !part_help_action || !part_action_collection)
return;
- QWidget* container = part_about_action->container(0);
+ TQWidget* container = part_about_action->container(0);
part_about_action->unplug(container);
part_report_action->unplug(container);
part_help_action->unplug(container);
diff --git a/kfilereplace/kfilereplaceiface.h b/kfilereplace/kfilereplaceiface.h
index ab7348d2..3c62ae99 100644
--- a/kfilereplace/kfilereplaceiface.h
+++ b/kfilereplace/kfilereplaceiface.h
@@ -24,7 +24,7 @@ class KFileReplaceIface : virtual public DCOPObject
K_DCOP
k_dcop:
- virtual void openURL(const QString& url) = 0;
+ virtual void openURL(const TQString& url) = 0;
};
#endif // KFILEREPLACEIFACE_H
diff --git a/kfilereplace/kfilereplacelib.cpp b/kfilereplace/kfilereplacelib.cpp
index e57a3a84..6e0d8323 100644
--- a/kfilereplace/kfilereplacelib.cpp
+++ b/kfilereplace/kfilereplacelib.cpp
@@ -20,10 +20,10 @@
***************************************************************************/
//QT
-#include <qstringlist.h>
-#include <qwidget.h>
-#include <qlistview.h>
-#include <qfileinfo.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
+#include <tqlistview.h>
+#include <tqfileinfo.h>
//KDE
#include <kdebug.h>
@@ -48,10 +48,10 @@ const double tera = 1099511627776.0;//1024^4
.................* fileName: second path (can be "/doc/html/", or "doc/html/" or "doc/html/index.html" for example)
Return values:...* Full valid path (without double "/")
*/
-QString KFileReplaceLib::formatFullPath(const QString& basePath, const QString &fileName)
+TQString KFileReplaceLib::formatFullPath(const TQString& basePath, const TQString &fileName)
{
- QString fullPath = basePath;
- QString fname = fileName;
+ TQString fullPath = basePath;
+ TQString fname = fileName;
if (fname.startsWith("/")) // skip beginning '/'
fname = fname.remove(0,1);
@@ -70,10 +70,10 @@ QString KFileReplaceLib::formatFullPath(const QString& basePath, const QString &
.................* extension: extension to add without "." (ex: "html", "kfr")
Return values:...* Filename / Filepath with the extension
*/
-QString KFileReplaceLib::addExtension(const QString& fileName, const QString& extension)
+TQString KFileReplaceLib::addExtension(const TQString& fileName, const TQString& extension)
{
- QString fullExtension = ".";
- QString fname = fileName;
+ TQString fullExtension = ".";
+ TQString fname = fileName;
fullExtension.append(extension);
@@ -89,9 +89,9 @@ QString KFileReplaceLib::addExtension(const QString& fileName, const QString& ex
return fname;
}
-QString KFileReplaceLib::formatFileSize(double size)
+TQString KFileReplaceLib::formatFileSize(double size)
{
- QString stringSize;
+ TQString stringSize;
if(size < kilo)
{
@@ -102,24 +102,24 @@ QString KFileReplaceLib::formatFileSize(double size)
if(size >= kilo && size < mega)
{
double d = size / kilo;
- stringSize = i18n("%1 KB").arg(QString::number(d,'f',2));
+ stringSize = i18n("%1 KB").arg(TQString::number(d,'f',2));
}
else
if(size >= mega && size < giga)
{
double d = size / mega;
- stringSize = i18n("%1 MB").arg(QString::number(d,'f',2));
+ stringSize = i18n("%1 MB").arg(TQString::number(d,'f',2));
}
else
if(size >= giga)
{
double d = size / giga;
- stringSize = i18n("%1 GB").arg(QString::number(d,'f',2));
+ stringSize = i18n("%1 GB").arg(TQString::number(d,'f',2));
}
return stringSize;
}
-void KFileReplaceLib::convertOldToNewKFRFormat(const QString& fileName, KListView* stringView)
+void KFileReplaceLib::convertOldToNewKFRFormat(const TQString& fileName, KListView* stringView)
{
//this method convert old format in new XML-based format
typedef struct
@@ -133,7 +133,7 @@ void KFileReplaceLib::convertOldToNewKFRFormat(const QString& fileName, KListVie
FILE* f = fopen(fileName.ascii(),"rb");
int err = fread(&head, sizeof(KFRHeader), 1, f);
- QString pgm(head.pgm);
+ TQString pgm(head.pgm);
if(!f || (err != 1) || (pgm != "KFileReplace"))
{
@@ -147,7 +147,7 @@ void KFileReplaceLib::convertOldToNewKFRFormat(const QString& fileName, KListVie
newTextSize,
errors = 0,
stringSize;
- QStringList l;
+ TQStringList l;
int i ;
for (i=0; i < head.stringNumber; i++)
@@ -177,7 +177,7 @@ void KFileReplaceLib::convertOldToNewKFRFormat(const QString& fileName, KListVie
KMessageBox::error(0, i18n("Cannot read data."));
else
{
- QListViewItem* lvi = new QListViewItem(stringView);
+ TQListViewItem* lvi = new TQListViewItem(stringView);
lvi->setText(0,oldString);
lvi->setText(1,newString);
@@ -195,13 +195,13 @@ void KFileReplaceLib::convertOldToNewKFRFormat(const QString& fileName, KListVie
return ;
}
-bool KFileReplaceLib::isAnAccessibleFile(const QString& filePath, const QString& fileName, RCOptions* info)
+bool KFileReplaceLib::isAnAccessibleFile(const TQString& filePath, const TQString& fileName, RCOptions* info)
{
- QString bkExt = info->m_backupExtension;
+ TQString bkExt = info->m_backupExtension;
if(fileName == ".." || fileName == "." || (!bkExt.isEmpty() && fileName.right(bkExt.length()) == bkExt))
return false;
- QFileInfo fi;
+ TQFileInfo fi;
if(filePath.isEmpty())
fi.setFile(fileName);
else
@@ -212,12 +212,12 @@ bool KFileReplaceLib::isAnAccessibleFile(const QString& filePath, const QString&
int minSize = info->m_minSize,
maxSize = info->m_maxSize;
- QString minDate = info->m_minDate,
+ TQString minDate = info->m_minDate,
maxDate = info->m_maxDate,
dateAccess = info->m_dateAccess;
// Avoid files that not match access date requirements
- QString last = "unknown";
+ TQString last = "unknown";
if(dateAccess == "Last Writing Access")
last = fi.lastModified().toString(Qt::ISODate);
if(dateAccess == "Last Reading Access")
@@ -255,11 +255,11 @@ bool KFileReplaceLib::isAnAccessibleFile(const QString& filePath, const QString&
// Avoid files that not match ownership requirements
if(info->m_ownerUserIsChecked)
{
- QString fileOwnerUser;
+ TQString fileOwnerUser;
if(info->m_ownerUserType == "Name")
fileOwnerUser = fi.owner();
else
- fileOwnerUser = QString::number(fi.ownerId(),10);
+ fileOwnerUser = TQString::number(fi.ownerId(),10);
if(info->m_ownerUserBool == "Equals To")
{
@@ -275,11 +275,11 @@ bool KFileReplaceLib::isAnAccessibleFile(const QString& filePath, const QString&
if(info->m_ownerGroupIsChecked)
{
- QString fileOwnerGroup;
+ TQString fileOwnerGroup;
if(info->m_ownerGroupType == "Name")
fileOwnerGroup = fi.group();
else
- fileOwnerGroup = QString::number(fi.groupId(),10);
+ fileOwnerGroup = TQString::number(fi.groupId(),10);
if(info->m_ownerGroupBool == "Equals To")
{
if(info->m_ownerGroupValue != fileOwnerGroup)
@@ -296,10 +296,10 @@ bool KFileReplaceLib::isAnAccessibleFile(const QString& filePath, const QString&
return true;
}
-void KFileReplaceLib::setIconForFileEntry(QListViewItem* item, QString path)
+void KFileReplaceLib::setIconForFileEntry(TQListViewItem* item, TQString path)
{
- QFileInfo fi(path);
- QString extension = fi.extension(),
+ TQFileInfo fi(path);
+ TQString extension = fi.extension(),
baseName = fi.baseName();
KeyValueMap extensionMap;
diff --git a/kfilereplace/kfilereplacelib.h b/kfilereplace/kfilereplacelib.h
index e5c14c72..de80d17d 100644
--- a/kfilereplace/kfilereplacelib.h
+++ b/kfilereplace/kfilereplacelib.h
@@ -38,7 +38,7 @@ class KFileReplaceLib
.................* filename: second path (can be "/doc/html/", or "doc/html/" or "doc/html/index.html" for example)
Return values:...* Full valid path (without double "/")
*/
- static QString formatFullPath(const QString& basePath, const QString& fileName);
+ static TQString formatFullPath(const TQString& basePath, const TQString& fileName);
/**
Add an extension to a filename, or a filepath
@@ -46,20 +46,20 @@ class KFileReplaceLib
.................* extension: extension to add without "." (ex: "html", "kfr")
Return values:...* Filename / Filepath with the extension
*/
- static QString addExtension(const QString& fileName, const QString& extension);
+ static TQString addExtension(const TQString& fileName, const TQString& extension);
- static QString formatFileSize(double size);
+ static TQString formatFileSize(double size);
/**
converts the old kfr format file in the new xml-based format.
*/
- static void convertOldToNewKFRFormat(const QString& fileName, KListView* stringView);
+ static void convertOldToNewKFRFormat(const TQString& fileName, KListView* stringView);
/**
Verifies that files, which we are scanning, respect some
conditions
*/
- static bool isAnAccessibleFile(const QString& filePath, const QString& fileName, RCOptions* info);
+ static bool isAnAccessibleFile(const TQString& filePath, const TQString& fileName, RCOptions* info);
- static void setIconForFileEntry(QListViewItem* item, QString path);
+ static void setIconForFileEntry(TQListViewItem* item, TQString path);
};
#endif // KFILEREPLACEFILELIB_H
diff --git a/kfilereplace/kfilereplacepart.cpp b/kfilereplace/kfilereplacepart.cpp
index 9e0be192..adfd6a4f 100644
--- a/kfilereplace/kfilereplacepart.cpp
+++ b/kfilereplace/kfilereplacepart.cpp
@@ -13,11 +13,11 @@
//
// QT
-#include <qdir.h>
-#include <qdatastream.h>
-#include <qregexp.h>
-#include <qimage.h>
-#include <qtextcodec.h>
+#include <tqdir.h>
+#include <tqdatastream.h>
+#include <tqregexp.h>
+#include <tqimage.h>
+#include <tqtextcodec.h>
// KDE
#include <dcopclient.h>
@@ -60,7 +60,7 @@ typedef KParts::GenericFactory<KFileReplacePart> FileReplaceFactory;
K_EXPORT_COMPONENT_FACTORY( libkfilereplacepart, FileReplaceFactory )
-KFileReplacePart::KFileReplacePart(QWidget* parentWidget, const char* , QObject* parent, const char* name, const QStringList & ) : KParts::ReadOnlyPart(parent,name)
+KFileReplacePart::KFileReplacePart(TQWidget* parentWidget, const char* , TQObject* parent, const char* name, const TQStringList & ) : KParts::ReadOnlyPart(parent,name)
{
setInstance(FileReplaceFactory::instance());
KGlobal::locale()->insertCatalogue("kfilereplace");
@@ -68,7 +68,7 @@ KFileReplacePart::KFileReplacePart(QWidget* parentWidget, const char* , QObject*
m_config = new KConfig("kfilereplacerc");
m_aboutDlg = 0;
m_stop = false;
- m_optionMask = QDir::Files;
+ m_optionMask = TQDir::Files;
m_w = widget();
m_option = 0;
@@ -114,13 +114,13 @@ void KFileReplacePart::slotSearchingOperation()
rv->setSorting(-1);
// show wait cursor
- QApplication::setOverrideCursor( Qt::waitCursor );
+ TQApplication::setOverrideCursor( Qt::waitCursor );
freezeActions();
setOptionMask();
- QString currentDirectory = m_option->m_directories[0],
+ TQString currentDirectory = m_option->m_directories[0],
currentFilter = m_option->m_filters[0];
//m_currentDir = currentDirectory;
@@ -146,7 +146,7 @@ void KFileReplacePart::slotSearchingOperation()
// restore false status for stop button
m_stop = false;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
emit setStatusBarText(i18n("Search completed."));
@@ -179,7 +179,7 @@ void KFileReplacePart::slotReplacingOperation()
rv->setColumnText(4,i18n("Replaced strings"));
}
// show wait cursor
- QApplication::setOverrideCursor( Qt::waitCursor );
+ TQApplication::setOverrideCursor( Qt::waitCursor );
freezeActions();
@@ -189,7 +189,7 @@ void KFileReplacePart::slotReplacingOperation()
m_view->showSemaphore("green");
- QString currentDirectory = m_option->m_directories[0];
+ TQString currentDirectory = m_option->m_directories[0];
m_view->showSemaphore("red");
@@ -210,7 +210,7 @@ void KFileReplacePart::slotReplacingOperation()
// restore false status for stop button
m_stop = false;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
m_option->m_searchingOnlyMode = false;
@@ -232,7 +232,7 @@ void KFileReplacePart::slotStop()
{
emit setStatusBarText(i18n("Stopping..."));
m_stop = true;
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
resetActions();
}
@@ -248,21 +248,21 @@ void KFileReplacePart::slotCreateReport()
return ;
}
// Select the file where results will be saved
- QString documentName = KFileDialog::getSaveFileName(QString::null, "*.xml|XML " + i18n("Files") + " (*.xml)", m_w, i18n("Save Report"));
+ TQString documentName = KFileDialog::getSaveFileName(TQString::null, "*.xml|XML " + i18n("Files") + " (*.xml)", m_w, i18n("Save Report"));
if (documentName.isEmpty())
return ;
// delete a spourious extension
documentName.truncate(documentName.length()-4);
- QFileInfo fileInfo(documentName);
+ 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));
return ;
}
- QDir directoryName;
+ TQDir directoryName;
if(!directoryName.mkdir(documentName, true))
{
@@ -272,7 +272,7 @@ void KFileReplacePart::slotCreateReport()
directoryName.cd(documentName);
- QString documentPath = documentName+"/"+directoryName.dirName();
+ TQString documentPath = documentName+"/"+directoryName.dirName();
Report report(m_option, rv, sv);
report.createDocument(documentPath);
@@ -291,8 +291,8 @@ void KFileReplacePart::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,
//then we start the search now.
- QString qs = m_option->m_quickSearchString;
- QStringList map;
+ TQString qs = m_option->m_quickSearchString;
+ TQStringList map;
map.append(qs.left(1));
map.append(qs.right(qs.length()-1));
@@ -344,8 +344,8 @@ void KFileReplacePart::slotStringsSave()
void KFileReplacePart::slotStringsLoad()
{
// Selects the file to load from
- QString menu = "*.kfr|" + i18n("KFileReplace strings") + " (*.kfr)\n*|"+i18n("All Files") + " (*)";
- QString fileName = KFileDialog::getOpenFileName(QString::null, menu, m_w, i18n("Load Strings From File"));
+ 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"));
if(!fileName.isEmpty())
loadRulesFile(fileName);
@@ -367,14 +367,14 @@ void KFileReplacePart::slotStringsInvertAll()
void KFileReplacePart::slotOpenRecentStringFile(const KURL& urlFile)
{
- QString fileName;
+ TQString fileName;
// Downloads file if need (if url is "http://...")
if (!(KIO::NetAccess::download(urlFile, fileName, 0)))
return;
// Checks it's not a directory
- QFileInfo fileInfo;
+ TQFileInfo fileInfo;
fileInfo.setFile(fileName);
if(fileInfo.isDir())
{
@@ -431,7 +431,7 @@ void KFileReplacePart::slotOptionPreferences()
void KFileReplacePart::showAboutApplication()
{
- m_aboutDlg = new KAboutApplication(createAboutData(), (QWidget *)0, (const char *)0, false);
+ m_aboutDlg = new KAboutApplication(createAboutData(), (TQWidget *)0, (const char *)0, false);
if(m_aboutDlg == 0)
return;
@@ -443,7 +443,7 @@ void KFileReplacePart::showAboutApplication()
void KFileReplacePart::appHelpActivated()
{
- kapp->invokeHelp(QString::null, "kfilereplace");
+ kapp->invokeHelp(TQString::null, "kfilereplace");
}
void KFileReplacePart::reportBug()
@@ -567,48 +567,48 @@ void KFileReplacePart::initGUI()
}
}
// File
- (void)new KAction(i18n("Customize Search/Replace Session..."), "projectopen", 0, this, SLOT(slotSetNewParameters()), actionCollection(), "new_project");
- (void)new KAction(i18n("&Search"), "filesearch", 0, this, SLOT(slotSearchingOperation()), actionCollection(), "search");
- (void)new KAction(i18n("S&imulate"), "filesimulate", 0, this, SLOT(slotSimulatingOperation()), actionCollection(), "file_simulate");
- (void)new KAction(i18n("&Replace"), "filereplace", 0, this, SLOT(slotReplacingOperation()), actionCollection(), "replace");
- (void)new KAction(i18n("Sto&p"), "stop", 0, this, SLOT(slotStop()), actionCollection(), "stop");
- (void)new KAction(i18n("Cre&ate Report File..."), "filesaveas", 0, this, SLOT(slotCreateReport()), actionCollection(), "save_results");
+ (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");
// Strings
- (void)new KAction(i18n("&Add String..."), "editadd", 0, this, SLOT(slotStringsAdd()), actionCollection(), "strings_add");
+ (void)new KAction(i18n("&Add String..."), "editadd", 0, this, TQT_SLOT(slotStringsAdd()), actionCollection(), "strings_add");
- (void)new KAction(i18n("&Delete String"), "editremove", 0, this, SLOT(slotStringsDeleteItem()), actionCollection(), "strings_del");
- (void)new KAction(i18n("&Empty Strings List"), "editdelete", 0, this, SLOT(slotStringsEmpty()), actionCollection(), "strings_empty");
- (void)new KAction(i18n("Edit Selected String..."), "edit", 0, this, SLOT(slotStringsEdit()), actionCollection(), "strings_edit");
- (void)new KAction(i18n("&Save Strings List to File..."), "filesaveas", 0, this, SLOT(slotStringsSave()), actionCollection(), "strings_save");
- (void)new KAction(i18n("&Load Strings List From File..."), "unsortedList", 0, this, SLOT(slotStringsLoad()), actionCollection(), "strings_load");
- (void)new KRecentFilesAction(i18n("&Load Recent Strings Files"), "fileopen", 0, this, SLOT(slotOpenRecentStringFile(const KURL&)), actionCollection(),"strings_load_recent");
- (void)new KAction(i18n("&Invert Current String (search <--> replace)"), "invert", 0, this, SLOT(slotStringsInvertCur()), actionCollection(), "strings_invert");
- (void)new KAction(i18n("&Invert All Strings (search <--> replace)"), "invert", 0, this, SLOT(slotStringsInvertAll()), actionCollection(), "strings_invert_all");
+ (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");
// Options
- (void)new KToggleAction(i18n("&Include Sub-Folders"), "recursive_option", 0, this, SLOT(slotOptionRecursive()), actionCollection(), "options_recursive");
- (void)new KToggleAction(i18n("Create &Backup Files"), "backup_option", 0, this, SLOT(slotOptionBackup()), actionCollection(), "options_backup");
- (void)new KToggleAction(i18n("Case &Sensitive"), "casesensitive_option", 0, this, SLOT(slotOptionCaseSensitive()), actionCollection(), "options_case");
- (void)new KToggleAction(i18n("Enable Commands &in Replace String: [$command:option$]"), "command_option", 0, this, SLOT(slotOptionVariables()), actionCollection(), "options_var");
- (void)new KToggleAction(i18n("Enable &Regular Expressions"), "regularexpression_option", 0, this, SLOT(slotOptionRegularExpressions()), actionCollection(), "options_regularexpressions");
- (void)new KAction(i18n("Configure &KFileReplace..."), "configure", 0, this, SLOT(slotOptionPreferences()), actionCollection(), "configure_kfilereplace");
+ (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");
// Results
- (void)new KAction(i18n("&Properties"), "informations", 0, m_view, SLOT(slotResultProperties()), actionCollection(), "results_infos");
- (void)new KAction(i18n("&Open"), "filenew", 0, m_view, SLOT(slotResultOpen()), actionCollection(), "results_openfile");
+ (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");
if(quantaFound)
{
- (void)new KAction(i18n("&Edit in Quanta"), "quanta", 0, m_view, SLOT(slotResultEdit()), actionCollection(), "results_editfile");
+ (void)new KAction(i18n("&Edit in Quanta"), "quanta", 0, m_view, TQT_SLOT(slotResultEdit()), actionCollection(), "results_editfile");
}
- (void)new KAction(i18n("Open Parent &Folder"), "fileopen", 0, m_view, SLOT(slotResultDirOpen()), actionCollection(), "results_opendir");
- (void)new KAction(i18n("&Delete"), "editdelete", 0, m_view, SLOT(slotResultDelete()), actionCollection(), "results_delete");
- (void)new KAction(i18n("E&xpand Tree"), 0, m_view, SLOT(slotResultTreeExpand()), actionCollection(), "results_treeexpand");
- (void)new KAction(i18n("&Reduce Tree"), 0, m_view, SLOT(slotResultTreeReduce()), actionCollection(), "results_treereduce");
- (void)new KAction(i18n("&About KFileReplace"), "kfilereplace", 0, this, SLOT(showAboutApplication()), actionCollection(), "help_about_kfilereplace");
- (void)new KAction(i18n("KFileReplace &Handbook"), "help", 0, this, SLOT(appHelpActivated()), actionCollection(), "help_kfilereplace");
- (void)new KAction(i18n("&Report Bug"), 0, 0, this, SLOT(reportBug()), actionCollection(), "report_bug");
+ (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");
}
@@ -703,7 +703,7 @@ void KFileReplacePart::loadOptions()
m_option->m_askConfirmReplace = m_config->readBoolEntry(rcAskConfirmReplace, AskConfirmReplaceOption);
- QString dontAskAgain = m_config->readEntry(rcDontAskAgain, "no");
+ TQString dontAskAgain = m_config->readEntry(rcDontAskAgain, "no");
if(dontAskAgain == "yes")
m_option->m_askConfirmReplace = false;
@@ -730,7 +730,7 @@ void KFileReplacePart::loadOwnerOptions()
{
m_config->setGroup("Owner options");
- QStringList ownerList = QStringList::split(',',m_config->readEntry(rcOwnerUser, OwnerOption),true);
+ TQStringList ownerList = TQStringList::split(',',m_config->readEntry(rcOwnerUser, OwnerOption),true);
if(ownerList[0] == "true")
m_option->m_ownerUserIsChecked = true;
else
@@ -740,7 +740,7 @@ void KFileReplacePart::loadOwnerOptions()
m_option->m_ownerUserBool = ownerList[2];
m_option->m_ownerUserValue = ownerList[3];
- ownerList = QStringList::split(',',m_config->readEntry(rcOwnerGroup, OwnerOption),true);
+ ownerList = TQStringList::split(',',m_config->readEntry(rcOwnerGroup, OwnerOption),true);
if(ownerList[0] == "true")
m_option->m_ownerGroupIsChecked = true;
@@ -755,7 +755,7 @@ void KFileReplacePart::loadOwnerOptions()
void KFileReplacePart::loadLocationsList()
{
m_config->setGroup("Directories");
- QStringList locationsEntryList;
+ TQStringList locationsEntryList;
#if KDE_IS_VERSION(3,1,3)
locationsEntryList = m_config->readPathListEntry(rcDirectoriesList);
#else
@@ -763,14 +763,14 @@ void KFileReplacePart::loadLocationsList()
#endif
if(locationsEntryList.isEmpty())
- locationsEntryList.append(QDir::current().path());
+ locationsEntryList.append(TQDir::current().path());
m_option->m_directories = locationsEntryList;
}
void KFileReplacePart::loadFiltersList()
{
- QStringList filtersEntryList;
+ TQStringList filtersEntryList;
m_config->setGroup("Filters");
#if KDE_IS_VERSION(3,1,3)
@@ -788,7 +788,7 @@ void KFileReplacePart::loadFiltersList()
void KFileReplacePart::loadBackupExtensionOptions()
{
m_config->setGroup("Options");
- QStringList bkList = QStringList::split(',',
+ TQStringList bkList = TQStringList::split(',',
m_config->readEntry(rcBackupExtension, BackupExtensionOption),
true);
if(bkList[0] == "true")
@@ -866,7 +866,7 @@ void KFileReplacePart::saveOwnerOptions()
{
m_config->setGroup("Owner options");
- QString list;
+ TQString list;
if(m_option->m_ownerUserIsChecked)
list = "true,";
else
@@ -916,7 +916,7 @@ void KFileReplacePart::saveFiltersList()
void KFileReplacePart::saveBackupExtensionOptions()
{
m_config->setGroup("Options");
- QString bkOptions;
+ TQString bkOptions;
if(m_option->m_backup)
bkOptions = "true," + m_option->m_backupExtension;
else
@@ -928,21 +928,21 @@ void KFileReplacePart::saveBackupExtensionOptions()
void KFileReplacePart::fileReplace()
{
- QString directoryName = m_option->m_directories[0];
- QDir d(directoryName);
+ TQString directoryName = m_option->m_directories[0];
+ TQDir d(directoryName);
d.setMatchAllDirs(true);
d.setFilter(m_optionMask);
- QString currentFilter = m_option->m_filters[0];
- QStringList filesList = d.entryList(currentFilter);
- QStringList::iterator filesIt;
+ TQString currentFilter = m_option->m_filters[0];
+ TQStringList filesList = d.entryList(currentFilter);
+ TQStringList::iterator filesIt;
int filesNumber = 0;
m_view->displayScannedFiles(filesNumber);
for (filesIt = filesList.begin(); filesIt != filesList.end() ; ++filesIt)
{
- QString fileName = (*filesIt);
+ TQString fileName = (*filesIt);
// m_stop == true means that we pushed the stop button
if(m_stop)
@@ -962,21 +962,21 @@ void KFileReplacePart::fileReplace()
}
}
-void KFileReplacePart::recursiveFileReplace(const QString& directoryName, int& filesNumber)
+void KFileReplacePart::recursiveFileReplace(const TQString& directoryName, int& filesNumber)
{
//if m_stop == true then interrupts recursion
if(m_stop)
return;
else
{
- QDir d(directoryName);
+ TQDir d(directoryName);
d.setMatchAllDirs(true);
d.setFilter(m_optionMask);
- QString currentFilter = m_option->m_filters[0];
- QStringList filesList = d.entryList(currentFilter);
- QStringList::iterator filesIt;
+ TQString currentFilter = m_option->m_filters[0];
+ TQStringList filesList = d.entryList(currentFilter);
+ TQStringList::iterator filesIt;
for(filesIt = filesList.begin(); filesIt != filesList.end(); ++filesIt)
{
@@ -984,15 +984,15 @@ void KFileReplacePart::recursiveFileReplace(const QString& directoryName, int& f
if(m_stop)
break;
- QString fileName = (*filesIt);
+ TQString fileName = (*filesIt);
// Avoids files that not match requirements
if(!KFileReplaceLib::isAnAccessibleFile(d.canonicalPath(),fileName, m_option))
continue;
- QString filePath = d.canonicalPath()+"/"+fileName;
+ TQString filePath = d.canonicalPath()+"/"+fileName;
- QFileInfo qi(filePath);
+ TQFileInfo qi(filePath);
m_view->displayScannedFiles(filesNumber);
@@ -1014,30 +1014,30 @@ void KFileReplacePart::recursiveFileReplace(const QString& directoryName, int& f
}
}
-void KFileReplacePart::replaceAndBackup(const QString& currentDir, const QString& oldFileName)
+void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQString& oldFileName)
{
//Creates a path string
- QString oldPathString = currentDir+"/"+oldFileName;
+ TQString oldPathString = currentDir+"/"+oldFileName;
- QFile currentFile(oldPathString);
+ 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),QString::null, rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(oldFileName),TQString::null, rcNotifyOnErrors);
return ;
}
- QTextStream currentStream(&currentFile);
+ TQTextStream currentStream(&currentFile);
if (m_option->m_encoding == "utf8")
- currentStream.setEncoding(QTextStream::UnicodeUTF8);
+ currentStream.setEncoding(TQTextStream::UnicodeUTF8);
else
- currentStream.setCodec(QTextCodec::codecForName(m_option->m_encoding));
- QString line = currentStream.read(),
+ currentStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding));
+ TQString line = currentStream.read(),
backupLine = line;
- QString backupSize = KFileReplaceLib::formatFileSize(currentFile.size());
+ TQString backupSize = KFileReplaceLib::formatFileSize(currentFile.size());
currentFile.close();
- QString backupExtension = m_option->m_backupExtension;
+ TQString backupExtension = m_option->m_backupExtension;
bool atLeastOneStringFound = false;
KListViewItem *item = 0;
@@ -1058,17 +1058,17 @@ void KFileReplacePart::replaceAndBackup(const QString& currentDir, const QString
{
if(atLeastOneStringFound)
{
- QFile newFile(oldPathString);
+ 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),QString::null, rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for writing.</qt>").arg(oldFileName),TQString::null, rcNotifyOnErrors);
return ;
}
- QTextStream newStream(&newFile);
+ TQTextStream newStream(&newFile);
if (m_option->m_encoding == "utf8")
- newStream.setEncoding(QTextStream::UnicodeUTF8);
+ newStream.setEncoding(TQTextStream::UnicodeUTF8);
else
- newStream.setCodec(QTextCodec::codecForName(m_option->m_encoding));
+ newStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding));
newStream << line;
newFile.close();
}
@@ -1077,14 +1077,14 @@ void KFileReplacePart::replaceAndBackup(const QString& currentDir, const QString
if(!m_option->m_ignoreFiles)
atLeastOneStringFound = true;
- QFileInfo oldFileInfo(oldPathString);
+ TQFileInfo oldFileInfo(oldPathString);
if(atLeastOneStringFound && item/* && atLeastOneStringConfirmed*/)
{
KFileReplaceLib::setIconForFileEntry(item,currentDir+"/"+oldFileName);
item->setText(0,oldFileName);
item->setText(1,currentDir);
- QString newSize = KFileReplaceLib::formatFileSize(oldFileInfo.size());
+ TQString newSize = KFileReplaceLib::formatFileSize(oldFileInfo.size());
if(!m_option->m_simulation)
{
item->setText(2, backupSize);
@@ -1096,33 +1096,33 @@ void KFileReplacePart::replaceAndBackup(const QString& currentDir, const QString
item->setText(3, "-");
}
- item->setText(4,QString::number(occurrence,10));
- item->setText(5,QString("%1[%2]").arg(oldFileInfo.owner()).arg(oldFileInfo.ownerId()));
- item->setText(6,QString("%1[%2]").arg(oldFileInfo.group()).arg(oldFileInfo.groupId()));
+ 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()));
}
}
-void KFileReplacePart::replaceAndOverwrite(const QString& currentDir, const QString& oldFileName)
+void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQString& oldFileName)
{
- QString oldPathString = currentDir+"/"+oldFileName;
- QFile oldFile(oldPathString);
- QFileInfo oldFileInfo(oldPathString);
+ TQString oldPathString = currentDir+"/"+oldFileName;
+ TQFile oldFile(oldPathString);
+ TQFileInfo oldFileInfo(oldPathString);
if (!oldFile.open(IO_ReadOnly))
{
- KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(oldFile.name()),QString::null, rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(oldFile.name()),TQString::null, rcNotifyOnErrors);
return ;
}
- QString fileSizeBeforeReplacing = KFileReplaceLib::formatFileSize(oldFileInfo.size());
+ TQString fileSizeBeforeReplacing = KFileReplaceLib::formatFileSize(oldFileInfo.size());
KListViewItem *item = 0;
- QTextStream oldStream( &oldFile );
+ TQTextStream oldStream( &oldFile );
if (m_option->m_encoding == "utf8")
- oldStream.setEncoding(QTextStream::UnicodeUTF8);
+ oldStream.setEncoding(TQTextStream::UnicodeUTF8);
else
- oldStream.setCodec(QTextCodec::codecForName(m_option->m_encoding));
- QString line = oldStream.read();
+ oldStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding));
+ TQString line = oldStream.read();
oldFile.close();
@@ -1136,24 +1136,24 @@ void KFileReplacePart::replaceAndOverwrite(const QString& currentDir, const QStr
{
if(atLeastOneStringFound)
{
- QFile newFile(oldPathString);
+ 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()),QString::null, rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for writing.</qt>").arg(newFile.name()),TQString::null, rcNotifyOnErrors);
return ;
}
- QTextStream newStream( &newFile );
+ TQTextStream newStream( &newFile );
if (m_option->m_encoding == "utf8")
- newStream.setEncoding(QTextStream::UnicodeUTF8);
+ newStream.setEncoding(TQTextStream::UnicodeUTF8);
else
- newStream.setCodec(QTextCodec::codecForName(m_option->m_encoding));
+ newStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding));
newStream << line;
newFile.close();
}
}
- QFileInfo nf(oldPathString);
- QString fileSizeAfterReplacing = KFileReplaceLib::formatFileSize(nf.size());
+ TQFileInfo nf(oldPathString);
+ TQString fileSizeAfterReplacing = KFileReplaceLib::formatFileSize(nf.size());
//if ignoreFiles == false then every files must be show
if(!m_option->m_ignoreFiles)
@@ -1170,13 +1170,13 @@ void KFileReplacePart::replaceAndOverwrite(const QString& currentDir, const QStr
else
item->setText(3,"-");
- item->setText(4,QString::number(occurrence,10));
- item->setText(5,QString("%1[%2]").arg(oldFileInfo.owner()).arg(oldFileInfo.ownerId()));
- item->setText(6,QString("%1[%2]").arg(oldFileInfo.group()).arg(oldFileInfo.groupId()));
+ 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()));
}
}
-void KFileReplacePart::replacingLoop(QString& line, KListViewItem** item, bool& atLeastOneStringFound, int& occur, bool regularExpression, bool& askConfirmReplace)
+void KFileReplacePart::replacingLoop(TQString& line, KListViewItem** item, bool& atLeastOneStringFound, int& occur, bool regularExpression, bool& askConfirmReplace)
{
KeyValueMap tempMap = m_replacementMap;
KeyValueMap::Iterator it;
@@ -1204,7 +1204,7 @@ void KFileReplacePart::replacingLoop(QString& line, KListViewItem** item, bool&
if(answer == KMessageBox::Yes)
{
atLeastOneStringFound = true;
- QString msg = entry.message(entry.capturedText(line),
+ TQString msg = entry.message(entry.capturedText(line),
entry.lineNumber(line),
entry.columnNumber(line));
@@ -1226,7 +1226,7 @@ void KFileReplacePart::replacingLoop(QString& line, KListViewItem** item, bool&
else
{
atLeastOneStringFound = true;
- QString msg = entry.message(entry.capturedText(line),
+ TQString msg = entry.message(entry.capturedText(line),
entry.lineNumber(line),
entry.columnNumber(line));
@@ -1244,16 +1244,16 @@ void KFileReplacePart::replacingLoop(QString& line, KListViewItem** item, bool&
}
}
-void KFileReplacePart::fileSearch(const QString& directoryName, const QString& filters)
+void KFileReplacePart::fileSearch(const TQString& directoryName, const TQString& filters)
{
- QDir d(directoryName);
+ TQDir d(directoryName);
d.setMatchAllDirs(true);
d.setFilter(m_optionMask);
- QStringList filesList = d.entryList(filters);
- QString filePath = d.canonicalPath();
- QStringList::iterator filesIt;
+ TQStringList filesList = d.entryList(filters);
+ TQString filePath = d.canonicalPath();
+ TQStringList::iterator filesIt;
uint filesNumber = 0;
m_view->displayScannedFiles(filesNumber);
@@ -1264,13 +1264,13 @@ void KFileReplacePart::fileSearch(const QString& directoryName, const QString& f
if(m_stop)
break;
- QString fileName = (*filesIt);
+ TQString fileName = (*filesIt);
// Avoids files that not match
if(!KFileReplaceLib::isAnAccessibleFile(filePath, fileName, m_option))
continue;
- QFileInfo fileInfo(filePath+"/"+fileName);
+ TQFileInfo fileInfo(filePath+"/"+fileName);
if(fileInfo.isDir())
continue;
kapp->processEvents();
@@ -1280,21 +1280,21 @@ void KFileReplacePart::fileSearch(const QString& directoryName, const QString& f
}
}
-void KFileReplacePart::recursiveFileSearch(const QString& directoryName, const QString& filters, uint& filesNumber)
+void KFileReplacePart::recursiveFileSearch(const TQString& directoryName, const TQString& filters, uint& filesNumber)
{
// if m_stop == true then interrupt recursion
if(m_stop)
return;
else
{
- QDir d(directoryName);
+ TQDir d(directoryName);
d.setMatchAllDirs(true);
d.setFilter(m_optionMask);
- QStringList filesList = d.entryList(filters);
- QString filePath = d.canonicalPath();
- QStringList::iterator filesIt;
+ TQStringList filesList = d.entryList(filters);
+ TQString filePath = d.canonicalPath();
+ TQStringList::iterator filesIt;
for(filesIt = filesList.begin(); filesIt != filesList.end(); ++filesIt)
{
@@ -1302,13 +1302,13 @@ void KFileReplacePart::recursiveFileSearch(const QString& directoryName, const Q
if(m_stop)
break;
- QString fileName = (*filesIt);
+ TQString fileName = (*filesIt);
// Avoids files that not match
if(!KFileReplaceLib::isAnAccessibleFile(filePath, fileName, m_option))
continue;
// Composes file path string
- QFileInfo fileInfo(filePath+"/"+fileName);
+ TQFileInfo fileInfo(filePath+"/"+fileName);
m_view->displayScannedFiles(filesNumber);
@@ -1326,25 +1326,25 @@ void KFileReplacePart::recursiveFileSearch(const QString& directoryName, const Q
}
}
-void KFileReplacePart::search(const QString& currentDir, const QString& fileName)
+void KFileReplacePart::search(const TQString& currentDir, const TQString& fileName)
{
- QFile file(currentDir+"/"+fileName);
+ TQFile file(currentDir+"/"+fileName);
if(!file.open(IO_ReadOnly))
{
- KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(fileName), QString::null, rcNotifyOnErrors);
+ KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(fileName), TQString::null, rcNotifyOnErrors);
return ;
}
// Creates a stream with the file
- QTextStream stream( &file );
+ TQTextStream stream( &file );
if (m_option->m_encoding == "utf8")
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
else
- stream.setCodec(QTextCodec::codecForName(m_option->m_encoding));
- QString line = stream.read();
+ stream.setCodec(TQTextCodec::codecForName(m_option->m_encoding));
+ TQString line = stream.read();
file.close();
- QFileInfo fileInfo(currentDir+"/"+fileName);
+ TQFileInfo fileInfo(currentDir+"/"+fileName);
KListViewItem *item = 0;
@@ -1366,12 +1366,12 @@ void KFileReplacePart::search(const QString& currentDir, const QString& fileName
if(m_stop)
break;
- QString key = it.key();
- QString strKey;
- QRegExp rxKey;
+ TQString key = it.key();
+ TQString strKey;
+ TQRegExp rxKey;
if(m_option->m_regularExpressions)
- rxKey = QRegExp("("+key+")", m_option->m_caseSensitive, false);
+ rxKey = TQRegExp("("+key+")", m_option->m_caseSensitive, false);
else
strKey = key;
/* If this option is true then for any string in
@@ -1395,7 +1395,7 @@ void KFileReplacePart::search(const QString& currentDir, const QString& fileName
item = new KListViewItem(rv);
KListViewItem* tempItem= new KListViewItem(item);
- QString msg,
+ TQString msg,
capturedText;
if(m_option->m_regularExpressions)
@@ -1403,7 +1403,7 @@ void KFileReplacePart::search(const QString& currentDir, const QString& fileName
else
capturedText = line.mid(pos,strKey.length());
- msg = i18n(" Line:%2, Col:%3 - \"%1\"").arg(capturedText).arg(QString::number(lineNumber,10)).arg(QString::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;
@@ -1427,7 +1427,7 @@ void KFileReplacePart::search(const QString& currentDir, const QString& fileName
break;
atLeastOneStringFound = true;
- QString msg,
+ TQString msg,
capturedText;
int lineNumber = line.mid(0,pos).contains('\n')+1;
int columnNumber = pos - line.findRev('\n',pos);
@@ -1443,7 +1443,7 @@ void KFileReplacePart::search(const QString& currentDir, const QString& fileName
pos = line.find(strKey,pos+strKey.length());
}
- msg = i18n(" Line:%2, Col:%3 - \"%1\"").arg(capturedText).arg(QString::number(lineNumber,10)).arg(QString::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);
@@ -1474,22 +1474,22 @@ void KFileReplacePart::search(const QString& currentDir, const QString& fileName
item->setText(0,fileName);
item->setText(1,currentDir);
item->setText(2,KFileReplaceLib::formatFileSize(fileInfo.size()));
- item->setText(3,QString::number(occurrence,10));
- item->setText(4,QString("%1[%2]").arg(fileInfo.owner()).arg(fileInfo.ownerId()));
- item->setText(5,QString("%1[%2]").arg(fileInfo.group()).arg(fileInfo.groupId()));
+ 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()
{
- /* Maps the content of the strings view to a QMap */
+ /* Maps the content of the strings view to a TQMap */
KeyValueMap tempMap;
CommandEngine command;
- QListViewItemIterator itlv(m_view->getStringsView());
+ TQListViewItemIterator itlv(m_view->getStringsView());
while(itlv.current())
{
- QListViewItem *item = itlv.current();
+ TQListViewItem *item = itlv.current();
if(m_option->m_variables)
tempMap[item->text(0)] = command.variableValue(item->text(1));
else
@@ -1499,12 +1499,12 @@ void KFileReplacePart::loadViewContent()
m_replacementMap = tempMap;
}
-void KFileReplacePart::loadRulesFile(const QString& fileName)
+void KFileReplacePart::loadRulesFile(const TQString& fileName)
{
/* Loads a file with kfr extension.
* creates a xml document and browses it*/
- QDomDocument doc("mydocument");
- QFile file(fileName);
+ TQDomDocument doc("mydocument");
+ TQFile file(fileName);
KListView* sv = m_view->getStringsView();
if(!file.open(IO_ReadOnly))
@@ -1529,9 +1529,9 @@ void KFileReplacePart::loadRulesFile(const QString& fileName)
//clears view
sv->clear();
- QDomElement docElem = doc.documentElement();
- QDomNode n = docElem.firstChild();
- QString searchAttribute = n.toElement().attribute("search").latin1();
+ TQDomElement docElem = doc.documentElement();
+ TQDomNode n = docElem.firstChild();
+ TQString searchAttribute = n.toElement().attribute("search").latin1();
KeyValueMap docMap;
@@ -1557,10 +1557,10 @@ void KFileReplacePart::loadRulesFile(const QString& fileName)
//Reads the string list
while(!n.isNull())
{
- QDomElement e = n.toElement(); // tries to convert the node to an element.
+ TQDomElement e = n.toElement(); // tries to convert the node to an element.
if(!e.isNull())
{
- QString oldString = e.firstChild().toElement().text(),
+ TQString oldString = e.firstChild().toElement().text(),
newString = e.lastChild().toElement().text();
docMap[oldString] = newString;
}
@@ -1568,7 +1568,7 @@ void KFileReplacePart::loadRulesFile(const QString& fileName)
}
// Adds file to "load strings form file" menu
- QStringList fileList = m_option->m_recentStringFileList;
+ TQStringList fileList = m_option->m_recentStringFileList;
if(!fileList.contains(fileName))
{
fileList.append(fileName);
@@ -1609,13 +1609,13 @@ bool KFileReplacePart::launchNewProjectDialog(const KURL & startURL)
void KFileReplacePart::setOptionMask()
{
- m_optionMask |= QDir::Dirs;
+ m_optionMask |= TQDir::Dirs;
if(!m_option->m_ignoreHidden)
- m_optionMask |= QDir::Hidden;
+ m_optionMask |= TQDir::Hidden;
if(!m_option->m_followSymLinks)
- m_optionMask |= QDir::NoSymLinks;
+ m_optionMask |= TQDir::NoSymLinks;
}
bool KFileReplacePart::checkBeforeOperation()
@@ -1631,11 +1631,11 @@ bool KFileReplacePart::checkBeforeOperation()
}
// Checks if the main directory can be accessed
- QString currentDirectory = m_option->m_directories[0];
- QDir dir;
+ TQString currentDirectory = m_option->m_directories[0];
+ TQDir dir;
dir.setPath(currentDirectory);
- QString directory = dir.absPath();
+ TQString directory = dir.absPath();
if(!dir.exists())
{
@@ -1643,7 +1643,7 @@ bool KFileReplacePart::checkBeforeOperation()
return false;
}
- QFileInfo dirInfo(directory);
+ TQFileInfo dirInfo(directory);
if(!(dirInfo.isReadable() && dirInfo.isExecutable())
|| (!m_option->m_searchingOnlyMode && !m_option->m_simulation && !(dirInfo.isWritable())))
{
@@ -1660,7 +1660,7 @@ bool KFileReplacePart::checkBeforeOperation()
bool KFileReplacePart::dontAskAgain()
{
m_config->setGroup("Notification Messages");
- QString dontAskAgain = m_config->readEntry(rcDontAskAgain, "no");
+ TQString dontAskAgain = m_config->readEntry(rcDontAskAgain, "no");
if(dontAskAgain == "yes")
return true;
else
diff --git a/kfilereplace/kfilereplacepart.h b/kfilereplace/kfilereplacepart.h
index 1c133cb5..a5044ff9 100644
--- a/kfilereplace/kfilereplacepart.h
+++ b/kfilereplace/kfilereplacepart.h
@@ -35,7 +35,7 @@ class KFileReplacePart: public KParts::ReadOnlyPart
private: //MEMBERS
KFileReplaceView* m_view;
- QWidget* m_parentWidget,
+ TQWidget* m_parentWidget,
* m_w;
KConfig* m_config;
KAboutApplication* m_aboutDlg;
@@ -46,11 +46,11 @@ class KFileReplacePart: public KParts::ReadOnlyPart
int m_optionMask;
public://Constructors
- KFileReplacePart(QWidget *parentWidget,
+ KFileReplacePart(TQWidget *parentWidget,
const char *widgetName,
- QObject *parent,
+ TQObject *parent,
const char *name,
- const QStringList &args);
+ const TQStringList &args);
~KFileReplacePart();
//SLOTS
@@ -132,23 +132,23 @@ class KFileReplacePart: public KParts::ReadOnlyPart
* Replacing methods
*/
void fileReplace();
- void recursiveFileReplace(const QString& dirName, int& filesNumber);
- void replaceAndBackup(const QString& currentDir, const QString& oldFileName);
- void replaceAndOverwrite(const QString& currentDir, const QString& oldFileName);
- void replacingLoop(QString& line, KListViewItem** item, bool& atLeastOneStringFound, int& occur, bool regularExpression, bool& askConfirmReplace);
+ void recursiveFileReplace(const TQString& dirName, int& filesNumber);
+ void replaceAndBackup(const TQString& currentDir, const TQString& oldFileName);
+ void replaceAndOverwrite(const TQString& currentDir, const TQString& oldFileName);
+ void replacingLoop(TQString& line, KListViewItem** item, bool& atLeastOneStringFound, int& occur, bool regularExpression, bool& askConfirmReplace);
/**
* Searching methods
*/
- void fileSearch(const QString& dirName, const QString& filters);
- void recursiveFileSearch(const QString& dirName, const QString& filters, uint& filesNumber);
- void search(const QString& currentDir, const QString& fileName);
+ void fileSearch(const TQString& dirName, const TQString& filters);
+ void recursiveFileSearch(const TQString& dirName, const TQString& filters, uint& filesNumber);
+ void search(const TQString& currentDir, const TQString& fileName);
/**
* Others methods
*/
void loadViewContent();
- void loadRulesFile(const QString& fileName);
+ void loadRulesFile(const TQString& fileName);
bool launchNewProjectDialog(const KURL& startURL);
void setOptionMask();
bool checkBeforeOperation();
diff --git a/kfilereplace/kfilereplaceview.cpp b/kfilereplace/kfilereplaceview.cpp
index 16ca82da..fc0d08aa 100644
--- a/kfilereplace/kfilereplaceview.cpp
+++ b/kfilereplace/kfilereplaceview.cpp
@@ -16,9 +16,9 @@
*****************************************************************************/
// Qt
-#include <qwhatsthis.h>
-#include <qmap.h>
-#include <qfileinfo.h>
+#include <tqwhatsthis.h>
+#include <tqmap.h>
+#include <tqfileinfo.h>
// KDE
#include <klistview.h>
@@ -43,35 +43,35 @@
using namespace whatthisNameSpace;
-KFileReplaceView::KFileReplaceView(RCOptions* info, QWidget *parent,const char *name):KFileReplaceViewWdg(parent,name)
+KFileReplaceView::KFileReplaceView(RCOptions* info, TQWidget *parent,const char *name):KFileReplaceViewWdg(parent,name)
{
m_option = info;
initGUI();
// connect events
- connect(m_lvResults, SIGNAL(mouseButtonClicked(int, QListViewItem *, const QPoint &, int)), this, SLOT(slotMouseButtonClicked(int, QListViewItem *, const QPoint &)));
- connect(m_lvResults_2, SIGNAL(mouseButtonClicked(int, QListViewItem *, const QPoint &, int)), this, SLOT(slotMouseButtonClicked(int, QListViewItem *, const QPoint &)));
- connect(m_lvStrings, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(slotStringsEdit()));
- connect(m_lvStrings_2, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(slotStringsEdit()));
+ connect(m_lvResults, TQT_SIGNAL(mouseButtonClicked(int, TQListViewItem *, const TQPoint &, int)), this, TQT_SLOT(slotMouseButtonClicked(int, TQListViewItem *, const TQPoint &)));
+ connect(m_lvResults_2, TQT_SIGNAL(mouseButtonClicked(int, TQListViewItem *, const TQPoint &, int)), this, TQT_SLOT(slotMouseButtonClicked(int, TQListViewItem *, const TQPoint &)));
+ connect(m_lvStrings, TQT_SIGNAL(doubleClicked(TQListViewItem *)), this, TQT_SLOT(slotStringsEdit()));
+ connect(m_lvStrings_2, TQT_SIGNAL(doubleClicked(TQListViewItem *)), this, TQT_SLOT(slotStringsEdit()));
whatsThis();
}
-QString KFileReplaceView::currentPath()
+TQString KFileReplaceView::currentPath()
{
- QListViewItem *lvi;
+ TQListViewItem *lvi;
if(! m_lviCurrent) lvi = m_rv->currentItem();
- else lvi = (QListViewItem*) m_lviCurrent;
+ else lvi = (TQListViewItem*) m_lviCurrent;
while (lvi->parent())
lvi = lvi->parent();
- return QString(lvi->text(1)+"/"+lvi->text(0));
+ return TQString(lvi->text(1)+"/"+lvi->text(0));
}
-void KFileReplaceView::showSemaphore(QString s)
+void KFileReplaceView::showSemaphore(TQString s)
{
if(s == "green")
{
@@ -97,7 +97,7 @@ void KFileReplaceView::showSemaphore(QString s)
void KFileReplaceView::stringsInvert(bool invertAll)
{
- QListViewItem* lviCurItem,
+ TQListViewItem* lviCurItem,
* lviFirst;
KListView* sv = getStringsView();
@@ -111,7 +111,7 @@ void KFileReplaceView::stringsInvert(bool invertAll)
do
{
- QString searchText = lviCurItem->text(0),
+ TQString searchText = lviCurItem->text(0),
replaceText = lviCurItem->text(1);
// Cannot invert the string when search string is empty
@@ -169,13 +169,13 @@ KListView* KFileReplaceView::getStringsView()
}
//PUBLIC SLOTS
-void KFileReplaceView::slotMouseButtonClicked (int button, QListViewItem *lvi, const QPoint &pos)
+void KFileReplaceView::slotMouseButtonClicked (int button, TQListViewItem *lvi, const TQPoint &pos)
{
if (lvi == 0) // No item selected
return;
// RIGHT BUTTON
- if (button == QMouseEvent::RightButton)
+ if (button == TQMouseEvent::RightButton)
{
m_lviCurrent = static_cast<KListViewItem*>(lvi);
m_menuResult->popup(pos);
@@ -184,7 +184,7 @@ void KFileReplaceView::slotMouseButtonClicked (int button, QListViewItem *lvi, c
void KFileReplaceView::slotResultProperties()
{
- QString currItem = currentPath();
+ TQString currItem = currentPath();
if(! currItem.isEmpty())
{
KURL url(currItem);
@@ -195,7 +195,7 @@ void KFileReplaceView::slotResultProperties()
void KFileReplaceView::slotResultOpen()
{
- QString currItem = currentPath();
+ TQString currItem = currentPath();
if(!currItem.isEmpty())
{
(void) new KRun(KURL(currItem), 0, true, true);
@@ -205,7 +205,7 @@ void KFileReplaceView::slotResultOpen()
void KFileReplaceView::slotResultOpenWith()
{
- QString currItem = currentPath();
+ TQString currItem = currentPath();
if(!currItem.isEmpty())
{
KURL::List kurls;
@@ -217,10 +217,10 @@ void KFileReplaceView::slotResultOpenWith()
void KFileReplaceView::slotResultDirOpen()
{
- QString currItem = currentPath();
+ TQString currItem = currentPath();
if(!currItem.isEmpty())
{
- QFileInfo fi;
+ TQFileInfo fi;
fi.setFile(currItem);
(void) new KRun (KURL::fromPathOrURL(fi.dirPath()), 0, true, true);
m_lviCurrent = 0;
@@ -229,14 +229,14 @@ void KFileReplaceView::slotResultDirOpen()
void KFileReplaceView::slotResultEdit()
{
- QListViewItem *lvi = m_rv->firstChild();
+ TQListViewItem *lvi = m_rv->firstChild();
while (lvi)
{
DCOPClient *client = kapp->dcopClient();
DCOPRef quanta(client->appId(),"WindowManagerIf");
- QString path = QString(lvi->text(1)+"/"+lvi->text(0));
- QListViewItem *lviChild = lvi;
+ TQString path = TQString(lvi->text(1)+"/"+lvi->text(0));
+ TQListViewItem *lviChild = lvi;
while(lviChild)
{
@@ -256,7 +256,7 @@ void KFileReplaceView::slotResultEdit()
if(!success)
{
- QString message = i18n("File %1 cannot be opened. Might be a DCOP problem.").arg(path);
+ TQString message = i18n("File %1 cannot be opened. Might be a DCOP problem.").arg(path);
KMessageBox::error(parentWidget(), message);
}
}
@@ -274,12 +274,12 @@ void KFileReplaceView::slotResultEdit()
void KFileReplaceView::slotResultDelete()
{
- QString currItem = currentPath();
+ TQString currItem = currentPath();
if (!currItem.isEmpty())
{
- QFile fi;
+ TQFile fi;
int answer = KMessageBox::warningContinueCancel(this, i18n("Do you really want to delete %1?").arg(currItem),
- QString::null,KStdGuiItem::del());
+ TQString::null,KStdGuiItem::del());
if(answer == KMessageBox::Continue)
{
@@ -294,7 +294,7 @@ void KFileReplaceView::slotResultDelete()
void KFileReplaceView::slotResultTreeExpand()
{
- QListViewItem *lviRoot = getResultsView()->firstChild();
+ TQListViewItem *lviRoot = getResultsView()->firstChild();
if(lviRoot)
expand(lviRoot, true);
@@ -302,7 +302,7 @@ void KFileReplaceView::slotResultTreeExpand()
void KFileReplaceView::slotResultTreeReduce()
{
- QListViewItem *lviRoot = getResultsView()->firstChild();
+ TQListViewItem *lviRoot = getResultsView()->firstChild();
if(lviRoot)
expand(lviRoot, false);
@@ -331,14 +331,14 @@ void KFileReplaceView::slotStringsAdd()
loadMapIntoView(addedStringsMap);
}
-void KFileReplaceView::slotQuickStringsAdd(const QString& quickSearch, const QString& quickReplace)
+void KFileReplaceView::slotQuickStringsAdd(const TQString& quickSearch, const TQString& quickReplace)
{
if(!quickSearch.isEmpty())
{
KeyValueMap map;
if(quickReplace.isEmpty())
{
- map[quickSearch] = QString::null;
+ map[quickSearch] = TQString::null;
m_option->m_searchingOnlyMode = true;
}
else
@@ -402,7 +402,7 @@ void KFileReplaceView::slotStringsSave()
return ;
}
- QString header("<?xml version=\"1.0\" ?>\n<kfr>"),
+ TQString header("<?xml version=\"1.0\" ?>\n<kfr>"),
footer("\n</kfr>"),
body;
if(m_option->m_searchingOnlyMode)
@@ -410,11 +410,11 @@ void KFileReplaceView::slotStringsSave()
else
header += "\n\t<mode search=\"false\"/>";
- QListViewItem* lvi = sv->firstChild();
+ TQListViewItem* lvi = sv->firstChild();
while( lvi )
{
- body += QString("\n\t<replacement>"
+ body += TQString("\n\t<replacement>"
"\n\t\t<oldstring><![CDATA[%1]]></oldstring>"
"\n\t\t<newstring><![CDATA[%2]]></newstring>"
"\n\t</replacement>").arg(lvi->text(0)).arg(lvi->text(1));
@@ -422,8 +422,8 @@ void KFileReplaceView::slotStringsSave()
}
// Selects the file where strings will be saved
- QString menu = "*.kfr|" + i18n("KFileReplace Strings") + " (*.kfr)\n*|" + i18n("All Files") + " (*)";
- QString fileName = KFileDialog::getSaveFileName(QString::null, menu, 0, i18n("Save Strings to File"));
+ TQString menu = "*.kfr|" + i18n("KFileReplace Strings") + " (*.kfr)\n*|" + i18n("All Files") + " (*)";
+ TQString fileName = KFileDialog::getSaveFileName(TQString::null, menu, 0, i18n("Save Strings to File"));
if (fileName.isEmpty())
return;
@@ -431,14 +431,14 @@ void KFileReplaceView::slotStringsSave()
fileName = KFileReplaceLib::addExtension(fileName, "kfr");
- QFile file( fileName );
+ TQFile file( fileName );
if(!file.open( IO_WriteOnly ))
{
KMessageBox::error(0, i18n("File %1 cannot be saved.").arg(fileName));
return ;
}
- QTextStream oTStream( &file );
- oTStream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream oTStream( &file );
+ oTStream.setEncoding(TQTextStream::UnicodeUTF8);
oTStream << header
<< body
<< footer;
@@ -447,7 +447,7 @@ void KFileReplaceView::slotStringsSave()
void KFileReplaceView::slotStringsDeleteItem()
{
- QListViewItem* item = m_sv->currentItem();
+ TQListViewItem* item = m_sv->currentItem();
if(item != 0)
{
KeyValueMap m = m_option->m_mapStringsView;
@@ -459,10 +459,10 @@ void KFileReplaceView::slotStringsDeleteItem()
void KFileReplaceView::slotStringsEmpty()
{
- QListViewItem * myChild = m_sv->firstChild();
+ TQListViewItem * myChild = m_sv->firstChild();
while( myChild )
{
- QListViewItem* item = myChild;
+ TQListViewItem* item = myChild;
myChild = myChild->nextSibling();
delete item;
}
@@ -498,15 +498,15 @@ void KFileReplaceView::initGUI()
- m_menuResult->insertItem(SmallIconSet(QString::fromLatin1("fileopen")),
+ m_menuResult->insertItem(SmallIconSet(TQString::fromLatin1("fileopen")),
i18n("&Open"),
this,
- SLOT(slotResultOpen()));
+ TQT_SLOT(slotResultOpen()));
if(!quantaFound)
{
m_menuResult->insertItem(i18n("Open &With..."),
this,
- SLOT(slotResultOpenWith()));
+ TQT_SLOT(slotResultOpenWith()));
}
if(quantaFound)
@@ -514,22 +514,22 @@ void KFileReplaceView::initGUI()
m_menuResult->insertItem(SmallIconSet("quanta"),
i18n("&Edit in Quanta"),
this,
- SLOT(slotResultEdit()));
+ TQT_SLOT(slotResultEdit()));
}
- m_menuResult->insertItem(SmallIconSet(QString::fromLatin1("up")),
+ m_menuResult->insertItem(SmallIconSet(TQString::fromLatin1("up")),
i18n("Open Parent &Folder"),
this,
- SLOT(slotResultDirOpen()));
- m_menuResult->insertItem(SmallIconSet(QString::fromLatin1("editdelete")),
+ TQT_SLOT(slotResultDirOpen()));
+ m_menuResult->insertItem(SmallIconSet(TQString::fromLatin1("editdelete")),
i18n("&Delete"),
this,
- SLOT(slotResultDelete()));
+ TQT_SLOT(slotResultDelete()));
m_menuResult->insertSeparator();
- m_menuResult->insertItem(SmallIconSet(QString::fromLatin1("info")),
+ m_menuResult->insertItem(SmallIconSet(TQString::fromLatin1("info")),
i18n("&Properties"),
this,
- SLOT(slotResultProperties()));
+ TQT_SLOT(slotResultProperties()));
raiseResultsView();
raiseStringsView();
}
@@ -554,18 +554,18 @@ void KFileReplaceView::raiseResultsView()
m_stackResults->raiseWidget(m_rv);
}
-coord KFileReplaceView::extractWordCoordinates(QListViewItem* lvi)
+coord KFileReplaceView::extractWordCoordinates(TQListViewItem* lvi)
{
//get coordinates of the first string of the current selected file
coord c;
c.line = 0;
c.column = 0;
- QString s = lvi->text(0);
+ TQString s = lvi->text(0);
//qWarning("WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW=%s",s.latin1());
/* if(lvi->parent()) s = lvi->text(0);
else return c;*/
- QString temp;
+ TQString temp;
int i = 0;
//extracts line and column from lvi->text(0)
@@ -591,7 +591,7 @@ coord KFileReplaceView::extractWordCoordinates(QListViewItem* lvi)
break;
}
c.line = temp.toInt();
- temp = QString::null;
+ temp = TQString::null;
while(true)
{
@@ -618,7 +618,7 @@ coord KFileReplaceView::extractWordCoordinates(QListViewItem* lvi)
return c;
}
-void KFileReplaceView::expand(QListViewItem *lviCurrent, bool b)
+void KFileReplaceView::expand(TQListViewItem *lviCurrent, bool b)
{
// current item
lviCurrent->setOpen(b);
@@ -636,11 +636,11 @@ void KFileReplaceView::expand(QListViewItem *lviCurrent, bool b)
void KFileReplaceView::setMap()
{
KeyValueMap map;
- QListViewItem* i = m_sv->firstChild();
+ TQListViewItem* i = m_sv->firstChild();
while(i != 0)
{
if(m_option->m_searchingOnlyMode)
- map[i->text(0)] = QString::null;
+ map[i->text(0)] = TQString::null;
else
map[i->text(0)] = i->text(1);
i = i->nextSibling();
@@ -655,7 +655,7 @@ void KFileReplaceView::loadMapIntoView(KeyValueMap map)
for(itMap = map.begin(); itMap != map.end(); ++itMap)
{
- QListViewItem* lvi = new QListViewItem(m_sv);
+ TQListViewItem* lvi = new TQListViewItem(m_sv);
lvi->setMultiLinesEnabled(true);
lvi->setText(0,itMap.key());
if(!m_option->m_searchingOnlyMode)
@@ -666,7 +666,7 @@ void KFileReplaceView::loadMapIntoView(KeyValueMap map)
void KFileReplaceView::whatsThis()
{
- QWhatsThis::add(getResultsView(), lvResultWhatthis);
- QWhatsThis::add(getStringsView(), lvStringsWhatthis);
+ TQWhatsThis::add(getResultsView(), lvResultWhatthis);
+ TQWhatsThis::add(getStringsView(), lvStringsWhatthis);
}
#include "kfilereplaceview.moc"
diff --git a/kfilereplace/kfilereplaceview.h b/kfilereplace/kfilereplaceview.h
index 21ac6a29..1c6af2d9 100644
--- a/kfilereplace/kfilereplaceview.h
+++ b/kfilereplace/kfilereplaceview.h
@@ -23,8 +23,8 @@
#endif
//QT
-#include <qlcdnumber.h>
-#include <qwidgetstack.h>
+#include <tqlcdnumber.h>
+#include <tqwidgetstack.h>
class QPixMap;
//KDE
@@ -65,12 +65,12 @@ class KFileReplaceView : public KFileReplaceViewWdg
* m_sv;
public://Constructors
- KFileReplaceView(RCOptions* info, QWidget *parent,const char *name);
+ KFileReplaceView(RCOptions* info, TQWidget *parent,const char *name);
public:
- QString currentPath();
- void showSemaphore(QString s);
- void displayScannedFiles(int filesNumber) { m_lcdFilesNumber->display(QString::number(filesNumber,10)); }
+ TQString currentPath();
+ void showSemaphore(TQString s);
+ void displayScannedFiles(int filesNumber) { m_lcdFilesNumber->display(TQString::number(filesNumber,10)); }
void stringsInvert(bool invertAll);
void changeView(bool searchingOnlyMode);
KListView* getResultsView();
@@ -82,7 +82,7 @@ class KFileReplaceView : public KFileReplaceViewWdg
//void emitSearchingOnlyMode(bool b) { emit searchingOnlyMode(b); }
public slots:
- void slotMouseButtonClicked (int button, QListViewItem *lvi, const QPoint &pos);
+ void slotMouseButtonClicked (int button, TQListViewItem *lvi, const TQPoint &pos);
void slotResultProperties();
void slotResultOpen();
void slotResultOpenWith();
@@ -92,7 +92,7 @@ class KFileReplaceView : public KFileReplaceViewWdg
void slotResultTreeExpand();
void slotResultTreeReduce();
void slotStringsAdd();
- void slotQuickStringsAdd(const QString& quickSearch, const QString& quickReplace);
+ void slotQuickStringsAdd(const TQString& quickSearch, const TQString& quickReplace);
void slotStringsDeleteItem();
void slotStringsEmpty();
void slotStringsEdit();
@@ -102,8 +102,8 @@ class KFileReplaceView : public KFileReplaceViewWdg
void initGUI();
void raiseStringsView();
void raiseResultsView();
- coord extractWordCoordinates(QListViewItem* lvi);
- void expand(QListViewItem *lviCurrent, bool b);
+ coord extractWordCoordinates(TQListViewItem* lvi);
+ void expand(TQListViewItem *lviCurrent, bool b);
void setMap();
void loadMapIntoView(KeyValueMap map);
void whatsThis();
diff --git a/kfilereplace/knewprojectdlg.cpp b/kfilereplace/knewprojectdlg.cpp
index 5428473b..b23c1eec 100644
--- a/kfilereplace/knewprojectdlg.cpp
+++ b/kfilereplace/knewprojectdlg.cpp
@@ -18,14 +18,14 @@
//QT
-#include <qwhatsthis.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qdatetimeedit.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qtextedit.h>
-#include <qlistview.h>
+#include <tqwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqdatetimeedit.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqtextedit.h>
+#include <tqlistview.h>
//KDE
#include <kseparator.h>
@@ -51,28 +51,28 @@
using namespace whatthisNameSpace;
-KNewProjectDlg::KNewProjectDlg(RCOptions* info, QWidget *parent, const char *name) : KNewProjectDlgS(parent, name)
+KNewProjectDlg::KNewProjectDlg(RCOptions* info, TQWidget *parent, const char *name) : KNewProjectDlgS(parent, name)
{
m_searchNowFlag = "";
m_option = info;
initGUI();
- connect(m_pbLocation, SIGNAL(clicked()), this, SLOT(slotDir()));
- connect(m_pbCancel, SIGNAL(clicked()), this, SLOT(slotReject()));
- connect(m_pbSearchNow, SIGNAL(clicked()), this, SLOT(slotSearchNow()));
- connect(m_pbSearchLater, SIGNAL(clicked()), this, SLOT(slotSearchLater()));
- connect(m_leSearch, SIGNAL(textChanged(const QString&)), this, SLOT(slotSearchLineEdit(const QString&)));
- connect(m_chbSizeMin, SIGNAL(toggled(bool)), this, SLOT(slotEnableSpinboxSizeMin(bool)));
- connect(m_chbSizeMax, SIGNAL(toggled(bool)), this, SLOT(slotEnableSpinboxSizeMax(bool)));
- connect(m_chbDateMin, SIGNAL(toggled(bool)), m_dedDateMin, SLOT(setEnabled(bool)));
- connect(m_chbDateMax, SIGNAL(toggled(bool)), m_dedDateMax, SLOT(setEnabled(bool)));
- connect(m_chbDateMin,SIGNAL(toggled(bool)),this, SLOT(slotEnableCbValidDate(bool)));
- connect(m_chbDateMax,SIGNAL(toggled(bool)),this, SLOT(slotEnableCbValidDate(bool)));
- connect(m_chbOwnerUser, SIGNAL(toggled(bool)), this, SLOT(slotEnableChbUser(bool)));
- connect(m_chbOwnerGroup, SIGNAL(toggled(bool)), this, SLOT(slotEnableChbGroup(bool)));
- connect(m_chbBackup, SIGNAL(toggled(bool)), this, SLOT(slotEnableChbBackup(bool)));
- connect(m_pbHelp, SIGNAL(clicked()), this, SLOT(slotHelp()));
+ connect(m_pbLocation, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDir()));
+ connect(m_pbCancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotReject()));
+ connect(m_pbSearchNow, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSearchNow()));
+ connect(m_pbSearchLater, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSearchLater()));
+ connect(m_leSearch, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotSearchLineEdit(const TQString&)));
+ connect(m_chbSizeMin, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEnableSpinboxSizeMin(bool)));
+ connect(m_chbSizeMax, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEnableSpinboxSizeMax(bool)));
+ connect(m_chbDateMin, TQT_SIGNAL(toggled(bool)), m_dedDateMin, TQT_SLOT(setEnabled(bool)));
+ connect(m_chbDateMax, TQT_SIGNAL(toggled(bool)), m_dedDateMax, TQT_SLOT(setEnabled(bool)));
+ connect(m_chbDateMin,TQT_SIGNAL(toggled(bool)),this, TQT_SLOT(slotEnableCbValidDate(bool)));
+ connect(m_chbDateMax,TQT_SIGNAL(toggled(bool)),this, TQT_SLOT(slotEnableCbValidDate(bool)));
+ connect(m_chbOwnerUser, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEnableChbUser(bool)));
+ connect(m_chbOwnerGroup, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEnableChbGroup(bool)));
+ connect(m_chbBackup, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEnableChbBackup(bool)));
+ connect(m_pbHelp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotHelp()));
whatsThis();
}
@@ -94,7 +94,7 @@ void KNewProjectDlg::saveRCOptions()
void KNewProjectDlg::slotDir()
{
- QString directoryString = KFileDialog::getExistingDirectory(QString::null, this, i18n("Project Directory"));
+ TQString directoryString = KFileDialog::getExistingDirectory(TQString::null, this, i18n("Project Directory"));
if(!directoryString.isEmpty())
m_cbLocation->setEditText(directoryString);
}
@@ -161,7 +161,7 @@ void KNewProjectDlg::slotSearchLater()
slotOK();
}
-void KNewProjectDlg::slotSearchLineEdit(const QString& t)
+void KNewProjectDlg::slotSearchLineEdit(const TQString& t)
{
m_pbSearchNow->setEnabled(!t.isEmpty());
}
@@ -205,8 +205,8 @@ void KNewProjectDlg::slotEnableChbBackup(bool b)
//PRIVATE
void KNewProjectDlg::initGUI()
{
- QIconSet iconSet = SmallIconSet("fileopen");
- QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
+ TQIconSet iconSet = SmallIconSet("fileopen");
+ TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal );
m_pbLocation->setIconSet(iconSet);
m_pbLocation->setFixedSize(pixMap.width() + 8, pixMap.height() + 8);
@@ -224,7 +224,7 @@ void KNewProjectDlg::initGUI()
void KNewProjectDlg::loadOptions()
{
- QStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
+ TQStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
m_cbEncoding->insertStringList(availableEncodingNames);
int idx = -1;
int utf8Idx = -1;
@@ -286,7 +286,7 @@ void KNewProjectDlg::loadDateAccessOptions()
{
// ================== DATE OPTIONS ========================
- QString date = m_option->m_minDate;
+ TQString date = m_option->m_minDate;
if(date == AccessDateOption)
{
m_chbDateMin->setChecked(false);
@@ -296,7 +296,7 @@ void KNewProjectDlg::loadDateAccessOptions()
else
{
m_chbDateMin->setChecked(true);
- m_dedDateMin->setDate(QDate::fromString(date,Qt::ISODate));
+ m_dedDateMin->setDate(TQDate::fromString(date,Qt::ISODate));
m_dedDateMin->setEnabled(true);
}
@@ -310,7 +310,7 @@ void KNewProjectDlg::loadDateAccessOptions()
else
{
m_chbDateMax->setChecked(true);
- m_dedDateMax->setDate(QDate::fromString(date,Qt::ISODate));
+ m_dedDateMax->setDate(TQDate::fromString(date,Qt::ISODate));
m_dedDateMax->setEnabled(true);
}
@@ -395,7 +395,7 @@ void KNewProjectDlg::saveDateAccessOptions()
if(m_chbDateMin->isChecked())
{
- QString date = m_dedDateMin->date().toString(Qt::ISODate);
+ TQString date = m_dedDateMin->date().toString(Qt::ISODate);
m_option->m_minDate = date;
}
else
@@ -403,7 +403,7 @@ void KNewProjectDlg::saveDateAccessOptions()
if(m_chbDateMax->isChecked())
{
- QString date = m_dedDateMax->date().toString(Qt::ISODate);
+ TQString date = m_dedDateMax->date().toString(Qt::ISODate);
m_option->m_maxDate = date;
}
else
@@ -447,14 +447,14 @@ void KNewProjectDlg::saveOwnerOptions()
void KNewProjectDlg::saveLocationsList()
{
- QString current = m_cbLocation->currentText();
- QStringList list = current;
+ TQString current = m_cbLocation->currentText();
+ TQStringList list = current;
int count = m_cbLocation->listBox()->count(),
i;
for(i = 0; i < count; i++)
{
- QString text = m_cbLocation->listBox()->item(i)->text();
+ TQString text = m_cbLocation->listBox()->item(i)->text();
if(text != current)
list.append(text);
}
@@ -463,14 +463,14 @@ void KNewProjectDlg::saveLocationsList()
void KNewProjectDlg::saveFiltersList()
{
- QString current = m_cbFilter->currentText();
- QStringList list = current;
+ TQString current = m_cbFilter->currentText();
+ TQStringList list = current;
int count = m_cbFilter->listBox()->count(),
i;
for(i = 0; i < count; i++)
{
- QString text = m_cbFilter->listBox()->item(i)->text();
+ TQString text = m_cbFilter->listBox()->item(i)->text();
if(text != current)
list.append(text);
}
@@ -479,12 +479,12 @@ void KNewProjectDlg::saveFiltersList()
void KNewProjectDlg::saveBackupExtensionOptions()
{
- QString backupExt = m_leBackup->text();
+ TQString backupExt = m_leBackup->text();
m_option->m_backup = (m_chbBackup->isChecked() && !backupExt.isEmpty());
m_option->m_backupExtension = backupExt;
}
-void KNewProjectDlg::setDatas(const QString& directoryString, const QString& filterString)
+void KNewProjectDlg::setDatas(const TQString& directoryString, const TQString& filterString)
{
if (!directoryString.isEmpty())
m_cbLocation->setEditText(directoryString);
@@ -493,9 +493,9 @@ void KNewProjectDlg::setDatas(const QString& directoryString, const QString& fil
m_cbFilter->setEditText(filterString);
}
-bool KNewProjectDlg::contains(QListView* lv,const QString& s, int column)
+bool KNewProjectDlg::contains(TQListView* lv,const TQString& s, int column)
{
- QListViewItem* i = lv->firstChild();
+ TQListViewItem* i = lv->firstChild();
while (i != 0)
{
if(i->text(column) == s)
@@ -507,24 +507,24 @@ bool KNewProjectDlg::contains(QListView* lv,const QString& s, int column)
void KNewProjectDlg::whatsThis()
{
- QWhatsThis::add(m_cbLocation, cbLocationWhatthis);
- QWhatsThis::add(m_cbFilter, cbFilterWhatthis);
-
- QWhatsThis::add(m_spbSizeMin, edSizeMinWhatthis);
- QWhatsThis::add(m_spbSizeMax, edSizeMaxWhatthis);
-
- QWhatsThis::add(m_cbDateValid, cbDateValidWhatthis);
- QWhatsThis::add(m_chbDateMin, chbDateMinWhatthis);
- QWhatsThis::add(m_chbDateMax, chbDateMaxWhatthis);
-
- QWhatsThis::add(m_chbIncludeSubfolders, chbRecursiveWhatthis);
- QWhatsThis::add(m_chbRegularExpressions, chbRegularExpressionsWhatthis);
- QWhatsThis::add(m_chbEnableVariables, chbVariablesWhatthis);
- QWhatsThis::add(m_chbCaseSensitive, chbCaseSensitiveWhatthis);
- QWhatsThis::add(m_chbBackup, chbBackupWhatthis);
- QWhatsThis::add(m_leBackup, chbBackupWhatthis);
- QWhatsThis::add(m_leSearch, leSearchWhatthis);
- QWhatsThis::add(m_leReplace, leReplaceWhatthis);
+ TQWhatsThis::add(m_cbLocation, cbLocationWhatthis);
+ TQWhatsThis::add(m_cbFilter, cbFilterWhatthis);
+
+ TQWhatsThis::add(m_spbSizeMin, edSizeMinWhatthis);
+ TQWhatsThis::add(m_spbSizeMax, edSizeMaxWhatthis);
+
+ TQWhatsThis::add(m_cbDateValid, cbDateValidWhatthis);
+ TQWhatsThis::add(m_chbDateMin, chbDateMinWhatthis);
+ TQWhatsThis::add(m_chbDateMax, chbDateMaxWhatthis);
+
+ TQWhatsThis::add(m_chbIncludeSubfolders, chbRecursiveWhatthis);
+ TQWhatsThis::add(m_chbRegularExpressions, chbRegularExpressionsWhatthis);
+ TQWhatsThis::add(m_chbEnableVariables, chbVariablesWhatthis);
+ TQWhatsThis::add(m_chbCaseSensitive, chbCaseSensitiveWhatthis);
+ TQWhatsThis::add(m_chbBackup, chbBackupWhatthis);
+ TQWhatsThis::add(m_leBackup, chbBackupWhatthis);
+ TQWhatsThis::add(m_leSearch, leSearchWhatthis);
+ TQWhatsThis::add(m_leReplace, leReplaceWhatthis);
}
#include "knewprojectdlg.moc"
diff --git a/kfilereplace/knewprojectdlg.h b/kfilereplace/knewprojectdlg.h
index e4852cb8..ac537eac 100644
--- a/kfilereplace/knewprojectdlg.h
+++ b/kfilereplace/knewprojectdlg.h
@@ -31,11 +31,11 @@ class KNewProjectDlg : public KNewProjectDlgS
Q_OBJECT
private:
- QString m_searchNowFlag;
+ TQString m_searchNowFlag;
RCOptions* m_option;
public:
- KNewProjectDlg(RCOptions* info, QWidget *parent=0, const char *name=0);
+ KNewProjectDlg(RCOptions* info, TQWidget *parent=0, const char *name=0);
~KNewProjectDlg();
public:
@@ -48,14 +48,14 @@ class KNewProjectDlg : public KNewProjectDlgS
void slotReject();
void slotSearchNow();
void slotSearchLater();
- void slotSearchLineEdit(const QString& t);
+ void slotSearchLineEdit(const TQString& t);
void slotEnableSpinboxSizeMin(bool b);
void slotEnableSpinboxSizeMax(bool b);
void slotEnableCbValidDate(bool b);
void slotEnableChbUser(bool b);
void slotEnableChbGroup(bool b);
void slotEnableChbBackup(bool b);
- void slotHelp(){ kapp->invokeHelp(QString::null, "kfilereplace"); }
+ void slotHelp(){ kapp->invokeHelp(TQString::null, "kfilereplace"); }
private:
void initGUI();
@@ -76,8 +76,8 @@ class KNewProjectDlg : public KNewProjectDlgS
void saveFiltersList();
void saveBackupExtensionOptions();
- bool contains(QListView* lv,const QString& s, int column);
- void setDatas(const QString& directoryString, const QString& filterString);
+ bool contains(TQListView* lv,const TQString& s, int column);
+ void setDatas(const TQString& directoryString, const TQString& filterString);
void whatsThis();
};
diff --git a/kfilereplace/koptionsdlg.cpp b/kfilereplace/koptionsdlg.cpp
index 3980a7a6..fc0dc899 100644
--- a/kfilereplace/koptionsdlg.cpp
+++ b/kfilereplace/koptionsdlg.cpp
@@ -17,12 +17,12 @@
***************************************************************************/
// QT
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qwhatsthis.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqwhatsthis.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
// KDE
#include <kcharsets.h>
@@ -41,19 +41,19 @@
using namespace whatthisNameSpace;
-KOptionsDlg::KOptionsDlg(RCOptions* info, QWidget *parent, const char *name) : KOptionsDlgS(parent,name,true)
+KOptionsDlg::KOptionsDlg(RCOptions* info, TQWidget *parent, const char *name) : KOptionsDlgS(parent,name,true)
{
m_config = new KConfig("kfilereplacerc");
m_option = info;
initGUI();
- connect(m_pbOK, SIGNAL(clicked()), this, SLOT(slotOK()));
- connect(m_pbDefault, SIGNAL(clicked()),this,SLOT(slotDefaults()));
- connect(m_chbBackup, SIGNAL(toggled(bool)), this, SLOT(slotChbBackup(bool)));
- connect(m_pbHelp, SIGNAL(clicked()), this, SLOT(slotHelp()));
- connect(m_chbConfirmStrings, SIGNAL(toggled(bool)), this, SLOT(slotChbConfirmStrings(bool)));
- connect(m_chbShowConfirmDialog, SIGNAL(toggled(bool)), this, SLOT(slotChbShowConfirmDialog(bool)));
+ connect(m_pbOK, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOK()));
+ connect(m_pbDefault, TQT_SIGNAL(clicked()),this,TQT_SLOT(slotDefaults()));
+ connect(m_chbBackup, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChbBackup(bool)));
+ connect(m_pbHelp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotHelp()));
+ connect(m_chbConfirmStrings, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChbConfirmStrings(bool)));
+ connect(m_chbShowConfirmDialog, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChbShowConfirmDialog(bool)));
whatsThis();
}
@@ -82,7 +82,7 @@ void KOptionsDlg::slotDefaults()
m_chbIgnoreFiles->setChecked(IgnoreFilesOption);
m_chbConfirmStrings->setChecked(AskConfirmReplaceOption);
- QStringList bkList = QStringList::split(",",BackupExtensionOption,true);
+ TQStringList bkList = TQStringList::split(",",BackupExtensionOption,true);
bool enableBackup = (bkList[0] == "true" ? true : false);
@@ -141,7 +141,7 @@ void KOptionsDlg::initGUI()
m_config->setGroup("Notification Messages");
m_option->m_notifyOnErrors = m_config->readBoolEntry(rcNotifyOnErrors, true);
- QString dontAskAgain = m_config->readEntry(rcDontAskAgain,"no");
+ TQString dontAskAgain = m_config->readEntry(rcDontAskAgain,"no");
m_chbConfirmStrings->setChecked(m_option->m_askConfirmReplace);
@@ -153,7 +153,7 @@ void KOptionsDlg::initGUI()
m_chbShowConfirmDialog->setChecked(true);
}
- QStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
+ TQStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
m_cbEncoding->insertStringList( availableEncodingNames );
int idx = -1;
int utf8Idx = -1;
@@ -200,7 +200,7 @@ void KOptionsDlg::saveRCOptions()
m_option->m_encoding = m_cbEncoding->currentText();
m_option->m_caseSensitive = m_chbCaseSensitive->isChecked();
m_option->m_recursive = m_chbRecursive->isChecked();
- QString backupExt = m_leBackup->text();
+ TQString backupExt = m_leBackup->text();
m_option->m_backup = (m_chbBackup->isChecked() && !backupExt.isEmpty());
m_option->m_backupExtension = backupExt;
m_option->m_variables = m_chbVariables->isChecked();
@@ -221,16 +221,16 @@ void KOptionsDlg::saveRCOptions()
void KOptionsDlg::whatsThis()
{
// Create help QWhatsThis
- QWhatsThis::add(m_chbCaseSensitive, chbCaseSensitiveWhatthis);
- QWhatsThis::add(m_chbRecursive, chbRecursiveWhatthis);
- QWhatsThis::add(m_chbHaltOnFirstOccurrence, chbHaltOnFirstOccurrenceWhatthis);
- QWhatsThis::add(m_chbFollowSymLinks, chbFollowSymLinksWhatthis);
- QWhatsThis::add(m_chbIgnoreHidden, chbIgnoreHiddenWhatthis);
- QWhatsThis::add(m_chbIgnoreFiles, chbIgnoreFilesWhatthis);
- QWhatsThis::add(m_chbRegularExpressions, chbRegularExpressionsWhatthis);
- QWhatsThis::add(m_chbVariables, chbVariablesWhatthis);
- QWhatsThis::add(m_chbBackup, chbBackupWhatthis);
- QWhatsThis::add(m_chbConfirmStrings, chbConfirmStringsWhatthis);
+ TQWhatsThis::add(m_chbCaseSensitive, chbCaseSensitiveWhatthis);
+ TQWhatsThis::add(m_chbRecursive, chbRecursiveWhatthis);
+ TQWhatsThis::add(m_chbHaltOnFirstOccurrence, chbHaltOnFirstOccurrenceWhatthis);
+ TQWhatsThis::add(m_chbFollowSymLinks, chbFollowSymLinksWhatthis);
+ TQWhatsThis::add(m_chbIgnoreHidden, chbIgnoreHiddenWhatthis);
+ TQWhatsThis::add(m_chbIgnoreFiles, chbIgnoreFilesWhatthis);
+ TQWhatsThis::add(m_chbRegularExpressions, chbRegularExpressionsWhatthis);
+ TQWhatsThis::add(m_chbVariables, chbVariablesWhatthis);
+ TQWhatsThis::add(m_chbBackup, chbBackupWhatthis);
+ TQWhatsThis::add(m_chbConfirmStrings, chbConfirmStringsWhatthis);
}
#include "koptionsdlg.moc"
diff --git a/kfilereplace/koptionsdlg.h b/kfilereplace/koptionsdlg.h
index 993f2c7d..973393d6 100644
--- a/kfilereplace/koptionsdlg.h
+++ b/kfilereplace/koptionsdlg.h
@@ -34,7 +34,7 @@ class KOptionsDlg : public KOptionsDlgS
{
Q_OBJECT
public:
- KOptionsDlg(RCOptions* info, QWidget *parent, const char *name);
+ KOptionsDlg(RCOptions* info, TQWidget *parent, const char *name);
~KOptionsDlg();
private:
@@ -47,7 +47,7 @@ class KOptionsDlg : public KOptionsDlgS
void slotChbBackup(bool b);
void slotChbConfirmStrings(bool b);
void slotChbShowConfirmDialog(bool b);
- void slotHelp(){ kapp->invokeHelp(QString::null, "kfilereplace"); }
+ void slotHelp(){ kapp->invokeHelp(TQString::null, "kfilereplace"); }
private:
void initGUI();
diff --git a/kfilereplace/report.cpp b/kfilereplace/report.cpp
index cae0dfe4..6d485eba 100644
--- a/kfilereplace/report.cpp
+++ b/kfilereplace/report.cpp
@@ -16,8 +16,8 @@
* *
***************************************************************************/
// QT
-#include <qstring.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqfile.h>
// KDE
#include <klistview.h>
@@ -30,12 +30,12 @@
void Report::createReportFile()
{
- QString xmlFileName = m_docPath + ".xml",
+ TQString xmlFileName = m_docPath + ".xml",
cssFileName = m_docPath + ".css";
// Generates a report file
// a) Open the file
- QFile report(xmlFileName);
+ TQFile report(xmlFileName);
if (!report.open( IO_WriteOnly ))
{
KMessageBox::error(0, i18n("<qt>Cannot open the file <b>%1</b>.</qt>").arg(xmlFileName));
@@ -44,10 +44,10 @@ void Report::createReportFile()
// b) Write the header of the XML file
- QDateTime datetime = QDateTime::currentDateTime(Qt::LocalTime);
- QString dateString = datetime.toString(Qt::LocalDate);
+ TQDateTime datetime = TQDateTime::currentDateTime(Qt::LocalTime);
+ TQString dateString = datetime.toString(Qt::LocalDate);
KUser user;
- QString columnTextFour,
+ TQString columnTextFour,
columnReplaceWith;
if(!m_isSearchFlag)
{
@@ -60,8 +60,8 @@ void Report::createReportFile()
columnReplaceWith = i18n("-");
}
- QString css = cssFileName.mid(cssFileName.findRev("/")+1,cssFileName.length()-(cssFileName.findRev("/")+1));
- QTextStream oTStream( &report );
+ TQString css = cssFileName.mid(cssFileName.findRev("/")+1,cssFileName.length()-(cssFileName.findRev("/")+1));
+ TQTextStream oTStream( &report );
oTStream << "<?xml version=\"1.0\"?>\n"
"<?xml-stylesheet href=\""+css+"\" type=\"text/css\"?>"
"<report>\n"
@@ -81,7 +81,7 @@ void Report::createReportFile()
oTStream<< " </row>\n"
" </header>\n";
// c) Write the strings list
- QListViewItem *lviCurItem,
+ TQListViewItem *lviCurItem,
*lviFirst;
lviCurItem = lviFirst = m_stringsView->firstChild();
@@ -89,10 +89,10 @@ void Report::createReportFile()
if(lviCurItem == 0)
return ;
- QString rowType="a1";
+ TQString rowType="a1";
do
- { QString rowTag = "<row >\n"
+ { TQString rowTag = "<row >\n"
" <searchfor class=\""+rowType+"\"><![CDATA["+lviCurItem->text(0)+"]]></searchfor>\n"
" <replacewith class=\""+rowType+"\"><![CDATA["+lviCurItem->text(1)+"]]></replacewith>\n"
"</row>\n";
@@ -140,7 +140,7 @@ void Report::createReportFile()
rowType="a1";
do
- { QString rowTag = " <row >\n"
+ { TQString rowTag = " <row >\n"
" <name class=\""+rowType+"\"><![CDATA["+lviCurItem->text(0)+"]]></name>\n"
" <folder class=\""+rowType+"\"><![CDATA["+lviCurItem->text(1)+"]]></folder>\n";
if(m_isSearchFlag)
@@ -187,17 +187,17 @@ void Report::createReportFile()
void Report::createStyleSheet()
{
- QString cssFileName = m_docPath +".css";
- QFile styleSheet(cssFileName);
+ TQString cssFileName = m_docPath +".css";
+ TQFile styleSheet(cssFileName);
if (!styleSheet.open( IO_WriteOnly ))
{
KMessageBox::error(0, i18n("<qt>Cannot open the file <b>%1</b>.</qt>").arg(cssFileName));
return ;
}
- QTextStream oTStream( &styleSheet );
+ TQTextStream oTStream( &styleSheet );
- QString css = "title { display:block;font:40px bold sans-serif; }\n\n"
+ TQString css = "title { display:block;font:40px bold sans-serif; }\n\n"
"createdby:before { content :\""+i18n("Created by")+": \"; }\n"
"createdby { display:inline; }\n\n"
"date:before { content :\"-"+i18n("date")+": \"; }\n"
@@ -272,7 +272,7 @@ void Report::createStyleSheet()
styleSheet.close();
}
-void Report::createDocument(const QString& docPath)
+void Report::createDocument(const TQString& docPath)
{
m_docPath = docPath;
diff --git a/kfilereplace/report.h b/kfilereplace/report.h
index 98996f92..af221bc1 100644
--- a/kfilereplace/report.h
+++ b/kfilereplace/report.h
@@ -36,7 +36,7 @@ class Report
private:
KListView* m_stringsView,
* m_resultsView;
- QString m_docPath;
+ TQString m_docPath;
bool m_isSearchFlag;
RCOptions* m_option;
@@ -52,7 +52,7 @@ class Report
void createStyleSheet();
public:
- void createDocument(const QString& docPath);
+ void createDocument(const TQString& docPath);
};
#endif // REPORT_H
diff --git a/kfilereplace/whatthis.h b/kfilereplace/whatthis.h
index c91356dd..09f6ac80 100644
--- a/kfilereplace/whatthis.h
+++ b/kfilereplace/whatthis.h
@@ -18,7 +18,7 @@
#define WHATTHIS_H
// QT
-#include <qstring.h>
+#include <tqstring.h>
// KDE
#include <klocale.h>
@@ -26,76 +26,76 @@
namespace whatthisNameSpace
{
//KFileReplaceView messages
- const QString lvResultWhatthis = i18n("Shows the statistics of your operations. Note that the columns content changes depending on what kind of operation you are performing.");
+ const TQString lvResultWhatthis = i18n("Shows the statistics of your operations. Note that the columns content changes depending on what kind of operation you are performing.");
- const QString lvStringsWhatthis = i18n("Shows a list of strings to search for (and if you specified it, a list of strings to replace with). Use the \"add strings\" dialog to edit your string list or double click on a string.");
+ const TQString lvStringsWhatthis = i18n("Shows a list of strings to search for (and if you specified it, a list of strings to replace with). Use the \"add strings\" dialog to edit your string list or double click on a string.");
//KNewProjectDlg messages
- const QString cbLocationWhatthis = i18n("Base folder for operations of search/replace. Insert path string here by hand or use the search button.");
+ const TQString cbLocationWhatthis = i18n("Base folder for operations of search/replace. Insert path string here by hand or use the search button.");
- const QString cbFilterWhatthis = i18n("Shell-like wildcards. Example: \"*.html;*.txt;*.xml\".");
+ const TQString cbFilterWhatthis = i18n("Shell-like wildcards. Example: \"*.html;*.txt;*.xml\".");
- const QString edSizeMinWhatthis = i18n("Insert the minimum file size you want to search, or leave it unchecked if you don't want minimum size limit.");
+ const TQString edSizeMinWhatthis = i18n("Insert the minimum file size you want to search, or leave it unchecked if you don't want minimum size limit.");
- const QString edSizeMaxWhatthis = i18n("Insert the maximum file size you want to search, or leave it unchecked if you don't want maximum size limit.");
+ const TQString edSizeMaxWhatthis = i18n("Insert the maximum file size you want to search, or leave it unchecked if you don't want maximum size limit.");
- const QString edDateMinWhatthis = i18n("Insert the minimum value for file access date that you want to search, or leave it unchecked if you don't a minimum limit.");
+ const TQString edDateMinWhatthis = i18n("Insert the minimum value for file access date that you want to search, or leave it unchecked if you don't a minimum limit.");
- const QString edDateMaxWhatthis = i18n("Insert the maximum value for file access date that you want to search, or leave it unchecked if you don't a maximum limit.");
+ const TQString edDateMaxWhatthis = i18n("Insert the maximum value for file access date that you want to search, or leave it unchecked if you don't a maximum limit.");
- const QString cbDateValidWhatthis = i18n("Select \"writing\" if you want to use the date of the last modification, or \"reading\" to use the the date of the last access.");
+ const TQString cbDateValidWhatthis = i18n("Select \"writing\" if you want to use the date of the last modification, or \"reading\" to use the the date of the last access.");
- const QString chbDateMinWhatthis = i18n("Minimum value for access date.");
+ const TQString chbDateMinWhatthis = i18n("Minimum value for access date.");
- const QString chbDateMaxWhatthis = i18n("Maximum value for access date.");
+ const TQString chbDateMaxWhatthis = i18n("Maximum value for access date.");
- const QString leSearchWhatthis = i18n("Insert here the string to search for.");
+ const TQString leSearchWhatthis = i18n("Insert here the string to search for.");
- const QString leReplaceWhatthis = i18n("Insert here the string to replace with.");
+ const TQString leReplaceWhatthis = i18n("Insert here the string to replace with.");
//KOptionsDlg messages
- const QString chbCaseSensitiveWhatthis = i18n("Enable this option if your search is case sensitive.");
+ const TQString chbCaseSensitiveWhatthis = i18n("Enable this option if your search is case sensitive.");
- const QString chbRecursiveWhatthis = i18n("Enable this option to search in sub folders too.");
+ const TQString chbRecursiveWhatthis = i18n("Enable this option to search in sub folders too.");
- const QString chbHaltOnFirstOccurrenceWhatthis = i18n("Enable this option when you are searching for a string and you are only interested to know if the string is present or not in the current file.");
+ const TQString chbHaltOnFirstOccurrenceWhatthis = i18n("Enable this option when you are searching for a string and you are only interested to know if the string is present or not in the current file.");
- const QString chbIgnoreWhitespacesWhatthis ="";
+ const TQString chbIgnoreWhitespacesWhatthis ="";
- const QString chbFollowSymLinksWhatthis = i18n("If kfilereplace encounters a symbolic link treats it like a normal folder or file.");
+ const TQString chbFollowSymLinksWhatthis = i18n("If kfilereplace encounters a symbolic link treats it like a normal folder or file.");
- const QString chbIgnoreHiddenWhatthis = i18n("Enable this option to ignore hidden files or folders.");
+ const TQString chbIgnoreHiddenWhatthis = i18n("Enable this option to ignore hidden files or folders.");
- const QString chbIgnoreFilesWhatthis = i18n("If this option is enabled, KFR will show even the names of the files in which no string has been found or replaced.");
+ const TQString chbIgnoreFilesWhatthis = i18n("If this option is enabled, KFR will show even the names of the files in which no string has been found or replaced.");
- const QString chbRegularExpressionsWhatthis = i18n("Allows you to apply QT-like regular expressions on the search string. Note that a complex regular expression could affect speed performance");
+ const TQString chbRegularExpressionsWhatthis = i18n("Allows you to apply QT-like regular expressions on the search string. Note that a complex regular expression could affect speed performance");
- const QString chbVariablesWhatthis = i18n("Enable \"commands\". For example: if search string is \"user\" and replace string is the command \"[$user:uid$]\", KFR will substitute \"user\" with the uid of the user.");
+ const TQString chbVariablesWhatthis = i18n("Enable \"commands\". For example: if search string is \"user\" and replace string is the command \"[$user:uid$]\", KFR will substitute \"user\" with the uid of the user.");
- const QString chbBackupWhatthis = i18n("Enable this option if you want leave original files untouched.");
+ const TQString chbBackupWhatthis = i18n("Enable this option if you want leave original files untouched.");
- const QString chbConfirmStringsWhatthis = i18n("Enable this option if you want to be asked for single string replacement confirmation.");
+ const TQString chbConfirmStringsWhatthis = i18n("Enable this option if you want to be asked for single string replacement confirmation.");
//KFileReplacePart
- const QString fileSimulateWhatthis = i18n("Enable this option to perform replacing as a simulation, i.e. without make any changes in files.");
+ const TQString fileSimulateWhatthis = i18n("Enable this option to perform replacing as a simulation, i.e. without make any changes in files.");
- const QString optionsRegularExpressionsWhatthis = chbRegularExpressionsWhatthis;
+ const TQString optionsRegularExpressionsWhatthis = chbRegularExpressionsWhatthis;
- const QString optionsBackupWhatthis = chbBackupWhatthis;
+ const TQString optionsBackupWhatthis = chbBackupWhatthis;
- const QString optionsCaseWhatthis = chbCaseSensitiveWhatthis;
+ const TQString optionsCaseWhatthis = chbCaseSensitiveWhatthis;
- const QString optionsVarWhatthis = chbVariablesWhatthis;
+ const TQString optionsVarWhatthis = chbVariablesWhatthis;
- const QString optionsRecursiveWhatthis = chbRecursiveWhatthis;
+ const TQString optionsRecursiveWhatthis = chbRecursiveWhatthis;
//KAddStringDlg
- const QString rbSearchOnlyWhatthis = i18n("Select search-only mode.");
+ const TQString rbSearchOnlyWhatthis = i18n("Select search-only mode.");
- const QString rbSearchReplaceWhatthis = i18n("Select search-and-replace mode.");
+ const TQString rbSearchReplaceWhatthis = i18n("Select search-and-replace mode.");
- const QString edSearchWhatthis = i18n("Insert here a string you want search for.");
+ const TQString edSearchWhatthis = i18n("Insert here a string you want search for.");
- const QString edReplaceWhatthis = i18n("Insert here the string that KFR will use to replace the search string.");
+ const TQString edReplaceWhatthis = i18n("Insert here the string that KFR will use to replace the search string.");
}
#endif