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 /vcs/cvsservice | |
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 'vcs/cvsservice')
53 files changed, 926 insertions, 926 deletions
diff --git a/vcs/cvsservice/annotatedialog.cpp b/vcs/cvsservice/annotatedialog.cpp index 08d0f24f..2937b2bb 100644 --- a/vcs/cvsservice/annotatedialog.cpp +++ b/vcs/cvsservice/annotatedialog.cpp @@ -9,9 +9,9 @@ * * ***************************************************************************/ -#include <qvbox.h> -#include <qdir.h> -#include <qstringlist.h> +#include <tqvbox.h> +#include <tqdir.h> +#include <tqstringlist.h> #include <kmessagebox.h> #include <klocale.h> @@ -23,18 +23,18 @@ #include "annotatedialog.h" #include "annotatepage.h" -AnnotateDialog::AnnotateDialog( CvsService_stub *cvsService, QWidget *parent, const char *name, int ) +AnnotateDialog::AnnotateDialog( CvsService_stub *cvsService, TQWidget *parent, const char *name, int ) : KDialogBase( Tabbed, i18n("CVS Annotate Dialog"), Close, Close, parent, name? name : "annotateformdialog", false /*modal*/, true /*separator*/ ), m_cvsService( cvsService ) { setWFlags( getWFlags() | WDestructiveClose ); - QVBox *vbox = addVBoxPage( i18n("Annotate") ); + TQVBox *vbox = addVBoxPage( i18n("Annotate") ); m_cvsAnnotatePage = new AnnotatePage( m_cvsService, vbox ); - connect( m_cvsAnnotatePage, SIGNAL(requestAnnotate(const QString)), - this, SLOT(slotAnnotate(const QString)) ); + connect( m_cvsAnnotatePage, TQT_SIGNAL(requestAnnotate(const TQString)), + this, TQT_SLOT(slotAnnotate(const TQString)) ); } AnnotateDialog::~AnnotateDialog() @@ -42,7 +42,7 @@ AnnotateDialog::~AnnotateDialog() kdDebug(9006) << "AnnotateDialog::~AnnotateDialog()" << endl; } -void AnnotateDialog::startFirstAnnotate( const QString pathName, const QString revision ) +void AnnotateDialog::startFirstAnnotate( const TQString pathName, const TQString revision ) { kdDebug(9006) << "AnnotateDialog::startFirstAnnotate() pathName = " << pathName << "revision = " << revision << endl; @@ -53,16 +53,16 @@ void AnnotateDialog::startFirstAnnotate( const QString pathName, const QString r m_cvsAnnotatePage->startAnnotate( pathName, revision ); } -void AnnotateDialog::slotAnnotate(const QString rev) +void AnnotateDialog::slotAnnotate(const TQString rev) { - kdDebug(9006) << "AnnotateDialog::slotAnnotate(QString) revision = " << rev << endl; + kdDebug(9006) << "AnnotateDialog::slotAnnotate(TQString) revision = " << rev << endl; - QVBox *vbox = addVBoxPage( i18n("Annotate")+" "+rev ); + TQVBox *vbox = addVBoxPage( i18n("Annotate")+" "+rev ); AnnotatePage * page = new AnnotatePage( m_cvsService, vbox ); page->startAnnotate(m_pathName, rev); - connect( page, SIGNAL(requestAnnotate(const QString)), - this, SLOT(slotAnnotate(const QString)) ); + connect( page, TQT_SIGNAL(requestAnnotate(const TQString)), + this, TQT_SLOT(slotAnnotate(const TQString)) ); } #include "annotatedialog.moc" diff --git a/vcs/cvsservice/annotatedialog.h b/vcs/cvsservice/annotatedialog.h index 7fea14f1..c887264d 100644 --- a/vcs/cvsservice/annotatedialog.h +++ b/vcs/cvsservice/annotatedialog.h @@ -31,7 +31,7 @@ class AnnotateDialog : public KDialogBase { Q_OBJECT public: - AnnotateDialog( CvsService_stub *cvsService, QWidget *parent=0, const char *name=0, int flags=0 ); + AnnotateDialog( CvsService_stub *cvsService, TQWidget *parent=0, const char *name=0, int flags=0 ); virtual ~AnnotateDialog(); /** @@ -45,7 +45,7 @@ public: * * @param pathName The file for which to run cvs annotate */ - void startFirstAnnotate( const QString pathName, const QString revision = "" ); + void startFirstAnnotate( const TQString pathName, const TQString revision = "" ); private slots: /** @@ -53,10 +53,10 @@ private slots: * The output gets shown in a new page. * @param rev The revision which will be annotated */ - void slotAnnotate(const QString rev); + void slotAnnotate(const TQString rev); private: - QString m_pathName; + TQString m_pathName; AnnotatePage *m_cvsAnnotatePage; CvsService_stub *m_cvsService; diff --git a/vcs/cvsservice/annotatepage.cpp b/vcs/cvsservice/annotatepage.cpp index fea16ece..71918304 100644 --- a/vcs/cvsservice/annotatepage.cpp +++ b/vcs/cvsservice/annotatepage.cpp @@ -9,11 +9,11 @@ * * ***************************************************************************/ -#include <qlayout.h> -#include <qregexp.h> -#include <qstringlist.h> -#include <qdatetime.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqregexp.h> +#include <tqstringlist.h> +#include <tqdatetime.h> +#include <tqlabel.h> #include <kmessagebox.h> #include <kcursor.h> @@ -32,20 +32,20 @@ #include "annotatepage.h" #include "annotateview.h" -AnnotatePage::AnnotatePage( CvsService_stub *cvsService, QWidget *parent, const char *name, int ) +AnnotatePage::AnnotatePage( CvsService_stub *cvsService, TQWidget *parent, const char *name, int ) : DCOPObject( "CvsAnnotatePageDCOPIface" ), - QWidget( parent, name? name : "annotateformpage" ), + TQWidget( parent, name? name : "annotateformpage" ), m_cvsService( cvsService ), m_cvsAnnotateJob( 0 ) { kdDebug(9006) << "AnnotatePage::AnnotatePage()" << endl; - QLayout *dialogLayout = new QVBoxLayout( this ); + TQLayout *dialogLayout = new TQVBoxLayout( this ); //First create the top-line where user can choose a revision - QWidget * LayoutWidget = new QWidget( this ); - QHBoxLayout * AnnotateLayout = new QHBoxLayout( LayoutWidget ); + TQWidget * LayoutWidget = new TQWidget( this ); + TQHBoxLayout * AnnotateLayout = new TQHBoxLayout( LayoutWidget ); - QLabel * lblRevision = new QLabel( LayoutWidget ); + TQLabel * lblRevision = new TQLabel( LayoutWidget ); AnnotateLayout->addWidget( lblRevision ); lblRevision->setText( tr( "Revision:" ) ); @@ -55,14 +55,14 @@ AnnotatePage::AnnotatePage( CvsService_stub *cvsService, QWidget *parent, const m_btnAnnotate = new KPushButton( LayoutWidget ); AnnotateLayout->addWidget( m_btnAnnotate ); m_btnAnnotate->setText( tr( "&Annotate" ) ); - m_btnAnnotate->setAccel( QKeySequence( tr( "Alt+A" ) ) ); + m_btnAnnotate->setAccel( TQKeySequence( tr( "Alt+A" ) ) ); dialogLayout->add( LayoutWidget ); - connect( m_btnAnnotate, SIGNAL(clicked()), - this, SLOT(slotNewAnnotate()) ); - connect( m_leRevision, SIGNAL( returnPressed() ), - m_btnAnnotate, SLOT( setFocus() ) ); + connect( m_btnAnnotate, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotNewAnnotate()) ); + connect( m_leRevision, TQT_SIGNAL( returnPressed() ), + m_btnAnnotate, TQT_SLOT( setFocus() ) ); //Nest create the AnnotateView; it will do the actual displaying m_annotateView = new AnnotateView(this, "annotateview"); @@ -76,7 +76,7 @@ AnnotatePage::~AnnotatePage() delete m_cvsAnnotateJob; } -void AnnotatePage::startAnnotate( const QString pathName, const QString revision ) +void AnnotatePage::startAnnotate( const TQString pathName, const TQString revision ) { kdDebug(9006) << "AnnotatePage::startAnnotate() pathName = " << pathName << "revision = " << revision << endl; @@ -90,7 +90,7 @@ void AnnotatePage::startAnnotate( const QString pathName, const QString revision // establish connections to the signals of the cvs m_job connectDCOPSignal( job.app(), job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true ); - connectDCOPSignal( job.app(), job.obj(), "receivedStdout(QString)", "slotReceivedOutput(QString)", true ); + connectDCOPSignal( job.app(), job.obj(), "receivedStdout(TQString)", "slotReceivedOutput(TQString)", true ); //clear both the outputbuffer and the AnnotateView m_output = ""; @@ -111,19 +111,19 @@ void AnnotatePage::slotJobExited( bool normalExit, int exitStatus ) } //split the collected output and pass the lines to the parser function - QStringList lines = QStringList::split("\n", m_output); + TQStringList lines = TQStringList::split("\n", m_output); parseAnnotateOutput(lines); } -void AnnotatePage::slotReceivedOutput( QString someOutput ) +void AnnotatePage::slotReceivedOutput( TQString someOutput ) { - kdDebug(9006) << "AnnotatePage::slotReceivedOutput(QString)" << endl; + kdDebug(9006) << "AnnotatePage::slotReceivedOutput(TQString)" << endl; m_output += someOutput; } -void AnnotatePage::slotReceivedErrors( QString ) +void AnnotatePage::slotReceivedErrors( TQString ) { - kdDebug(9006) << "AnnotatePage::slotReceivedErrors(QString)" << endl; + kdDebug(9006) << "AnnotatePage::slotReceivedErrors(TQString)" << endl; } void AnnotatePage::cancel() @@ -132,22 +132,22 @@ void AnnotatePage::cancel() m_cvsAnnotateJob->cancel(); } -void AnnotatePage::parseAnnotateOutput(QStringList& lines) +void AnnotatePage::parseAnnotateOutput(TQStringList& lines) { - kdDebug(9006) << "AnnotatePage::parseAnnotateOutput(QStringList)" << endl; + kdDebug(9006) << "AnnotatePage::parseAnnotateOutput(TQStringList)" << endl; /** * First we need to parse the output of "cvs log" which the dcop-interface delivers * everytime annotate is requested. - * The QMap m_comments stores the revisions together with the matching comments. + * The TQMap m_comments stores the revisions together with the matching comments. * The comments will be passed to the AnnotateView in order to display them as QToolTip */ - QString line, comment, rev; + TQString line, comment, rev; enum { Begin, Tags, Admin, Revision, Author, Branches, Comment, Finished } state; - QStringList::Iterator it = lines.begin(); + TQStringList::Iterator it = lines.begin(); state = Begin; do { @@ -187,7 +187,7 @@ void AnnotatePage::parseAnnotateOutput(QStringList& lines) else if( line == "=============================================================================" ) state = Finished; if( state == Comment ) - comment += QString("\n") + line; + comment += TQString("\n") + line; else m_comments[rev] = comment; break; @@ -214,18 +214,18 @@ void AnnotatePage::parseAnnotateOutput(QStringList& lines) } ++it; - QString author, content; - QString oldRevision = ""; //we always store the last revision to recognice... + TQString author, content; + TQString oldRevision = ""; //we always store the last revision to recognice... bool changeColor = false; //...when the AnnotateView needs to change the coloring - QDateTime logDate; + TQDateTime logDate; do { line = *it; //the log date should be printed according to the user's global setting - //so we pass it as QDateTime to the AnnotateView below - QString dateString = line.mid(23, 9); + //so we pass it as TQDateTime to the AnnotateView below + TQString dateString = line.mid(23, 9); if( !dateString.isEmpty() ) logDate.setTime_t(KRFCDate::parseDate(dateString), Qt::UTC); diff --git a/vcs/cvsservice/annotatepage.h b/vcs/cvsservice/annotatepage.h index 2a062804..b6a52b66 100644 --- a/vcs/cvsservice/annotatepage.h +++ b/vcs/cvsservice/annotatepage.h @@ -13,9 +13,9 @@ #define ANNOTATEPAGE_H #include "cvsservicedcopIface.h" -#include <qwidget.h> -#include <qmap.h> -#include <qlistview.h> +#include <tqwidget.h> +#include <tqmap.h> +#include <tqlistview.h> class CvsJob_stub; class CvsService_stub; @@ -34,7 +34,7 @@ class KPushButton; * * @author Robert Gruber <rgruber@users.sourceforge.net> */ -class AnnotatePage : public QWidget, virtual public CVSServiceDCOPIface +class AnnotatePage : public TQWidget, virtual public CVSServiceDCOPIface { Q_OBJECT @@ -42,7 +42,7 @@ class AnnotatePage : public QWidget, virtual public CVSServiceDCOPIface friend class AnnotateView; public: - AnnotatePage( CvsService_stub *cvsService, QWidget *parent=0, const char *name=0, int flags=0 ); + AnnotatePage( CvsService_stub *cvsService, TQWidget *parent=0, const char *name=0, int flags=0 ); virtual ~AnnotatePage(); /** @@ -50,7 +50,7 @@ public: * @param pathName The filename to annotate * @param revision The CVS revision number */ - void startAnnotate( const QString pathName, const QString revision="" ); + void startAnnotate( const TQString pathName, const TQString revision="" ); /** * Cancels the current operation if any @@ -64,13 +64,13 @@ signals: * a new page with the annotate output for the given revision. * @param rev The revision for which a new annotate run is requested */ - void requestAnnotate(const QString rev); + void requestAnnotate(const TQString rev); private slots: // DCOP Iface virtual void slotJobExited( bool normalExit, int exitStatus ); - virtual void slotReceivedOutput( QString someOutput ); - virtual void slotReceivedErrors( QString someErrors ); + virtual void slotReceivedOutput( TQString someOutput ); + virtual void slotReceivedErrors( TQString someErrors ); /** * This slot is connected to the button next to m_leRevision. @@ -84,7 +84,7 @@ private: * This method is executed after the cvs annotate job finished. * It parses the output and passes it to the AnnotateView */ - void parseAnnotateOutput(QStringList& lines); + void parseAnnotateOutput(TQStringList& lines); /** @@ -92,7 +92,7 @@ private: * Everytime slotReceivedOutput() is called by dcop * we append the gained data to this buffer. */ - QString m_output; + TQString m_output; /** * This is the AnnotateView. It gets nested into this page. */ @@ -100,11 +100,11 @@ private: /** * The file for which this page holds the annotate output. */ - QString m_pathName; + TQString m_pathName; /** * Maps the checkin comments to revision numbers */ - QMap<QString, QString> m_comments; + TQMap<TQString, TQString> m_comments; /** * With this KLineEdit and the KPushButton next to it diff --git a/vcs/cvsservice/annotateview.cpp b/vcs/cvsservice/annotateview.cpp index 93a2a46d..afc185cd 100644 --- a/vcs/cvsservice/annotateview.cpp +++ b/vcs/cvsservice/annotateview.cpp @@ -15,9 +15,9 @@ #include "annotateview.h" -#include <qheader.h> -#include <qdatetime.h> -#include <qpainter.h> +#include <tqheader.h> +#include <tqdatetime.h> +#include <tqpainter.h> #include <kglobalsettings.h> #include <kglobal.h> #include <klocale.h> @@ -32,21 +32,21 @@ class AnnotateViewItem : public QListViewItem public: enum { LineNumberColumn, AuthorColumn, DateColumn,ContentColumn }; - AnnotateViewItem(AnnotateView *parent, QString rev, QString author, - QDateTime date, QString content, QString comment, + AnnotateViewItem(AnnotateView *parent, TQString rev, TQString author, + TQDateTime date, TQString content, TQString comment, bool odd, int linenumber); - virtual int compare(QListViewItem *item, int col, bool ascending) const; - virtual int width(const QFontMetrics &, const QListView *, int col) const; - virtual QString text(int col) const; - virtual void paintCell(QPainter *, const QColorGroup &, int, int, int); + virtual int compare(TQListViewItem *item, int col, bool ascending) const; + virtual int width(const TQFontMetrics &, const TQListView *, int col) const; + virtual TQString text(int col) const; + virtual void paintCell(TQPainter *, const TQColorGroup &, int, int, int); private: - QString m_revision; - QString m_author; - QString m_content; - QString m_comment; - QDateTime m_logDate; + TQString m_revision; + TQString m_author; + TQString m_content; + TQString m_comment; + TQDateTime m_logDate; bool m_odd; int m_lineNumber; @@ -57,10 +57,10 @@ private: const int AnnotateViewItem::BORDER = 4; -AnnotateViewItem::AnnotateViewItem(AnnotateView *parent, QString rev, - QString author, QDateTime date, QString content, QString comment, +AnnotateViewItem::AnnotateViewItem(AnnotateView *parent, TQString rev, + TQString author, TQDateTime date, TQString content, TQString comment, bool odd, int linenumber) - : QListViewItem(parent) + : TQListViewItem(parent) , m_revision(rev) , m_author(author) , m_content(content) @@ -71,7 +71,7 @@ AnnotateViewItem::AnnotateViewItem(AnnotateView *parent, QString rev, {} -int AnnotateViewItem::compare(QListViewItem *item, int, bool) const +int AnnotateViewItem::compare(TQListViewItem *item, int, bool) const { int linenum1 = m_lineNumber; int linenum2 = static_cast<AnnotateViewItem*>(item)->m_lineNumber; @@ -80,14 +80,14 @@ int AnnotateViewItem::compare(QListViewItem *item, int, bool) const } -QString AnnotateViewItem::text(int col) const +TQString AnnotateViewItem::text(int col) const { switch (col) { case LineNumberColumn: - return QString::number(m_lineNumber); + return TQString::number(m_lineNumber); case AuthorColumn: - return (m_revision + QChar(' ') + m_author); + return (m_revision + TQChar(' ') + m_author); case DateColumn: return KGlobal::locale()->formatDate(m_logDate.date(), true); case ContentColumn: @@ -96,13 +96,13 @@ QString AnnotateViewItem::text(int col) const ; }; - return QString::null; + return TQString::null; } -void AnnotateViewItem::paintCell(QPainter *p, const QColorGroup &, int col, int width, int align) +void AnnotateViewItem::paintCell(TQPainter *p, const TQColorGroup &, int col, int width, int align) { - QColor backgroundColor; + TQColor backgroundColor; switch (col) { @@ -119,7 +119,7 @@ void AnnotateViewItem::paintCell(QPainter *p, const QColorGroup &, int col, int p->fillRect(0, 0, width, height(), backgroundColor); - QString str = text(col); + TQString str = text(col); if (str.isEmpty()) return; @@ -130,7 +130,7 @@ void AnnotateViewItem::paintCell(QPainter *p, const QColorGroup &, int col, int } -int AnnotateViewItem::width(const QFontMetrics &fm, const QListView *, int col) const +int AnnotateViewItem::width(const TQFontMetrics &fm, const TQListView *, int col) const { return fm.width(text(col)) + 2*BORDER; } @@ -141,43 +141,43 @@ int AnnotateViewItem::width(const QFontMetrics &fm, const QListView *, int col) /******************************************************************************/ AnnotateView::AnnotateView(AnnotatePage *parent, const char *name) - : KListView(parent, name), QToolTip( viewport() ), + : KListView(parent, name), TQToolTip( viewport() ), m_page(parent) { - setFrameStyle(QFrame::WinPanel | QFrame::Sunken); + setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); setAllColumnsShowFocus(true); setShowToolTips(false); header()->hide(); - addColumn(QString::null); - addColumn(QString::null); - addColumn(QString::null); - addColumn(QString::null); + addColumn(TQString::null); + addColumn(TQString::null); + addColumn(TQString::null); + addColumn(TQString::null); setSorting(AnnotateViewItem::LineNumberColumn); setColumnAlignment(AnnotateViewItem::LineNumberColumn, Qt::AlignRight); - connect( this, SIGNAL(executed(QListViewItem*)), - this, SLOT(itemClicked(QListViewItem*)) ); + connect( this, TQT_SIGNAL(executed(TQListViewItem*)), + this, TQT_SLOT(itemClicked(TQListViewItem*)) ); } -void AnnotateView::addLine(QString rev, QString author, QDateTime date, - QString content, QString comment, bool odd) +void AnnotateView::addLine(TQString rev, TQString author, TQDateTime date, + TQString content, TQString comment, bool odd) { new AnnotateViewItem(this, rev, author, date, content, comment, odd, childCount()+1); } -QSize AnnotateView::sizeHint() const +TQSize AnnotateView::sizeHint() const { - QFontMetrics fm(fontMetrics()); - return QSize(100 * fm.width("0"), 20 * fm.lineSpacing()); + TQFontMetrics fm(fontMetrics()); + return TQSize(100 * fm.width("0"), 20 * fm.lineSpacing()); } -void AnnotateView::maybeTip( const QPoint & p ) +void AnnotateView::maybeTip( const TQPoint & p ) { AnnotateViewItem * item = dynamic_cast<AnnotateViewItem*>( itemAt( p ) ); if (!item) @@ -189,9 +189,9 @@ void AnnotateView::maybeTip( const QPoint & p ) return; } - QRect r = itemRect( item ); + TQRect r = itemRect( item ); //get the dimension of the author + the date column - QRect headerRect = header()->sectionRect(AnnotateViewItem::AuthorColumn); + TQRect headerRect = header()->sectionRect(AnnotateViewItem::AuthorColumn); headerRect = headerRect.unite(header()->sectionRect(AnnotateViewItem::DateColumn)); r.setLeft(headerRect.left()); @@ -205,7 +205,7 @@ void AnnotateView::maybeTip( const QPoint & p ) } } -void AnnotateView::itemClicked(QListViewItem *item) +void AnnotateView::itemClicked(TQListViewItem *item) { kdDebug(9006) << "itemClicked()" << endl; diff --git a/vcs/cvsservice/annotateview.h b/vcs/cvsservice/annotateview.h index 6c9cded9..4e05930b 100644 --- a/vcs/cvsservice/annotateview.h +++ b/vcs/cvsservice/annotateview.h @@ -18,7 +18,7 @@ #include <klistview.h> -#include <qtooltip.h> +#include <tqtooltip.h> class QDateTime; class AnnotatePage; @@ -38,17 +38,17 @@ public: explicit AnnotateView(AnnotatePage *parent, const char *name=0 ); - void addLine(QString rev, QString author, QDateTime date, QString content, - QString comment, bool odd); + void addLine(TQString rev, TQString author, TQDateTime date, TQString content, + TQString comment, bool odd); - virtual QSize sizeHint() const; - void maybeTip( const QPoint & p ); + virtual TQSize sizeHint() const; + void maybeTip( const TQPoint & p ); private: AnnotatePage * m_page; public slots: - void itemClicked(QListViewItem *item); + void itemClicked(TQListViewItem *item); }; diff --git a/vcs/cvsservice/bufferedstringreader.cpp b/vcs/cvsservice/bufferedstringreader.cpp index 5c2151fc..bdaa26f3 100644 --- a/vcs/cvsservice/bufferedstringreader.cpp +++ b/vcs/cvsservice/bufferedstringreader.cpp @@ -27,16 +27,16 @@ BufferedStringReader::~BufferedStringReader() /////////////////////////////////////////////////////////////////////////////// -QStringList BufferedStringReader::process( const QString &otherChars ) +TQStringList BufferedStringReader::process( const TQString &otherChars ) { // Add to previous buffered chars m_stringBuffer += otherChars; - QStringList strings; + TQStringList strings; // Now find all the basic strings in the buffer int pos; while ( (pos = m_stringBuffer.find('\n')) != -1) { - QString line = m_stringBuffer.left( pos ); + TQString line = m_stringBuffer.left( pos ); if (!line.isEmpty()) { strings.append( line ); diff --git a/vcs/cvsservice/bufferedstringreader.h b/vcs/cvsservice/bufferedstringreader.h index 1f96c0d1..6f34ed4c 100644 --- a/vcs/cvsservice/bufferedstringreader.h +++ b/vcs/cvsservice/bufferedstringreader.h @@ -12,7 +12,7 @@ #ifndef BUFFEREDSTRINGREADER_H #define BUFFEREDSTRINGREADER_H -#include <qstringlist.h> +#include <tqstringlist.h> class CvsServicePart; class KConfig; @@ -36,9 +36,9 @@ public: * as many '\n'-terminated strings as found. * @param otherChars additional chars to be added to the buffer */ - QStringList process( const QString &otherChars ); + TQStringList process( const TQString &otherChars ); private: - QString m_stringBuffer; + TQString m_stringBuffer; }; #endif // BUFFEREDSTRINGREADER_H diff --git a/vcs/cvsservice/changelog.cpp b/vcs/cvsservice/changelog.cpp index a63a2b92..1e676f43 100644 --- a/vcs/cvsservice/changelog.cpp +++ b/vcs/cvsservice/changelog.cpp @@ -9,9 +9,9 @@ * * ***************************************************************************/ -#include <qdatetime.h> -#include <qfile.h> -#include <qtextstream.h> +#include <tqdatetime.h> +#include <tqfile.h> +#include <tqtextstream.h> #include <kemailsettings.h> @@ -24,7 +24,7 @@ ChangeLogEntry::ChangeLogEntry() authorEmail = emailConfig.getSetting( KEMailSettings::EmailAddress ); authorName = emailConfig.getSetting( KEMailSettings::RealName ); - QDate currDate = QDate::currentDate(); + TQDate currDate = TQDate::currentDate(); date = currDate.toString( "yyyy-MM-dd" ); } @@ -32,38 +32,38 @@ ChangeLogEntry::~ChangeLogEntry() { } -void ChangeLogEntry::addLine( const QString &aLine ) +void ChangeLogEntry::addLine( const TQString &aLine ) { lines << aLine; } -void ChangeLogEntry::addLines( const QStringList &someLines ) +void ChangeLogEntry::addLines( const TQStringList &someLines ) { lines += someLines; } -void streamCopy( QTextStream &is, QTextStream &os ) +void streamCopy( TQTextStream &is, TQTextStream &os ) { while (!is.eof()) os << is.readLine() << "\n"; // readLine() eats '\n' !! } -void ChangeLogEntry::addToLog( const QString &logFilePath, const bool prepend, const QString &startLineString ) +void ChangeLogEntry::addToLog( const TQString &logFilePath, const bool prepend, const TQString &startLineString ) { if (prepend) // add on head { - QString fakeLogFilePath = logFilePath + ".fake"; + TQString fakeLogFilePath = logFilePath + ".fake"; - QFile fakeFile( fakeLogFilePath ); - QFile changeLogFile( logFilePath ); + TQFile fakeFile( fakeLogFilePath ); + TQFile changeLogFile( logFilePath ); { if (!fakeFile.open( IO_WriteOnly | IO_Append)) return; if (changeLogFile.open( IO_ReadOnly )) // A Changelog already exist { - QTextStream is( &changeLogFile ); - QTextStream os( &fakeFile ); + TQTextStream is( &changeLogFile ); + TQTextStream os( &fakeFile ); // Put current entry os << toString( startLineString ); @@ -72,7 +72,7 @@ void ChangeLogEntry::addToLog( const QString &logFilePath, const bool prepend, c } else // ChangeLog doesn't exist: just write our entry { - QTextStream t( &fakeFile ); + TQTextStream t( &fakeFile ); t << toString( startLineString ); } fakeFile.close(); @@ -85,8 +85,8 @@ void ChangeLogEntry::addToLog( const QString &logFilePath, const bool prepend, c if (changeLogFile.open( IO_WriteOnly )) { - QTextStream os( &changeLogFile ); - QTextStream is( &fakeFile ); + TQTextStream os( &changeLogFile ); + TQTextStream is( &fakeFile ); // Write the rest of the change log file streamCopy( is, os ); @@ -97,18 +97,18 @@ void ChangeLogEntry::addToLog( const QString &logFilePath, const bool prepend, c } else // add on tail { - QFile f( logFilePath ); + TQFile f( logFilePath ); if (!f.open( IO_WriteOnly | IO_Append)) return; - QTextStream t( &f ); + TQTextStream t( &f ); t << toString( startLineString ); } } -QString ChangeLogEntry::toString( const QString &startLineString ) const +TQString ChangeLogEntry::toString( const TQString &startLineString ) const { - QString header = date + " " + authorName + " <" + authorEmail + ">\n"; + TQString header = date + " " + authorName + " <" + authorEmail + ">\n"; return header + startLineString + lines.join( "\n" + startLineString ) + "\n\n"; } diff --git a/vcs/cvsservice/changelog.h b/vcs/cvsservice/changelog.h index 3d512f95..a1b50ffa 100644 --- a/vcs/cvsservice/changelog.h +++ b/vcs/cvsservice/changelog.h @@ -12,7 +12,7 @@ #ifndef CHANGELOG_H #define CHANGELOG_H -#include <qstringlist.h> +#include <tqstringlist.h> /** A class which abstracts the building of an entry in the ChangeLog file (it formats name, e-mail and text). @@ -26,20 +26,20 @@ public: ~ChangeLogEntry(); //! Add a single line to the lines for this entry - void addLine( const QString &aLine ); + void addLine( const TQString &aLine ); //! Add a bunch of lines for this entry - void addLines( const QStringList &someLines ); + void addLines( const TQStringList &someLines ); //! Pretty format for this entry: you may insert a line tag (such as tab ("\t") or 4 spaces (" ") //! or whatever you want (such as "\t * ") - QString toString( const QString &startLineString = QString::null ) const; + TQString toString( const TQString &startLineString = TQString::null ) const; //! Once the entry is completed one would like to write on a file! (You may add on start of file //! prepend == true, or append on tail (prepend == false) - void addToLog( const QString &logFilePath, const bool prepend = true, const QString &startLineString = "\t" ); + void addToLog( const TQString &logFilePath, const bool prepend = true, const TQString &startLineString = "\t" ); - QString authorName, + TQString authorName, authorEmail, date; - QStringList lines; + TQStringList lines; }; #endif diff --git a/vcs/cvsservice/checkoutdialog.cpp b/vcs/cvsservice/checkoutdialog.cpp index 7fb9455c..82c64052 100644 --- a/vcs/cvsservice/checkoutdialog.cpp +++ b/vcs/cvsservice/checkoutdialog.cpp @@ -9,11 +9,11 @@ * * ***************************************************************************/ -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qcombobox.h> -#include <qfile.h> -#include <qtextstream.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqcombobox.h> +#include <tqfile.h> +#include <tqtextstream.h> #include <klistview.h> #include <kurlrequester.h> @@ -38,7 +38,7 @@ // Constants /////////////////////////////////////////////////////////////////////////////// -const QString SSS( ":" ); // Server String Separator :) +const TQString SSS( ":" ); // Server String Separator :) /////////////////////////////////////////////////////////////////////////////// // class ModuleListViewItem @@ -48,19 +48,19 @@ class ModuleListViewItem : public KListViewItem { public: ModuleListViewItem( KListView *listview, - const QString &moduleAlias, const QString &moduleRealPath ) + const TQString &moduleAlias, const TQString &moduleRealPath ) : KListViewItem( listview ) { setAlias( moduleAlias ); setRealPath( moduleRealPath ); } - void setAlias( const QString &aName ) { setText( 0, aName); } - QString alias() const { return text(0); } - void setRealPath( const QString &aRealPath ) { setText(1, aRealPath); } - QString realPath() const { return text(1); } + void setAlias( const TQString &aName ) { setText( 0, aName); } + TQString alias() const { return text(0); } + void setRealPath( const TQString &aRealPath ) { setText(1, aRealPath); } + TQString realPath() const { return text(1); } -// virtual QString text() const { return name(); } +// virtual TQString text() const { return name(); } }; /////////////////////////////////////////////////////////////////////////////// @@ -68,7 +68,7 @@ public: /////////////////////////////////////////////////////////////////////////////// CheckoutDialog::CheckoutDialog( CvsService_stub *cvsService, - QWidget *parent, const char *name, WFlags ) : + TQWidget *parent, const char *name, WFlags ) : DCOPObject( "CheckoutDialogDCOPIface" ), KDialogBase( parent, name? name : "checkoutdialog", true, i18n("CVS Checkout"), Ok | Cancel, Ok, true ), @@ -77,10 +77,10 @@ CheckoutDialog::CheckoutDialog( CvsService_stub *cvsService, m_base = new CheckoutDialogBase( this, "checkoutdialogbase" ); setMainWidget( m_base ); - connect( m_base->fetchModulesButton, SIGNAL(clicked()), - this, SLOT(slotFetchModulesList()) ); - connect( m_base->modulesListView, SIGNAL(executed(QListViewItem*)), - this, SLOT(slotModuleSelected(QListViewItem*)) ); + connect( m_base->fetchModulesButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotFetchModulesList()) ); + connect( m_base->modulesListView, TQT_SIGNAL(executed(TQListViewItem*)), + this, TQT_SLOT(slotModuleSelected(TQListViewItem*)) ); // Avoid displaying 'file:/' when displaying the file m_base->workURLRequester->setShowLocalProtocol( false ); @@ -91,7 +91,7 @@ CheckoutDialog::CheckoutDialog( CvsService_stub *cvsService, // And suggest to use the default projects dir set in KDevelop's preferences KConfig *config = kapp->config(); config->setGroup("General Options"); - QString defaultProjectsDir = config->readPathEntry("DefaultProjectsDir", QDir::homeDirPath()+"/"); + TQString defaultProjectsDir = config->readPathEntry("DefaultProjectsDir", TQDir::homeDirPath()+"/"); setWorkDir( defaultProjectsDir ); } @@ -104,28 +104,28 @@ CheckoutDialog::~CheckoutDialog() /////////////////////////////////////////////////////////////////////////////// -QString CheckoutDialog::serverPath() const +TQString CheckoutDialog::serverPath() const { return m_base->serverPaths->currentText(); } /////////////////////////////////////////////////////////////////////////////// -void CheckoutDialog::fillServerPaths( const QStringList &serverPaths ) +void CheckoutDialog::fillServerPaths( const TQStringList &serverPaths ) { m_base->serverPaths->insertStringList( serverPaths ); } /////////////////////////////////////////////////////////////////////////////// -QString CheckoutDialog::workDir() const +TQString CheckoutDialog::workDir() const { return m_base->workURLRequester->url(); } /////////////////////////////////////////////////////////////////////////////// -void CheckoutDialog::setWorkDir( const QString &aDir ) +void CheckoutDialog::setWorkDir( const TQString &aDir ) { m_base->workURLRequester->setURL( aDir ); } @@ -139,14 +139,14 @@ bool CheckoutDialog::pruneDirs() const /////////////////////////////////////////////////////////////////////////////// -QString CheckoutDialog::tag() const +TQString CheckoutDialog::tag() const { return m_base->tagEdit->text(); } /////////////////////////////////////////////////////////////////////////////// -QString CheckoutDialog::module() const +TQString CheckoutDialog::module() const { return m_base->moduleEdit->text(); } @@ -168,7 +168,7 @@ void CheckoutDialog::slotFetchModulesList() // We only need to know when it finishes and then will grab the output // by using m_job->output() :-) connectDCOPSignal( job.app(), job.obj(), "jobFinished(bool,int)", "slotJobExited(bool,int)", true ); - connectDCOPSignal( job.app(), job.obj(), "receivedStdout(QString)", "receivedOutput(QString)", true ); + connectDCOPSignal( job.app(), job.obj(), "receivedStdout(TQString)", "receivedOutput(TQString)", true ); kdDebug() << "Running: " << m_job->cvsCommand() << endl; m_job->execute(); @@ -187,35 +187,35 @@ void CheckoutDialog::slotJobExited( bool /*normalExit*/, int /*exitStatus*/ ) /////////////////////////////////////////////////////////////////////////////// -void CheckoutDialog::slotReceivedOutput( QString someOutput ) +void CheckoutDialog::slotReceivedOutput( TQString someOutput ) { kdDebug( 9006 ) << " Received output: " << someOutput << endl; setCursor( KCursor::arrowCursor() ); // Fill the modules KListView if the list obtained is not empty - // QStringList modules = m_job->output(); - QStringList modules = QStringList::split( "\n", someOutput ); + // TQStringList modules = m_job->output(); + TQStringList modules = TQStringList::split( "\n", someOutput ); if (modules.count() <= 0) return; - QStringList::iterator it = modules.begin(); + TQStringList::iterator it = modules.begin(); for ( ; it != modules.end(); ++it ) { - QStringList l = QStringList::split( " ", (*it) ); + TQStringList l = TQStringList::split( " ", (*it) ); // Now, l[0] is the module name, l[1] is ... another string ;-) new ModuleListViewItem( m_base->modulesListView, l[0], l[1] ); } } -void CheckoutDialog::slotReceivedErrors( QString someErrors ) +void CheckoutDialog::slotReceivedErrors( TQString someErrors ) { kdDebug( 9006 ) << " Received errors: " << someErrors << endl; } /////////////////////////////////////////////////////////////////////////////// -void CheckoutDialog::slotModuleSelected( QListViewItem * ) +void CheckoutDialog::slotModuleSelected( TQListViewItem * ) { ModuleListViewItem *aModuleItem = static_cast<ModuleListViewItem*>( m_base->modulesListView->selectedItem() @@ -230,21 +230,21 @@ void CheckoutDialog::slotModuleSelected( QListViewItem * ) void CheckoutDialog::fetchUserCvsRepositories() { - QStringList repositories; + TQStringList repositories; - QFile cvspass( QDir::homeDirPath() + QDir::separator() + ".cvspass" ); + TQFile cvspass( TQDir::homeDirPath() + TQDir::separator() + ".cvspass" ); if (!cvspass.open( IO_ReadOnly )) return; - QByteArray data = cvspass.readAll(); + TQByteArray data = cvspass.readAll(); cvspass.close(); - QTextIStream istream( data ); + TQTextIStream istream( data ); // Entries are like: // /1 :pserver:marios@cvs.kde.org:2401/home/kde Ahz:UIK?=d ? // /1 :pserver:mario@xamel:2401/home/cvsroot aJT_d'K?=d ? while (!istream.eof()) { - QString line = istream.readLine(); - QStringList lineElements = QStringList::split( " ", line ); + TQString line = istream.readLine(); + TQStringList lineElements = TQStringList::split( " ", line ); if (lineElements.count() > 1) { repositories << lineElements[ 1 ]; } @@ -257,9 +257,9 @@ void CheckoutDialog::fetchUserCvsRepositories() void CheckoutDialog::slotOk() { - QString errorMessage = QString::null; + TQString errorMessage = TQString::null; - if (!(workDir().length() > 0) && QFile::exists( workDir() )) + if (!(workDir().length() > 0) && TQFile::exists( workDir() )) errorMessage = i18n( "Please, choose a valid working directory" ); else if (!(serverPath().length() > 0)) errorMessage = i18n( "Please, choose a CVS server." ); diff --git a/vcs/cvsservice/checkoutdialog.h b/vcs/cvsservice/checkoutdialog.h index 597a806a..a44ef397 100644 --- a/vcs/cvsservice/checkoutdialog.h +++ b/vcs/cvsservice/checkoutdialog.h @@ -31,7 +31,7 @@ class CheckoutDialog : public KDialogBase, virtual public CVSServiceDCOPIface { Q_OBJECT public: - CheckoutDialog( CvsService_stub *cvsService, QWidget *parent = 0, + CheckoutDialog( CvsService_stub *cvsService, TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); virtual ~CheckoutDialog(); @@ -40,23 +40,23 @@ public: /** * @return a server path string (i.e. :pserver:marios@cvs.kde.org:/home/kde) */ - QString serverPath() const; + TQString serverPath() const; /** * @param serverPaths a list of server location to use when filling the widget */ - void fillServerPaths( const QStringList &serverPaths ); + void fillServerPaths( const TQStringList &serverPaths ); /** * @return the directory which the user has fetched the module in */ - QString workDir() const; + TQString workDir() const; /** * @param aDir directory which fetched modules will be put in (ending with '/') */ - void setWorkDir( const QString &aDir ); + void setWorkDir( const TQString &aDir ); /** * @return the module the user has chosen to check-out from repository */ - QString module() const; + TQString module() const; /** * @return */ @@ -64,15 +64,15 @@ public: /** * @return */ - QString tag() const; + TQString tag() const; private slots: - void slotModuleSelected( QListViewItem *item ); + void slotModuleSelected( TQListViewItem *item ); void slotFetchModulesList(); // DCOP Iface virtual void slotJobExited( bool normalExit, int exitStatus ); - virtual void slotReceivedOutput( QString someOutput ); - virtual void slotReceivedErrors( QString someErrors ); + virtual void slotReceivedOutput( TQString someOutput ); + virtual void slotReceivedErrors( TQString someErrors ); private: /** diff --git a/vcs/cvsservice/commitdlg.cpp b/vcs/cvsservice/commitdlg.cpp index 4c7eac97..a3988c06 100644 --- a/vcs/cvsservice/commitdlg.cpp +++ b/vcs/cvsservice/commitdlg.cpp @@ -11,11 +11,11 @@ * * ***************************************************************************/ -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qtextedit.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqtextedit.h> +#include <tqpushbutton.h> #include <kapplication.h> #include <kbuttonbox.h> @@ -30,20 +30,20 @@ /////////////////////////////////////////////////////////////////////////////// -CommitDialog::CommitDialog( const QString &changeLogfileNamePath, QWidget *parent ) +CommitDialog::CommitDialog( const TQString &changeLogfileNamePath, TQWidget *parent ) : CommitDialogBase( parent, "commitdialog", true ) { - connect( buttonOk, SIGNAL(clicked()), SLOT(accept()) ); - connect( buttonCancel, SIGNAL(clicked()), SLOT(reject()) ); + connect( buttonOk, TQT_SIGNAL(clicked()), TQT_SLOT(accept()) ); + connect( buttonCancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject()) ); setChangeLogFileName( changeLogfileNamePath ); } /////////////////////////////////////////////////////////////////////////////// -QStringList CommitDialog::logMessage() const +TQStringList CommitDialog::logMessage() const { - QStringList textLines; + TQStringList textLines; for (int i=0; i<textEdit->paragraphs(); ++i) { textLines << textEdit->text( i ); @@ -72,19 +72,19 @@ void CommitDialog::accept() return; } } - QDialog::accept(); + TQDialog::accept(); } /////////////////////////////////////////////////////////////////////////////// -void CommitDialog::setChangeLogFileName( const QString &fileName ) +void CommitDialog::setChangeLogFileName( const TQString &fileName ) { changeLogNameEdit->setText( fileName ); } /////////////////////////////////////////////////////////////////////////////// -QString CommitDialog::changeLogFileName() const +TQString CommitDialog::changeLogFileName() const { return changeLogNameEdit->text(); } diff --git a/vcs/cvsservice/commitdlg.h b/vcs/cvsservice/commitdlg.h index 3e98b269..e7ea4396 100644 --- a/vcs/cvsservice/commitdlg.h +++ b/vcs/cvsservice/commitdlg.h @@ -14,8 +14,8 @@ #ifndef _COMMITDIALOG_H_ #define _COMMITDIALOG_H_ -//#include <qdialog.h> -#include <qstringlist.h> +//#include <tqdialog.h> +#include <tqstringlist.h> #include "commitdialogbase.h" class QTextEdit; @@ -25,17 +25,17 @@ class CommitDialog : public CommitDialogBase { Q_OBJECT public: - CommitDialog( const QString &changeLogfileNamePath, QWidget *parent = 0 ); + CommitDialog( const TQString &changeLogfileNamePath, TQWidget *parent = 0 ); //! Returns the text of the log - QStringList logMessage() const; + TQStringList logMessage() const; //! Returns true if the user requests the log message to be added to the general //! Changelog file bool mustAddToChangeLog() const; //! We need to set it when showing the dialog and then when saving the file - void setChangeLogFileName( const QString &fileName ); - QString changeLogFileName() const; + void setChangeLogFileName( const TQString &fileName ); + TQString changeLogFileName() const; protected slots: //! Override: must check for message not being void. diff --git a/vcs/cvsservice/cvsdiffpage.cpp b/vcs/cvsservice/cvsdiffpage.cpp index 12947b36..7777760a 100644 --- a/vcs/cvsservice/cvsdiffpage.cpp +++ b/vcs/cvsservice/cvsdiffpage.cpp @@ -9,11 +9,11 @@ * * ***************************************************************************/ -#include <qtextedit.h> -#include <qlayout.h> -#include <qregexp.h> -#include <qdir.h> -#include <qstringlist.h> +#include <tqtextedit.h> +#include <tqlayout.h> +#include <tqregexp.h> +#include <tqdir.h> +#include <tqstringlist.h> #include <kmessagebox.h> #include <kcursor.h> @@ -33,15 +33,15 @@ /////////////////////////////////////////////////////////////////////////////// CVSDiffPage::CVSDiffPage( CvsService_stub *cvsService, - QWidget *parent, const char *name, int ) + TQWidget *parent, const char *name, int ) // Leaving it anonymous let us to have multiple objects at the same time! : DCOPObject(), // "CVSDiffPageDCOPIface" - QWidget( parent, name? name : "logformdialog" ), + TQWidget( parent, name? name : "logformdialog" ), m_diffText( 0 ), m_cvsService( cvsService ), m_cvsDiffJob( 0 ) { - QLayout *thisLayout = new QVBoxLayout( this ); + TQLayout *thisLayout = new TQVBoxLayout( this ); // This should be replaced by the diff part -// m_diffText = new QTextEdit( this, "difftextedit" ); +// m_diffText = new TQTextEdit( this, "difftextedit" ); // m_diffText->setReadOnly( true ); m_diffText = new DiffWidget( this, "difftextedit" ); @@ -59,7 +59,7 @@ CVSDiffPage::~CVSDiffPage() /////////////////////////////////////////////////////////////////////////////// -void CVSDiffPage::startDiff( const QString &fileName, const QString &v1, const QString &v2 ) +void CVSDiffPage::startDiff( const TQString &fileName, const TQString &v1, const TQString &v2 ) { kdDebug(9006) << "CVSDiffPage::startDiff()" << endl; @@ -75,7 +75,7 @@ void CVSDiffPage::startDiff( const QString &fileName, const QString &v1, const Q kdDebug(9006) << "Running command : " << m_cvsDiffJob->cvsCommand() << endl; connectDCOPSignal( job.app(), job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true ); - connectDCOPSignal( job.app(), job.obj(), "receivedStdout(QString)", "slotReceivedOutput(QString)", true ); + connectDCOPSignal( job.app(), job.obj(), "receivedStdout(TQString)", "slotReceivedOutput(TQString)", true ); bool success = m_cvsDiffJob->execute(); if (!success) { @@ -91,7 +91,7 @@ void CVSDiffPage::slotJobExited( bool normalExit, int /*exitStatus*/ ) if (normalExit) { - QString diffText = m_cvsDiffJob->output().join( "\n" ); + TQString diffText = m_cvsDiffJob->output().join( "\n" ); kdDebug(9006) << "*** Received: " << diffText << endl; // m_diffText->setText( diffText ); m_diffText->setDiff( m_diffString ); @@ -104,20 +104,20 @@ void CVSDiffPage::slotJobExited( bool normalExit, int /*exitStatus*/ ) /////////////////////////////////////////////////////////////////////////////// -void CVSDiffPage::slotReceivedOutput( QString someOutput ) +void CVSDiffPage::slotReceivedOutput( TQString someOutput ) { - kdDebug(9006) << "CVSDiffPage::slotReceivedOutput(QString)" << endl; + kdDebug(9006) << "CVSDiffPage::slotReceivedOutput(TQString)" << endl; kdDebug(9006) << "OUTPUT: " << someOutput << endl; - QStringList strings = m_outputBuffer.process(someOutput); + TQStringList strings = m_outputBuffer.process(someOutput); m_diffString += strings.join("\n"); } /////////////////////////////////////////////////////////////////////////////// -void CVSDiffPage::slotReceivedErrors( QString someErrors ) +void CVSDiffPage::slotReceivedErrors( TQString someErrors ) { - kdDebug(9006) << "CVSDiffPage::slotReceivedErrors(QString)" << endl; + kdDebug(9006) << "CVSDiffPage::slotReceivedErrors(TQString)" << endl; kdDebug(9006) << "ERRORS: " << someErrors << endl; } diff --git a/vcs/cvsservice/cvsdiffpage.h b/vcs/cvsservice/cvsdiffpage.h index 16a6fec6..d9bbf36d 100644 --- a/vcs/cvsservice/cvsdiffpage.h +++ b/vcs/cvsservice/cvsdiffpage.h @@ -13,7 +13,7 @@ #define CVSDIFFPAGE_H #include "cvsservicedcopIface.h" -#include <qwidget.h> +#include <tqwidget.h> #include "bufferedstringreader.h" class CvsJob_stub; @@ -26,27 +26,27 @@ Implementation for the form displaying 'cvs diff' output. @author KDevelop Authors */ -class CVSDiffPage : public QWidget, virtual public CVSServiceDCOPIface +class CVSDiffPage : public TQWidget, virtual public CVSServiceDCOPIface { Q_OBJECT public: - CVSDiffPage( CvsService_stub *cvsService, QWidget *parent=0, const char *name=0, int flags=0 ); + CVSDiffPage( CvsService_stub *cvsService, TQWidget *parent=0, const char *name=0, int flags=0 ); virtual ~CVSDiffPage(); - void startDiff( const QString &fileName, const QString &v1, const QString &v2 ); + void startDiff( const TQString &fileName, const TQString &v1, const TQString &v2 ); void cancel(); //private slots: // DCOP Iface virtual void slotJobExited( bool normalExit, int exitStatus ); - virtual void slotReceivedOutput( QString someOutput ); - virtual void slotReceivedErrors( QString someErrors ); + virtual void slotReceivedOutput( TQString someOutput ); + virtual void slotReceivedErrors( TQString someErrors ); private: - //QTextEdit *m_diffText; + //TQTextEdit *m_diffText; DiffWidget *m_diffText; BufferedStringReader m_outputBuffer; - QString m_diffString; + TQString m_diffString; CvsService_stub *m_cvsService; CvsJob_stub *m_cvsDiffJob; diff --git a/vcs/cvsservice/cvsdir.cpp b/vcs/cvsservice/cvsdir.cpp index 2b7602e6..28a4b566 100644 --- a/vcs/cvsservice/cvsdir.cpp +++ b/vcs/cvsservice/cvsdir.cpp @@ -9,8 +9,8 @@ * * ***************************************************************************/ -#include <qfile.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqtextstream.h> #include "cvsdir.h" @@ -18,19 +18,19 @@ // class CVSDir /////////////////////////////////////////////////////////////////////////////// -CVSDir::CVSDir() : QDir() +CVSDir::CVSDir() : TQDir() { } /////////////////////////////////////////////////////////////////////////////// -CVSDir::CVSDir( const QDir &dir ) - : QDir( dir ) +CVSDir::CVSDir( const TQDir &dir ) + : TQDir( dir ) { // We deal with absolute paths only convertToAbs(); - m_cvsDir = absPath() + QDir::separator() + "CVS"; + m_cvsDir = absPath() + TQDir::separator() + "CVS"; if (isValid()) refreshEntriesCache(); @@ -39,7 +39,7 @@ CVSDir::CVSDir( const QDir &dir ) /////////////////////////////////////////////////////////////////////////////// CVSDir::CVSDir( const CVSDir &aCvsDir ) - : QDir( aCvsDir ) + : TQDir( aCvsDir ) { *this = aCvsDir; } @@ -50,7 +50,7 @@ CVSDir &CVSDir::operator=( const CVSDir &aCvsDir ) { m_cvsDir = aCvsDir.m_cvsDir; m_cachedEntries = aCvsDir.m_cachedEntries; - QDir::operator=( aCvsDir ); + TQDir::operator=( aCvsDir ); return *this; } @@ -66,54 +66,54 @@ CVSDir::~CVSDir() bool CVSDir::isValid() const { return exists() && - QFile::exists( entriesFileName() ) && - QFile::exists( rootFileName() ) && - QFile::exists( repoFileName() ); + TQFile::exists( entriesFileName() ) && + TQFile::exists( rootFileName() ) && + TQFile::exists( repoFileName() ); } /////////////////////////////////////////////////////////////////////////////// -QString CVSDir::entriesFileName() const +TQString CVSDir::entriesFileName() const { - return m_cvsDir + QDir::separator() + "Entries"; + return m_cvsDir + TQDir::separator() + "Entries"; } /////////////////////////////////////////////////////////////////////////////// -QString CVSDir::rootFileName() const +TQString CVSDir::rootFileName() const { - return m_cvsDir + QDir::separator() + "Root"; + return m_cvsDir + TQDir::separator() + "Root"; } /////////////////////////////////////////////////////////////////////////////// -QString CVSDir::repoFileName() const +TQString CVSDir::repoFileName() const { - return m_cvsDir + QDir::separator() + "Repository"; + return m_cvsDir + TQDir::separator() + "Repository"; } /////////////////////////////////////////////////////////////////////////////// -QString CVSDir::cvsIgnoreFileName() const +TQString CVSDir::cvsIgnoreFileName() const { - return absPath() + QDir::separator() + ".cvsignore"; + return absPath() + TQDir::separator() + ".cvsignore"; } /////////////////////////////////////////////////////////////////////////////// -QString CVSDir::repository() const +TQString CVSDir::repository() const { // The content of CVS/Repository is a single line with the path into the // repository of the modules checked out in this directory (just like // "kdevelop/parts/cvsservice"): so we can read a single line of the file // and we are done! - QString content; + TQString content; if (!isValid()) - return QString::null; + return TQString::null; - QByteArray bytes = cacheFile( repoFileName() ); - QTextStream t( bytes, IO_ReadOnly ); + TQByteArray bytes = cacheFile( repoFileName() ); + TQTextStream t( bytes, IO_ReadOnly ); content += t.readLine(); return content; @@ -121,18 +121,18 @@ QString CVSDir::repository() const /////////////////////////////////////////////////////////////////////////////// -QString CVSDir::root() const +TQString CVSDir::root() const { // Same as CVSDir::repository() but CVS/Root contains the path of the // CVS server as used in "cvs -d <server-path>" (in example: // ":pserver:marios@cvs.kde.org:/home/kde") - QString content; + TQString content; if (!isValid()) - return QString::null; + return TQString::null; - QByteArray bytes = cacheFile( repoFileName() ); - QTextStream t( bytes, IO_ReadOnly ); + TQByteArray bytes = cacheFile( repoFileName() ); + TQTextStream t( bytes, IO_ReadOnly ); content += t.readLine(); return content; @@ -140,28 +140,28 @@ QString CVSDir::root() const /////////////////////////////////////////////////////////////////////////////// -QByteArray CVSDir::cacheFile( const QString &fileName ) +TQByteArray CVSDir::cacheFile( const TQString &fileName ) { - QFile f( fileName ); + TQFile f( fileName ); if (!f.open( IO_ReadOnly )) - return QByteArray(); + return TQByteArray(); return f.readAll(); } /////////////////////////////////////////////////////////////////////////////// -QStringList CVSDir::registeredEntryList() const +TQStringList CVSDir::registeredEntryList() const { - QStringList l; + TQStringList l; if (!isValid()) return l; - QByteArray bytes = cacheFile( entriesFileName() ); - QTextStream t( bytes, IO_ReadOnly ); + TQByteArray bytes = cacheFile( entriesFileName() ); + TQTextStream t( bytes, IO_ReadOnly ); CVSEntry entry; while (!t.eof()) { - QString line = t.readLine(); + TQString line = t.readLine(); entry.parse( line, *this ); if (entry.isValid()) l.append( entry.fileName() ); @@ -171,7 +171,7 @@ QStringList CVSDir::registeredEntryList() const /////////////////////////////////////////////////////////////////////////////// -bool CVSDir::isRegistered( const QString fileName ) const +bool CVSDir::isRegistered( const TQString fileName ) const { CVSEntry entry = fileStatus( fileName ); return entry.isValid() && entry.fileName() == fileName; @@ -183,12 +183,12 @@ void CVSDir::refreshEntriesCache() const { m_cachedEntries.clear(); - QByteArray bytes = cacheFile( entriesFileName() ); - QTextStream t( bytes, IO_ReadOnly ); + TQByteArray bytes = cacheFile( entriesFileName() ); + TQTextStream t( bytes, IO_ReadOnly ); CVSEntry entry; while (!t.eof()) { - QString line = t.readLine(); + TQString line = t.readLine(); entry.parse( line, *this ); if (entry.isValid()) m_cachedEntries[ entry.fileName() ] = entry; @@ -197,7 +197,7 @@ void CVSDir::refreshEntriesCache() const /////////////////////////////////////////////////////////////////////////////// -CVSEntry CVSDir::fileStatus( const QString &fileName, bool refreshCache ) const +CVSEntry CVSDir::fileStatus( const TQString &fileName, bool refreshCache ) const { if (refreshCache) refreshEntriesCache(); @@ -212,19 +212,19 @@ CVSEntry CVSDir::fileStatus( const QString &fileName, bool refreshCache ) const /////////////////////////////////////////////////////////////////////////////// -void CVSDir::ignoreFile( const QString &fileName ) +void CVSDir::ignoreFile( const TQString &fileName ) { if (!isValid()) return; - QFile f( cvsIgnoreFileName() ); + TQFile f( cvsIgnoreFileName() ); if (!f.open( IO_ReadOnly)) return; - QByteArray cachedFile = f.readAll(); - QTextStream t( cachedFile, IO_ReadOnly | IO_WriteOnly ); + TQByteArray cachedFile = f.readAll(); + TQTextStream t( cachedFile, IO_ReadOnly | IO_WriteOnly ); - QString readFileName; + TQString readFileName; bool found = false; while (!t.eof() && !found) @@ -247,28 +247,28 @@ void CVSDir::ignoreFile( const QString &fileName ) /////////////////////////////////////////////////////////////////////////////// -void CVSDir::doNotIgnoreFile( const QString &fileName ) +void CVSDir::doNotIgnoreFile( const TQString &fileName ) { if (!isValid()) return; // 1. Read all .ignore file in memory - QFile f( cvsIgnoreFileName() ); + TQFile f( cvsIgnoreFileName() ); if (!f.open( IO_ReadOnly )) return; // No .cvsignore file? Nothing to do then! - QByteArray cachedFile = f.readAll(); - QTextIStream is( cachedFile ); + TQByteArray cachedFile = f.readAll(); + TQTextIStream is( cachedFile ); - QByteArray cachedOutputFile; - QTextOStream os( cachedOutputFile ); + TQByteArray cachedOutputFile; + TQTextOStream os( cachedOutputFile ); bool removed = false; while (!is.eof()) { - QString readLine = is.readLine(); + TQString readLine = is.readLine(); if (readLine != fileName) - os << readLine << "\n"; // QTextStream::readLine() eats the "\n" ... + os << readLine << "\n"; // TQTextStream::readLine() eats the "\n" ... else removed = true; } @@ -288,11 +288,11 @@ VCSFileInfoMap CVSDir::dirStatus() const { VCSFileInfoMap vcsInfo; /// Convert to VCSFileInfoMap: \FIXME : any speed improvement here? - QStringList entries = registeredEntryList(); - QStringList::const_iterator it = entries.begin(), end = entries.end(); + TQStringList entries = registeredEntryList(); + TQStringList::const_iterator it = entries.begin(), end = entries.end(); for ( ; it != end; ++it) { - const QString &fileName = (*it); + const TQString &fileName = (*it); const CVSEntry entry = fileStatus( fileName ); vcsInfo.insert( fileName, entry.toVCSFileInfo() ); @@ -307,11 +307,11 @@ VCSFileInfoMap *CVSDir::cacheableDirStatus() const { VCSFileInfoMap *vcsInfo = new VCSFileInfoMap; /// Convert to VCSFileInfoMap: \FIXME : any speed improvement here? - QStringList entries = registeredEntryList(); - QStringList::const_iterator it = entries.begin(), end = entries.end(); + TQStringList entries = registeredEntryList(); + TQStringList::const_iterator it = entries.begin(), end = entries.end(); for ( ; it != end; ++it) { - const QString &fileName = (*it); + const TQString &fileName = (*it); const CVSEntry entry = fileStatus( fileName ); vcsInfo->insert( fileName, entry.toVCSFileInfo() ); diff --git a/vcs/cvsservice/cvsdir.h b/vcs/cvsservice/cvsdir.h index 606f7507..bd745d3e 100644 --- a/vcs/cvsservice/cvsdir.h +++ b/vcs/cvsservice/cvsdir.h @@ -12,9 +12,9 @@ #ifndef CVSDIR_H #define CVSDIR_H -#include <qdir.h> -#include <qstringlist.h> -#include <qmap.h> +#include <tqdir.h> +#include <tqstringlist.h> +#include <tqmap.h> #include "cvsentry.h" @@ -27,7 +27,7 @@ class CVSDir : public QDir { public: CVSDir(); - CVSDir( const QDir &dir ); + CVSDir( const TQDir &dir ); explicit CVSDir( const CVSDir & ); CVSDir &operator=( const CVSDir & ); virtual ~CVSDir(); @@ -40,13 +40,13 @@ public: /** * Returns a list of all the files registered into repository */ - QStringList registeredEntryList() const; + TQStringList registeredEntryList() const; /** * @param fileName is the file name (with no path info, just the file name!) * @param refreshCache update internal cache re-parsing "<dirPath>/CVS/Entries" * @return an empty CVSEntry if the file is not present */ - CVSEntry fileStatus( const QString &fileName, bool refreshCache = false ) const; + CVSEntry fileStatus( const TQString &fileName, bool refreshCache = false ) const; /** */ VCSFileInfoMap dirStatus() const; @@ -54,49 +54,49 @@ public: /** * @return true if the file is registered into repository, false otherwise */ - bool isRegistered( const QString fileName ) const; + bool isRegistered( const TQString fileName ) const; /** * Check if the specified @p fileName is in "<CVSDIR>/.cvsignore" and, if not, * append it. */ - void ignoreFile( const QString &fileName ); + void ignoreFile( const TQString &fileName ); /** * Check if the specified @p fileName is in "<CVSDIR>/.cvsignore" and, if yes, * remove it. */ - void doNotIgnoreFile( const QString &fileName ); + void doNotIgnoreFile( const TQString &fileName ); /** * @return the content of "<CVSDIR>/CVS/Repository" */ - QString repository() const; + TQString repository() const; /** * @return the content of "<CVSDIR>/CVS/Root" */ - QString root() const; + TQString root() const; /** * @return full path of "<this-dir>/CVS/Entries" */ - QString entriesFileName() const; + TQString entriesFileName() const; /** * @return full path of "<this-dir>/CVS/Root" */ - QString rootFileName() const; + TQString rootFileName() const; /** * @return full path of "<this-dir>/CVS/Repository" */ - QString repoFileName() const; + TQString repoFileName() const; /** * @return full path of "<this-dir>/.cvsignore" */ - QString cvsIgnoreFileName() const; + TQString cvsIgnoreFileName() const; private: void refreshEntriesCache() const; - static QByteArray cacheFile( const QString &fileName ); + static TQByteArray cacheFile( const TQString &fileName ); - QString m_cvsDir; + TQString m_cvsDir; - typedef QMap<QString,CVSEntry> CVSEntriesCacheMap; + typedef TQMap<TQString,CVSEntry> CVSEntriesCacheMap; mutable CVSEntriesCacheMap m_cachedEntries; }; diff --git a/vcs/cvsservice/cvsentry.cpp b/vcs/cvsservice/cvsentry.cpp index ab8b2cc0..5db9710e 100644 --- a/vcs/cvsservice/cvsentry.cpp +++ b/vcs/cvsservice/cvsentry.cpp @@ -9,8 +9,8 @@ * * ***************************************************************************/ -#include <qfile.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqtextstream.h> #include "cvsentry.h" #include "cvsdir.h" @@ -19,10 +19,10 @@ // Static /////////////////////////////////////////////////////////////////////////////// -const QString CVSEntry::invalidMarker = "<Invalid entry>"; -const QString CVSEntry::directoryMarker = "D"; -const QString CVSEntry::fileMarker = ""; -const QString CVSEntry::entrySeparator = "/"; +const TQString CVSEntry::invalidMarker = "<Invalid entry>"; +const TQString CVSEntry::directoryMarker = "D"; +const TQString CVSEntry::fileMarker = ""; +const TQString CVSEntry::entrySeparator = "/"; /////////////////////////////////////////////////////////////////////////////// // class CVSEntry @@ -35,7 +35,7 @@ CVSEntry::CVSEntry() /////////////////////////////////////////////////////////////////////////////// -CVSEntry::CVSEntry( const QString &aLine, const CVSDir& dir ) +CVSEntry::CVSEntry( const TQString &aLine, const CVSDir& dir ) { parse( aLine, dir ); } @@ -57,11 +57,11 @@ CVSEntry::EntryType CVSEntry::type() const /////////////////////////////////////////////////////////////////////////////// -void CVSEntry::parse( const QString &aLine, const CVSDir& dir ) +void CVSEntry::parse( const TQString &aLine, const CVSDir& dir ) { clean(); - m_fields = QStringList::split( "/", aLine ); + m_fields = TQStringList::split( "/", aLine ); if (aLine.startsWith( entrySeparator )) // Is a file? { @@ -70,7 +70,7 @@ void CVSEntry::parse( const QString &aLine, const CVSDir& dir ) else if (aLine.startsWith( directoryMarker )) // Must be a directory then { m_type = directoryEntry; // Is a directory - m_fields.pop_front(); // QStringList::split() fills and empty item in head + m_fields.pop_front(); // TQStringList::split() fills and empty item in head return; } else // What the hell is this? >:-) @@ -80,9 +80,9 @@ void CVSEntry::parse( const QString &aLine, const CVSDir& dir ) } //if we're a file, keep going - QDateTime entryFileDate(QDateTime::fromString(timeStamp())); - QDateTime realFileDate; - QFileInfo info(dir, m_fields[0]); + TQDateTime entryFileDate(TQDateTime::fromString(timeStamp())); + TQDateTime realFileDate; + TQFileInfo info(dir, m_fields[0]); realFileDate = info.lastModified(); m_state = UpToDate; @@ -95,9 +95,9 @@ void CVSEntry::parse( const QString &aLine, const CVSDir& dir ) m_state = Conflict; else { - QDateTime date( QDateTime::fromString( timeStamp() ) ); - QDateTime fileDateUTC; - fileDateUTC.setTime_t( QFileInfo(dir, fileName()).lastModified().toTime_t(), Qt::UTC ); + TQDateTime date( TQDateTime::fromString( timeStamp() ) ); + TQDateTime fileDateUTC; + fileDateUTC.setTime_t( TQFileInfo(dir, fileName()).lastModified().toTime_t(), Qt::UTC ); if ( date != fileDateUTC ) m_state = Modified; } @@ -105,52 +105,52 @@ void CVSEntry::parse( const QString &aLine, const CVSDir& dir ) /////////////////////////////////////////////////////////////////////////////// -QString CVSEntry::fileName() const +TQString CVSEntry::fileName() const { if (type() != invalidEntry && m_fields.count() >= 1) return m_fields[0]; else - return QString::null; + return TQString::null; } /////////////////////////////////////////////////////////////////////////////// -QString CVSEntry::revision() const +TQString CVSEntry::revision() const { if (type() != invalidEntry && m_fields.count() >= 2) return m_fields[1]; else - return QString::null; + return TQString::null; } /////////////////////////////////////////////////////////////////////////////// -QString CVSEntry::timeStamp() const +TQString CVSEntry::timeStamp() const { if (type() != invalidEntry && m_fields.count() >= 3) return m_fields[2]; else - return QString::null; + return TQString::null; } /////////////////////////////////////////////////////////////////////////////// -QString CVSEntry::options() const +TQString CVSEntry::options() const { if (type() != invalidEntry && m_fields.count() >= 4) return m_fields[3]; else - return QString::null; + return TQString::null; } /////////////////////////////////////////////////////////////////////////////// -QString CVSEntry::tag() const +TQString CVSEntry::tag() const { if (type() != invalidEntry && m_fields.count() >= 5) return m_fields[4]; else - return QString::null; + return TQString::null; } /////////////////////////////////////////////////////////////////////////////// diff --git a/vcs/cvsservice/cvsentry.h b/vcs/cvsservice/cvsentry.h index 1c3db926..9a2e4d6d 100644 --- a/vcs/cvsservice/cvsentry.h +++ b/vcs/cvsservice/cvsentry.h @@ -13,8 +13,8 @@ #ifndef CVSENTRY_H #define CVSENTRY_H -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <kdevversioncontrol.h> class CVSDir; @@ -25,32 +25,32 @@ public: enum EntryType { invalidEntry, fileEntry, directoryEntry }; enum FileState { UpToDate, Modified, Added, Conflict, Removed, Unknown }; - static const QString invalidMarker; - static const QString directoryMarker; - static const QString fileMarker; - static const QString entrySeparator; + static const TQString invalidMarker; + static const TQString directoryMarker; + static const TQString fileMarker; + static const TQString entrySeparator; CVSEntry(); - CVSEntry( const QString &aLine, const CVSDir& dir ); + CVSEntry( const TQString &aLine, const CVSDir& dir ); void clean(); - void parse( const QString &aLine, const CVSDir& dir ); + void parse( const TQString &aLine, const CVSDir& dir ); VCSFileInfo toVCSFileInfo() const; bool isValid() const { return type() != invalidEntry; } bool isDirectory() const { return type() == directoryEntry; } EntryType type() const; FileState state() const; - QString fileName() const; - QString revision() const; - QString timeStamp() const; - QString options() const; - QString tag() const; + TQString fileName() const; + TQString revision() const; + TQString timeStamp() const; + TQString options() const; + TQString tag() const; private: EntryType m_type; FileState m_state; - QStringList m_fields; + TQStringList m_fields; }; #endif diff --git a/vcs/cvsservice/cvsfileinfoprovider.cpp b/vcs/cvsservice/cvsfileinfoprovider.cpp index 1ac5bd76..cbfc726f 100644 --- a/vcs/cvsservice/cvsfileinfoprovider.cpp +++ b/vcs/cvsservice/cvsfileinfoprovider.cpp @@ -9,8 +9,8 @@ * * ***************************************************************************/ -#include <qregexp.h> -#include <qtimer.h> +#include <tqregexp.h> +#include <tqtimer.h> #include <kurl.h> #include <kdebug.h> @@ -35,7 +35,7 @@ CVSFileInfoProvider::CVSFileInfoProvider( CvsServicePart *parent, CvsService_stu : KDevVCSFileInfoProvider( parent, "cvsfileinfoprovider" ), m_requestStatusJob( 0 ), m_cvsService( cvsService ), m_cachedDirEntries( 0 ) { - connect( this, SIGNAL(needStatusUpdate(const CVSDir&)), this, SLOT(updateStatusFor(const CVSDir&))); + connect( this, TQT_SIGNAL(needStatusUpdate(const CVSDir&)), this, TQT_SLOT(updateStatusFor(const CVSDir&))); } /////////////////////////////////////////////////////////////////////////////// @@ -50,14 +50,14 @@ CVSFileInfoProvider::~CVSFileInfoProvider() /////////////////////////////////////////////////////////////////////////////// -const VCSFileInfoMap *CVSFileInfoProvider::status( const QString &dirPath ) +const VCSFileInfoMap *CVSFileInfoProvider::status( const TQString &dirPath ) { // Same dir: we can do with cache ... if (dirPath != m_previousDirPath) { // ... different dir: flush old cache and cache new dir delete m_cachedDirEntries; - CVSDir cvsdir( projectDirectory() + QDir::separator() + dirPath ); + CVSDir cvsdir( projectDirectory() + TQDir::separator() + dirPath ); m_previousDirPath = dirPath; m_cachedDirEntries = cvsdir.cacheableDirStatus(); } @@ -66,7 +66,7 @@ const VCSFileInfoMap *CVSFileInfoProvider::status( const QString &dirPath ) /////////////////////////////////////////////////////////////////////////////// -bool CVSFileInfoProvider::requestStatus( const QString &dirPath, void *callerData, bool recursive, bool checkRepos ) +bool CVSFileInfoProvider::requestStatus( const TQString &dirPath, void *callerData, bool recursive, bool checkRepos ) { m_savedCallerData = callerData; if (m_requestStatusJob) @@ -85,7 +85,7 @@ bool CVSFileInfoProvider::requestStatus( const QString &dirPath, void *callerDat if (!checkRepos) { kdDebug(9006) << "No repo check reqested; Just read CVS/Entries from: " << dirPath << endl; - QDir qd(projectDirectory()+QDir::separator()+dirPath); + TQDir qd(projectDirectory()+TQDir::separator()+dirPath); CVSDir cdir(qd); if (cdir.isValid()) { @@ -100,7 +100,7 @@ bool CVSFileInfoProvider::requestStatus( const QString &dirPath, void *callerDat // When "cvs status" get's called nonrecursiv for a directory, it will // not print anything if the path ends with a slash. So we need to ensure // this here. - QString newPath = dirPath; + TQString newPath = dirPath; if (newPath.endsWith("/")) newPath.truncate( newPath.length()-1 ); @@ -111,11 +111,11 @@ bool CVSFileInfoProvider::requestStatus( const QString &dirPath, void *callerDat kdDebug(9006) << "Running command : " << m_requestStatusJob->cvsCommand() << endl; connectDCOPSignal( job.app(), job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true ); - connectDCOPSignal( job.app(), job.obj(), "receivedStdout(QString)", "slotReceivedOutput(QString)", true ); + connectDCOPSignal( job.app(), job.obj(), "receivedStdout(TQString)", "slotReceivedOutput(TQString)", true ); return m_requestStatusJob->execute(); /* kdDebug(9006) << k_funcinfo << "Attempting to parse " << dirPath << " using CVS/Entries" << endl; - QDir qd(dirPath); + TQDir qd(dirPath); CVSDir cdir(qd); if (cdir.isValid()) { @@ -146,7 +146,7 @@ void CVSFileInfoProvider::updateStatusFor(const CVSDir& dir) * item conains any childs. Therefor we need to give FileTree some time * to update the directory item before we give the status infos. */ - QTimer::singleShot( 1000, this, SLOT(propagateUpdate()) ); + TQTimer::singleShot( 1000, this, TQT_SLOT(propagateUpdate()) ); } /////////////////////////////////////////////////////////////////////////////// @@ -167,9 +167,9 @@ void CVSFileInfoProvider::slotJobExited( bool normalExit, int /*exitStatus*/ ) /////////////////////////////////////////////////////////////////////////////// -void CVSFileInfoProvider::slotReceivedOutput( QString someOutput ) +void CVSFileInfoProvider::slotReceivedOutput( TQString someOutput ) { - QStringList strings = m_bufferedReader.process( someOutput ); + TQStringList strings = m_bufferedReader.process( someOutput ); if (strings.count() > 0) { m_statusLines += strings; @@ -178,32 +178,32 @@ void CVSFileInfoProvider::slotReceivedOutput( QString someOutput ) /////////////////////////////////////////////////////////////////////////////// -void CVSFileInfoProvider::slotReceivedErrors( QString /*someErrors*/ ) +void CVSFileInfoProvider::slotReceivedErrors( TQString /*someErrors*/ ) { /* Nothing to do */ } /////////////////////////////////////////////////////////////////////////////// -QString CVSFileInfoProvider::projectDirectory() const +TQString CVSFileInfoProvider::projectDirectory() const { return owner()->project()->projectDirectory(); } /////////////////////////////////////////////////////////////////////////////// -VCSFileInfoMap *CVSFileInfoProvider::parse( QStringList stringStream ) +VCSFileInfoMap *CVSFileInfoProvider::parse( TQStringList stringStream ) { - QRegExp rx_recordStart( "^=+$" ); - QRegExp rx_fileName( "^File: (\\.|\\-|\\w)+" ); - QRegExp rx_fileStatus( "Status: (\\.|-|\\s|\\w)+" ); - QRegExp rx_fileWorkRev( "\\bWorking revision:" ); - QRegExp rx_fileRepoRev( "\\bRepository revision:" ); - //QRegExp rx_stickyTag( "\\s+(Sticky Tag:\\W+(w+|\\(none\\)))" ); - //QRegExp rx_stickyDate( "" ); // @todo but are they useful?? :-/ - //QRegExp rx_stickyOptions( "" ); //@todo - - QString fileName, + TQRegExp rx_recordStart( "^=+$" ); + TQRegExp rx_fileName( "^File: (\\.|\\-|\\w)+" ); + TQRegExp rx_fileStatus( "Status: (\\.|-|\\s|\\w)+" ); + TQRegExp rx_fileWorkRev( "\\bWorking revision:" ); + TQRegExp rx_fileRepoRev( "\\bRepository revision:" ); + //TQRegExp rx_stickyTag( "\\s+(Sticky Tag:\\W+(w+|\\(none\\)))" ); + //TQRegExp rx_stickyDate( "" ); // @todo but are they useful?? :-/ + //TQRegExp rx_stickyOptions( "" ); //@todo + + TQString fileName, fileStatus, workingRevision, repositoryRevision, @@ -217,9 +217,9 @@ VCSFileInfoMap *CVSFileInfoProvider::parse( QStringList stringStream ) const int lastAcceptableState = 4; // This is where the dirty parsing is done: from a string stream representing the // 'cvs log' output we build a map with more useful strunctured data ;-) - for (QStringList::const_iterator it=stringStream.begin(); it != stringStream.end(); ++it) + for (TQStringList::const_iterator it=stringStream.begin(); it != stringStream.end(); ++it) { - QString s = (*it).stripWhiteSpace(); + TQString s = (*it).stripWhiteSpace(); kdDebug(9006) << ">> Parsing: " << s << endl; if (rx_recordStart.exactMatch( s )) @@ -235,7 +235,7 @@ VCSFileInfoMap *CVSFileInfoProvider::parse( QStringList stringStream ) { workingRevision = s.replace( "Working revision:", "" ).stripWhiteSpace(); - QRegExp rx_revision( "\\b(((\\d)+\\.?)*|New file!)" ); + TQRegExp rx_revision( "\\b(((\\d)+\\.?)*|New file!)" ); if (rx_revision.search( workingRevision ) >= 0) { workingRevision = rx_revision.cap(); @@ -247,7 +247,7 @@ VCSFileInfoMap *CVSFileInfoProvider::parse( QStringList stringStream ) { repositoryRevision = s.replace( "Repository revision:", "" ).stripWhiteSpace(); - QRegExp rx_revision( "\\b(((\\d)+\\.?)*|No revision control file)" ); + TQRegExp rx_revision( "\\b(((\\d)+\\.?)*|No revision control file)" ); if (rx_revision.search( s ) >= 0) { repositoryRevision = rx_revision.cap(); @@ -276,11 +276,11 @@ VCSFileInfoMap *CVSFileInfoProvider::parse( QStringList stringStream ) /////////////////////////////////////////////////////////////////////////////// -VCSFileInfo::FileState CVSFileInfoProvider::String2EnumState( QString stateAsString ) +VCSFileInfo::FileState CVSFileInfoProvider::String2EnumState( TQString stateAsString ) { // @todo add more status as "Conflict" and "Sticky" (but I dunno how CVS writes it so I'm going // to await until I have a conflict or somebody else fix it ;-) - // @todo use QRegExp for better matching since it seems strings have changed between CVS releases :-( + // @todo use TQRegExp for better matching since it seems strings have changed between CVS releases :-( // @todo a new state for 'Needs patch' if (stateAsString == "Up-to-date") return VCSFileInfo::Uptodate; diff --git a/vcs/cvsservice/cvsfileinfoprovider.h b/vcs/cvsservice/cvsfileinfoprovider.h index 2c0b5cf1..9b80dc8e 100644 --- a/vcs/cvsservice/cvsfileinfoprovider.h +++ b/vcs/cvsservice/cvsfileinfoprovider.h @@ -12,7 +12,7 @@ #ifndef CVSFILEINFOPROVIDER_H #define CVSFILEINFOPROVIDER_H -#include <qmap.h> +#include <tqmap.h> #include <kdevversioncontrol.h> #include "cvsservicedcopIface.h" @@ -36,10 +36,10 @@ public: virtual ~CVSFileInfoProvider(); // -- Sync interface - virtual const VCSFileInfoMap *status( const QString &dirPath ) ; + virtual const VCSFileInfoMap *status( const TQString &dirPath ) ; // -- Async interface for requesting data - virtual bool requestStatus( const QString &dirPath, void *callerData, bool recursive = true, bool checkRepos = true ); + virtual bool requestStatus( const TQString &dirPath, void *callerData, bool recursive = true, bool checkRepos = true ); public slots: void updateStatusFor( const CVSDir& ); @@ -52,26 +52,26 @@ signals: private: // DCOP Iface virtual void slotJobExited( bool normalExit, int exitStatus ); - virtual void slotReceivedOutput( QString someOutput ); - virtual void slotReceivedErrors( QString someErrors ); + virtual void slotReceivedOutput( TQString someOutput ); + virtual void slotReceivedErrors( TQString someErrors ); - QString projectDirectory() const; + TQString projectDirectory() const; - static VCSFileInfoMap *parse( QStringList stringStream ); + static VCSFileInfoMap *parse( TQStringList stringStream ); - static VCSFileInfo::FileState String2EnumState( QString stateAsString ); + static VCSFileInfo::FileState String2EnumState( TQString stateAsString ); static void printOutFileInfoMap( const VCSFileInfoMap &map ); BufferedStringReader m_bufferedReader; - QStringList m_statusLines; + TQStringList m_statusLines; mutable void *m_savedCallerData; mutable CvsJob_stub *m_requestStatusJob; CvsService_stub *m_cvsService; //! Caching - mutable QString m_previousDirPath; + mutable TQString m_previousDirPath; mutable VCSFileInfoMap *m_cachedDirEntries; }; diff --git a/vcs/cvsservice/cvsform.cpp b/vcs/cvsservice/cvsform.cpp index a23a1df2..ef0521c8 100644 --- a/vcs/cvsservice/cvsform.cpp +++ b/vcs/cvsservice/cvsform.cpp @@ -10,8 +10,8 @@ ***************************************************************************/ #include <klineedit.h> -#include <qcombobox.h> -#include <qcheckbox.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> #include "cvsform.h" @@ -19,7 +19,7 @@ // class CvsForm /////////////////////////////////////////////////////////////////////////////// -CvsForm::CvsForm( QWidget *parent, const char *name, WFlags f ) +CvsForm::CvsForm( TQWidget *parent, const char *name, WFlags f ) : CvsFormBase( parent, name, f ) { setWFlags( getWFlags() | WDestructiveClose ); @@ -33,42 +33,42 @@ CvsForm::~CvsForm() /////////////////////////////////////////////////////////////////////////////// -QString CvsForm::module() const +TQString CvsForm::module() const { return module_edit->text(); } /////////////////////////////////////////////////////////////////////////////// -QString CvsForm::vendor() const +TQString CvsForm::vendor() const { return vendor_edit->text(); } /////////////////////////////////////////////////////////////////////////////// -QString CvsForm::message() const +TQString CvsForm::message() const { return message_edit->text(); } /////////////////////////////////////////////////////////////////////////////// -QString CvsForm::release() const +TQString CvsForm::release() const { return release_edit->text(); } /////////////////////////////////////////////////////////////////////////////// -QString CvsForm::location() const +TQString CvsForm::location() const { return serverPathEdit->text(); } /////////////////////////////////////////////////////////////////////////////// -QString CvsForm::cvsRsh() const +TQString CvsForm::cvsRsh() const { return cvsRshComboBox->currentText(); } diff --git a/vcs/cvsservice/cvsform.h b/vcs/cvsservice/cvsform.h index 471e10d6..a61e8473 100644 --- a/vcs/cvsservice/cvsform.h +++ b/vcs/cvsservice/cvsform.h @@ -22,15 +22,15 @@ class CvsForm : public CvsFormBase { Q_OBJECT public: - CvsForm( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); + CvsForm( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); virtual ~CvsForm(); - QString module() const; - QString vendor() const; - QString message() const; - QString release() const; - QString location() const; - QString cvsRsh() const; + TQString module() const; + TQString vendor() const; + TQString message() const; + TQString release() const; + TQString location() const; + TQString cvsRsh() const; bool mustInitRoot() const; }; diff --git a/vcs/cvsservice/cvslogdialog.cpp b/vcs/cvsservice/cvslogdialog.cpp index ac6fd97c..ff36c19d 100644 --- a/vcs/cvsservice/cvslogdialog.cpp +++ b/vcs/cvsservice/cvslogdialog.cpp @@ -9,10 +9,10 @@ * * ***************************************************************************/ -#include <qvbox.h> -#include <qregexp.h> -#include <qdir.h> -#include <qstringlist.h> +#include <tqvbox.h> +#include <tqregexp.h> +#include <tqdir.h> +#include <tqstringlist.h> #include <kmessagebox.h> #include <kcursor.h> @@ -32,18 +32,18 @@ // class CVSLogDialog /////////////////////////////////////////////////////////////////////////////// -CVSLogDialog::CVSLogDialog( CvsService_stub *cvsService, QWidget *parent, const char *name, int ) +CVSLogDialog::CVSLogDialog( CvsService_stub *cvsService, TQWidget *parent, const char *name, int ) : KDialogBase( Tabbed, i18n("CVS Log & Diff Dialog"), Close, Close, parent, name? name : "logformdialog", false /*modal*/, true /*separator*/ ), m_cvsLogPage( 0 ), m_cvsService( cvsService ) { setWFlags( getWFlags() | WDestructiveClose ); - QVBox *vbox = addVBoxPage( i18n("Log From CVS") ); + TQVBox *vbox = addVBoxPage( i18n("Log From CVS") ); m_cvsLogPage = new CVSLogPage( m_cvsService, vbox ); - connect( m_cvsLogPage, SIGNAL(diffRequested(const QString&, const QString&, const QString&)), - this, SLOT(slotDiffRequested(const QString&, const QString&, const QString&)) ); + connect( m_cvsLogPage, TQT_SIGNAL(diffRequested(const TQString&, const TQString&, const TQString&)), + this, TQT_SLOT(slotDiffRequested(const TQString&, const TQString&, const TQString&)) ); } /////////////////////////////////////////////////////////////////////////////// @@ -55,32 +55,32 @@ CVSLogDialog::~CVSLogDialog() /////////////////////////////////////////////////////////////////////////////// -void CVSLogDialog::startLog( const QString &workDir, const QString &pathName ) +void CVSLogDialog::startLog( const TQString &workDir, const TQString &pathName ) { kdDebug(9006) << "CVSLogDialog::start() here! workDir = " << workDir << ", pathName = " << pathName << endl; // displayActionFeedback( true ); /* - QVBox *vbox = addVBoxPage( i18n("Log From CVS: ") + pathName ); + TQVBox *vbox = addVBoxPage( i18n("Log From CVS: ") + pathName ); m_cvsLogPage = new CVSLogPage( m_cvsService, vbox ); this->resize( m_cvsLogPage->size() ); - connect( m_cvsLogPage, SIGNAL(linkClicked(const QString&, const QString&)), - this, SLOT(slotDiffRequested(const QString&, const QString&)) ); + connect( m_cvsLogPage, TQT_SIGNAL(linkClicked(const TQString&, const TQString&)), + this, TQT_SLOT(slotDiffRequested(const TQString&, const TQString&)) ); */ m_cvsLogPage->startLog( workDir, pathName ); } /////////////////////////////////////////////////////////////////////////////// -void CVSLogDialog::slotDiffRequested( const QString &pathName, const QString &revA, const QString &revB ) +void CVSLogDialog::slotDiffRequested( const TQString &pathName, const TQString &revA, const TQString &revB ) { kdDebug(9006) << "CVSLogDialog::slotDiffRequested()" << endl; // Create a new CVSDiffPage and start diffing process - QString diffTitle = i18n("Diff between %1 and %2").arg( revA ).arg( revB ); - QVBox *vbox = addVBoxPage( diffTitle ); + TQString diffTitle = i18n("Diff between %1 and %2").arg( revA ).arg( revB ); + TQVBox *vbox = addVBoxPage( diffTitle ); CVSDiffPage *diffPage = new CVSDiffPage( m_cvsService, vbox ); diffPage->startDiff( pathName, revA, revB ); } diff --git a/vcs/cvsservice/cvslogdialog.h b/vcs/cvsservice/cvslogdialog.h index 12a7a2eb..315fea40 100644 --- a/vcs/cvsservice/cvslogdialog.h +++ b/vcs/cvsservice/cvslogdialog.h @@ -27,21 +27,21 @@ class CVSLogDialog : public KDialogBase { Q_OBJECT public: - CVSLogDialog( CvsService_stub *cvsService, QWidget *parent=0, const char *name=0, int flags=0 ); + CVSLogDialog( CvsService_stub *cvsService, TQWidget *parent=0, const char *name=0, int flags=0 ); virtual ~CVSLogDialog(); - void startLog( const QString &workDir, const QString &pathName ); + void startLog( const TQString &workDir, const TQString &pathName ); private slots: - void slotDiffRequested( const QString &pathName, const QString &revA, const QString &revB ); + void slotDiffRequested( const TQString &pathName, const TQString &revA, const TQString &revB ); virtual void slotCancel(); private: -// void parseLogContent( const QString& text ); +// void parseLogContent( const TQString& text ); void displayActionFeedback( bool working ); private: - QString m_pathName; + TQString m_pathName; CVSLogPage *m_cvsLogPage; CvsService_stub *m_cvsService; 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; } diff --git a/vcs/cvsservice/cvslogpage.h b/vcs/cvsservice/cvslogpage.h index a3480e91..d618500c 100644 --- a/vcs/cvsservice/cvslogpage.h +++ b/vcs/cvsservice/cvslogpage.h @@ -13,7 +13,7 @@ #define CVSLOGPAGE_H #include "cvsservicedcopIface.h" -#include <qwidget.h> +#include <tqwidget.h> #include "bufferedstringreader.h" class CvsJob_stub; @@ -25,36 +25,36 @@ Implementation for the form displaying 'cvs log' output. @author KDevelop Authors */ -class CVSLogPage : public QWidget, virtual public CVSServiceDCOPIface +class CVSLogPage : public TQWidget, virtual public CVSServiceDCOPIface { Q_OBJECT public: - CVSLogPage( CvsService_stub *cvsService, QWidget *parent=0, const char *name=0, int flags=0 ); + CVSLogPage( CvsService_stub *cvsService, TQWidget *parent=0, const char *name=0, int flags=0 ); virtual ~CVSLogPage(); - void startLog( const QString &workDir, const QString &pathName ); + void startLog( const TQString &workDir, const TQString &pathName ); void cancel(); signals: // Emitted when the user click upon a link - void diffRequested( const QString &pathName, const QString &revA, const QString &revB ); + void diffRequested( const TQString &pathName, const TQString &revA, const TQString &revB ); private slots: - void slotLinkClicked( const QString &link ); + void slotLinkClicked( const TQString &link ); // DCOP Iface virtual void slotJobExited( bool normalExit, int exitStatus ); - virtual void slotReceivedOutput( QString someOutput ); - virtual void slotReceivedErrors( QString someErrors ); + virtual void slotReceivedOutput( TQString someOutput ); + virtual void slotReceivedErrors( TQString someErrors ); //private: -// void parseLogContent( const QString& text ); +// void parseLogContent( const TQString& text ); private: - QString m_pathName; - QTextBrowser *m_textBrowser; - QString m_logTextBackup; + TQString m_pathName; + TQTextBrowser *m_textBrowser; + TQString m_logTextBackup; BufferedStringReader m_outputBuffer; - QStringList m_diffStrings; + TQStringList m_diffStrings; CvsService_stub *m_cvsService; CvsJob_stub *m_cvsLogJob; diff --git a/vcs/cvsservice/cvsoptions.cpp b/vcs/cvsservice/cvsoptions.cpp index 448f4761..43add3be 100644 --- a/vcs/cvsservice/cvsoptions.cpp +++ b/vcs/cvsservice/cvsoptions.cpp @@ -9,8 +9,8 @@ * * ***************************************************************************/ -#include <qfile.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqtextstream.h> #include <kdebug.h> #include <kconfig.h> @@ -24,9 +24,9 @@ // Macros /////////////////////////////////////////////////////////////////////////////// -#define default_revert QString::fromLatin1("-C") -#define default_diff QString::fromLatin1("-p") -#define default_rsh QString::fromLatin1("") +#define default_revert TQString::fromLatin1("-C") +#define default_diff TQString::fromLatin1("-p") +#define default_rsh TQString::fromLatin1("") #define default_contextLines 3 #define default_compression 0 @@ -35,7 +35,7 @@ /////////////////////////////////////////////////////////////////////////////// CvsOptions *CvsOptions::m_instance = 0; -QString CvsOptions::invalidLocation( "ERROR-LOCATION-IS-NOT-SET-IN-PROJECT" ); +TQString CvsOptions::invalidLocation( "ERROR-LOCATION-IS-NOT-SET-IN-PROJECT" ); /////////////////////////////////////////////////////////////////////////////// // class CvsOptions @@ -85,7 +85,7 @@ void CvsOptions::save( KDevProject *project ) kdDebug( 9006 ) << " **** CvsOptions::save( KDevProject* ) here" << endl; Q_ASSERT( project ); - QDomDocument &dom = *project->projectDom(); + TQDomDocument &dom = *project->projectDom(); DomUtil::writeBoolEntry( dom, "/kdevcvsservice/recursivewhenupdate", recursiveWhenUpdate() ); DomUtil::writeBoolEntry( dom, "/kdevcvsservice/prunedirswhenupdate", pruneEmptyDirsWhenUpdate() ); @@ -95,7 +95,7 @@ void CvsOptions::save( KDevProject *project ) // DomUtil::writeEntry( dom, "/kdevcvsservice/location", location() ); // [Repository-:ext:anonymous@cvs.ogre.sourceforge.net:/cvsroot/ogrenew] - QString groupName = "Repository-" + guessLocation( project->projectDirectory() ); + TQString groupName = "Repository-" + guessLocation( project->projectDirectory() ); m_serviceConfig->setGroup( groupName ); m_serviceConfig->writeEntry( "ContextLines", contextLines() ); @@ -109,7 +109,7 @@ void CvsOptions::load( KDevProject *project ) { kdDebug( 9006 ) << " **** CvsOptions::load( KDevProject* ) here" << endl; Q_ASSERT( project ); - QDomDocument &dom = *project->projectDom(); + TQDomDocument &dom = *project->projectDom(); m_recursiveWhenUpdate = DomUtil::readBoolEntry( dom, "/kdevcvsservice/recursivewhenupdate", true ); m_pruneEmptyDirsWhenUpdate = DomUtil::readBoolEntry( dom, "/kdevcvsservice/prunedirswhenupdate", true ); @@ -118,7 +118,7 @@ void CvsOptions::load( KDevProject *project ) m_revertOptions = DomUtil::readEntry( dom, "/kdevcvsservice/revertoptions", default_revert ); // m_location = DomUtil::readEntry( dom, "/kdevcvsservice/location", guessLocation( project->projectDirectory() ) ); - QString groupName = "Repository-" + guessLocation( project->projectDirectory() ); + TQString groupName = "Repository-" + guessLocation( project->projectDirectory() ); m_serviceConfig->setGroup( groupName ); m_contextLines = m_serviceConfig->readUnsignedNumEntry( "ContextLines", default_contextLines ); @@ -184,56 +184,56 @@ bool CvsOptions::createDirsWhenUpdate() const /////////////////////////////////////////////////////////////////////////////// -void CvsOptions::setRevertOptions( const QString &p ) +void CvsOptions::setRevertOptions( const TQString &p ) { this->m_revertOptions = p; } /////////////////////////////////////////////////////////////////////////////// -QString CvsOptions::revertOptions() +TQString CvsOptions::revertOptions() { return this->m_revertOptions; } /////////////////////////////////////////////////////////////////////////////// -void CvsOptions::setDiffOptions( const QString &p ) +void CvsOptions::setDiffOptions( const TQString &p ) { this->m_diffOptions = p; } /////////////////////////////////////////////////////////////////////////////// -QString CvsOptions::diffOptions() +TQString CvsOptions::diffOptions() { return this->m_diffOptions; } /////////////////////////////////////////////////////////////////////////////// -void CvsOptions::setCvsRshEnvVar( const QString &p ) +void CvsOptions::setCvsRshEnvVar( const TQString &p ) { this->m_cvsRshEnvVar = p; } /////////////////////////////////////////////////////////////////////////////// -QString CvsOptions::cvsRshEnvVar() +TQString CvsOptions::cvsRshEnvVar() { return this->m_cvsRshEnvVar; } /////////////////////////////////////////////////////////////////////////////// -QString CvsOptions::location() +TQString CvsOptions::location() { return m_location; } /////////////////////////////////////////////////////////////////////////////// -void CvsOptions::setLocation( const QString &p ) +void CvsOptions::setLocation( const TQString &p ) { m_location = p; } @@ -268,15 +268,15 @@ unsigned int CvsOptions::compressionLevel() const /////////////////////////////////////////////////////////////////////////////// -QString CvsOptions::guessLocation( const QString &projectDir ) const +TQString CvsOptions::guessLocation( const TQString &projectDir ) const { - QString rootFileName( projectDir + "/CVS/Root" ); + TQString rootFileName( projectDir + "/CVS/Root" ); - QFile f( rootFileName ); + TQFile f( rootFileName ); if (f.open( IO_ReadOnly )) { - QTextStream t( &f ); - QString serverLocation = t.readLine(); + TQTextStream t( &f ); + TQString serverLocation = t.readLine(); kdDebug(9000) << "===> Server location guessed: " << serverLocation << endl; return serverLocation; } diff --git a/vcs/cvsservice/cvsoptions.h b/vcs/cvsservice/cvsoptions.h index 222a34c7..857b47e4 100644 --- a/vcs/cvsservice/cvsoptions.h +++ b/vcs/cvsservice/cvsoptions.h @@ -12,8 +12,8 @@ #ifndef CVSOPTIONS_H #define CVSOPTIONS_H -#include <qstring.h> -#include <qdom.h> +#include <tqstring.h> +#include <tqdom.h> class CvsServicePart; class KConfig; @@ -28,7 +28,7 @@ class CvsOptions public: static CvsOptions *instance(); - static QString invalidLocation; + static TQString invalidLocation; virtual ~CvsOptions(); @@ -48,30 +48,30 @@ public: void setCreateDirsWhenUpdate( bool b ); bool createDirsWhenUpdate() const; - void setDiffOptions( const QString &p ); - QString diffOptions(); + void setDiffOptions( const TQString &p ); + TQString diffOptions(); - void setRevertOptions( const QString &p ); - QString revertOptions(); + void setRevertOptions( const TQString &p ); + TQString revertOptions(); - void setCvsRshEnvVar( const QString &p ); - QString cvsRshEnvVar(); + void setCvsRshEnvVar( const TQString &p ); + TQString cvsRshEnvVar(); /** * Will try to determine location by using CVS/Root file */ - QString guessLocation( const QString &projectDir ) const; + TQString guessLocation( const TQString &projectDir ) const; /** * Set server path string (this should be called by the part when a new project * is created or imported) * @param p (i.e. :pserver:marios@cvs.kde.org:/home/kde) */ - void setLocation( const QString &p ); + void setLocation( const TQString &p ); /** * @result remote path (i.e. :pserver:marios@cvs.kde.org:/home/kde) */ - QString location(); + TQString location(); void setContextLines( unsigned int contextLines ); unsigned int contextLines() const; @@ -85,10 +85,10 @@ private: bool m_pruneEmptyDirsWhenUpdate; bool m_recursiveWhenUpdate; bool m_createDirsWhenUpdate; - QString m_revertOptions; - QString m_diffOptions; - QString m_cvsRshEnvVar; - QString m_location; + TQString m_revertOptions; + TQString m_diffOptions; + TQString m_cvsRshEnvVar; + TQString m_location; unsigned int m_compressionLevel; unsigned int m_contextLines; //! So we can access cvssservice configuration (repositories first of all) diff --git a/vcs/cvsservice/cvsoptionswidget.cpp b/vcs/cvsservice/cvsoptionswidget.cpp index aa7a98c1..32044dd3 100644 --- a/vcs/cvsservice/cvsoptionswidget.cpp +++ b/vcs/cvsservice/cvsoptionswidget.cpp @@ -11,7 +11,7 @@ * * ***************************************************************************/ -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <klineedit.h> #include <knuminput.h> #include <kdialog.h> @@ -24,7 +24,7 @@ // class DiffDialog /////////////////////////////////////////////////////////////////////////////// -CvsOptionsWidget::CvsOptionsWidget( QWidget *parent, const char *name ) +CvsOptionsWidget::CvsOptionsWidget( TQWidget *parent, const char *name ) : CvsOptionsWidgetBase( parent, name ) { readConfig(); @@ -112,28 +112,28 @@ void CvsOptionsWidget::setContextLines( unsigned int p ) /////////////////////////////////////////////////////////////////////////////// -void CvsOptionsWidget::setDiffOptions( const QString &p ) +void CvsOptionsWidget::setDiffOptions( const TQString &p ) { this->diffOptionsEdit->setText( p ); } /////////////////////////////////////////////////////////////////////////////// -QString CvsOptionsWidget::diffOptions() const +TQString CvsOptionsWidget::diffOptions() const { return this->diffOptionsEdit->text(); } /////////////////////////////////////////////////////////////////////////////// -void CvsOptionsWidget::setCvsRshEnvVar( const QString &p ) +void CvsOptionsWidget::setCvsRshEnvVar( const TQString &p ) { this->cvsRshEnvVarEdit->setText( p ); } /////////////////////////////////////////////////////////////////////////////// -void CvsOptionsWidget::setServerLocation( const QString &p ) +void CvsOptionsWidget::setServerLocation( const TQString &p ) { this->serverLocationEdit->setText( p ); } @@ -175,14 +175,14 @@ unsigned int CvsOptionsWidget::contextLines() const /////////////////////////////////////////////////////////////////////////////// -QString CvsOptionsWidget::cvsRshEnvVar() const +TQString CvsOptionsWidget::cvsRshEnvVar() const { return cvsRshEnvVarEdit->text(); } /////////////////////////////////////////////////////////////////////////////// -QString CvsOptionsWidget::serverLocation() const +TQString CvsOptionsWidget::serverLocation() const { return serverLocationEdit->text(); } diff --git a/vcs/cvsservice/cvsoptionswidget.h b/vcs/cvsservice/cvsoptionswidget.h index 5df98d76..caf23619 100644 --- a/vcs/cvsservice/cvsoptionswidget.h +++ b/vcs/cvsservice/cvsoptionswidget.h @@ -14,7 +14,7 @@ #ifndef _CVSOPTIONSWIDGET_H_ #define _CVSOPTIONSWIDGET_H_ -#include <qwidget.h> +#include <tqwidget.h> #include "cvsoptionswidgetbase.h" class QLabel; @@ -24,7 +24,7 @@ class CvsOptionsWidget : public CvsOptionsWidgetBase { Q_OBJECT public: - CvsOptionsWidget( QWidget *parent, const char *name=0 ); + CvsOptionsWidget( TQWidget *parent, const char *name=0 ); virtual ~CvsOptionsWidget(); bool pruneEmptyDirWhenUpdating() const; @@ -42,14 +42,14 @@ public: unsigned int contextLines() const; void setContextLines( unsigned int p ); - QString diffOptions() const; - void setDiffOptions( const QString &p ); + TQString diffOptions() const; + void setDiffOptions( const TQString &p ); - QString cvsRshEnvVar() const; - void setCvsRshEnvVar( const QString &p ); + TQString cvsRshEnvVar() const; + void setCvsRshEnvVar( const TQString &p ); - QString serverLocation() const; - void setServerLocation( const QString &p ); + TQString serverLocation() const; + void setServerLocation( const TQString &p ); public slots: void accept(); diff --git a/vcs/cvsservice/cvspart.cpp b/vcs/cvsservice/cvspart.cpp index 9d885056..30a8a700 100644 --- a/vcs/cvsservice/cvspart.cpp +++ b/vcs/cvsservice/cvspart.cpp @@ -12,10 +12,10 @@ ***************************************************************************/ #include "cvspart.h" -#include <qdir.h> -#include <qpopupmenu.h> -#include <qwhatsthis.h> -#include <qtimer.h> +#include <tqdir.h> +#include <tqpopupmenu.h> +#include <tqwhatsthis.h> +#include <tqtimer.h> #include <kpopupmenu.h> #include <kdebug.h> @@ -65,7 +65,7 @@ // Global vars /////////////////////////////////////////////////////////////////////////////// -// See createNewProject( const QString &) and slotProjectOpened() +// See createNewProject( const TQString &) and slotProjectOpened() bool g_projectWasJustCreated = false; /////////////////////////////////////////////////////////////////////////////// @@ -80,7 +80,7 @@ K_EXPORT_COMPONENT_FACTORY( libkdevcvsservice, CvsFactory( data ) ) // class CvsServicePart /////////////////////////////////////////////////////////////////////////////// -CvsServicePart::CvsServicePart( QObject *parent, const char *name, const QStringList & ) +CvsServicePart::CvsServicePart( TQObject *parent, const char *name, const TQStringList & ) : KDevVersionControl( &data, parent, name ? name : "CvsService" ), actionCommit( 0 ), actionDiff( 0 ), actionLog( 0 ), actionAnnotate(0), actionAdd( 0 ), @@ -96,10 +96,10 @@ CvsServicePart::CvsServicePart( QObject *parent, const char *name, const QString m_impl = new CvsServicePartImpl( this ); // Load / store project configuration every time project is opened/closed - connect( core(), SIGNAL(projectOpened()), this, SLOT(slotProjectOpened()) ); - connect( core(), SIGNAL(projectClosed()), this, SLOT(slotProjectClosed()) ); + connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(slotProjectOpened()) ); + connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(slotProjectClosed()) ); - QTimer::singleShot(0, this, SLOT(init())); + TQTimer::singleShot(0, this, TQT_SLOT(init())); } /////////////////////////////////////////////////////////////////////////////// @@ -119,18 +119,18 @@ void CvsServicePart::init() setupActions(); // Re-route our implementation signal for when check-out finishes to the standard signal - connect( m_impl, SIGNAL(checkoutFinished(QString)), SIGNAL(finishedFetching(QString)) ); + connect( m_impl, TQT_SIGNAL(checkoutFinished(TQString)), TQT_SIGNAL(finishedFetching(TQString)) ); // Context menu - connect( core(), SIGNAL(contextMenu(QPopupMenu *, const Context *)), - this, SLOT(contextMenu(QPopupMenu *, const Context *)) ); - connect( core(), SIGNAL(projectConfigWidget(KDialogBase*)), - this, SLOT(projectConfigWidget(KDialogBase*)) ); - connect( core(), SIGNAL(stopButtonClicked(KDevPlugin*)), - this, SLOT(slotStopButtonClicked(KDevPlugin*)) ); + connect( core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), + this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)) ); + connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)), + this, TQT_SLOT(projectConfigWidget(KDialogBase*)) ); + connect( core(), TQT_SIGNAL(stopButtonClicked(KDevPlugin*)), + this, TQT_SLOT(slotStopButtonClicked(KDevPlugin*)) ); m_impl->m_widget->setIcon( UserIcon( "kdev_cvs", KIcon::DefaultState, CvsFactory::instance()) ); - QWhatsThis::add( m_impl->processWidget(), i18n("<b>CVS</b><p>Concurrent Versions System operations window. Shows output of Cervisia CVS Service.") ); + TQWhatsThis::add( m_impl->processWidget(), i18n("<b>CVS</b><p>Concurrent Versions System operations window. Shows output of Cervisia CVS Service.") ); m_impl->processWidget()->setCaption(i18n("CvsService Output")); mainWindow()->embedOutputView( m_impl->processWidget(), i18n("CvsService"), i18n("cvs output") ); @@ -144,92 +144,92 @@ void CvsServicePart::setupActions() // context at runtime. See CvsServicePart::contextMenu(). actionCommit = new KAction( i18n("&Commit to Repository"), 0, this, - SLOT(slotActionCommit()), actionCollection(), "cvsservice_commit" ); + TQT_SLOT(slotActionCommit()), actionCollection(), "cvsservice_commit" ); actionCommit->setToolTip( i18n("Commit file(s)") ); actionCommit->setWhatsThis( i18n("<b>Commit file(s)</b><p>Commits file to repository if modified.") ); - actionDiff = new KAction( i18n("&Difference Between Revisions"), 0, this, SLOT(slotActionDiff()), + actionDiff = new KAction( i18n("&Difference Between Revisions"), 0, this, TQT_SLOT(slotActionDiff()), actionCollection(), "cvsservice_diff" ); actionDiff->setToolTip( i18n("Build difference") ); actionDiff->setWhatsThis( i18n("<b>Build difference</b><p>Builds difference between releases.") ); - actionLog = new KAction( i18n("Generate &Log"), 0, this, SLOT(slotActionLog()), + actionLog = new KAction( i18n("Generate &Log"), 0, this, TQT_SLOT(slotActionLog()), actionCollection(), "cvsservice_log" ); actionLog->setToolTip( i18n("Generate log") ); actionLog->setWhatsThis( i18n("<b>Generate log</b><p>Produces log for this file.") ); - actionAnnotate = new KAction( i18n("&Annotate"), 0, this, SLOT(slotActionAnnotate()), + actionAnnotate = new KAction( i18n("&Annotate"), 0, this, TQT_SLOT(slotActionAnnotate()), actionCollection(), "cvsservice_annotate" ); actionAnnotate->setToolTip( i18n("Generate annotations") ); actionAnnotate->setWhatsThis( i18n("<b>Annotate</b><p>Produces annotations for this file.") ); - actionAdd = new KAction( i18n("&Add to Repository"), 0, this, SLOT(slotActionAdd()), + actionAdd = new KAction( i18n("&Add to Repository"), 0, this, TQT_SLOT(slotActionAdd()), actionCollection(), "cvsservice_add" ); actionAdd->setToolTip( i18n("Add file to repository") ); actionAdd->setWhatsThis( i18n("<b>Add to repository</b><p>Adds file to repository.") ); - actionEdit = new KAction( i18n("&Edit Files"), 0, this, SLOT(slotActionEdit()), + actionEdit = new KAction( i18n("&Edit Files"), 0, this, TQT_SLOT(slotActionEdit()), actionCollection(), "cvsservice_edit" ); actionEdit->setToolTip( i18n("Mark as being edited") ); actionEdit->setWhatsThis( i18n("<b>Mark as being edited</b><p>Mark the files as being edited.") ); - actionUnEdit = new KAction( i18n("&Unedit Files"), 0, this, SLOT(slotActionUnEdit()), + actionUnEdit = new KAction( i18n("&Unedit Files"), 0, this, TQT_SLOT(slotActionUnEdit()), actionCollection(), "cvsservice_unedit" ); actionUnEdit->setToolTip( i18n("Remove editing mark from files") ); actionUnEdit->setWhatsThis( i18n("<b>Remove editing mark</b><p>Remove the editing mark from the files.") ); - actionEditors = new KAction( i18n("&Show Editors"), 0, this, SLOT(slotActionEditors()), + actionEditors = new KAction( i18n("&Show Editors"), 0, this, TQT_SLOT(slotActionEditors()), actionCollection(), "cvsservice_editors" ); actionEditors->setToolTip( i18n("Show editors") ); actionEditors->setWhatsThis( i18n("<b>Show editors</b><p>Shows the list of users who are editing files.") ); actionAddBinary = new KAction( i18n("Add to Repository as &Binary"), 0, this, - SLOT(slotActionAddBinary()), actionCollection(), "cvsservice_add_bin" ); + TQT_SLOT(slotActionAddBinary()), actionCollection(), "cvsservice_add_bin" ); actionAddBinary->setToolTip( i18n("Add file to repository as binary") ); actionAddBinary->setWhatsThis( i18n("<b>Add to repository as binary</b><p>Adds file to repository as binary (-kb option).") ); actionRemove = new KAction( i18n("&Remove From Repository"), 0, this, - SLOT(slotActionRemove()), actionCollection(), "cvsservice_remove" ); + TQT_SLOT(slotActionRemove()), actionCollection(), "cvsservice_remove" ); actionRemove->setToolTip( i18n("Remove from repository") ); actionRemove->setWhatsThis( i18n("<b>Remove from repository</b><p>Removes file(s) from repository.") ); actionUpdate = new KAction( i18n("&Update/Revert to Another Release"), 0, this, - SLOT(slotActionUpdate()), actionCollection(), "cvsservice_update" ); + TQT_SLOT(slotActionUpdate()), actionCollection(), "cvsservice_update" ); actionUpdate->setToolTip( i18n("Update/revert") ); actionUpdate->setWhatsThis( i18n("<b>Update/revert to another release</b><p>Updates/reverts file(s) to another release.") ); actionRemoveSticky = new KAction( i18n("R&emove Sticky Flag"), 0, - this, SLOT(slotActionRemoveSticky()), actionCollection(), "cvsservice_removesticky" ); + this, TQT_SLOT(slotActionRemoveSticky()), actionCollection(), "cvsservice_removesticky" ); actionRemoveSticky->setToolTip( i18n("Remove sticky flag") ); actionRemoveSticky->setWhatsThis( i18n("<b>Remove sticky flag</b><p>Removes sticky flag from file(s).") ); actionTag = new KAction( i18n("Make &Tag/Branch"), 0, - this, SLOT(slotActionTag()), actionCollection(), "cvsservice_tag" ); + this, TQT_SLOT(slotActionTag()), actionCollection(), "cvsservice_tag" ); actionTag->setToolTip( i18n("Make tag/branch") ); actionTag->setWhatsThis( i18n("<b>Make tag/branch</b><p>Tags/branches selected file(s).") ); actionUnTag = new KAction( i18n("&Delete Tag"), 0, - this, SLOT(slotActionUnTag()), actionCollection(), "cvsservice_untag" ); + this, TQT_SLOT(slotActionUnTag()), actionCollection(), "cvsservice_untag" ); actionUnTag->setToolTip( i18n("Delete tag") ); actionUnTag->setWhatsThis( i18n("<b>Delete tag</b><p>Delete tag from selected file(s).") ); actionAddToIgnoreList = new KAction( i18n("&Ignore in CVS Operations"), 0, - this, SLOT(slotActionAddToIgnoreList()), actionCollection(), "cvsservice_ignore" ); + this, TQT_SLOT(slotActionAddToIgnoreList()), actionCollection(), "cvsservice_ignore" ); actionAddToIgnoreList->setToolTip( i18n("Ignore in CVS operations") ); actionAddToIgnoreList->setWhatsThis( i18n("<b>Ignore in CVS operations</b><p>Ignore file(s) by adding it to .cvsignore file.") ); actionRemoveFromIgnoreList = new KAction( i18n("Do &Not Ignore in CVS Operations"), 0, - this, SLOT(slotActionRemoveFromIgnoreList()), actionCollection(), "cvsservice_donot_ignore" ); + this, TQT_SLOT(slotActionRemoveFromIgnoreList()), actionCollection(), "cvsservice_donot_ignore" ); actionRemoveFromIgnoreList->setToolTip( i18n("Do not ignore in CVS operations") ); actionRemoveFromIgnoreList->setWhatsThis( i18n("<b>Do not ignore in CVS operations</b><p>Do not ignore file(s) by removing\nit from .cvsignore file.") ); actionLogin = new KAction( i18n("&Log to Server"), 0, this, - SLOT(slotActionLogin()), actionCollection(), "cvsservice_login" ); + TQT_SLOT(slotActionLogin()), actionCollection(), "cvsservice_login" ); actionLogin->setToolTip( i18n("Login to server") ); actionLogin->setWhatsThis( i18n("<b>Login to server</b><p>Logs in to the CVS server.") ); actionLogout = new KAction( i18n("L&ogout From Server"), 0, this, - SLOT(slotActionLogout()), actionCollection(), "cvsservice_logout" ); + TQT_SLOT(slotActionLogout()), actionCollection(), "cvsservice_logout" ); actionLogout->setToolTip( i18n("Logout from server") ); actionLogout->setWhatsThis( i18n("<b>Logout from server</b><p>Logs out from the CVS server.") ); } @@ -250,9 +250,9 @@ KDevVCSFileInfoProvider *CvsServicePart::fileInfoProvider() const /////////////////////////////////////////////////////////////////////////////// -void CvsServicePart::createNewProject( const QString &dirName ) +void CvsServicePart::createNewProject( const TQString &dirName ) { - kdDebug( 9006 ) << "====> CvsServicePart::createNewProject( const QString& )" << endl; + kdDebug( 9006 ) << "====> CvsServicePart::createNewProject( const TQString& )" << endl; if (!m_cvsConfigurationForm) return; @@ -276,14 +276,14 @@ void CvsServicePart::createNewProject( const QString &dirName ) void CvsServicePart::projectConfigWidget( KDialogBase *dlg ) { - QVBox *vbox = dlg->addVBoxPage( i18n("CvsService"), i18n("CvsService"), BarIcon( info()->icon(), KIcon::SizeMedium) ); - CvsOptionsWidget *w = new CvsOptionsWidget( (QWidget *)vbox, "cvs config widget" ); - connect( dlg, SIGNAL(okClicked()), w, SLOT(accept()) ); + TQVBox *vbox = dlg->addVBoxPage( i18n("CvsService"), i18n("CvsService"), BarIcon( info()->icon(), KIcon::SizeMedium) ); + CvsOptionsWidget *w = new CvsOptionsWidget( (TQWidget *)vbox, "cvs config widget" ); + connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept()) ); } /////////////////////////////////////////////////////////////////////////////// -QWidget* CvsServicePart::newProjectWidget( QWidget *parent ) +TQWidget* CvsServicePart::newProjectWidget( TQWidget *parent ) { m_cvsConfigurationForm = new CvsForm( parent, "cvsform" ); return m_cvsConfigurationForm; @@ -291,7 +291,7 @@ QWidget* CvsServicePart::newProjectWidget( QWidget *parent ) /////////////////////////////////////////////////////////////////////////////// -void CvsServicePart::contextMenu( QPopupMenu *popup, const Context *context ) +void CvsServicePart::contextMenu( TQPopupMenu *popup, const Context *context ) { kdDebug(9006) << "contextMenu()" << endl; if (context->hasType( Context::FileContext ) || @@ -320,45 +320,45 @@ void CvsServicePart::contextMenu( QPopupMenu *popup, const Context *context ) if (context->hasType( Context::FileContext )) popup->insertSeparator(); - int id = subMenu->insertItem( actionCommit->text(), this, SLOT(slotCommit()) ); + int id = subMenu->insertItem( actionCommit->text(), this, TQT_SLOT(slotCommit()) ); subMenu->setWhatsThis(id, i18n("<b>Commit file(s)</b><p>Commits file to repository if modified.")); // CvsService let to do log and diff operations only on one file (or directory) at time if (m_urls.count() == 1) { - id = subMenu->insertItem( actionDiff->text(), this, SLOT(slotDiff()) ); + id = subMenu->insertItem( actionDiff->text(), this, TQT_SLOT(slotDiff()) ); subMenu->setWhatsThis(id, i18n("<b>Build difference</b><p>Builds difference between releases.")); - id = subMenu->insertItem( actionLog->text(), this, SLOT(slotLog()) ); + id = subMenu->insertItem( actionLog->text(), this, TQT_SLOT(slotLog()) ); subMenu->setWhatsThis(id, i18n("<b>Generate log</b><p>Produces log for this file.")); - id = subMenu->insertItem( actionAnnotate->text(), this, SLOT(slotAnnotate()) ); + id = subMenu->insertItem( actionAnnotate->text(), this, TQT_SLOT(slotAnnotate()) ); subMenu->setWhatsThis(id, i18n("<b>Generate Annotate</b><p>Produces annotation output for this file.")); } - id = subMenu->insertItem( actionEditors->text(), this, SLOT(slotEditors()) ); + id = subMenu->insertItem( actionEditors->text(), this, TQT_SLOT(slotEditors()) ); subMenu->setWhatsThis(id, i18n("<b>Show editors</b><p>Shows the list of users who are editing files.")); - id = subMenu->insertItem( actionEdit->text(), this, SLOT(slotEdit()) ); + id = subMenu->insertItem( actionEdit->text(), this, TQT_SLOT(slotEdit()) ); subMenu->setWhatsThis(id, i18n("<b>Mark as beeing edited</b><p>Mark the files as beeing edited.")); - id = subMenu->insertItem( actionUnEdit->text(), this, SLOT(slotUnEdit()) ); + id = subMenu->insertItem( actionUnEdit->text(), this, TQT_SLOT(slotUnEdit()) ); subMenu->setWhatsThis(id, i18n("<b>Remove editing mark</b><p>Remove the editing mark from the files.")); - id = subMenu->insertItem( actionAdd->text(), this, SLOT(slotAdd()) ); + id = subMenu->insertItem( actionAdd->text(), this, TQT_SLOT(slotAdd()) ); subMenu->setWhatsThis(id, i18n("<b>Add to repository</b><p>Adds file to repository.")); - id = subMenu->insertItem( actionAddBinary->text(), this, SLOT(slotAddBinary()) ); + id = subMenu->insertItem( actionAddBinary->text(), this, TQT_SLOT(slotAddBinary()) ); subMenu->setWhatsThis(id, i18n("<b>Add to repository as binary</b><p>Adds file to repository as binary (-kb option).")); - id = subMenu->insertItem( actionRemove->text(), this, SLOT(slotRemove()) ); + id = subMenu->insertItem( actionRemove->text(), this, TQT_SLOT(slotRemove()) ); subMenu->setWhatsThis(id, i18n("<b>Remove from repository</b><p>Removes file(s) from repository.")); subMenu->insertSeparator(); - id = subMenu->insertItem( actionTag->text(), this, SLOT(slotTag()) ); + id = subMenu->insertItem( actionTag->text(), this, TQT_SLOT(slotTag()) ); subMenu->setWhatsThis(id, i18n("<b>Make tag/branch</b><p>Tags/branches selected file(s).")); - id = subMenu->insertItem( actionUnTag->text(), this, SLOT(slotUnTag()) ); + id = subMenu->insertItem( actionUnTag->text(), this, TQT_SLOT(slotUnTag()) ); subMenu->setWhatsThis(id, i18n("<b>Delete tag</b><p>Delete tag from selected file(s).")); - id = subMenu->insertItem( actionUpdate->text(), this, SLOT(slotUpdate()) ); + id = subMenu->insertItem( actionUpdate->text(), this, TQT_SLOT(slotUpdate()) ); subMenu->setWhatsThis(id, i18n("<b>Update/revert to another release</b><p>Updates/reverts file(s) to another release.")); - id = subMenu->insertItem( actionRemoveSticky->text(), this, SLOT(slotRemoveSticky()) ); + id = subMenu->insertItem( actionRemoveSticky->text(), this, TQT_SLOT(slotRemoveSticky()) ); subMenu->setWhatsThis(id, i18n("<b>Remove sticky flag</b><p>Removes sticky flag from file(s).")); subMenu->insertSeparator(); - id = subMenu->insertItem( actionAddToIgnoreList->text(), this, SLOT(slotAddToIgnoreList()) ); + id = subMenu->insertItem( actionAddToIgnoreList->text(), this, TQT_SLOT(slotAddToIgnoreList()) ); subMenu->setWhatsThis(id, i18n("<b>Ignore in CVS operations</b><p>Ignore file(s) by adding it to .cvsignore file.")); - id = subMenu->insertItem( actionRemoveFromIgnoreList->text(), this, SLOT(slotRemoveFromIgnoreList()) ); + id = subMenu->insertItem( actionRemoveFromIgnoreList->text(), this, TQT_SLOT(slotRemoveFromIgnoreList()) ); subMenu->setWhatsThis(id, i18n("<b>Do not ignore in CVS operations</b><p>Do not ignore file(s) by removing\nit from .cvsignore file.")); // Now insert in parent menu @@ -396,7 +396,7 @@ bool CvsServicePart::urlFocusedDocument( KURL &url ) /////////////////////////////////////////////////////////////////////////////// -bool CvsServicePart::isValidDirectory( const QString &dirPath ) const +bool CvsServicePart::isValidDirectory( const TQString &dirPath ) const { return m_impl->isValidDirectory( dirPath ); } @@ -714,14 +714,14 @@ void CvsServicePart::slotStopButtonClicked( KDevPlugin* which ) /////////////////////////////////////////////////////////////////////////////// -void CvsServicePart::slotAddFilesToProject( const QStringList &filesToAdd ) +void CvsServicePart::slotAddFilesToProject( const TQStringList &filesToAdd ) { m_impl->addFilesToProject( filesToAdd ); } /////////////////////////////////////////////////////////////////////////////// -void CvsServicePart::slotRemovedFilesFromProject(const QStringList &fileToRemove) +void CvsServicePart::slotRemovedFilesFromProject(const TQStringList &fileToRemove) { m_impl->removedFilesFromProject( fileToRemove ); } @@ -750,8 +750,8 @@ void CvsServicePart::slotProjectOpened() options->load( project() ); // When files are added to project they may be added to/removed from repository too - connect( project(), SIGNAL(addedFilesToProject(const QStringList&)), this, SLOT(slotAddFilesToProject(const QStringList &)) ); - connect( project(), SIGNAL(removedFilesFromProject(const QStringList&)), this, SLOT(slotRemovedFilesFromProject(const QStringList &)) ); + connect( project(), TQT_SIGNAL(addedFilesToProject(const TQStringList&)), this, TQT_SLOT(slotAddFilesToProject(const TQStringList &)) ); + connect( project(), TQT_SIGNAL(removedFilesFromProject(const TQStringList&)), this, TQT_SLOT(slotRemovedFilesFromProject(const TQStringList &)) ); } /////////////////////////////////////////////////////////////////////////////// @@ -772,8 +772,8 @@ void CvsServicePart::slotProjectClosed() delete options; // We don't have a project anymore ... - disconnect( project(), SIGNAL(addedFilesToProject(const QStringList&)), this, SLOT(slotAddFilesToProject(const QStringList &)) ); - disconnect( project(), SIGNAL(removedFilesFromProject(const QStringList&)), this, SLOT(slotRemovedFilesFromProject(const QStringList &)) ); + disconnect( project(), TQT_SIGNAL(addedFilesToProject(const TQStringList&)), this, TQT_SLOT(slotAddFilesToProject(const TQStringList &)) ); + disconnect( project(), TQT_SIGNAL(removedFilesFromProject(const TQStringList&)), this, TQT_SLOT(slotRemovedFilesFromProject(const TQStringList &)) ); } #include "cvspart.moc" diff --git a/vcs/cvsservice/cvspart.h b/vcs/cvsservice/cvspart.h index e3513a98..da15dff2 100644 --- a/vcs/cvsservice/cvspart.h +++ b/vcs/cvsservice/cvspart.h @@ -14,8 +14,8 @@ #ifndef _CVSPART_H_ #define _CVSPART_H_ -#include <qguardedptr.h> -#include <qcstring.h> +#include <tqguardedptr.h> +#include <tqcstring.h> #include <kurl.h> #include "kdevversioncontrol.h" @@ -43,7 +43,7 @@ class CvsServicePart : public KDevVersionControl public: //! Standard constructor. - CvsServicePart( QObject *parent, const char *name, const QStringList & ); + CvsServicePart( TQObject *parent, const char *name, const TQStringList & ); //! Destructor. virtual ~CvsServicePart(); @@ -51,11 +51,11 @@ public: * Returns the configuration widget (for properly configuring the project to * use CVS), child of @p parent. */ - virtual QWidget *newProjectWidget( QWidget *parent ); + virtual TQWidget *newProjectWidget( TQWidget *parent ); /** * Setup a directory tree for use with CVS. */ - virtual void createNewProject( const QString& dir ); + virtual void createNewProject( const TQString& dir ); /** * Fetch a module from remote repository, so it can be used for importing */ @@ -68,7 +68,7 @@ public: * @param dirPath absolute path of the directory * @return true if the the directory is a valid CVS sandbox */ - virtual bool isValidDirectory( const QString &dirPath ) const; + virtual bool isValidDirectory( const TQString &dirPath ) const; private slots: /** Add menu items binded to cvs operations' slots to @p popup, using @@ -76,7 +76,7 @@ private slots: * Not that @p context _must_ be FileContext-type, otherwise will do * nothing. */ - void contextMenu( QPopupMenu *popup, const Context *context ); + void contextMenu( TQPopupMenu *popup, const Context *context ); // Cvs operations (menubar) void slotActionLogin(); @@ -120,8 +120,8 @@ private slots: void slotProjectOpened(); void slotProjectClosed(); - void slotAddFilesToProject(const QStringList &); - void slotRemovedFilesFromProject(const QStringList &); + void slotAddFilesToProject(const TQStringList &); + void slotRemovedFilesFromProject(const TQStringList &); /** Adds a configuration widget (for properly configuring CVS command-line options) * and adds it to @p dlg. @@ -145,7 +145,7 @@ private: /** This is a pointer to the d->form used for collecting data about CVS project creation (used * by the ApplicationWizard in example) */ - QGuardedPtr<CvsForm> m_cvsConfigurationForm; + TQGuardedPtr<CvsForm> m_cvsConfigurationForm; // Actions KAction *actionCommit, diff --git a/vcs/cvsservice/cvspartimpl.cpp b/vcs/cvsservice/cvspartimpl.cpp index e6177739..ca66e610 100644 --- a/vcs/cvsservice/cvspartimpl.cpp +++ b/vcs/cvsservice/cvspartimpl.cpp @@ -9,10 +9,10 @@ * * ***************************************************************************/ -#include <qfile.h> -#include <qfileinfo.h> -#include <qdir.h> -#include<qcheckbox.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqdir.h> +#include<tqcheckbox.h> #include <kapplication.h> #include <kmessagebox.h> @@ -61,17 +61,17 @@ /////////////////////////////////////////////////////////////////////////////// // Nice name (relative to projectDirectory()) ;-) -const QString CvsServicePartImpl::changeLogFileName( "ChangeLog" ); +const TQString CvsServicePartImpl::changeLogFileName( "ChangeLog" ); // Four spaces for every log line (except the first, which includes the // developers name) -const QString CvsServicePartImpl::changeLogPrependString( " " ); +const TQString CvsServicePartImpl::changeLogPrependString( " " ); /////////////////////////////////////////////////////////////////////////////// // class CvsServicePartImpl /////////////////////////////////////////////////////////////////////////////// CvsServicePartImpl::CvsServicePartImpl( CvsServicePart *part, const char *name ) - : QObject( this, name? name : "cvspartimpl" ), + : TQObject( this, name? name : "cvspartimpl" ), m_scheduler( 0 ), m_part( part ), m_widget( 0 ) { if (requestCvsService()) @@ -80,7 +80,7 @@ CvsServicePartImpl::CvsServicePartImpl( CvsServicePart *part, const char *name ) m_scheduler = new DirectScheduler( m_widget ); m_fileInfoProvider = new CVSFileInfoProvider( part, m_cvsService ); - connect( core(), SIGNAL(projectOpened()), this, SLOT(slotProjectOpened()) ); + connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(slotProjectOpened()) ); } else { @@ -178,7 +178,7 @@ const KURL::List &CvsServicePartImpl::urlList() const /////////////////////////////////////////////////////////////////////////////// -QStringList CvsServicePartImpl::fileList( bool relativeToProjectDir ) const +TQStringList CvsServicePartImpl::fileList( bool relativeToProjectDir ) const { if (relativeToProjectDir) return URLUtil::toRelativePaths( projectDirectory(), urlList() ); @@ -188,7 +188,7 @@ QStringList CvsServicePartImpl::fileList( bool relativeToProjectDir ) const /////////////////////////////////////////////////////////////////////////////// -bool CvsServicePartImpl::isRegisteredInRepository( const QString &projectDirectory, const KURL &url ) +bool CvsServicePartImpl::isRegisteredInRepository( const TQString &projectDirectory, const KURL &url ) { kdDebug(9006) << k_funcinfo << endl; @@ -218,7 +218,7 @@ bool CvsServicePartImpl::isRegisteredInRepository( const QString &projectDirecto /////////////////////////////////////////////////////////////////////////////// -void CvsServicePartImpl::validateURLs( const QString &projectDirectory, KURL::List &urls, CvsOperation op ) +void CvsServicePartImpl::validateURLs( const TQString &projectDirectory, KURL::List &urls, CvsOperation op ) { kdDebug(9006) << k_funcinfo << endl; @@ -229,7 +229,7 @@ void CvsServicePartImpl::validateURLs( const QString &projectDirectory, KURL::Li kdDebug(9006) << "This is a Cvs Add operation and will not be checked against repository ;-)" << endl; return; } - QValueList<KURL>::iterator it = urls.begin(); + TQValueList<KURL>::iterator it = urls.begin(); while (it != urls.end()) { if (!CvsServicePartImpl::isRegisteredInRepository( projectDirectory, (*it) )) @@ -249,7 +249,7 @@ void CvsServicePartImpl::validateURLs( const QString &projectDirectory, KURL::Li /////////////////////////////////////////////////////////////////////////////// -void CvsServicePartImpl::addToIgnoreList( const QString &projectDirectory, const KURL &url ) +void CvsServicePartImpl::addToIgnoreList( const TQString &projectDirectory, const KURL &url ) { kdDebug(9006) << k_funcinfo << endl; @@ -263,7 +263,7 @@ void CvsServicePartImpl::addToIgnoreList( const QString &projectDirectory, const cvsdir.ignoreFile( url.fileName() ); } -void CvsServicePartImpl::addToIgnoreList( const QString &projectDirectory, const KURL::List &urls ) +void CvsServicePartImpl::addToIgnoreList( const TQString &projectDirectory, const KURL::List &urls ) { for (size_t i=0; i<urls.count(); ++i) { @@ -273,17 +273,17 @@ void CvsServicePartImpl::addToIgnoreList( const QString &projectDirectory, const /////////////////////////////////////////////////////////////////////////////// -void CvsServicePartImpl::removeFromIgnoreList( const QString &/*projectDirectory*/, const KURL &url ) +void CvsServicePartImpl::removeFromIgnoreList( const TQString &/*projectDirectory*/, const KURL &url ) { kdDebug(9006) << k_funcinfo << endl; - QStringList ignoreLines; + TQStringList ignoreLines; CVSDir cvsdir( url.directory() ); cvsdir.doNotIgnoreFile( url.fileName() ); } -void CvsServicePartImpl::removeFromIgnoreList( const QString &projectDirectory, const KURL::List &urls ) +void CvsServicePartImpl::removeFromIgnoreList( const TQString &projectDirectory, const KURL::List &urls ) { for (size_t i=0; i<urls.count(); ++i) { @@ -293,7 +293,7 @@ void CvsServicePartImpl::removeFromIgnoreList( const QString &projectDirectory, /////////////////////////////////////////////////////////////////////////////// -bool CvsServicePartImpl::isValidDirectory( const QDir &dir ) const +bool CvsServicePartImpl::isValidDirectory( const TQDir &dir ) const { CVSDir cvsdir( dir ); @@ -316,9 +316,9 @@ KDevMainWindow *CvsServicePartImpl::mainWindow() const /////////////////////////////////////////////////////////////////////////////// -QString CvsServicePartImpl::projectDirectory() const +TQString CvsServicePartImpl::projectDirectory() const { - return m_part->project() ? m_part->project()->projectDirectory() : QString::null; + return m_part->project() ? m_part->project()->projectDirectory() : TQString::null; } /////////////////////////////////////////////////////////////////////////////// @@ -361,7 +361,7 @@ bool CvsServicePartImpl::checkout() CheckoutDialog dlg( m_cvsService, mainWindow()->main()->centralWidget() ); - if ( dlg.exec() == QDialog::Accepted ) + if ( dlg.exec() == TQDialog::Accepted ) { DCOPRef job = m_cvsService->checkout( dlg.workDir(), dlg.serverPath(), dlg.module(), dlg.tag(), dlg.pruneDirs(), "", false @@ -374,7 +374,7 @@ bool CvsServicePartImpl::checkout() modulePath = dlg.workDir() + dlg.module(); m_scheduler->schedule( job ); - connect( processWidget(), SIGNAL(jobFinished(bool,int)), this, SLOT(slotCheckoutFinished(bool,int)) ); + connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)), this, TQT_SLOT(slotCheckoutFinished(bool,int)) ); return true; } } @@ -392,11 +392,11 @@ void CvsServicePartImpl::commit( const KURL::List& urlList ) return; CommitDialog dlg( projectDirectory() + "/ChangeLog" ); - if (dlg.exec() == QDialog::Rejected) + if (dlg.exec() == TQDialog::Rejected) return; CvsOptions *options = CvsOptions::instance(); - QString logString = dlg.logMessage().join( "\n" ); + TQString logString = dlg.logMessage().join( "\n" ); DCOPRef cvsJob = m_cvsService->commit( fileList(), logString, options->recursiveWhenCommitRemove() ); if (!m_cvsService->ok()) @@ -406,7 +406,7 @@ void CvsServicePartImpl::commit( const KURL::List& urlList ) } m_scheduler->schedule( cvsJob ); - connect( processWidget(), SIGNAL(jobFinished(bool,int)), this, SLOT(slotJobFinished(bool,int)) ); + connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)), this, TQT_SLOT(slotJobFinished(bool,int)) ); // 2. if requested to do so, add an entry to the Changelog too if (dlg.mustAddToChangeLog()) @@ -434,10 +434,10 @@ void CvsServicePartImpl::update( const KURL::List& urlList ) CvsOptions *options = CvsOptions::instance(); ReleaseInputDialog dlg( mainWindow()->main()->centralWidget() ); - if (dlg.exec() == QDialog::Rejected) + if (dlg.exec() == TQDialog::Rejected) return; - QString additionalOptions = dlg.release(); + TQString additionalOptions = dlg.release(); if (dlg.isRevert()) additionalOptions = additionalOptions + " " + options->revertOptions(); @@ -448,7 +448,7 @@ void CvsServicePartImpl::update( const KURL::List& urlList ) additionalOptions ); m_scheduler->schedule( cvsJob ); - connect( processWidget(), SIGNAL(jobFinished(bool,int)), this, SLOT(slotJobFinished(bool,int)) ); + connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)), this, TQT_SLOT(slotJobFinished(bool,int)) ); doneOperation(); } @@ -465,7 +465,7 @@ void CvsServicePartImpl::add( const KURL::List& urlList, bool binary ) DCOPRef cvsJob = m_cvsService->add( fileList(), binary ); m_scheduler->schedule( cvsJob ); - connect( processWidget(), SIGNAL(jobFinished(bool,int)), this, SLOT(slotJobFinished(bool,int)) ); + connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)), this, TQT_SLOT(slotJobFinished(bool,int)) ); doneOperation(); } @@ -480,18 +480,18 @@ void CvsServicePartImpl::annotate( const KURL::List& urlList ) return; //get the directory of the file we want to annotate - QString tagFilename = URLUtil::directory(projectDirectory()+"/"+fileList()[0]); + TQString tagFilename = URLUtil::directory(projectDirectory()+"/"+fileList()[0]); //CVS stores tag information in the ./CVS/Tag file tagFilename += "/CVS/Tag"; //Check if such a Tag file exists, and try to read the tag/branch from it - QFile fileTag(tagFilename); - QString strRev = ""; //default revision is empty ... + TQFile fileTag(tagFilename); + TQString strRev = ""; //default revision is empty ... if (fileTag.exists()) { //... but if there is a Tag file, we get the revision from there if ( fileTag.open( IO_ReadOnly ) ) { - QTextStream stream( &fileTag ); - QString line; + TQTextStream stream( &fileTag ); + TQString line; line = stream.readLine(); if (line.startsWith("T")) { //the line always starts with a "T"... strRev = line.right(line.length()-1); //...and after this there is the tag name @@ -531,7 +531,7 @@ void CvsServicePartImpl::unedit( const KURL::List& urlList) DCOPRef cvsJob = m_cvsService->unedit( fileList() ); m_scheduler->schedule( cvsJob ); - connect( processWidget(), SIGNAL(jobFinished(bool,int)), this, SLOT(slotJobFinished(bool,int)) ); + connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)), this, TQT_SLOT(slotJobFinished(bool,int)) ); doneOperation(); } @@ -548,7 +548,7 @@ void CvsServicePartImpl::edit( const KURL::List& urlList) DCOPRef cvsJob = m_cvsService->edit( fileList() ); m_scheduler->schedule( cvsJob ); - connect( processWidget(), SIGNAL(jobFinished(bool,int)), this, SLOT(slotJobFinished(bool,int)) ); + connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)), this, TQT_SLOT(slotJobFinished(bool,int)) ); doneOperation(); } @@ -582,8 +582,8 @@ void CvsServicePartImpl::remove( const KURL::List& urlList ) DCOPRef cvsJob = m_cvsService->remove( fileList(), true ); m_scheduler->schedule( cvsJob ); - connect( processWidget(), SIGNAL(jobFinished(bool,int)), - this, SLOT(slotJobFinished(bool,int)) ); + connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)), + this, TQT_SLOT(slotJobFinished(bool,int)) ); doneOperation(); } @@ -606,8 +606,8 @@ void CvsServicePartImpl::removeStickyFlag( const KURL::List& urlList ) "-A" ); m_scheduler->schedule( cvsJob ); - connect( processWidget(), SIGNAL(jobFinished(bool,int)), - this, SLOT(slotJobFinished(bool,int)) ); + connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)), + this, TQT_SLOT(slotJobFinished(bool,int)) ); doneOperation(); } @@ -642,7 +642,7 @@ void CvsServicePartImpl::diff( const KURL::List& urlList ) CVSEntry entry = cvsdir.fileStatus( urlList[0].fileName() ); DiffDialog dlg(entry); - if (dlg.exec() != QDialog::Accepted) + if (dlg.exec() != TQDialog::Accepted) return; CvsOptions *options = CvsOptions::instance(); @@ -656,8 +656,8 @@ void CvsServicePartImpl::diff( const KURL::List& urlList ) } m_scheduler->schedule( cvsJob ); - connect( processWidget(), SIGNAL(jobFinished(bool,int)), - this, SLOT(slotDiffFinished(bool,int)) ); + connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)), + this, TQT_SLOT(slotDiffFinished(bool,int)) ); doneOperation(); } @@ -673,15 +673,15 @@ void CvsServicePartImpl::tag( const KURL::List& urlList ) TagDialog dlg( i18n("Creating Tag/Branch for files ..."), mainWindow()->main()->centralWidget() ); - if (dlg.exec() != QDialog::Accepted) + if (dlg.exec() != TQDialog::Accepted) return; DCOPRef cvsJob = m_cvsService->createTag( fileList(), dlg.tagName(), dlg.isBranch(), dlg.force() ); m_scheduler->schedule( cvsJob ); - connect( processWidget(), SIGNAL(jobFinished(bool,int)), - this, SLOT(slotJobFinished(bool,int)) ); + connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)), + this, TQT_SLOT(slotJobFinished(bool,int)) ); doneOperation(); } @@ -698,15 +698,15 @@ void CvsServicePartImpl::unTag( const KURL::List& urlList ) TagDialog dlg( i18n("Removing Tag from files ..."), mainWindow()->main()->centralWidget() ); dlg.tagAsBranchCheck->hide(); - if (dlg.exec() != QDialog::Accepted) + if (dlg.exec() != TQDialog::Accepted) return; DCOPRef cvsJob = m_cvsService->deleteTag( fileList(), dlg.tagName(), dlg.isBranch(), dlg.force() ); m_scheduler->schedule( cvsJob ); - connect( processWidget(), SIGNAL(jobFinished(bool,int)), - this, SLOT(slotJobFinished(bool,int)) ); + connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)), + this, TQT_SLOT(slotJobFinished(bool,int)) ); doneOperation(); } @@ -731,34 +731,34 @@ void CvsServicePartImpl::removeFromIgnoreList( const KURL::List& urlList ) * \FIXME Current implementation doesn't use CvsService :-( I just ported the * old code which relies on buildcvs.sh script. [marios] */ -void CvsServicePartImpl::createNewProject( const QString &dirName, - const QString &cvsRsh, const QString &location, - const QString &message, const QString &module, const QString &vendor, - const QString &release, bool mustInitRoot ) +void CvsServicePartImpl::createNewProject( const TQString &dirName, + const TQString &cvsRsh, const TQString &location, + const TQString &message, const TQString &module, const TQString &vendor, + const TQString &release, bool mustInitRoot ) { - kdDebug( 9006 ) << "====> CvsServicePartImpl::createNewProject( const QString& )" << endl; + kdDebug( 9006 ) << "====> CvsServicePartImpl::createNewProject( const TQString& )" << endl; CvsOptions *options = CvsOptions::instance(); options->setCvsRshEnvVar( cvsRsh ); options->setLocation( location ); /* - //virtual DCOPRef import( const QString& workingDir, const QString& repository, const QString& module, const QString& ignoreList, const QString& comment, const - QString filesToIgnore; + //virtual DCOPRef import( const TQString& workingDir, const TQString& repository, const TQString& module, const TQString& ignoreList, const TQString& comment, const + TQString filesToIgnore; DCOPRef cvsJob = m_cvsService->import( dirName, location, module, filesToIgnore, message, vendor, release, false ); m_scheduler->schedule( cvsJob ); - connect( processWidget(), SIGNAL(jobFinished(bool,int)), this, SLOT(slotCheckoutFinished(bool,int)) ); + connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)), this, TQT_SLOT(slotCheckoutFinished(bool,int)) ); */ - QString rsh_preamble; + TQString rsh_preamble; if ( !options->cvsRshEnvVar().isEmpty() ) rsh_preamble = "CVS_RSH=" + KShellProcess::quote( options->cvsRshEnvVar() ); - QString init; + TQString init; if (mustInitRoot) { init = rsh_preamble + " cvs -d " + KShellProcess::quote( options->location() ) + " init && "; } - QString cmdLine = init + "cd " + KShellProcess::quote(dirName) + + TQString cmdLine = init + "cd " + KShellProcess::quote(dirName) + " && " + rsh_preamble + " cvs -d " + KShellProcess::quote(options->location()) + " import -m " + KShellProcess::quote(message) + " " + @@ -782,13 +782,13 @@ void CvsServicePartImpl::createNewProject( const QString &dirName, bool CvsServicePartImpl::requestCvsService() { - QCString appId; - QString error; + TQCString appId; + TQString error; if (KApplication::startServiceByDesktopName( "cvsservice", - QStringList(), &error, &appId )) + TQStringList(), &error, &appId )) { - QString msg = i18n( "Unable to find the Cervisia KPart. \n" + TQString msg = i18n( "Unable to find the Cervisia KPart. \n" "Cervisia Integration will not be available. Please check your\n" "Cervisia installation and re-try. Reason was:\n" ) + error; KMessageBox::error( processWidget(), msg, "DCOP Error" ); @@ -825,11 +825,11 @@ void CvsServicePartImpl::flushJobs() /////////////////////////////////////////////////////////////////////////////// -void CvsServicePartImpl::addFilesToProject( const QStringList &filesToAdd ) +void CvsServicePartImpl::addFilesToProject( const TQStringList &filesToAdd ) { kdDebug( 9006 ) << k_funcinfo << " " << filesToAdd << endl; - QStringList filesInCVS = checkFileListAgainstCVS( filesToAdd ); + TQStringList filesInCVS = checkFileListAgainstCVS( filesToAdd ); if (filesInCVS.isEmpty()) return; @@ -853,11 +853,11 @@ void CvsServicePartImpl::addFilesToProject( const QStringList &filesToAdd ) /////////////////////////////////////////////////////////////////////////////// -void CvsServicePartImpl::removedFilesFromProject(const QStringList &filesToRemove) +void CvsServicePartImpl::removedFilesFromProject(const TQStringList &filesToRemove) { kdDebug( 9006 ) << k_funcinfo << endl; - QStringList filesInCVS = checkFileListAgainstCVS( filesToRemove ); + TQStringList filesInCVS = checkFileListAgainstCVS( filesToRemove ); if (filesInCVS.isEmpty()) return; @@ -878,15 +878,15 @@ void CvsServicePartImpl::removedFilesFromProject(const QStringList &filesToRemov /////////////////////////////////////////////////////////////////////////////// -QStringList CvsServicePartImpl::checkFileListAgainstCVS( const QStringList &filesToCheck ) const +TQStringList CvsServicePartImpl::checkFileListAgainstCVS( const TQStringList &filesToCheck ) const { - QStringList filesInCVS; - for (QStringList::const_iterator it = filesToCheck.begin(); it != filesToCheck.end(); ++it ) + TQStringList filesInCVS; + for (TQStringList::const_iterator it = filesToCheck.begin(); it != filesToCheck.end(); ++it ) { - const QString &fn = (*it); - QFileInfo fi( fn ); + const TQString &fn = (*it); + TQFileInfo fi( fn ); if (fi.isRelative()) - fi = projectDirectory() + QDir::separator() + fn; + fi = projectDirectory() + TQDir::separator() + fn; if (isValidDirectory( fi.dirPath( true ) )) filesInCVS += ( fi.filePath() ); } @@ -915,7 +915,7 @@ void CvsServicePartImpl::slotDiffFinished( bool normalExit, int exitStatus ) { core()->running( m_part, false ); - QString diff = processWidget()->output().join("\n"), + TQString diff = processWidget()->output().join("\n"), err = processWidget()->errors().join("\n"); kdDebug( 9006 ) << "diff = " << diff << endl; @@ -946,7 +946,7 @@ void CvsServicePartImpl::slotDiffFinished( bool normalExit, int exitStatus ) { int s = KMessageBox::warningContinueCancelList( 0, i18n("CVS output errors during diff. Do you still want to continue?"), - QStringList::split( "\n", err, false ), i18n("Errors During Diff") + TQStringList::split( "\n", err, false ), i18n("Errors During Diff") ); if ( s != KMessageBox::Continue ) return; @@ -971,7 +971,7 @@ void CvsServicePartImpl::slotCheckoutFinished( bool exitStatus, int ) << exitStatus << endl; // Return a null string if the operation was not succesfull if (!exitStatus) - modulePath = QString::null; + modulePath = TQString::null; kdDebug(9006) << " I'll emit modulePath == " << modulePath << endl; diff --git a/vcs/cvsservice/cvspartimpl.h b/vcs/cvsservice/cvspartimpl.h index e5087f68..638e4907 100644 --- a/vcs/cvsservice/cvspartimpl.h +++ b/vcs/cvsservice/cvspartimpl.h @@ -12,9 +12,9 @@ #ifndef CVSPARTIMPL_H #define CVSPARTIMPL_H -#include <qobject.h> -#include <qstringlist.h> -#include <qguardedptr.h> +#include <tqobject.h> +#include <tqstringlist.h> +#include <tqguardedptr.h> #include <kurl.h> #include <kdevversioncontrol.h> @@ -171,15 +171,15 @@ public: * @param release release tag * @param mustInitRoot if true will attempt to initialize $CVSROOT if not already prepared */ - virtual void createNewProject( const QString &dirName, - const QString &cvsRsh, const QString &location, - const QString &message, const QString &module, const QString &vendor, - const QString &release, bool mustInitRoot ); + virtual void createNewProject( const TQString &dirName, + const TQString &cvsRsh, const TQString &location, + const TQString &message, const TQString &module, const TQString &vendor, + const TQString &release, bool mustInitRoot ); /** * @return true if the directory is valid as CVS directory (has the /CVS/ dir inside) (FORWARDER) */ - virtual bool isValidDirectory( const QDir &dir ) const; + virtual bool isValidDirectory( const TQDir &dir ) const; /** * @return a reference to the custom FileInforProvider object (FORWARDER) */ @@ -201,13 +201,13 @@ public: CvsProcessWidget *processWidget() const; signals: - void warning( const QString &msg ); + void warning( const TQString &msg ); /** * Emitted when the component has terminated checkout operation * @param checkedDir directory where the module has been checked out * (will be empty if the operation failed) */ - void checkoutFinished( QString checkedDir ); + void checkoutFinished( TQString checkedDir ); private slots: void slotJobFinished( bool normalExit, int exitStatus ); @@ -237,7 +237,7 @@ private: /** * @return true if the @p url is present in CVS/Entry file */ - static bool isRegisteredInRepository( const QString &projectDirectory, const KURL &url ); + static bool isRegisteredInRepository( const TQString &projectDirectory, const KURL &url ); /** * Ideally this function will take a bunch of URLs and validate them (they are valid files, * are files registered in CVS, are on a supported filesystem, ...). Currently checks @@ -246,7 +246,7 @@ private: * @param urls list of KURL to check (the list can be modified during the operation) * @param op type of cvs operation, as pecified in @see CvsOperation enum */ - static void validateURLs( const QString &projectDirectory, KURL::List &urls, CvsOperation op ); + static void validateURLs( const TQString &projectDirectory, KURL::List &urls, CvsOperation op ); /** * Add file to it's respective ignore list. This means that, for example, if you @@ -255,7 +255,7 @@ private: * @param projectDirectory * @param url url to be added to the check list. */ - static void addToIgnoreList( const QString &projectDirectory, const KURL &url ); + static void addToIgnoreList( const TQString &projectDirectory, const KURL &url ); /** * Add files to their respective ignore list. This means that, for example, if you @@ -264,7 +264,7 @@ private: * @param projectDirectory * @param urls list of urls to be added to the check list. */ - static void addToIgnoreList( const QString &projectDirectory, const KURL::List &urls ); + static void addToIgnoreList( const TQString &projectDirectory, const KURL::List &urls ); /** * Remove file from it's respective .ignore files. As specified for @see addToIgnoreList @@ -275,7 +275,7 @@ private: * @param projectDirectory * @param url url to be removed from the check list. */ - static void removeFromIgnoreList( const QString &projectDirectory, const KURL &url ); + static void removeFromIgnoreList( const TQString &projectDirectory, const KURL &url ); /** * Remove files from their respective .ignore files. As specified for @see addToIgnoreList @@ -286,32 +286,32 @@ private: * @param projectDirectory * @param urls list of urls to be removed from the check list. */ - static void removeFromIgnoreList( const QString &projectDirectory, const KURL::List &urls ); + static void removeFromIgnoreList( const TQString &projectDirectory, const KURL::List &urls ); /** * Implementation for requesting user input when files are added to project */ - void addFilesToProject( const QStringList &filesToAdd ); + void addFilesToProject( const TQStringList &filesToAdd ); /** * Implementation for requesting user input when files are removed from project */ - void removedFilesFromProject(const QStringList &filesToRemove); + void removedFilesFromProject(const TQStringList &filesToRemove); /** * Check each file in the list against CVS and returns a new list with the files * currently registered in the repository: if none is registered the returned list * is (quite rightly) empty. */ - QStringList checkFileListAgainstCVS( const QStringList &filesToCheck ) const; + TQStringList checkFileListAgainstCVS( const TQStringList &filesToCheck ) const; //! Changelog filename (currently "CHANGELOG" ) - static const QString changeLogFileName; + static const TQString changeLogFileName; //! Four spaces for every log line (except the first which includes the //! developers name) - static const QString changeLogPrependString; + static const TQString changeLogPrependString; // Internal short-cuts KDevMainWindow *mainWindow() const; KDevCore *core() const; - QString projectDirectory() const; + TQString projectDirectory() const; KDevDiffFrontend *diffFrontend() const; /** Locate and setup DCOP CvsService */ @@ -323,7 +323,7 @@ private: Repository_stub *m_repository; /** Used for storing module path between start and ending of check-out */ - QString modulePath; + TQString modulePath; CVSFileInfoProvider *m_fileInfoProvider; JobScheduler *m_scheduler; @@ -332,7 +332,7 @@ private: //! Reference to widget integrated in the "bottom tabbar" (IDEAL) //! (_Must_ be initialized by derived class) - QGuardedPtr<CvsProcessWidget> m_widget; + TQGuardedPtr<CvsProcessWidget> m_widget; //! Urls which to work upon const KURL::List &urlList() const; @@ -342,7 +342,7 @@ private: * @return These are the file path contained in the urls provided for convenience * has been requested for. */ - QStringList fileList( bool relativeToProjectDir = true ) const; + TQStringList fileList( bool relativeToProjectDir = true ) const; /** Last operation type: we save it so we can retrieve and use in slot*Exited() */ CvsOperation lastOperation() const; diff --git a/vcs/cvsservice/cvsprocesswidget.cpp b/vcs/cvsservice/cvsprocesswidget.cpp index 2d41a356..d2e78da6 100644 --- a/vcs/cvsservice/cvsprocesswidget.cpp +++ b/vcs/cvsservice/cvsprocesswidget.cpp @@ -9,8 +9,8 @@ * * ***************************************************************************/ -#include <qpainter.h> -#include <qregexp.h> +#include <tqpainter.h> +#include <tqregexp.h> #include <dcopref.h> #include <kstatusbar.h> @@ -43,41 +43,41 @@ int g_dcopErrCounter = 0; #endif -CvsProcessWidget::CvsProcessWidget( CvsService_stub *service, CvsServicePart *part, QWidget *parent, const char *name ) +CvsProcessWidget::CvsProcessWidget( CvsService_stub *service, CvsServicePart *part, TQWidget *parent, const char *name ) : DCOPObject( "CvsProcessWidgetDCOPIface" ), - QTextEdit( parent, name ), + TQTextEdit( parent, name ), m_part( part ), m_service( service ), m_job( 0 ) { setReadOnly( true ); setTextFormat( Qt::LogText ); - QStyleSheetItem *style = 0; - style = new QStyleSheetItem( styleSheet(), "goodtag" ); + TQStyleSheetItem *style = 0; + style = new TQStyleSheetItem( styleSheet(), "goodtag" ); style->setColor( "black" ); - style = new QStyleSheetItem( styleSheet(), "errortag" ); + style = new TQStyleSheetItem( styleSheet(), "errortag" ); style->setColor( "red" ); - style->setFontWeight( QFont::Bold ); + style->setFontWeight( TQFont::Bold ); - style = new QStyleSheetItem( styleSheet(), "infotag" ); + style = new TQStyleSheetItem( styleSheet(), "infotag" ); style->setColor( "blue" ); - style = new QStyleSheetItem( styleSheet(), "cvs_conflict" ); + style = new TQStyleSheetItem( styleSheet(), "cvs_conflict" ); style->setColor( "red" ); - style = new QStyleSheetItem( styleSheet(), "cvs_added" ); + style = new TQStyleSheetItem( styleSheet(), "cvs_added" ); style->setColor( "green" ); - style = new QStyleSheetItem( styleSheet(), "cvs_removed" ); + style = new TQStyleSheetItem( styleSheet(), "cvs_removed" ); style->setColor( "yellow" ); - style = new QStyleSheetItem( styleSheet(), "cvs_updated" ); + style = new TQStyleSheetItem( styleSheet(), "cvs_updated" ); style->setColor( "lightblue" ); - style = new QStyleSheetItem( styleSheet(), "cvs_modified" ); + style = new TQStyleSheetItem( styleSheet(), "cvs_modified" ); style->setColor( "darkgreen" ); - style = new QStyleSheetItem( styleSheet(), "cvs_unknown" ); + style = new TQStyleSheetItem( styleSheet(), "cvs_unknown" ); style->setColor( "gray" ); } @@ -105,9 +105,9 @@ bool CvsProcessWidget::isAlreadyWorking() const void CvsProcessWidget::clear() { - QTextEdit::clear(); - this->m_errors = QString::null; - this->m_output = QString::null; + TQTextEdit::clear(); + this->m_errors = TQString::null; + this->m_output = TQString::null; } /////////////////////////////////////////////////////////////////////////////// @@ -130,17 +130,17 @@ bool CvsProcessWidget::startJob( const DCOPRef &aJob ) // establish connections to the signals of the cvs m_job connectDCOPSignal( m_job->app(), m_job->obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true ); - connectDCOPSignal( m_job->app(), m_job->obj(), "receivedStdout(QString)", "slotReceivedOutput(QString)", true ); - connectDCOPSignal( m_job->app(), m_job->obj(), "receivedStderr(QString)", "slotReceivedErrors(QString)", true ); + connectDCOPSignal( m_job->app(), m_job->obj(), "receivedStdout(TQString)", "slotReceivedOutput(TQString)", true ); + connectDCOPSignal( m_job->app(), m_job->obj(), "receivedStderr(TQString)", "slotReceivedErrors(TQString)", true ); // get command line and add it to output buffer - QString cmdLine = m_job->cvsCommand(); + TQString cmdLine = m_job->cvsCommand(); m_part->mainWindow()->statusBar()->message( cmdLine ); kdDebug(9006) << "Running: " << cmdLine << endl; // disconnect 3rd party slots from our signals - disconnect( SIGNAL(jobFinished(bool, int)) ); + disconnect( TQT_SIGNAL(jobFinished(bool, int)) ); showInfo( i18n("Started job: %1").arg( cmdLine ) ); @@ -181,12 +181,12 @@ void CvsProcessWidget::slotJobExited( bool normalExit, int exitStatus ) if (m_job) { disconnectDCOPSignal( m_job->app(), m_job->obj(), "jobExited(bool, int)", "slotJobExited(bool, int)" ); - disconnectDCOPSignal( m_job->app(), m_job->obj(), "receivedStdout(QString)", "slotReceivedOutput(QString)" ); - disconnectDCOPSignal( m_job->app(), m_job->obj(), "receivedStderr(QString)", "slotReceivedErrors(QString)" ); + disconnectDCOPSignal( m_job->app(), m_job->obj(), "receivedStdout(TQString)", "slotReceivedOutput(TQString)" ); + disconnectDCOPSignal( m_job->app(), m_job->obj(), "receivedStderr(TQString)", "slotReceivedErrors(TQString)" ); delete m_job; m_job = 0; } - QString exitMsg = i18n("Job finished with exitCode == %1"); + TQString exitMsg = i18n("Job finished with exitCode == %1"); showInfo( exitMsg.arg( exitStatus) ); m_part->core()->running( m_part, false ); @@ -197,15 +197,15 @@ void CvsProcessWidget::slotJobExited( bool normalExit, int exitStatus ) /////////////////////////////////////////////////////////////////////////////// -void CvsProcessWidget::slotReceivedOutput( QString someOutput ) +void CvsProcessWidget::slotReceivedOutput( TQString someOutput ) { - kdDebug(9006) << "CvsProcessWidget::slotReceivedOutput(QString) here!" << endl; + kdDebug(9006) << "CvsProcessWidget::slotReceivedOutput(TQString) here!" << endl; #ifdef MYDCOPDEBUG g_dcopOutCounter++; kdDebug(9006) << "MYDCOPDEBUG: dcopOutCounter == " << g_dcopOutCounter << endl; #endif - QStringList strings = m_outputBuffer.process( someOutput ); + TQStringList strings = m_outputBuffer.process( someOutput ); if (strings.count() > 0) { m_output += strings; @@ -216,15 +216,15 @@ void CvsProcessWidget::slotReceivedOutput( QString someOutput ) /////////////////////////////////////////////////////////////////////////////// -void CvsProcessWidget::slotReceivedErrors( QString someErrors ) +void CvsProcessWidget::slotReceivedErrors( TQString someErrors ) { - kdDebug(9006) << "CvsProcessWidget::slotReceivedErrors(QString) here!" << endl; + kdDebug(9006) << "CvsProcessWidget::slotReceivedErrors(TQString) here!" << endl; #ifdef MYDCOPDEBUG g_dcopErrCounter++; kdDebug(9006) << "MYDCOPDEBUG: dcopErrCounter == " << g_dcopErrCounter << endl; #endif - QStringList strings = m_errorBuffer.process( someErrors ); + TQStringList strings = m_errorBuffer.process( someErrors ); if (strings.count() > 0) { m_errors += strings; @@ -235,35 +235,35 @@ void CvsProcessWidget::slotReceivedErrors( QString someErrors ) /////////////////////////////////////////////////////////////////////////////// -void CvsProcessWidget::showInfo( const QStringList &msg ) +void CvsProcessWidget::showInfo( const TQStringList &msg ) { - for (QStringList::const_iterator it = msg.begin(); it != msg.end(); ++it) + for (TQStringList::const_iterator it = msg.begin(); it != msg.end(); ++it) append( "<infotag>" + (*it) + "</infotag>" ); } /////////////////////////////////////////////////////////////////////////////// -void CvsProcessWidget::showError( const QStringList &msg ) +void CvsProcessWidget::showError( const TQStringList &msg ) { - for (QStringList::const_iterator it = msg.begin(); it != msg.end(); ++it) + for (TQStringList::const_iterator it = msg.begin(); it != msg.end(); ++it) append( "<errortag>" + (*it) + "</errortag>" ); } /////////////////////////////////////////////////////////////////////////////// -void CvsProcessWidget::showOutput( const QStringList &msg ) +void CvsProcessWidget::showOutput( const TQStringList &msg ) { - for (QStringList::const_iterator it = msg.begin(); it != msg.end(); ++it) + for (TQStringList::const_iterator it = msg.begin(); it != msg.end(); ++it) { // @todo here we can interpret lines as [C], [M], ... - const QString &line = (*it); + const TQString &line = (*it); //If the line already contains tags we need to replace the //delimiters with the corresponding HTML code so that they are no longer //recognized as tags. - //This will prevent QTextEdit from crashing on trying to parse the tags. + //This will prevent TQTextEdit from crashing on trying to parse the tags. //This should fix BUG:99590 - QString lineNew(line); + TQString lineNew(line); lineNew.replace("<", "<"); lineNew.replace(">", ">"); lineNew.replace("&", "&"); diff --git a/vcs/cvsservice/cvsprocesswidget.h b/vcs/cvsservice/cvsprocesswidget.h index cb55205c..3a229a45 100644 --- a/vcs/cvsservice/cvsprocesswidget.h +++ b/vcs/cvsservice/cvsprocesswidget.h @@ -12,8 +12,8 @@ #ifndef _CVSPROCESSWIDGET_H_ #define _CVSPROCESSWIDGET_H_ -#include <qtextedit.h> -#include <qstringlist.h> +#include <tqtextedit.h> +#include <tqstringlist.h> #include "cvsservicedcopIface.h" #include "bufferedstringreader.h" @@ -24,12 +24,12 @@ class CvsJob_stub; class CvsService_stub; class QStyleSheetItem; -class CvsProcessWidget : public QTextEdit, virtual public CVSServiceDCOPIface +class CvsProcessWidget : public TQTextEdit, virtual public CVSServiceDCOPIface { Q_OBJECT public: CvsProcessWidget( CvsService_stub *service, CvsServicePart *part, - QWidget *parent, const char *name ); + TQWidget *parent, const char *name ); virtual ~CvsProcessWidget(); bool startJob( const DCOPRef &aJob ); @@ -43,22 +43,22 @@ public: virtual void clear(); - QStringList output() const { return m_output; } - QStringList errors() const { return m_errors; } + TQStringList output() const { return m_output; } + TQStringList errors() const { return m_errors; } //private slots: //! DCOP Iface virtual void slotJobExited( bool normalExit, int exitStatus ); - virtual void slotReceivedOutput( QString someOutput ); - virtual void slotReceivedErrors( QString someErrors ); + virtual void slotReceivedOutput( TQString someOutput ); + virtual void slotReceivedErrors( TQString someErrors ); signals: void jobFinished( bool normalExit, int exitStatus ); private: - void showInfo( const QStringList &msg ); - void showError( const QStringList &msg ); - void showOutput( const QStringList &msg ); + void showInfo( const TQStringList &msg ); + void showError( const TQStringList &msg ); + void showOutput( const TQStringList &msg ); CvsServicePart *m_part; CvsService_stub *m_service; @@ -69,7 +69,7 @@ private: BufferedStringReader m_outputBuffer, m_errorBuffer; - QStringList m_output, + TQStringList m_output, m_errors; }; diff --git a/vcs/cvsservice/cvsservicedcopIface.h b/vcs/cvsservice/cvsservicedcopIface.h index 14cd8629..2f62964b 100644 --- a/vcs/cvsservice/cvsservicedcopIface.h +++ b/vcs/cvsservice/cvsservicedcopIface.h @@ -9,7 +9,7 @@ * * ***************************************************************************/ -#include <qstring.h> +#include <tqstring.h> #include <dcopobject.h> #ifndef __CVSSERVICEDCOPIFACE_H_ @@ -22,8 +22,8 @@ class CVSServiceDCOPIface : virtual public DCOPObject K_DCOP k_dcop: virtual void slotJobExited( bool normalExit, int exitStatus ) = 0; - virtual void slotReceivedOutput( QString someOutput ) = 0; - virtual void slotReceivedErrors( QString someErrors ) = 0; + virtual void slotReceivedOutput( TQString someOutput ) = 0; + virtual void slotReceivedErrors( TQString someErrors ) = 0; }; #endif diff --git a/vcs/cvsservice/diffdialog.cpp b/vcs/cvsservice/diffdialog.cpp index 37ba79fc..9d592c8b 100644 --- a/vcs/cvsservice/diffdialog.cpp +++ b/vcs/cvsservice/diffdialog.cpp @@ -10,21 +10,21 @@ ***************************************************************************/ #include <klineedit.h> -#include <qradiobutton.h> +#include <tqradiobutton.h> #include "diffdialog.h" #include <klocale.h> -#include <qbuttongroup.h> +#include <tqbuttongroup.h> /////////////////////////////////////////////////////////////////////////////// // class DiffDialog /////////////////////////////////////////////////////////////////////////////// -DiffDialog::DiffDialog( const CVSEntry &entry, QWidget *parent, const char *name, WFlags f ) +DiffDialog::DiffDialog( const CVSEntry &entry, TQWidget *parent, const char *name, WFlags f ) : DiffDialogBase( parent, name, true, f) { m_entry = entry; - QString currentRevision = entry.revision(); + TQString currentRevision = entry.revision(); revaEdit->setText(currentRevision); revbEdit->setText(currentRevision); revOtherEdit->setText(currentRevision); @@ -53,7 +53,7 @@ DiffDialog::DiffType DiffDialog::requestedDiff() const /////////////////////////////////////////////////////////////////////////////// -QString DiffDialog::revA() const +TQString DiffDialog::revA() const { if (requestedDiff() == diffArbitrary) return revaEdit->text(); @@ -62,17 +62,17 @@ QString DiffDialog::revA() const else if (requestedDiff() == diffLocalHEAD) return "HEAD"; else - return QString::null; + return TQString::null; } /////////////////////////////////////////////////////////////////////////////// -QString DiffDialog::revB() const +TQString DiffDialog::revB() const { if (requestedDiff()) return this->revbEdit->text(); else - return QString::null; + return TQString::null; } /////////////////////////////////////////////////////////////////////////////// diff --git a/vcs/cvsservice/diffdialog.h b/vcs/cvsservice/diffdialog.h index 12bfc88a..3caa66cf 100644 --- a/vcs/cvsservice/diffdialog.h +++ b/vcs/cvsservice/diffdialog.h @@ -24,11 +24,11 @@ class DiffDialog : public DiffDialogBase { Q_OBJECT public: - DiffDialog(const CVSEntry &entry, QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); + DiffDialog(const CVSEntry &entry, TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); virtual ~DiffDialog(); - QString revA() const; - QString revB() const; + TQString revA() const; + TQString revB() const; private: enum DiffType { diffLocalBASE, diffLocalHEAD, diffLocalOther, diffArbitrary }; diff --git a/vcs/cvsservice/diffwidget.cpp b/vcs/cvsservice/diffwidget.cpp index c51c16b0..87f8494f 100644 --- a/vcs/cvsservice/diffwidget.cpp +++ b/vcs/cvsservice/diffwidget.cpp @@ -9,11 +9,11 @@ * * ***************************************************************************/ -#include <qlayout.h> -#include <qtextedit.h> -#include <qpopupmenu.h> -#include <qcursor.h> -#include <qfile.h> +#include <tqlayout.h> +#include <tqtextedit.h> +#include <tqpopupmenu.h> +#include <tqcursor.h> +#include <tqfile.h> #include <kconfig.h> #include <kapplication.h> @@ -36,10 +36,10 @@ // yup, magic value for the popupmenu-id static const int POPUP_BASE = 130977; -QStringList KDiffTextEdit::extParts; -QStringList KDiffTextEdit::extPartsTranslated; +TQStringList KDiffTextEdit::extParts; +TQStringList KDiffTextEdit::extPartsTranslated; -KDiffTextEdit::KDiffTextEdit( QWidget* parent, const char* name ): QTextEdit( parent, name ) +KDiffTextEdit::KDiffTextEdit( TQWidget* parent, const char* name ): TQTextEdit( parent, name ) { KConfig* config = kapp->config(); config->setGroup( "Diff" ); @@ -56,33 +56,33 @@ KDiffTextEdit::~KDiffTextEdit() config->writeEntry( "Highlight", _highlight ); } -QPopupMenu* KDiffTextEdit::createPopupMenu() +TQPopupMenu* KDiffTextEdit::createPopupMenu() { - return createPopupMenu( QPoint() ); + return createPopupMenu( TQPoint() ); } -QPopupMenu* KDiffTextEdit::createPopupMenu( const QPoint& p ) +TQPopupMenu* KDiffTextEdit::createPopupMenu( const TQPoint& p ) { - QPopupMenu* popup = QTextEdit::createPopupMenu( p ); + TQPopupMenu* popup = TQTextEdit::createPopupMenu( p ); if ( !popup ) - popup = new QPopupMenu( this ); + popup = new TQPopupMenu( this ); int i = 0; - for ( QStringList::Iterator it = extPartsTranslated.begin(); it != extPartsTranslated.end(); ++it ) { + for ( TQStringList::Iterator it = extPartsTranslated.begin(); it != extPartsTranslated.end(); ++it ) { popup->insertItem( i18n( "Show in %1" ).arg( *it ), i + POPUP_BASE, i ); i++; } if ( !extPartsTranslated.isEmpty() ) popup->insertSeparator( i ); - connect( popup, SIGNAL(activated(int)), this, SLOT(popupActivated(int)) ); + connect( popup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(popupActivated(int)) ); - popup->insertItem( SmallIconSet( "filesaveas" ), i18n( "&Save As..." ), this, SLOT(saveAs()), CTRL + Key_S, POPUP_BASE - 2, 0 ); + popup->insertItem( SmallIconSet( "filesaveas" ), i18n( "&Save As..." ), this, TQT_SLOT(saveAs()), CTRL + Key_S, POPUP_BASE - 2, 0 ); popup->setItemEnabled( POPUP_BASE - 2, length() > 0 ); popup->insertSeparator( 1 ); - popup->insertItem( i18n( "Highlight Syntax" ), this, SLOT(toggleSyntaxHighlight()), 0, POPUP_BASE - 1, 2 ); + popup->insertItem( i18n( "Highlight Syntax" ), this, TQT_SLOT(toggleSyntaxHighlight()), 0, POPUP_BASE - 1, 2 ); popup->setItemChecked( POPUP_BASE - 1, _highlight ); popup->insertSeparator( 3 ); @@ -91,13 +91,13 @@ QPopupMenu* KDiffTextEdit::createPopupMenu( const QPoint& p ) void KDiffTextEdit::saveAs() { - QString fName = KFileDialog::getSaveFileName(); + TQString fName = KFileDialog::getSaveFileName(); if ( fName.isEmpty() ) return; - QFile f( fName ); + TQFile f( fName ); if ( f.open( IO_WriteOnly ) ) { - QTextStream stream( &f ); + TQTextStream stream( &f ); int pCount = paragraphs(); for ( int i = 0; i < pCount; ++i ) stream << text( i ) << "\n"; @@ -119,15 +119,15 @@ void KDiffTextEdit::toggleSyntaxHighlight() void KDiffTextEdit::applySyntaxHighlight() { // the diff has been loaded so we apply a simple highlighting - static QColor cAdded( 190, 190, 237); - static QColor cRemoved( 190, 237, 190 ); + static TQColor cAdded( 190, 190, 237); + static TQColor cRemoved( 190, 237, 190 ); if ( !_highlight ) return; int paragCount = paragraphs(); for ( int i = 0; i < paragCount; ++i ) { - QString txt = text( i ); + TQString txt = text( i ); if ( txt.length() > 0 ) { if ( txt.startsWith( "+" ) || txt.startsWith( ">" ) ) { setParagraphBackgroundColor( i, cAdded ); @@ -174,19 +174,19 @@ void KDiffTextEdit::popupActivated( int id ) emit externalPartRequested( extParts[ id ] ); } -DiffWidget::DiffWidget( QWidget *parent, const char *name, WFlags f ): - QWidget( parent, name, f ), tempFile( 0 ) +DiffWidget::DiffWidget( TQWidget *parent, const char *name, WFlags f ): + TQWidget( parent, name, f ), tempFile( 0 ) { job = 0; extPart = 0; te = new KDiffTextEdit( this, "Main Diff Viewer" ); te->setReadOnly( true ); - te->setTextFormat( QTextEdit::PlainText ); + te->setTextFormat( TQTextEdit::PlainText ); // te->setMinimumSize( 300, 200 ); - connect( te, SIGNAL(externalPartRequested(const QString&)), this, SLOT(loadExtPart(const QString&)) ); + connect( te, TQT_SIGNAL(externalPartRequested(const TQString&)), this, TQT_SLOT(loadExtPart(const TQString&)) ); - QVBoxLayout* layout = new QVBoxLayout( this ); + TQVBoxLayout* layout = new TQVBoxLayout( this ); layout->addWidget( te ); } @@ -210,7 +210,7 @@ void DiffWidget::setExtPartVisible( bool visible ) } } -void DiffWidget::loadExtPart( const QString& partName ) +void DiffWidget::loadExtPart( const TQString& partName ) { if ( extPart ) { setExtPartVisible( false ); @@ -242,15 +242,15 @@ void DiffWidget::slotClear() } // internally for the TextEdit only! -void DiffWidget::slotAppend( const QString& str ) +void DiffWidget::slotAppend( const TQString& str ) { te->append( str ); } // internally for the TextEdit only! -void DiffWidget::slotAppend( KIO::Job*, const QByteArray& ba ) +void DiffWidget::slotAppend( KIO::Job*, const TQByteArray& ba ) { - slotAppend( QString( ba ) ); + slotAppend( TQString( ba ) ); } void DiffWidget::populateExtPart() @@ -285,7 +285,7 @@ void DiffWidget::slotFinished() populateExtPart(); } -void DiffWidget::setDiff( const QString& diff ) +void DiffWidget::setDiff( const TQString& diff ) { slotClear(); slotAppend( diff ); @@ -301,20 +301,20 @@ void DiffWidget::openURL( const KURL& url ) if ( !job ) return; - connect( job, SIGNAL(data( KIO::Job *, const QByteArray & )), - this, SLOT(slotAppend( KIO::Job*, const QByteArray& )) ); - connect( job, SIGNAL(result( KIO::Job * )), - this, SLOT(slotFinished()) ); + connect( job, TQT_SIGNAL(data( KIO::Job *, const TQByteArray & )), + this, TQT_SLOT(slotAppend( KIO::Job*, const TQByteArray& )) ); + connect( job, TQT_SIGNAL(result( KIO::Job * )), + this, TQT_SLOT(slotFinished()) ); } -void DiffWidget::contextMenuEvent( QContextMenuEvent* /* e */ ) +void DiffWidget::contextMenuEvent( TQContextMenuEvent* /* e */ ) { - QPopupMenu* popup = new QPopupMenu( this ); + TQPopupMenu* popup = new TQPopupMenu( this ); if ( !te->isVisible() ) - popup->insertItem( i18n("Display &Raw Output"), this, SLOT(showTextEdit()) ); + popup->insertItem( i18n("Display &Raw Output"), this, TQT_SLOT(showTextEdit()) ); - popup->exec( QCursor::pos() ); + popup->exec( TQCursor::pos() ); delete popup; } diff --git a/vcs/cvsservice/diffwidget.h b/vcs/cvsservice/diffwidget.h index d7aaf48c..37bed7ea 100644 --- a/vcs/cvsservice/diffwidget.h +++ b/vcs/cvsservice/diffwidget.h @@ -12,9 +12,9 @@ #ifndef _DIFFWIDGET_H_ #define _DIFFWIDGET_H_ -#include <qwidget.h> -#include <qtextedit.h> -#include <qstringlist.h> +#include <tqwidget.h> +#include <tqtextedit.h> +#include <tqstringlist.h> #include <kurl.h> @@ -33,17 +33,17 @@ class KDiffTextEdit: public QTextEdit { Q_OBJECT public: - KDiffTextEdit( QWidget* parent = 0, const char* name = 0 ); + KDiffTextEdit( TQWidget* parent = 0, const char* name = 0 ); virtual ~KDiffTextEdit(); void applySyntaxHighlight(); void clearSyntaxHighlight(); signals: - void externalPartRequested( const QString& partName ); + void externalPartRequested( const TQString& partName ); protected: - virtual QPopupMenu* createPopupMenu( const QPoint& ); - virtual QPopupMenu* createPopupMenu(); + virtual TQPopupMenu* createPopupMenu( const TQPoint& ); + virtual TQPopupMenu* createPopupMenu(); private slots: void popupActivated( int ); @@ -52,8 +52,8 @@ private slots: private: static void searchExtParts(); - static QStringList extParts; - static QStringList extPartsTranslated; + static TQStringList extParts; + static TQStringList extPartsTranslated; bool _highlight; }; @@ -62,32 +62,32 @@ class DiffWidget : public QWidget Q_OBJECT public: - DiffWidget( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); + DiffWidget( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); virtual ~DiffWidget(); public slots: /** The URL has to point to a diff file */ void openURL( const KURL& url ); /** Pass a diff file in here */ - void setDiff( const QString& diff ); + void setDiff( const TQString& diff ); /** clears the difference viewer */ void slotClear(); private slots: /** appends a piece of "diff" */ - void slotAppend( const QString& str ); + void slotAppend( const TQString& str ); /** overloaded for convenience */ - void slotAppend( KIO::Job*, const QByteArray& ba ); + void slotAppend( KIO::Job*, const TQByteArray& ba ); /** call this when the whole "diff" has been sent. * Don't call slotAppend afterwards! */ void slotFinished(); void showExtPart(); void showTextEdit(); - void loadExtPart( const QString& partName ); + void loadExtPart( const TQString& partName ); protected: - void contextMenuEvent( QContextMenuEvent* e ); + void contextMenuEvent( TQContextMenuEvent* e ); private: void setExtPartVisible( bool visible ); diff --git a/vcs/cvsservice/editorsdialog.cpp b/vcs/cvsservice/editorsdialog.cpp index 12319102..5f26d100 100644 --- a/vcs/cvsservice/editorsdialog.cpp +++ b/vcs/cvsservice/editorsdialog.cpp @@ -15,8 +15,8 @@ #include <kdebug.h> #include <dcopref.h> -#include <qtextbrowser.h> -#include <qregexp.h> +#include <tqtextbrowser.h> +#include <tqregexp.h> #include "editorsdialog.h" @@ -24,7 +24,7 @@ #include <cvsjob_stub.h> #include <cvsservice_stub.h> -EditorsDialog::EditorsDialog(CvsService_stub *cvsService, QWidget *parent, const char *name) +EditorsDialog::EditorsDialog(CvsService_stub *cvsService, TQWidget *parent, const char *name) : DCOPObject( "CvsEditorsDCOPIface"), EditorsDialogBase(parent, name, TRUE, Qt::WDestructiveClose), m_cvsService(cvsService), m_cvsJob(0) { @@ -41,7 +41,7 @@ EditorsDialog::~EditorsDialog() delete m_cvsJob; } -void EditorsDialog::startjob(QString strDir) +void EditorsDialog::startjob(TQString strDir) { kdDebug(9006) << "EditorsDialog::start() workDir = " << strDir << endl; @@ -51,7 +51,7 @@ void EditorsDialog::startjob(QString strDir) // 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(), "receivedStdout(TQString)", "slotReceivedOutput(TQString)", true ); kdDebug(9006) << "Running: " << m_cvsJob->cvsCommand() << endl; m_cvsJob->execute(); @@ -65,23 +65,23 @@ void EditorsDialog::slotJobExited( bool normalExit, int exitStatus ) return; } - static QRegExp re("([^\\s]+)\\s([^\\s]+)\\s([^\\s]+)\\s([^\\s]+)\\s([^\\s]+)\\s" + static TQRegExp re("([^\\s]+)\\s([^\\s]+)\\s([^\\s]+)\\s([^\\s]+)\\s([^\\s]+)\\s" "([^\\s]+)\\s([^\\s]+)\\s([^\\s]+)\\s([^\\s]+)\\s(.*)"); - static QRegExp subre("([^\\s]+)\\s([^\\s]+)\\s([^\\s]+)\\s([^\\s]+)\\s" + static TQRegExp subre("([^\\s]+)\\s([^\\s]+)\\s([^\\s]+)\\s([^\\s]+)\\s" "([^\\s]+)\\s([^\\s]+)\\s([^\\s]+)\\s([^\\s]+)\\s(.*)"); - QString lastfilename; + TQString lastfilename; - QStringList lines = QStringList::split( "\n", m_output ); + TQStringList lines = TQStringList::split( "\n", m_output ); int found = 0; for (size_t i=0; i<lines.count(); ++i) { - QString s = lines[i].simplifyWhiteSpace(); + TQString s = lines[i].simplifyWhiteSpace(); kdDebug(9006) << "editors:---" << s << "---" << endl; kdDebug(9006) << " : lastfile was " << lastfilename << endl; if (re.exactMatch(s)) { - QString file = re.cap( 1 ); - QString locker = re.cap( 2 ); - QString date = re.cap(5)+" "+re.cap(4)+" "+re.cap(7)+" "+re.cap(6); + TQString file = re.cap( 1 ); + TQString locker = re.cap( 2 ); + TQString date = re.cap(5)+" "+re.cap(4)+" "+re.cap(7)+" "+re.cap(6); m_textBrowser->append( "<b>"+i18n("File")+": <code>"+file+"</code></b>" ); m_textBrowser->append( "<b>"+i18n("User")+":</b> "+locker ); @@ -92,9 +92,9 @@ void EditorsDialog::slotJobExited( bool normalExit, int exitStatus ) lastfilename = file; } else { if (subre.exactMatch(s)) { - QString file = lastfilename; - QString locker = subre.cap( 1 ); - QString date = subre.cap(4)+" "+subre.cap(3)+" "+subre.cap(6)+" "+subre.cap(5); + TQString file = lastfilename; + TQString locker = subre.cap( 1 ); + TQString date = subre.cap(4)+" "+subre.cap(3)+" "+subre.cap(6)+" "+subre.cap(5); m_textBrowser->append( "<b>"+i18n("File")+": <code>"+file+"</code></b>" ); m_textBrowser->append( "<b>"+i18n("User")+":</b> "+locker ); @@ -117,7 +117,7 @@ void EditorsDialog::slotJobExited( bool normalExit, int exitStatus ) } } -void EditorsDialog::slotReceivedOutput( QString someOutput ) +void EditorsDialog::slotReceivedOutput( TQString someOutput ) { kdDebug(9006) << "OUTPUT: " << someOutput << endl; @@ -126,7 +126,7 @@ void EditorsDialog::slotReceivedOutput( QString someOutput ) /////////////////////////////////////////////////////////////////////////////// -void EditorsDialog::slotReceivedErrors( QString someErrors ) +void EditorsDialog::slotReceivedErrors( TQString someErrors ) { kdDebug(9006) << "ERRORS: " << someErrors << endl; } diff --git a/vcs/cvsservice/editorsdialog.h b/vcs/cvsservice/editorsdialog.h index 1aedbc64..8feecfaf 100644 --- a/vcs/cvsservice/editorsdialog.h +++ b/vcs/cvsservice/editorsdialog.h @@ -23,21 +23,21 @@ class EditorsDialog: public EditorsDialogBase, virtual public CVSServiceDCOPIfac { Q_OBJECT public: - EditorsDialog(CvsService_stub *cvsService, QWidget *parent = 0, const char *name = 0); + EditorsDialog(CvsService_stub *cvsService, TQWidget *parent = 0, const char *name = 0); virtual ~EditorsDialog(); - void startjob(QString strDir); + void startjob(TQString strDir); private slots: // DCOP Iface virtual void slotJobExited( bool normalExit, int exitStatus ); - virtual void slotReceivedOutput( QString someOutput ); - virtual void slotReceivedErrors( QString someErrors ); + virtual void slotReceivedOutput( TQString someOutput ); + virtual void slotReceivedErrors( TQString someErrors ); private: CvsService_stub *m_cvsService; CvsJob_stub *m_cvsJob; - QString m_output; + TQString m_output; }; #endif diff --git a/vcs/cvsservice/integrator/cvsserviceintegrator.cpp b/vcs/cvsservice/integrator/cvsserviceintegrator.cpp index 617e66a3..1bbc3b11 100644 --- a/vcs/cvsservice/integrator/cvsserviceintegrator.cpp +++ b/vcs/cvsservice/integrator/cvsserviceintegrator.cpp @@ -28,8 +28,8 @@ static const KDevPluginInfo data("kdevcvsserviceintegrator"); typedef KDevGenericFactory<CVSServiceIntegrator> CVSIntegratorFactory; K_EXPORT_COMPONENT_FACTORY( libcvsserviceintegrator, CVSIntegratorFactory(data) ) -CVSServiceIntegrator::CVSServiceIntegrator(QObject* parent, const char* name, - const QStringList args) +CVSServiceIntegrator::CVSServiceIntegrator(TQObject* parent, const char* name, + const TQStringList args) :KDevVCSIntegrator(parent, name) { } @@ -38,12 +38,12 @@ CVSServiceIntegrator::~CVSServiceIntegrator( ) { } -VCSDialog* CVSServiceIntegrator::fetcher(QWidget* parent) +VCSDialog* CVSServiceIntegrator::fetcher(TQWidget* parent) { return 0; } -VCSDialog* CVSServiceIntegrator::integrator(QWidget* parent) +VCSDialog* CVSServiceIntegrator::integrator(TQWidget* parent) { IntegratorDlg *dlg = new IntegratorDlg(this, parent); return dlg; diff --git a/vcs/cvsservice/integrator/cvsserviceintegrator.h b/vcs/cvsservice/integrator/cvsserviceintegrator.h index 12ba8ef8..c02547a4 100644 --- a/vcs/cvsservice/integrator/cvsserviceintegrator.h +++ b/vcs/cvsservice/integrator/cvsserviceintegrator.h @@ -22,16 +22,16 @@ #include <kdevvcsintegrator.h> -#include <qstringlist.h> +#include <tqstringlist.h> class CVSServiceIntegrator: public KDevVCSIntegrator { Q_OBJECT public: - CVSServiceIntegrator(QObject* parent, const char* name, const QStringList args = QStringList()); + CVSServiceIntegrator(TQObject* parent, const char* name, const TQStringList args = TQStringList()); virtual ~CVSServiceIntegrator(); - virtual VCSDialog* fetcher(QWidget* parent); - virtual VCSDialog* integrator(QWidget* parent); + virtual VCSDialog* fetcher(TQWidget* parent); + virtual VCSDialog* integrator(TQWidget* parent); }; diff --git a/vcs/cvsservice/integrator/integratordlg.cpp b/vcs/cvsservice/integrator/integratordlg.cpp index b85b9984..32184c45 100644 --- a/vcs/cvsservice/integrator/integratordlg.cpp +++ b/vcs/cvsservice/integrator/integratordlg.cpp @@ -19,13 +19,13 @@ ***************************************************************************/ #include "integratordlg.h" -#include <qfile.h> -#include <qdir.h> -#include <qlayout.h> -#include <qcombobox.h> -#include <qregexp.h> -#include <qtextstream.h> -#include <qcheckbox.h> +#include <tqfile.h> +#include <tqdir.h> +#include <tqlayout.h> +#include <tqcombobox.h> +#include <tqregexp.h> +#include <tqtextstream.h> +#include <tqcheckbox.h> #include <kapplication.h> #include <kdialogbase.h> @@ -40,17 +40,17 @@ #include "initdlg.h" -IntegratorDlg::IntegratorDlg(CVSServiceIntegrator *integrator, QWidget *parent, const char *name) +IntegratorDlg::IntegratorDlg(CVSServiceIntegrator *integrator, TQWidget *parent, const char *name) :IntegratorDlgBase(parent, name), m_integrator(integrator) { - QFile cvspass(QDir::homeDirPath() + "/.cvspass"); + TQFile cvspass(TQDir::homeDirPath() + "/.cvspass"); if (cvspass.open(IO_ReadOnly)) { - QTextStream stream(&cvspass); + TQTextStream stream(&cvspass); while (!stream.atEnd()) { - QString line = stream.readLine(); - QStringList recs = QStringList::split(" ", line, false); + TQString line = stream.readLine(); + TQStringList recs = TQStringList::split(" ", line, false); repository->insertItem(recs[1]); } cvspass.close(); @@ -61,19 +61,19 @@ void IntegratorDlg::init_clicked() { KDialogBase dlg(KDialogBase::Plain, i18n("Init CVS Repository"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok); dlg.plainPage()->setMargin(0); - (new QVBoxLayout(dlg.plainPage(), 0, 0))->setAutoAdd(true); + (new TQVBoxLayout(dlg.plainPage(), 0, 0))->setAutoAdd(true); InitDlg *initDlg = new InitDlg(dlg.plainPage()); initDlg->show(); initDlg->location->setFocus(); initDlg->location->setMode(KFile::Directory); - QRegExp localrep(":local:(.*)"); + TQRegExp localrep(":local:(.*)"); if (localrep.search(repository->currentText()) != -1) initDlg->location->setURL(localrep.cap(1)); - if (dlg.exec() == QDialog::Accepted) + if (dlg.exec() == TQDialog::Accepted) { - QString url = initDlg->location->url(); + TQString url = initDlg->location->url(); KProcess *proc = new KProcess(); *proc << "cvs"; *proc << "-d" << url << "init"; @@ -84,21 +84,21 @@ void IntegratorDlg::init_clicked() KMessageBox::error(this, i18n("cvs init exited with status %1. Please check if the cvs location is correct.").arg(proc->exitStatus()), i18n("Init CVS Repository")); else { - repository->insertItem(QString(":local:%1").arg(url)); - repository->setCurrentText(QString(":local:%1").arg(url)); + repository->insertItem(TQString(":local:%1").arg(url)); + repository->setCurrentText(TQString(":local:%1").arg(url)); } } } void IntegratorDlg::login_clicked() { - QCString appId; - QString error; + TQCString appId; + TQString error; if (KApplication::startServiceByDesktopName("cvsservice", - QStringList(), &error, &appId)) + TQStringList(), &error, &appId)) { - QString msg = i18n("Unable to find the Cervisia KPart. \n" + TQString msg = i18n("Unable to find the Cervisia KPart. \n" "Cervisia Integration will not be available. Please check your\n" "Cervisia installation and re-try. Reason was:\n") + error; KMessageBox::error(this, msg, "DCOP Error"); @@ -122,7 +122,7 @@ void IntegratorDlg::accept() proc->setWorkingDirectory(m_projectLocation); *proc << "cvs"; *proc << "-d" << repository->currentText() << "import" - << "-m" << QString("\"%1\"").arg(comment->text()) << module->text() + << "-m" << TQString("\"%1\"").arg(comment->text()) << module->text() << vendorTag->text() << releaseTag->text(); proc->start(KProcess::Block); if (!proc->normalExit()) @@ -134,7 +134,7 @@ void IntegratorDlg::accept() kdDebug() << "Project is in: " << m_projectLocation << endl; KURL url = KURL::fromPathOrURL(m_projectLocation); - QString up = url.upURL().path(); + TQString up = url.upURL().path(); kdDebug() << "Up is: " << up << endl; //delete sources in project dir @@ -151,13 +151,13 @@ void IntegratorDlg::accept() coproc->start(KProcess::Block); } -/* QCString appId; - QString error; +/* TQCString appId; + TQString error; if (KApplication::startServiceByDesktopName("cvsservice", - QStringList(), &error, &appId)) + TQStringList(), &error, &appId)) { - QString msg = i18n("Unable to find the Cervisia KPart. \n" + TQString msg = i18n("Unable to find the Cervisia KPart. \n" "Cervisia Integration will not be available. Please check your\n" "Cervisia installation and re-try. Reason was:\n") + error; KMessageBox::error(this, msg, "DCOP Error"); @@ -175,12 +175,12 @@ void IntegratorDlg::createModule_clicked() { } -QWidget *IntegratorDlg::self() +TQWidget *IntegratorDlg::self() { return const_cast<IntegratorDlg*>(this); } -void IntegratorDlg::init(const QString &projectName, const QString &projectLocation) +void IntegratorDlg::init(const TQString &projectName, const TQString &projectLocation) { if( m_projectName != projectName ) module->setText(projectName); diff --git a/vcs/cvsservice/integrator/integratordlg.h b/vcs/cvsservice/integrator/integratordlg.h index f262be18..a69a7a91 100644 --- a/vcs/cvsservice/integrator/integratordlg.h +++ b/vcs/cvsservice/integrator/integratordlg.h @@ -28,10 +28,10 @@ class QDomDocument; class IntegratorDlg: public IntegratorDlgBase, public VCSDialog { Q_OBJECT public: - IntegratorDlg(CVSServiceIntegrator *integrator, QWidget *parent = 0, const char *name = 0); + IntegratorDlg(CVSServiceIntegrator *integrator, TQWidget *parent = 0, const char *name = 0); - virtual QWidget *self(); - virtual void init(const QString &projectName, const QString &projectLocation); + virtual TQWidget *self(); + virtual void init(const TQString &projectName, const TQString &projectLocation); public slots: virtual void login_clicked(); @@ -41,8 +41,8 @@ public slots: private: CVSServiceIntegrator *m_integrator; - QString m_projectLocation; - QString m_projectName; + TQString m_projectLocation; + TQString m_projectName; }; #endif diff --git a/vcs/cvsservice/releaseinputdialog.cpp b/vcs/cvsservice/releaseinputdialog.cpp index 31907769..91685a29 100644 --- a/vcs/cvsservice/releaseinputdialog.cpp +++ b/vcs/cvsservice/releaseinputdialog.cpp @@ -9,10 +9,10 @@ * * ***************************************************************************/ -#include <qlabel.h> +#include <tqlabel.h> #include <klineedit.h> -#include <qcheckbox.h> -#include <qradiobutton.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> #include "releaseinputdialog.h" @@ -20,7 +20,7 @@ // class ReleaseInputDialog /////////////////////////////////////////////////////////////////////////////// -ReleaseInputDialog::ReleaseInputDialog( QWidget* parent) +ReleaseInputDialog::ReleaseInputDialog( TQWidget* parent) : ReleaseInputDialogBase( parent, "releaseinputdialog", true, 0 ) { } @@ -40,14 +40,14 @@ bool ReleaseInputDialog::isRevert() const /////////////////////////////////////////////////////////////////////////////// -QString ReleaseInputDialog::release() const +TQString ReleaseInputDialog::release() const { if (type() == byRevision) return " -r " + revisionEdit->text(); else if (type() == byDate) return " -D " + dateEdit->text(); else - return QString::null; + return TQString::null; } /////////////////////////////////////////////////////////////////////////////// diff --git a/vcs/cvsservice/releaseinputdialog.h b/vcs/cvsservice/releaseinputdialog.h index 5de2c3e6..e00b0b04 100644 --- a/vcs/cvsservice/releaseinputdialog.h +++ b/vcs/cvsservice/releaseinputdialog.h @@ -27,17 +27,17 @@ public: * C-tor * @param parent */ - ReleaseInputDialog( QWidget* parent = 0 ); + ReleaseInputDialog( TQWidget* parent = 0 ); /** * Destructor */ virtual ~ReleaseInputDialog(); /** - * @return a QString formatted as "-r <RELEASE-TAG> " or "-D <RELEASE-DATE> " + * @return a TQString formatted as "-r <RELEASE-TAG> " or "-D <RELEASE-DATE> " * so it can be embedded in the command line. */ - QString release() const; + TQString release() const; /** * @return true if the user has checked "rever": enforce operation then even diff --git a/vcs/cvsservice/tagdialog.cpp b/vcs/cvsservice/tagdialog.cpp index 846cfce9..33aca057 100644 --- a/vcs/cvsservice/tagdialog.cpp +++ b/vcs/cvsservice/tagdialog.cpp @@ -10,7 +10,7 @@ ***************************************************************************/ #include <klineedit.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> #include "tagdialog.h" @@ -18,7 +18,7 @@ // class TagDialog /////////////////////////////////////////////////////////////////////////////// -TagDialog::TagDialog( const QString &caption, QWidget *parent, const char *name ) +TagDialog::TagDialog( const TQString &caption, TQWidget *parent, const char *name ) : TagDialogBase( parent, name ? name : "tagdialog", true ) { if (!caption.isEmpty()) @@ -45,14 +45,14 @@ void TagDialog::accept() /////////////////////////////////////////////////////////////////////////////// -QString TagDialog::tagName() const +TQString TagDialog::tagName() const { return tagBranchEdit->text(); } /////////////////////////////////////////////////////////////////////////////// -QString TagDialog::branchName() const +TQString TagDialog::branchName() const { return tagName(); } diff --git a/vcs/cvsservice/tagdialog.h b/vcs/cvsservice/tagdialog.h index 86b63010..6c34cfe9 100644 --- a/vcs/cvsservice/tagdialog.h +++ b/vcs/cvsservice/tagdialog.h @@ -24,17 +24,17 @@ class TagDialog : public TagDialogBase { Q_OBJECT public: - TagDialog( const QString &caption, QWidget *parent = 0, const char *name = 0 ); + TagDialog( const TQString &caption, TQWidget *parent = 0, const char *name = 0 ); virtual ~TagDialog(); /** * @return the tag name selected by the user */ - QString tagName() const; + TQString tagName() const; /** * @return the branch name selected by the user */ - QString branchName() const; + TQString branchName() const; /** * @return true if the user want to branch the selected files */ |