diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-16 19:02:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-16 19:02:47 +0000 |
commit | e985f7e545f4739493965aad69bbecb136dc9346 (patch) | |
tree | 54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /kfilereplace | |
parent | f7670c198945adc3b95ad69a959fe5f8ae55b493 (diff) | |
download | tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip |
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kfilereplace')
-rw-r--r-- | kfilereplace/commandengine.cpp | 26 | ||||
-rw-r--r-- | kfilereplace/commandengine.h | 3 | ||||
-rw-r--r-- | kfilereplace/configurationclasses.cpp | 10 | ||||
-rw-r--r-- | kfilereplace/configurationclasses.h | 2 | ||||
-rw-r--r-- | kfilereplace/kaddstringdlg.cpp | 14 | ||||
-rw-r--r-- | kfilereplace/kaddstringdlg.h | 5 | ||||
-rw-r--r-- | kfilereplace/kaddstringdlgs.ui | 82 | ||||
-rw-r--r-- | kfilereplace/kfilereplace.cpp | 8 | ||||
-rw-r--r-- | kfilereplace/kfilereplace.h | 1 | ||||
-rw-r--r-- | kfilereplace/kfilereplacelib.cpp | 10 | ||||
-rw-r--r-- | kfilereplace/kfilereplacepart.cpp | 146 | ||||
-rw-r--r-- | kfilereplace/kfilereplacepart.h | 5 | ||||
-rw-r--r-- | kfilereplace/kfilereplaceview.cpp | 42 | ||||
-rw-r--r-- | kfilereplace/kfilereplaceview.h | 7 | ||||
-rw-r--r-- | kfilereplace/kfilereplaceviewwdg.ui | 42 | ||||
-rw-r--r-- | kfilereplace/knewprojectdlg.cpp | 6 | ||||
-rw-r--r-- | kfilereplace/knewprojectdlg.h | 9 | ||||
-rw-r--r-- | kfilereplace/knewprojectdlgs.ui | 126 | ||||
-rw-r--r-- | kfilereplace/koptionsdlg.cpp | 4 | ||||
-rw-r--r-- | kfilereplace/koptionsdlg.h | 9 | ||||
-rw-r--r-- | kfilereplace/koptionsdlgs.ui | 60 | ||||
-rw-r--r-- | kfilereplace/report.cpp | 8 | ||||
-rw-r--r-- | kfilereplace/whatthis.h | 2 |
23 files changed, 317 insertions, 310 deletions
diff --git a/kfilereplace/commandengine.cpp b/kfilereplace/commandengine.cpp index ffb1919d..aaf40f38 100644 --- a/kfilereplace/commandengine.cpp +++ b/kfilereplace/commandengine.cpp @@ -34,10 +34,10 @@ TQString CommandEngine::datetime(const TQString& opt, const TQString& arg) { Q_UNUSED(arg); if(opt == "iso") - return TQDateTime::currentDateTime(Qt::LocalTime).toString(Qt::ISODate); + return TQDateTime::tqcurrentDateTime(Qt::LocalTime).toString(Qt::ISODate); if(opt == "local") - return TQDateTime::currentDateTime(Qt::LocalTime).toString(Qt::LocalDate); - return TQString::null; + return TQDateTime::tqcurrentDateTime(Qt::LocalTime).toString(Qt::LocalDate); + return TQString(); } TQString CommandEngine::user(const TQString& opt, const TQString& arg) @@ -56,7 +56,7 @@ TQString CommandEngine::user(const TQString& opt, const TQString& arg) return u.homeDir(); if(opt == "shell") return u.shell(); - return TQString::null; + return TQString(); } TQString CommandEngine::loadfile(const TQString& opt, const TQString& arg) @@ -64,7 +64,7 @@ TQString CommandEngine::loadfile(const TQString& opt, const TQString& arg) Q_UNUSED(arg); TQFile f(opt); - if(!f.open(IO_ReadOnly)) return TQString::null; + if(!f.open(IO_ReadOnly)) return TQString(); TQTextStream t(&f); @@ -89,11 +89,11 @@ TQString CommandEngine::mathexp(const TQString& opt, const TQString& arg) Q_UNUSED(arg); TQString tempOpt = opt; - tempOpt.replace("ln","l"); - tempOpt.replace("sin","s"); - tempOpt.replace("cos","c"); - tempOpt.replace("arctan","a"); - tempOpt.replace("exp","e"); + tempOpt.tqreplace("ln","l"); + tempOpt.tqreplace("sin","s"); + tempOpt.tqreplace("cos","c"); + tempOpt.tqreplace("arctan","a"); + tempOpt.tqreplace("exp","e"); TQString program = "var=("+tempOpt+");print var"; TQString script = "echo '"+program+"' | bc -l;"; @@ -111,7 +111,7 @@ TQString CommandEngine::mathexp(const TQString& opt, const TQString& arg) //Through slotGetScriptOutput, m_processOutput contains the result of the KProcess call if(!proc->start(KProcess::Block, KProcess::All)) { - return TQString::null; + return TQString(); } else { @@ -121,7 +121,7 @@ TQString CommandEngine::mathexp(const TQString& opt, const TQString& arg) delete proc; TQString tempbuf = m_processOutput; - m_processOutput = TQString::null; + m_processOutput = TQString(); return tempbuf; @@ -156,7 +156,7 @@ TQString CommandEngine::variableValue(const TQString &variable) s.remove("[$").remove("$]").remove(" "); - if(s.contains(":") == 0) + if(s.tqcontains(":") == 0) return variable; else { diff --git a/kfilereplace/commandengine.h b/kfilereplace/commandengine.h index 0b3c2106..feb1d803 100644 --- a/kfilereplace/commandengine.h +++ b/kfilereplace/commandengine.h @@ -26,9 +26,10 @@ class TQString; //KDE class KProcess; -class CommandEngine : public QObject +class CommandEngine : public TQObject { Q_OBJECT + TQ_OBJECT private: TQString m_processOutput; public: diff --git a/kfilereplace/configurationclasses.cpp b/kfilereplace/configurationclasses.cpp index f0c6bcc4..8d0ff303 100644 --- a/kfilereplace/configurationclasses.cpp +++ b/kfilereplace/configurationclasses.cpp @@ -104,12 +104,12 @@ ResultViewEntry::ResultViewEntry(TQString nkey, TQString ndata, bool regexp, boo int ResultViewEntry::lineNumber(const TQString& line) const { - return line.mid(0,m_pos).contains('\n')+1; + return line.mid(0,m_pos).tqcontains('\n')+1; } int ResultViewEntry::columnNumber(const TQString& line) const { - return(m_pos - line.findRev('\n',m_pos)); + return(m_pos - line.tqfindRev('\n',m_pos)); } void ResultViewEntry::incOccurrences() @@ -132,7 +132,7 @@ int ResultViewEntry::pos(const TQString& line) if(m_regexp) m_pos = m_rxKey.search(line,m_pos); else - m_pos = line.find(m_key, m_pos, m_caseSensitive); + m_pos = line.tqfind(m_key, m_pos, m_caseSensitive); return m_pos; } @@ -164,8 +164,8 @@ TQString ResultViewEntry::capturedText(const TQString& line) TQString ResultViewEntry::message(const TQString& capturedText, int x, int y) const { 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)); + //return i18n(" captured text \"%1\" replaced with \"%2\" at line: %3, column: %4 ").tqarg(capturedText).tqarg(data).tqarg(TQString::number(x,10)).tqarg(TQString::number(y,10)); + return i18n(" Line:%3,Col:%4 - \"%1\" -> \"%2\"").tqarg(capturedText).tqarg(data).tqarg(TQString::number(x,10)).tqarg(TQString::number(y,10)); } int ResultViewEntry::keyLength() const diff --git a/kfilereplace/configurationclasses.h b/kfilereplace/configurationclasses.h index 0d36261b..e5fc77d4 100644 --- a/kfilereplace/configurationclasses.h +++ b/kfilereplace/configurationclasses.h @@ -52,7 +52,7 @@ 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 rcAskConfirmReplace = "Ask confirmation on tqreplace"; const TQString rcDontAskAgain = "Dont ask again"; // Default configuration options const TQString EncodingOption = "utf8"; diff --git a/kfilereplace/kaddstringdlg.cpp b/kfilereplace/kaddstringdlg.cpp index 18f8895d..87750a9b 100644 --- a/kfilereplace/kaddstringdlg.cpp +++ b/kfilereplace/kaddstringdlg.cpp @@ -2,7 +2,7 @@ KAddStringDlg.cpp - description ------------------- begin : Sat Oct 16 1999 - copyright : (C) 1999 by François Dupoux + copyright : (C) 1999 by Fran�ois Dupoux (C) 2004 Emiliano Gulmini <emi_barbarossa@yahoo.it> email : dupoux@dupoux.com ***************************************************************************/ @@ -37,7 +37,7 @@ using namespace whatthisNameSpace; -KAddStringDlg::KAddStringDlg(RCOptions* info, bool wantEdit, TQWidget *parent, const char *name) : KAddStringDlgS(parent,name,true) +KAddStringDlg::KAddStringDlg(RCOptions* info, bool wantEdit, TQWidget *tqparent, const char *name) : KAddStringDlgS(tqparent,name,true) { m_option = info; m_wantEdit = wantEdit; @@ -58,8 +58,8 @@ KAddStringDlg::KAddStringDlg(RCOptions* info, bool wantEdit, TQWidget *parent, c //PRIVATE void KAddStringDlg::initGUI() { - m_pbAdd->setIconSet(SmallIconSet(TQString::fromLatin1("forward"))); - m_pbDel->setIconSet(SmallIconSet(TQString::fromLatin1("back"))); + m_pbAdd->setIconSet(SmallIconSet(TQString::tqfromLatin1("forward"))); + m_pbDel->setIconSet(SmallIconSet(TQString::tqfromLatin1("back"))); m_stack->addWidget(m_stringView); m_stack->addWidget(m_stringView_2); @@ -136,7 +136,7 @@ void KAddStringDlg::saveViewContentIntoMap() while(i != 0) { if(m_option->m_searchingOnlyMode) - m_currentMap[i->text(0)] = TQString::null; + m_currentMap[i->text(0)] = TQString(); else m_currentMap[i->text(0)] = i->text(1); i = i->nextSibling(); @@ -214,7 +214,7 @@ void KAddStringDlg::slotAddStringToView() TQListViewItem* lvi = new TQListViewItem(m_sv); lvi->setMultiLinesEnabled(true); lvi->setText(0,text); - m_currentMap[text] = TQString::null; + m_currentMap[text] = TQString(); m_edSearch->clear(); } } @@ -266,7 +266,7 @@ void KAddStringDlg::slotDeleteStringFromView() void KAddStringDlg::slotHelp() { - kapp->invokeHelp(TQString::null, "kfilereplace"); + kapp->invokeHelp(TQString(), "kfilereplace"); } #include "kaddstringdlg.moc" diff --git a/kfilereplace/kaddstringdlg.h b/kfilereplace/kaddstringdlg.h index 23c446f4..6193cbae 100644 --- a/kfilereplace/kaddstringdlg.h +++ b/kfilereplace/kaddstringdlg.h @@ -28,6 +28,7 @@ class KAddStringDlg : public KAddStringDlgS { Q_OBJECT + TQ_OBJECT private: RCOptions* m_option; TQListView* m_sv; @@ -35,7 +36,7 @@ class KAddStringDlg : public KAddStringDlgS bool m_wantEdit; public: //Constructors - KAddStringDlg(RCOptions* info, bool wantEdit, TQWidget *parent=0, const char *name=0); + KAddStringDlg(RCOptions* info, bool wantEdit, TQWidget *tqparent=0, const char *name=0); private slots: void slotOK(); @@ -63,7 +64,7 @@ class KAddStringDlg : public KAddStringDlgS */ void raiseView(); /** - * Verifies whether 'lv' contains 's' + * Verifies whether 'lv' tqcontains 's' */ bool columnContains(TQListView* lv,const TQString& s, int column); void saveViewContentIntoMap(); diff --git a/kfilereplace/kaddstringdlgs.ui b/kfilereplace/kaddstringdlgs.ui index 6685e92f..3cbf7c4f 100644 --- a/kfilereplace/kaddstringdlgs.ui +++ b/kfilereplace/kaddstringdlgs.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>KAddStringDlgS</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KAddStringDlgS</cstring> </property> @@ -22,15 +22,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>bgChoose</cstring> </property> @@ -44,7 +44,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>m_rbSearchReplace</cstring> </property> @@ -55,7 +55,7 @@ <string></string> </property> </widget> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>m_rbSearchOnly</cstring> </property> @@ -68,7 +68,7 @@ </widget> </grid> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>frame4</cstring> </property> @@ -82,23 +82,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_tlSearch</cstring> </property> @@ -106,7 +106,7 @@ <string>Search for:</string> </property> </widget> - <widget class="QTextEdit"> + <widget class="TQTextEdit"> <property name="name"> <cstring>m_edSearch</cstring> </property> @@ -116,15 +116,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_tlReplace</cstring> </property> @@ -135,7 +135,7 @@ <string>Replace with:</string> </property> </widget> - <widget class="QTextEdit"> + <widget class="TQTextEdit"> <property name="name"> <cstring>m_edReplace</cstring> </property> @@ -153,9 +153,9 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <vbox> <property name="name"> @@ -171,26 +171,26 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>90</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pbDel</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> @@ -200,11 +200,11 @@ <string></string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pbAdd</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>32767</height> @@ -229,7 +229,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>90</height> @@ -238,7 +238,7 @@ </spacer> </vbox> </widget> - <widget class="QWidgetStack" row="0" column="2"> + <widget class="TQWidgetStack" row="0" column="2"> <property name="name"> <cstring>m_stack</cstring> </property> @@ -250,7 +250,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -264,7 +264,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QListView" row="0" column="0"> + <widget class="TQListView" row="0" column="0"> <column> <property name="text"> <string>Search For</string> @@ -291,7 +291,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -305,7 +305,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QListView" row="0" column="0"> + <widget class="TQListView" row="0" column="0"> <column> <property name="text"> <string>Search For</string> @@ -346,15 +346,15 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pbHelp</cstring> </property> @@ -375,22 +375,22 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>90</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pbOK</cstring> </property> @@ -398,7 +398,7 @@ <string>&OK</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pbCancel</cstring> </property> @@ -422,5 +422,5 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kfilereplace/kfilereplace.cpp b/kfilereplace/kfilereplace.cpp index 48b26f83..35428a7b 100644 --- a/kfilereplace/kfilereplace.cpp +++ b/kfilereplace/kfilereplace.cpp @@ -30,15 +30,15 @@ KFileReplace::KFileReplace() KLibFactory *factory = KLibLoader::self()->factory("libkfilereplacepart"); if (factory) { - m_part = static_cast<KParts::ReadOnlyPart *>(factory->create(this, + m_part = static_cast<KParts::ReadOnlyPart *>(factory->create(TQT_TQOBJECT(this), "kfilereplace_part", "KParts::ReadOnlyPart" )); if (m_part) { setCentralWidget(m_part->widget()); - KStdAction::quit(this, TQT_SLOT(close()), actionCollection()); - KStdAction::keyBindings(this, TQT_SLOT(slotConfigureKeys()), actionCollection()); - KStdAction::configureToolbars(this, TQT_SLOT(slotConfigureToolbars()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureKeys()), actionCollection()); + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureToolbars()), actionCollection()); setStandardToolBarMenuEnabled(true); createGUI(m_part); removeDuplicatedActions(); diff --git a/kfilereplace/kfilereplace.h b/kfilereplace/kfilereplace.h index 2d65d0ed..7d6d5fd4 100644 --- a/kfilereplace/kfilereplace.h +++ b/kfilereplace/kfilereplace.h @@ -26,6 +26,7 @@ Shell application for the KFileReplace part. class KFileReplace : public KParts::MainWindow { Q_OBJECT + TQ_OBJECT public: KFileReplace(); ~KFileReplace(); diff --git a/kfilereplace/kfilereplacelib.cpp b/kfilereplace/kfilereplacelib.cpp index 6e0d8323..b9073dea 100644 --- a/kfilereplace/kfilereplacelib.cpp +++ b/kfilereplace/kfilereplacelib.cpp @@ -102,19 +102,19 @@ TQString KFileReplaceLib::formatFileSize(double size) if(size >= kilo && size < mega) { double d = size / kilo; - stringSize = i18n("%1 KB").arg(TQString::number(d,'f',2)); + stringSize = i18n("%1 KB").tqarg(TQString::number(d,'f',2)); } else if(size >= mega && size < giga) { double d = size / mega; - stringSize = i18n("%1 MB").arg(TQString::number(d,'f',2)); + stringSize = i18n("%1 MB").tqarg(TQString::number(d,'f',2)); } else if(size >= giga) { double d = size / giga; - stringSize = i18n("%1 GB").arg(TQString::number(d,'f',2)); + stringSize = i18n("%1 GB").tqarg(TQString::number(d,'f',2)); } return stringSize; } @@ -137,7 +137,7 @@ void KFileReplaceLib::convertOldToNewKFRFormat(const TQString& fileName, KListVi if(!f || (err != 1) || (pgm != "KFileReplace")) { - KMessageBox::error(0, i18n("<qt>Cannot open the file <b>%1</b> and load the string list. This file seems not to be a valid old kfr file or it is broken.</qt>").arg(fileName)); + KMessageBox::error(0, i18n("<qt>Cannot open the file <b>%1</b> and load the string list. This file seems not to be a valid old kfr file or it is broken.</qt>").tqarg(fileName)); return ; } @@ -324,7 +324,7 @@ void KFileReplaceLib::setIconForFileEntry(TQListViewItem* item, TQString path) extensionMap["kmdr"] = "widget_doc"; extensionMap["kwd"] = "kword_kwd"; extensionMap["log"] = "log"; - extensionMap["moc"] = "source_moc"; + extensionMap["tqmoc"] = "source_tqmoc"; extensionMap["mp3"] = "sound"; extensionMap["o"] = "source_o"; extensionMap["pdf"] = "pdf"; diff --git a/kfilereplace/kfilereplacepart.cpp b/kfilereplace/kfilereplacepart.cpp index 3955e643..25f6c7ca 100644 --- a/kfilereplace/kfilereplacepart.cpp +++ b/kfilereplace/kfilereplacepart.cpp @@ -60,11 +60,11 @@ typedef KParts::GenericFactory<KFileReplacePart> FileReplaceFactory; K_EXPORT_COMPONENT_FACTORY( libkfilereplacepart, FileReplaceFactory ) -KFileReplacePart::KFileReplacePart(TQWidget* parentWidget, const char* , TQObject* parent, const char* name, const TQStringList & ) : KParts::ReadOnlyPart(parent,name) +KFileReplacePart::KFileReplacePart(TQWidget* tqparentWidget, const char* , TQObject* tqparent, const char* name, const TQStringList & ) : KParts::ReadOnlyPart(tqparent,name) { setInstance(FileReplaceFactory::instance()); KGlobal::locale()->insertCatalogue("kfilereplace"); - m_parentWidget = parentWidget; + m_parentWidget = tqparentWidget; m_config = new KConfig("kfilereplacerc"); m_aboutDlg = 0; m_stop = false; @@ -114,7 +114,7 @@ void KFileReplacePart::slotSearchingOperation() rv->setSorting(-1); // show wait cursor - TQApplication::setOverrideCursor( Qt::waitCursor ); + TQApplication::setOverrideCursor( TQt::waitCursor ); freezeActions(); @@ -161,7 +161,7 @@ void KFileReplacePart::slotSearchingOperation() void KFileReplacePart::slotReplacingOperation() { - if (KMessageBox::warningContinueCancel(m_w, i18n("<qt>You have selected <b>%1</b> as the encoding of the files.<br>Selecting the correct encoding is very important as if you have files that have some other encoding than the selected one, after a replace you may damage those files.<br><br>In case you do not know the encoding of your files, select <i>utf8</i> and <b>enable</b> the creation of backup files. This setting will autodetect <i>utf8</i> and <i>utf16</i> files, but the changed files will be converted to <i>utf8</i>.</qt>").arg(m_option->m_encoding), i18n("File Encoding Warning"), KStdGuiItem::cont(), "ShowEncodingWarning") == KMessageBox::Cancel) + if (KMessageBox::warningContinueCancel(m_w, i18n("<qt>You have selected <b>%1</b> as the encoding of the files.<br>Selecting the correct encoding is very important as if you have files that have some other encoding than the selected one, after a replace you may damage those files.<br><br>In case you do not know the encoding of your files, select <i>utf8</i> and <b>enable</b> the creation of backup files. This setting will autodetect <i>utf8</i> and <i>utf16</i> files, but the changed files will be converted to <i>utf8</i>.</qt>").tqarg(m_option->m_encoding), i18n("File Encoding Warning"), KStdGuiItem::cont(), "ShowEncodingWarning") == KMessageBox::Cancel) return; if(!checkBeforeOperation()) return; @@ -179,7 +179,7 @@ void KFileReplacePart::slotReplacingOperation() rv->setColumnText(4,i18n("Replaced strings")); } // show wait cursor - TQApplication::setOverrideCursor( Qt::waitCursor ); + TQApplication::setOverrideCursor( TQt::waitCursor ); freezeActions(); @@ -248,7 +248,7 @@ void KFileReplacePart::slotCreateReport() return ; } // Select the file where results will be saved - TQString documentName = KFileDialog::getSaveFileName(TQString::null, "*.xml|XML " + i18n("Files") + " (*.xml)", m_w, i18n("Save Report")); + TQString documentName = KFileDialog::getSaveFileName(TQString(), "*.xml|XML " + i18n("Files") + " (*.xml)", m_w, i18n("Save Report")); if (documentName.isEmpty()) return ; @@ -258,7 +258,7 @@ void KFileReplacePart::slotCreateReport() TQFileInfo fileInfo(documentName); if(fileInfo.exists()) { - KMessageBox::error(m_w, i18n("<qt>A folder or a file named <b>%1</b> already exists.</qt>").arg(documentName)); + KMessageBox::error(m_w, i18n("<qt>A folder or a file named <b>%1</b> already exists.</qt>").tqarg(documentName)); return ; } @@ -266,7 +266,7 @@ void KFileReplacePart::slotCreateReport() if(!directoryName.mkdir(documentName, true)) { - KMessageBox::error(m_w, i18n("<qt>Cannot create the <b>%1</b> folder.</qt>").arg(documentName)); + KMessageBox::error(m_w, i18n("<qt>Cannot create the <b>%1</b> folder.</qt>").tqarg(documentName)); return ; } @@ -345,7 +345,7 @@ void KFileReplacePart::slotStringsLoad() { // Selects the file to load from TQString menu = "*.kfr|" + i18n("KFileReplace strings") + " (*.kfr)\n*|"+i18n("All Files") + " (*)"; - TQString fileName = KFileDialog::getOpenFileName(TQString::null, menu, m_w, i18n("Load Strings From File")); + TQString fileName = KFileDialog::getOpenFileName(TQString(), menu, m_w, i18n("Load Strings From File")); if(!fileName.isEmpty()) loadRulesFile(fileName); @@ -443,7 +443,7 @@ void KFileReplacePart::showAboutApplication() void KFileReplacePart::appHelpActivated() { - kapp->invokeHelp(TQString::null, "kfilereplace"); + kapp->invokeHelp(TQString(), "kfilereplace"); } void KFileReplacePart::reportBug() @@ -464,7 +464,7 @@ void KFileReplacePart::resetActions() actionCollection()->action("new_project")->setEnabled(true); actionCollection()->action("search")->setEnabled(hasItems && searchOnlyMode); actionCollection()->action("file_simulate")->setEnabled(hasItems && !searchOnlyMode); - actionCollection()->action("replace")->setEnabled(hasItems && !searchOnlyMode); + actionCollection()->action("tqreplace")->setEnabled(hasItems && !searchOnlyMode); actionCollection()->action("save_results")->setEnabled(hasItems); actionCollection()->action("stop")->setEnabled(false); @@ -567,48 +567,48 @@ void KFileReplacePart::initGUI() } } // File - (void)new KAction(i18n("Customize Search/Replace Session..."), "projectopen", 0, this, TQT_SLOT(slotSetNewParameters()), actionCollection(), "new_project"); - (void)new KAction(i18n("&Search"), "filesearch", 0, this, TQT_SLOT(slotSearchingOperation()), actionCollection(), "search"); - (void)new KAction(i18n("S&imulate"), "filesimulate", 0, this, TQT_SLOT(slotSimulatingOperation()), actionCollection(), "file_simulate"); - (void)new KAction(i18n("&Replace"), "filereplace", 0, this, TQT_SLOT(slotReplacingOperation()), actionCollection(), "replace"); - (void)new KAction(i18n("Sto&p"), "stop", 0, this, TQT_SLOT(slotStop()), actionCollection(), "stop"); - (void)new KAction(i18n("Cre&ate Report File..."), "filesaveas", 0, this, TQT_SLOT(slotCreateReport()), actionCollection(), "save_results"); + (void)new KAction(i18n("Customize Search/Replace Session..."), "projectopen", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetNewParameters()), actionCollection(), "new_project"); + (void)new KAction(i18n("&Search"), "filesearch", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSearchingOperation()), actionCollection(), "search"); + (void)new KAction(i18n("S&imulate"), "filesimulate", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSimulatingOperation()), actionCollection(), "file_simulate"); + (void)new KAction(i18n("&Replace"), "filereplace", 0, TQT_TQOBJECT(this), TQT_SLOT(slotReplacingOperation()), actionCollection(), "tqreplace"); + (void)new KAction(i18n("Sto&p"), "stop", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStop()), actionCollection(), "stop"); + (void)new KAction(i18n("Cre&ate Report File..."), "filesaveas", 0, TQT_TQOBJECT(this), TQT_SLOT(slotCreateReport()), actionCollection(), "save_results"); // Strings - (void)new KAction(i18n("&Add String..."), "editadd", 0, this, TQT_SLOT(slotStringsAdd()), actionCollection(), "strings_add"); + (void)new KAction(i18n("&Add String..."), "editadd", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsAdd()), actionCollection(), "strings_add"); - (void)new KAction(i18n("&Delete String"), "editremove", 0, this, TQT_SLOT(slotStringsDeleteItem()), actionCollection(), "strings_del"); - (void)new KAction(i18n("&Empty Strings List"), "editdelete", 0, this, TQT_SLOT(slotStringsEmpty()), actionCollection(), "strings_empty"); - (void)new KAction(i18n("Edit Selected String..."), "edit", 0, this, TQT_SLOT(slotStringsEdit()), actionCollection(), "strings_edit"); - (void)new KAction(i18n("&Save Strings List to File..."), "filesaveas", 0, this, TQT_SLOT(slotStringsSave()), actionCollection(), "strings_save"); - (void)new KAction(i18n("&Load Strings List From File..."), "unsortedList", 0, this, TQT_SLOT(slotStringsLoad()), actionCollection(), "strings_load"); - (void)new KRecentFilesAction(i18n("&Load Recent Strings Files"), "fileopen", 0, this, TQT_SLOT(slotOpenRecentStringFile(const KURL&)), actionCollection(),"strings_load_recent"); - (void)new KAction(i18n("&Invert Current String (search <--> replace)"), "invert", 0, this, TQT_SLOT(slotStringsInvertCur()), actionCollection(), "strings_invert"); - (void)new KAction(i18n("&Invert All Strings (search <--> replace)"), "invert", 0, this, TQT_SLOT(slotStringsInvertAll()), actionCollection(), "strings_invert_all"); + (void)new KAction(i18n("&Delete String"), "editremove", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsDeleteItem()), actionCollection(), "strings_del"); + (void)new KAction(i18n("&Empty Strings List"), "editdelete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsEmpty()), actionCollection(), "strings_empty"); + (void)new KAction(i18n("Edit Selected String..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsEdit()), actionCollection(), "strings_edit"); + (void)new KAction(i18n("&Save Strings List to File..."), "filesaveas", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsSave()), actionCollection(), "strings_save"); + (void)new KAction(i18n("&Load Strings List From File..."), "unsortedList", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsLoad()), actionCollection(), "strings_load"); + (void)new KRecentFilesAction(i18n("&Load Recent Strings Files"), "fileopen", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenRecentStringFile(const KURL&)), actionCollection(),"strings_load_recent"); + (void)new KAction(i18n("&Invert Current String (search <--> tqreplace)"), "invert", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsInvertCur()), actionCollection(), "strings_invert"); + (void)new KAction(i18n("&Invert All Strings (search <--> tqreplace)"), "invert", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStringsInvertAll()), actionCollection(), "strings_invert_all"); // Options - (void)new KToggleAction(i18n("&Include Sub-Folders"), "recursive_option", 0, this, TQT_SLOT(slotOptionRecursive()), actionCollection(), "options_recursive"); - (void)new KToggleAction(i18n("Create &Backup Files"), "backup_option", 0, this, TQT_SLOT(slotOptionBackup()), actionCollection(), "options_backup"); - (void)new KToggleAction(i18n("Case &Sensitive"), "casesensitive_option", 0, this, TQT_SLOT(slotOptionCaseSensitive()), actionCollection(), "options_case"); - (void)new KToggleAction(i18n("Enable Commands &in Replace String: [$command:option$]"), "command_option", 0, this, TQT_SLOT(slotOptionVariables()), actionCollection(), "options_var"); - (void)new KToggleAction(i18n("Enable &Regular Expressions"), "regularexpression_option", 0, this, TQT_SLOT(slotOptionRegularExpressions()), actionCollection(), "options_regularexpressions"); - (void)new KAction(i18n("Configure &KFileReplace..."), "configure", 0, this, TQT_SLOT(slotOptionPreferences()), actionCollection(), "configure_kfilereplace"); + (void)new KToggleAction(i18n("&Include Sub-Folders"), "recursive_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionRecursive()), actionCollection(), "options_recursive"); + (void)new KToggleAction(i18n("Create &Backup Files"), "backup_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionBackup()), actionCollection(), "options_backup"); + (void)new KToggleAction(i18n("Case &Sensitive"), "casesensitive_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionCaseSensitive()), actionCollection(), "options_case"); + (void)new KToggleAction(i18n("Enable Commands &in Replace String: [$command:option$]"), "command_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionVariables()), actionCollection(), "options_var"); + (void)new KToggleAction(i18n("Enable &Regular Expressions"), "regularexpression_option", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionRegularExpressions()), actionCollection(), "options_regularexpressions"); + (void)new KAction(i18n("Configure &KFileReplace..."), "configure", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOptionPreferences()), actionCollection(), "configure_kfilereplace"); // Results - (void)new KAction(i18n("&Properties"), "informations", 0, m_view, TQT_SLOT(slotResultProperties()), actionCollection(), "results_infos"); - (void)new KAction(i18n("&Open"), "filenew", 0, m_view, TQT_SLOT(slotResultOpen()), actionCollection(), "results_openfile"); + (void)new KAction(i18n("&Properties"), "informations", 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultProperties()), actionCollection(), "results_infos"); + (void)new KAction(i18n("&Open"), "filenew", 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultOpen()), actionCollection(), "results_openfile"); if(quantaFound) { - (void)new KAction(i18n("&Edit in Quanta"), "quanta", 0, m_view, TQT_SLOT(slotResultEdit()), actionCollection(), "results_editfile"); + (void)new KAction(i18n("&Edit in Quanta"), "quanta", 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultEdit()), actionCollection(), "results_editfile"); } - (void)new KAction(i18n("Open Parent &Folder"), "fileopen", 0, m_view, TQT_SLOT(slotResultDirOpen()), actionCollection(), "results_opendir"); - (void)new KAction(i18n("&Delete"), "editdelete", 0, m_view, TQT_SLOT(slotResultDelete()), actionCollection(), "results_delete"); - (void)new KAction(i18n("E&xpand Tree"), 0, m_view, TQT_SLOT(slotResultTreeExpand()), actionCollection(), "results_treeexpand"); - (void)new KAction(i18n("&Reduce Tree"), 0, m_view, TQT_SLOT(slotResultTreeReduce()), actionCollection(), "results_treereduce"); - (void)new KAction(i18n("&About KFileReplace"), "kfilereplace", 0, this, TQT_SLOT(showAboutApplication()), actionCollection(), "help_about_kfilereplace"); - (void)new KAction(i18n("KFileReplace &Handbook"), "help", 0, this, TQT_SLOT(appHelpActivated()), actionCollection(), "help_kfilereplace"); - (void)new KAction(i18n("&Report Bug"), 0, 0, this, TQT_SLOT(reportBug()), actionCollection(), "report_bug"); + (void)new KAction(i18n("Open Parent &Folder"), "fileopen", 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultDirOpen()), actionCollection(), "results_opendir"); + (void)new KAction(i18n("&Delete"), "editdelete", 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultDelete()), actionCollection(), "results_delete"); + (void)new KAction(i18n("E&xpand Tree"), 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultTreeExpand()), actionCollection(), "results_treeexpand"); + (void)new KAction(i18n("&Reduce Tree"), 0, TQT_TQOBJECT(m_view), TQT_SLOT(slotResultTreeReduce()), actionCollection(), "results_treereduce"); + (void)new KAction(i18n("&About KFileReplace"), "kfilereplace", 0, TQT_TQOBJECT(this), TQT_SLOT(showAboutApplication()), actionCollection(), "help_about_kfilereplace"); + (void)new KAction(i18n("KFileReplace &Handbook"), "help", 0, TQT_TQOBJECT(this), TQT_SLOT(appHelpActivated()), actionCollection(), "help_kfilereplace"); + (void)new KAction(i18n("&Report Bug"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(reportBug()), actionCollection(), "report_bug"); } @@ -630,7 +630,7 @@ void KFileReplacePart::freezeActions() actionCollection()->action("stop")->setEnabled(true); actionCollection()->action("file_simulate")->setEnabled(false); - actionCollection()->action("replace")->setEnabled(false); + actionCollection()->action("tqreplace")->setEnabled(false); actionCollection()->action("search")->setEnabled(false); actionCollection()->action("strings_add")->setEnabled(false); actionCollection()->action("strings_del")->setEnabled(false); @@ -1022,7 +1022,7 @@ void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQStri TQFile currentFile(oldPathString); if(!currentFile.open(IO_ReadOnly)) { - KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(oldFileName),TQString::null, rcNotifyOnErrors); + KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").tqarg(oldFileName),TQString(), rcNotifyOnErrors); return ; } TQTextStream currentStream(¤tFile); @@ -1061,7 +1061,7 @@ void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQStri TQFile newFile(oldPathString); if(!newFile.open(IO_WriteOnly)) { - KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for writing.</qt>").arg(oldFileName),TQString::null, rcNotifyOnErrors); + KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for writing.</qt>").tqarg(oldFileName),TQString(), rcNotifyOnErrors); return ; } TQTextStream newStream(&newFile); @@ -1097,8 +1097,8 @@ void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQStri } item->setText(4,TQString::number(occurrence,10)); - item->setText(5,TQString("%1[%2]").arg(oldFileInfo.owner()).arg(oldFileInfo.ownerId())); - item->setText(6,TQString("%1[%2]").arg(oldFileInfo.group()).arg(oldFileInfo.groupId())); + item->setText(5,TQString("%1[%2]").tqarg(oldFileInfo.owner()).tqarg(oldFileInfo.ownerId())); + item->setText(6,TQString("%1[%2]").tqarg(oldFileInfo.group()).tqarg(oldFileInfo.groupId())); } } @@ -1110,7 +1110,7 @@ void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQS if (!oldFile.open(IO_ReadOnly)) { - KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(oldFile.name()),TQString::null, rcNotifyOnErrors); + KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").tqarg(oldFile.name()),TQString(), rcNotifyOnErrors); return ; } @@ -1139,7 +1139,7 @@ void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQS TQFile newFile(oldPathString); if(!newFile.open(IO_WriteOnly)) { - KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for writing.</qt>").arg(newFile.name()),TQString::null, rcNotifyOnErrors); + KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for writing.</qt>").tqarg(newFile.name()),TQString(), rcNotifyOnErrors); return ; } TQTextStream newStream( &newFile ); @@ -1171,8 +1171,8 @@ void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQS item->setText(3,"-"); item->setText(4,TQString::number(occurrence,10)); - item->setText(5,TQString("%1[%2]").arg(oldFileInfo.owner()).arg(oldFileInfo.ownerId())); - item->setText(6,TQString("%1[%2]").arg(oldFileInfo.group()).arg(oldFileInfo.groupId())); + item->setText(5,TQString("%1[%2]").tqarg(oldFileInfo.owner()).tqarg(oldFileInfo.ownerId())); + item->setText(6,TQString("%1[%2]").tqarg(oldFileInfo.group()).tqarg(oldFileInfo.groupId())); } } @@ -1196,7 +1196,7 @@ void KFileReplacePart::replacingLoop(TQString& line, KListViewItem** item, bool& if(askConfirmReplace) { int answer = KMessageBox::questionYesNo(0, - i18n("<qt>Do you want to replace the string <b>%1</b> with the string <b>%2</b>?</qt>").arg(it.key()).arg(it.data()), + i18n("<qt>Do you want to replace the string <b>%1</b> with the string <b>%2</b>?</qt>").tqarg(it.key()).tqarg(it.data()), i18n("Confirm Replace"), i18n("Replace"), i18n("Do Not Replace"), @@ -1332,7 +1332,7 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa if(!file.open(IO_ReadOnly)) { - KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").arg(fileName), TQString::null, rcNotifyOnErrors); + KMessageBox::information(m_w, i18n("<qt>Cannot open file <b>%1</b> for reading.</qt>").tqarg(fileName), TQString(), rcNotifyOnErrors); return ; } // Creates a stream with the file @@ -1381,15 +1381,15 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa int pos; if(m_option->m_regularExpressions) - pos = line.find(rxKey); + pos = line.tqfind(rxKey); else - pos = line.find(strKey, 0 ,m_option->m_caseSensitive); + pos = line.tqfind(strKey, 0 ,m_option->m_caseSensitive); if(pos != -1) { atLeastOneStringFound = true; - int lineNumber = line.mid(0,pos).contains('\n')+1; - int columnNumber = pos - line.findRev('\n',pos); + int lineNumber = line.mid(0,pos).tqcontains('\n')+1; + int columnNumber = pos - line.tqfindRev('\n',pos); if (!item) item = new KListViewItem(rv); @@ -1403,7 +1403,7 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa else capturedText = line.mid(pos,strKey.length()); - msg = i18n(" Line:%2, Col:%3 - \"%1\"").arg(capturedText).arg(TQString::number(lineNumber,10)).arg(TQString::number(columnNumber,10)); + msg = i18n(" Line:%2, Col:%3 - \"%1\"").tqarg(capturedText).tqarg(TQString::number(lineNumber,10)).tqarg(TQString::number(columnNumber,10)); tempItem->setMultiLinesEnabled(true); tempItem->setText(0,msg); occurrence = 1; @@ -1418,7 +1418,7 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa if(m_option->m_regularExpressions) pos = rxKey.search(line,pos); else - pos = line.find(strKey, pos ,m_option->m_caseSensitive); + pos = line.tqfind(strKey, pos ,m_option->m_caseSensitive); while(pos != -1) { @@ -1429,8 +1429,8 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa atLeastOneStringFound = true; TQString msg, capturedText; - int lineNumber = line.mid(0,pos).contains('\n')+1; - int columnNumber = pos - line.findRev('\n',pos); + int lineNumber = line.mid(0,pos).tqcontains('\n')+1; + int columnNumber = pos - line.tqfindRev('\n',pos); if(m_option->m_regularExpressions) { @@ -1440,10 +1440,10 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa else { capturedText = line.mid(pos,strKey.length()); - pos = line.find(strKey,pos+strKey.length()); + pos = line.tqfind(strKey,pos+strKey.length()); } - msg = i18n(" Line:%2, Col:%3 - \"%1\"").arg(capturedText).arg(TQString::number(lineNumber,10)).arg(TQString::number(columnNumber,10)); + msg = i18n(" Line:%2, Col:%3 - \"%1\"").tqarg(capturedText).tqarg(TQString::number(lineNumber,10)).tqarg(TQString::number(columnNumber,10)); if(!item) item = new KListViewItem(rv); @@ -1475,8 +1475,8 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa item->setText(1,currentDir); item->setText(2,KFileReplaceLib::formatFileSize(fileInfo.size())); item->setText(3,TQString::number(occurrence,10)); - item->setText(4,TQString("%1[%2]").arg(fileInfo.owner()).arg(fileInfo.ownerId())); - item->setText(5,TQString("%1[%2]").arg(fileInfo.group()).arg(fileInfo.groupId())); + item->setText(4,TQString("%1[%2]").tqarg(fileInfo.owner()).tqarg(fileInfo.ownerId())); + item->setText(5,TQString("%1[%2]").tqarg(fileInfo.group()).tqarg(fileInfo.groupId())); } } @@ -1509,7 +1509,7 @@ void KFileReplacePart::loadRulesFile(const TQString& fileName) if(!file.open(IO_ReadOnly)) { - KMessageBox::error(m_w, i18n("<qt>Cannot open the file <b>%1</b> and load the string list.</qt>").arg(fileName)); + KMessageBox::error(m_w, i18n("<qt>Cannot open the file <b>%1</b> and load the string list.</qt>").tqarg(fileName)); return ; } @@ -1517,7 +1517,7 @@ void KFileReplacePart::loadRulesFile(const TQString& fileName) { file.close(); - KMessageBox::information(m_w, i18n("<qt>File <b>%1</b> seems not to be written in new kfr format. Remember that the old kfr format will be soon abandoned. You can convert your old rules files by simply saving them with kfilereplace.</qt>").arg(fileName),i18n("Warning")); + KMessageBox::information(m_w, i18n("<qt>File <b>%1</b> seems not to be written in new kfr format. Remember that the old kfr format will be soon abandoned. You can convert your old rules files by simply saving them with kfilereplace.</qt>").tqarg(fileName),i18n("Warning")); KFileReplaceLib::convertOldToNewKFRFormat(fileName, sv); @@ -1537,7 +1537,7 @@ void KFileReplacePart::loadRulesFile(const TQString& fileName) if(searchAttribute.isNull() || searchAttribute.isEmpty()) { - int answer = KMessageBox::warningYesNo(m_w, i18n("<qt>The format of kfr files has been changed; attempting to load <b>%1</b>. Please see the KFilereplace manual for details. Do you want to load a search-and-replace list of strings?</qt>").arg(fileName),i18n("Warning"),i18n("Load"),i18n("Do Not Load")); + int answer = KMessageBox::warningYesNo(m_w, i18n("<qt>The format of kfr files has been changed; attempting to load <b>%1</b>. Please see the KFilereplace manual for details. Do you want to load a search-and-replace list of strings?</qt>").tqarg(fileName),i18n("Warning"),i18n("Load"),i18n("Do Not Load")); if(answer == KMessageBox::Yes) searchAttribute = "false"; @@ -1569,7 +1569,7 @@ void KFileReplacePart::loadRulesFile(const TQString& fileName) // Adds file to "load strings form file" menu TQStringList fileList = m_option->m_recentStringFileList; - if(!fileList.contains(fileName)) + if(!fileList.tqcontains(fileName)) { fileList.append(fileName); ((KRecentFilesAction* ) actionCollection()->action("strings_load_recent"))->setItems(fileList); @@ -1623,10 +1623,10 @@ bool KFileReplacePart::checkBeforeOperation() loadViewContent(); KListView* sv = m_view->getStringsView(); - // Checks if there are strings to replace (not need in search operation) + // Checks if there are strings to tqreplace (not need in search operation) if (sv->childCount() == 0) { - KMessageBox::error(m_w, i18n("There are no strings to search and replace.")); + KMessageBox::error(m_w, i18n("There are no strings to search and tqreplace.")); return false; } @@ -1639,7 +1639,7 @@ bool KFileReplacePart::checkBeforeOperation() if(!dir.exists()) { - KMessageBox::error(m_w, i18n("<qt>The main folder of the project <b>%1</b> does not exist.</qt>").arg(directory)); + KMessageBox::error(m_w, i18n("<qt>The main folder of the project <b>%1</b> does not exist.</qt>").tqarg(directory)); return false; } @@ -1647,7 +1647,7 @@ bool KFileReplacePart::checkBeforeOperation() if(!(dirInfo.isReadable() && dirInfo.isExecutable()) || (!m_option->m_searchingOnlyMode && !m_option->m_simulation && !(dirInfo.isWritable()))) { - KMessageBox::error(m_w, i18n("<qt>Access denied in the main folder of the project:<br><b>%1</b></qt>").arg(directory)); + KMessageBox::error(m_w, i18n("<qt>Access denied in the main folder of the project:<br><b>%1</b></qt>").tqarg(directory)); return false; } diff --git a/kfilereplace/kfilereplacepart.h b/kfilereplace/kfilereplacepart.h index a5044ff9..757a02d2 100644 --- a/kfilereplace/kfilereplacepart.h +++ b/kfilereplace/kfilereplacepart.h @@ -32,6 +32,7 @@ class KFileReplaceView; class KFileReplacePart: public KParts::ReadOnlyPart { Q_OBJECT + TQ_OBJECT private: //MEMBERS KFileReplaceView* m_view; @@ -46,9 +47,9 @@ class KFileReplacePart: public KParts::ReadOnlyPart int m_optionMask; public://Constructors - KFileReplacePart(TQWidget *parentWidget, + KFileReplacePart(TQWidget *tqparentWidget, const char *widgetName, - TQObject *parent, + TQObject *tqparent, const char *name, const TQStringList &args); ~KFileReplacePart(); diff --git a/kfilereplace/kfilereplaceview.cpp b/kfilereplace/kfilereplaceview.cpp index fc0d08aa..f68e0c8f 100644 --- a/kfilereplace/kfilereplaceview.cpp +++ b/kfilereplace/kfilereplaceview.cpp @@ -15,7 +15,7 @@ * * *****************************************************************************/ -// Qt +// TQt #include <tqwhatsthis.h> #include <tqmap.h> #include <tqfileinfo.h> @@ -43,7 +43,7 @@ using namespace whatthisNameSpace; -KFileReplaceView::KFileReplaceView(RCOptions* info, TQWidget *parent,const char *name):KFileReplaceViewWdg(parent,name) +KFileReplaceView::KFileReplaceView(RCOptions* info, TQWidget *tqparent,const char *name):KFileReplaceViewWdg(tqparent,name) { m_option = info; @@ -65,8 +65,8 @@ TQString KFileReplaceView::currentPath() if(! m_lviCurrent) lvi = m_rv->currentItem(); else lvi = (TQListViewItem*) m_lviCurrent; - while (lvi->parent()) - lvi = lvi->parent(); + while (lvi->tqparent()) + lvi = lvi->tqparent(); return TQString(lvi->text(1)+"/"+lvi->text(0)); } @@ -117,7 +117,7 @@ void KFileReplaceView::stringsInvert(bool invertAll) // Cannot invert the string when search string is empty if (replaceText.isEmpty()) { - KMessageBox::error(0, i18n("<qt>Cannot invert string <b>%1</b>, because the search string would be empty.</qt>").arg(searchText)); + KMessageBox::error(0, i18n("<qt>Cannot invert string <b>%1</b>, because the search string would be empty.</qt>").tqarg(searchText)); return; } @@ -175,7 +175,7 @@ void KFileReplaceView::slotMouseButtonClicked (int button, TQListViewItem *lvi, return; // RIGHT BUTTON - if (button == TQMouseEvent::RightButton) + if (button == Qt::RightButton) { m_lviCurrent = static_cast<KListViewItem*>(lvi); m_menuResult->popup(pos); @@ -256,8 +256,8 @@ void KFileReplaceView::slotResultEdit() if(!success) { - TQString message = i18n("File %1 cannot be opened. Might be a DCOP problem.").arg(path); - KMessageBox::error(parentWidget(), message); + TQString message = i18n("File %1 cannot be opened. Might be a DCOP problem.").tqarg(path); + KMessageBox::error(tqparentWidget(), message); } } if (lviChild == lvi) @@ -278,8 +278,8 @@ void KFileReplaceView::slotResultDelete() if (!currItem.isEmpty()) { TQFile fi; - int answer = KMessageBox::warningContinueCancel(this, i18n("Do you really want to delete %1?").arg(currItem), - TQString::null,KStdGuiItem::del()); + int answer = KMessageBox::warningContinueCancel(this, i18n("Do you really want to delete %1?").tqarg(currItem), + TQString(),KStdGuiItem::del()); if(answer == KMessageBox::Continue) { @@ -338,7 +338,7 @@ void KFileReplaceView::slotQuickStringsAdd(const TQString& quickSearch, const TQ KeyValueMap map; if(quickReplace.isEmpty()) { - map[quickSearch] = TQString::null; + map[quickSearch] = TQString(); m_option->m_searchingOnlyMode = true; } else @@ -417,13 +417,13 @@ void KFileReplaceView::slotStringsSave() 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)); + "\n\t</replacement>").tqarg(lvi->text(0)).tqarg(lvi->text(1)); lvi = lvi->nextSibling(); } // Selects the file where strings will be saved TQString menu = "*.kfr|" + i18n("KFileReplace Strings") + " (*.kfr)\n*|" + i18n("All Files") + " (*)"; - TQString fileName = KFileDialog::getSaveFileName(TQString::null, menu, 0, i18n("Save Strings to File")); + TQString fileName = KFileDialog::getSaveFileName(TQString(), menu, 0, i18n("Save Strings to File")); if (fileName.isEmpty()) return; @@ -434,7 +434,7 @@ void KFileReplaceView::slotStringsSave() TQFile file( fileName ); if(!file.open( IO_WriteOnly )) { - KMessageBox::error(0, i18n("File %1 cannot be saved.").arg(fileName)); + KMessageBox::error(0, i18n("File %1 cannot be saved.").tqarg(fileName)); return ; } TQTextStream oTStream( &file ); @@ -498,7 +498,7 @@ void KFileReplaceView::initGUI() - m_menuResult->insertItem(SmallIconSet(TQString::fromLatin1("fileopen")), + m_menuResult->insertItem(SmallIconSet(TQString::tqfromLatin1("fileopen")), i18n("&Open"), this, TQT_SLOT(slotResultOpen())); @@ -517,16 +517,16 @@ void KFileReplaceView::initGUI() TQT_SLOT(slotResultEdit())); } - m_menuResult->insertItem(SmallIconSet(TQString::fromLatin1("up")), + m_menuResult->insertItem(SmallIconSet(TQString::tqfromLatin1("up")), i18n("Open Parent &Folder"), this, TQT_SLOT(slotResultDirOpen())); - m_menuResult->insertItem(SmallIconSet(TQString::fromLatin1("editdelete")), + m_menuResult->insertItem(SmallIconSet(TQString::tqfromLatin1("editdelete")), i18n("&Delete"), this, TQT_SLOT(slotResultDelete())); m_menuResult->insertSeparator(); - m_menuResult->insertItem(SmallIconSet(TQString::fromLatin1("info")), + m_menuResult->insertItem(SmallIconSet(TQString::tqfromLatin1("info")), i18n("&Properties"), this, TQT_SLOT(slotResultProperties())); @@ -562,7 +562,7 @@ coord KFileReplaceView::extractWordCoordinates(TQListViewItem* lvi) c.column = 0; TQString s = lvi->text(0); //qWarning("WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW=%s",s.latin1()); - /* if(lvi->parent()) s = lvi->text(0); + /* if(lvi->tqparent()) s = lvi->text(0); else return c;*/ TQString temp; @@ -591,7 +591,7 @@ coord KFileReplaceView::extractWordCoordinates(TQListViewItem* lvi) break; } c.line = temp.toInt(); - temp = TQString::null; + temp = TQString(); while(true) { @@ -640,7 +640,7 @@ void KFileReplaceView::setMap() while(i != 0) { if(m_option->m_searchingOnlyMode) - map[i->text(0)] = TQString::null; + map[i->text(0)] = TQString(); else map[i->text(0)] = i->text(1); i = i->nextSibling(); diff --git a/kfilereplace/kfilereplaceview.h b/kfilereplace/kfilereplaceview.h index 1c6af2d9..4e94081e 100644 --- a/kfilereplace/kfilereplaceview.h +++ b/kfilereplace/kfilereplaceview.h @@ -25,7 +25,7 @@ //QT #include <tqlcdnumber.h> #include <tqwidgetstack.h> -class QPixMap; +class TQPixMap; //KDE class KPopupMenu; @@ -52,11 +52,12 @@ class coord /** - * The view of KFilereplace. + * The view of KFiletqreplace. */ class KFileReplaceView : public KFileReplaceViewWdg { Q_OBJECT + TQ_OBJECT private: KPopupMenu* m_menuResult; RCOptions* m_option; @@ -65,7 +66,7 @@ class KFileReplaceView : public KFileReplaceViewWdg * m_sv; public://Constructors - KFileReplaceView(RCOptions* info, TQWidget *parent,const char *name); + KFileReplaceView(RCOptions* info, TQWidget *tqparent,const char *name); public: TQString currentPath(); diff --git a/kfilereplace/kfilereplaceviewwdg.ui b/kfilereplace/kfilereplaceviewwdg.ui index 17be7441..65452482 100644 --- a/kfilereplace/kfilereplaceviewwdg.ui +++ b/kfilereplace/kfilereplaceviewwdg.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>KFileReplaceViewWdg</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KFileReplaceViewWdg</cstring> </property> @@ -19,14 +19,14 @@ <property name="margin"> <number>0</number> </property> - <widget class="QSplitter" row="0" column="0"> + <widget class="TQSplitter" row="0" column="0"> <property name="name"> <cstring>splitter3</cstring> </property> <property name="orientation"> <enum>Vertical</enum> </property> - <widget class="QWidgetStack"> + <widget class="TQWidgetStack"> <property name="name"> <cstring>m_stackResults</cstring> </property> @@ -38,7 +38,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -161,7 +161,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -274,7 +274,7 @@ </grid> </widget> </widget> - <widget class="QWidgetStack"> + <widget class="TQWidgetStack"> <property name="name"> <cstring>m_stackStrings</cstring> </property> @@ -286,7 +286,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -341,7 +341,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -387,17 +387,17 @@ </widget> </widget> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> @@ -407,7 +407,7 @@ <property name="name"> <cstring>m_ledGo</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>20</width> <height>20</height> @@ -434,7 +434,7 @@ <property name="name"> <cstring>m_ledWait</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>20</width> <height>20</height> @@ -461,7 +461,7 @@ <property name="name"> <cstring>m_ledStop</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>20</width> <height>20</height> @@ -490,22 +490,22 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>354</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_tlFilesNumber</cstring> </property> @@ -513,7 +513,7 @@ <string>Scanned files:</string> </property> </widget> - <widget class="QLCDNumber"> + <widget class="TQLCDNumber"> <property name="name"> <cstring>m_lcdFilesNumber</cstring> </property> @@ -542,7 +542,7 @@ </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> <includehint>klistview.h</includehint> diff --git a/kfilereplace/knewprojectdlg.cpp b/kfilereplace/knewprojectdlg.cpp index b23c1eec..14221357 100644 --- a/kfilereplace/knewprojectdlg.cpp +++ b/kfilereplace/knewprojectdlg.cpp @@ -51,7 +51,7 @@ using namespace whatthisNameSpace; -KNewProjectDlg::KNewProjectDlg(RCOptions* info, TQWidget *parent, const char *name) : KNewProjectDlgS(parent, name) +KNewProjectDlg::KNewProjectDlg(RCOptions* info, TQWidget *tqparent, const char *name) : KNewProjectDlgS(tqparent, name) { m_searchNowFlag = ""; m_option = info; @@ -94,7 +94,7 @@ void KNewProjectDlg::saveRCOptions() void KNewProjectDlg::slotDir() { - TQString directoryString = KFileDialog::getExistingDirectory(TQString::null, this, i18n("Project Directory")); + TQString directoryString = KFileDialog::getExistingDirectory(TQString(), this, i18n("Project Directory")); if(!directoryString.isEmpty()) m_cbLocation->setEditText(directoryString); } @@ -493,7 +493,7 @@ void KNewProjectDlg::setDatas(const TQString& directoryString, const TQString& f m_cbFilter->setEditText(filterString); } -bool KNewProjectDlg::contains(TQListView* lv,const TQString& s, int column) +bool KNewProjectDlg::tqcontains(TQListView* lv,const TQString& s, int column) { TQListViewItem* i = lv->firstChild(); while (i != 0) diff --git a/kfilereplace/knewprojectdlg.h b/kfilereplace/knewprojectdlg.h index ac537eac..7459bacf 100644 --- a/kfilereplace/knewprojectdlg.h +++ b/kfilereplace/knewprojectdlg.h @@ -2,7 +2,7 @@ knewprojectdlg.h - description ------------------- begin : Tue Dec 28 1999 - copyright : (C) 1999 by François Dupoux + copyright : (C) 1999 by Fran�ois Dupoux (C) 2004 Emiliano Gulmini <emi_barbarossa@yahoo.it> email : dupoux@dupoux.com ***************************************************************************/ @@ -29,13 +29,14 @@ class KConfig; class KNewProjectDlg : public KNewProjectDlgS { Q_OBJECT + TQ_OBJECT private: TQString m_searchNowFlag; RCOptions* m_option; public: - KNewProjectDlg(RCOptions* info, TQWidget *parent=0, const char *name=0); + KNewProjectDlg(RCOptions* info, TQWidget *tqparent=0, const char *name=0); ~KNewProjectDlg(); public: @@ -55,7 +56,7 @@ class KNewProjectDlg : public KNewProjectDlgS void slotEnableChbUser(bool b); void slotEnableChbGroup(bool b); void slotEnableChbBackup(bool b); - void slotHelp(){ kapp->invokeHelp(TQString::null, "kfilereplace"); } + void slotHelp(){ kapp->invokeHelp(TQString(), "kfilereplace"); } private: void initGUI(); @@ -76,7 +77,7 @@ class KNewProjectDlg : public KNewProjectDlgS void saveFiltersList(); void saveBackupExtensionOptions(); - bool contains(TQListView* lv,const TQString& s, int column); + bool tqcontains(TQListView* lv,const TQString& s, int column); void setDatas(const TQString& directoryString, const TQString& filterString); void whatsThis(); }; diff --git a/kfilereplace/knewprojectdlgs.ui b/kfilereplace/knewprojectdlgs.ui index 238a003f..a037ae02 100644 --- a/kfilereplace/knewprojectdlgs.ui +++ b/kfilereplace/knewprojectdlgs.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KNewProjectDlgS</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KNewProjectDlgS</cstring> </property> @@ -25,9 +25,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout28</cstring> + <cstring>tqlayout28</cstring> </property> <hbox> <property name="name"> @@ -48,13 +48,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>70</width> <height>32767</height> @@ -74,14 +74,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>150</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pbSearchNow</cstring> </property> @@ -95,7 +95,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_pbSearchLater</cstring> </property> @@ -118,7 +118,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>70</width> <height>32767</height> @@ -130,11 +130,11 @@ </widget> </hbox> </widget> - <widget class="QTabWidget" row="0" column="0"> + <widget class="TQTabWidget" row="0" column="0"> <property name="name"> <cstring>tabWidget2</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -145,7 +145,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>groupBox5</cstring> </property> @@ -156,7 +156,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_tlFilter</cstring> </property> @@ -167,7 +167,7 @@ <cstring>cbFilter</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_tlLocation</cstring> </property> @@ -212,7 +212,7 @@ <string>Insert a search path here. You can use the search path button.</string> </property> </widget> - <widget class="QPushButton" row="0" column="2"> + <widget class="TQPushButton" row="0" column="2"> <property name="name"> <cstring>m_pbLocation</cstring> </property> @@ -254,7 +254,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_chbIncludeSubfolders</cstring> </property> @@ -267,7 +267,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox6</cstring> </property> @@ -278,17 +278,17 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>m_leSearch</cstring> </property> </widget> - <widget class="QLineEdit" row="1" column="1"> + <widget class="TQLineEdit" row="1" column="1"> <property name="name"> <cstring>m_leReplace</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_tlSearch</cstring> </property> @@ -296,7 +296,7 @@ <string>Search:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_tlReplace</cstring> </property> @@ -306,7 +306,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="2" column="0"> + <widget class="TQGroupBox" row="2" column="0"> <property name="name"> <cstring>groupBox4</cstring> </property> @@ -317,7 +317,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_chbRegularExpressions</cstring> </property> @@ -328,7 +328,7 @@ <string>Enable &regular expressions</string> </property> </widget> - <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_chbBackup</cstring> </property> @@ -336,7 +336,7 @@ <string>Do &backup copy instead of overwrite</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_chbCaseSensitive</cstring> </property> @@ -344,7 +344,7 @@ <string>&Case sensitive</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_chbEnableVariables</cstring> </property> @@ -352,7 +352,7 @@ <string>Enable co&mmands in the replace string</string> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>m_tlBackup</cstring> </property> @@ -360,7 +360,7 @@ <string>Backup copy suffix:</string> </property> </widget> - <widget class="QLineEdit" row="5" column="1" rowspan="1" colspan="2"> + <widget class="TQLineEdit" row="5" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>m_leBackup</cstring> </property> @@ -381,7 +381,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -393,7 +393,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -404,7 +404,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="2" column="0"> + <widget class="TQGroupBox" row="2" column="0"> <property name="name"> <cstring>gbOwnership</cstring> </property> @@ -415,7 +415,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>m_chbOwnerUser</cstring> </property> @@ -531,7 +531,7 @@ <bool>false</bool> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>m_chbOwnerGroup</cstring> </property> @@ -557,7 +557,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>gbAccessDate</cstring> </property> @@ -568,23 +568,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout18</cstring> + <cstring>tqlayout18</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_tlDateValid</cstring> </property> @@ -592,7 +592,7 @@ <string>Dates valid for:</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_chbDateMin</cstring> </property> @@ -600,7 +600,7 @@ <string>Accessed after:</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_chbDateMax</cstring> </property> @@ -610,9 +610,9 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout19</cstring> + <cstring>tqlayout19</cstring> </property> <vbox> <property name="name"> @@ -642,7 +642,7 @@ <bool>false</bool> </property> </widget> - <widget class="QDateEdit"> + <widget class="TQDateEdit"> <property name="name"> <cstring>m_dedDateMin</cstring> </property> @@ -674,7 +674,7 @@ </date> </property> </widget> - <widget class="QDateEdit"> + <widget class="TQDateEdit"> <property name="name"> <cstring>m_dedDateMax</cstring> </property> @@ -718,7 +718,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>190</width> <height>16</height> @@ -729,7 +729,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>gbSize</cstring> </property> @@ -740,23 +740,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout32</cstring> + <cstring>tqlayout32</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout31</cstring> + <cstring>tqlayout31</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_chbSizeMin</cstring> </property> @@ -764,7 +764,7 @@ <string>Minimum si&ze:</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_chbSizeMax</cstring> </property> @@ -774,15 +774,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout30</cstring> + <cstring>tqlayout30</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_spbSizeMin</cstring> </property> @@ -793,7 +793,7 @@ <number>0</number> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_spbSizeMax</cstring> </property> @@ -806,15 +806,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout31</cstring> + <cstring>tqlayout31</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_tlSizeMin</cstring> </property> @@ -822,7 +822,7 @@ <string>KB</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_tlSizeMax</cstring> </property> @@ -842,7 +842,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>330</width> <height>16</height> @@ -894,5 +894,5 @@ <tabstop>m_dedDateMin</tabstop> <tabstop>m_dedDateMax</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kfilereplace/koptionsdlg.cpp b/kfilereplace/koptionsdlg.cpp index fc0dc899..84492238 100644 --- a/kfilereplace/koptionsdlg.cpp +++ b/kfilereplace/koptionsdlg.cpp @@ -41,7 +41,7 @@ using namespace whatthisNameSpace; -KOptionsDlg::KOptionsDlg(RCOptions* info, TQWidget *parent, const char *name) : KOptionsDlgS(parent,name,true) +KOptionsDlg::KOptionsDlg(RCOptions* info, TQWidget *tqparent, const char *name) : KOptionsDlgS(tqparent,name,true) { m_config = new KConfig("kfilereplacerc"); m_option = info; @@ -220,7 +220,7 @@ void KOptionsDlg::saveRCOptions() void KOptionsDlg::whatsThis() { - // Create help QWhatsThis + // Create help TQWhatsThis TQWhatsThis::add(m_chbCaseSensitive, chbCaseSensitiveWhatthis); TQWhatsThis::add(m_chbRecursive, chbRecursiveWhatthis); TQWhatsThis::add(m_chbHaltOnFirstOccurrence, chbHaltOnFirstOccurrenceWhatthis); diff --git a/kfilereplace/koptionsdlg.h b/kfilereplace/koptionsdlg.h index 973393d6..4faec9f0 100644 --- a/kfilereplace/koptionsdlg.h +++ b/kfilereplace/koptionsdlg.h @@ -2,7 +2,7 @@ koptionsdlg.h - description ------------------- begin : Tue Dec 28 1999 - copyright : (C) 1999 by François Dupoux + copyright : (C) 1999 by Fran�ois Dupoux (C) 2004 Emiliano Gulmini <emi_barbarossa@yahoo.it> email : dupoux@dupoux.com ***************************************************************************/ @@ -27,14 +27,15 @@ class KConfig; #include "koptionsdlgs.h" /** - *@author François Dupoux + *@author Fran�ois Dupoux */ class KOptionsDlg : public KOptionsDlgS { Q_OBJECT + TQ_OBJECT public: - KOptionsDlg(RCOptions* info, TQWidget *parent, const char *name); + KOptionsDlg(RCOptions* info, TQWidget *tqparent, const char *name); ~KOptionsDlg(); private: @@ -47,7 +48,7 @@ class KOptionsDlg : public KOptionsDlgS void slotChbBackup(bool b); void slotChbConfirmStrings(bool b); void slotChbShowConfirmDialog(bool b); - void slotHelp(){ kapp->invokeHelp(TQString::null, "kfilereplace"); } + void slotHelp(){ kapp->invokeHelp(TQString(), "kfilereplace"); } private: void initGUI(); diff --git a/kfilereplace/koptionsdlgs.ui b/kfilereplace/koptionsdlgs.ui index 88f0d8f8..0347b879 100644 --- a/kfilereplace/koptionsdlgs.ui +++ b/kfilereplace/koptionsdlgs.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KOptionsDlgS</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KOptionsDlgS</cstring> </property> @@ -22,11 +22,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTabWidget" row="0" column="0" rowspan="1" colspan="5"> + <widget class="TQTabWidget" row="0" column="0" rowspan="1" colspan="5"> <property name="name"> <cstring>tabWidget2</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab1</cstring> </property> @@ -37,7 +37,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox7</cstring> </property> @@ -48,7 +48,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_chbVariables</cstring> </property> @@ -59,7 +59,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="7" column="0"> + <widget class="TQLabel" row="7" column="0"> <property name="name"> <cstring>m_tlBackup</cstring> </property> @@ -67,7 +67,7 @@ <string>Backup copy suffix:</string> </property> </widget> - <widget class="QLineEdit" row="7" column="1" rowspan="1" colspan="2"> + <widget class="TQLineEdit" row="7" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>m_leBackup</cstring> </property> @@ -75,7 +75,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="5" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_chbNotifyOnErrors</cstring> </property> @@ -83,7 +83,7 @@ <string>Notif&y on errors</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_chbCaseSensitive</cstring> </property> @@ -94,7 +94,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_chbRecursive</cstring> </property> @@ -105,7 +105,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_chbRegularExpressions</cstring> </property> @@ -116,7 +116,7 @@ <string>Enable regular e&xpressions</string> </property> </widget> - <widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="6" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_chbBackup</cstring> </property> @@ -124,7 +124,7 @@ <string>Do &backup copy</string> </property> </widget> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -149,7 +149,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>Tab3</cstring> </property> @@ -160,7 +160,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>gbxConfirm</cstring> </property> @@ -171,7 +171,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="5" column="0"> + <widget class="TQCheckBox" row="5" column="0"> <property name="name"> <cstring>m_chbIgnoreHidden</cstring> </property> @@ -179,7 +179,7 @@ <string>Ignore hidden files and folders</string> </property> </widget> - <widget class="QCheckBox" row="4" column="0"> + <widget class="TQCheckBox" row="4" column="0"> <property name="name"> <cstring>m_chbFollowSymLinks</cstring> </property> @@ -187,7 +187,7 @@ <string>Follow s&ymbolic links</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0"> + <widget class="TQCheckBox" row="3" column="0"> <property name="name"> <cstring>m_chbHaltOnFirstOccurrence</cstring> </property> @@ -195,7 +195,7 @@ <string>When searching, stop on first string found (faster but no details)</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>m_chbIgnoreFiles</cstring> </property> @@ -206,9 +206,9 @@ <string>Do not show file if no strings are found or replaced</string> </property> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <hbox> <property name="name"> @@ -224,14 +224,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_chbShowConfirmDialog</cstring> </property> @@ -244,7 +244,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>m_chbConfirmStrings</cstring> </property> @@ -260,7 +260,7 @@ </grid> </widget> </widget> - <widget class="QPushButton" row="1" column="0"> + <widget class="TQPushButton" row="1" column="0"> <property name="name"> <cstring>m_pbHelp</cstring> </property> @@ -281,14 +281,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>202</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton" row="1" column="2"> + <widget class="TQPushButton" row="1" column="2"> <property name="name"> <cstring>m_pbDefault</cstring> </property> @@ -296,7 +296,7 @@ <string>&Default Values</string> </property> </widget> - <widget class="QPushButton" row="1" column="3"> + <widget class="TQPushButton" row="1" column="3"> <property name="name"> <cstring>m_pbOK</cstring> </property> @@ -304,7 +304,7 @@ <string>&OK</string> </property> </widget> - <widget class="QPushButton" row="1" column="4"> + <widget class="TQPushButton" row="1" column="4"> <property name="name"> <cstring>m_pbCancel</cstring> </property> @@ -343,5 +343,5 @@ <tabstop>m_chbFollowSymLinks</tabstop> <tabstop>m_chbIgnoreHidden</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kfilereplace/report.cpp b/kfilereplace/report.cpp index 6d485eba..5497b045 100644 --- a/kfilereplace/report.cpp +++ b/kfilereplace/report.cpp @@ -38,13 +38,13 @@ void Report::createReportFile() TQFile report(xmlFileName); if (!report.open( IO_WriteOnly )) { - KMessageBox::error(0, i18n("<qt>Cannot open the file <b>%1</b>.</qt>").arg(xmlFileName)); + KMessageBox::error(0, i18n("<qt>Cannot open the file <b>%1</b>.</qt>").tqarg(xmlFileName)); return ; } // b) Write the header of the XML file - TQDateTime datetime = TQDateTime::currentDateTime(Qt::LocalTime); + TQDateTime datetime = TQDateTime::tqcurrentDateTime(Qt::LocalTime); TQString dateString = datetime.toString(Qt::LocalDate); KUser user; TQString columnTextFour, @@ -60,7 +60,7 @@ void Report::createReportFile() columnReplaceWith = i18n("-"); } - TQString css = cssFileName.mid(cssFileName.findRev("/")+1,cssFileName.length()-(cssFileName.findRev("/")+1)); + TQString css = cssFileName.mid(cssFileName.tqfindRev("/")+1,cssFileName.length()-(cssFileName.tqfindRev("/")+1)); TQTextStream oTStream( &report ); oTStream << "<?xml version=\"1.0\"?>\n" "<?xml-stylesheet href=\""+css+"\" type=\"text/css\"?>" @@ -191,7 +191,7 @@ void Report::createStyleSheet() TQFile styleSheet(cssFileName); if (!styleSheet.open( IO_WriteOnly )) { - KMessageBox::error(0, i18n("<qt>Cannot open the file <b>%1</b>.</qt>").arg(cssFileName)); + KMessageBox::error(0, i18n("<qt>Cannot open the file <b>%1</b>.</qt>").tqarg(cssFileName)); return ; } diff --git a/kfilereplace/whatthis.h b/kfilereplace/whatthis.h index 09f6ac80..01c1e1f4 100644 --- a/kfilereplace/whatthis.h +++ b/kfilereplace/whatthis.h @@ -31,7 +31,7 @@ namespace whatthisNameSpace 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 TQString 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/tqreplace. Insert path string here by hand or use the search button."); const TQString cbFilterWhatthis = i18n("Shell-like wildcards. Example: \"*.html;*.txt;*.xml\"."); |