diff options
Diffstat (limited to 'parts/regexptest/regexptestdlg.cpp')
-rw-r--r-- | parts/regexptest/regexptestdlg.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/parts/regexptest/regexptestdlg.cpp b/parts/regexptest/regexptestdlg.cpp index a211a797..834b7a1e 100644 --- a/parts/regexptest/regexptestdlg.cpp +++ b/parts/regexptest/regexptestdlg.cpp @@ -15,11 +15,11 @@ #include <string.h> #include <stdlib.h> #include <regex.h> -#include <qlabel.h> -#include <qlistview.h> -#include <qradiobutton.h> -#include <qpushbutton.h> -#include <qregexp.h> +#include <tqlabel.h> +#include <tqlistview.h> +#include <tqradiobutton.h> +#include <tqpushbutton.h> +#include <tqregexp.h> #include <klineedit.h> #include <kdeversion.h> #include <kregexp.h> @@ -52,7 +52,7 @@ RegexpTestDialog::~RegexpTestDialog() {} -void RegexpTestDialog::showEvent(QShowEvent *) +void RegexpTestDialog::showEvent(TQShowEvent *) { KParts::ReadWritePart *rwpart = dynamic_cast<KParts::ReadWritePart*> (m_part->partController()->activePart()); @@ -75,7 +75,7 @@ void RegexpTestDialog::somethingChanged() void RegexpTestDialog::checkQRegExp() { - QRegExp rx( pattern_edit->text() ); + TQRegExp rx( pattern_edit->text() ); rx.setMinimal( qregexp_min_button->isChecked() ); if ( !rx.isValid() ) { #if QT_VERSION >= 0x030100 @@ -96,7 +96,7 @@ void RegexpTestDialog::checkQRegExp() int numCaptures = 10; #endif for ( int i = 0; i < numCaptures; ++i ) { - new QListViewItem( subgroups_listview, QString::number( i ), rx.cap( i ) ); + new TQListViewItem( subgroups_listview, TQString::number( i ), rx.cap( i ) ); } } @@ -115,7 +115,7 @@ void RegexpTestDialog::checkKRegExp() for ( int i = 0; i <= 9; ++i ) { const char* grp = rx.group( i ); if ( grp ) - new QListViewItem( subgroups_listview, QString::number( i ), QString( grp ) ); + new TQListViewItem( subgroups_listview, TQString::number( i ), TQString( grp ) ); } } @@ -124,10 +124,10 @@ void RegexpTestDialog::checkPOSIX() regex_t compiledPattern; regmatch_t matches[20]; int cflags = extendedposix_button->isChecked()? REG_EXTENDED : 0; - QCString regexp = pattern_edit->text().local8Bit(); + TQCString regexp = pattern_edit->text().local8Bit(); int res = regcomp(&compiledPattern, regexp, cflags); if (res != 0) { - QString regcompMessage; + TQString regcompMessage; switch (res) { case REG_BADRPT: @@ -181,7 +181,7 @@ void RegexpTestDialog::checkPOSIX() matches[i].rm_eo = -1; } - QCString testString = teststring_edit->text().local8Bit(); + TQCString testString = teststring_edit->text().local8Bit(); res = regexec(&compiledPattern, testString, 20, matches, 0); if (res != 0) { success_label->setText(i18n("No match")); @@ -194,8 +194,8 @@ void RegexpTestDialog::checkPOSIX() if (matches[i].rm_so >= 0 && matches[i].rm_so <= len && matches[i].rm_eo >= 0 && matches[i].rm_eo <= len && matches[i].rm_so <= matches[i].rm_eo) { - QCString subGroup = testString.mid(matches[i].rm_so, matches[i].rm_eo - matches[i].rm_so); - new QListViewItem(subgroups_listview, QString::number(i), subGroup); + TQCString subGroup = testString.mid(matches[i].rm_so, matches[i].rm_eo - matches[i].rm_so); + new TQListViewItem(subgroups_listview, TQString::number(i), subGroup); } } regfree(&compiledPattern); @@ -204,13 +204,13 @@ void RegexpTestDialog::checkPOSIX() void RegexpTestDialog::insertQuoted() { - QString rawstr = pattern_edit->text(); + TQString rawstr = pattern_edit->text(); - QString str; + TQString str; int len = rawstr.length(); for (int i=0; i < len; ++i) { - QChar ch = rawstr[i]; + TQChar ch = rawstr[i]; if (ch == '"') str += "\\\""; else if (ch == '\\') @@ -221,7 +221,7 @@ void RegexpTestDialog::insertQuoted() KParts::ReadWritePart *rwpart = dynamic_cast<KParts::ReadWritePart*>(m_part->partController()->activePart()); - QWidget *view = m_part->partController()->activeWidget(); + TQWidget *view = m_part->partController()->activeWidget(); KTextEditor::EditInterface *editiface = dynamic_cast<KTextEditor::EditInterface*>(rwpart); @@ -244,7 +244,7 @@ void RegexpTestDialog::insertQuoted() void RegexpTestDialog::showRegExpEditor( ) { - _regexp_dialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor" ); + _regexp_dialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor" ); if ( _regexp_dialog ) { @@ -253,7 +253,7 @@ void RegexpTestDialog::showRegExpEditor( ) editor->setRegExp( pattern_edit->text() ); - if ( _regexp_dialog->exec() == QDialog::Accepted ) + if ( _regexp_dialog->exec() == TQDialog::Accepted ) { pattern_edit->setText( editor->regExp() ); } |