From d6f8bbb45b267065a6907e71ff9c98bb6d161241 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:56:07 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- parts/ctags2/ctags2_createtagfile.cpp | 8 +-- parts/ctags2/ctags2_createtagfile.h | 8 +-- parts/ctags2/ctags2_part.cpp | 110 ++++++++++++++++----------------- parts/ctags2/ctags2_part.h | 24 +++---- parts/ctags2/ctags2_selecttagfile.cpp | 6 +- parts/ctags2/ctags2_selecttagfile.h | 6 +- parts/ctags2/ctags2_settingswidget.cpp | 32 +++++----- parts/ctags2/ctags2_settingswidget.h | 18 +++--- parts/ctags2/ctags2_widget.cpp | 54 ++++++++-------- parts/ctags2/ctags2_widget.h | 6 +- parts/ctags2/ctagskinds.cpp | 8 +-- parts/ctags2/ctagskinds.h | 4 +- parts/ctags2/tagitem.cpp | 4 +- parts/ctags2/tagitem.h | 12 ++-- parts/ctags2/tags.cpp | 40 ++++++------ parts/ctags2/tags.h | 48 +++++++------- 16 files changed, 194 insertions(+), 194 deletions(-) (limited to 'parts/ctags2') diff --git a/parts/ctags2/ctags2_createtagfile.cpp b/parts/ctags2/ctags2_createtagfile.cpp index b1ced0dd..5193d8cd 100644 --- a/parts/ctags2/ctags2_createtagfile.cpp +++ b/parts/ctags2/ctags2_createtagfile.cpp @@ -16,7 +16,7 @@ #include "ctags2_part.h" -CreateTagFile::CreateTagFile(QWidget* parent, const char* name, bool modal, WFlags fl) +CreateTagFile::CreateTagFile(TQWidget* parent, const char* name, bool modal, WFlags fl) : CTags2CreateTagFileBase( parent, name, modal, fl ) { dirToTag->setMode( KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly); @@ -35,17 +35,17 @@ void CreateTagFile::validate() createTagFileButton->setEnabled( valid ); } -QString CreateTagFile::name( ) +TQString CreateTagFile::name( ) { return displayName->text(); } -QString CreateTagFile::tagsfilePath( ) +TQString CreateTagFile::tagsfilePath( ) { return newTagFilePath->url(); } -QString CreateTagFile::directory( ) +TQString CreateTagFile::directory( ) { return dirToTag->url(); } diff --git a/parts/ctags2/ctags2_createtagfile.h b/parts/ctags2/ctags2_createtagfile.h index 93b530d4..068c1815 100644 --- a/parts/ctags2/ctags2_createtagfile.h +++ b/parts/ctags2/ctags2_createtagfile.h @@ -21,11 +21,11 @@ class CreateTagFile : public CTags2CreateTagFileBase { Q_OBJECT public: - CreateTagFile(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + CreateTagFile(TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~CreateTagFile(); - QString name(); - QString tagsfilePath(); - QString directory(); + TQString name(); + TQString tagsfilePath(); + TQString directory(); private: diff --git a/parts/ctags2/ctags2_part.cpp b/parts/ctags2/ctags2_part.cpp index 29b564e6..b05a12a4 100644 --- a/parts/ctags2/ctags2_part.cpp +++ b/parts/ctags2/ctags2_part.cpp @@ -9,11 +9,11 @@ * * ***************************************************************************/ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -58,41 +58,41 @@ typedef KDevGenericFactory CTags2Factory; static const KDevPluginInfo data("kdevctags2"); K_EXPORT_COMPONENT_FACTORY( libkdevctags2, CTags2Factory( data ) ) -CTags2Part::CTags2Part(QObject *parent, const char *name, const QStringList& ) +CTags2Part::CTags2Part(TQObject *parent, const char *name, const TQStringList& ) : KDevPlugin(&data, parent, name ? name : "ctags2Part" ) { setInstance(CTags2Factory::instance()); setXMLFile("kdevpart_ctags2.rc"); - QDomDocument & dom = *projectDom(); - QString customTagFile = DomUtil::readEntry( dom, "/ctagspart/customTagfilePath" ); + TQDomDocument & dom = *projectDom(); + TQString customTagFile = DomUtil::readEntry( dom, "/ctagspart/customTagfilePath" ); if ( customTagFile.isEmpty() ) { customTagFile = project()->projectDirectory() + "/tags"; } - QStringList tagFiles = DomUtil::readListEntry(dom, "/ctagspart/activeTagsFiles", "file"); + TQStringList tagFiles = DomUtil::readListEntry(dom, "/ctagspart/activeTagsFiles", "file"); tagFiles.push_front(customTagFile); Tags::setTagFiles(tagFiles); m_widget = new CTags2Widget(this); - QWhatsThis::add(m_widget, i18n("CTags

Result view for a tag lookup. Click a line to go to the corresponding place in the code.")); + TQWhatsThis::add(m_widget, i18n("CTags

