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 --- languages/pascal/problemreporter.cpp | 100 +++++++++++++++++------------------ 1 file changed, 50 insertions(+), 50 deletions(-) (limited to 'languages/pascal/problemreporter.cpp') diff --git a/languages/pascal/problemreporter.cpp b/languages/pascal/problemreporter.cpp index b2c2fee8..30a65739 100644 --- a/languages/pascal/problemreporter.cpp +++ b/languages/pascal/problemreporter.cpp @@ -40,23 +40,23 @@ #include -#include -#include -#include +#include +#include +#include #include class ProblemItem: public QListViewItem{ public: - ProblemItem( QListView* parent, const QString& level, const QString& problem, - const QString& file, const QString& line, const QString& column ) - : QListViewItem( parent, level, problem, file, line, column ) {} + ProblemItem( TQListView* parent, const TQString& level, const TQString& problem, + const TQString& file, const TQString& line, const TQString& column ) + : TQListViewItem( parent, level, problem, file, line, column ) {} - ProblemItem( QListViewItem* parent, const QString& level, const QString& problem, - const QString& file, const QString& line, const QString& column ) - : QListViewItem( parent, level, problem, file, line, column ) {} + ProblemItem( TQListViewItem* parent, const TQString& level, const TQString& problem, + const TQString& file, const TQString& line, const TQString& column ) + : TQListViewItem( parent, level, problem, file, line, column ) {} - int compare( QListViewItem* item, int column, bool ascending ) const { + int compare( TQListViewItem* item, int column, bool ascending ) const { if( column == 3 || column == 4 ){ int a = text( column ).toInt(); int b = item->text( column ).toInt(); @@ -64,13 +64,13 @@ public: return 0; return( a > b ? -1 : 1 ); } - return QListViewItem::compare( item, column, ascending ); + return TQListViewItem::compare( item, column, ascending ); } }; -ProblemReporter::ProblemReporter( PascalSupportPart* part, QWidget* parent, const char* name ) - : QListView( parent, name ), +ProblemReporter::ProblemReporter( PascalSupportPart* part, TQWidget* parent, const char* name ) + : TQListView( parent, name ), m_pascalSupport( part ), m_editor( 0 ), m_document( 0 ), @@ -84,21 +84,21 @@ ProblemReporter::ProblemReporter( PascalSupportPart* part, QWidget* parent, cons //addColumn( i18n("Column") ); setAllColumnsShowFocus( TRUE ); - m_timer = new QTimer( this ); + m_timer = new TQTimer( this ); - 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( 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*)) ); - connect( m_timer, SIGNAL(timeout()), this, SLOT(reparse()) ); + connect( m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(reparse()) ); - connect( this, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(slotSelected(QListViewItem*)) ); - connect( this, SIGNAL(returnPressed(QListViewItem*)), - this, SLOT(slotSelected(QListViewItem*)) ); + connect( this, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this, TQT_SLOT(slotSelected(TQListViewItem*)) ); + connect( this, TQT_SIGNAL(returnPressed(TQListViewItem*)), + this, TQT_SLOT(slotSelected(TQListViewItem*)) ); configure(); } @@ -128,7 +128,7 @@ void ProblemReporter::slotActivePartChanged( KParts::Part* part ) m_editor = dynamic_cast( part ); if( m_editor ) - connect( m_document, SIGNAL(textChanged()), this, SLOT(slotTextChanged()) ); + connect( m_document, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotTextChanged()) ); m_markIface = dynamic_cast( part ); @@ -168,9 +168,9 @@ void ProblemReporter::reparse() kdDebug() << "4" << endl; - QListViewItem* current = firstChild(); + TQListViewItem* current = firstChild(); while( current ){ - QListViewItem* i = current; + TQListViewItem* i = current; current = current->nextSibling(); if( i->text(2) == m_filename ) @@ -180,8 +180,8 @@ void ProblemReporter::reparse() kdDebug() << "5" << endl; if( m_markIface ){ - QPtrList marks = m_markIface->marks(); - QPtrListIterator it( marks ); + TQPtrList marks = m_markIface->marks(); + TQPtrListIterator it( marks ); while( it.current() ){ m_markIface->removeMark( it.current()->line, KTextEditor::MarkInterface::markType07 ); ++it; @@ -199,7 +199,7 @@ void ProblemReporter::reparse() kdDebug() << "8" << endl; } -void ProblemReporter::slotSelected( QListViewItem* item ) +void ProblemReporter::slotSelected( TQListViewItem* item ) { KURL url( item->text(2) ); int line = item->text( 3 ).toInt(); @@ -207,8 +207,8 @@ void ProblemReporter::slotSelected( QListViewItem* item ) m_pascalSupport->partController()->editDocument( url, line-1 ); } -void ProblemReporter::reportError( QString message, - QString filename, +void ProblemReporter::reportError( TQString message, + TQString filename, int line, int column ) { if( m_markIface ){ @@ -217,34 +217,34 @@ void ProblemReporter::reportError( QString message, new ProblemItem( this, "error", - message.replace( QRegExp("\n"), "" ), + message.replace( TQRegExp("\n"), "" ), filename, - QString::number( line ), - QString::number( column ) ); + TQString::number( line ), + TQString::number( column ) ); } -void ProblemReporter::reportWarning( QString message, - QString filename, +void ProblemReporter::reportWarning( TQString message, + TQString filename, int line, int column ) { new ProblemItem( this, "warning", - message.replace( QRegExp("\n"), "" ), + message.replace( TQRegExp("\n"), "" ), filename, - QString::number( line ), - QString::number( column ) ); + TQString::number( line ), + TQString::number( column ) ); } -void ProblemReporter::reportMessage( QString message, - QString filename, +void ProblemReporter::reportMessage( TQString message, + TQString filename, int line, int column ) { - new QListViewItem( this, + new TQListViewItem( this, "message", - message.replace( QRegExp("\n"), "" ), + message.replace( TQRegExp("\n"), "" ), filename, - QString::number( line ), - QString::number( column ) ); + TQString::number( line ), + TQString::number( column ) ); } void ProblemReporter::configure() @@ -260,10 +260,10 @@ void ProblemReporter::configWidget( KDialogBase* dlg ) { /// \FIXME adymo: use problem reporter configuration Q_UNUSED(dlg); -/* QVBox *vbox = dlg->addVBoxPage(i18n("Pascal Parsing")); +/* TQVBox *vbox = dlg->addVBoxPage(i18n("Pascal Parsing")); ConfigureProblemReporter* w = new ConfigureProblemReporter( vbox ); - connect(dlg, SIGNAL(okClicked()), w, SLOT(accept())); - connect(dlg, SIGNAL(okClicked()), this, SLOT(configure()));*/ + connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); + connect(dlg, TQT_SIGNAL(okClicked()), this, TQT_SLOT(configure()));*/ } void ProblemReporter::slotPartAdded( KParts::Part* part ) -- cgit v1.2.1