diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
commit | 48d4a26399959121f33d2bc3bfe51c7827b654fc (patch) | |
tree | 5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /parts/regexptest | |
parent | 7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff) | |
download | tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip |
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/regexptest')
-rw-r--r-- | parts/regexptest/regexptestdlg.cpp | 14 | ||||
-rw-r--r-- | parts/regexptest/regexptestdlg.h | 3 | ||||
-rw-r--r-- | parts/regexptest/regexptestdlgbase.ui | 46 | ||||
-rw-r--r-- | parts/regexptest/regexptestpart.cpp | 4 | ||||
-rw-r--r-- | parts/regexptest/regexptestpart.h | 3 |
5 files changed, 32 insertions, 38 deletions
diff --git a/parts/regexptest/regexptestdlg.cpp b/parts/regexptest/regexptestdlg.cpp index 834b7a1e..5d9b6e88 100644 --- a/parts/regexptest/regexptestdlg.cpp +++ b/parts/regexptest/regexptestdlg.cpp @@ -66,23 +66,19 @@ void RegexpTestDialog::somethingChanged() subgroups_listview->clear(); if ( qregexp_button->isChecked() || qregexp_min_button->isChecked() ) - checkQRegExp(); + checkTQRegExp(); else if ( kregexp_button->isChecked() ) checkKRegExp(); else checkPOSIX(); } -void RegexpTestDialog::checkQRegExp() +void RegexpTestDialog::checkTQRegExp() { TQRegExp rx( pattern_edit->text() ); rx.setMinimal( qregexp_min_button->isChecked() ); if ( !rx.isValid() ) { -#if QT_VERSION >= 0x030100 success_label->setText( rx.errorString() ); -#else - success_label->setText( i18n("Error compiling the regular expression.") ); -#endif return; } if ( rx.search( teststring_edit->text() ) < 0 ) { @@ -90,11 +86,7 @@ void RegexpTestDialog::checkQRegExp() return; } success_label->setText( i18n("Successfully matched") ); -#if QT_VERSION >= 0x030100 int numCaptures = rx.numCaptures() + 1; -#else - int numCaptures = 10; -#endif for ( int i = 0; i < numCaptures; ++i ) { new TQListViewItem( subgroups_listview, TQString::number( i ), rx.cap( i ) ); } @@ -152,7 +144,7 @@ void RegexpTestDialog::checkPOSIX() regcompMessage = i18n("Invalid collating element"); break; case REG_EPAREN: - regcompMessage = i18n("Unmatched parenthesis group operators"); + regcompMessage = i18n("Unmatched tqparenthesis group operators"); break; case REG_ESUBREG: regcompMessage = i18n("Invalid back reference to subexpression"); diff --git a/parts/regexptest/regexptestdlg.h b/parts/regexptest/regexptestdlg.h index 6b02ea02..457e53fb 100644 --- a/parts/regexptest/regexptestdlg.h +++ b/parts/regexptest/regexptestdlg.h @@ -20,6 +20,7 @@ class KDevPlugin; class RegexpTestDialog : public RegexpTestDialogBase { Q_OBJECT + TQ_OBJECT public: RegexpTestDialog( KDevPlugin *part ); @@ -34,7 +35,7 @@ protected slots: private: virtual void somethingChanged(); virtual void checkPOSIX(); - virtual void checkQRegExp(); + virtual void checkTQRegExp(); virtual void checkKRegExp(); virtual void insertQuoted(); diff --git a/parts/regexptest/regexptestdlgbase.ui b/parts/regexptest/regexptestdlgbase.ui index 7b52620a..1b5b01f9 100644 --- a/parts/regexptest/regexptestdlgbase.ui +++ b/parts/regexptest/regexptestdlgbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>RegexpTestDialogBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>regexp_test_dialog</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>pattern_label</cstring> </property> @@ -33,7 +33,7 @@ <cstring>pattern_edit</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>teststring_label</cstring> </property> @@ -52,7 +52,7 @@ <string>Enter a string which will be matched against the regular expression</string> </property> </widget> - <widget class="QLabel" row="3" column="1" rowspan="1" colspan="2"> + <widget class="TQLabel" row="3" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>success_label</cstring> </property> @@ -68,7 +68,7 @@ <string></string> </property> </widget> - <widget class="QLayoutWidget" row="5" column="0" rowspan="1" colspan="3"> + <widget class="TQLayoutWidget" row="5" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>Layout4</cstring> </property> @@ -79,7 +79,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>insertbutton</cstring> </property> @@ -103,14 +103,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>cancelbutton</cstring> </property> @@ -134,7 +134,7 @@ <string>enter a regular expression, for example <tt>KD.*</tt>, which matches all strings beginning with "KD"</string> </property> </widget> - <widget class="QButtonGroup" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQButtonGroup" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>flavor_group</cstring> </property> @@ -153,7 +153,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>basicposix_button</cstring> </property> @@ -167,7 +167,7 @@ <string>A description of this syntax can be found in the grep manpage</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>extendedposix_button</cstring> </property> @@ -178,7 +178,7 @@ <string>A description of this syntax can be found in the grep manpage</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>qregexp_button</cstring> </property> @@ -189,7 +189,7 @@ <string>A description of this syntax can be found in the documentation of the QRegExp class</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>qregexp_min_button</cstring> </property> @@ -200,7 +200,7 @@ <string>Matches a QRegExp non-greedy. Please read the QRegExp::setMinimal documentation for more details.</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>kregexp_button</cstring> </property> @@ -213,7 +213,7 @@ </widget> </vbox> </widget> - <widget class="QPushButton" row="0" column="2"> + <widget class="TQPushButton" row="0" column="2"> <property name="name"> <cstring>rxedit_button</cstring> </property> @@ -224,15 +224,15 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget" row="4" column="0" rowspan="1" colspan="3"> + <widget class="TQLayoutWidget" row="4" column="0" rowspan="1" colspan="3"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>subgroups_label</cstring> </property> @@ -240,7 +240,7 @@ <string>Matched subgroups:</string> </property> </widget> - <widget class="QListView"> + <widget class="TQListView"> <column> <property name="text"> <string>Group</string> @@ -339,13 +339,13 @@ <includes> <include location="global" impldecl="in implementation">kdialog.h</include> </includes> -<slots> +<Q_SLOTS> <slot access="protected">insertQuoted()</slot> <slot>somethingChanged()</slot> <slot access="protected">showRegExpEditor()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>klineedit.h</includehint> </includehints> diff --git a/parts/regexptest/regexptestpart.cpp b/parts/regexptest/regexptestpart.cpp index 8a3c8bd5..a991171a 100644 --- a/parts/regexptest/regexptestpart.cpp +++ b/parts/regexptest/regexptestpart.cpp @@ -24,8 +24,8 @@ static const KDevPluginInfo data("kdevregexptest"); typedef KDevGenericFactory<RegexpTestPart> RegexpTestFactory; K_EXPORT_COMPONENT_FACTORY( libkdevregexptest, RegexpTestFactory( data ) ) -RegexpTestPart::RegexpTestPart(TQObject *parent, const char *name, const TQStringList &) - : KDevPlugin(&data, parent, name ? name : "RegexpTestPart") +RegexpTestPart::RegexpTestPart(TQObject *tqparent, const char *name, const TQStringList &) + : KDevPlugin(&data, tqparent, name ? name : "RegexpTestPart") { setInstance(RegexpTestFactory::instance()); setXMLFile("kdevregexptest.rc"); diff --git a/parts/regexptest/regexptestpart.h b/parts/regexptest/regexptestpart.h index d0446cef..5318b86e 100644 --- a/parts/regexptest/regexptestpart.h +++ b/parts/regexptest/regexptestpart.h @@ -22,9 +22,10 @@ class RegexpTestDialog; class RegexpTestPart : public KDevPlugin { Q_OBJECT + TQ_OBJECT public: - RegexpTestPart( TQObject *parent, const char *name, const TQStringList & ); + RegexpTestPart( TQObject *tqparent, const char *name, const TQStringList & ); ~RegexpTestPart(); private slots: |