diff options
Diffstat (limited to 'vcs/cvsservice/cvslogpage.cpp')
| -rw-r--r-- | vcs/cvsservice/cvslogpage.cpp | 80 | 
1 files changed, 40 insertions, 40 deletions
| diff --git a/vcs/cvsservice/cvslogpage.cpp b/vcs/cvsservice/cvslogpage.cpp index cf8645e9..c0ade68e 100644 --- a/vcs/cvsservice/cvslogpage.cpp +++ b/vcs/cvsservice/cvslogpage.cpp @@ -9,11 +9,11 @@   *                                                                         *   ***************************************************************************/ -#include <qtextbrowser.h> -#include <qlayout.h> -#include <qregexp.h> -#include <qdir.h> -#include <qstringlist.h> +#include <tqtextbrowser.h> +#include <tqlayout.h> +#include <tqregexp.h> +#include <tqdir.h> +#include <tqstringlist.h>  #include <kmessagebox.h>  #include <kcursor.h> @@ -32,21 +32,21 @@  // class CVSLogPage  /////////////////////////////////////////////////////////////////////////////// -CVSLogPage::CVSLogPage( CvsService_stub *cvsService, QWidget *parent, const char *name, int ) +CVSLogPage::CVSLogPage( CvsService_stub *cvsService, TQWidget *parent, const char *name, int )      : DCOPObject( "CvsLogPageDCOPIface" ), -	QWidget( parent, name? name : "logformpage" ), +	TQWidget( parent, name? name : "logformpage" ),      m_cvsService( cvsService ), m_cvsLogJob( 0 )  { -    QLayout *thisLayout = new QVBoxLayout( this ); +    TQLayout *thisLayout = new TQVBoxLayout( this ); -    m_textBrowser = new QTextBrowser( this, "logbrowser" ); +    m_textBrowser = new TQTextBrowser( this, "logbrowser" );      thisLayout->add( m_textBrowser );      /// \FIXME a better way?      m_textBrowser->setMinimumWidth(fontMetrics().width('X')*50);      m_textBrowser->setMinimumHeight(fontMetrics().width('X')*43); -    connect( m_textBrowser, SIGNAL(linkClicked( const QString& )), this, SLOT(slotLinkClicked( const QString& )) ); +    connect( m_textBrowser, TQT_SIGNAL(linkClicked( const TQString& )), this, TQT_SLOT(slotLinkClicked( const TQString& )) );  }  /////////////////////////////////////////////////////////////////////////////// @@ -60,7 +60,7 @@ CVSLogPage::~CVSLogPage()  /////////////////////////////////////////////////////////////////////////////// -void CVSLogPage::startLog( const QString &workDir, const QString &pathName ) +void CVSLogPage::startLog( const TQString &workDir, const TQString &pathName )  {      kdDebug(9006) << "CVSLogPage::start() here! workDir = " << workDir <<          ", pathName = " << pathName << endl; @@ -76,8 +76,8 @@ void CVSLogPage::startLog( const QString &workDir, const QString &pathName )      // establish connections to the signals of the cvs m_job      connectDCOPSignal( job.app(), job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true );      // We'll read the ouput directly from the job ... -    connectDCOPSignal( job.app(), job.obj(), "receivedStdout(QString)", "slotReceivedOutput(QString)", true ); -//    connectDCOPSignal( job.app(), job.obj(), "receivedStderr(QString)", "slotReceivedErrors(QString)", true ); +    connectDCOPSignal( job.app(), job.obj(), "receivedStdout(TQString)", "slotReceivedOutput(TQString)", true ); +//    connectDCOPSignal( job.app(), job.obj(), "receivedStderr(TQString)", "slotReceivedErrors(TQString)", true );      kdDebug(9006) << "Running: " << m_cvsLogJob->cvsCommand() << endl;      m_cvsLogJob->execute(); @@ -85,19 +85,19 @@ void CVSLogPage::startLog( const QString &workDir, const QString &pathName )  ///////////////////////////////////////////////////////////////////////////////  /* -void CVSLogPage::parseLogContent( const QString& text ) +void CVSLogPage::parseLogContent( const TQString& text )  {      kdDebug(9006) << "CVSLogPage::parseLogContent()" << endl;      m_base->contents->clear(); -    QStringList l = QStringList::split( "----------------------------", text ); -    QString header = l.front(); +    TQStringList l = TQStringList::split( "----------------------------", text ); +    TQString header = l.front();      l.pop_front(); -    for( QStringList::Iterator it=l.begin(); it!=l.end(); ++it ) +    for( TQStringList::Iterator it=l.begin(); it!=l.end(); ++it )      { -        const QString &s = *it; +        const TQString &s = *it;          if (s)          {              m_base->contents->append( s ); @@ -117,41 +117,41 @@ void CVSLogPage::slotJobExited( bool normalExit, int exitStatus )          return;      } -    static QRegExp rx_sep( "\\-+" ); -    static QRegExp rx_sep2( "=+" ); -    static QRegExp rx_date( "date: .* author: .* state: .* lines: .*" ); +    static TQRegExp rx_sep( "\\-+" ); +    static TQRegExp rx_sep2( "=+" ); +    static TQRegExp rx_date( "date: .* author: .* state: .* lines: .*" );      // "revision" followed by one or more decimals followed by a optional dot -    static QRegExp rx_rev( "revision ((\\d+\\.?)+)" ); -    m_textBrowser->setTextFormat( QTextBrowser::PlainText ); +    static TQRegExp rx_rev( "revision ((\\d+\\.?)+)" ); +    m_textBrowser->setTextFormat( TQTextBrowser::PlainText );      for (size_t i=0; i<m_diffStrings.count(); ++i) { -        QString s = m_diffStrings[i]; +        TQString s = m_diffStrings[i];          kdDebug(9006) << "Examining line: " << s << endl;          if ( rx_rev.exactMatch(s) )          { -            QString ver = rx_rev.cap( 1 ); -            QString dstr = "<b>" + s + "</b> "; +            TQString ver = rx_rev.cap( 1 ); +            TQString dstr = "<b>" + s + "</b> ";              int lastVer = ver.section( '.', -1 ).toInt() - 1;              if ( lastVer > 0 ) { -                QString lv = ver.left( ver.findRev( "." ) + 1 ) + QString::number( lastVer ); +                TQString lv = ver.left( ver.findRev( "." ) + 1 ) + TQString::number( lastVer );                  dstr += " [<a href=\"diff:/" + m_pathName + "/" + lv + "_" + ver + "\">diff to " + lv + "</a>]";              } -            m_textBrowser->setTextFormat( QTextBrowser::RichText ); +            m_textBrowser->setTextFormat( TQTextBrowser::RichText );              m_textBrowser->append( dstr ); -            m_textBrowser->setTextFormat( QTextBrowser::PlainText ); +            m_textBrowser->setTextFormat( TQTextBrowser::PlainText );          }          else if ( rx_date.exactMatch(s) )          { -            m_textBrowser->setTextFormat( QTextBrowser::RichText ); +            m_textBrowser->setTextFormat( TQTextBrowser::RichText );              m_textBrowser->append( "<i>" + s + "</i>" ); -            m_textBrowser->setTextFormat( QTextBrowser::PlainText ); +            m_textBrowser->setTextFormat( TQTextBrowser::PlainText );          }          else if ( rx_sep.exactMatch(s) || rx_sep2.exactMatch(s) )          {              m_textBrowser->append( "\n" ); -            m_textBrowser->setTextFormat( QTextBrowser::RichText ); +            m_textBrowser->setTextFormat( TQTextBrowser::RichText );              m_textBrowser->append( "<hr>" ); -            m_textBrowser->setTextFormat( QTextBrowser::PlainText ); +            m_textBrowser->setTextFormat( TQTextBrowser::PlainText );          } else          {              m_textBrowser->append( s ); @@ -164,7 +164,7 @@ void CVSLogPage::slotJobExited( bool normalExit, int exitStatus )  /////////////////////////////////////////////////////////////////////////////// -void CVSLogPage::slotLinkClicked( const QString &link ) +void CVSLogPage::slotLinkClicked( const TQString &link )  {      kdDebug(9006) << "CVSLogPage::slotLinkClicked()" << endl; @@ -172,9 +172,9 @@ void CVSLogPage::slotLinkClicked( const QString &link )      /// \FIXME in this way I lose the source      m_textBrowser->setSource( m_logTextBackup ); -    QString ver = link.mid( link.findRev( "/" ) + 1 ); -    QString v1 = ver.section( '_', 0, 0 ); -    QString v2 = ver.section( '_', 1, 1 ); +    TQString ver = link.mid( link.findRev( "/" ) + 1 ); +    TQString v1 = ver.section( '_', 0, 0 ); +    TQString v2 = ver.section( '_', 1, 1 );      if ( v1.isEmpty() || v2.isEmpty() )      {          m_textBrowser->append( i18n( "invalid link clicked" ) ); @@ -186,9 +186,9 @@ void CVSLogPage::slotLinkClicked( const QString &link )  /////////////////////////////////////////////////////////////////////////////// -void CVSLogPage::slotReceivedOutput( QString someOutput ) +void CVSLogPage::slotReceivedOutput( TQString someOutput )  { -    kdDebug(9006) << "CVSLogPage::slotReceivedOutput(QString)" << endl; +    kdDebug(9006) << "CVSLogPage::slotReceivedOutput(TQString)" << endl;      kdDebug(9006) << "OUTPUT: " << someOutput << endl;  	m_diffStrings += m_outputBuffer.process(someOutput); @@ -196,7 +196,7 @@ void CVSLogPage::slotReceivedOutput( QString someOutput )  /////////////////////////////////////////////////////////////////////////////// -void CVSLogPage::slotReceivedErrors( QString someErrors ) +void CVSLogPage::slotReceivedErrors( TQString someErrors )  {      kdDebug(9006) << "ERRORS: " << someErrors << endl;  } | 