Result view for a tag lookup. Click a line to go to the corresponding place in the code.")); m_widget->setCaption(i18n("CTags Lookup")); mainWindow()->embedOutputView( m_widget, i18n( "CTags" ), i18n( "CTags lookup results" ) ); - connect( core(), SIGNAL(contextMenu(QPopupMenu *, const Context *)), this, SLOT(contextMenu(QPopupMenu *, const Context *)) ); + connect( core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)) ); _configProxy = new ConfigWidgetProxy( core() ); _configProxy->createProjectConfigPage( i18n("CTags"), CTAGSSETTINGSPAGE, info()->icon() ); - connect( _configProxy, SIGNAL(insertConfigWidget(const KDialogBase*, QWidget*, unsigned int )), - this, SLOT(insertConfigWidget(const KDialogBase*, QWidget*, unsigned int )) ); - - new KAction( i18n("Lookup Current Text"), 0, CTRL+Key_Underscore, this, SLOT(slotLookup()), actionCollection(), "ctags_lookup_shortcut"); - new KAction( i18n("Lookup Current Text as Declaration"), 0, CTRL+Key_Semicolon, this, SLOT(slotLookupDeclaration()), actionCollection(), "ctags_declaration_shortcut"); - new KAction( i18n("Lookup Current Text as Definition"), 0, CTRL+Key_Colon, this, SLOT(slotLookupDefinition()), actionCollection(), "ctags_definition_shortcut"); - new KAction( i18n("Jump to Next Match"), 0, 0, this, SLOT(slotGoToNext()), actionCollection(), "ctags_jump_to_next"); - new KAction( i18n("Open Lookup Dialog"), 0, 0, this, SLOT(slotOpenLookup()), actionCollection(), "ctags_input_shortcut"); + connect( _configProxy, TQT_SIGNAL(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )), + this, TQT_SLOT(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )) ); + + new KAction( i18n("Lookup Current Text"), 0, CTRL+Key_Underscore, this, TQT_SLOT(slotLookup()), actionCollection(), "ctags_lookup_shortcut"); + new KAction( i18n("Lookup Current Text as Declaration"), 0, CTRL+Key_Semicolon, this, TQT_SLOT(slotLookupDeclaration()), actionCollection(), "ctags_declaration_shortcut"); + new KAction( i18n("Lookup Current Text as Definition"), 0, CTRL+Key_Colon, this, TQT_SLOT(slotLookupDefinition()), actionCollection(), "ctags_definition_shortcut"); + new KAction( i18n("Jump to Next Match"), 0, 0, this, TQT_SLOT(slotGoToNext()), actionCollection(), "ctags_jump_to_next"); + new KAction( i18n("Open Lookup Dialog"), 0, 0, this, TQT_SLOT(slotOpenLookup()), actionCollection(), "ctags_input_shortcut"); } @@ -106,17 +106,17 @@ CTags2Part::~CTags2Part() delete _configProxy; } -void CTags2Part::insertConfigWidget( const KDialogBase * dlg, QWidget * page, unsigned int pagenumber ) +void CTags2Part::insertConfigWidget( const KDialogBase * dlg, TQWidget * page, unsigned int pagenumber ) { if ( pagenumber == CTAGSSETTINGSPAGE ) { CTags2SettingsWidget * w = new CTags2SettingsWidget( this, page ); - connect( dlg, SIGNAL(okClicked()), w, SLOT(slotAccept()) ); - connect( w, SIGNAL(newTagsfileName(const QString& )), this, SLOT(updateTagsfileName(const QString& )) ); + connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(slotAccept()) ); + connect( w, TQT_SIGNAL(newTagsfileName(const TQString& )), this, TQT_SLOT(updateTagsfileName(const TQString& )) ); } } -void CTags2Part::updateTagsfileName( const QString & ) +void CTags2Part::updateTagsfileName( const TQString & ) { m_widget->updateDBDateLabel(); } @@ -125,14 +125,14 @@ void CTags2Part::updateTagsfileName( const QString & ) bool CTags2Part::createTagsFile() { // check if user specified a custom tag file name - QDomDocument & dom = *projectDom(); - QString tagsFileCustom = DomUtil::readEntry( dom, "/ctagspart/customTagfilePath" ).stripWhiteSpace(); + TQDomDocument & dom = *projectDom(); + TQString tagsFileCustom = DomUtil::readEntry( dom, "/ctagspart/customTagfilePath" ).stripWhiteSpace(); return createTagsFile(tagsFileCustom, project()->projectDirectory()); } // creates a new tag file with the specified name for the specified source directory -bool CTags2Part::createTagsFile(const QString& tagFile, const QString& dir) +bool CTags2Part::createTagsFile(const TQString& tagFile, const TQString& dir) { /* KProcess proc; @@ -149,18 +149,18 @@ bool CTags2Part::createTagsFile(const QString& tagFile, const QString& dir) // get name of the ctags binary KConfig * config = kapp->config(); config->setGroup( "CTAGS" ); - QString ctagsBinary = config->readEntry( "ctags binary" ).stripWhiteSpace(); + TQString ctagsBinary = config->readEntry( "ctags binary" ).stripWhiteSpace(); if ( ctagsBinary.isEmpty() ) { ctagsBinary = "ctags"; } // set a default argument list - QString argsDefault = "-R --c++-types=+px --excmd=pattern --exclude=Makefile --exclude=."; + TQString argsDefault = "-R --c++-types=+px --excmd=pattern --exclude=Makefile --exclude=."; - QDomDocument & dom = *projectDom(); - QString argsCustom = DomUtil::readEntry( dom, "/ctagspart/customArguments" ).stripWhiteSpace(); - QString commandline = ctagsBinary + " " + ( argsCustom.isEmpty() ? argsDefault : argsCustom ) + ( tagFile.isEmpty() ? "" : " -f " + tagFile ); + TQDomDocument & dom = *projectDom(); + TQString argsCustom = DomUtil::readEntry( dom, "/ctagspart/customArguments" ).stripWhiteSpace(); + TQString commandline = ctagsBinary + " " + ( argsCustom.isEmpty() ? argsDefault : argsCustom ) + ( tagFile.isEmpty() ? "" : " -f " + tagFile ); commandline += " "; commandline += dir; @@ -170,13 +170,13 @@ bool CTags2Part::createTagsFile(const QString& tagFile, const QString& dir) return true; } -void CTags2Part::contextMenu(QPopupMenu *popup, const Context *context) +void CTags2Part::contextMenu(TQPopupMenu *popup, const Context *context) { if (!context->hasType( Context::EditorContext )) return; const EditorContext *econtext = static_cast(context); - QString ident = econtext->currentWord(); + TQString ident = econtext->currentWord(); if (ident.isEmpty()) return; @@ -189,18 +189,18 @@ void CTags2Part::contextMenu(QPopupMenu *popup, const Context *context) if ( Tags::hasTag( ident ) && ( showDefinition || showDeclaration || showLookup ) ) { m_contextString = ident; - QString squeezed = KStringHandler::csqueeze(ident, 30); + TQString squeezed = KStringHandler::csqueeze(ident, 30); popup->insertSeparator(); if ( showDeclaration ) - popup->insertItem( i18n("CTags - Go to Declaration: %1").arg(squeezed), this, SLOT(slotGotoDeclaration()) ); + popup->insertItem( i18n("CTags - Go to Declaration: %1").arg(squeezed), this, TQT_SLOT(slotGotoDeclaration()) ); if ( showDefinition ) - popup->insertItem( i18n("CTags - Go to Definition: %1").arg(squeezed), this, SLOT(slotGotoDefinition()) ); + popup->insertItem( i18n("CTags - Go to Definition: %1").arg(squeezed), this, TQT_SLOT(slotGotoDefinition()) ); if ( showLookup ) - popup->insertItem( i18n("CTags - Lookup: %1").arg(squeezed), this, SLOT(slotGotoTag()) ); + popup->insertItem( i18n("CTags - Lookup: %1").arg(squeezed), this, TQT_SLOT(slotGotoTag()) ); } } @@ -217,7 +217,7 @@ void CTags2Part::slotGotoTag( ) showHits( Tags::getExactMatches( m_contextString ) ); } -void CTags2Part::gotoTagForTypes( QStringList const & types ) +void CTags2Part::gotoTagForTypes( TQStringList const & types ) { Tags::TagList list = Tags::getMatches( m_contextString, false, types ); @@ -231,7 +231,7 @@ void CTags2Part::gotoTagForTypes( QStringList const & types ) { Tags::TagEntry tag = list.first(); KURL url; - QString fileWithTagInside; + TQString fileWithTagInside; // assume relative path to project directory if path does not start with slash if (tag.file[0] != '/') { fileWithTagInside = project()->projectDirectory() + "/" + tag.file; @@ -251,25 +251,25 @@ void CTags2Part::gotoTagForTypes( QStringList const & types ) void CTags2Part::slotGotoDefinition( ) { - QStringList types; + TQStringList types; types << "S" << "d" << "f" << "t" << "v"; gotoTagForTypes( types ); } void CTags2Part::slotGotoDeclaration( ) { - QStringList types; + TQStringList types; types << "L" << "c" << "e" << "g" << "m" << "n" << "p" << "s" << "u" << "x"; gotoTagForTypes( types ); } -int CTags2Part::getFileLineFromStream( QTextStream & istream, QString const & pattern ) +int CTags2Part::getFileLineFromStream( TQTextStream & istream, TQString const & pattern ) { if ( pattern.isEmpty() ) return -1; // ctags interestingly escapes "/", but apparently nothing else. lets revert that - QString unescaped = pattern; + TQString unescaped = pattern; unescaped.replace( "\\/", "/" ); // most of the time, the ctags pattern has the form /^foo$/ @@ -277,21 +277,21 @@ int CTags2Part::getFileLineFromStream( QTextStream & istream, QString const & pa // where the form is only /^foo/ // I have no idea if this is a ctags bug or not, but we have to deal with it - QString reduced, escaped, re_string; + TQString reduced, escaped, re_string; if ( unescaped.endsWith( "$/" ) ) { reduced = unescaped.mid( 2, unescaped.length() -4 ); - escaped = QRegExp::escape( reduced ); - re_string = QString( "^" + escaped + "$" ); + escaped = TQRegExp::escape( reduced ); + re_string = TQString( "^" + escaped + "$" ); } else { reduced = unescaped.mid( 2, unescaped.length() -3 ); - escaped = QRegExp::escape( reduced ); - re_string = QString( "^" + escaped ); + escaped = TQRegExp::escape( reduced ); + re_string = TQString( "^" + escaped ); } - QRegExp re( re_string ); + TQRegExp re( re_string ); int n = 0; while ( !istream.atEnd() ) @@ -305,23 +305,23 @@ int CTags2Part::getFileLineFromStream( QTextStream & istream, QString const & pa return -1; } -int CTags2Part::getFileLineFromPattern( KURL const & url, QString const & pattern ) +int CTags2Part::getFileLineFromPattern( KURL const & url, TQString const & pattern ) { // if the file is open - get the line from the editor buffer if ( KTextEditor::EditInterface * ei = dynamic_cast( partController()->partForURL( url ) ) ) { - QString ibuffer = ei->text(); - QTextStream istream( &ibuffer, IO_ReadOnly ); + TQString ibuffer = ei->text(); + TQTextStream istream( &ibuffer, IO_ReadOnly ); return getFileLineFromStream( istream, pattern ); } else // else the file is not open - get the line from the file on disk { - QFile file( url.path() ); - QString buffer; + TQFile file( url.path() ); + TQString buffer; if ( file.open( IO_ReadOnly ) ) { - QTextStream istream( &file ); + TQTextStream istream( &file ); return getFileLineFromStream( istream, pattern ); } } diff --git a/parts/ctags2/ctags2_part.h b/parts/ctags2/ctags2_part.h index 77725500..b602ca35 100644 --- a/parts/ctags2/ctags2_part.h +++ b/parts/ctags2/ctags2_part.h @@ -12,8 +12,8 @@ #ifndef __KDEVPART_CTAGS2_H__ #define __KDEVPART_CTAGS2_H__ -#include -#include +#include +#include #include #include "tags.h" @@ -32,12 +32,12 @@ class CTags2Part : public KDevPlugin public: - CTags2Part(QObject *parent, const char *name, const QStringList &); + CTags2Part(TQObject *parent, const char *name, const TQStringList &); ~CTags2Part(); - int getFileLineFromPattern( KURL const & url, QString const & pattern); + int getFileLineFromPattern( KURL const & url, TQString const & pattern); bool createTagsFile(); - bool createTagsFile(const QString& tagFile, const QString& dir); + bool createTagsFile(const TQString& tagFile, const TQString& dir); private slots: void slotLookupDeclaration(); @@ -48,17 +48,17 @@ private slots: void slotGotoDefinition(); void slotGotoDeclaration(); void slotGotoTag(); - void contextMenu(QPopupMenu *, const Context *); - void insertConfigWidget( const KDialogBase * dlg, QWidget * page, unsigned int ); - void updateTagsfileName( const QString & name ); + void contextMenu(TQPopupMenu *, const Context *); + void insertConfigWidget( const KDialogBase * dlg, TQWidget * page, unsigned int ); + void updateTagsfileName( const TQString & name ); private: - int getFileLineFromStream( QTextStream & stream, QString const & pattern); - void gotoTagForTypes( QStringList const & types ); + int getFileLineFromStream( TQTextStream & stream, TQString const & pattern); + void gotoTagForTypes( TQStringList const & types ); void showHits( Tags::TagList const & tags ); - QGuardedPtr m_widget; - QString m_contextString ; + TQGuardedPtr m_widget; + TQString m_contextString ; ConfigWidgetProxy * _configProxy; }; diff --git a/parts/ctags2/ctags2_selecttagfile.cpp b/parts/ctags2/ctags2_selecttagfile.cpp index d9ae94be..adb3ee78 100644 --- a/parts/ctags2/ctags2_selecttagfile.cpp +++ b/parts/ctags2/ctags2_selecttagfile.cpp @@ -15,7 +15,7 @@ #include "ctags2_selecttagfile.h" -SelectTagFile::SelectTagFile( QWidget* parent, const char* name, bool modal, WFlags fl) +SelectTagFile::SelectTagFile( TQWidget* parent, const char* name, bool modal, WFlags fl) : SelectTagFileBase( parent, name, modal, fl ) { tagFile->setMode( KFile::File | KFile::ExistingOnly | KFile::LocalOnly ); @@ -33,12 +33,12 @@ void SelectTagFile::validate() okButton->setEnabled( valid ); } -QString SelectTagFile::name( ) +TQString SelectTagFile::name( ) { return displayName->text(); } -QString SelectTagFile::tagsfilePath( ) +TQString SelectTagFile::tagsfilePath( ) { return tagFile->url(); } diff --git a/parts/ctags2/ctags2_selecttagfile.h b/parts/ctags2/ctags2_selecttagfile.h index 103ba98c..d4f4f5f9 100644 --- a/parts/ctags2/ctags2_selecttagfile.h +++ b/parts/ctags2/ctags2_selecttagfile.h @@ -18,10 +18,10 @@ class SelectTagFile : public SelectTagFileBase { Q_OBJECT public: - SelectTagFile( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + SelectTagFile( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~SelectTagFile(); - QString name(); - QString tagsfilePath(); + TQString name(); + TQString tagsfilePath(); public slots: virtual void validate(); diff --git a/parts/ctags2/ctags2_settingswidget.cpp b/parts/ctags2/ctags2_settingswidget.cpp index 4bcdb122..d7458a85 100644 --- a/parts/ctags2/ctags2_settingswidget.cpp +++ b/parts/ctags2/ctags2_settingswidget.cpp @@ -9,9 +9,9 @@ * * ***************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include @@ -30,7 +30,7 @@ #include "ctags2_createtagfile.h" -CTags2SettingsWidget::CTags2SettingsWidget( CTags2Part * part, QWidget* parent, const char* name, WFlags fl ) +CTags2SettingsWidget::CTags2SettingsWidget( CTags2Part * part, TQWidget* parent, const char* name, WFlags fl ) : CTags2SettingsWidgetBase( parent, name, fl ), m_part( part ) { binaryPath->completionObject()->setMode( KURLCompletion::FileCompletion ); @@ -55,23 +55,23 @@ CTags2SettingsWidget::~CTags2SettingsWidget() void CTags2SettingsWidget::loadSettings() { - QDomDocument & dom = *m_part->projectDom(); + TQDomDocument & dom = *m_part->projectDom(); - QString customArgs = DomUtil::readEntry( dom, "/ctagspart/customArguments" ); + TQString customArgs = DomUtil::readEntry( dom, "/ctagspart/customArguments" ); if ( !customArgs.isEmpty() ) { tagfileCustomBox->setChecked( true ); tagfileCustomEdit->setText( customArgs ); } - QString customTagfile = DomUtil::readEntry( dom, "/ctagspart/customTagfilePath" ); + TQString customTagfile = DomUtil::readEntry( dom, "/ctagspart/customTagfilePath" ); if (customTagfile.isEmpty()) { customTagfile = m_part->project()->projectDirectory() + "/tags"; } tagfilePath->setURL(customTagfile); - QStringList activeTagsFiles = DomUtil::readListEntry(dom, "/ctagspart/activeTagsFiles", "file"); + TQStringList activeTagsFiles = DomUtil::readListEntry(dom, "/ctagspart/activeTagsFiles", "file"); KConfig * config = kapp->config(); config->setGroup( "CTAGS" ); @@ -79,18 +79,18 @@ void CTags2SettingsWidget::loadSettings() showDefinitionBox->setChecked( config->readBoolEntry( "ShowDefinition", true ) ); showLookupBox->setChecked( config->readBoolEntry( "ShowLookup", true ) ); jumpToFirstBox->setChecked( config->readBoolEntry( "JumpToFirst", false ) ); - QString ctagsBinary = config->readEntry( "ctags binary" ).stripWhiteSpace(); + TQString ctagsBinary = config->readEntry( "ctags binary" ).stripWhiteSpace(); if ( !ctagsBinary.isEmpty() ) { binaryPath->setURL( ctagsBinary ); } config->setGroup( "CTAGS-tagsfiles" ); - QMap entryMap = config->entryMap( "CTAGS-tagsfiles" ); - QMap::const_iterator it = entryMap.begin(); + TQMap entryMap = config->entryMap( "CTAGS-tagsfiles" ); + TQMap::const_iterator it = entryMap.begin(); while ( it != entryMap.end() ) { - QString file = config->readPathEntry( it.key() ); + TQString file = config->readPathEntry( it.key() ); new TagsItem( otherTagFiles, it.key(), file, activeTagsFiles.contains( file ) ); ++it; } @@ -98,7 +98,7 @@ void CTags2SettingsWidget::loadSettings() void CTags2SettingsWidget::storeSettings() { - QDomDocument & dom = *m_part->projectDom(); + TQDomDocument & dom = *m_part->projectDom(); DomUtil::writeEntry( dom, "/ctagspart/customArguments", tagfileCustomEdit->text() ); DomUtil::writeEntry( dom, "/ctagspart/customTagfilePath", tagfilePath->url() ); @@ -113,7 +113,7 @@ void CTags2SettingsWidget::storeSettings() config->deleteGroup( "CTAGS-tagsfiles" ); config->setGroup( "CTAGS-tagsfiles" ); - QStringList activeTagsFiles; + TQStringList activeTagsFiles; TagsItem * item = static_cast( otherTagFiles->firstChild() ); while ( item ) { @@ -142,7 +142,7 @@ void CTags2SettingsWidget::slotAccept( ) void CTags2SettingsWidget::createNewTagSlot() { CreateTagFile* dlg = new CreateTagFile; - if ( dlg->exec() == QDialog::Accepted ) + if ( dlg->exec() == TQDialog::Accepted ) { m_part->createTagsFile( dlg->tagsfilePath(), dlg->directory() ); new TagsItem( otherTagFiles, dlg->name(), dlg->tagsfilePath(), true ); @@ -153,7 +153,7 @@ void CTags2SettingsWidget::addNewTagFile() { SelectTagFile* dlg = new SelectTagFile; - if ( dlg->exec() == QDialog::Accepted ) + if ( dlg->exec() == TQDialog::Accepted ) { new TagsItem( otherTagFiles, dlg->name(), dlg->tagsfilePath(), true ); } diff --git a/parts/ctags2/ctags2_settingswidget.h b/parts/ctags2/ctags2_settingswidget.h index ac208ad4..5a9d5c71 100644 --- a/parts/ctags2/ctags2_settingswidget.h +++ b/parts/ctags2/ctags2_settingswidget.h @@ -12,7 +12,7 @@ #ifndef CTAGS2_SETTINGSWIDGET_H #define CTAGS2_SETTINGSWIDGET_H -#include +#include #include "ctags2_settingswidgetbase.h" @@ -21,18 +21,18 @@ class CTags2Part; class TagsItem : public QCheckListItem { public: - TagsItem( QListView * parent, QString name, QString tagsfilePath, bool active ) - : QCheckListItem( parent, name, QCheckListItem::CheckBox ), m_name( name ), m_tagsfilePath( tagsfilePath ) + TagsItem( TQListView * parent, TQString name, TQString tagsfilePath, bool active ) + : TQCheckListItem( parent, name, TQCheckListItem::CheckBox ), m_name( name ), m_tagsfilePath( tagsfilePath ) { setOn( active ); setText( 1, tagsfilePath ); } - QString name() { return m_name; } - QString tagsfilePath() { return m_tagsfilePath; } + TQString name() { return m_name; } + TQString tagsfilePath() { return m_tagsfilePath; } private: - QString m_name; - QString m_tagsfilePath; + TQString m_name; + TQString m_tagsfilePath; }; @@ -42,11 +42,11 @@ class CTags2SettingsWidget : public CTags2SettingsWidgetBase Q_OBJECT public: - CTags2SettingsWidget( CTags2Part * part, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + CTags2SettingsWidget( CTags2Part * part, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~CTags2SettingsWidget(); signals: - void newTagsfileName( const QString & name ); + void newTagsfileName( const TQString & name ); public slots: void slotAccept(); diff --git a/parts/ctags2/ctags2_widget.cpp b/parts/ctags2/ctags2_widget.cpp index 7196ed1b..ab277966 100644 --- a/parts/ctags2/ctags2_widget.cpp +++ b/parts/ctags2/ctags2_widget.cpp @@ -9,11 +9,11 @@ * * ***************************************************************************/ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -31,31 +31,31 @@ class TagItem : public QListViewItem { public: - TagItem(QListView * lv, QString const & tag, QString const & type, QString const & file, QString const & pattern ); + TagItem(TQListView * lv, TQString const & tag, TQString const & type, TQString const & file, TQString const & pattern ); - QString tag; - QString type; - QString file; - QString pattern; + TQString tag; + TQString type; + TQString file; + TQString pattern; }; -TagItem::TagItem( QListView * lv, QString const & tag, QString const & type, QString const & file, QString const & pattern ) - : QListViewItem( lv, tag, type, file ), tag(tag), type(type), file(file), pattern(pattern) +TagItem::TagItem( TQListView * lv, TQString const & tag, TQString const & type, TQString const & file, TQString const & pattern ) + : TQListViewItem( lv, tag, type, file ), tag(tag), type(type), file(file), pattern(pattern) { } CTags2Widget::CTags2Widget( CTags2Part * part, const char* name, WFlags fl) : CTags2WidgetBase(0,name,fl), _part(part) { - output_view->setColumnWidthMode(0,QListView::Maximum); - output_view->setColumnWidthMode(1,QListView::Maximum); - output_view->setColumnWidthMode(2,QListView::Maximum); + output_view->setColumnWidthMode(0,TQListView::Maximum); + output_view->setColumnWidthMode(1,TQListView::Maximum); + output_view->setColumnWidthMode(2,TQListView::Maximum); - _typeTimeout = new QTimer( this ); - connect( _typeTimeout, SIGNAL(timeout()), this, SLOT(line_edit_changed()) ); + _typeTimeout = new TQTimer( this ); + connect( _typeTimeout, TQT_SIGNAL(timeout()), this, TQT_SLOT(line_edit_changed()) ); - connect( output_view, SIGNAL(executed(QListViewItem*)), this, SLOT(itemExecuted(QListViewItem*)) ); - connect( output_view, SIGNAL(returnPressed(QListViewItem*)), this, SLOT(itemExecuted(QListViewItem*)) ); + connect( output_view, TQT_SIGNAL(executed(TQListViewItem*)), this, TQT_SLOT(itemExecuted(TQListViewItem*)) ); + connect( output_view, TQT_SIGNAL(returnPressed(TQListViewItem*)), this, TQT_SLOT(itemExecuted(TQListViewItem*)) ); updateDBDateLabel(); } @@ -112,12 +112,12 @@ int CTags2Widget::calculateHitCount( ) return Tags::numberOfPartialMatches( input_edit->text() ) ; } -void CTags2Widget::itemExecuted( QListViewItem * item ) +void CTags2Widget::itemExecuted( TQListViewItem * item ) { TagItem * tagItem = static_cast( item ); KURL url; - QString fileWithTagInside; + TQString fileWithTagInside; // assume relative path to project directory if path does not start with slash if (tagItem->file[0] != '/') { fileWithTagInside = _part->project()->projectDirectory() + "/" + tagItem->file; @@ -133,19 +133,19 @@ void CTags2Widget::itemExecuted( QListViewItem * item ) void CTags2Widget::regeneratebutton_clicked() { - QApplication::setOverrideCursor(Qt::waitCursor); + TQApplication::setOverrideCursor(Qt::waitCursor); _part->createTagsFile(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); updateDBDateLabel(); } void CTags2Widget::updateDBDateLabel( ) { - QStringList tagFiles = Tags::getTagFiles(); - QFileInfo tagsdb(tagFiles[0]); + TQStringList tagFiles = Tags::getTagFiles(); + TQFileInfo tagsdb(tagFiles[0]); if ( tagsdb.exists() ) { datetime_label->setText( tagsdb.created().date().toString( Qt::ISODate ) ); @@ -156,7 +156,7 @@ void CTags2Widget::updateDBDateLabel( ) } } -void CTags2Widget::focusInEvent( QFocusEvent* ) +void CTags2Widget::focusInEvent( TQFocusEvent* ) { updateDBDateLabel(); input_edit->setFocus(); @@ -164,7 +164,7 @@ void CTags2Widget::focusInEvent( QFocusEvent* ) void CTags2Widget::goToNext( ) { - QListViewItem * item = output_view->firstChild(); + TQListViewItem * item = output_view->firstChild(); while( item ) { if ( item->isSelected() ) diff --git a/parts/ctags2/ctags2_widget.h b/parts/ctags2/ctags2_widget.h index 2a4423a4..758e73b1 100644 --- a/parts/ctags2/ctags2_widget.h +++ b/parts/ctags2/ctags2_widget.h @@ -34,20 +34,20 @@ public: void goToNext(); protected: - void focusInEvent( QFocusEvent *e ); + void focusInEvent( TQFocusEvent *e ); private slots: virtual void line_edit_changed(); virtual void line_edit_changed_delayed(); virtual void regeneratebutton_clicked(); - void itemExecuted( QListViewItem * ); + void itemExecuted( TQListViewItem * ); private: void showHitCount( int ); int calculateHitCount(); CTags2Part * _part; - QTimer * _typeTimeout; + TQTimer * _typeTimeout; }; diff --git a/parts/ctags2/ctagskinds.cpp b/parts/ctags2/ctagskinds.cpp index c8d5ef93..e198c577 100644 --- a/parts/ctags2/ctagskinds.cpp +++ b/parts/ctags2/ctagskinds.cpp @@ -273,7 +273,7 @@ static CTagsExtensionMapping extensionMapping[] = { }; -static CTagsKindMapping *findKindMapping(const QString &extension) +static CTagsKindMapping *findKindMapping(const TQString &extension) { const char *pextension = extension.latin1(); @@ -288,9 +288,9 @@ static CTagsKindMapping *findKindMapping(const QString &extension) } -QString CTagsKinds::findKind( const char * kindChar, const QString &extension ) +TQString CTagsKinds::findKind( const char * kindChar, const TQString &extension ) { - if ( kindChar == 0 ) return QString::null; + if ( kindChar == 0 ) return TQString::null; CTagsKindMapping *kindMapping = findKindMapping(extension); if (kindMapping) { @@ -302,5 +302,5 @@ QString CTagsKinds::findKind( const char * kindChar, const QString &extension ) } } - return QString::null; + return TQString::null; } diff --git a/parts/ctags2/ctagskinds.h b/parts/ctags2/ctagskinds.h index de695319..7bf76a09 100644 --- a/parts/ctags2/ctagskinds.h +++ b/parts/ctags2/ctagskinds.h @@ -12,13 +12,13 @@ #ifndef _CTAGSKINDS_H_ #define _CTAGSKINDS_H_ -#include +#include class CTagsKinds { public: - static QString findKind( const char * kindChar, const QString &extension); + static TQString findKind( const char * kindChar, const TQString &extension); }; #endif diff --git a/parts/ctags2/tagitem.cpp b/parts/ctags2/tagitem.cpp index e2ddf158..36220db5 100644 --- a/parts/ctags2/tagitem.cpp +++ b/parts/ctags2/tagitem.cpp @@ -11,8 +11,8 @@ #include "tagitem.h" -TagItem::TagItem( QListView * lv, QString const & tag, QString const & type, QString const & file, QString const & pattern ) - : QListViewItem( lv ), tag(tag), type(type), file(file), pattern(pattern) +TagItem::TagItem( TQListView * lv, TQString const & tag, TQString const & type, TQString const & file, TQString const & pattern ) + : TQListViewItem( lv ), tag(tag), type(type), file(file), pattern(pattern) {} TagItem::~TagItem() diff --git a/parts/ctags2/tagitem.h b/parts/ctags2/tagitem.h index fddb823d..19bc0a59 100644 --- a/parts/ctags2/tagitem.h +++ b/parts/ctags2/tagitem.h @@ -12,18 +12,18 @@ #ifndef TAGITEM_H #define TAGITEM_H -#include +#include class TagItem : public QListViewItem { public: - TagItem(QListView * lv, QString const & tag, QString const & type, QString const & file, QString const & pattern ); + TagItem(TQListView * lv, TQString const & tag, TQString const & type, TQString const & file, TQString const & pattern ); ~TagItem(); - QString tag; - QString type; - QString file; - QString pattern; + TQString tag; + TQString type; + TQString file; + TQString pattern; }; #endif diff --git a/parts/ctags2/tags.cpp b/parts/ctags2/tags.cpp index 3ba98159..19993823 100644 --- a/parts/ctags2/tags.cpp +++ b/parts/ctags2/tags.cpp @@ -18,18 +18,18 @@ namespace ctags #include "tags.h" -QStringList Tags::_tagFiles; +TQStringList Tags::_tagFiles; Tags::TagEntry::TagEntry() {} -Tags::TagEntry::TagEntry( const QString & tag, const QString & type, const QString & file, const QString & pattern ) +Tags::TagEntry::TagEntry( const TQString & tag, const TQString & type, const TQString & file, const TQString & pattern ) : tag(tag), type(type), file(file), pattern(pattern) {} -bool Tags::hasTag(const QString & tag ) +bool Tags::hasTag(const TQString & tag ) { - QStringList::iterator it; + TQStringList::iterator it; for (it = _tagFiles.begin(); it != _tagFiles.end() ; it++) { if (hasTag((*it).ascii(), tag)) return true; @@ -38,7 +38,7 @@ bool Tags::hasTag(const QString & tag ) return false; } -bool Tags::hasTag(const char* tagFile, const QString & tag ) +bool Tags::hasTag(const char* tagFile, const TQString & tag ) { ctags::tagFileInfo info; ctags::tagFile * file = ctags::tagsOpen(tagFile, &info ); @@ -51,10 +51,10 @@ bool Tags::hasTag(const char* tagFile, const QString & tag ) return found; } -unsigned int Tags::numberOfMatches( const QString & tagpart, bool partial ) +unsigned int Tags::numberOfMatches( const TQString & tagpart, bool partial ) { unsigned int n = 0; - QStringList::iterator it; + TQStringList::iterator it; for (it = _tagFiles.begin(); it != _tagFiles.end(); it++) { n += numberOfMatches( (*it).ascii(), tagpart, partial ); @@ -63,7 +63,7 @@ unsigned int Tags::numberOfMatches( const QString & tagpart, bool partial ) return n; } -unsigned int Tags::numberOfMatches(const char* tagFile, const QString & tagpart, bool partial ) +unsigned int Tags::numberOfMatches(const char* tagFile, const TQString & tagpart, bool partial ) { unsigned int n = 0; @@ -88,12 +88,12 @@ unsigned int Tags::numberOfMatches(const char* tagFile, const QString & tagpart, } -Tags::TagList Tags::getMatches( const QString & tagpart, bool partial, const QStringList & types ) +Tags::TagList Tags::getMatches( const TQString & tagpart, bool partial, const TQStringList & types ) { Tags::TagList list; // build a compound tag list from all the configured tag files - QStringList::iterator it; + TQStringList::iterator it; for ( it = _tagFiles.begin(); it != _tagFiles.end(); it++ ) { list += getMatches((*it).ascii(), tagpart, partial, types); @@ -102,7 +102,7 @@ Tags::TagList Tags::getMatches( const QString & tagpart, bool partial, const QSt return list; } -Tags::TagList Tags::getMatches(const char* tagFile, const QString & tagpart, bool partial, const QStringList & types ) +Tags::TagList Tags::getMatches(const char* tagFile, const TQString & tagpart, bool partial, const TQStringList & types ) { Tags::TagList list; @@ -116,8 +116,8 @@ Tags::TagList Tags::getMatches(const char* tagFile, const QString & tagpart, boo { do { - QString type( CTagsKinds::findKind( entry.kind, QString( entry.file ).section( '.', -1 ) ) ); - QString file( entry.file ); + TQString type( CTagsKinds::findKind( entry.kind, TQString( entry.file ).section( '.', -1 ) ) ); + TQString file( entry.file ); if ( type.isEmpty() && file.endsWith( "Makefile" ) ) { @@ -125,7 +125,7 @@ Tags::TagList Tags::getMatches(const char* tagFile, const QString & tagpart, boo } if ( types.isEmpty() || types.contains( entry.kind ) ) { - list << TagEntry( QString( entry.name ), type, file, QString( entry.address.pattern ) ); + list << TagEntry( TQString( entry.name ), type, file, TQString( entry.address.pattern ) ); } } while ( ctags::tagsFindNext( file, &entry ) == ctags::TagSuccess ); @@ -136,32 +136,32 @@ Tags::TagList Tags::getMatches(const char* tagFile, const QString & tagpart, boo return list; } -void Tags::setTagFiles(const QStringList& tagFiles ) +void Tags::setTagFiles(const TQStringList& tagFiles ) { _tagFiles = tagFiles; } -QStringList Tags::getTagFiles( ) +TQStringList Tags::getTagFiles( ) { return _tagFiles; } -unsigned int Tags::numberOfPartialMatches( const QString & tagpart ) +unsigned int Tags::numberOfPartialMatches( const TQString & tagpart ) { return numberOfMatches( tagpart, true ); } -unsigned int Tags::numberOfExactMatches( const QString & tagpart ) +unsigned int Tags::numberOfExactMatches( const TQString & tagpart ) { return numberOfMatches( tagpart, false ); } -Tags::TagList Tags::getPartialMatches( const QString & tagpart ) +Tags::TagList Tags::getPartialMatches( const TQString & tagpart ) { return getMatches( tagpart, true ); } -Tags::TagList Tags::getExactMatches( const QString & tag ) +Tags::TagList Tags::getExactMatches( const TQString & tag ) { return getMatches( tag, false ); } diff --git a/parts/ctags2/tags.h b/parts/ctags2/tags.h index 1d7e3604..22b7e7ea 100644 --- a/parts/ctags2/tags.h +++ b/parts/ctags2/tags.h @@ -12,10 +12,10 @@ #ifndef TAGS_H #define TAGS_H -#include -#include -#include -#include +#include +#include +#include +#include class Tags { @@ -24,49 +24,49 @@ public: struct TagEntry { TagEntry(); - TagEntry( const QString & tag, const QString & type, const QString & file, const QString & pattern ); + TagEntry( const TQString & tag, const TQString & type, const TQString & file, const TQString & pattern ); - QString tag; - QString type; - QString file; - QString pattern; + TQString tag; + TQString type; + TQString file; + TQString pattern; }; - typedef QValueList TagList; + typedef TQValueList TagList; /** * Method to set the tag database filename * @param file the tag database filename */ - static void setTagFiles(const QStringList& tagFiles); + static void setTagFiles(const TQStringList& tagFiles); - static QStringList getTagFiles(); + static TQStringList getTagFiles(); /** * Method to check if the tag database contains a specific tag * @param tag Tag to look up * @return returns true if tag database contains 'tag' */ - static bool hasTag( const QString & tag ); + static bool hasTag( const TQString & tag ); - static unsigned int numberOfPartialMatches( const QString & tagpart ); - static unsigned int numberOfExactMatches( const QString & tag ); - static unsigned int numberOfMatches( const QString & tagpart, bool partial ); + static unsigned int numberOfPartialMatches( const TQString & tagpart ); + static unsigned int numberOfExactMatches( const TQString & tag ); + static unsigned int numberOfMatches( const TQString & tagpart, bool partial ); - static TagList getPartialMatches( const QString & tagpart ); - static TagList getExactMatches( const QString & tag ); - static TagList getMatches( const QString & tagpart, bool partial, const QStringList & types = QStringList() ); + static TagList getPartialMatches( const TQString & tagpart ); + static TagList getExactMatches( const TQString & tag ); + static TagList getMatches( const TQString & tagpart, bool partial, const TQStringList & types = TQStringList() ); private: static Tags::TagList getMatches(const char* tagFile, - const QString & tagpart, + const TQString & tagpart, bool partial, - const QStringList & types ); + const TQStringList & types ); static unsigned int numberOfMatches(const char* tagFile, - const QString & tagpart, + const TQString & tagpart, bool partial ); - static bool hasTag(const char* tagFile, const QString & tag ); - static QStringList _tagFiles; + static bool hasTag(const char* tagFile, const TQString & tag ); + static TQStringList _tagFiles; }; #endif -- cgit v1.2.3