diff options
Diffstat (limited to 'kregexpeditor/userdefinedregexps.cpp')
-rw-r--r-- | kregexpeditor/userdefinedregexps.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/kregexpeditor/userdefinedregexps.cpp b/kregexpeditor/userdefinedregexps.cpp index 10c97b0..b251295 100644 --- a/kregexpeditor/userdefinedregexps.cpp +++ b/kregexpeditor/userdefinedregexps.cpp @@ -15,7 +15,7 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. **/ -#ifdef QT_ONLY +#ifdef TQT_ONLY #include "compat.h" #else #include <klineeditdlg.h> @@ -35,8 +35,8 @@ #include <tqlayout.h> #include <tqlabel.h> -UserDefinedRegExps::UserDefinedRegExps( TQWidget *parent, const char *name ) - : TQDockWindow( TQDockWindow::InDock, parent, name) +UserDefinedRegExps::UserDefinedRegExps( TQWidget *tqparent, const char *name ) + : TQDockWindow( TQDockWindow::InDock, tqparent, name) { TQWidget* top = new TQWidget( this ); TQVBoxLayout* lay = new TQVBoxLayout( top, 6 ); @@ -48,7 +48,7 @@ UserDefinedRegExps::UserDefinedRegExps( TQWidget *parent, const char *name ) label->setMinimumSize(1,0); _userDefined = new TQListView( top, "UserDefinedRegExps::_userDefined" ); - _userDefined->addColumn( TQString::null ); + _userDefined->addColumn( TQString() ); _userDefined->header()->hide(); // _userDefined->setRootIsDecorated( true ); setWidget( top ); @@ -66,15 +66,15 @@ void UserDefinedRegExps::slotPopulateUserRegexps() createItems( i18n("User Defined"), WidgetWinItem::path(), true ); -#ifdef QT_ONLY +#ifdef TQT_ONLY TQStringList dirs; - dirs << TQString::fromLatin1( "predefined" ); + dirs << TQString::tqfromLatin1( "predefined" ); #else TQStringList dirs = KGlobal::dirs()->findDirs( "data", TQString::fromLocal8Bit("kregexpeditor/predefined/") ); #endif for ( TQStringList::iterator it1 = dirs.begin(); it1 != dirs.end(); ++it1 ) { - TQDir dir( *it1, TQString::null, TQDir::Name, TQDir::Dirs ); + TQDir dir( *it1, TQString(), TQDir::Name, TQDir::Dirs ); TQStringList subdirs = dir.entryList(); for ( TQStringList::iterator it2 = subdirs.begin(); it2 != subdirs.end(); ++it2 ) { if ( *it2 == TQString::fromLocal8Bit(".") || *it2 == TQString::fromLocal8Bit("..") ) @@ -88,7 +88,7 @@ void UserDefinedRegExps::slotPopulateUserRegexps() void UserDefinedRegExps::createItems( const TQString& _title, const TQString& dir, bool usersRegExp ) { TQString title = _title; - if (_title == TQString::fromLatin1("general")) + if (_title == TQString::tqfromLatin1("general")) title = i18n("General"); TQListViewItem* lvItem = new TQListViewItem( _userDefined, title ); @@ -101,7 +101,7 @@ void UserDefinedRegExps::createItems( const TQString& _title, const TQString& di TQFile file( fileName ); if ( ! file.open(IO_ReadOnly) ) { - KMessageBox::sorry( this, i18n("Could not open file for reading: %1").arg(fileName) ); + KMessageBox::sorry( this, i18n("Could not open file for reading: %1").tqarg(fileName) ); continue; } @@ -111,7 +111,7 @@ void UserDefinedRegExps::createItems( const TQString& _title, const TQString& di RegExp* regexp = WidgetFactory::createRegExp( data ); if ( ! regexp ) { - KMessageBox::sorry( this, i18n("File %1 containing user defined regular expression contained an error").arg( fileName ) ); + KMessageBox::sorry( this, i18n("File %1 containing user defined regular expression contained an error").tqarg( fileName ) ); continue; } @@ -187,8 +187,8 @@ void UserDefinedRegExps::slotEdit( TQListViewItem* item, const TQPoint& pos ) TQString oldName = winItem->name(); TQString txt; -#ifdef QT_ONLY - txt = QInputDialog::getText( tr("Rename Regular Expression"), tr("New name:") ); +#ifdef TQT_ONLY + txt = TQInputDialog::getText( tr("Rename Regular Expression"), tr("New name:") ); #else KLineEditDlg dlg(i18n("New name:"), oldName, this); dlg.setCaption(i18n("Rename Item")); @@ -200,7 +200,7 @@ void UserDefinedRegExps::slotEdit( TQListViewItem* item, const TQPoint& pos ) TQString fileName = WidgetWinItem::path() + TQString::fromLocal8Bit("/") + txt + TQString::fromLocal8Bit(".regexp"); TQFileInfo finfo( fileName ); if ( finfo.exists() ) { - int answer = KMessageBox::warningYesNo( this, i18n("<p>Overwrite named regular expression <b>%1</b>?</p>").arg(txt), TQString::null, i18n("Overwrite"), i18n("Do Not Overwrite") ); + int answer = KMessageBox::warningYesNo( this, i18n("<p>Overwrite named regular expression <b>%1</b>?</p>").tqarg(txt), TQString(), i18n("Overwrite"), i18n("Do Not Overwrite") ); if ( answer != KMessageBox::Yes ) return; @@ -223,10 +223,10 @@ void UserDefinedRegExps::slotSelectNewAction() slotUnSelect(); } -WidgetWinItem::WidgetWinItem( TQString fileName, RegExp* regexp, bool usersRegExp, TQListViewItem* parent ) - :TQListViewItem( parent ), _regexp( regexp ), _usersRegExp ( usersRegExp ) +WidgetWinItem::WidgetWinItem( TQString fileName, RegExp* regexp, bool usersRegExp, TQListViewItem* tqparent ) + :TQListViewItem( tqparent ), _regexp( regexp ), _usersRegExp ( usersRegExp ) { - int index = fileName.findRev(TQString::fromLocal8Bit(".regexp")); + int index = fileName.tqfindRev(TQString::fromLocal8Bit(".regexp")); _name = fileName.left(index); setText( 0, _name ); @@ -255,8 +255,8 @@ void WidgetWinItem::setName( const TQString& nm ) TQString WidgetWinItem::path() { -#ifdef QT_ONLY - return TQString::fromLatin1( "predefined" ); +#ifdef TQT_ONLY + return TQString::tqfromLatin1( "predefined" ); #else return locateLocal("data", TQString::fromLocal8Bit("KRegExpEditor/")); #endif |