diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /languages/php/phperrorview.cpp | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/php/phperrorview.cpp')
-rw-r--r-- | languages/php/phperrorview.cpp | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/languages/php/phperrorview.cpp b/languages/php/phperrorview.cpp index 011e8b77..e5d479ec 100644 --- a/languages/php/phperrorview.cpp +++ b/languages/php/phperrorview.cpp @@ -43,28 +43,28 @@ #include <kconfig.h> -#include <qtimer.h> -#include <qregexp.h> -#include <qvbox.h> -#include <qfileinfo.h> -#include <qwhatsthis.h> -#include <qtabbar.h> -#include <qwidgetstack.h> -#include <qlayout.h> -#include <qlineedit.h> +#include <tqtimer.h> +#include <tqregexp.h> +#include <tqvbox.h> +#include <tqfileinfo.h> +#include <tqwhatsthis.h> +#include <tqtabbar.h> +#include <tqwidgetstack.h> +#include <tqlayout.h> +#include <tqlineedit.h> class ProblemItem: public KListViewItem { public: - ProblemItem( QListView* parent, const QString& problem, - const QString& file, const QString& line, const QString& column ) + ProblemItem( TQListView* parent, const TQString& problem, + const TQString& file, const TQString& line, const TQString& column ) : KListViewItem( parent, problem, file, line, column ) {} - ProblemItem( QListViewItem* parent, const QString& problem, - const QString& file, const QString& line, const QString& column ) + ProblemItem( TQListViewItem* parent, const TQString& problem, + const TQString& file, const TQString& line, const TQString& column ) : KListViewItem( parent, problem, file, line, column ) {} - int compare( QListViewItem* item, int column, bool ascending ) const { + int compare( TQListViewItem* item, int column, bool ascending ) const { if( column == 2 || column == 3 ){ int a = text( column ).toInt(); int b = item->text( column ).toInt(); @@ -77,20 +77,20 @@ public: }; -PHPErrorView::PHPErrorView( PHPSupportPart* part, QWidget* parent, const char* name ) - : QWidget( parent, name ? name : "problemreporter" ), +PHPErrorView::PHPErrorView( PHPSupportPart* part, TQWidget* parent, const char* name ) + : TQWidget( parent, name ? name : "problemreporter" ), m_phpSupport( part ), m_document( 0 ), m_markIface( 0 ) { - QWhatsThis::add(this, i18n("<b>Problem reporter</b><p>This window shows various \"problems\" in your project. " + TQWhatsThis::add(this, i18n("<b>Problem reporter</b><p>This window shows various \"problems\" in your project. " "It displays TODO entries, FIXME's and errors reported by a language parser. " "To add a TODO or FIXME entry, just type<br>" "<tt>//@todo my todo</tt><br>" "<tt>//TODO: my todo</tt><br>" "<tt>//FIXME fix this</tt>")); - m_gridLayout = new QGridLayout(this,2,3); + m_gridLayout = new TQGridLayout(this,2,3); m_errorList = new KListView(this); m_fixmeList = new KListView(this); @@ -109,19 +109,19 @@ PHPErrorView::PHPErrorView( PHPSupportPart* part, QWidget* parent, const char* n InitListView(m_currentList); m_currentList->removeColumn(1); - m_widgetStack = new QWidgetStack(this); + m_widgetStack = new TQWidgetStack(this); m_widgetStack->addWidget(m_currentList,0); m_widgetStack->addWidget(m_errorList,1); m_widgetStack->addWidget(m_fixmeList,2); m_widgetStack->addWidget(m_todoList,3); m_widgetStack->addWidget(m_filteredList,4); - m_tabBar = new QTabBar(this); - m_tabBar->insertTab(new QTab(i18n("Current")),0); - m_tabBar->insertTab(new QTab(i18n("Errors")),1); - m_tabBar->insertTab(new QTab(i18n("Fixme")),2); - m_tabBar->insertTab(new QTab(i18n("Todo")),3); - m_tabBar->insertTab(new QTab(i18n("Filtered")),4); + m_tabBar = new TQTabBar(this); + m_tabBar->insertTab(new TQTab(i18n("Current")),0); + m_tabBar->insertTab(new TQTab(i18n("Errors")),1); + m_tabBar->insertTab(new TQTab(i18n("Fixme")),2); + m_tabBar->insertTab(new TQTab(i18n("Todo")),3); + m_tabBar->insertTab(new TQTab(i18n("Filtered")),4); m_tabBar->setTabEnabled(0,false); m_tabBar->setTabEnabled(4,false); @@ -129,19 +129,19 @@ PHPErrorView::PHPErrorView( PHPSupportPart* part, QWidget* parent, const char* n m_filterEdit = new KLineEdit(this); - QLabel* m_filterLabel = new QLabel(i18n("Lookup:"),this); + TQLabel* m_filterLabel = new TQLabel(i18n("Lookup:"),this); m_gridLayout->addWidget(m_tabBar,0,0); m_gridLayout->addMultiCellWidget(m_widgetStack,1,1,0,2); m_gridLayout->addWidget(m_filterLabel,0,1,Qt::AlignRight); m_gridLayout->addWidget(m_filterEdit,0,2,Qt::AlignLeft); - connect( m_filterEdit, SIGNAL(returnPressed()), this, SLOT(slotFilter()) ); - connect( m_filterEdit, SIGNAL(textChanged( const QString & )), this, SLOT(slotFilter()) ); - connect( m_tabBar, SIGNAL(selected(int)), this, SLOT(slotTabSelected(int)) ); - connect( part->partController(), SIGNAL(activePartChanged(KParts::Part*)), this, SLOT(slotActivePartChanged(KParts::Part*)) ); - connect( part->partController(), SIGNAL(partAdded(KParts::Part*)), this, SLOT(slotPartAdded(KParts::Part*)) ); - connect( part->partController(), SIGNAL(partRemoved(KParts::Part*)), this, SLOT(slotPartRemoved(KParts::Part*)) ); + connect( m_filterEdit, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotFilter()) ); + connect( m_filterEdit, TQT_SIGNAL(textChanged( const TQString & )), this, TQT_SLOT(slotFilter()) ); + connect( m_tabBar, TQT_SIGNAL(selected(int)), this, TQT_SLOT(slotTabSelected(int)) ); + connect( part->partController(), TQT_SIGNAL(activePartChanged(KParts::Part*)), this, TQT_SLOT(slotActivePartChanged(KParts::Part*)) ); + connect( part->partController(), TQT_SIGNAL(partAdded(KParts::Part*)), this, TQT_SLOT(slotPartAdded(KParts::Part*)) ); + connect( part->partController(), TQT_SIGNAL(partRemoved(KParts::Part*)), this, TQT_SLOT(slotPartRemoved(KParts::Part*)) ); slotActivePartChanged( part->partController()->activePart() ); } @@ -162,9 +162,9 @@ void PHPErrorView::slotFilter() } -void PHPErrorView::filterList(KListView* listview, const QString& level) +void PHPErrorView::filterList(KListView* listview, const TQString& level) { - QListViewItemIterator it( listview ); + TQListViewItemIterator it( listview ); while ( it.current() ) { if ( it.current()->text(3).contains(m_filterEdit->text(),false)) new KListViewItem(m_filteredList,level, @@ -186,11 +186,11 @@ void PHPErrorView::InitListView(KListView* listview) listview->addColumn( i18n("Problem") ); listview->setAllColumnsShowFocus( TRUE ); - connect( listview, SIGNAL(executed(QListViewItem*)), - this, SLOT(slotSelected(QListViewItem*)) ); + connect( listview, TQT_SIGNAL(executed(TQListViewItem*)), + this, TQT_SLOT(slotSelected(TQListViewItem*)) ); - connect( listview, SIGNAL(returnPressed(QListViewItem*)), - this, SLOT(slotSelected(QListViewItem* )) ); + connect( listview, TQT_SIGNAL(returnPressed(TQListViewItem*)), + this, TQT_SLOT(slotSelected(TQListViewItem* )) ); } @@ -223,11 +223,11 @@ void PHPErrorView::slotActivePartChanged( KParts::Part* part ) m_markIface = dynamic_cast<KTextEditor::MarkInterface*>( part ); } -void PHPErrorView::removeAllItems( QListView* listview, const QString& filename ) +void PHPErrorView::removeAllItems( TQListView* listview, const TQString& filename ) { - QListViewItem* current = listview->firstChild(); + TQListViewItem* current = listview->firstChild(); while( current ){ - QListViewItem* i = current; + TQListViewItem* i = current; current = current->nextSibling(); if( i->text(0) == filename ) @@ -235,9 +235,9 @@ void PHPErrorView::removeAllItems( QListView* listview, const QString& filename } } -void PHPErrorView::removeAllProblems( const QString& filename ) +void PHPErrorView::removeAllProblems( const TQString& filename ) { - QString relFileName = filename; + TQString relFileName = filename; relFileName.remove(m_phpSupport->project()->projectDirectory()); kdDebug(9008) << "PHPErrorView::removeAllProblems()" << relFileName << endl; @@ -250,8 +250,8 @@ void PHPErrorView::removeAllProblems( const QString& filename ) removeAllItems(m_todoList,relFileName); if ( m_document && m_markIface ) { - QPtrList<KTextEditor::Mark> marks = m_markIface->marks(); - QPtrListIterator<KTextEditor::Mark> it( marks ); + TQPtrList<KTextEditor::Mark> marks = m_markIface->marks(); + TQPtrListIterator<KTextEditor::Mark> it( marks ); while( it.current() ) { m_markIface->removeMark( it.current()->line, KTextEditor::MarkInterface::markType07 ); ++it; @@ -263,7 +263,7 @@ void PHPErrorView::initCurrentList() { m_tabBar->setTabEnabled(0,true); - QString relFileName = m_fileName; + TQString relFileName = m_fileName; if (m_phpSupport->project()) relFileName.remove(m_phpSupport->project()->projectDirectory()); @@ -275,17 +275,17 @@ void PHPErrorView::initCurrentList() updateCurrentWith(m_todoList,i18n("Todo"),relFileName); } -void PHPErrorView::updateCurrentWith(QListView* listview, const QString& level, const QString& filename) +void PHPErrorView::updateCurrentWith(TQListView* listview, const TQString& level, const TQString& filename) { - QListViewItemIterator it(listview); + TQListViewItemIterator it(listview); while ( it.current() ) { if ( it.current()->text(0) == filename) - new QListViewItem(m_currentList,level,it.current()->text(1),it.current()->text(2),it.current()->text(3)); + new TQListViewItem(m_currentList,level,it.current()->text(1),it.current()->text(2),it.current()->text(3)); ++it; } } -void PHPErrorView::slotSelected( QListViewItem* item ) +void PHPErrorView::slotSelected( TQListViewItem* item ) { bool is_filtered = false; bool is_current = false; @@ -300,17 +300,17 @@ void PHPErrorView::slotSelected( QListViewItem* item ) m_phpSupport->partController()->editDocument( url, line-1 ); } -void PHPErrorView::reportProblem( int level, const QString& fileName, int line, const QString& text) +void PHPErrorView::reportProblem( int level, const TQString& fileName, int line, const TQString& text) { int markType = levelToMarkType( level ); if ( markType != -1 && m_document && m_markIface && m_fileName == fileName ) { m_markIface->addMark( line, markType ); } - QString msg = text; - msg = msg.replace( QRegExp("\n"), "" ); + TQString msg = text; + msg = msg.replace( TQRegExp("\n"), "" ); - QString relFileName = fileName; + TQString relFileName = fileName; relFileName.remove(m_phpSupport->project()->projectDirectory()); KListView* list; @@ -342,11 +342,11 @@ void PHPErrorView::reportProblem( int level, const QString& fileName, int line, if (list) { kdDebug(9018) << "PB " << msg << endl; - new ProblemItem( list, relFileName, QString::number( line + 1 ), 0, msg ); + new ProblemItem( list, relFileName, TQString::number( line + 1 ), 0, msg ); } if (fileName == m_fileName) - new QListViewItem(m_currentList, levelToString( level ), QString::number( line + 1 ), 0, msg); + new TQListViewItem(m_currentList, levelToString( level ), TQString::number( line + 1 ), 0, msg); } void PHPErrorView::slotPartAdded( KParts::Part* part ) @@ -367,30 +367,30 @@ void PHPErrorView::slotPartRemoved( KParts::Part* part ) } } -QString PHPErrorView::levelToString( int level ) const +TQString PHPErrorView::levelToString( int level ) const { switch( level ) { case ErrorNoSuchFunction: - return QString( i18n("Undefined function") ); + return TQString( i18n("Undefined function") ); case ErrorParse: - return QString( i18n("Parse Error") ); + return TQString( i18n("Parse Error") ); case Error: - return QString( i18n("Error") ); + return TQString( i18n("Error") ); case Warning: - return QString( i18n("Warning") ); + return TQString( i18n("Warning") ); case Todo: - return QString( i18n("Todo") ); + return TQString( i18n("Todo") ); case Fixme: - return QString( i18n("Fixme") ); + return TQString( i18n("Fixme") ); default: - return QString::null; + return TQString::null; } } |