diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
commit | 4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch) | |
tree | b0a7cd1c184f0003c0292eb416ed27f674f9cc43 /cervisia | |
parent | 1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff) | |
download | tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'cervisia')
107 files changed, 2368 insertions, 2368 deletions
diff --git a/cervisia/addremovedlg.cpp b/cervisia/addremovedlg.cpp index 108ac80e..9bd3671b 100644 --- a/cervisia/addremovedlg.cpp +++ b/cervisia/addremovedlg.cpp @@ -20,52 +20,52 @@ #include "addremovedlg.h" -#include <qfileinfo.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistbox.h> -#include <qstringlist.h> +#include <tqfileinfo.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistbox.h> +#include <tqstringlist.h> #include <kapplication.h> #include <kiconloader.h> #include <klocale.h> -AddRemoveDialog::AddRemoveDialog(ActionType action, QWidget* parent, const char* name) - : KDialogBase(parent, name, true, QString::null, +AddRemoveDialog::AddRemoveDialog(ActionType action, TQWidget* parent, const char* name) + : KDialogBase(parent, name, true, TQString::null, Ok | Cancel | Help, Ok, true) { setCaption( (action==Add)? i18n("CVS Add") : (action==AddBinary)? i18n("CVS Add Binary") : i18n("CVS Remove") ); - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - QLabel *textlabel = new QLabel + TQLabel *textlabel = new QLabel ( (action==Add)? i18n("Add the following files to the repository:") : (action==AddBinary)? i18n("Add the following binary files to the repository:") : i18n("Remove the following files from the repository:") , mainWidget ); layout->addWidget(textlabel); - m_listBox = new QListBox(mainWidget); - m_listBox->setSelectionMode(QListBox::NoSelection); + m_listBox = new TQListBox(mainWidget); + m_listBox->setSelectionMode(TQListBox::NoSelection); layout->addWidget(m_listBox, 5); // Add warning message to dialog when user wants to remove a file if (action==Remove) { - QBoxLayout *warningLayout = new QHBoxLayout; + TQBoxLayout *warningLayout = new QHBoxLayout; - QLabel *warningIcon = new QLabel(mainWidget); + TQLabel *warningIcon = new TQLabel(mainWidget); KIconLoader *loader = kapp->iconLoader(); warningIcon->setPixmap(loader->loadIcon("messagebox_warning", KIcon::NoGroup, KIcon::SizeMedium, KIcon::DefaultState, 0, true)); warningLayout->addWidget(warningIcon); - QLabel *warningText = new QLabel(i18n("This will also remove the files from " + TQLabel *warningText = new TQLabel(i18n("This will also remove the files from " "your local working copy."), mainWidget); warningLayout->addWidget(warningText); @@ -81,15 +81,15 @@ AddRemoveDialog::AddRemoveDialog(ActionType action, QWidget* parent, const char* } -void AddRemoveDialog::setFileList(const QStringList& files) +void AddRemoveDialog::setFileList(const TQStringList& files) { // the dot for the root directory is hard to see, so // we convert it to the absolut path if( files.find(".") != files.end() ) { - QStringList copy(files); + TQStringList copy(files); int idx = copy.findIndex("."); - copy[idx] = QFileInfo(".").absFilePath(); + copy[idx] = TQFileInfo(".").absFilePath(); m_listBox->insertStringList(copy); } diff --git a/cervisia/addremovedlg.h b/cervisia/addremovedlg.h index 06b98260..735199ab 100644 --- a/cervisia/addremovedlg.h +++ b/cervisia/addremovedlg.h @@ -35,12 +35,12 @@ class AddRemoveDialog : public KDialogBase public: enum ActionType { Add, AddBinary, Remove }; - explicit AddRemoveDialog(ActionType action, QWidget* parent=0, const char* name=0); + explicit AddRemoveDialog(ActionType action, TQWidget* parent=0, const char* name=0); - void setFileList(const QStringList& files); + void setFileList(const TQStringList& files); private: - QListBox* m_listBox; + TQListBox* m_listBox; }; #endif diff --git a/cervisia/addrepositorydlg.cpp b/cervisia/addrepositorydlg.cpp index d1d24cb0..c370b02a 100644 --- a/cervisia/addrepositorydlg.cpp +++ b/cervisia/addrepositorydlg.cpp @@ -21,10 +21,10 @@ #include "addrepositorydlg.h" -#include <qcheckbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqcheckbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <kconfig.h> #include <klineedit.h> @@ -32,17 +32,17 @@ #include <knuminput.h> -AddRepositoryDialog::AddRepositoryDialog(KConfig& cfg, const QString& repo, - QWidget* parent, const char* name) +AddRepositoryDialog::AddRepositoryDialog(KConfig& cfg, const TQString& repo, + TQWidget* parent, const char* name) : KDialogBase(parent, name, true, i18n("Add Repository"), Ok | Cancel, Ok, true) , partConfig(cfg) { - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout* layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout* layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - QLabel* repo_label = new QLabel(i18n("&Repository:"), mainWidget); + TQLabel* repo_label = new TQLabel(i18n("&Repository:"), mainWidget); layout->addWidget(repo_label); repo_edit = new KLineEdit(mainWidget); @@ -55,14 +55,14 @@ AddRepositoryDialog::AddRepositoryDialog(KConfig& cfg, const QString& repo, } layout->addWidget(repo_edit); - QLabel* rsh_label = new QLabel(i18n("Use remote &shell (only for :ext: repositories):"), mainWidget); + TQLabel* rsh_label = new TQLabel(i18n("Use remote &shell (only for :ext: repositories):"), mainWidget); layout->addWidget(rsh_label); rsh_edit = new KLineEdit(mainWidget); rsh_label->setBuddy(rsh_edit); layout->addWidget(rsh_edit); - QLabel* server_label = new QLabel(i18n("Invoke this program on the server side:"), + TQLabel* server_label = new TQLabel(i18n("Invoke this program on the server side:"), mainWidget); layout->addWidget(server_label); @@ -70,24 +70,24 @@ AddRepositoryDialog::AddRepositoryDialog(KConfig& cfg, const QString& repo, server_label->setBuddy(server_edit); layout->addWidget(server_edit); - QHBox* compressionBox = new QHBox(mainWidget); - m_useDifferentCompression = new QCheckBox(i18n("Use different &compression level:"), compressionBox); + TQHBox* compressionBox = new TQHBox(mainWidget); + m_useDifferentCompression = new TQCheckBox(i18n("Use different &compression level:"), compressionBox); m_compressionLevel = new KIntNumInput(compressionBox); m_compressionLevel->setRange(0, 9, 1, false); layout->addWidget(compressionBox); - m_retrieveCvsignoreFile = new QCheckBox(i18n("Download cvsignore file from " + m_retrieveCvsignoreFile = new TQCheckBox(i18n("Download cvsignore file from " "server"), mainWidget); layout->addWidget(m_retrieveCvsignoreFile); - connect( repo_edit, SIGNAL(textChanged(const QString&)), - this, SLOT(repoChanged()) ); - connect( m_useDifferentCompression, SIGNAL(toggled(bool)), - this, SLOT(compressionToggled(bool)) ); + connect( repo_edit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(repoChanged()) ); + connect( m_useDifferentCompression, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(compressionToggled(bool)) ); repoChanged(); - QSize size = configDialogSize(partConfig, "AddRepositoryDialog"); + TQSize size = configDialogSize(partConfig, "AddRepositoryDialog"); resize(size); } @@ -98,13 +98,13 @@ AddRepositoryDialog::~AddRepositoryDialog() } -void AddRepositoryDialog::setRsh(const QString& rsh) +void AddRepositoryDialog::setRsh(const TQString& rsh) { rsh_edit->setText(rsh); } -void AddRepositoryDialog::setServer(const QString& server) +void AddRepositoryDialog::setServer(const TQString& server) { server_edit->setText(server); } @@ -134,19 +134,19 @@ void AddRepositoryDialog::setRetrieveCvsignoreFile(bool enabled) } -QString AddRepositoryDialog::repository() const +TQString AddRepositoryDialog::repository() const { return repo_edit->text(); } -QString AddRepositoryDialog::rsh() const +TQString AddRepositoryDialog::rsh() const { return rsh_edit->text(); } -QString AddRepositoryDialog::server() const +TQString AddRepositoryDialog::server() const { return server_edit->text(); } @@ -167,7 +167,7 @@ bool AddRepositoryDialog::retrieveCvsignoreFile() const } -void AddRepositoryDialog::setRepository(const QString& repo) +void AddRepositoryDialog::setRepository(const TQString& repo) { setCaption(i18n("Repository Settings")); @@ -178,7 +178,7 @@ void AddRepositoryDialog::setRepository(const QString& repo) void AddRepositoryDialog::repoChanged() { - QString repo = repository(); + TQString repo = repository(); rsh_edit->setEnabled((!repo.startsWith(":pserver:")) && repo.contains(":")); m_useDifferentCompression->setEnabled(repo.contains(":")); diff --git a/cervisia/addrepositorydlg.h b/cervisia/addrepositorydlg.h index 8fbf66fd..bd759e6f 100644 --- a/cervisia/addrepositorydlg.h +++ b/cervisia/addrepositorydlg.h @@ -35,19 +35,19 @@ class AddRepositoryDialog : public KDialogBase Q_OBJECT public: - AddRepositoryDialog(KConfig& cfg, const QString& repo, QWidget* parent = 0, + AddRepositoryDialog(KConfig& cfg, const TQString& repo, TQWidget* parent = 0, const char* name = 0); virtual ~AddRepositoryDialog(); - void setRepository(const QString& repo); - void setRsh(const QString& rsh); - void setServer(const QString& server); + void setRepository(const TQString& repo); + void setRsh(const TQString& rsh); + void setServer(const TQString& server); void setCompression(int compression); void setRetrieveCvsignoreFile(bool enabled); - QString repository() const; - QString rsh() const; - QString server() const; + TQString repository() const; + TQString rsh() const; + TQString server() const; int compression() const; bool retrieveCvsignoreFile() const; @@ -59,8 +59,8 @@ private: KLineEdit* repo_edit; KLineEdit* rsh_edit; KLineEdit* server_edit; - QCheckBox* m_useDifferentCompression; - QCheckBox* m_retrieveCvsignoreFile; + TQCheckBox* m_useDifferentCompression; + TQCheckBox* m_retrieveCvsignoreFile; KIntNumInput* m_compressionLevel; KConfig& partConfig; }; diff --git a/cervisia/annotatectl.cpp b/cervisia/annotatectl.cpp index 31f95f84..f74735e3 100644 --- a/cervisia/annotatectl.cpp +++ b/cervisia/annotatectl.cpp @@ -19,8 +19,8 @@ #include "annotatectl.h" -#include <qdatetime.h> -#include <qmap.h> +#include <tqdatetime.h> +#include <tqmap.h> #include <dcopref.h> #include <klocale.h> @@ -36,14 +36,14 @@ using namespace Cervisia; struct AnnotateController::Private { - typedef QMap<QString, QString> RevisionCommentMap; + typedef TQMap<TQString, TQString> RevisionCommentMap; RevisionCommentMap comments; // maps comment to a revision CvsService_stub* cvsService; AnnotateDialog* dialog; ProgressDialog* progress; - bool execute(const QString& fileName, const QString& revision); + bool execute(const TQString& fileName, const TQString& revision); void parseCvsLogOutput(); void parseCvsAnnotateOutput(); }; @@ -65,7 +65,7 @@ AnnotateController::~AnnotateController() } -void AnnotateController::showDialog(const QString& fileName, const QString& revision) +void AnnotateController::showDialog(const TQString& fileName, const TQString& revision) { if( !d->execute(fileName, revision) ) { @@ -84,7 +84,7 @@ void AnnotateController::showDialog(const QString& fileName, const QString& revi } -bool AnnotateController::Private::execute(const QString& fileName, const QString& revision) +bool AnnotateController::Private::execute(const TQString& fileName, const TQString& revision) { DCOPRef job = cvsService->annotate(fileName, revision); if( !cvsService->ok() ) @@ -98,7 +98,7 @@ bool AnnotateController::Private::execute(const QString& fileName, const QString void AnnotateController::Private::parseCvsLogOutput() { - QString line, comment, rev; + TQString line, comment, rev; enum { Begin, Tags, Admin, Revision, Author, Branches, Comment, Finished } state; @@ -140,7 +140,7 @@ void AnnotateController::Private::parseCvsLogOutput() else if( line == "=============================================================================" ) state = Finished; if( state == Comment ) - comment += QString("\n") + line; + comment += TQString("\n") + line; else comments[rev] = comment; break; @@ -162,13 +162,13 @@ void AnnotateController::Private::parseCvsLogOutput() void AnnotateController::Private::parseCvsAnnotateOutput() { LogInfo logInfo; - QString rev, content, line; - QString oldRevision = ""; + TQString rev, content, line; + TQString oldRevision = ""; bool odd = false; while( progress->getLine(line) ) { - QString dateString = line.mid(23, 9); + TQString dateString = line.mid(23, 9); if( !dateString.isEmpty() ) logInfo.m_dateTime.setTime_t(KRFCDate::parseDate(dateString), Qt::UTC); @@ -182,8 +182,8 @@ void AnnotateController::Private::parseCvsAnnotateOutput() if( rev == oldRevision ) { - logInfo.m_author = QString::null; - rev = QString::null; + logInfo.m_author = TQString::null; + rev = TQString::null; } else { diff --git a/cervisia/annotatectl.h b/cervisia/annotatectl.h index d6b76437..eb8c98f0 100644 --- a/cervisia/annotatectl.h +++ b/cervisia/annotatectl.h @@ -20,7 +20,7 @@ #ifndef ANNOTATECTL_H #define ANNOTATECTL_H -#include <qstring.h> +#include <tqstring.h> class AnnotateDialog; class CvsService_stub; @@ -33,7 +33,7 @@ public: AnnotateController(AnnotateDialog* dialog, CvsService_stub* cvsService); ~AnnotateController(); - void showDialog(const QString& fileName, const QString& revision = QString::null); + void showDialog(const TQString& fileName, const TQString& revision = TQString::null); private: struct Private; diff --git a/cervisia/annotatedlg.cpp b/cervisia/annotatedlg.cpp index 40b0d555..86b64b43 100644 --- a/cervisia/annotatedlg.cpp +++ b/cervisia/annotatedlg.cpp @@ -23,8 +23,8 @@ #include "annotateview.h" -AnnotateDialog::AnnotateDialog(KConfig& cfg, QWidget *parent, const char *name) - : KDialogBase(parent, name, false, QString::null, +AnnotateDialog::AnnotateDialog(KConfig& cfg, TQWidget *parent, const char *name) + : KDialogBase(parent, name, false, TQString::null, Close | Help, Close, true) , partConfig(cfg) { @@ -35,7 +35,7 @@ AnnotateDialog::AnnotateDialog(KConfig& cfg, QWidget *parent, const char *name) setWFlags(Qt::WDestructiveClose | getWFlags()); - QSize size = configDialogSize(partConfig, "AnnotateDialog"); + TQSize size = configDialogSize(partConfig, "AnnotateDialog"); resize(size); } @@ -47,7 +47,7 @@ AnnotateDialog::~AnnotateDialog() void AnnotateDialog::addLine(const Cervisia::LogInfo& logInfo, - const QString& content, bool odd) + const TQString& content, bool odd) { annotate->addLine(logInfo, content, odd); } diff --git a/cervisia/annotatedlg.h b/cervisia/annotatedlg.h index 48299cf3..dda738aa 100644 --- a/cervisia/annotatedlg.h +++ b/cervisia/annotatedlg.h @@ -39,11 +39,11 @@ class AnnotateDialog : public KDialogBase { public: - explicit AnnotateDialog( KConfig& cfg, QWidget *parent=0, const char *name=0 ); + explicit AnnotateDialog( KConfig& cfg, TQWidget *parent=0, const char *name=0 ); virtual ~AnnotateDialog(); - void addLine(const Cervisia::LogInfo& logInfo, const QString& content, + void addLine(const Cervisia::LogInfo& logInfo, const TQString& content, bool odd); private: diff --git a/cervisia/annotateview.cpp b/cervisia/annotateview.cpp index 594ca936..58d8d407 100644 --- a/cervisia/annotateview.cpp +++ b/cervisia/annotateview.cpp @@ -19,8 +19,8 @@ #include "annotateview.h" -#include <qheader.h> -#include <qpainter.h> +#include <tqheader.h> +#include <tqpainter.h> #include <kconfig.h> #include <kglobalsettings.h> @@ -37,16 +37,16 @@ public: enum { LineNumberColumn, AuthorColumn, ContentColumn }; AnnotateViewItem(AnnotateView *parent, const LogInfo& logInfo, - const QString &content, bool odd, int linenumber); + const TQString &content, 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: LogInfo m_logInfo; - QString m_content; + TQString m_content; bool m_odd; int m_lineNumber; friend class AnnotateView; @@ -59,8 +59,8 @@ const int AnnotateViewItem::BORDER = 4; AnnotateViewItem::AnnotateViewItem(AnnotateView *parent, const LogInfo& logInfo, - const QString &content, bool odd, int linenumber) - : QListViewItem(parent) + const TQString &content, bool odd, int linenumber) + : TQListViewItem(parent) , m_logInfo(logInfo) , m_content(content) , m_odd(odd) @@ -68,7 +68,7 @@ AnnotateViewItem::AnnotateViewItem(AnnotateView *parent, const LogInfo& logInfo, {} -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; @@ -77,30 +77,30 @@ 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: if( m_logInfo.m_author.isNull() ) - return QString::null; + return TQString::null; else - return (m_logInfo.m_author + QChar(' ') + m_logInfo.m_revision); + return (m_logInfo.m_author + TQChar(' ') + m_logInfo.m_revision); case ContentColumn: return m_content; default: ; }; - 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) { @@ -117,7 +117,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; @@ -129,7 +129,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; } @@ -137,30 +137,30 @@ int AnnotateViewItem::width(const QFontMetrics &fm, const QListView *, int col) /*! @todo The dummy column (remaining space eater) doesn't work - caused by a bug in QHeader::adjustHeaderSize() in Qt <= 3.0.4. + caused by a bug in TQHeader::adjustHeaderSize() in Qt <= 3.0.4. */ -AnnotateView::AnnotateView(KConfig &cfg, QWidget *parent, const char *name) - : QListView(parent, name, WRepaintNoErase | WResizeNoErase) +AnnotateView::AnnotateView(KConfig &cfg, TQWidget *parent, const char *name) + : TQListView(parent, name, WRepaintNoErase | WResizeNoErase) { - setFrameStyle(QFrame::WinPanel | QFrame::Sunken); + setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); setAllColumnsShowFocus(true); setShowToolTips(false); setSelectionMode(NoSelection); header()->hide(); // setResizeMode(LastColumn); - addColumn(QString::null); - addColumn(QString::null); - addColumn(QString::null); + addColumn(TQString::null); + addColumn(TQString::null); + addColumn(TQString::null); setSorting(AnnotateViewItem::LineNumberColumn); setColumnAlignment(AnnotateViewItem::LineNumberColumn, Qt::AlignRight); ToolTip* toolTip = new ToolTip(viewport()); - connect(toolTip, SIGNAL(queryToolTip(const QPoint&, QRect&, QString&)), - this, SLOT(slotQueryToolTip(const QPoint&, QRect&, QString&))); + connect(toolTip, TQT_SIGNAL(queryToolTip(const TQPoint&, TQRect&, TQString&)), + this, TQT_SLOT(slotQueryToolTip(const TQPoint&, TQRect&, TQString&))); KConfigGroupSaver cs(&cfg, "LookAndFeel"); setFont(cfg.readFontEntry("AnnotateFont")); @@ -168,23 +168,23 @@ AnnotateView::AnnotateView(KConfig &cfg, QWidget *parent, const char *name) -void AnnotateView::addLine(const LogInfo& logInfo, const QString& content, +void AnnotateView::addLine(const LogInfo& logInfo, const TQString& content, bool odd) { new AnnotateViewItem(this, logInfo, content, odd, childCount()+1); } -QSize AnnotateView::sizeHint() const +TQSize AnnotateView::sizeHint() const { - QFontMetrics fm(fontMetrics()); - return QSize(100 * fm.width("0"), 10 * fm.lineSpacing()); + TQFontMetrics fm(fontMetrics()); + return TQSize(100 * fm.width("0"), 10 * fm.lineSpacing()); } -void AnnotateView::slotQueryToolTip(const QPoint& viewportPos, - QRect& viewportRect, - QString& text) +void AnnotateView::slotQueryToolTip(const TQPoint& viewportPos, + TQRect& viewportRect, + TQString& text) { if (const AnnotateViewItem* item = static_cast<AnnotateViewItem*>(itemAt(viewportPos))) { diff --git a/cervisia/annotateview.h b/cervisia/annotateview.h index be74d430..f0ae7e21 100644 --- a/cervisia/annotateview.h +++ b/cervisia/annotateview.h @@ -22,7 +22,7 @@ #define ANNOTATEVIEW_H -#include <qlistview.h> +#include <tqlistview.h> class KConfig; @@ -40,16 +40,16 @@ class AnnotateView : public QListView public: - explicit AnnotateView( KConfig &cfg, QWidget *parent=0, const char *name=0 ); + explicit AnnotateView( KConfig &cfg, TQWidget *parent=0, const char *name=0 ); - void addLine(const Cervisia::LogInfo& logInfo, const QString& content, + void addLine(const Cervisia::LogInfo& logInfo, const TQString& content, bool odd); - virtual QSize sizeHint() const; + virtual TQSize sizeHint() const; private slots: - void slotQueryToolTip(const QPoint&, QRect&, QString&); + void slotQueryToolTip(const TQPoint&, TQRect&, TQString&); }; diff --git a/cervisia/cervisiapart.cpp b/cervisia/cervisiapart.cpp index 56b37ece..df166d7a 100644 --- a/cervisia/cervisiapart.cpp +++ b/cervisia/cervisiapart.cpp @@ -18,12 +18,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qlabel.h> -#include <qmessagebox.h> -#include <qpushbutton.h> -#include <qpopupmenu.h> -#include <qtextstream.h> -#include <qtooltip.h> +#include <tqlabel.h> +#include <tqmessagebox.h> +#include <tqpushbutton.h> +#include <tqpopupmenu.h> +#include <tqtextstream.h> +#include <tqtooltip.h> #include <kaboutdata.h> #include <kaction.h> #include <kapplication.h> @@ -80,8 +80,8 @@ using Cervisia::TagDialog; K_EXPORT_COMPONENT_FACTORY( libcervisiapart, CervisiaFactory ) -CervisiaPart::CervisiaPart( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, const QStringList& /*args*/ ) +CervisiaPart::CervisiaPart( TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, const TQStringList& /*args*/ ) : KParts::ReadOnlyPart( parent, name ) , hasRunningJob( false ) , opt_hideFiles( false ) @@ -109,9 +109,9 @@ CervisiaPart::CervisiaPart( QWidget *parentWidget, const char *widgetName, m_browserExt = new CervisiaBrowserExtension( this ); // start the cvs DCOP service - QString error; - QCString appId; - if( KApplication::startServiceByDesktopName("cvsservice", QStringList(), &error, &appId) ) + TQString error; + TQCString appId; + if( KApplication::startServiceByDesktopName("cvsservice", TQStringList(), &error, &appId) ) { KMessageBox::sorry(0, i18n("Starting cvsservice failed with message: ") + error, "Cervisia"); @@ -125,31 +125,31 @@ CervisiaPart::CervisiaPart( QWidget *parentWidget, const char *widgetName, conf->setGroup("LookAndFeel"); bool splitHorz = conf->readBoolEntry("SplitHorizontally",true); - // When we couldn't start the DCOP service, we just display a QLabel with + // When we couldn't start the DCOP service, we just display a TQLabel with // an explaination if( cvsService ) { - Orientation o = splitHorz ? QSplitter::Vertical - : QSplitter::Horizontal; - splitter = new QSplitter(o, parentWidget, widgetName); + Orientation o = splitHorz ? TQSplitter::Vertical + : TQSplitter::Horizontal; + splitter = new TQSplitter(o, parentWidget, widgetName); // avoid PartManager's warning that Part's window can't handle focus - splitter->setFocusPolicy( QWidget::StrongFocus ); + splitter->setFocusPolicy( TQWidget::StrongFocus ); update = new UpdateView(*config(), splitter); - update->setFocusPolicy( QWidget::StrongFocus ); + update->setFocusPolicy( TQWidget::StrongFocus ); update->setFocus(); - connect( update, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), - this, SLOT(popupRequested(KListView*, QListViewItem*, const QPoint&)) ); - connect( update, SIGNAL(fileOpened(QString)), - this, SLOT(openFile(QString)) ); + connect( update, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), + this, TQT_SLOT(popupRequested(KListView*, TQListViewItem*, const TQPoint&)) ); + connect( update, TQT_SIGNAL(fileOpened(TQString)), + this, TQT_SLOT(openFile(TQString)) ); protocol = new ProtocolView(appId, splitter); - protocol->setFocusPolicy( QWidget::StrongFocus ); + protocol->setFocusPolicy( TQWidget::StrongFocus ); setWidget(splitter); } else - setWidget(new QLabel(i18n("This KPart is non-functional, because the " + setWidget(new TQLabel(i18n("This KPart is non-functional, because the " "cvs DCOP service could not be started."), parentWidget)); @@ -157,12 +157,12 @@ CervisiaPart::CervisiaPart( QWidget *parentWidget, const char *widgetName, { setupActions(); readSettings(); - connect( update, SIGNAL( selectionChanged() ), this, SLOT( updateActions() ) ); + connect( update, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( updateActions() ) ); } setXMLFile( "cervisiaui.rc" ); - QTimer::singleShot(0, this, SLOT(slotSetupStatusBar())); + TQTimer::singleShot(0, this, TQT_SLOT(slotSetupStatusBar())); } CervisiaPart::~CervisiaPart() @@ -212,10 +212,10 @@ bool CervisiaPart::openURL( const KURL &u ) void CervisiaPart::slotSetupStatusBar() { // create the active filter indicator and add it to the statusbar - filterLabel = new QLabel("UR", m_statusBar->statusBar()); + filterLabel = new TQLabel("UR", m_statusBar->statusBar()); filterLabel->setFixedSize(filterLabel->sizeHint()); filterLabel->setText(""); - QToolTip::add(filterLabel, + TQToolTip::add(filterLabel, i18n("F - All files are hidden, the tree shows only folders\n" "N - All up-to-date files are hidden\n" "R - All removed files are hidden")); @@ -225,7 +225,7 @@ void CervisiaPart::slotSetupStatusBar() void CervisiaPart::setupActions() { KAction *action; - QString hint; + TQString hint; actionCollection()->setHighlightingEnabled(true); @@ -233,81 +233,81 @@ void CervisiaPart::setupActions() // File Menu // action = new KAction( i18n("O&pen Sandbox..."), "fileopen", CTRL+Key_O, - this, SLOT( slotOpenSandbox() ), + this, TQT_SLOT( slotOpenSandbox() ), actionCollection(), "file_open" ); hint = i18n("Opens a CVS working folder in the main window"); action->setToolTip( hint ); action->setWhatsThis( hint ); recent = new KRecentFilesAction( i18n("Recent Sandboxes"), 0, - this, SLOT( openURL( const KURL & ) ), + this, TQT_SLOT( openURL( const KURL & ) ), actionCollection(), "file_open_recent" ); action = new KAction( i18n("&Insert ChangeLog Entry..."), 0, - this, SLOT( slotChangeLog() ), + this, TQT_SLOT( slotChangeLog() ), actionCollection(), "insert_changelog_entry" ); hint = i18n("Inserts a new intro into the file ChangeLog in the toplevel folder"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Update"), "vcs_update", CTRL+Key_U, - this, SLOT( slotUpdate() ), + this, TQT_SLOT( slotUpdate() ), actionCollection(), "file_update" ); hint = i18n("Updates (cvs update) the selected files and folders"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Status"), "vcs_status", Key_F5, - this, SLOT( slotStatus() ), + this, TQT_SLOT( slotStatus() ), actionCollection(), "file_status" ); hint = i18n("Updates the status (cvs -n update) of the selected files and folders"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Edit"), 0, - this, SLOT( slotOpen() ), + this, TQT_SLOT( slotOpen() ), actionCollection(), "file_edit" ); hint = i18n("Opens the marked file for editing"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Reso&lve..."), 0, - this, SLOT( slotResolve() ), + this, TQT_SLOT( slotResolve() ), actionCollection(), "file_resolve" ); hint = i18n("Opens the resolve dialog with the selected file"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Commit..."), "vcs_commit", Key_NumberSign, - this, SLOT( slotCommit() ), + this, TQT_SLOT( slotCommit() ), actionCollection(), "file_commit" ); hint = i18n("Commits the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Add to Repository..."), "vcs_add", Key_Insert, - this, SLOT( slotAdd() ), + this, TQT_SLOT( slotAdd() ), actionCollection(), "file_add" ); hint = i18n("Adds (cvs add) the selected files to the repository"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Add &Binary..."), 0, - this, SLOT( slotAddBinary() ), + this, TQT_SLOT( slotAddBinary() ), actionCollection(), "file_add_binary" ); hint = i18n("Adds (cvs -kb add) the selected files as binaries to the repository"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Remove From Repository..."), "vcs_remove", Key_Delete, - this, SLOT( slotRemove() ), + this, TQT_SLOT( slotRemove() ), actionCollection(), "file_remove" ); hint = i18n("Removes (cvs remove) the selected files from the repository"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Rever&t"), 0, - this, SLOT( slotRevert() ), + this, TQT_SLOT( slotRevert() ), actionCollection(), "file_revert_local_changes" ); hint = i18n("Reverts (cvs update -C) the selected files (only cvs 1.11)"); action->setToolTip( hint ); @@ -315,14 +315,14 @@ void CervisiaPart::setupActions() // context menu only action = new KAction( i18n("&Properties"), 0, - this, SLOT( slotFileProperties() ), + this, TQT_SLOT( slotFileProperties() ), actionCollection(), "file_properties" ); // // View Menu // action = new KAction( i18n("Stop"), "stop", Key_Escape, - protocol, SLOT(cancelJob()), + protocol, TQT_SLOT(cancelJob()), actionCollection(), "stop_job" ); action->setEnabled( false ); hint = i18n("Stops any running sub-processes"); @@ -331,7 +331,7 @@ void CervisiaPart::setupActions() action = new KAction( i18n("Browse &Log..."), CTRL+Key_L, - this, SLOT(slotBrowseLog()), + this, TQT_SLOT(slotBrowseLog()), actionCollection(), "view_log" ); hint = i18n("Shows the revision tree of the selected file"); action->setToolTip( hint ); @@ -339,46 +339,46 @@ void CervisiaPart::setupActions() #if 0 action = new KAction( i18n("Browse Multi-File Log..."), 0, - this, SLOT(slotBrowseMultiLog()), + this, TQT_SLOT(slotBrowseMultiLog()), actionCollection() ); #endif action = new KAction( i18n("&Annotate..."), CTRL+Key_A, - this, SLOT(slotAnnotate()), + this, TQT_SLOT(slotAnnotate()), actionCollection(), "view_annotate" ); hint = i18n("Shows a blame-annotated view of the selected file"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Difference to Repository (BASE)..."), "vcs_diff", CTRL+Key_D, - this, SLOT(slotDiffBase()), + this, TQT_SLOT(slotDiffBase()), actionCollection(), "view_diff_base" ); hint = i18n("Shows the differences of the selected file to the checked out version (tag BASE)"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Difference to Repository (HEAD)..."), "vcs_diff", CTRL+Key_H, - this, SLOT(slotDiffHead()), + this, TQT_SLOT(slotDiffHead()), actionCollection(), "view_diff_head" ); hint = i18n("Shows the differences of the selected file to the newest version in the repository (tag HEAD)"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Last &Change..."), 0, - this, SLOT(slotLastChange()), + this, TQT_SLOT(slotLastChange()), actionCollection(), "view_last_change" ); hint = i18n("Shows the differences between the last two revisions of the selected file"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&History..."), 0, - this, SLOT(slotHistory()), + this, TQT_SLOT(slotHistory()), actionCollection(), "view_history" ); hint = i18n("Shows the CVS history as reported by the server"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Unfold File Tree"), 0, - this , SLOT(slotUnfoldTree()), + this , TQT_SLOT(slotUnfoldTree()), actionCollection(), "view_unfold_tree" ); hint = i18n("Opens all branches of the file tree"); @@ -386,7 +386,7 @@ void CervisiaPart::setupActions() action->setWhatsThis( hint ); action = new KAction( i18n("&Fold File Tree"), 0, - this, SLOT(slotFoldTree()), + this, TQT_SLOT(slotFoldTree()), actionCollection(), "view_fold_tree" ); hint = i18n("Closes all branches of the file tree"); action->setToolTip( hint ); @@ -396,98 +396,98 @@ void CervisiaPart::setupActions() // Advanced Menu // action = new KAction( i18n("&Tag/Branch..."), 0, - this, SLOT(slotCreateTag()), + this, TQT_SLOT(slotCreateTag()), actionCollection(), "create_tag" ); hint = i18n("Creates a tag or branch for the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Delete Tag..."), 0, - this, SLOT(slotDeleteTag()), + this, TQT_SLOT(slotDeleteTag()), actionCollection(), "delete_tag" ); hint = i18n("Deletes a tag from the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Update to Tag/Date..."), 0, - this, SLOT(slotUpdateToTag()), + this, TQT_SLOT(slotUpdateToTag()), actionCollection(), "update_to_tag" ); hint = i18n("Updates the selected files to a given tag, branch or date"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Update to &HEAD"), 0, - this, SLOT(slotUpdateToHead()), + this, TQT_SLOT(slotUpdateToHead()), actionCollection(), "update_to_head" ); hint = i18n("Updates the selected files to the HEAD revision"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Merge..."), 0, - this, SLOT(slotMerge()), + this, TQT_SLOT(slotMerge()), actionCollection(), "merge" ); hint = i18n("Merges a branch or a set of modifications into the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Add Watch..."), 0, - this, SLOT(slotAddWatch()), + this, TQT_SLOT(slotAddWatch()), actionCollection(), "add_watch" ); hint = i18n("Adds a watch for the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Remove Watch..."), 0, - this, SLOT(slotRemoveWatch()), + this, TQT_SLOT(slotRemoveWatch()), actionCollection(), "remove_watch" ); hint = i18n("Removes a watch from the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Show &Watchers"), 0, - this, SLOT(slotShowWatchers()), + this, TQT_SLOT(slotShowWatchers()), actionCollection(), "show_watchers" ); hint = i18n("Shows the watchers of the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Ed&it Files"), 0, - this, SLOT(slotEdit()), + this, TQT_SLOT(slotEdit()), actionCollection(), "edit_files" ); hint = i18n("Edits (cvs edit) the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("U&nedit Files"), 0, - this, SLOT(slotUnedit()), + this, TQT_SLOT(slotUnedit()), actionCollection(), "unedit_files" ); hint = i18n("Unedits (cvs unedit) the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Show &Editors"), 0, - this, SLOT(slotShowEditors()), + this, TQT_SLOT(slotShowEditors()), actionCollection(), "show_editors" ); hint = i18n("Shows the editors of the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Lock Files"), 0, - this, SLOT(slotLock()), + this, TQT_SLOT(slotLock()), actionCollection(), "lock_files" ); hint = i18n("Locks the selected files, so that others cannot modify them"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Unl&ock Files"), 0, - this, SLOT(slotUnlock()), + this, TQT_SLOT(slotUnlock()), actionCollection(), "unlock_files" ); hint = i18n("Unlocks the selected files"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Create &Patch Against Repository..."), 0, - this, SLOT(slotMakePatch()), + this, TQT_SLOT(slotMakePatch()), actionCollection(), "make_patch" ); hint = i18n("Creates a patch from the modifications in your sandbox"); action->setToolTip( hint ); @@ -497,25 +497,25 @@ void CervisiaPart::setupActions() // Repository Menu // action = new KAction( i18n("&Create..."), 0, - this, SLOT(slotCreateRepository()), + this, TQT_SLOT(slotCreateRepository()), actionCollection(), "repository_create" ); action = new KAction( i18n("&Checkout..."), 0, - this, SLOT(slotCheckout()), + this, TQT_SLOT(slotCheckout()), actionCollection(), "repository_checkout" ); hint = i18n("Allows you to checkout a module from a repository"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Import..."), 0, - this, SLOT(slotImport()), + this, TQT_SLOT(slotImport()), actionCollection(), "repository_import" ); hint = i18n("Allows you to import a module into a repository"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("&Repositories..."), 0, - this, SLOT(slotRepositories()), + this, TQT_SLOT(slotRepositories()), actionCollection(), "show_repositories" ); hint = i18n("Configures a list of repositories you regularly use"); action->setToolTip( hint ); @@ -525,7 +525,7 @@ void CervisiaPart::setupActions() // Settings menu // KToggleAction* toggaction = new KToggleAction( i18n("Hide All &Files"), 0, - this, SLOT(slotHideFiles()), + this, TQT_SLOT(slotHideFiles()), actionCollection(), "settings_hide_files" ); toggaction->setCheckedState(i18n("Show All &Files")); hint = i18n("Determines whether only folders are shown"); @@ -533,7 +533,7 @@ void CervisiaPart::setupActions() toggaction->setWhatsThis( hint ); toggaction = new KToggleAction( i18n("Hide Unmodified Files"), 0, - this, SLOT(slotHideUpToDate()), + this, TQT_SLOT(slotHideUpToDate()), actionCollection(), "settings_hide_uptodate" ); toggaction->setCheckedState(i18n("Show Unmodified Files")); hint = i18n("Determines whether files with status up-to-date or " @@ -542,7 +542,7 @@ void CervisiaPart::setupActions() toggaction->setWhatsThis( hint ); toggaction = new KToggleAction( i18n("Hide Removed Files"), 0, - this, SLOT(slotHideRemoved()), + this, TQT_SLOT(slotHideRemoved()), actionCollection(), "settings_hide_removed" ); toggaction->setCheckedState(i18n("Show Removed Files")); hint = i18n("Determines whether removed files are hidden"); @@ -550,7 +550,7 @@ void CervisiaPart::setupActions() toggaction->setWhatsThis( hint ); toggaction = new KToggleAction( i18n("Hide Non-CVS Files"), 0, - this, SLOT(slotHideNotInCVS()), + this, TQT_SLOT(slotHideNotInCVS()), actionCollection(), "settings_hide_notincvs" ); toggaction->setCheckedState(i18n("Show Non-CVS Files")); hint = i18n("Determines whether files not in CVS are hidden"); @@ -558,7 +558,7 @@ void CervisiaPart::setupActions() toggaction->setWhatsThis( hint ); toggaction = new KToggleAction( i18n("Hide Empty Folders"), 0, - this, SLOT(slotHideEmptyDirectories()), + this, TQT_SLOT(slotHideEmptyDirectories()), actionCollection(), "settings_hide_empty_directories" ); toggaction->setCheckedState(i18n("Show Empty Folders")); hint = i18n("Determines whether folders without visible entries are hidden"); @@ -566,42 +566,42 @@ void CervisiaPart::setupActions() toggaction->setWhatsThis( hint ); action = new KToggleAction( i18n("Create &Folders on Update"), 0, - this, SLOT(slotCreateDirs()), + this, TQT_SLOT(slotCreateDirs()), actionCollection(), "settings_create_dirs" ); hint = i18n("Determines whether updates create folders"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KToggleAction( i18n("&Prune Empty Folders on Update"), 0, - this, SLOT(slotPruneDirs()), + this, TQT_SLOT(slotPruneDirs()), actionCollection(), "settings_prune_dirs" ); hint = i18n("Determines whether updates remove empty folders"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KToggleAction( i18n("&Update Recursively"), 0, - this, SLOT(slotUpdateRecursive()), + this, TQT_SLOT(slotUpdateRecursive()), actionCollection(), "settings_update_recursively" ); hint = i18n("Determines whether updates are recursive"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KToggleAction( i18n("C&ommit && Remove Recursively"), 0, - this, SLOT(slotCommitRecursive()), + this, TQT_SLOT(slotCommitRecursive()), actionCollection(), "settings_commit_recursively" ); hint = i18n("Determines whether commits and removes are recursive"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KToggleAction( i18n("Do cvs &edit Automatically When Necessary"), 0, - this, SLOT(slotDoCVSEdit()), + this, TQT_SLOT(slotDoCVSEdit()), actionCollection(), "settings_do_cvs_edit" ); hint = i18n("Determines whether automatic cvs editing is active"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = new KAction( i18n("Configure Cervisia..."), "configure", 0, - this, SLOT(slotConfigure()), + this, TQT_SLOT(slotConfigure()), actionCollection(), "configure_cervisia" ); hint = i18n("Allows you to configure the Cervisia KPart"); action->setToolTip( hint ); @@ -610,11 +610,11 @@ void CervisiaPart::setupActions() // // Help Menu // - action = KStdAction::help( this, SLOT(slotHelp()), + action = KStdAction::help( this, TQT_SLOT(slotHelp()), actionCollection() ); action = new KAction( i18n("CVS &Manual"), 0, - this, SLOT(slotCVSInfo()), + this, TQT_SLOT(slotCVSInfo()), actionCollection(), "help_cvs_manual" ); hint = i18n("Opens the help browser with the CVS documentation"); action->setToolTip( hint ); @@ -624,18 +624,18 @@ void CervisiaPart::setupActions() // Folder context menu // toggaction = new KToggleAction( i18n("Unfold Folder"), 0, - this, SLOT( slotUnfoldFolder() ), + this, TQT_SLOT( slotUnfoldFolder() ), actionCollection(), "unfold_folder" ); toggaction->setCheckedState(i18n("Fold Folder")); - //action = KStdAction::aboutApp( this, SLOT(aboutCervisia()), + //action = KStdAction::aboutApp( this, TQT_SLOT(aboutCervisia()), // actionCollection(), "help_about_cervisia" ); } -void CervisiaPart::popupRequested(KListView*, QListViewItem* item, const QPoint& p) +void CervisiaPart::popupRequested(KListView*, TQListViewItem* item, const TQPoint& p) { - QString xmlName = "context_popup"; + TQString xmlName = "context_popup"; if( isDirItem(item) && update->fileSelection().isEmpty() ) { @@ -644,7 +644,7 @@ void CervisiaPart::popupRequested(KListView*, QListViewItem* item, const QPoint& action->setChecked(item->isOpen()); } - if( QPopupMenu* popup = static_cast<QPopupMenu*>(hostContainer(xmlName)) ) + if( TQPopupMenu* popup = static_cast<TQPopupMenu*>(hostContainer(xmlName)) ) { if( isFileItem(item) ) { @@ -659,7 +659,7 @@ void CervisiaPart::popupRequested(KListView*, QListViewItem* item, const QPoint& } // get name of selected file - QString selectedFile; + TQString selectedFile; update->getSingleSelection(&selectedFile); if( !selectedFile.isEmpty() ) @@ -710,7 +710,7 @@ void CervisiaPart::updateActions() void CervisiaPart::aboutCervisia() { - QString aboutstr(i18n("Cervisia %1\n" + TQString aboutstr(i18n("Cervisia %1\n" "(Using KDE %2)\n" "\n" "Copyright (c) 1999-2002\n" @@ -725,7 +725,7 @@ void CervisiaPart::aboutCervisia() "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "See the ChangeLog file for a list of contributors.")); - QMessageBox::about(0, i18n("About Cervisia"), + TQMessageBox::about(0, i18n("About Cervisia"), aboutstr.arg(CERVISIA_VERSION).arg(KDE_VERSION_STRING)); } @@ -755,7 +755,7 @@ KAboutData* CervisiaPart::createAboutData() void CervisiaPart::slotOpenSandbox() { - QString dirname = KFileDialog::getExistingDirectory(":CervisiaPart", widget(), + TQString dirname = KFileDialog::getExistingDirectory(":CervisiaPart", widget(), i18n("Open Sandbox")); if (dirname.isEmpty()) return; @@ -778,34 +778,34 @@ void CervisiaPart::slotChangeLog() void CervisiaPart::slotOpen() { - QStringList filenames = update->fileSelection(); + TQStringList filenames = update->fileSelection(); if (filenames.isEmpty()) return; openFiles(filenames); } -void CervisiaPart::openFile(QString filename) +void CervisiaPart::openFile(TQString filename) { - QStringList files; + TQStringList files; files << filename; openFiles(files); } -void CervisiaPart::openFiles(const QStringList &filenames) +void CervisiaPart::openFiles(const TQStringList &filenames) { // call cvs edit automatically? if( opt_doCVSEdit ) { - QStringList files; + TQStringList files; // only edit read-only files - QStringList::ConstIterator it = filenames.begin(); - QStringList::ConstIterator end = filenames.end(); + TQStringList::ConstIterator it = filenames.begin(); + TQStringList::ConstIterator end = filenames.end(); for( ; it != end; ++it ) { - if( !QFileInfo(*it).isWritable() ) + if( !TQFileInfo(*it).isWritable() ) files << *it; } @@ -820,10 +820,10 @@ void CervisiaPart::openFiles(const QStringList &filenames) } // Now open the files by using KRun - QDir dir(sandbox); + TQDir dir(sandbox); - QStringList::ConstIterator it = filenames.begin(); - QStringList::ConstIterator end = filenames.end(); + TQStringList::ConstIterator it = filenames.begin(); + TQStringList::ConstIterator end = filenames.end(); for( ; it != end; ++it ) { KURL u; @@ -836,7 +836,7 @@ void CervisiaPart::openFiles(const QStringList &filenames) void CervisiaPart::slotResolve() { - QString filename; + TQString filename; update->getSingleSelection(&filename); if (filename.isEmpty()) return; @@ -858,14 +858,14 @@ void CervisiaPart::slotUpdate() void CervisiaPart::slotStatus() { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; // Bug #105097: Embedded in Konqueror, all Cervisia tabs share // a common current directory. This confuses UpdateView. That's // why we always change the current directory here. - QDir::setCurrent(sandbox); + TQDir::setCurrent(sandbox); update->prepareJob(opt_updateRecursive, UpdateView::UpdateNoAct); @@ -873,17 +873,17 @@ void CervisiaPart::slotStatus() opt_createDirs, opt_pruneDirs); // get command line from cvs job - QString cmdline; + TQString cmdline; DCOPReply reply = cvsJob.call("cvsCommand()"); if( reply.isValid() ) - reply.get<QString>(cmdline); + reply.get<TQString>(cmdline); if( protocol->startJob(true) ) { showJobStart(cmdline); - connect( protocol, SIGNAL(receivedLine(QString)), update, SLOT(processUpdateLine(QString)) ); - connect( protocol, SIGNAL(jobFinished(bool, int)), update, SLOT(finishJob(bool, int)) ); - connect( protocol, SIGNAL(jobFinished(bool, int)), this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(receivedLine(TQString)), update, TQT_SLOT(processUpdateLine(TQString)) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), update, TQT_SLOT(finishJob(bool, int)) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), this, TQT_SLOT(slotJobFinished()) ); } } @@ -894,7 +894,7 @@ void CervisiaPart::slotUpdateToTag() if (l->exec()) { - QString tagopt; + TQString tagopt; if (l->byTag()) { tagopt = "-r "; @@ -930,7 +930,7 @@ void CervisiaPart::slotMerge() if (dlg.exec()) { - QString tagopt; + TQString tagopt; if (dlg.byBranch()) { tagopt = "-j "; @@ -951,7 +951,7 @@ void CervisiaPart::slotMerge() void CervisiaPart::slotCommit() { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; @@ -968,7 +968,7 @@ void CervisiaPart::slotCommit() if( list.isEmpty() ) return; - QString msg = dlg.logMessage(); + TQString msg = dlg.logMessage(); if( !recentCommits.contains( msg ) ) { recentCommits.prepend( msg ); @@ -986,14 +986,14 @@ void CervisiaPart::slotCommit() opt_commitRecursive); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { m_jobType = Commit; showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), update, SLOT(finishJob(bool, int)) ); - connect( protocol, SIGNAL(jobFinished(bool, int)), this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), update, TQT_SLOT(finishJob(bool, int)) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), this, TQT_SLOT(slotJobFinished()) ); } } } @@ -1019,13 +1019,13 @@ void CervisiaPart::slotRemove() void CervisiaPart::slotFileProperties() { - QString filename; + TQString filename; update->getSingleSelection(&filename); if( filename.isEmpty() ) return; // Create URL from selected filename - QDir dir(sandbox); + TQDir dir(sandbox); KURL u; u.setPath(dir.absFilePath(filename)); @@ -1035,16 +1035,16 @@ void CervisiaPart::slotFileProperties() } -void CervisiaPart::updateSandbox(const QString &extraopt) +void CervisiaPart::updateSandbox(const TQString &extraopt) { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; // Bug #105097: Embedded in Konqueror, all Cervisia tabs share // a common current directory. This confuses UpdateView. That's // why we always change the current directory here. - QDir::setCurrent(sandbox); + TQDir::setCurrent(sandbox); update->prepareJob(opt_updateRecursive, UpdateView::Update); @@ -1052,24 +1052,24 @@ void CervisiaPart::updateSandbox(const QString &extraopt) opt_createDirs, opt_pruneDirs, extraopt); // get command line from cvs job - QString cmdline; + TQString cmdline; DCOPReply reply = cvsJob.call("cvsCommand()"); if( reply.isValid() ) - reply.get<QString>(cmdline); + reply.get<TQString>(cmdline); if( protocol->startJob(true) ) { showJobStart(cmdline); - connect( protocol, SIGNAL(receivedLine(QString)), update, SLOT(processUpdateLine(QString)) ); - connect( protocol, SIGNAL(jobFinished(bool, int)), update, SLOT(finishJob(bool, int)) ); - connect( protocol, SIGNAL(jobFinished(bool, int)), this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(receivedLine(TQString)), update, TQT_SLOT(processUpdateLine(TQString)) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), update, TQT_SLOT(finishJob(bool, int)) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), this, TQT_SLOT(slotJobFinished()) ); } } void CervisiaPart::addOrRemove(AddRemoveDialog::ActionType action) { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; @@ -1100,25 +1100,25 @@ void CervisiaPart::addOrRemove(AddRemoveDialog::ActionType action) } // get command line from cvs job - QString cmdline; + TQString cmdline; DCOPReply reply = cvsJob.call("cvsCommand()"); if( reply.isValid() ) - reply.get<QString>(cmdline); + reply.get<TQString>(cmdline); if (protocol->startJob()) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - update, SLOT(finishJob(bool, int)) ); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + update, TQT_SLOT(finishJob(bool, int)) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } } void CervisiaPart::slotBrowseLog() { - QString filename; + TQString filename; update->getSingleSelection(&filename); if (filename.isEmpty()) return; @@ -1135,7 +1135,7 @@ void CervisiaPart::slotBrowseLog() #if 0 void CervisiaPart::slotBrowseMultiLog() { - QStrList list = update->multipleSelection(); + TQStrList list = update->multipleSelection(); if (!list.isEmpty()) { // Non-modal dialog @@ -1151,7 +1151,7 @@ void CervisiaPart::slotBrowseMultiLog() void CervisiaPart::slotAnnotate() { - QString filename; + TQString filename; update->getSingleSelection(&filename); if (filename.isEmpty()) @@ -1166,13 +1166,13 @@ void CervisiaPart::slotAnnotate() void CervisiaPart::slotDiffBase() { - showDiff(QString::fromLatin1("BASE")); + showDiff(TQString::fromLatin1("BASE")); } void CervisiaPart::slotDiffHead() { - showDiff(QString::fromLatin1("HEAD")); + showDiff(TQString::fromLatin1("HEAD")); } @@ -1190,7 +1190,7 @@ void CervisiaPart::slotRemoveWatch() void CervisiaPart::addOrRemoveWatch(WatchDialog::ActionType action) { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; @@ -1206,13 +1206,13 @@ void CervisiaPart::addOrRemoveWatch(WatchDialog::ActionType action) cvsJob = cvsService->removeWatch(list, dlg.events()); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } } @@ -1220,7 +1220,7 @@ void CervisiaPart::addOrRemoveWatch(WatchDialog::ActionType action) void CervisiaPart::slotShowWatchers() { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; @@ -1235,100 +1235,100 @@ void CervisiaPart::slotShowWatchers() void CervisiaPart::slotEdit() { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; DCOPRef cvsJob = cvsService->edit(list); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } void CervisiaPart::slotUnedit() { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; DCOPRef cvsJob = cvsService->unedit(list); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } void CervisiaPart::slotLock() { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; DCOPRef cvsJob = cvsService->lock(list); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } void CervisiaPart::slotUnlock() { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; DCOPRef cvsJob = cvsService->unlock(list); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } void CervisiaPart::slotShowEditors() { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; DCOPRef cvsJob = cvsService->editors(list); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } @@ -1339,8 +1339,8 @@ void CervisiaPart::slotMakePatch() if( optionDlg.exec() == KDialogBase::Rejected ) return; - QString format = optionDlg.formatOption(); - QString diffOptions = optionDlg.diffOptions(); + TQString format = optionDlg.formatOption(); + TQString diffOptions = optionDlg.diffOptions(); DCOPRef job = cvsService->makePatch(diffOptions, format); if( !cvsService->ok() ) @@ -1350,14 +1350,14 @@ void CervisiaPart::slotMakePatch() if( !dlg.execute() ) return; - QString fileName = KFileDialog::getSaveFileName(); + TQString fileName = KFileDialog::getSaveFileName(); if( fileName.isEmpty() ) return; if( !Cervisia::CheckOverwrite(fileName) ) return; - QFile f(fileName); + TQFile f(fileName); if( !f.open(IO_WriteOnly) ) { KMessageBox::sorry(widget(), @@ -1366,8 +1366,8 @@ void CervisiaPart::slotMakePatch() return; } - QTextStream t(&f); - QString line; + TQTextStream t(&f); + TQString line; while( dlg.getLine(line) ) t << line << '\n'; @@ -1389,13 +1389,13 @@ void CervisiaPart::slotImport() dlg.useModificationTime()); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } @@ -1409,13 +1409,13 @@ void CervisiaPart::slotCreateRepository() DCOPRef cvsJob = cvsService->createRepository(dlg.directory()); - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } @@ -1432,13 +1432,13 @@ void CervisiaPart::slotCheckout() dlg.alias(), dlg.exportOnly(), dlg.recursive()); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } @@ -1464,7 +1464,7 @@ void CervisiaPart::slotDeleteTag() void CervisiaPart::createOrDeleteTag(TagDialog::ActionType action) { - QStringList list = update->multipleSelection(); + TQStringList list = update->multipleSelection(); if (list.isEmpty()) return; @@ -1482,13 +1482,13 @@ void CervisiaPart::createOrDeleteTag(TagDialog::ActionType action) dlg.forceTag()); // get command line from cvs job - QString cmdline = cvsJob.call("cvsCommand()"); + TQString cmdline = cvsJob.call("cvsCommand()"); if( protocol->startJob() ) { showJobStart(cmdline); - connect( protocol, SIGNAL(jobFinished(bool, int)), - this, SLOT(slotJobFinished()) ); + connect( protocol, TQT_SIGNAL(jobFinished(bool, int)), + this, TQT_SLOT(slotJobFinished()) ); } } } @@ -1497,7 +1497,7 @@ void CervisiaPart::createOrDeleteTag(TagDialog::ActionType action) void CervisiaPart::slotLastChange() { - QString filename, revA, revB; + TQString filename, revA, revB; update->getSingleSelection(&filename, &revA); if (filename.isEmpty()) return; @@ -1520,7 +1520,7 @@ void CervisiaPart::slotLastChange() return; } revB = revA.left(pos+1); - revB += QString::number(lastnumber-1); + revB += TQString::number(lastnumber-1); // Non-modal dialog DiffDialog *l = new DiffDialog(*config()); @@ -1635,25 +1635,25 @@ void CervisiaPart::slotConfigure() conf->setGroup("LookAndFeel"); bool splitHorz = conf->readBoolEntry("SplitHorizontally",true); splitter->setOrientation( splitHorz ? - QSplitter::Vertical : - QSplitter::Horizontal); + TQSplitter::Vertical : + TQSplitter::Horizontal); } void CervisiaPart::slotHelp() { emit setStatusBarText( i18n("Invoking help on Cervisia") ); - KApplication::startServiceByDesktopName("khelpcenter", QString("help:/cervisia/index.html")); + KApplication::startServiceByDesktopName("khelpcenter", TQString("help:/cervisia/index.html")); } void CervisiaPart::slotCVSInfo() { emit setStatusBarText( i18n("Invoking help on CVS") ); - KApplication::startServiceByDesktopName("khelpcenter", QString("info:/cvs/Top")); + KApplication::startServiceByDesktopName("khelpcenter", TQString("info:/cvs/Top")); } -void CervisiaPart::showJobStart(const QString &cmdline) +void CervisiaPart::showJobStart(const TQString &cmdline) { hasRunningJob = true; actionCollection()->action( "stop_job" )->setEnabled( true ); @@ -1663,9 +1663,9 @@ void CervisiaPart::showJobStart(const QString &cmdline) } -void CervisiaPart::showDiff(const QString& revision) +void CervisiaPart::showDiff(const TQString& revision) { - QString fileName; + TQString fileName; update->getSingleSelection(&fileName); if (fileName.isEmpty()) @@ -1673,7 +1673,7 @@ void CervisiaPart::showDiff(const QString& revision) // Non-modal dialog DiffDialog *l = new DiffDialog(*config()); - if (l->parseCvsDiff(cvsService, fileName, revision, QString::null)) + if (l->parseCvsDiff(cvsService, fileName, revision, TQString::null)) l->show(); else delete l; @@ -1687,8 +1687,8 @@ void CervisiaPart::slotJobFinished() emit setStatusBarText( i18n("Done") ); updateActions(); - disconnect( protocol, SIGNAL(receivedLine(QString)), - update, SLOT(processUpdateLine(QString)) ); + disconnect( protocol, TQT_SIGNAL(receivedLine(TQString)), + update, TQT_SLOT(processUpdateLine(TQString)) ); if( m_jobType == Commit ) { @@ -1700,7 +1700,7 @@ void CervisiaPart::slotJobFinished() } -bool CervisiaPart::openSandbox(const QString &dirname) +bool CervisiaPart::openSandbox(const TQString &dirname) { // Do we have a cvs service? if( !cvsService ) @@ -1720,7 +1720,7 @@ bool CervisiaPart::openSandbox(const QString &dirname) "Cervisia"); // remove path from recent sandbox menu - QFileInfo fi(dirname); + TQFileInfo fi(dirname); recent->removeURL( KURL::fromPathOrURL(fi.absFilePath()) ); return false; @@ -1751,7 +1751,7 @@ bool CervisiaPart::openSandbox(const QString &dirname) Cervisia::GlobalIgnoreList().retrieveServerIgnoreList(cvsService, repository); - QDir::setCurrent(sandbox); + TQDir::setCurrent(sandbox); update->openDirectory(sandbox); setFilter(); @@ -1790,7 +1790,7 @@ void CervisiaPart::setFilter() filter = UpdateView::Filter(filter | UpdateView::NoEmptyDirectories); update->setFilter(filter); - QString str; + TQString str; if (opt_hideFiles) str = "F"; else @@ -1862,7 +1862,7 @@ void CervisiaPart::readSettings() int splitterpos2 = config->readNumEntry("Splitter Pos 2", 0); if (splitterpos1) { - QValueList<int> sizes; + TQValueList<int> sizes; sizes << splitterpos1; sizes << splitterpos2; splitter->setSizes(sizes); @@ -1887,7 +1887,7 @@ void CervisiaPart::writeSettings() config->writeEntry("Hide Removed Files", opt_hideRemoved); config->writeEntry("Hide Non CVS Files", opt_hideNotInCVS); config->writeEntry("Hide Empty Directories", opt_hideEmptyDirectories); - QValueList<int> sizes = splitter->sizes(); + TQValueList<int> sizes = splitter->sizes(); config->writeEntry("Splitter Pos 1", sizes[0]); config->writeEntry("Splitter Pos 2", sizes[1]); diff --git a/cervisia/cervisiapart.h b/cervisia/cervisiapart.h index e5881a8d..3a68abc1 100644 --- a/cervisia/cervisiapart.h +++ b/cervisia/cervisiapart.h @@ -55,8 +55,8 @@ class CervisiaPart : public KParts::ReadOnlyPart Q_OBJECT public: - CervisiaPart( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name=0, const QStringList& args = QStringList()); + CervisiaPart( TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name=0, const TQStringList& args = TQStringList()); virtual ~CervisiaPart(); /** @@ -64,7 +64,7 @@ public: */ static KConfig *config(); - QString sandBox() const { return sandbox; } + TQString sandBox() const { return sandbox; } static KAboutData* createAboutData(); @@ -73,9 +73,9 @@ public slots: virtual bool openFile() { return true; } virtual bool openURL( const KURL & ); - void openFile(QString filename); - void openFiles(const QStringList &filenames); - void popupRequested(KListView*, QListViewItem*, const QPoint&); + void openFile(TQString filename); + void openFiles(const TQStringList &filenames); + void popupRequested(KListView*, TQListViewItem*, const TQPoint&); void updateActions(); void aboutCervisia(); @@ -156,25 +156,25 @@ private: void readSettings(); void writeSettings(); - bool openSandbox(const QString &dirname); - void updateSandbox(const QString &extraopt = QString::null); + bool openSandbox(const TQString &dirname); + void updateSandbox(const TQString &extraopt = TQString::null); void addOrRemove(AddRemoveDialog::ActionType action); void addOrRemoveWatch(WatchDialog::ActionType action); void createOrDeleteTag(Cervisia::TagDialog::ActionType action); - void showJobStart(const QString &command); - void showDiff(const QString& revision); + void showJobStart(const TQString &command); + void showDiff(const TQString& revision); void setFilter(); UpdateView *update; ProtocolView *protocol; bool hasRunningJob; - QSplitter *splitter; + TQSplitter *splitter; - QString sandbox; - QString repository; + TQString sandbox; + TQString repository; - QString changelogstr; - QStringList recentCommits; + TQString changelogstr; + TQStringList recentCommits; bool opt_hideFiles, opt_hideUpToDate, opt_hideRemoved, opt_hideNotInCVS, opt_hideEmptyDirectories; bool opt_createDirs, opt_pruneDirs; bool opt_updateRecursive, opt_commitRecursive, opt_doCVSEdit; @@ -185,7 +185,7 @@ private: CvsService_stub* cvsService; KParts::StatusBarExtension* m_statusBar; CervisiaBrowserExtension* m_browserExt; - QLabel* filterLabel; + TQLabel* filterLabel; int m_editWithId; Cervisia::EditWithMenu* m_currentEditMenu; diff --git a/cervisia/cervisiashell.cpp b/cervisia/cervisiashell.cpp index 33dac96c..eb0518e2 100644 --- a/cervisia/cervisiashell.cpp +++ b/cervisia/cervisiashell.cpp @@ -62,15 +62,15 @@ CervisiaShell::CervisiaShell( const char *name ) // Magic needed for status texts // actionCollection()->setHighlightingEnabled(true); - connect( actionCollection(), SIGNAL( actionStatusText(const QString &) ), - statusBar(), SLOT( message(const QString &) ) ); - connect( actionCollection(), SIGNAL( clearStatusText() ), - statusBar(), SLOT( clear() ) ); + connect( actionCollection(), TQT_SIGNAL( actionStatusText(const TQString &) ), + statusBar(), TQT_SLOT( message(const TQString &) ) ); + connect( actionCollection(), TQT_SIGNAL( clearStatusText() ), + statusBar(), TQT_SLOT( clear() ) ); m_part->actionCollection()->setHighlightingEnabled(true); - connect( m_part->actionCollection(), SIGNAL( actionStatusText(const QString &) ), - statusBar(), SLOT( message(const QString &) ) ); - connect( m_part->actionCollection(), SIGNAL( clearStatusText() ), - statusBar(), SLOT( clear() ) ); + connect( m_part->actionCollection(), TQT_SIGNAL( actionStatusText(const TQString &) ), + statusBar(), TQT_SLOT( message(const TQString &) ) ); + connect( m_part->actionCollection(), TQT_SIGNAL( clearStatusText() ), + statusBar(), TQT_SLOT( clear() ) ); createGUI( m_part ); @@ -92,19 +92,19 @@ void CervisiaShell::setupActions() { setStandardToolBarMenuEnabled( true ); - KAction *action = KStdAction::configureToolbars( this, SLOT(slotConfigureToolBars()), + KAction *action = KStdAction::configureToolbars( this, TQT_SLOT(slotConfigureToolBars()), actionCollection() ); - QString hint = i18n("Allows you to configure the toolbar"); + TQString hint = i18n("Allows you to configure the toolbar"); action->setToolTip( hint ); action->setWhatsThis( hint ); - action = KStdAction::keyBindings( this, SLOT(slotConfigureKeys()), + action = KStdAction::keyBindings( this, TQT_SLOT(slotConfigureKeys()), actionCollection() ); hint = i18n("Allows you to customize the keybindings"); action->setToolTip( hint ); action->setWhatsThis( hint ); - action = KStdAction::quit( kapp, SLOT( quit() ), actionCollection() ); + action = KStdAction::quit( kapp, TQT_SLOT( quit() ), actionCollection() ); hint = i18n("Exits Cervisia"); action->setToolTip( hint ); action->setWhatsThis( hint ); @@ -161,7 +161,7 @@ void CervisiaShell::slotConfigureToolBars() { saveMainWindowSettings( KGlobal::config(), autoSaveGroup() ); KEditToolbar dlg( factory() ); - connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(slotNewToolbarConfig())); + connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig())); dlg.exec(); } diff --git a/cervisia/cervisiashell.h b/cervisia/cervisiashell.h index 6e19ce1d..e96e15d9 100644 --- a/cervisia/cervisiashell.h +++ b/cervisia/cervisiashell.h @@ -60,7 +60,7 @@ private: void writeSettings(); KParts::ReadOnlyPart* m_part; - QString m_lastOpenDir; + TQString m_lastOpenDir; }; diff --git a/cervisia/changelogdlg.cpp b/cervisia/changelogdlg.cpp index 902a40f3..49476610 100644 --- a/cervisia/changelogdlg.cpp +++ b/cervisia/changelogdlg.cpp @@ -21,8 +21,8 @@ #include "changelogdlg.h" -#include <qfile.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqtextstream.h> #include <kconfig.h> #include <kglobalsettings.h> #include <klocale.h> @@ -31,16 +31,16 @@ #include "misc.h" -static inline QString DateStringISO8601() +static inline TQString DateStringISO8601() { - return QDate::currentDate().toString(Qt::ISODate); + return TQDate::currentDate().toString(Qt::ISODate); } ChangeLogDialog::Options *ChangeLogDialog::options = 0; -ChangeLogDialog::ChangeLogDialog(KConfig& cfg, QWidget *parent, const char *name) +ChangeLogDialog::ChangeLogDialog(KConfig& cfg, TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit ChangeLog"), Ok | Cancel, Ok, true) , partConfig(cfg) @@ -51,16 +51,16 @@ ChangeLogDialog::ChangeLogDialog(KConfig& cfg, QWidget *parent, const char *name edit->setFont(cfg.readFontEntry("ChangeLogFont")); edit->setFocus(); - edit->setWordWrap(QTextEdit::NoWrap); - edit->setTextFormat(QTextEdit::PlainText); + edit->setWordWrap(TQTextEdit::NoWrap); + edit->setTextFormat(TQTextEdit::PlainText); edit->setCheckSpellingEnabled(true); - QFontMetrics const fm(edit->fontMetrics()); + TQFontMetrics const fm(edit->fontMetrics()); edit->setMinimumSize(fm.width('0') * 80, fm.lineSpacing() * 20); setMainWidget(edit); - QSize size = configDialogSize(partConfig, "ChangeLogDialog"); + TQSize size = configDialogSize(partConfig, "ChangeLogDialog"); resize(size); } @@ -74,7 +74,7 @@ ChangeLogDialog::~ChangeLogDialog() void ChangeLogDialog::slotOk() { // Write changelog - QFile f(fname); + TQFile f(fname); if (!f.open(IO_ReadWrite)) { KMessageBox::sorry(this, @@ -83,7 +83,7 @@ void ChangeLogDialog::slotOk() return; } - QTextStream stream(&f); + TQTextStream stream(&f); stream << edit->text(); f.close(); @@ -91,11 +91,11 @@ void ChangeLogDialog::slotOk() } -bool ChangeLogDialog::readFile(const QString &filename) +bool ChangeLogDialog::readFile(const TQString &filename) { fname = filename; - if (!QFile::exists(filename)) + if (!TQFile::exists(filename)) { if (KMessageBox::warningContinueCancel(this, i18n("A ChangeLog file does not exist. Create one?"), @@ -105,7 +105,7 @@ bool ChangeLogDialog::readFile(const QString &filename) } else { - QFile f(filename); + TQFile f(filename); if (!f.open(IO_ReadWrite)) { KMessageBox::sorry(this, @@ -113,13 +113,13 @@ bool ChangeLogDialog::readFile(const QString &filename) "Cervisia"); return false; } - QTextStream stream(&f); + TQTextStream stream(&f); edit->setText(stream.read()); f.close(); } KConfigGroupSaver cs(&partConfig, "General"); - const QString username = partConfig.readEntry("Username", Cervisia::UserName()); + const TQString username = partConfig.readEntry("Username", Cervisia::UserName()); edit->insertParagraph("", 0); edit->insertParagraph("\t* ", 0); @@ -131,13 +131,13 @@ bool ChangeLogDialog::readFile(const QString &filename) } -QString ChangeLogDialog::message() +TQString ChangeLogDialog::message() { int no = 0; // Find first line which begins with non-whitespace while (no < edit->lines()) { - QString str = edit->text(no); + TQString str = edit->text(no); if (!str.isEmpty() && !str[0].isSpace()) break; ++no; @@ -146,17 +146,17 @@ QString ChangeLogDialog::message() // Skip empty lines while (no < edit->lines()) { - QString str = edit->text(no); + TQString str = edit->text(no); if( str.isEmpty() || str == " " ) break; ++no; } - QString res; + TQString res; // Use all lines until one which begins with non-whitespace // Remove tabs or 8 whitespace at beginning of each line while (no < edit->lines()) { - QString str = edit->text(no); + TQString str = edit->text(no); if (!str.isEmpty() && !str[0].isSpace()) break; if (!str.isEmpty() && str[0] == '\t') diff --git a/cervisia/changelogdlg.h b/cervisia/changelogdlg.h index 6c1aa3e3..ee7b8fc4 100644 --- a/cervisia/changelogdlg.h +++ b/cervisia/changelogdlg.h @@ -31,23 +31,23 @@ class KConfig; class ChangeLogDialog : public KDialogBase { public: - explicit ChangeLogDialog( KConfig& cfg, QWidget *parent=0, const char *name=0 ); + explicit ChangeLogDialog( KConfig& cfg, TQWidget *parent=0, const char *name=0 ); virtual ~ChangeLogDialog(); - bool readFile(const QString &fileName); - QString message(); + bool readFile(const TQString &fileName); + TQString message(); protected: virtual void slotOk(); private: struct Options { - QSize size; + TQSize size; }; static Options *options; - QString fname; + TQString fname; KTextEdit *edit; KConfig& partConfig; }; diff --git a/cervisia/checkoutdlg.cpp b/cervisia/checkoutdlg.cpp index 85a8b0a8..32885e8e 100644 --- a/cervisia/checkoutdlg.cpp +++ b/cervisia/checkoutdlg.cpp @@ -21,12 +21,12 @@ #include "checkoutdlg.h" -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qdir.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qpushbutton.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqdir.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqpushbutton.h> #include <kprocess.h> #include <kfiledialog.h> #include <klineedit.h> @@ -43,9 +43,9 @@ using Cervisia::IsValidTag; CheckoutDialog::CheckoutDialog(KConfig& cfg, CvsService_stub* service, - ActionType action, QWidget* parent, + ActionType action, TQWidget* parent, const char* name) - : KDialogBase(parent, name, true, QString::null, + : KDialogBase(parent, name, true, TQString::null, Ok | Cancel | Help, Ok, true) , act(action) , partConfig(cfg) @@ -53,91 +53,91 @@ CheckoutDialog::CheckoutDialog(KConfig& cfg, CvsService_stub* service, { setCaption( (action==Checkout)? i18n("CVS Checkout") : i18n("CVS Import") ); - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout* layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout* layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - QGridLayout* grid = new QGridLayout(layout); + TQGridLayout* grid = new TQGridLayout(layout); grid->setColStretch(0, 1); grid->setColStretch(1, 20); for( int i = 0; i < ((action==Checkout)? 4 : 10); ++i ) grid->setRowStretch(i, 0); - repo_combo = new QComboBox(true, mainWidget); + repo_combo = new TQComboBox(true, mainWidget); repo_combo->setFocus(); // make sure combobox is smaller than the screen - repo_combo->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + repo_combo->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); grid->addWidget(repo_combo, 0, 1); - QLabel* repo_label = new QLabel(repo_combo, i18n("&Repository:"), mainWidget); + TQLabel* repo_label = new TQLabel(repo_combo, i18n("&Repository:"), mainWidget); grid->addWidget(repo_label, 0, 0, AlignLeft | AlignVCenter); if( action == Import ) { module_edit = new KLineEdit(mainWidget); grid->addWidget(module_edit, 1, 1); - QLabel* module_label = new QLabel(module_edit, i18n("&Module:"), mainWidget); + TQLabel* module_label = new TQLabel(module_edit, i18n("&Module:"), mainWidget); grid->addWidget(module_label, 1, 0, AlignLeft | AlignVCenter); } else { - module_combo = new QComboBox(true, mainWidget); + module_combo = new TQComboBox(true, mainWidget); - QPushButton* module_button = new QPushButton(i18n("Fetch &List"), mainWidget); - connect( module_button, SIGNAL(clicked()), - this, SLOT(moduleButtonClicked()) ); + TQPushButton* module_button = new TQPushButton(i18n("Fetch &List"), mainWidget); + connect( module_button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(moduleButtonClicked()) ); - QBoxLayout* module_layout = new QHBoxLayout(); + TQBoxLayout* module_layout = new TQHBoxLayout(); grid->addLayout(module_layout, 1, 1); module_layout->addWidget(module_combo, 10); module_layout->addWidget(module_button, 0, AlignVCenter); - QLabel* module_label = new QLabel(module_combo, i18n("&Module:"), mainWidget); + TQLabel* module_label = new TQLabel(module_combo, i18n("&Module:"), mainWidget); grid->addWidget(module_label, 1, 0, AlignLeft | AlignVCenter); - branchCombo = new QComboBox(true, mainWidget); + branchCombo = new TQComboBox(true, mainWidget); - QPushButton* branchButton = new QPushButton(i18n("Fetch &List"), mainWidget); - connect( branchButton, SIGNAL(clicked()), - this, SLOT(branchButtonClicked()) ); + TQPushButton* branchButton = new TQPushButton(i18n("Fetch &List"), mainWidget); + connect( branchButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(branchButtonClicked()) ); - QBoxLayout* branchLayout = new QHBoxLayout(); + TQBoxLayout* branchLayout = new TQHBoxLayout(); grid->addLayout(branchLayout, 2, 1); branchLayout->addWidget(branchCombo, 10); branchLayout->addWidget(branchButton, 0, AlignVCenter); - QLabel* branch_label = new QLabel(branchCombo, i18n("&Branch tag:"), + TQLabel* branch_label = new TQLabel(branchCombo, i18n("&Branch tag:"), mainWidget); grid->addWidget(branch_label, 2, 0, AlignLeft | AlignVCenter); - connect( branchCombo, SIGNAL( textChanged( const QString&)), - this, SLOT( branchTextChanged() )); + connect( branchCombo, TQT_SIGNAL( textChanged( const TQString&)), + this, TQT_SLOT( branchTextChanged() )); - recursive_box = new QCheckBox(i18n("Re&cursive checkout"), mainWidget); + recursive_box = new TQCheckBox(i18n("Re&cursive checkout"), mainWidget); grid->addMultiCellWidget(recursive_box, 6, 6, 0, 1); } workdir_edit = new KLineEdit(mainWidget); - workdir_edit->setText(QDir::homeDirPath()); + workdir_edit->setText(TQDir::homeDirPath()); workdir_edit->setMinimumWidth(fontMetrics().width('X') * 40); KURLCompletion* comp = new KURLCompletion(); workdir_edit->setCompletionObject(comp); workdir_edit->setAutoDeleteCompletionObject(true); - connect( workdir_edit, SIGNAL(returnPressed(const QString&)), - comp, SLOT(addItem(const QString&)) ); + connect( workdir_edit, TQT_SIGNAL(returnPressed(const TQString&)), + comp, TQT_SLOT(addItem(const TQString&)) ); - QPushButton* dir_button = new QPushButton("...", mainWidget); - connect( dir_button, SIGNAL(clicked()), - this, SLOT(dirButtonClicked()) ); + TQPushButton* dir_button = new TQPushButton("...", mainWidget); + connect( dir_button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(dirButtonClicked()) ); dir_button->setFixedWidth(30); - QBoxLayout* workdir_layout = new QHBoxLayout(); + TQBoxLayout* workdir_layout = new TQHBoxLayout(); grid->addLayout(workdir_layout, (action==Import)? 2 : 3, 1); workdir_layout->addWidget(workdir_edit, 10); workdir_layout->addWidget(dir_button, 0, AlignVCenter); - QLabel* workdir_label = new QLabel(workdir_edit, i18n("Working &folder:"), + TQLabel* workdir_label = new TQLabel(workdir_edit, i18n("Working &folder:"), mainWidget); grid->addWidget(workdir_label, (action==Import)? 2 : 3, 0, AlignLeft | AlignVCenter); @@ -146,35 +146,35 @@ CheckoutDialog::CheckoutDialog(KConfig& cfg, CvsService_stub* service, vendortag_edit = new KLineEdit(mainWidget); grid->addWidget(vendortag_edit, 3, 1); - QLabel* vendortag_label = new QLabel(vendortag_edit, i18n("&Vendor tag:"), + TQLabel* vendortag_label = new TQLabel(vendortag_edit, i18n("&Vendor tag:"), mainWidget); grid->addWidget(vendortag_label, 3, 0, AlignLeft | AlignVCenter); releasetag_edit = new KLineEdit(mainWidget); grid->addWidget(releasetag_edit, 4, 1); - QLabel* releasetag_label = new QLabel(releasetag_edit, i18n("&Release tag:"), + TQLabel* releasetag_label = new TQLabel(releasetag_edit, i18n("&Release tag:"), mainWidget); grid->addWidget(releasetag_label, 4, 0, AlignLeft | AlignVCenter); ignore_edit = new KLineEdit(mainWidget); grid->addWidget(ignore_edit, 5, 1); - QLabel* ignore_label = new QLabel(ignore_edit, i18n("&Ignore files:"), + TQLabel* ignore_label = new TQLabel(ignore_edit, i18n("&Ignore files:"), mainWidget); grid->addWidget(ignore_label, 5, 0, AlignLeft | AlignVCenter); comment_edit = new KLineEdit(mainWidget); grid->addWidget(comment_edit, 6, 1); - QLabel* comment_label = new QLabel(comment_edit, i18n("&Comment:"), + TQLabel* comment_label = new TQLabel(comment_edit, i18n("&Comment:"), mainWidget); grid->addWidget(comment_label, 6, 0, AlignLeft | AlignVCenter); - binary_box = new QCheckBox(i18n("Import as &binaries"), mainWidget); + binary_box = new TQCheckBox(i18n("Import as &binaries"), mainWidget); grid->addMultiCellWidget(binary_box, 7, 7, 0, 1); - m_useModificationTimeBox = new QCheckBox( + m_useModificationTimeBox = new TQCheckBox( i18n("Use file's modification time as time of import"), mainWidget); grid->addMultiCellWidget(m_useModificationTimeBox, 8, 8, 0, 1); } @@ -183,20 +183,20 @@ CheckoutDialog::CheckoutDialog(KConfig& cfg, CvsService_stub* service, alias_edit = new KLineEdit(mainWidget); grid->addWidget(alias_edit, 4, 1); - QLabel* alias_label = new QLabel(alias_edit, i18n("Chec&k out as:"), mainWidget); + TQLabel* alias_label = new TQLabel(alias_edit, i18n("Chec&k out as:"), mainWidget); grid->addWidget(alias_label, 4, 0, AlignLeft | AlignVCenter); - export_box = new QCheckBox(i18n("Ex&port only"), mainWidget); + export_box = new TQCheckBox(i18n("Ex&port only"), mainWidget); grid->addMultiCellWidget(export_box, 5, 5, 0, 1); } - QStringList list1 = Repositories::readCvsPassFile(); - QStringList::ConstIterator it1; + TQStringList list1 = Repositories::readCvsPassFile(); + TQStringList::ConstIterator it1; for (it1 = list1.begin(); it1 != list1.end(); ++it1) repo_combo->insertItem(*it1); - QStringList list2 = Repositories::readConfigFile(); - QStringList::ConstIterator it2; + TQStringList list2 = Repositories::readConfigFile(); + TQStringList::ConstIterator it2; for (it2 = list2.begin(); it2 != list2.end(); ++it2) if (!list1.contains(*it2)) repo_combo->insertItem(*it2); @@ -207,54 +207,54 @@ CheckoutDialog::CheckoutDialog(KConfig& cfg, CvsService_stub* service, } -QString CheckoutDialog::workingDirectory() const +TQString CheckoutDialog::workingDirectory() const { return workdir_edit->text(); } -QString CheckoutDialog::repository() const +TQString CheckoutDialog::repository() const { return repo_combo->currentText(); } -QString CheckoutDialog::module() const +TQString CheckoutDialog::module() const { return act==Import? module_edit->text() : module_combo->currentText(); } -QString CheckoutDialog::branch() const +TQString CheckoutDialog::branch() const { return branchCombo->currentText(); } -QString CheckoutDialog::vendorTag() const +TQString CheckoutDialog::vendorTag() const { return vendortag_edit->text(); } -QString CheckoutDialog::releaseTag() const +TQString CheckoutDialog::releaseTag() const { return releasetag_edit->text(); } -QString CheckoutDialog::ignoreFiles() const +TQString CheckoutDialog::ignoreFiles() const { return ignore_edit->text(); } -QString CheckoutDialog::comment() const +TQString CheckoutDialog::comment() const { return comment_edit->text(); } -QString CheckoutDialog::alias() const +TQString CheckoutDialog::alias() const { return alias_edit->text(); } @@ -284,7 +284,7 @@ bool CheckoutDialog::recursive() const void CheckoutDialog::slotOk() { - QFileInfo fi(workingDirectory()); + TQFileInfo fi(workingDirectory()); if (!fi.exists() || !fi.isDir()) { KMessageBox::information(this, i18n("Please choose an existing working folder.")); @@ -330,7 +330,7 @@ void CheckoutDialog::slotOk() void CheckoutDialog::dirButtonClicked() { - QString dir = KFileDialog::getExistingDirectory(workdir_edit->text()); + TQString dir = KFileDialog::getExistingDirectory(workdir_edit->text()); if (!dir.isEmpty()) workdir_edit->setText(dir); } @@ -347,7 +347,7 @@ void CheckoutDialog::moduleButtonClicked() return; module_combo->clear(); - QString str; + TQString str; while (dlg.getLine(str)) { if (str.left(12) == "Unknown host") @@ -358,7 +358,7 @@ void CheckoutDialog::moduleButtonClicked() pos = str.find('\t'); if (pos == -1) pos = str.length(); - QString module( str.left(pos).stripWhiteSpace() ); + TQString module( str.left(pos).stripWhiteSpace() ); if ( !module.isEmpty() ) module_combo->insertItem(module); } @@ -367,7 +367,7 @@ void CheckoutDialog::moduleButtonClicked() void CheckoutDialog::branchButtonClicked() { - QStringList branchTagList; + TQStringList branchTagList; if( repository().isEmpty() ) { @@ -386,12 +386,12 @@ void CheckoutDialog::branchButtonClicked() if( !cvsService->ok() ) return; - ProgressDialog dlg(this, "Remote Log", cvsJob, QString::null, + ProgressDialog dlg(this, "Remote Log", cvsJob, TQString::null, i18n("CVS Remote Log")); if( !dlg.execute() ) return; - QString line; + TQString line; while( dlg.getLine(line) ) { int colonPos; @@ -401,7 +401,7 @@ void CheckoutDialog::branchButtonClicked() if( (colonPos = line.find(':', 1)) < 0 ) continue; - const QString tag = line.mid(1, colonPos - 1); + const TQString tag = line.mid(1, colonPos - 1); if( !branchTagList.contains(tag) ) branchTagList.push_back(tag); } diff --git a/cervisia/checkoutdlg.h b/cervisia/checkoutdlg.h index 33f95f2b..20fd9cfd 100644 --- a/cervisia/checkoutdlg.h +++ b/cervisia/checkoutdlg.h @@ -40,17 +40,17 @@ public: enum ActionType { Checkout, Import }; CheckoutDialog( KConfig& cfg, CvsService_stub* service, ActionType action, - QWidget *parent=0, const char *name=0 ); - - QString workingDirectory() const; - QString repository() const; - QString module() const; - QString branch() const; - QString vendorTag() const; - QString releaseTag() const; - QString ignoreFiles() const; - QString comment() const; - QString alias() const; + TQWidget *parent=0, const char *name=0 ); + + TQString workingDirectory() const; + TQString repository() const; + TQString module() const; + TQString branch() const; + TQString vendorTag() const; + TQString releaseTag() const; + TQString ignoreFiles() const; + TQString comment() const; + TQString alias() const; bool importBinary() const; bool useModificationTime() const; bool exportOnly() const; @@ -69,12 +69,12 @@ private: void saveUserInput(); void restoreUserInput(); - QComboBox *repo_combo, *module_combo, *branchCombo; + TQComboBox *repo_combo, *module_combo, *branchCombo; KLineEdit *module_edit, *workdir_edit; KLineEdit *comment_edit; KLineEdit *vendortag_edit, *releasetag_edit, *ignore_edit, *alias_edit; - QCheckBox *binary_box, *export_box, *recursive_box; - QCheckBox* m_useModificationTimeBox; + TQCheckBox *binary_box, *export_box, *recursive_box; + TQCheckBox* m_useModificationTimeBox; ActionType act; KConfig& partConfig; diff --git a/cervisia/commitdlg.cpp b/cervisia/commitdlg.cpp index 53c91ba7..4fdaca68 100644 --- a/cervisia/commitdlg.cpp +++ b/cervisia/commitdlg.cpp @@ -20,13 +20,13 @@ #include "commitdlg.h" -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qheader.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqheader.h> #include <klistview.h> #include <kconfig.h> #include <klocale.h> @@ -39,31 +39,31 @@ class CommitListItem : public QCheckListItem { public: - CommitListItem(QListView* parent, const QString& text, const QString fileName) - : QCheckListItem(parent, text, QCheckListItem::CheckBox) + CommitListItem(TQListView* parent, const TQString& text, const TQString fileName) + : TQCheckListItem(parent, text, TQCheckListItem::CheckBox) , m_fileName(fileName) { } - QString fileName() const { return m_fileName; } + TQString fileName() const { return m_fileName; } private: - QString m_fileName; + TQString m_fileName; }; CommitDialog::CommitDialog(KConfig& cfg, CvsService_stub* service, - QWidget *parent, const char *name) + TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("CVS Commit"), Ok | Cancel | Help | User1, Ok, true) , partConfig(cfg) , cvsService(service) { - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - QLabel *textlabel = new QLabel( i18n("Commit the following &files:"), mainWidget ); + TQLabel *textlabel = new TQLabel( i18n("Commit the following &files:"), mainWidget ); layout->addWidget(textlabel); m_fileList = new KListView(mainWidget); @@ -71,23 +71,23 @@ CommitDialog::CommitDialog(KConfig& cfg, CvsService_stub* service, m_fileList->setFullWidth(true); m_fileList->header()->hide(); textlabel->setBuddy(m_fileList); - connect( m_fileList, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(fileSelected(QListViewItem*))); - connect( m_fileList, SIGNAL(selectionChanged()), - this, SLOT(fileHighlighted()) ); + connect( m_fileList, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this, TQT_SLOT(fileSelected(TQListViewItem*))); + connect( m_fileList, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(fileHighlighted()) ); layout->addWidget(m_fileList, 5); - QLabel *archivelabel = new QLabel(i18n("Older &messages:"), mainWidget); + TQLabel *archivelabel = new TQLabel(i18n("Older &messages:"), mainWidget); layout->addWidget(archivelabel); - combo = new QComboBox(mainWidget); + combo = new TQComboBox(mainWidget); archivelabel->setBuddy(combo); - connect( combo, SIGNAL(activated(int)), this, SLOT(comboActivated(int)) ); + connect( combo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(comboActivated(int)) ); // make sure that combobox is smaller than the screen - combo->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed)); + combo->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); layout->addWidget(combo); - QLabel *messagelabel = new QLabel(i18n("&Log message:"), mainWidget); + TQLabel *messagelabel = new TQLabel(i18n("&Log message:"), mainWidget); layout->addWidget(messagelabel); edit = new Cervisia::LogMessageEdit(mainWidget); @@ -97,20 +97,20 @@ CommitDialog::CommitDialog(KConfig& cfg, CvsService_stub* service, edit->setMinimumSize(400, 100); layout->addWidget(edit, 10); - m_useTemplateChk = new QCheckBox(i18n("Use log message &template"), mainWidget); + m_useTemplateChk = new TQCheckBox(i18n("Use log message &template"), mainWidget); layout->addWidget(m_useTemplateChk); - connect( m_useTemplateChk, SIGNAL(clicked()), this, SLOT(useTemplateClicked()) ); + connect( m_useTemplateChk, TQT_SIGNAL(clicked()), this, TQT_SLOT(useTemplateClicked()) ); checkForTemplateFile(); setButtonGuiItem(User1, KGuiItem(i18n("&Diff"), "vcs_diff")); enableButton(User1, false); - connect( this, SIGNAL(user1Clicked()), - this, SLOT(diffClicked()) ); + connect( this, TQT_SIGNAL(user1Clicked()), + this, TQT_SLOT(diffClicked()) ); setHelp("commitingfiles"); - QSize size = configDialogSize(partConfig, "CommitDialog"); + TQSize size = configDialogSize(partConfig, "CommitDialog"); resize(size); } @@ -124,16 +124,16 @@ CommitDialog::~CommitDialog() } -void CommitDialog::setFileList(const QStringList &list) +void CommitDialog::setFileList(const TQStringList &list) { - QString currentDirName = QFileInfo(QChar('.')).absFilePath(); + TQString currentDirName = TQFileInfo(TQChar('.')).absFilePath(); - QStringList::ConstIterator it = list.begin(); + TQStringList::ConstIterator it = list.begin(); for( ; it != list.end(); ++it ) { // the dot for the root directory is hard to see, so // we convert it to the absolut path - QString text = (*it != "." ? *it : currentDirName); + TQString text = (*it != "." ? *it : currentDirName); edit->compObj()->addItem(text); CommitListItem* item = new CommitListItem(m_fileList, text, *it); @@ -142,11 +142,11 @@ void CommitDialog::setFileList(const QStringList &list) } -QStringList CommitDialog::fileList() const +TQStringList CommitDialog::fileList() const { - QStringList files; + TQStringList files; - QListViewItemIterator it(m_fileList, QListViewItemIterator::Checked); + TQListViewItemIterator it(m_fileList, TQListViewItemIterator::Checked); for( ; it.current(); ++it ) { CommitListItem* item = static_cast<CommitListItem*>(it.current()); @@ -157,7 +157,7 @@ QStringList CommitDialog::fileList() const } -void CommitDialog::setLogMessage(const QString &msg) +void CommitDialog::setLogMessage(const TQString &msg) { edit->setText(msg); @@ -166,25 +166,25 @@ void CommitDialog::setLogMessage(const QString &msg) } -QString CommitDialog::logMessage() const +TQString CommitDialog::logMessage() const { return edit->text(); } -void CommitDialog::setLogHistory(const QStringList &list) +void CommitDialog::setLogHistory(const TQStringList &list) { commits = list; combo->insertItem(i18n("Current")); - for ( QStringList::ConstIterator it = list.begin(); + for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { if( (*it).isEmpty() ) continue; - QString txt = *it; + TQString txt = *it; int index = txt.find('\n', 0); if ( index != -1 ) // Fetch first line { @@ -216,7 +216,7 @@ void CommitDialog::comboActivated(int index) } -void CommitDialog::fileSelected(QListViewItem* item) +void CommitDialog::fileSelected(TQListViewItem* item) { // double click on empty space? if( !item ) @@ -235,7 +235,7 @@ void CommitDialog::fileHighlighted() void CommitDialog::diffClicked() { - QListViewItem* item = m_fileList->selectedItem(); + TQListViewItem* item = m_fileList->selectedItem(); if( !item ) return; @@ -243,7 +243,7 @@ void CommitDialog::diffClicked() } -void CommitDialog::showDiffDialog(const QString& fileName) +void CommitDialog::showDiffDialog(const TQString& fileName) { DiffDialog *l = new DiffDialog(partConfig, this, "diffdialog"); @@ -275,13 +275,13 @@ void CommitDialog::useTemplateClicked() void CommitDialog::checkForTemplateFile() { - QString filename = QDir::current().absPath() + "/CVS/Template"; - if( QFile::exists(filename) ) + TQString filename = TQDir::current().absPath() + "/CVS/Template"; + if( TQFile::exists(filename) ) { - QFile f(filename); + TQFile f(filename); if( f.open(IO_ReadOnly) ) { - QTextStream stream(&f); + TQTextStream stream(&f); m_templateText = stream.read(); f.close(); @@ -307,7 +307,7 @@ void CommitDialog::checkForTemplateFile() void CommitDialog::addTemplateText() { edit->append(m_templateText); - edit->moveCursor(QTextEdit::MoveHome, false); + edit->moveCursor(TQTextEdit::MoveHome, false); edit->ensureCursorVisible(); } diff --git a/cervisia/commitdlg.h b/cervisia/commitdlg.h index fe3d9acf..c9bd44b5 100644 --- a/cervisia/commitdlg.h +++ b/cervisia/commitdlg.h @@ -22,7 +22,7 @@ #ifndef COMMITDLG_H #define COMMITDLG_H -#include <qstringlist.h> +#include <tqstringlist.h> #include <kdialogbase.h> namespace Cervisia { class LogMessageEdit; } @@ -39,40 +39,40 @@ class CommitDialog : public KDialogBase Q_OBJECT public: - CommitDialog( KConfig& cfg, CvsService_stub* service, QWidget *parent=0, + CommitDialog( KConfig& cfg, CvsService_stub* service, TQWidget *parent=0, const char *name=0 ); virtual ~CommitDialog(); - void setFileList(const QStringList &list); - QStringList fileList() const; - void setLogMessage(const QString &msg); - QString logMessage() const; - void setLogHistory(const QStringList &list); + void setFileList(const TQStringList &list); + TQStringList fileList() const; + void setLogMessage(const TQString &msg); + TQString logMessage() const; + void setLogHistory(const TQStringList &list); private slots: void comboActivated(int); - void fileSelected(QListViewItem* item); + void fileSelected(TQListViewItem* item); void fileHighlighted(); void diffClicked(); void useTemplateClicked(); private: - void showDiffDialog(const QString& fileName); + void showDiffDialog(const TQString& fileName); void checkForTemplateFile(); void addTemplateText(); void removeTemplateText(); KListView* m_fileList; Cervisia::LogMessageEdit* edit; - QComboBox *combo; - QStringList commits; + TQComboBox *combo; + TQStringList commits; int current_index; - QString current_text; + TQString current_text; int highlightedFile; - QCheckBox* m_useTemplateChk; - QString m_templateText; + TQCheckBox* m_useTemplateChk; + TQString m_templateText; KConfig& partConfig; CvsService_stub* cvsService; // for diff dialog diff --git a/cervisia/cvsdir.cpp b/cervisia/cvsdir.cpp index 263fd704..20f2994d 100644 --- a/cervisia/cvsdir.cpp +++ b/cervisia/cvsdir.cpp @@ -25,16 +25,16 @@ using namespace Cervisia; -CvsDir::CvsDir(const QString &path) - : QDir( path, 0, QDir::Name, - QDir::All | QDir::Hidden | QDir::NoSymLinks ) +CvsDir::CvsDir(const TQString &path) + : TQDir( path, 0, TQDir::Name, + TQDir::All | TQDir::Hidden | TQDir::NoSymLinks ) {} const QFileInfoList *CvsDir::entryInfoList() const { DirIgnoreList ignorelist(absPath()); - const QFileInfoList *fulllist = QDir::entryInfoList(); + const QFileInfoList *fulllist = TQDir::entryInfoList(); if (!fulllist) return 0; diff --git a/cervisia/cvsdir.h b/cervisia/cvsdir.h index 8f732163..2b9cd9ce 100644 --- a/cervisia/cvsdir.h +++ b/cervisia/cvsdir.h @@ -21,13 +21,13 @@ #ifndef CVSDIR_H #define CVSDIR_H -#include <qdir.h> +#include <tqdir.h> class CvsDir : public QDir { public: - explicit CvsDir(const QString &path); + explicit CvsDir(const TQString &path); const QFileInfoList *entryInfoList() const; diff --git a/cervisia/cvsinitdlg.cpp b/cervisia/cvsinitdlg.cpp index 9de80759..cf0b4641 100644 --- a/cervisia/cvsinitdlg.cpp +++ b/cervisia/cvsinitdlg.cpp @@ -19,9 +19,9 @@ #include "cvsinitdlg.h" -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> #include <kfiledialog.h> #include <klineedit.h> @@ -32,17 +32,17 @@ using Cervisia::CvsInitDialog; -CvsInitDialog::CvsInitDialog(QWidget* parent, const char* name) +CvsInitDialog::CvsInitDialog(TQWidget* parent, const char* name) : KDialogBase(parent, name, true, i18n("Create New Repository (cvs init)"), Ok | Cancel, Ok, true) { - QFrame* mainWidget = makeMainWidget(); - QVBoxLayout* mainLayout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQFrame* mainWidget = makeMainWidget(); + TQVBoxLayout* mainLayout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - QLabel* dirLabel = new QLabel(i18n("Repository folder:"), mainWidget); + TQLabel* dirLabel = new TQLabel(i18n("Repository folder:"), mainWidget); mainLayout->addWidget(dirLabel); - QHBoxLayout* dirLayout = new QHBoxLayout(mainLayout); + TQHBoxLayout* dirLayout = new TQHBoxLayout(mainLayout); m_directoryEdit = new KLineEdit(mainWidget); m_directoryEdit->setFocus(); @@ -54,14 +54,14 @@ CvsInitDialog::CvsInitDialog(QWidget* parent, const char* name) dirLabel->setBuddy(m_directoryEdit); dirLayout->addWidget(m_directoryEdit); - QPushButton* dirButton = new QPushButton("...", mainWidget); + TQPushButton* dirButton = new TQPushButton("...", mainWidget); dirButton->setFixedWidth(30); dirLayout->addWidget(dirButton); - connect( dirButton, SIGNAL(clicked()), - this, SLOT(dirButtonClicked()) ); - connect( m_directoryEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(lineEditTextChanged(const QString&))); + connect( dirButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(dirButtonClicked()) ); + connect( m_directoryEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(lineEditTextChanged(const TQString&))); enableButton(Ok, false); @@ -69,7 +69,7 @@ CvsInitDialog::CvsInitDialog(QWidget* parent, const char* name) } -QString CvsInitDialog::directory() const +TQString CvsInitDialog::directory() const { return m_directoryEdit->text(); } @@ -77,13 +77,13 @@ QString CvsInitDialog::directory() const void CvsInitDialog::dirButtonClicked() { - QString dir = KFileDialog::getExistingDirectory(m_directoryEdit->text()); + TQString dir = KFileDialog::getExistingDirectory(m_directoryEdit->text()); if( !dir.isEmpty() ) m_directoryEdit->setText(dir); } -void CvsInitDialog::lineEditTextChanged(const QString& text) +void CvsInitDialog::lineEditTextChanged(const TQString& text) { enableButton(Ok, !text.stripWhiteSpace().isEmpty()); } diff --git a/cervisia/cvsinitdlg.h b/cervisia/cvsinitdlg.h index 007617a7..9ca35ad0 100644 --- a/cervisia/cvsinitdlg.h +++ b/cervisia/cvsinitdlg.h @@ -34,13 +34,13 @@ class CvsInitDialog : public KDialogBase Q_OBJECT public: - CvsInitDialog(QWidget* parent = 0, const char* name = 0); + CvsInitDialog(TQWidget* parent = 0, const char* name = 0); - QString directory() const; + TQString directory() const; private slots: void dirButtonClicked(); - void lineEditTextChanged(const QString& text); + void lineEditTextChanged(const TQString& text); private: KLineEdit* m_directoryEdit; diff --git a/cervisia/cvsservice/cvsaskpass.cpp b/cervisia/cvsservice/cvsaskpass.cpp index 01903f02..13660c7e 100644 --- a/cervisia/cvsservice/cvsaskpass.cpp +++ b/cervisia/cvsservice/cvsaskpass.cpp @@ -18,7 +18,7 @@ * */ -#include <qregexp.h> +#include <tqregexp.h> #include <kaboutdata.h> #include <kapplication.h> #include <kcmdlineargs.h> @@ -56,8 +56,8 @@ extern "C" KDE_EXPORT int kdemain(int argc, char** argv) return 1; // parse repository name from the passed argument - QString prompt = KCmdLineArgs::parsedArgs()->arg(0); - QRegExp rx("(.*@.*)'s password:"); + TQString prompt = KCmdLineArgs::parsedArgs()->arg(0); + TQRegExp rx("(.*@.*)'s password:"); int pos = rx.search(prompt); KPasswordDialog dlg(KPasswordDialog::Password, false, 0); diff --git a/cervisia/cvsservice/cvsjob.cpp b/cervisia/cvsservice/cvsjob.cpp index e73e0abc..3f4f06fe 100644 --- a/cervisia/cvsservice/cvsjob.cpp +++ b/cervisia/cvsservice/cvsjob.cpp @@ -20,7 +20,7 @@ #include "cvsjob.h" -#include <qfile.h> +#include <tqfile.h> #include <kdebug.h> #include <kprocess.h> @@ -37,26 +37,26 @@ struct CvsJob::Private ~Private() { delete childproc; } KProcess* childproc; - QString server; - QString rsh; - QString directory; + TQString server; + TQString rsh; + TQString directory; bool isRunning; - QStringList outputLines; + TQStringList outputLines; }; CvsJob::CvsJob(unsigned jobNum) - : QObject() + : TQObject() , DCOPObject() , d(new Private) { - QString objId("CvsJob" + QString::number(jobNum)); + TQString objId("CvsJob" + TQString::number(jobNum)); setObjId(objId.local8Bit()); } -CvsJob::CvsJob(const QString& objId) - : QObject() +CvsJob::CvsJob(const TQString& objId) + : TQObject() , DCOPObject() , d(new Private) { @@ -76,19 +76,19 @@ void CvsJob::clearCvsCommand() } -void CvsJob::setRSH(const QString& rsh) +void CvsJob::setRSH(const TQString& rsh) { d->rsh = rsh; } -void CvsJob::setServer(const QString& server) +void CvsJob::setServer(const TQString& server) { d->server = server; } -void CvsJob::setDirectory(const QString& directory) +void CvsJob::setDirectory(const TQString& directory) { d->directory = directory; } @@ -100,7 +100,7 @@ bool CvsJob::isRunning() const } -CvsJob& CvsJob::operator<<(const QString& arg) +CvsJob& CvsJob::operator<<(const TQString& arg) { *d->childproc << arg; return *this; @@ -114,39 +114,39 @@ CvsJob& CvsJob::operator<<(const char* arg) } -CvsJob& CvsJob::operator<<(const QCString& arg) +CvsJob& CvsJob::operator<<(const TQCString& arg) { *d->childproc << arg; return *this; } -CvsJob& CvsJob::operator<<(const QStringList& args) +CvsJob& CvsJob::operator<<(const TQStringList& args) { *d->childproc << args; return *this; } -QString CvsJob::cvsCommand() const +TQString CvsJob::cvsCommand() const { - QString command; + TQString command; - const QValueList<QCString>& args(d->childproc->args()); - for (QValueList<QCString>::const_iterator it = args.begin(), itEnd = args.end(); + const TQValueList<TQCString>& args(d->childproc->args()); + for (TQValueList<TQCString>::const_iterator it = args.begin(), itEnd = args.end(); it != itEnd; ++it) { if (!command.isEmpty()) command += ' '; - command += QFile::decodeName(*it); + command += TQFile::decodeName(*it); } return command; } -QStringList CvsJob::output() const +TQStringList CvsJob::output() const { return d->outputLines; } @@ -176,12 +176,12 @@ bool CvsJob::execute() if( !d->directory.isEmpty() ) d->childproc->setWorkingDirectory(d->directory); - connect(d->childproc, SIGNAL(processExited(KProcess*)), - SLOT(slotProcessExited())); - connect(d->childproc, SIGNAL(receivedStdout(KProcess*, char*, int)), - SLOT(slotReceivedStdout(KProcess*, char*, int))); - connect(d->childproc, SIGNAL(receivedStderr(KProcess*, char*, int)), - SLOT(slotReceivedStderr(KProcess*, char*, int)) ); + connect(d->childproc, TQT_SIGNAL(processExited(KProcess*)), + TQT_SLOT(slotProcessExited())); + connect(d->childproc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), + TQT_SLOT(slotReceivedStdout(KProcess*, char*, int))); + connect(d->childproc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), + TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)) ); kdDebug(8051) << "Execute cvs command: " << cvsCommand() << endl; @@ -212,10 +212,10 @@ void CvsJob::slotReceivedStdout(KProcess* proc, char* buffer, int buflen) { Q_UNUSED(proc); - QString output = QString::fromLocal8Bit(buffer, buflen); + TQString output = TQString::fromLocal8Bit(buffer, buflen); // accumulate output - d->outputLines += QStringList::split("\n", output); + d->outputLines += TQStringList::split("\n", output); emit receivedStdout(output); } @@ -225,10 +225,10 @@ void CvsJob::slotReceivedStderr(KProcess* proc, char* buffer, int buflen) { Q_UNUSED(proc); - QString output = QString::fromLocal8Bit(buffer, buflen); + TQString output = TQString::fromLocal8Bit(buffer, buflen); // accumulate output - d->outputLines += QStringList::split("\n", output); + d->outputLines += TQStringList::split("\n", output); emit receivedStderr(output); } diff --git a/cervisia/cvsservice/cvsjob.h b/cervisia/cvsservice/cvsjob.h index 85d9b1fd..88aaa9fb 100644 --- a/cervisia/cvsservice/cvsjob.h +++ b/cervisia/cvsservice/cvsjob.h @@ -21,33 +21,33 @@ #ifndef CVSJOB_H #define CVSJOB_H -#include <qobject.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <dcopobject.h> class KProcess; -class KDE_EXPORT CvsJob : public QObject, public DCOPObject +class KDE_EXPORT CvsJob : public TQObject, public DCOPObject { Q_OBJECT K_DCOP public: explicit CvsJob(unsigned jobNum); - explicit CvsJob(const QString& objId); + explicit CvsJob(const TQString& objId); virtual ~CvsJob(); void clearCvsCommand(); - void setRSH(const QString& rsh); - void setServer(const QString& server); - void setDirectory(const QString& directory); + void setRSH(const TQString& rsh); + void setServer(const TQString& server); + void setDirectory(const TQString& directory); - CvsJob& operator<<(const QString& arg); + CvsJob& operator<<(const TQString& arg); CvsJob& operator<<(const char* arg); - CvsJob& operator<<(const QCString& arg); - CvsJob& operator<<(const QStringList& args); + CvsJob& operator<<(const TQCString& arg); + CvsJob& operator<<(const TQStringList& args); k_dcop: bool execute(); @@ -60,14 +60,14 @@ k_dcop: * * @return The current cvs command. Can be null if not set. */ - QString cvsCommand() const; + TQString cvsCommand() const; - QStringList output() const; + TQStringList output() const; k_dcop_signals: void jobExited(bool normalExit, int status); - void receivedStdout(const QString& buffer); - void receivedStderr(const QString& buffer); + void receivedStdout(const TQString& buffer); + void receivedStderr(const TQString& buffer); private slots: void slotProcessExited(); diff --git a/cervisia/cvsservice/cvsloginjob.cpp b/cervisia/cvsservice/cvsloginjob.cpp index 5ffe0d17..ad6f9176 100644 --- a/cervisia/cvsservice/cvsloginjob.cpp +++ b/cervisia/cvsservice/cvsloginjob.cpp @@ -36,7 +36,7 @@ CvsLoginJob::CvsLoginJob(unsigned jobNum) : DCOPObject() , m_Proc(0) { - QString objId("CvsLoginJob" + QString::number(jobNum)); + TQString objId("CvsLoginJob" + TQString::number(jobNum)); setObjId(objId.local8Bit()); m_Proc = new PtyProcess; @@ -49,13 +49,13 @@ CvsLoginJob::~CvsLoginJob() } -void CvsLoginJob::setServer(const QString& server) +void CvsLoginJob::setServer(const TQString& server) { m_Server = server; } -void CvsLoginJob::setCvsClient(const QCString& cvsClient) +void CvsLoginJob::setCvsClient(const TQCString& cvsClient) { m_CvsClient = cvsClient; @@ -64,7 +64,7 @@ void CvsLoginJob::setCvsClient(const QCString& cvsClient) } -void CvsLoginJob::setRepository(const QCString& repository) +void CvsLoginJob::setRepository(const TQCString& repository) { m_Arguments += "-d"; m_Arguments += repository; @@ -74,7 +74,7 @@ void CvsLoginJob::setRepository(const QCString& repository) bool CvsLoginJob::execute() { - static QCString repository; + static TQCString repository; int res = m_Proc->exec(m_CvsClient, m_Arguments); if( res < 0 ) @@ -86,7 +86,7 @@ bool CvsLoginJob::execute() bool result = false; while( true ) { - QCString line = m_Proc->readLine(); + TQCString line = m_Proc->readLine(); if( line.isNull() ) { return result; @@ -113,7 +113,7 @@ bool CvsLoginJob::execute() // TODO: We really should display the repository name. Unfortunately // the dialog doesn't show part of the repository name, because // it's too long. :-( - QCString password; + TQCString password; int res = KPasswordDialog::getPassword(password, i18n("Please type " "in your password for the repository below.")); if( res == KPasswordDialog::Accepted ) @@ -150,7 +150,7 @@ bool CvsLoginJob::execute() } -QStringList CvsLoginJob::output() +TQStringList CvsLoginJob::output() { return m_output; } diff --git a/cervisia/cvsservice/cvsloginjob.h b/cervisia/cvsservice/cvsloginjob.h index 7aae928f..71291175 100644 --- a/cervisia/cvsservice/cvsloginjob.h +++ b/cervisia/cvsservice/cvsloginjob.h @@ -21,8 +21,8 @@ #ifndef CVSLOGINJOB_H #define CVSLOGINJOB_H -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <dcopobject.h> #include <kdesu/process.h> @@ -36,22 +36,22 @@ public: explicit CvsLoginJob(unsigned jobNum); virtual ~CvsLoginJob(); - void setServer(const QString& server); + void setServer(const TQString& server); - void setCvsClient(const QCString& cvsClient); - void setRepository(const QCString& repository); + void setCvsClient(const TQCString& cvsClient); + void setRepository(const TQCString& repository); k_dcop: bool execute(); - QStringList output(); + TQStringList output(); private: PtyProcess* m_Proc; - QString m_Server; - QString m_Rsh; - QCString m_CvsClient; + TQString m_Server; + TQString m_Rsh; + TQCString m_CvsClient; QCStringList m_Arguments; - QStringList m_output; + TQStringList m_output; }; diff --git a/cervisia/cvsservice/cvsservice.cpp b/cervisia/cvsservice/cvsservice.cpp index 4a4c830b..aa64bb4b 100644 --- a/cervisia/cvsservice/cvsservice.cpp +++ b/cervisia/cvsservice/cvsservice.cpp @@ -20,8 +20,8 @@ #include "cvsservice.h" -#include <qintdict.h> -#include <qstring.h> +#include <tqintdict.h> +#include <tqstring.h> #include <dcopref.h> #include <dcopclient.h> @@ -54,11 +54,11 @@ struct CvsService::Private CvsJob* singleCvsJob; // non-concurrent cvs job, like update or commit DCOPRef singleJobRef; // DCOP reference to non-concurrent cvs job - QIntDict<CvsJob> cvsJobs; // concurrent cvs jobs, like diff or annotate - QIntDict<CvsLoginJob> loginJobs; + TQIntDict<CvsJob> cvsJobs; // concurrent cvs jobs, like diff or annotate + TQIntDict<CvsLoginJob> loginJobs; unsigned lastJobId; - QCString appId; // cache the DCOP clients app id + TQCString appId; // cache the DCOP clients app id Repository* repository; @@ -111,7 +111,7 @@ CvsService::~CvsService() } -DCOPRef CvsService::add(const QStringList& files, bool isBinary) +DCOPRef CvsService::add(const TQStringList& files, bool isBinary) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -131,7 +131,7 @@ DCOPRef CvsService::add(const QStringList& files, bool isBinary) } -DCOPRef CvsService::addWatch(const QStringList& files, int events) +DCOPRef CvsService::addWatch(const TQStringList& files, int events) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -157,7 +157,7 @@ DCOPRef CvsService::addWatch(const QStringList& files, int events) } -DCOPRef CvsService::annotate(const QString& fileName, const QString& revision) +DCOPRef CvsService::annotate(const TQString& fileName, const TQString& revision) { if( !d->hasWorkingCopy() ) return DCOPRef(); @@ -167,8 +167,8 @@ DCOPRef CvsService::annotate(const QString& fileName, const QString& revision) // assemble the command line // (cvs log [FILE] && cvs annotate [-r rev] [FILE]) - QString quotedName = KProcess::quote(fileName); - QString cvsClient = d->repository->cvsClient(); + TQString quotedName = KProcess::quote(fileName); + TQString cvsClient = d->repository->cvsClient(); *job << "(" << cvsClient << "log" << quotedName << "&&" << cvsClient << "annotate"; @@ -186,8 +186,8 @@ DCOPRef CvsService::annotate(const QString& fileName, const QString& revision) } -DCOPRef CvsService::checkout(const QString& workingDir, const QString& repository, - const QString& module, const QString& tag, +DCOPRef CvsService::checkout(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& tag, bool pruneDirs) { if( d->hasRunningJob() ) @@ -216,9 +216,9 @@ DCOPRef CvsService::checkout(const QString& workingDir, const QString& repositor } -DCOPRef CvsService::checkout(const QString& workingDir, const QString& repository, - const QString& module, const QString& tag, - bool pruneDirs, const QString& alias, bool exportOnly) +DCOPRef CvsService::checkout(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& tag, + bool pruneDirs, const TQString& alias, bool exportOnly) { if( d->hasRunningJob() ) return DCOPRef(); @@ -251,9 +251,9 @@ DCOPRef CvsService::checkout(const QString& workingDir, const QString& repositor return d->setupNonConcurrentJob(&repo); } -DCOPRef CvsService::checkout(const QString& workingDir, const QString& repository, - const QString& module, const QString& tag, - bool pruneDirs, const QString& alias, bool exportOnly, +DCOPRef CvsService::checkout(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& tag, + bool pruneDirs, const TQString& alias, bool exportOnly, bool recursive) { if( d->hasRunningJob() ) @@ -290,7 +290,7 @@ DCOPRef CvsService::checkout(const QString& workingDir, const QString& repositor return d->setupNonConcurrentJob(&repo); } -DCOPRef CvsService::commit(const QStringList& files, const QString& commitMessage, +DCOPRef CvsService::commit(const TQStringList& files, const TQString& commitMessage, bool recursive) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) @@ -312,7 +312,7 @@ DCOPRef CvsService::commit(const QStringList& files, const QString& commitMessag } -DCOPRef CvsService::createRepository(const QString& repository) +DCOPRef CvsService::createRepository(const TQString& repository) { if( d->hasRunningJob() ) return DCOPRef(); @@ -330,7 +330,7 @@ DCOPRef CvsService::createRepository(const QString& repository) } -DCOPRef CvsService::createTag(const QStringList& files, const QString& tag, +DCOPRef CvsService::createTag(const TQStringList& files, const TQString& tag, bool branch, bool force) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) @@ -355,7 +355,7 @@ DCOPRef CvsService::createTag(const QStringList& files, const QString& tag, } -DCOPRef CvsService::deleteTag(const QStringList& files, const QString& tag, +DCOPRef CvsService::deleteTag(const TQStringList& files, const TQString& tag, bool branch, bool force) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) @@ -380,8 +380,8 @@ DCOPRef CvsService::deleteTag(const QStringList& files, const QString& tag, } -DCOPRef CvsService::downloadCvsIgnoreFile(const QString& repository, - const QString& outputFile) +DCOPRef CvsService::downloadCvsIgnoreFile(const TQString& repository, + const TQString& outputFile) { Repository repo(repository); @@ -399,9 +399,9 @@ DCOPRef CvsService::downloadCvsIgnoreFile(const QString& repository, } -DCOPRef CvsService::downloadRevision(const QString& fileName, - const QString& revision, - const QString& outputFile) +DCOPRef CvsService::downloadRevision(const TQString& fileName, + const TQString& revision, + const TQString& outputFile) { if( !d->hasWorkingCopy() ) return DCOPRef(); @@ -423,11 +423,11 @@ DCOPRef CvsService::downloadRevision(const QString& fileName, } -DCOPRef CvsService::downloadRevision(const QString& fileName, - const QString& revA, - const QString& outputFileA, - const QString& revB, - const QString& outputFileB) +DCOPRef CvsService::downloadRevision(const TQString& fileName, + const TQString& revA, + const TQString& outputFileA, + const TQString& revB, + const TQString& outputFileB) { if( !d->hasWorkingCopy() ) return DCOPRef(); @@ -450,19 +450,19 @@ DCOPRef CvsService::downloadRevision(const QString& fileName, } -DCOPRef CvsService::diff(const QString& fileName, const QString& revA, - const QString& revB, const QString& diffOptions, +DCOPRef CvsService::diff(const TQString& fileName, const TQString& revA, + const TQString& revB, const TQString& diffOptions, unsigned contextLines) { // cvs diff [DIFFOPTIONS] -U CONTEXTLINES [-r REVA] {-r REVB] [FILE] - QString format = "-U" + QString::number(contextLines); + TQString format = "-U" + TQString::number(contextLines); return diff(fileName, revA, revB, diffOptions, format); } -DCOPRef CvsService::diff(const QString& fileName, const QString& revA, - const QString& revB, const QString& diffOptions, - const QString& format) +DCOPRef CvsService::diff(const TQString& fileName, const TQString& revA, + const TQString& revB, const TQString& diffOptions, + const TQString& format) { if( !d->hasWorkingCopy() ) return DCOPRef(); @@ -488,7 +488,7 @@ DCOPRef CvsService::diff(const QString& fileName, const QString& revA, } -DCOPRef CvsService::edit(const QStringList& files) +DCOPRef CvsService::edit(const TQStringList& files) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -504,7 +504,7 @@ DCOPRef CvsService::edit(const QStringList& files) } -DCOPRef CvsService::editors(const QStringList& files) +DCOPRef CvsService::editors(const TQStringList& files) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -537,10 +537,10 @@ DCOPRef CvsService::history() } -DCOPRef CvsService::import(const QString& workingDir, const QString& repository, - const QString& module, const QString& ignoreList, - const QString& comment, const QString& vendorTag, - const QString& releaseTag, bool importAsBinary) +DCOPRef CvsService::import(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& ignoreList, + const TQString& comment, const TQString& vendorTag, + const TQString& releaseTag, bool importAsBinary) { if( d->hasRunningJob() ) return DCOPRef(); @@ -558,11 +558,11 @@ DCOPRef CvsService::import(const QString& workingDir, const QString& repository, if( importAsBinary ) *d->singleCvsJob << "-kb"; - const QString ignore = ignoreList.stripWhiteSpace(); + const TQString ignore = ignoreList.stripWhiteSpace(); if( !ignore.isEmpty() ) *d->singleCvsJob << "-I" << KProcess::quote(ignore); - QString logMessage = comment.stripWhiteSpace(); + TQString logMessage = comment.stripWhiteSpace(); logMessage.prepend("\""); logMessage.append("\""); *d->singleCvsJob << "-m" << logMessage; @@ -573,10 +573,10 @@ DCOPRef CvsService::import(const QString& workingDir, const QString& repository, } -DCOPRef CvsService::import(const QString& workingDir, const QString& repository, - const QString& module, const QString& ignoreList, - const QString& comment, const QString& vendorTag, - const QString& releaseTag, bool importAsBinary, +DCOPRef CvsService::import(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& ignoreList, + const TQString& comment, const TQString& vendorTag, + const TQString& releaseTag, bool importAsBinary, bool useModificationTime) { if( d->hasRunningJob() ) @@ -598,11 +598,11 @@ DCOPRef CvsService::import(const QString& workingDir, const QString& repository, if( useModificationTime ) *d->singleCvsJob << "-d"; - const QString ignore = ignoreList.stripWhiteSpace(); + const TQString ignore = ignoreList.stripWhiteSpace(); if( !ignore.isEmpty() ) *d->singleCvsJob << "-I" << KProcess::quote(ignore); - QString logMessage = comment.stripWhiteSpace(); + TQString logMessage = comment.stripWhiteSpace(); logMessage.prepend("\""); logMessage.append("\""); *d->singleCvsJob << "-m" << logMessage; @@ -613,7 +613,7 @@ DCOPRef CvsService::import(const QString& workingDir, const QString& repository, } -DCOPRef CvsService::lock(const QStringList& files) +DCOPRef CvsService::lock(const TQStringList& files) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -629,7 +629,7 @@ DCOPRef CvsService::lock(const QStringList& files) } -DCOPRef CvsService::log(const QString& fileName) +DCOPRef CvsService::log(const TQString& fileName) { if( !d->hasWorkingCopy() ) return DCOPRef(); @@ -646,7 +646,7 @@ DCOPRef CvsService::log(const QString& fileName) } -DCOPRef CvsService::login(const QString& repository) +DCOPRef CvsService::login(const TQString& repository) { if( repository.isEmpty() ) return DCOPRef(); @@ -672,7 +672,7 @@ DCOPRef CvsService::login(const QString& repository) } -DCOPRef CvsService::logout(const QString& repository) +DCOPRef CvsService::logout(const TQString& repository) { if( repository.isEmpty() ) return DCOPRef(); @@ -704,7 +704,7 @@ DCOPRef CvsService::makePatch() } -DCOPRef CvsService::makePatch(const QString& diffOptions, const QString& format) +DCOPRef CvsService::makePatch(const TQString& diffOptions, const TQString& format) { if( !d->hasWorkingCopy() ) return DCOPRef(); @@ -722,7 +722,7 @@ DCOPRef CvsService::makePatch(const QString& diffOptions, const QString& format) } -DCOPRef CvsService::moduleList(const QString& repository) +DCOPRef CvsService::moduleList(const TQString& repository) { Repository repo(repository); @@ -745,7 +745,7 @@ DCOPRef CvsService::moduleList(const QString& repository) } -DCOPRef CvsService::remove(const QStringList& files, bool recursive) +DCOPRef CvsService::remove(const TQStringList& files, bool recursive) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -765,7 +765,7 @@ DCOPRef CvsService::remove(const QStringList& files, bool recursive) } -DCOPRef CvsService::removeWatch(const QStringList& files, int events) +DCOPRef CvsService::removeWatch(const TQStringList& files, int events) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -791,7 +791,7 @@ DCOPRef CvsService::removeWatch(const QStringList& files, int events) } -DCOPRef CvsService::rlog(const QString& repository, const QString& module, +DCOPRef CvsService::rlog(const TQString& repository, const TQString& module, bool recursive) { Repository repo(repository); @@ -819,7 +819,7 @@ DCOPRef CvsService::rlog(const QString& repository, const QString& module, } -DCOPRef CvsService::simulateUpdate(const QStringList& files, bool recursive, +DCOPRef CvsService::simulateUpdate(const TQStringList& files, bool recursive, bool createDirs, bool pruneDirs) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) @@ -846,7 +846,7 @@ DCOPRef CvsService::simulateUpdate(const QStringList& files, bool recursive, } -DCOPRef CvsService::status(const QStringList& files, bool recursive, bool tagInfo) +DCOPRef CvsService::status(const TQStringList& files, bool recursive, bool tagInfo) { if( !d->hasWorkingCopy() ) return DCOPRef(); @@ -871,7 +871,7 @@ DCOPRef CvsService::status(const QStringList& files, bool recursive, bool tagInf } -DCOPRef CvsService::unedit(const QStringList& files) +DCOPRef CvsService::unedit(const TQStringList& files) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -888,7 +888,7 @@ DCOPRef CvsService::unedit(const QStringList& files) } -DCOPRef CvsService::unlock(const QStringList& files) +DCOPRef CvsService::unlock(const TQStringList& files) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -904,8 +904,8 @@ DCOPRef CvsService::unlock(const QStringList& files) } -DCOPRef CvsService::update(const QStringList& files, bool recursive, - bool createDirs, bool pruneDirs, const QString& extraOpt) +DCOPRef CvsService::update(const TQStringList& files, bool recursive, + bool createDirs, bool pruneDirs, const TQString& extraOpt) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); @@ -932,7 +932,7 @@ DCOPRef CvsService::update(const QStringList& files, bool recursive, } -DCOPRef CvsService::watchers(const QStringList& files) +DCOPRef CvsService::watchers(const TQStringList& files) { if( !d->hasWorkingCopy() || d->hasRunningJob() ) return DCOPRef(); diff --git a/cervisia/cvsservice/cvsservice.h b/cervisia/cvsservice/cvsservice.h index a472ca09..1cabfe99 100644 --- a/cervisia/cvsservice/cvsservice.h +++ b/cervisia/cvsservice/cvsservice.h @@ -21,7 +21,7 @@ #ifndef CVSSERVICE_H #define CVSSERVICE_H -#include <qstringlist.h> +#include <tqstringlist.h> #include <dcopref.h> #include <dcopobject.h> @@ -47,11 +47,11 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef add(const QStringList& files, bool isBinary); + DCOPRef add(const TQStringList& files, bool isBinary); /** */ - DCOPRef addWatch(const QStringList& files, int events); + DCOPRef addWatch(const TQStringList& files, int events); /** * Shows information on who last modified each line of a file and when. @@ -62,7 +62,7 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef annotate(const QString& fileName, const QString& revision); + DCOPRef annotate(const TQString& fileName, const TQString& revision); /** * Checks out a module from the repository into a working copy. @@ -76,8 +76,8 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef checkout(const QString& workingDir, const QString& repository, - const QString& module, const QString& tag, bool pruneDirs); + DCOPRef checkout(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& tag, bool pruneDirs); /** * Checks out a module from the repository into a working copy. @@ -94,9 +94,9 @@ k_dcop: * null reference. */ //### KDE4: merge with above checkout() method - DCOPRef checkout(const QString& workingDir, const QString& repository, - const QString& module, const QString& tag, bool pruneDirs, - const QString& alias, bool exportOnly); + DCOPRef checkout(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& tag, bool pruneDirs, + const TQString& alias, bool exportOnly); /** * Checks out a module from the repository into a working copy. @@ -113,9 +113,9 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef checkout(const QString& workingDir, const QString& repository, - const QString& module, const QString& tag, bool pruneDirs, - const QString& alias, bool exportOnly, bool recursive); + DCOPRef checkout(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& tag, bool pruneDirs, + const TQString& alias, bool exportOnly, bool recursive); /** * @@ -127,7 +127,7 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef commit(const QStringList& files, const QString& commitMessage, + DCOPRef commit(const TQStringList& files, const TQString& commitMessage, bool recursive); /** @@ -135,33 +135,33 @@ k_dcop: * * @param repository */ - DCOPRef createRepository(const QString& repository); + DCOPRef createRepository(const TQString& repository); /** */ - DCOPRef createTag(const QStringList& files, const QString& tag, + DCOPRef createTag(const TQStringList& files, const TQString& tag, bool branch, bool force); /** */ - DCOPRef deleteTag(const QStringList& files, const QString& tag, + DCOPRef deleteTag(const TQStringList& files, const TQString& tag, bool branch, bool force); /** */ - DCOPRef downloadCvsIgnoreFile(const QString& repository, - const QString& outputFile); + DCOPRef downloadCvsIgnoreFile(const TQString& repository, + const TQString& outputFile); /** */ - DCOPRef downloadRevision(const QString& fileName, const QString& revision, - const QString& outputFile); + DCOPRef downloadRevision(const TQString& fileName, const TQString& revision, + const TQString& outputFile); /** */ - DCOPRef downloadRevision(const QString& fileName, const QString& revA, - const QString& outputFileA, const QString& revB, - const QString& outputFileB); + DCOPRef downloadRevision(const TQString& fileName, const TQString& revA, + const TQString& outputFileA, const TQString& revB, + const TQString& outputFileB); /** * @@ -174,8 +174,8 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef diff(const QString& fileName, const QString& revA, - const QString& revB, const QString& diffOptions, + DCOPRef diff(const TQString& fileName, const TQString& revA, + const TQString& revB, const TQString& diffOptions, unsigned contextLines); /** @@ -189,19 +189,19 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef diff(const QString& fileName, const QString& revA, - const QString& revB, const QString& diffOptions, - const QString& format); + DCOPRef diff(const TQString& fileName, const TQString& revA, + const TQString& revB, const TQString& diffOptions, + const TQString& format); /** * @param files */ - DCOPRef edit(const QStringList& files); + DCOPRef edit(const TQStringList& files); /** * @param files */ - DCOPRef editors(const QStringList& files); + DCOPRef editors(const TQStringList& files); /** * Shows a history of activity (like checkouts, commits, etc) in the @@ -216,26 +216,26 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef import(const QString& workingDir, const QString& repository, - const QString& module, const QString& ignoreList, - const QString& comment, const QString& vendorTag, - const QString& releaseTag, bool importAsBinary); + DCOPRef import(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& ignoreList, + const TQString& comment, const TQString& vendorTag, + const TQString& releaseTag, bool importAsBinary); /** * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ //### KDE4: merge with above import() method - DCOPRef import(const QString& workingDir, const QString& repository, - const QString& module, const QString& ignoreList, - const QString& comment, const QString& vendorTag, - const QString& releaseTag, bool importAsBinary, + DCOPRef import(const TQString& workingDir, const TQString& repository, + const TQString& module, const TQString& ignoreList, + const TQString& comment, const TQString& vendorTag, + const TQString& releaseTag, bool importAsBinary, bool useModificationTime); /** * @param files */ - DCOPRef lock(const QStringList& files); + DCOPRef lock(const TQStringList& files); /** * Shows log messages for a file. @@ -245,7 +245,7 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef log(const QString& fileName); + DCOPRef log(const TQString& fileName); /** * @param repository @@ -253,7 +253,7 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef login(const QString& repository); + DCOPRef login(const TQString& repository); /** * @param repository @@ -261,7 +261,7 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef logout(const QString& repository); + DCOPRef logout(const TQString& repository); /** */ @@ -270,7 +270,7 @@ k_dcop: /** */ //### KDE4: merge with above makePatch() method - DCOPRef makePatch(const QString& diffOptions, const QString& format); + DCOPRef makePatch(const TQString& diffOptions, const TQString& format); /** * @param repository @@ -278,7 +278,7 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef moduleList(const QString& repository); + DCOPRef moduleList(const TQString& repository); /** * Deletes files from the local working copy and schedules them to be @@ -291,15 +291,15 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef remove(const QStringList& files, bool recursive); + DCOPRef remove(const TQStringList& files, bool recursive); /** */ - DCOPRef removeWatch(const QStringList& files, int events); + DCOPRef removeWatch(const TQStringList& files, int events); /** */ - DCOPRef rlog(const QString& repository, const QString& module, + DCOPRef rlog(const TQString& repository, const TQString& module, bool recursive); /** @@ -314,7 +314,7 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef simulateUpdate(const QStringList& files, bool recursive, + DCOPRef simulateUpdate(const TQStringList& files, bool recursive, bool createDirs, bool pruneDirs); /** @@ -327,17 +327,17 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef status(const QStringList& files, bool recursive, bool tagInfo); + DCOPRef status(const TQStringList& files, bool recursive, bool tagInfo); /** * @param files */ - DCOPRef unedit(const QStringList& files); + DCOPRef unedit(const TQStringList& files); /** * @param files */ - DCOPRef unlock(const QStringList& files); + DCOPRef unlock(const TQStringList& files); /** * Merges changes from the repository into the files of the @@ -353,13 +353,13 @@ k_dcop: * @return A DCOP reference to the cvs job or in case of failure a * null reference. */ - DCOPRef update(const QStringList& files, bool recursive, bool createDirs, - bool pruneDirs, const QString& extraOpt); + DCOPRef update(const TQStringList& files, bool recursive, bool createDirs, + bool pruneDirs, const TQString& extraOpt); /** * @param files */ - DCOPRef watchers(const QStringList& files); + DCOPRef watchers(const TQStringList& files); /** * Quits the DCOP service. diff --git a/cervisia/cvsservice/cvsserviceutils.cpp b/cervisia/cvsservice/cvsserviceutils.cpp index de2f38a7..33585f49 100644 --- a/cervisia/cvsservice/cvsserviceutils.cpp +++ b/cervisia/cvsservice/cvsserviceutils.cpp @@ -20,17 +20,17 @@ #include "cvsserviceutils.h" -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <kprocess.h> -QString CvsServiceUtils::joinFileList(const QStringList& files) +TQString CvsServiceUtils::joinFileList(const TQStringList& files) { - QString result; + TQString result; - QStringList::ConstIterator it = files.begin(); - QStringList::ConstIterator end = files.end(); + TQStringList::ConstIterator it = files.begin(); + TQStringList::ConstIterator end = files.end(); for( ; it != end; ++it ) { diff --git a/cervisia/cvsservice/cvsserviceutils.h b/cervisia/cvsservice/cvsserviceutils.h index 26f29b5b..98feceb8 100644 --- a/cervisia/cvsservice/cvsserviceutils.h +++ b/cervisia/cvsservice/cvsserviceutils.h @@ -29,10 +29,10 @@ namespace CvsServiceUtils { /** - * Joins a list of file names to one QString and quotes + * Joins a list of file names to one TQString and quotes * each name properly for usage with KProcess. */ -QString joinFileList(const QStringList& files); +TQString joinFileList(const TQStringList& files); } diff --git a/cervisia/cvsservice/repository.cpp b/cervisia/cvsservice/repository.cpp index 1a911140..d5f06ef4 100644 --- a/cervisia/cvsservice/repository.cpp +++ b/cervisia/cvsservice/repository.cpp @@ -20,9 +20,9 @@ #include "repository.h" -#include <qdir.h> -#include <qfile.h> -#include <qstring.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqstring.h> #include <kapplication.h> #include <kconfig.h> @@ -36,14 +36,14 @@ struct Repository::Private { Private() : compressionLevel(0) {} - QString configFileName; + TQString configFileName; - QString workingCopy; - QString location; + TQString workingCopy; + TQString location; - QString client; - QString rsh; - QString server; + TQString client; + TQString rsh; + TQString server; int compressionLevel; bool retrieveCvsignoreFile; @@ -54,7 +54,7 @@ struct Repository::Private Repository::Repository() - : QObject() + : TQObject() , DCOPObject("CvsRepository") , d(new Private) { @@ -64,14 +64,14 @@ Repository::Repository() // so we watch it for changes d->configFileName = locate("config", "cvsservicerc"); KDirWatch* fileWatcher = new KDirWatch(this); - connect(fileWatcher, SIGNAL(dirty(const QString&)), - this, SLOT(slotConfigDirty(const QString&))); + connect(fileWatcher, TQT_SIGNAL(dirty(const TQString&)), + this, TQT_SLOT(slotConfigDirty(const TQString&))); fileWatcher->addFile(d->configFileName); } -Repository::Repository(const QString& repository) - : QObject() +Repository::Repository(const TQString& repository) + : TQObject() , DCOPObject() , d(new Private) { @@ -83,8 +83,8 @@ Repository::Repository(const QString& repository) // so we watch it for changes d->configFileName = locate("config", "cvsservicerc"); KDirWatch* fileWatcher = new KDirWatch(this); - connect(fileWatcher, SIGNAL(dirty(const QString&)), - this, SLOT(slotConfigDirty(const QString&))); + connect(fileWatcher, TQT_SIGNAL(dirty(const TQString&)), + this, TQT_SLOT(slotConfigDirty(const TQString&))); fileWatcher->addFile(d->configFileName); } @@ -95,9 +95,9 @@ Repository::~Repository() } -QString Repository::cvsClient() const +TQString Repository::cvsClient() const { - QString client(d->client); + TQString client(d->client); // suppress reading of the '.cvsrc' file client += " -f"; @@ -105,52 +105,52 @@ QString Repository::cvsClient() const // we don't need the command line option if there is no compression level set if( d->compressionLevel > 0 ) { - client += " -z" + QString::number(d->compressionLevel) + " "; + client += " -z" + TQString::number(d->compressionLevel) + " "; } return client; } -QString Repository::clientOnly() const +TQString Repository::clientOnly() const { return d->client; } -QString Repository::rsh() const +TQString Repository::rsh() const { return d->rsh; } -QString Repository::server() const +TQString Repository::server() const { return d->server; } -bool Repository::setWorkingCopy(const QString& dirName) +bool Repository::setWorkingCopy(const TQString& dirName) { - const QFileInfo fi(dirName); - const QString path = fi.absFilePath(); + const TQFileInfo fi(dirName); + const TQString path = fi.absFilePath(); // is this really a cvs-controlled directory? - const QFileInfo cvsDirInfo(path + "/CVS"); + const TQFileInfo cvsDirInfo(path + "/CVS"); if( !cvsDirInfo.exists() || !cvsDirInfo.isDir() || - !QFile::exists( cvsDirInfo.filePath() + "/Entries" ) || - !QFile::exists( cvsDirInfo.filePath() + "/Repository" ) || - !QFile::exists( cvsDirInfo.filePath() + "/Root" ) ) + !TQFile::exists( cvsDirInfo.filePath() + "/Entries" ) || + !TQFile::exists( cvsDirInfo.filePath() + "/Repository" ) || + !TQFile::exists( cvsDirInfo.filePath() + "/Root" ) ) return false; d->workingCopy = path; - d->location = QString::null; + d->location = TQString::null; // determine path to the repository - QFile rootFile(path + "/CVS/Root"); + TQFile rootFile(path + "/CVS/Root"); if( rootFile.open(IO_ReadOnly) ) { - QTextStream stream(&rootFile); + TQTextStream stream(&rootFile); d->location = stream.readLine(); } rootFile.close(); @@ -163,20 +163,20 @@ bool Repository::setWorkingCopy(const QString& dirName) ssh.addSshIdentities(); } - QDir::setCurrent(path); + TQDir::setCurrent(path); d->readConfig(); return true; } -QString Repository::workingCopy() const +TQString Repository::workingCopy() const { return d->workingCopy; } -QString Repository::location() const +TQString Repository::location() const { return d->location; } @@ -188,7 +188,7 @@ bool Repository::retrieveCvsignoreFile() const } -void Repository::slotConfigDirty(const QString& fileName) +void Repository::slotConfigDirty(const TQString& fileName) { if( fileName == d->configFileName ) { @@ -223,7 +223,7 @@ void Repository::Private::readConfig() // // In order to be able to read this group, we then have to manually add // the port number to it. - QString repositoryGroup = QString::fromLatin1("Repository-") + location; + TQString repositoryGroup = TQString::fromLatin1("Repository-") + location; if( !config->hasGroup(repositoryGroup) ) { // find the position of the first path separator diff --git a/cervisia/cvsservice/repository.h b/cervisia/cvsservice/repository.h index e77754bb..0c6ed8a9 100644 --- a/cervisia/cvsservice/repository.h +++ b/cervisia/cvsservice/repository.h @@ -21,7 +21,7 @@ #ifndef REPOSITORY_H #define REPOSITORY_H -#include <qobject.h> +#include <tqobject.h> #include <dcopobject.h> class QString; @@ -31,14 +31,14 @@ class QString; * Represents a local or remote cvs repository with * its repository-specific configuration data. */ -class KDE_EXPORT Repository : public QObject, public DCOPObject +class KDE_EXPORT Repository : public TQObject, public DCOPObject { K_DCOP Q_OBJECT public: Repository(); - explicit Repository(const QString& repository); + explicit Repository(const TQString& repository); ~Repository(); /** @@ -47,11 +47,11 @@ public: * * @return A cvs command (including path). */ - QString cvsClient() const; + TQString cvsClient() const; /** */ - QString clientOnly() const; + TQString clientOnly() const; /** * Remote shell command line client which should be used to @@ -60,7 +60,7 @@ public: * * @return The remote shell client. Can be null if not set. */ - QString rsh() const; + TQString rsh() const; /** * Program to start on the server side when accessing a remote @@ -68,7 +68,7 @@ public: * * @return The server program. Can be null if not set. */ - QString server() const; + TQString server() const; k_dcop: /** @@ -76,14 +76,14 @@ k_dcop: * * @param dirName path to the local working copy directory. */ - bool setWorkingCopy(const QString& dirName); + bool setWorkingCopy(const TQString& dirName); /** * Path to the current working copy. * * @return The working copy directory. Can be null if not set. */ - QString workingCopy() const; + TQString workingCopy() const; /** * Path and method to access the current cvs repository. @@ -91,14 +91,14 @@ k_dcop: * * @return The path and method to access the cvs repository. */ - QString location() const; + TQString location() const; /** */ bool retrieveCvsignoreFile() const; private slots: - void slotConfigDirty(const QString& fileName); + void slotConfigDirty(const TQString& fileName); private: struct Private; diff --git a/cervisia/cvsservice/sshagent.cpp b/cervisia/cvsservice/sshagent.cpp index fe50dce8..4f8abd25 100644 --- a/cervisia/cvsservice/sshagent.cpp +++ b/cervisia/cvsservice/sshagent.cpp @@ -20,7 +20,7 @@ #include "sshagent.h" -#include <qregexp.h> +#include <tqregexp.h> #include <kapplication.h> #include <kdebug.h> #include <kdeversion.h> @@ -32,12 +32,12 @@ // initialize static member variables bool SshAgent::m_isRunning = false; bool SshAgent::m_isOurAgent = false; -QString SshAgent::m_authSock = QString::null; -QString SshAgent::m_pid = QString::null; +TQString SshAgent::m_authSock = TQString::null; +TQString SshAgent::m_pid = TQString::null; -SshAgent::SshAgent(QObject* parent, const char* name) - : QObject(parent, name) +SshAgent::SshAgent(TQObject* parent, const char* name) + : TQObject(parent, name) { } @@ -61,11 +61,11 @@ bool SshAgent::querySshAgent() kdDebug(8051) << "SshAgent::querySshAgent(): ssh-agent already exists" << endl; - m_pid = QString::fromLocal8Bit(pid); + m_pid = TQString::fromLocal8Bit(pid); char* sock = ::getenv("SSH_AUTH_SOCK"); if( sock ) - m_authSock = QString::fromLocal8Bit(sock); + m_authSock = TQString::fromLocal8Bit(sock); m_isOurAgent = false; m_isRunning = true; @@ -99,10 +99,10 @@ bool SshAgent::addSshIdentities() proc << "ssh-add"; - connect(&proc, SIGNAL(receivedStdout(KProcess*, char*, int)), - SLOT(slotReceivedStdout(KProcess*, char*, int))); - connect(&proc, SIGNAL(receivedStderr(KProcess*, char*, int)), - SLOT(slotReceivedStderr(KProcess*, char*, int))); + connect(&proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), + TQT_SLOT(slotReceivedStdout(KProcess*, char*, int))); + connect(&proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), + TQT_SLOT(slotReceivedStderr(KProcess*, char*, int))); proc.start(KProcess::DontCare, KProcess::AllOutput); @@ -137,14 +137,14 @@ void SshAgent::slotProcessExited(KProcess*) { kdDebug(8051) << "SshAgent::slotProcessExited(): ENTER" << endl; - QRegExp cshPidRx("setenv SSH_AGENT_PID (\\d*);"); - QRegExp cshSockRx("setenv SSH_AUTH_SOCK (.*);"); + TQRegExp cshPidRx("setenv SSH_AGENT_PID (\\d*);"); + TQRegExp cshSockRx("setenv SSH_AUTH_SOCK (.*);"); - QRegExp bashPidRx("SSH_AGENT_PID=(\\d*).*"); - QRegExp bashSockRx("SSH_AUTH_SOCK=(.*\\.\\d*);.*"); + TQRegExp bashPidRx("SSH_AGENT_PID=(\\d*).*"); + TQRegExp bashSockRx("SSH_AUTH_SOCK=(.*\\.\\d*);.*"); - QStringList::Iterator it = m_outputLines.begin(); - QStringList::Iterator end = m_outputLines.end(); + TQStringList::Iterator it = m_outputLines.begin(); + TQStringList::Iterator end = m_outputLines.end(); for( ; it != end; ++it ) { if( m_pid.isEmpty() ) @@ -191,8 +191,8 @@ void SshAgent::slotReceivedStdout(KProcess* proc, char* buffer, int buflen) { Q_UNUSED(proc); - QString output = QString::fromLocal8Bit(buffer, buflen); - m_outputLines += QStringList::split("\n", output); + TQString output = TQString::fromLocal8Bit(buffer, buflen); + m_outputLines += TQStringList::split("\n", output); kdDebug(8051) << "SshAgent::slotReceivedStdout(): output = " << output << endl; } @@ -202,8 +202,8 @@ void SshAgent::slotReceivedStderr(KProcess* proc, char* buffer, int buflen) { Q_UNUSED(proc); - QString output = QString::fromLocal8Bit(buffer, buflen); - m_outputLines += QStringList::split("\n", output); + TQString output = TQString::fromLocal8Bit(buffer, buflen); + m_outputLines += TQStringList::split("\n", output); kdDebug(8051) << "SshAgent::slotReceivedStderr(): output = " << output << endl; } @@ -217,12 +217,12 @@ bool SshAgent::startSshAgent() proc << "ssh-agent"; - connect(&proc, SIGNAL(processExited(KProcess*)), - SLOT(slotProcessExited(KProcess*))); - connect(&proc, SIGNAL(receivedStdout(KProcess*, char*, int)), - SLOT(slotReceivedStdout(KProcess*, char*, int))); - connect(&proc, SIGNAL(receivedStderr(KProcess*, char*, int)), - SLOT(slotReceivedStderr(KProcess*, char*, int)) ); + connect(&proc, TQT_SIGNAL(processExited(KProcess*)), + TQT_SLOT(slotProcessExited(KProcess*))); + connect(&proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), + TQT_SLOT(slotReceivedStdout(KProcess*, char*, int))); + connect(&proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), + TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)) ); proc.start(KProcess::NotifyOnExit, KProcess::All); diff --git a/cervisia/cvsservice/sshagent.h b/cervisia/cvsservice/sshagent.h index beb0e488..3de23076 100644 --- a/cervisia/cvsservice/sshagent.h +++ b/cervisia/cvsservice/sshagent.h @@ -21,9 +21,9 @@ #ifndef SSHAGENT_H #define SSHAGENT_H -#include <qobject.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqstringlist.h> class KProcess; @@ -33,7 +33,7 @@ class SshAgent : public QObject Q_OBJECT public: - SshAgent(QObject* parent = 0, const char* name = 0); + SshAgent(TQObject* parent = 0, const char* name = 0); ~SshAgent(); bool querySshAgent(); @@ -41,8 +41,8 @@ public: void killSshAgent(); bool isRunning() const { return m_isRunning; } - QString pid() const { return m_pid; } - QString authSock() const { return m_authSock; } + TQString pid() const { return m_pid; } + TQString authSock() const { return m_authSock; } private slots: void slotProcessExited(KProcess*); @@ -52,12 +52,12 @@ private slots: private: bool startSshAgent(); - QStringList m_outputLines; + TQStringList m_outputLines; static bool m_isRunning; static bool m_isOurAgent; - static QString m_authSock; - static QString m_pid; + static TQString m_authSock; + static TQString m_pid; }; diff --git a/cervisia/diffdlg.cpp b/cervisia/diffdlg.cpp index 8dcb5bdf..fadb6582 100644 --- a/cervisia/diffdlg.cpp +++ b/cervisia/diffdlg.cpp @@ -19,14 +19,14 @@ #include "diffdlg.h" -#include <qpushbutton.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qkeycode.h> -#include <qfileinfo.h> -#include <qregexp.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqkeycode.h> +#include <tqfileinfo.h> +#include <tqregexp.h> #include <kconfig.h> #include <kfiledialog.h> #include <klocale.h> @@ -41,19 +41,19 @@ #include "diffview.h" -DiffDialog::DiffDialog(KConfig& cfg, QWidget *parent, const char *name, bool modal) - : KDialogBase(parent, name, modal, QString::null, +DiffDialog::DiffDialog(KConfig& cfg, TQWidget *parent, const char *name, bool modal) + : KDialogBase(parent, name, modal, TQString::null, Close | Help | User1, Close, true, KStdGuiItem::saveAs()) , partConfig(cfg) { items.setAutoDelete(true); markeditem = -1; - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - QGridLayout *pairlayout = new QGridLayout(layout); + TQGridLayout *pairlayout = new TQGridLayout(layout); pairlayout->setRowStretch(0, 0); pairlayout->setRowStretch(1, 1); pairlayout->setColStretch(1, 0); @@ -61,10 +61,10 @@ DiffDialog::DiffDialog(KConfig& cfg, QWidget *parent, const char *name, bool mod pairlayout->setColStretch(0, 10); pairlayout->setColStretch(2, 10); - revlabel1 = new QLabel(mainWidget); + revlabel1 = new TQLabel(mainWidget); pairlayout->addWidget(revlabel1, 0, 0); - revlabel2 = new QLabel(mainWidget); + revlabel2 = new TQLabel(mainWidget); pairlayout->addWidget(revlabel2, 0, 2); diff1 = new DiffView(cfg, true, false, mainWidget); @@ -79,29 +79,29 @@ DiffDialog::DiffDialog(KConfig& cfg, QWidget *parent, const char *name, bool mod diff1->setPartner(diff2); diff2->setPartner(diff1); - syncbox = new QCheckBox(i18n("Synchronize scroll bars"), mainWidget); + syncbox = new TQCheckBox(i18n("Synchronize scroll bars"), mainWidget); syncbox->setChecked(true); - connect( syncbox, SIGNAL(toggled(bool)), - this, SLOT(toggleSynchronize(bool)) ); + connect( syncbox, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(toggleSynchronize(bool)) ); - itemscombo = new QComboBox(mainWidget); - itemscombo->insertItem(QString::null); - connect( itemscombo, SIGNAL(activated(int)), - this, SLOT(comboActivated(int)) ); + itemscombo = new TQComboBox(mainWidget); + itemscombo->insertItem(TQString::null); + connect( itemscombo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(comboActivated(int)) ); - nofnlabel = new QLabel(mainWidget); + nofnlabel = new TQLabel(mainWidget); // avoids auto resize when the text is changed nofnlabel->setMinimumWidth(fontMetrics().width(i18n("%1 differences").arg(10000))); - backbutton = new QPushButton(QString::fromLatin1("&<<"), mainWidget); - connect( backbutton, SIGNAL(clicked()), SLOT(backClicked()) ); + backbutton = new TQPushButton(TQString::fromLatin1("&<<"), mainWidget); + connect( backbutton, TQT_SIGNAL(clicked()), TQT_SLOT(backClicked()) ); - forwbutton = new QPushButton(QString::fromLatin1("&>>"), mainWidget); - connect( forwbutton, SIGNAL(clicked()), SLOT(forwClicked()) ); + forwbutton = new TQPushButton(TQString::fromLatin1("&>>"), mainWidget); + connect( forwbutton, TQT_SIGNAL(clicked()), TQT_SLOT(forwClicked()) ); - connect( this, SIGNAL(user1Clicked()), SLOT(saveAsClicked()) ); + connect( this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(saveAsClicked()) ); - QBoxLayout *buttonlayout = new QHBoxLayout(layout); + TQBoxLayout *buttonlayout = new TQHBoxLayout(layout); buttonlayout->addWidget(syncbox, 0); buttonlayout->addStretch(4); buttonlayout->addWidget(itemscombo); @@ -115,7 +115,7 @@ DiffDialog::DiffDialog(KConfig& cfg, QWidget *parent, const char *name, bool mod setWFlags(Qt::WDestructiveClose | getWFlags()); - QSize size = configDialogSize(partConfig, "DiffDialog"); + TQSize size = configDialogSize(partConfig, "DiffDialog"); resize(size); KConfigGroupSaver cs(&partConfig, "DiffDialog"); @@ -132,7 +132,7 @@ DiffDialog::~DiffDialog() } -void DiffDialog::keyPressEvent(QKeyEvent *e) +void DiffDialog::keyPressEvent(TQKeyEvent *e) { switch (e->key()) { @@ -171,9 +171,9 @@ void DiffDialog::comboActivated(int index) } -static void interpretRegion(QString line, int *linenoA, int *linenoB) +static void interpretRegion(TQString line, int *linenoA, int *linenoB) { - QRegExp region( "^@@ -([0-9]+),([0-9]+) \\+([0-9]+),([0-9]+) @@.*$" ); + TQRegExp region( "^@@ -([0-9]+),([0-9]+) \\+([0-9]+),([0-9]+) @@.*$" ); if (!region.exactMatch(line)) return; @@ -183,24 +183,24 @@ static void interpretRegion(QString line, int *linenoA, int *linenoB) } -static QString regionAsString(int linenoA, int linecountA, int linenoB, int linecountB) +static TQString regionAsString(int linenoA, int linecountA, int linenoB, int linecountB) { int lineendA = linenoA+linecountA-1; int lineendB = linenoB+linecountB-1; - QString res; + TQString res; if (linecountB == 0) - res = QString("%1,%2d%3").arg(linenoA).arg(lineendA).arg(linenoB-1); + res = TQString("%1,%2d%3").arg(linenoA).arg(lineendA).arg(linenoB-1); else if (linecountA == 0) - res = QString("%1a%2,%3").arg(linenoA-1).arg(linenoB).arg(lineendB); + res = TQString("%1a%2,%3").arg(linenoA-1).arg(linenoB).arg(lineendB); else if (linenoA == lineendA) if (linenoB == lineendB) - res = QString("%1c%2").arg(linenoA).arg(linenoB); + res = TQString("%1c%2").arg(linenoA).arg(linenoB); else - res = QString("%1c%2,%3").arg(linenoA).arg(linenoB).arg(lineendB); + res = TQString("%1c%2,%3").arg(linenoA).arg(linenoB).arg(lineendB); else if (linenoB == lineendB) - res = QString("%1,%2c%3").arg(linenoA).arg(lineendA).arg(linenoB); + res = TQString("%1,%2c%3").arg(linenoA).arg(lineendA).arg(linenoB); else - res = QString("%1,%2c%3,%4").arg(linenoA).arg(lineendA).arg(linenoB).arg(lineendB); + res = TQString("%1,%2c%3,%4").arg(linenoA).arg(lineendA).arg(linenoB).arg(lineendB); return res; @@ -216,10 +216,10 @@ public: }; -bool DiffDialog::parseCvsDiff(CvsService_stub* service, const QString& fileName, - const QString &revA, const QString &revB) +bool DiffDialog::parseCvsDiff(CvsService_stub* service, const TQString& fileName, + const TQString &revA, const TQString &revB) { - QStringList linesA, linesB; + TQStringList linesA, linesB; int linenoA, linenoB; setCaption(i18n("CVS Diff: %1").arg(fileName)); @@ -238,14 +238,14 @@ bool DiffDialog::parseCvsDiff(CvsService_stub* service, const QString& fileName, // place, but this design at least makes the handling trans- // parent for the calling routines - QString extdiff = partConfig.readPathEntry("ExternalDiff"); + TQString extdiff = partConfig.readPathEntry("ExternalDiff"); if (!extdiff.isEmpty()) { callExternalDiff(extdiff, service, fileName, revA, revB); return false; } - const QString diffOptions = partConfig.readEntry("DiffOptions"); + const TQString diffOptions = partConfig.readEntry("DiffOptions"); const unsigned contextLines = partConfig.readUnsignedNumEntry("ContextLines", 65535); DCOPRef job = service->diff(fileName, revA, revB, diffOptions, contextLines); @@ -259,7 +259,7 @@ bool DiffDialog::parseCvsDiff(CvsService_stub* service, const QString& fileName, // remember diff output for "save as" action m_diffOutput = dlg.getOutput(); - QString line; + TQString line; while ( dlg.getLine(line) && !line.startsWith("+++")) ; @@ -278,7 +278,7 @@ bool DiffDialog::parseCvsDiff(CvsService_stub* service, const QString& fileName, if (line.length() < 1) continue; - QChar marker = line[0]; + TQChar marker = line[0]; line.remove(0, 1); if (marker == '-') @@ -312,7 +312,7 @@ bool DiffDialog::parseCvsDiff(CvsService_stub* service, const QString& fileName, void DiffDialog::newDiffHunk(int& linenoA, int& linenoB, - const QStringList& linesA, const QStringList& linesB) + const TQStringList& linesA, const TQStringList& linesB) { DiffItem *item = new DiffItem; item->linenoA = linenoA+1; @@ -321,12 +321,12 @@ void DiffDialog::newDiffHunk(int& linenoA, int& linenoB, item->linecountB = linesB.count(); items.append(item); - const QString region = regionAsString(linenoA+1, linesA.count(), + const TQString region = regionAsString(linenoA+1, linesA.count(), linenoB+1, linesB.count()); itemscombo->insertItem(region); - QStringList::ConstIterator itA = linesA.begin(); - QStringList::ConstIterator itB = linesB.begin(); + TQStringList::ConstIterator itA = linesA.begin(); + TQStringList::ConstIterator itB = linesB.begin(); while (itA != linesA.end() || itB != linesB.end()) { if (itA != linesA.end()) @@ -351,22 +351,22 @@ void DiffDialog::newDiffHunk(int& linenoA, int& linenoB, } -void DiffDialog::callExternalDiff(const QString& extdiff, CvsService_stub* service, - const QString& fileName, const QString &revA, - const QString &revB) +void DiffDialog::callExternalDiff(const TQString& extdiff, CvsService_stub* service, + const TQString& fileName, const TQString &revA, + const TQString &revB) { - QString extcmdline = extdiff; + TQString extcmdline = extdiff; extcmdline += " "; - // create suffix for temporary file (used QFileInfo to remove path from file name) - const QString suffix = "-" + QFileInfo(fileName).fileName(); + // create suffix for temporary file (used TQFileInfo to remove path from file name) + const TQString suffix = "-" + TQFileInfo(fileName).fileName(); DCOPRef job; if (!revA.isEmpty() && !revB.isEmpty()) { // We're comparing two revisions - QString revAFilename = tempFileName(suffix+QString("-")+revA); - QString revBFilename = tempFileName(suffix+QString("-")+revB); + TQString revAFilename = tempFileName(suffix+TQString("-")+revA); + TQString revBFilename = tempFileName(suffix+TQString("-")+revB); // download the files for revision A and B job = service->downloadRevision(fileName, revA, revAFilename, @@ -381,14 +381,14 @@ void DiffDialog::callExternalDiff(const QString& extdiff, CvsService_stub* servi else { // We're comparing to a file, and perhaps one revision - QString revAFilename = tempFileName(suffix+QString("-")+revA); + TQString revAFilename = tempFileName(suffix+TQString("-")+revA); job = service->downloadRevision(fileName, revA, revAFilename); if( !service->ok() ) return; extcmdline += KProcess::quote(revAFilename); extcmdline += " "; - extcmdline += KProcess::quote(QFileInfo(fileName).absFilePath()); + extcmdline += KProcess::quote(TQFileInfo(fileName).absFilePath()); } ProgressDialog dlg(this, "Diff", job, "diff"); @@ -406,7 +406,7 @@ void DiffDialog::callExternalDiff(const QString& extdiff, CvsService_stub* servi void DiffDialog::updateNofN() { - QString str; + TQString str; if (markeditem >= 0) str = i18n("%1 of %2").arg(markeditem+1).arg(items.count()); else @@ -477,14 +477,14 @@ void DiffDialog::forwClicked() void DiffDialog::saveAsClicked() { - QString fileName = KFileDialog::getSaveFileName(QString::null, QString::null, this); + TQString fileName = KFileDialog::getSaveFileName(TQString::null, TQString::null, this); if( fileName.isEmpty() ) return; if( !Cervisia::CheckOverwrite(fileName, this) ) return; - QFile f(fileName); + TQFile f(fileName); if( !f.open(IO_WriteOnly) ) { KMessageBox::sorry(this, @@ -493,8 +493,8 @@ void DiffDialog::saveAsClicked() return; } - QTextStream ts(&f); - QStringList::Iterator it = m_diffOutput.begin(); + TQTextStream ts(&f); + TQStringList::Iterator it = m_diffOutput.begin(); for( ; it != m_diffOutput.end(); ++it ) ts << *it << "\n"; diff --git a/cervisia/diffdlg.h b/cervisia/diffdlg.h index 25407c96..f234b36c 100644 --- a/cervisia/diffdlg.h +++ b/cervisia/diffdlg.h @@ -21,7 +21,7 @@ #ifndef DIFFDLG_H #define DIFFDLG_H -#include <qptrlist.h> +#include <tqptrlist.h> #include <kdialogbase.h> @@ -40,16 +40,16 @@ class DiffDialog : public KDialogBase public: - explicit DiffDialog( KConfig& config, QWidget *parent=0, const char *name=0, + explicit DiffDialog( KConfig& config, TQWidget *parent=0, const char *name=0, bool modal=false ); virtual ~DiffDialog(); - bool parseCvsDiff(CvsService_stub* service, const QString &fileName, - const QString &revA, const QString &revB); + bool parseCvsDiff(CvsService_stub* service, const TQString &fileName, + const TQString &revA, const TQString &revB); protected: - virtual void keyPressEvent(QKeyEvent *e); + virtual void keyPressEvent(TQKeyEvent *e); private slots: void toggleSynchronize(bool b); @@ -59,24 +59,24 @@ private slots: void saveAsClicked(); private: - void newDiffHunk(int& linenoA, int& linenoB, const QStringList& linesA, - const QStringList& linesB); - void callExternalDiff(const QString& extdiff, CvsService_stub* service, - const QString& fileName, const QString& revA, - const QString& revB); + void newDiffHunk(int& linenoA, int& linenoB, const TQStringList& linesA, + const TQStringList& linesB); + void callExternalDiff(const TQString& extdiff, CvsService_stub* service, + const TQString& fileName, const TQString& revA, + const TQString& revB); void updateNofN(); void updateHighlight(int newitem); - QLabel *revlabel1, *revlabel2, *nofnlabel; - QCheckBox *syncbox; - QComboBox *itemscombo; - QPushButton *backbutton, *forwbutton; + TQLabel *revlabel1, *revlabel2, *nofnlabel; + TQCheckBox *syncbox; + TQComboBox *itemscombo; + TQPushButton *backbutton, *forwbutton; DiffView *diff1, *diff2; - QPtrList<DiffItem> items; + TQPtrList<DiffItem> items; int markeditem; KConfig& partConfig; - QStringList m_diffOutput; + TQStringList m_diffOutput; }; #endif diff --git a/cervisia/diffview.cpp b/cervisia/diffview.cpp index 1892880e..597ec97f 100644 --- a/cervisia/diffview.cpp +++ b/cervisia/diffview.cpp @@ -20,11 +20,11 @@ #include "diffview.h" -#include <qpainter.h> -#include <qscrollbar.h> -#include <qpixmap.h> -#include <qregexp.h> -#include <qstyle.h> +#include <tqpainter.h> +#include <tqscrollbar.h> +#include <tqpixmap.h> +#include <tqregexp.h> +#include <tqstyle.h> #include <kapplication.h> #include <kconfig.h> @@ -36,14 +36,14 @@ class DiffViewItem { public: - QString line; + TQString line; DiffView::DiffType type; bool inverted; int no; }; -int DiffViewItemList::compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2) +int DiffViewItemList::compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2) { return (static_cast<DiffViewItem*>(item1)->no == static_cast<DiffViewItem*>(item2)->no)? 0 : 1; @@ -54,7 +54,7 @@ const int DiffView::BORDER = 7; DiffView::DiffView( KConfig& cfg, bool withlinenos, bool withmarker, - QWidget *parent, const char *name ) + TQWidget *parent, const char *name ) : QtTableView(parent, name, WRepaintNoErase) , partConfig(cfg) { @@ -62,13 +62,13 @@ DiffView::DiffView( KConfig& cfg, bool withlinenos, bool withmarker, setNumCols( 1 + (withlinenos?1:0) + (withmarker?1:0) ); setTableFlags( Tbl_autoVScrollBar|Tbl_autoHScrollBar| Tbl_smoothVScrolling ); - setFrameStyle( QFrame::WinPanel | QFrame::Sunken ); + setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken ); setBackgroundMode( PaletteBase ); setWFlags( WResizeNoErase ); partConfig.setGroup("LookAndFeel"); setFont(partConfig.readFontEntry("DiffFont")); - QFontMetrics fm(font()); + TQFontMetrics fm(font()); setCellHeight(fm.lineSpacing()); setCellWidth(0); textwidth = 0; @@ -81,19 +81,19 @@ DiffView::DiffView( KConfig& cfg, bool withlinenos, bool withmarker, marker = withmarker; partConfig.setGroup("Colors"); - QColor defaultColor=QColor(237, 190, 190); + TQColor defaultColor=TQColor(237, 190, 190); diffChangeColor=partConfig.readColorEntry("DiffChange",&defaultColor); - defaultColor=QColor(190, 190, 237); + defaultColor=TQColor(190, 190, 237); diffInsertColor=partConfig.readColorEntry("DiffInsert",&defaultColor); - defaultColor=QColor(190, 237, 190); + defaultColor=TQColor(190, 237, 190); diffDeleteColor=partConfig.readColorEntry("DiffDelete",&defaultColor); } -void DiffView::setFont(const QFont &font) +void DiffView::setFont(const TQFont &font) { QtTableView::setFont(font); - QFontMetrics fm(font); + TQFontMetrics fm(font); setCellHeight(fm.lineSpacing()); } @@ -103,14 +103,14 @@ void DiffView::setPartner(DiffView *other) partner = other; if (partner) { - connect( verticalScrollBar(), SIGNAL(valueChanged(int)), - SLOT(vertPositionChanged(int)) ); - connect( verticalScrollBar(), SIGNAL(sliderMoved(int)), - SLOT(vertPositionChanged(int)) ); - connect( horizontalScrollBar(), SIGNAL(valueChanged(int)), - SLOT(horzPositionChanged(int)) ); - connect( horizontalScrollBar(), SIGNAL(sliderMoved(int)), - SLOT(horzPositionChanged(int)) ); + connect( verticalScrollBar(), TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(vertPositionChanged(int)) ); + connect( verticalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + TQT_SLOT(vertPositionChanged(int)) ); + connect( horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(horzPositionChanged(int)) ); + connect( horizontalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + TQT_SLOT(horzPositionChanged(int)) ); } } @@ -137,7 +137,7 @@ void DiffView::removeAtOffset(int offset) } -void DiffView::insertAtOffset(const QString &line, DiffType type, int offset) +void DiffView::insertAtOffset(const TQString &line, DiffType type, int offset) { DiffViewItem *item = new DiffViewItem; item->line = line; @@ -159,12 +159,12 @@ void DiffView::setCenterOffset(int offset) } -void DiffView::addLine(const QString &line, DiffType type, int no) +void DiffView::addLine(const TQString &line, DiffType type, int no) { - QFont f(font()); + TQFont f(font()); f.setBold(true); - QFontMetrics fmbold(f); - QFontMetrics fm(font()); + TQFontMetrics fmbold(f); + TQFontMetrics fm(font()); // calculate textwidth based on 'line' where tabs are expanded @@ -172,9 +172,9 @@ void DiffView::addLine(const QString &line, DiffType type, int no) // *Please note* // For some fonts, e.g. "Clean", is fm.maxWidth() greater than // fmbold.maxWidth(). - QString copy(line); + TQString copy(line); const int numTabs = copy.contains('\t', false); - copy.replace( QRegExp("\t"), ""); + copy.replace( TQRegExp("\t"), ""); const int tabSize = m_tabWidth * QMAX(fm.maxWidth(), fmbold.maxWidth()); const int copyWidth = QMAX(fm.width(copy), fmbold.width(copy)); @@ -190,7 +190,7 @@ void DiffView::addLine(const QString &line, DiffType type, int no) } -QString DiffView::stringAtOffset(int offset) +TQString DiffView::stringAtOffset(int offset) { if (offset >= (int)items.count()) { @@ -236,21 +236,21 @@ void DiffView::setCenterLine(int lineno) } -QString DiffView::stringAtLine(int lineno) +TQString DiffView::stringAtLine(int lineno) { int pos; if ( (pos = findLine(lineno)) != -1 ) return items.at(pos)->line; else - return QString(); + return TQString(); } -QByteArray DiffView::compressedContent() +TQByteArray DiffView::compressedContent() { - QByteArray res(items.count()); + TQByteArray res(items.count()); - QPtrListIterator<DiffViewItem> it(items); + TQPtrListIterator<DiffViewItem> it(items); int i=0; for (; it.current(); ++it) { @@ -273,12 +273,12 @@ int DiffView::cellWidth(int col) { if (col == 0 && linenos) { - QFontMetrics fm(font()); + TQFontMetrics fm(font()); return fm.width("10000"); } else if (marker && (col == 0 || col == 1)) { - QFontMetrics fm( fontMetrics() ); + TQFontMetrics fm( fontMetrics() ); return QMAX(QMAX( fm.width(i18n("Delete")), fm.width(i18n("Insert"))), fm.width(i18n("Change")))+2*BORDER; @@ -293,16 +293,16 @@ int DiffView::cellWidth(int col) } -QSize DiffView::sizeHint() const +TQSize DiffView::sizeHint() const { - QFontMetrics fm(font()); - return QSize( 4*fm.width("0123456789"), fm.lineSpacing()*8 ); + TQFontMetrics fm(font()); + return TQSize( 4*fm.width("0123456789"), fm.lineSpacing()*8 ); } -void DiffView::paintCell(QPainter *p, int row, int col) +void DiffView::paintCell(TQPainter *p, int row, int col) { - QFontMetrics fm(font()); + TQFontMetrics fm(font()); p->setTabStops(m_tabWidth * fm.maxWidth()); DiffViewItem *item = items.at(row); @@ -310,13 +310,13 @@ void DiffView::paintCell(QPainter *p, int row, int col) int width = cellWidth(col); int height = cellHeight(); - QColor backgroundColor; + TQColor backgroundColor; bool inverted; int align; int innerborder; - QString str; + TQString str; - QFont oldFont(p->font()); + TQFont oldFont(p->font()); if (item->type==Separator) { backgroundColor = KGlobalSettings::highlightColor(); @@ -326,7 +326,7 @@ void DiffView::paintCell(QPainter *p, int row, int col) innerborder = 0; if (col == (linenos?1:0) + (marker?1:0)) str = item->line; - QFont f(oldFont); + TQFont f(oldFont); f.setBold(true); p->setFont(f); } @@ -351,7 +351,7 @@ void DiffView::paintCell(QPainter *p, int row, int col) innerborder = BORDER; str = (item->type==Change)? i18n("Change") : (item->type==Insert)? i18n("Insert") - : (item->type==Delete)? i18n("Delete") : QString::null; + : (item->type==Delete)? i18n("Delete") : TQString::null; } else { @@ -371,7 +371,7 @@ void DiffView::paintCell(QPainter *p, int row, int col) { p->setPen(backgroundColor); backgroundColor = KGlobalSettings::textColor(); - QFont f(oldFont); + TQFont f(oldFont); f.setBold(true); p->setFont(f); } @@ -382,23 +382,23 @@ void DiffView::paintCell(QPainter *p, int row, int col) } -void DiffView::wheelEvent(QWheelEvent *e) +void DiffView::wheelEvent(TQWheelEvent *e) { - QApplication::sendEvent(verticalScrollBar(), e); + TQApplication::sendEvent(verticalScrollBar(), e); } -DiffZoomWidget::DiffZoomWidget(KConfig& cfg, QWidget *parent, const char *name) - : QFrame(parent, name) +DiffZoomWidget::DiffZoomWidget(KConfig& cfg, TQWidget *parent, const char *name) + : TQFrame(parent, name) { - setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Minimum ) ); + setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ) ); cfg.setGroup("Colors"); - QColor defaultColor=QColor(237, 190, 190); + TQColor defaultColor=TQColor(237, 190, 190); diffChangeColor=cfg.readColorEntry("DiffChange",&defaultColor); - defaultColor=QColor(190, 190, 237); + defaultColor=TQColor(190, 190, 237); diffInsertColor=cfg.readColorEntry("DiffInsert",&defaultColor); - defaultColor=QColor(190, 237, 190); + defaultColor=TQColor(190, 237, 190); diffDeleteColor=cfg.readColorEntry("DiffDelete",&defaultColor); } @@ -410,49 +410,49 @@ DiffZoomWidget::~DiffZoomWidget() void DiffZoomWidget::setDiffView(DiffView *view) { diffview = view; - QScrollBar *sb = const_cast<QScrollBar*>(diffview->scrollBar()); + TQScrollBar *sb = const_cast<TQScrollBar*>(diffview->scrollBar()); sb->installEventFilter(this); } -QSize DiffZoomWidget::sizeHint() const +TQSize DiffZoomWidget::sizeHint() const { - return QSize(25, style().pixelMetric(QStyle::PM_ScrollBarExtent, this)); + return TQSize(25, style().pixelMetric(TQStyle::PM_ScrollBarExtent, this)); } -bool DiffZoomWidget::eventFilter(QObject *o, QEvent *e) +bool DiffZoomWidget::eventFilter(TQObject *o, TQEvent *e) { - if (e->type() == QEvent::Show - || e->type() == QEvent::Hide - || e->type() == QEvent::Resize) + if (e->type() == TQEvent::Show + || e->type() == TQEvent::Hide + || e->type() == TQEvent::Resize) repaint(); - return QFrame::eventFilter(o, e); + return TQFrame::eventFilter(o, e); } -void DiffZoomWidget::paintEvent(QPaintEvent *) +void DiffZoomWidget::paintEvent(TQPaintEvent *) { - const QScrollBar* scrollBar = diffview->scrollBar(); + const TQScrollBar* scrollBar = diffview->scrollBar(); if (!scrollBar) return; // only y and height are important - const QRect scrollBarGroove(scrollBar->isVisible() - ? style().querySubControlMetrics(QStyle::CC_ScrollBar, + const TQRect scrollBarGroove(scrollBar->isVisible() + ? style().querySubControlMetrics(TQStyle::CC_ScrollBar, scrollBar, - QStyle::SC_ScrollBarGroove) + TQStyle::SC_ScrollBarGroove) : rect()); // draw rectangles at the positions of the differences - const QByteArray& lineTypes(diffview->compressedContent()); + const TQByteArray& lineTypes(diffview->compressedContent()); - QPixmap pixbuf(width(), scrollBarGroove.height()); + TQPixmap pixbuf(width(), scrollBarGroove.height()); pixbuf.fill(KGlobalSettings::baseColor()); - QPainter p(&pixbuf, this); + TQPainter p(&pixbuf, this); if (const unsigned int numberOfLines = lineTypes.size()) { const double scale(((double) scrollBarGroove.height()) / numberOfLines); @@ -468,7 +468,7 @@ void DiffZoomWidget::paintEvent(QPaintEvent *) for (++index; index < numberOfLines && lineType == lineTypes[index]; ++index) ; - QColor color; + TQColor color; switch (lineType) { case 'C': @@ -491,7 +491,7 @@ void DiffZoomWidget::paintEvent(QPaintEvent *) const int yPos2(qRound(index * scale)); const int areaHeight((yPos2 != yPos1) ? yPos2 - yPos1 : 1); - p.fillRect(0, yPos1, pixbuf.width(), areaHeight, QBrush(color)); + p.fillRect(0, yPos1, pixbuf.width(), areaHeight, TQBrush(color)); } } } diff --git a/cervisia/diffview.h b/cervisia/diffview.h index b79c7189..160dd2cd 100644 --- a/cervisia/diffview.h +++ b/cervisia/diffview.h @@ -24,18 +24,18 @@ #include "qttableview.h" -#include <qptrcollection.h> -#include <qptrlist.h> +#include <tqptrcollection.h> +#include <tqptrlist.h> class KConfig; class DiffViewItem; -class DiffViewItemList : public QPtrList<DiffViewItem> +class DiffViewItemList : public TQPtrList<DiffViewItem> { protected: - virtual int compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2); + virtual int compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2); }; @@ -47,7 +47,7 @@ public: enum DiffType { Change, Insert, Delete, Neutral, Unchanged, Separator }; DiffView( KConfig& cfg, bool withlinenos, bool withmarker, - QWidget *parent=0, const char *name=0 ); + TQWidget *parent=0, const char *name=0 ); void setPartner(DiffView *other); @@ -60,23 +60,23 @@ public: void prior() { setTopCell(topCell()-viewHeight()/cellHeight()); } - void addLine(const QString &line, DiffType type, int no=-1); - QString stringAtLine(int lineno); + void addLine(const TQString &line, DiffType type, int no=-1); + TQString stringAtLine(int lineno); void setCenterLine(int lineno); void setInverted(int lineno, bool inverted); int count(); void removeAtOffset(int offset); - void insertAtOffset(const QString &line, DiffType type, int offset); + void insertAtOffset(const TQString &line, DiffType type, int offset); void setCenterOffset(int offset); - QString stringAtOffset(int offset); - QByteArray compressedContent(); + TQString stringAtOffset(int offset); + TQByteArray compressedContent(); - virtual void setFont(const QFont &font); + virtual void setFont(const TQFont &font); virtual int cellWidth(int col); - virtual QSize sizeHint() const; - virtual void paintCell(QPainter *p, int row, int col); - virtual void wheelEvent(QWheelEvent *); - const QScrollBar *scrollBar() const + virtual TQSize sizeHint() const; + virtual void paintCell(TQPainter *p, int row, int col); + virtual void wheelEvent(TQWheelEvent *); + const TQScrollBar *scrollBar() const { return verticalScrollBar(); } protected slots: @@ -92,9 +92,9 @@ private: DiffView *partner; static const int BORDER; - QColor diffChangeColor; - QColor diffInsertColor; - QColor diffDeleteColor; + TQColor diffChangeColor; + TQColor diffInsertColor; + TQColor diffDeleteColor; int m_tabWidth; KConfig& partConfig; @@ -106,22 +106,22 @@ class DiffZoomWidget : public QFrame Q_OBJECT public: - DiffZoomWidget(KConfig& cfg, QWidget *parent=0, const char *name=0); + DiffZoomWidget(KConfig& cfg, TQWidget *parent=0, const char *name=0); ~DiffZoomWidget(); void setDiffView(DiffView *view); - QSize sizeHint() const; + TQSize sizeHint() const; protected: - void paintEvent(QPaintEvent *); - bool eventFilter(QObject *, QEvent *e); + void paintEvent(TQPaintEvent *); + bool eventFilter(TQObject *, TQEvent *e); private: DiffView *diffview; - QColor diffChangeColor; - QColor diffInsertColor; - QColor diffDeleteColor; + TQColor diffChangeColor; + TQColor diffInsertColor; + TQColor diffDeleteColor; }; #endif diff --git a/cervisia/dirignorelist.cpp b/cervisia/dirignorelist.cpp index d6ffcf2d..d6c91a36 100644 --- a/cervisia/dirignorelist.cpp +++ b/cervisia/dirignorelist.cpp @@ -19,18 +19,18 @@ #include "dirignorelist.h" using namespace Cervisia; -#include <qfileinfo.h> +#include <tqfileinfo.h> -DirIgnoreList::DirIgnoreList(const QString& path) +DirIgnoreList::DirIgnoreList(const TQString& path) { addEntriesFromFile(path + "/.cvsignore"); } -void DirIgnoreList::addEntry(const QString& entry) +void DirIgnoreList::addEntry(const TQString& entry) { - if (entry != QChar('!')) + if (entry != TQChar('!')) { m_stringMatcher.add(entry); } @@ -41,7 +41,7 @@ void DirIgnoreList::addEntry(const QString& entry) } -bool DirIgnoreList::matches(const QFileInfo* fi) const +bool DirIgnoreList::matches(const TQFileInfo* fi) const { return m_stringMatcher.match(fi->fileName()); } diff --git a/cervisia/dirignorelist.h b/cervisia/dirignorelist.h index 41f82982..d1af9d5e 100644 --- a/cervisia/dirignorelist.h +++ b/cervisia/dirignorelist.h @@ -33,12 +33,12 @@ namespace Cervisia class DirIgnoreList : public IgnoreListBase { public: - explicit DirIgnoreList(const QString& path); + explicit DirIgnoreList(const TQString& path); - virtual bool matches(const QFileInfo* fi) const; + virtual bool matches(const TQFileInfo* fi) const; private: - virtual void addEntry(const QString& entry); + virtual void addEntry(const TQString& entry); StringMatcher m_stringMatcher; }; diff --git a/cervisia/editwithmenu.cpp b/cervisia/editwithmenu.cpp index 9ca0f14b..d7d1044a 100644 --- a/cervisia/editwithmenu.cpp +++ b/cervisia/editwithmenu.cpp @@ -19,7 +19,7 @@ #include "editwithmenu.h" using namespace Cervisia; -#include <qpopupmenu.h> +#include <tqpopupmenu.h> #include <kdebug.h> #include <kiconloader.h> #include <kmimetype.h> @@ -27,8 +27,8 @@ using namespace Cervisia; #include <kurl.h> -EditWithMenu::EditWithMenu(const KURL& url, QWidget* parent) - : QObject(parent) +EditWithMenu::EditWithMenu(const KURL& url, TQWidget* parent) + : TQObject(parent) , m_menu(0) , m_url(url) { @@ -43,21 +43,21 @@ EditWithMenu::EditWithMenu(const KURL& url, QWidget* parent) if( !m_offers.isEmpty() ) { - m_menu = new QPopupMenu(); + m_menu = new TQPopupMenu(); KTrader::OfferList::ConstIterator it = m_offers.begin(); for( int i = 0 ; it != m_offers.end(); ++it, ++i ) { int id = m_menu->insertItem(SmallIcon((*it)->icon()), (*it)->name(), - this, SLOT(itemActivated(int))); + this, TQT_SLOT(itemActivated(int))); m_menu->setItemParameter(id, i); } } } -QPopupMenu* EditWithMenu::menu() +TQPopupMenu* EditWithMenu::menu() { return m_menu; } diff --git a/cervisia/editwithmenu.h b/cervisia/editwithmenu.h index f78b7a2e..bd513412 100644 --- a/cervisia/editwithmenu.h +++ b/cervisia/editwithmenu.h @@ -19,7 +19,7 @@ #ifndef EDITWITHMENU_H #define EDITWITHMENU_H -#include <qobject.h> +#include <tqobject.h> #include <ktrader.h> #include <kurl.h> @@ -35,15 +35,15 @@ class EditWithMenu : public QObject Q_OBJECT public: - EditWithMenu(const KURL& url, QWidget* parent); - QPopupMenu* menu(); + EditWithMenu(const KURL& url, TQWidget* parent); + TQPopupMenu* menu(); private slots: void itemActivated(int); private: KTrader::OfferList m_offers; - QPopupMenu* m_menu; + TQPopupMenu* m_menu; KURL m_url; }; diff --git a/cervisia/entry.h b/cervisia/entry.h index 875885d0..f3705d35 100644 --- a/cervisia/entry.h +++ b/cervisia/entry.h @@ -21,8 +21,8 @@ #define CERVISIA_ENTRY_H -#include <qdatetime.h> -#include <qstring.h> +#include <tqdatetime.h> +#include <tqstring.h> #include "entry_status.h" @@ -50,7 +50,7 @@ struct Entry /** * The name of this entry (without path). */ - QString m_name; + TQString m_name; /** * The type of this entry. @@ -65,17 +65,17 @@ struct Entry /** * The revision of this entry. */ - QString m_revision; + TQString m_revision; /** * The modification date/time of this entry (in user's local time). */ - QDateTime m_dateTime; + TQDateTime m_dateTime; /** * The tag/branch of this entry. */ - QString m_tag; + TQString m_tag; }; diff --git a/cervisia/entry_status.cpp b/cervisia/entry_status.cpp index 8ad624fa..00ff3b32 100644 --- a/cervisia/entry_status.cpp +++ b/cervisia/entry_status.cpp @@ -19,7 +19,7 @@ #include "entry_status.h" -#include <qstring.h> +#include <tqstring.h> #include <klocale.h> @@ -28,9 +28,9 @@ namespace Cervisia { -QString toString(EntryStatus entryStatus) +TQString toString(EntryStatus entryStatus) { - QString result; + TQString result; switch (entryStatus) { case LocallyModified: diff --git a/cervisia/entry_status.h b/cervisia/entry_status.h index 634e0a04..9d1562ef 100644 --- a/cervisia/entry_status.h +++ b/cervisia/entry_status.h @@ -55,7 +55,7 @@ enum EntryStatus * * @return The translated string. */ -QString toString(EntryStatus entryStatus); +TQString toString(EntryStatus entryStatus); } // namespace Cervisia diff --git a/cervisia/entry_status_change.h b/cervisia/entry_status_change.h index 63b5f089..3518eed8 100644 --- a/cervisia/entry_status_change.h +++ b/cervisia/entry_status_change.h @@ -21,7 +21,7 @@ #define CERVISIA_ENTRY_STATUS_CHANGE_H -#include <qstring.h> +#include <tqstring.h> #include "entry_status.h" @@ -39,7 +39,7 @@ struct EntryStatusChange /** * The name of the changed entry (including the path inside the repository / working copy). */ - QString m_name; + TQString m_name; /** * The new status of the entry. diff --git a/cervisia/globalignorelist.cpp b/cervisia/globalignorelist.cpp index 6d905fc7..b3834a42 100644 --- a/cervisia/globalignorelist.cpp +++ b/cervisia/globalignorelist.cpp @@ -19,7 +19,7 @@ #include "globalignorelist.h" using namespace Cervisia; -#include <qdir.h> +#include <tqdir.h> #include <kdebug.h> #include <ktempfile.h> #include <stdlib.h> // for getenv() @@ -39,14 +39,14 @@ GlobalIgnoreList::GlobalIgnoreList() } -bool GlobalIgnoreList::matches(const QFileInfo* fi) const +bool GlobalIgnoreList::matches(const TQFileInfo* fi) const { return m_stringMatcher.match(fi->fileName()); } void GlobalIgnoreList::retrieveServerIgnoreList(CvsService_stub* cvsService, - const QString& repository) + const TQString& repository) { KTempFile tmpFile; tmpFile.setAutoDelete(true); @@ -68,9 +68,9 @@ void GlobalIgnoreList::retrieveServerIgnoreList(CvsService_stub* cvsService, } -void GlobalIgnoreList::addEntry(const QString& entry) +void GlobalIgnoreList::addEntry(const TQString& entry) { - if (entry != QChar('!')) + if (entry != TQChar('!')) { m_stringMatcher.add(entry); } @@ -81,7 +81,7 @@ void GlobalIgnoreList::addEntry(const QString& entry) // Bug #89215: // Make sure '.' and '..' are always in the ignore list, so // UpdateDirItem::maybeScanDir() doesn't loop endlessly. - addEntriesFromString(QString::fromLatin1(". ..")); + addEntriesFromString(TQString::fromLatin1(". ..")); } } @@ -92,9 +92,9 @@ void GlobalIgnoreList::setup() .nse_depinfo #* .#* cvslog.* ,* CVS CVS.adm .del-* *.a *.olb *.o *.obj\ *.so *.Z *~ *.old *.elc *.ln *.bak *.BAK *.orig *.rej *.exe _$* *$"; - addEntriesFromString(QString::fromLatin1(ignorestr)); - addEntriesFromString(QString::fromLocal8Bit(::getenv("CVSIGNORE"))); - addEntriesFromFile(QDir::homeDirPath() + "/.cvsignore"); + addEntriesFromString(TQString::fromLatin1(ignorestr)); + addEntriesFromString(TQString::fromLocal8Bit(::getenv("CVSIGNORE"))); + addEntriesFromFile(TQDir::homeDirPath() + "/.cvsignore"); m_isInitialized = true; } diff --git a/cervisia/globalignorelist.h b/cervisia/globalignorelist.h index b8f72664..2cde8c8f 100644 --- a/cervisia/globalignorelist.h +++ b/cervisia/globalignorelist.h @@ -35,14 +35,14 @@ class GlobalIgnoreList : public IgnoreListBase public: GlobalIgnoreList(); - virtual bool matches(const QFileInfo* fi) const; + virtual bool matches(const TQFileInfo* fi) const; void retrieveServerIgnoreList(CvsService_stub* cvsService, - const QString& repository); + const TQString& repository); private: void setup(); - virtual void addEntry(const QString& entry); + virtual void addEntry(const TQString& entry); static StringMatcher m_stringMatcher; static bool m_isInitialized; diff --git a/cervisia/historydlg.cpp b/cervisia/historydlg.cpp index 35eb5e01..4eb9cca5 100644 --- a/cervisia/historydlg.cpp +++ b/cervisia/historydlg.cpp @@ -20,11 +20,11 @@ #include "historydlg.h" -#include <qcheckbox.h> -#include <qdatetime.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qregexp.h> +#include <tqcheckbox.h> +#include <tqdatetime.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqregexp.h> #include <kconfig.h> #include <klineedit.h> #include <klistview.h> @@ -36,14 +36,14 @@ #include "progressdlg.h" -static QDateTime parseDate(const QString& date, const QString& _time, const QString& offset) +static TQDateTime parseDate(const TQString& date, const TQString& _time, const TQString& offset) { // cvs history only prints hh:mm but parseDateISO8601 needs hh:mm:ss - QString time(_time); + TQString time(_time); if( time.contains(':') == 1 ) time += ":00"; - QDateTime dateTime; + TQDateTime dateTime; dateTime.setTime_t(KRFCDate::parseDateISO8601(date + 'T' + time + offset)); return dateTime; @@ -56,13 +56,13 @@ public: enum { Date, Event, Author, Revision, File, Path }; - HistoryItem(QListView *parent, const QDateTime& date) - : QListViewItem(parent), m_date(date) + HistoryItem(TQListView *parent, const TQDateTime& date) + : TQListViewItem(parent), m_date(date) {} - virtual int compare(QListViewItem* i, int col, bool) const; + virtual int compare(TQListViewItem* i, int col, bool) const; - virtual QString text(int col) const; + virtual TQString text(int col) const; bool isCommit(); bool isCheckout(); @@ -71,11 +71,11 @@ public: private: - const QDateTime m_date; + const TQDateTime m_date; }; -int HistoryItem::compare(QListViewItem* i, int col, bool ascending) const +int HistoryItem::compare(TQListViewItem* i, int col, bool ascending) const { const HistoryItem* pItem = static_cast<HistoryItem*>(i); @@ -89,23 +89,23 @@ int HistoryItem::compare(QListViewItem* i, int col, bool ascending) const iResult = ::compareRevisions(text(Revision), pItem->text(Revision)); break; default: - iResult = QListViewItem::compare(i, col, ascending); + iResult = TQListViewItem::compare(i, col, ascending); } return iResult; } -QString HistoryItem::text(int col) const +TQString HistoryItem::text(int col) const { - QString sText; + TQString sText; switch (col) { case Date: sText = KGlobal::locale()->formatDateTime(m_date); break; default: - sText = QListViewItem::text(col); + sText = TQListViewItem::text(col); } return sText; @@ -138,17 +138,17 @@ bool HistoryItem::isOther() } -HistoryDialog::HistoryDialog(KConfig& cfg, QWidget *parent, const char *name) - : KDialogBase(parent, name, false, QString::null, +HistoryDialog::HistoryDialog(KConfig& cfg, TQWidget *parent, const char *name) + : KDialogBase(parent, name, false, TQString::null, Close | Help, ButtonCode(0), true) , partConfig(cfg) { - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); listview = new KListView(mainWidget); - listview->setSelectionMode(QListView::NoSelection); + listview->setSelectionMode(TQListView::NoSelection); listview->setAllColumnsShowFocus(true); listview->setShowSortIndicator(true); listview->setSorting(HistoryItem::Date, false); @@ -161,23 +161,23 @@ HistoryDialog::HistoryDialog(KConfig& cfg, QWidget *parent, const char *name) listview->setFocus(); layout->addWidget(listview, 1); - commit_box = new QCheckBox(i18n("Show c&ommit events"), mainWidget); + commit_box = new TQCheckBox(i18n("Show c&ommit events"), mainWidget); commit_box->setChecked(true); - checkout_box = new QCheckBox(i18n("Show ch&eckout events"), mainWidget); + checkout_box = new TQCheckBox(i18n("Show ch&eckout events"), mainWidget); checkout_box->setChecked(true); - tag_box = new QCheckBox(i18n("Show &tag events"), mainWidget); + tag_box = new TQCheckBox(i18n("Show &tag events"), mainWidget); tag_box->setChecked(true); - other_box = new QCheckBox(i18n("Show &other events"), mainWidget); + other_box = new TQCheckBox(i18n("Show &other events"), mainWidget); other_box->setChecked(true); - onlyuser_box = new QCheckBox(i18n("Only &user:"), mainWidget); + onlyuser_box = new TQCheckBox(i18n("Only &user:"), mainWidget); - onlyfilenames_box = new QCheckBox(i18n("Only &filenames matching:"), mainWidget); + onlyfilenames_box = new TQCheckBox(i18n("Only &filenames matching:"), mainWidget); - onlydirnames_box = new QCheckBox(i18n("Only &folders matching:"), mainWidget); + onlydirnames_box = new TQCheckBox(i18n("Only &folders matching:"), mainWidget); user_edit = new KLineEdit(mainWidget); user_edit->setEnabled(false); @@ -188,34 +188,34 @@ HistoryDialog::HistoryDialog(KConfig& cfg, QWidget *parent, const char *name) dirname_edit = new KLineEdit(mainWidget); dirname_edit->setEnabled(false); - connect( onlyuser_box, SIGNAL(toggled(bool)), - this, SLOT(toggled(bool)) ); - connect( onlyfilenames_box, SIGNAL(toggled(bool)), - this, SLOT(toggled(bool)) ); - connect( onlydirnames_box, SIGNAL(toggled(bool)), - this, SLOT(toggled(bool)) ); - connect( commit_box, SIGNAL(toggled(bool)), - this, SLOT(choiceChanged()) ); - connect( checkout_box, SIGNAL(toggled(bool)), - this, SLOT(choiceChanged()) ); - connect( tag_box, SIGNAL(toggled(bool)), - this, SLOT(choiceChanged()) ); - connect( other_box, SIGNAL(toggled(bool)), - this, SLOT(choiceChanged()) ); - connect( onlyuser_box, SIGNAL(toggled(bool)), - this, SLOT(choiceChanged()) ); - connect( onlyfilenames_box, SIGNAL(toggled(bool)), - this, SLOT(choiceChanged()) ); - connect( onlydirnames_box, SIGNAL(toggled(bool)), - this, SLOT(choiceChanged()) ); - connect( user_edit, SIGNAL(returnPressed()), - this, SLOT(choiceChanged()) ); - connect( filename_edit, SIGNAL(returnPressed()), - this, SLOT(choiceChanged()) ); - connect( dirname_edit, SIGNAL(returnPressed()), - this, SLOT(choiceChanged()) ); - - QGridLayout *grid = new QGridLayout(layout); + connect( onlyuser_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(toggled(bool)) ); + connect( onlyfilenames_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(toggled(bool)) ); + connect( onlydirnames_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(toggled(bool)) ); + connect( commit_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(choiceChanged()) ); + connect( checkout_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(choiceChanged()) ); + connect( tag_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(choiceChanged()) ); + connect( other_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(choiceChanged()) ); + connect( onlyuser_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(choiceChanged()) ); + connect( onlyfilenames_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(choiceChanged()) ); + connect( onlydirnames_box, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(choiceChanged()) ); + connect( user_edit, TQT_SIGNAL(returnPressed()), + this, TQT_SLOT(choiceChanged()) ); + connect( filename_edit, TQT_SIGNAL(returnPressed()), + this, TQT_SLOT(choiceChanged()) ); + connect( dirname_edit, TQT_SIGNAL(returnPressed()), + this, TQT_SLOT(choiceChanged()) ); + + TQGridLayout *grid = new TQGridLayout(layout); grid->setColStretch(0, 1); grid->setColStretch(1, 0); grid->setColStretch(2, 4); @@ -239,14 +239,14 @@ HistoryDialog::HistoryDialog(KConfig& cfg, QWidget *parent, const char *name) setWFlags(Qt::WDestructiveClose | getWFlags()); - QSize size = configDialogSize(partConfig, "HistoryDialog"); + TQSize size = configDialogSize(partConfig, "HistoryDialog"); resize(size); // without this restoreLayout() can't change the column widths for (int i = 0; i < listview->columns(); ++i) - listview->setColumnWidthMode(i, QListView::Manual); + listview->setColumnWidthMode(i, TQListView::Manual); - listview->restoreLayout(&partConfig, QString::fromLatin1("HistoryListView")); + listview->restoreLayout(&partConfig, TQString::fromLatin1("HistoryListView")); } @@ -254,15 +254,15 @@ HistoryDialog::~HistoryDialog() { saveDialogSize(partConfig, "HistoryDialog"); - listview->saveLayout(&partConfig, QString::fromLatin1("HistoryListView")); + listview->saveLayout(&partConfig, TQString::fromLatin1("HistoryListView")); } void HistoryDialog::choiceChanged() { - const QString author(user_edit->text()); - const QRegExp fileMatcher(filename_edit->text(), true, true); - const QRegExp pathMatcher(dirname_edit->text(), true, true); + const TQString author(user_edit->text()); + const TQRegExp fileMatcher(filename_edit->text(), true, true); + const TQRegExp pathMatcher(dirname_edit->text(), true, true); const bool showCommitEvents(commit_box->isChecked()); const bool showCheckoutEvents(checkout_box->isChecked()); @@ -272,7 +272,7 @@ void HistoryDialog::choiceChanged() const bool filterByFile(onlyfilenames_box->isChecked() && !fileMatcher.isEmpty()); const bool filterByPath(onlydirnames_box->isChecked() && !pathMatcher.isEmpty()); - QListViewItemIterator it(listview); + TQListViewItemIterator it(listview); for (; it.current(); ++it) { HistoryItem *item = static_cast<HistoryItem*>(it.current()); @@ -320,15 +320,15 @@ bool HistoryDialog::parseHistory(CvsService_stub* cvsService) if( !dlg.execute() ) return false; - QString line; + TQString line; while( dlg.getLine(line) ) { - const QStringList list(splitLine(line)); + const TQStringList list(splitLine(line)); const int listSize(list.size()); if( listSize < 6) continue; - QString cmd = list[0]; + TQString cmd = list[0]; if( cmd.length() != 1 ) continue; @@ -349,7 +349,7 @@ bool HistoryDialog::parseHistory(CvsService_stub* cvsService) if( ncol != (int)list.count() ) continue; - QString event; + TQString event; switch( cmd_code ) { case 'O': event = i18n("Checkout "); break; @@ -366,7 +366,7 @@ bool HistoryDialog::parseHistory(CvsService_stub* cvsService) default: event = i18n("Unknown "); } - const QDateTime date(parseDate(list[1], list[2], list[3])); + const TQDateTime date(parseDate(list[1], list[2], list[3])); HistoryItem *item = new HistoryItem(listview, date); item->setText(HistoryItem::Event, event); diff --git a/cervisia/historydlg.h b/cervisia/historydlg.h index ac2241d2..2b44a75b 100644 --- a/cervisia/historydlg.h +++ b/cervisia/historydlg.h @@ -37,7 +37,7 @@ class HistoryDialog : public KDialogBase Q_OBJECT public: - explicit HistoryDialog( KConfig& cfg, QWidget *parent=0, const char *name=0 ); + explicit HistoryDialog( KConfig& cfg, TQWidget *parent=0, const char *name=0 ); virtual ~HistoryDialog(); bool parseHistory(CvsService_stub* cvsService); @@ -48,8 +48,8 @@ private slots: private: KListView *listview; - QCheckBox *commit_box, *checkout_box, *tag_box, *other_box; - QCheckBox *onlyuser_box, *onlyfilenames_box, *onlydirnames_box; + TQCheckBox *commit_box, *checkout_box, *tag_box, *other_box; + TQCheckBox *onlyuser_box, *onlyfilenames_box, *onlydirnames_box; KLineEdit *user_edit, *filename_edit, *dirname_edit; KConfig& partConfig; }; diff --git a/cervisia/ignorelistbase.cpp b/cervisia/ignorelistbase.cpp index 27b3d159..74036d25 100644 --- a/cervisia/ignorelistbase.cpp +++ b/cervisia/ignorelistbase.cpp @@ -19,28 +19,28 @@ #include "ignorelistbase.h" using namespace Cervisia; -#include <qfile.h> -#include <qstringlist.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqstringlist.h> +#include <tqtextstream.h> -void IgnoreListBase::addEntriesFromString(const QString& str) +void IgnoreListBase::addEntriesFromString(const TQString& str) { - QStringList entries = QStringList::split(' ', str); - for( QStringList::iterator it = entries.begin(); it != entries.end(); ++it ) + TQStringList entries = TQStringList::split(' ', str); + for( TQStringList::iterator it = entries.begin(); it != entries.end(); ++it ) { addEntry(*it); } } -void IgnoreListBase::addEntriesFromFile(const QString& name) +void IgnoreListBase::addEntriesFromFile(const TQString& name) { - QFile file(name); + TQFile file(name); if( file.open(IO_ReadOnly) ) { - QTextStream stream(&file); + TQTextStream stream(&file); while( !stream.eof() ) { addEntriesFromString(stream.readLine()); diff --git a/cervisia/ignorelistbase.h b/cervisia/ignorelistbase.h index 9d166796..f9534bca 100644 --- a/cervisia/ignorelistbase.h +++ b/cervisia/ignorelistbase.h @@ -32,14 +32,14 @@ class IgnoreListBase public: virtual ~IgnoreListBase() {} - virtual bool matches(const QFileInfo* fi) const = 0; + virtual bool matches(const TQFileInfo* fi) const = 0; protected: - void addEntriesFromString(const QString& str); - void addEntriesFromFile(const QString& name); + void addEntriesFromString(const TQString& str); + void addEntriesFromFile(const TQString& name); private: - virtual void addEntry(const QString& entry) = 0; + virtual void addEntry(const TQString& entry) = 0; }; diff --git a/cervisia/logdlg.cpp b/cervisia/logdlg.cpp index 41a0751c..28b3078e 100644 --- a/cervisia/logdlg.cpp +++ b/cervisia/logdlg.cpp @@ -21,15 +21,15 @@ #include "logdlg.h" -#include <qcombobox.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qtabwidget.h> -#include <qtextedit.h> -#include <qwhatsthis.h> +#include <tqcombobox.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqtabwidget.h> +#include <tqtextedit.h> +#include <tqwhatsthis.h> #include <kconfig.h> #include <kdebug.h> #include <kfiledialog.h> @@ -57,8 +57,8 @@ #include "patchoptiondlg.h" -LogDialog::LogDialog(KConfig& cfg, QWidget *parent, const char *name) - : KDialogBase(parent, name, false, QString::null, +LogDialog::LogDialog(KConfig& cfg, TQWidget *parent, const char *name) + : KDialogBase(parent, name, false, TQString::null, Ok | Apply | Close | Help | User1 | User2 | User3, Close, true, KGuiItem(i18n("&Annotate")), KGuiItem(i18n("&Diff"), "vcs_diff"), @@ -66,16 +66,16 @@ LogDialog::LogDialog(KConfig& cfg, QWidget *parent, const char *name) , cvsService(0) , partConfig(cfg) { - QSplitter *splitter = new QSplitter(Qt::Vertical, this); + TQSplitter *splitter = new TQSplitter(Qt::Vertical, this); setMainWidget(splitter); tree = new LogTreeView(this); - connect( tree, SIGNAL(revisionClicked(QString,bool)), - this, SLOT(revisionSelected(QString,bool)) ); + connect( tree, TQT_SIGNAL(revisionClicked(TQString,bool)), + this, TQT_SLOT(revisionSelected(TQString,bool)) ); - QWidget* listWidget = new QWidget(this); - QVBoxLayout* listLayout = new QVBoxLayout(listWidget); - QHBoxLayout* searchLayout = new QHBoxLayout(listLayout); + TQWidget* listWidget = new TQWidget(this); + TQVBoxLayout* listLayout = new TQVBoxLayout(listWidget); + TQHBoxLayout* searchLayout = new TQHBoxLayout(listLayout); searchLayout->setMargin(KDialog::spacingHint()); searchLayout->setSpacing(KDialog::spacingHint()); @@ -83,45 +83,45 @@ LogDialog::LogDialog(KConfig& cfg, QWidget *parent, const char *name) listLayout->addWidget(list, 1); KListViewSearchLine* searchLine = new KListViewSearchLine(listWidget, list); - QLabel* searchLabel = new QLabel(searchLine, i18n("S&earch:"), listWidget); + TQLabel* searchLabel = new TQLabel(searchLine, i18n("S&earch:"), listWidget); searchLayout->addWidget(searchLabel); searchLayout->addWidget(searchLine, 1); - connect( list, SIGNAL(revisionClicked(QString,bool)), - this, SLOT(revisionSelected(QString,bool)) ); + connect( list, TQT_SIGNAL(revisionClicked(TQString,bool)), + this, TQT_SLOT(revisionSelected(TQString,bool)) ); plain = new LogPlainView(this); - connect( plain, SIGNAL(revisionClicked(QString,bool)), - this, SLOT(revisionSelected(QString,bool)) ); + connect( plain, TQT_SIGNAL(revisionClicked(TQString,bool)), + this, TQT_SLOT(revisionSelected(TQString,bool)) ); - tabWidget = new QTabWidget(splitter); + tabWidget = new TQTabWidget(splitter); tabWidget->addTab(tree, i18n("&Tree")); tabWidget->addTab(listWidget, i18n("&List")); tabWidget->addTab(plain, i18n("CVS &Output")); - connect(tabWidget, SIGNAL(currentChanged(QWidget*)), - this, SLOT(tabChanged(QWidget*))); + connect(tabWidget, TQT_SIGNAL(currentChanged(TQWidget*)), + this, TQT_SLOT(tabChanged(TQWidget*))); - QWhatsThis::add(tree, i18n("Choose revision A by clicking with the left " + TQWhatsThis::add(tree, i18n("Choose revision A by clicking with the left " "mouse button,\nrevision B by clicking with " "the middle mouse button.")); items.setAutoDelete(true); tags.setAutoDelete(true); - QWidget *mainWidget = new QWidget(splitter); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQWidget *mainWidget = new TQWidget(splitter); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); for (int i = 0; i < 2; ++i) { if ( i == 1 ) { - QFrame *frame = new QFrame(mainWidget); - frame->setFrameStyle(QFrame::HLine | QFrame::Sunken); + TQFrame *frame = new TQFrame(mainWidget); + frame->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); layout->addWidget(frame); } - QGridLayout *grid = new QGridLayout(layout); + TQGridLayout *grid = new TQGridLayout(layout); grid->setRowStretch(0, 0); grid->setRowStretch(1, 0); grid->setRowStretch(2, 1); @@ -131,69 +131,69 @@ LogDialog::LogDialog(KConfig& cfg, QWidget *parent, const char *name) grid->setColStretch(3, 1); grid->setColStretch(4, 2); - QString versionident = (i==0)? i18n("Revision A:") : i18n("Revision B:"); - QLabel *versionlabel = new QLabel(versionident, mainWidget); + TQString versionident = (i==0)? i18n("Revision A:") : i18n("Revision B:"); + TQLabel *versionlabel = new TQLabel(versionident, mainWidget); grid->addWidget(versionlabel, 0, 0); - revbox[i] = new QLabel(mainWidget); - revbox[i]->setFrameStyle(QFrame::Panel | QFrame::Sunken); + revbox[i] = new TQLabel(mainWidget); + revbox[i]->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); grid->addWidget(revbox[i], 0, 1, Qt::AlignVCenter); - QLabel *selectlabel = new QLabel(i18n("Select by tag:"), mainWidget); + TQLabel *selectlabel = new TQLabel(i18n("Select by tag:"), mainWidget); grid->addWidget(selectlabel, 0, 2); - tagcombo[i] = new QComboBox(mainWidget); - QFontMetrics fm(tagcombo[i]->fontMetrics()); + tagcombo[i] = new TQComboBox(mainWidget); + TQFontMetrics fm(tagcombo[i]->fontMetrics()); tagcombo[i]->setMinimumWidth(fm.width("X")*20); grid->addWidget(tagcombo[i], 0, 3); - QLabel *authorlabel = new QLabel(i18n("Author:"), mainWidget); + TQLabel *authorlabel = new TQLabel(i18n("Author:"), mainWidget); grid->addWidget(authorlabel, 1, 0); - authorbox[i] = new QLabel(mainWidget); - authorbox[i]->setFrameStyle(QFrame::Panel | QFrame::Sunken); + authorbox[i] = new TQLabel(mainWidget); + authorbox[i]->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); grid->addWidget(authorbox[i], 1, 1); - QLabel *datelabel = new QLabel(i18n("Date:"), mainWidget); + TQLabel *datelabel = new TQLabel(i18n("Date:"), mainWidget); grid->addWidget(datelabel, 1, 2); - datebox[i] = new QLabel(mainWidget); - datebox[i]->setFrameStyle(QFrame::Panel | QFrame::Sunken); + datebox[i] = new TQLabel(mainWidget); + datebox[i]->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); grid->addWidget(datebox[i], 1, 3); - QLabel *commentlabel = new QLabel(i18n("Comment/Tags:"), mainWidget); + TQLabel *commentlabel = new TQLabel(i18n("Comment/Tags:"), mainWidget); grid->addWidget(commentlabel, 2, 0); - commentbox[i] = new QTextEdit(mainWidget); + commentbox[i] = new TQTextEdit(mainWidget); commentbox[i]->setReadOnly(true); commentbox[i]->setTextFormat(Qt::PlainText); fm = commentbox[i]->fontMetrics(); commentbox[i]->setMinimumHeight(2*fm.lineSpacing()+10); grid->addMultiCellWidget(commentbox[i], 2, 2, 1, 3); - tagsbox[i] = new QTextEdit(mainWidget); + tagsbox[i] = new TQTextEdit(mainWidget); tagsbox[i]->setReadOnly(true); tagsbox[i]->setMinimumHeight(2*fm.lineSpacing()+10); grid->addWidget(tagsbox[i], 2, 4); } - QWhatsThis::add(revbox[0], i18n("This revision is used when you click " + TQWhatsThis::add(revbox[0], i18n("This revision is used when you click " "Annotate.\nIt is also used as the first " "item of a Diff operation.")); - QWhatsThis::add(revbox[1], i18n("This revision is used as the second " + TQWhatsThis::add(revbox[1], i18n("This revision is used as the second " "item of a Diff operation.")); - connect( tagcombo[0], SIGNAL(activated(int)), - this, SLOT(tagASelected(int)) ); - connect( tagcombo[1], SIGNAL(activated(int)), - this, SLOT(tagBSelected(int)) ); + connect( tagcombo[0], TQT_SIGNAL(activated(int)), + this, TQT_SLOT(tagASelected(int)) ); + connect( tagcombo[1], TQT_SIGNAL(activated(int)), + this, TQT_SLOT(tagBSelected(int)) ); - connect( this, SIGNAL(user1Clicked()), - this, SLOT(annotateClicked()) ); - connect( this, SIGNAL(user2Clicked()), - this, SLOT(diffClicked()) ); - connect( this, SIGNAL(user3Clicked()), - this, SLOT(findClicked()) ); + connect( this, TQT_SIGNAL(user1Clicked()), + this, TQT_SLOT(annotateClicked()) ); + connect( this, TQT_SIGNAL(user2Clicked()), + this, TQT_SLOT(diffClicked()) ); + connect( this, TQT_SIGNAL(user3Clicked()), + this, TQT_SLOT(findClicked()) ); setButtonGuiItem(Ok, KGuiItem(i18n("to view something", "&View"),"fileopen")); setButtonGuiItem(Apply, KGuiItem(i18n("Create Patch..."))); @@ -201,7 +201,7 @@ LogDialog::LogDialog(KConfig& cfg, QWidget *parent, const char *name) setWFlags(Qt::WDestructiveClose | getWFlags()); - QSize size = configDialogSize(partConfig, "LogDialog"); + TQSize size = configDialogSize(partConfig, "LogDialog"); resize(size); KConfigGroupSaver cs(&partConfig, "LogDialog"); @@ -220,9 +220,9 @@ LogDialog::~LogDialog() } -bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName) +bool LogDialog::parseCvsLog(CvsService_stub* service, const TQString& fileName) { - QString rev; + TQString rev; Cervisia::LogInfo logInfo; @@ -245,7 +245,7 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName) // process cvs log output state = Begin; - QString line; + TQString line; while( dlg.getLine(line) ) { switch( state ) @@ -257,10 +257,10 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName) case Tags: if( line[0] == '\t' ) { - const QStringList strlist(splitLine(line, ':')); + const TQStringList strlist(splitLine(line, ':')); rev = strlist[1].simplifyWhiteSpace(); - const QString tag(strlist[0].simplifyWhiteSpace()); - QString branchpoint; + const TQString tag(strlist[0].simplifyWhiteSpace()); + TQString branchpoint; int pos1, pos2; if( (pos2 = rev.findRev('.')) > 0 && (pos1 = rev.findRev('.', pos2-1)) > 0 && @@ -298,15 +298,15 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName) break; case Author: { - QStringList strList = QStringList::split(";", line); + TQStringList strList = TQStringList::split(";", line); // convert date into ISO format (YYYY-MM-DDTHH:MM:SS) int len = strList[0].length(); - QString dateTimeStr = strList[0].right(len-6); // remove 'date: ' + TQString dateTimeStr = strList[0].right(len-6); // remove 'date: ' dateTimeStr.replace('/', '-'); - QString date = dateTimeStr.section(' ', 0, 0); - QString time = dateTimeStr.section(' ', 1, 1); + TQString date = dateTimeStr.section(' ', 0, 0); + TQString time = dateTimeStr.section(' ', 1, 1); logInfo.m_dateTime.setTime_t(KRFCDate::parseDateISO8601(date + 'T' + time)); logInfo.m_author = strList[1].section(':', 1, 1).stripWhiteSpace(); @@ -335,7 +335,7 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName) else { // Create tagcomment - QString branchrev; + TQString branchrev; int pos1, pos2; // 1.60.x.y => revision belongs to branch 1.60.0.x if( (pos2 = rev.findRev('.')) > 0 && @@ -343,7 +343,7 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName) branchrev = rev.left(pos2); // Build Cervisia::TagInfo for logInfo - QPtrListIterator<LogDialogTagInfo> it(tags); + TQPtrListIterator<LogDialogTagInfo> it(tags); for( ; it.current(); ++it ) { if( rev == it.current()->rev ) @@ -380,12 +380,12 @@ bool LogDialog::parseCvsLog(CvsService_stub* service, const QString& fileName) } } - tagcombo[0]->insertItem(QString::null); - tagcombo[1]->insertItem(QString::null); - QPtrListIterator<LogDialogTagInfo> it(tags); + tagcombo[0]->insertItem(TQString::null); + tagcombo[1]->insertItem(TQString::null); + TQPtrListIterator<LogDialogTagInfo> it(tags); for( ; it.current(); ++it ) { - QString str = it.current()->tag; + TQString str = it.current()->tag; if( !it.current()->branchpoint.isEmpty() ) str += i18n(" (Branchpoint)"); tagcombo[0]->insertItem(str); @@ -412,15 +412,15 @@ void LogDialog::slotOk() } // retrieve the selected revision - QString revision; + TQString revision; if( !selectionA.isEmpty() ) revision = selectionA; else revision = selectionB; // create a temporary file - const QString suffix("-" + revision + "-" + QFileInfo(filename).fileName()); - const QString tempFileName(::tempFileName(suffix)); + const TQString suffix("-" + revision + "-" + TQFileInfo(filename).fileName()); + const TQString tempFileName(::tempFileName(suffix)); // retrieve the file with the selected revision from cvs // and save the content into the temporary file @@ -432,7 +432,7 @@ void LogDialog::slotOk() if( dlg.execute() ) { // make file read-only - chmod(QFile::encodeName(tempFileName), 0400); + chmod(TQFile::encodeName(tempFileName), 0400); // open file in preferred editor KURL url; @@ -456,8 +456,8 @@ void LogDialog::slotApply() if( optionDlg.exec() == KDialogBase::Rejected ) return; - QString format = optionDlg.formatOption(); - QString diffOptions = optionDlg.diffOptions(); + TQString format = optionDlg.formatOption(); + TQString diffOptions = optionDlg.diffOptions(); DCOPRef job = cvsService->diff(filename, selectionA, selectionB, diffOptions, format); @@ -468,14 +468,14 @@ void LogDialog::slotApply() if( !dlg.execute() ) return; - QString fileName = KFileDialog::getSaveFileName(); + TQString fileName = KFileDialog::getSaveFileName(); if( fileName.isEmpty() ) return; if( !Cervisia::CheckOverwrite(fileName) ) return; - QFile f(fileName); + TQFile f(fileName); if( !f.open(IO_WriteOnly) ) { KMessageBox::sorry(this, @@ -484,8 +484,8 @@ void LogDialog::slotApply() return; } - QTextStream t(&f); - QString line; + TQTextStream t(&f); + TQString line; while( dlg.getLine(line) ) t << line << '\n'; @@ -528,9 +528,9 @@ void LogDialog::annotateClicked() } -void LogDialog::revisionSelected(QString rev, bool rmb) +void LogDialog::revisionSelected(TQString rev, bool rmb) { - QPtrListIterator<Cervisia::LogInfo> it(items); + TQPtrListIterator<Cervisia::LogInfo> it(items); for (; it.current(); ++it) if (it.current()->m_revision == rev) { @@ -607,7 +607,7 @@ void LogDialog::tagBSelected(int n) } -void LogDialog::tabChanged(QWidget* w) +void LogDialog::tabChanged(TQWidget* w) { bool isPlainView = (w == plain); showButton(User3, isPlainView); diff --git a/cervisia/logdlg.h b/cervisia/logdlg.h index c5cce4b3..ad50f6e4 100644 --- a/cervisia/logdlg.h +++ b/cervisia/logdlg.h @@ -25,7 +25,7 @@ #include "loginfo.h" -#include <qptrlist.h> +#include <tqptrlist.h> class LogListView; @@ -43,9 +43,9 @@ class CvsService_stub; class LogDialogTagInfo { public: - QString rev; - QString tag; - QString branchpoint; + TQString rev; + TQString tag; + TQString branchpoint; }; @@ -54,11 +54,11 @@ class LogDialog : public KDialogBase Q_OBJECT public: - explicit LogDialog( KConfig& cfg, QWidget *parent=0, const char *name=0 ); + explicit LogDialog( KConfig& cfg, TQWidget *parent=0, const char *name=0 ); virtual ~LogDialog(); - bool parseCvsLog(CvsService_stub* service, const QString& fileName); + bool parseCvsLog(CvsService_stub* service, const TQString& fileName); protected slots: void slotOk(); @@ -68,30 +68,30 @@ private slots: void findClicked(); void diffClicked(); void annotateClicked(); - void revisionSelected(QString rev, bool rmb); + void revisionSelected(TQString rev, bool rmb); void tagASelected(int n); void tagBSelected(int n); - void tabChanged(QWidget* w); + void tabChanged(TQWidget* w); private: void tagSelected(LogDialogTagInfo* tag, bool rmb); void updateButtons(); - QString filename; - QPtrList<Cervisia::LogInfo> items; - QPtrList<LogDialogTagInfo> tags; - QString selectionA; - QString selectionB; + TQString filename; + TQPtrList<Cervisia::LogInfo> items; + TQPtrList<LogDialogTagInfo> tags; + TQString selectionA; + TQString selectionB; LogTreeView *tree; LogListView *list; LogPlainView *plain; - QTabWidget *tabWidget; - QLabel *revbox[2]; - QLabel *authorbox[2]; - QLabel *datebox[2]; - QTextEdit *commentbox[2]; - QTextEdit *tagsbox[2]; - QComboBox *tagcombo[2]; + TQTabWidget *tabWidget; + TQLabel *revbox[2]; + TQLabel *authorbox[2]; + TQLabel *datebox[2]; + TQTextEdit *commentbox[2]; + TQTextEdit *tagsbox[2]; + TQComboBox *tagcombo[2]; CvsService_stub* cvsService; KConfig& partConfig; diff --git a/cervisia/loginfo.cpp b/cervisia/loginfo.cpp index 49f7efb2..b97ff1f0 100644 --- a/cervisia/loginfo.cpp +++ b/cervisia/loginfo.cpp @@ -19,7 +19,7 @@ #include "loginfo.h" -#include <qstylesheet.h> +#include <tqstylesheet.h> #include <kglobal.h> #include <klocale.h> @@ -29,19 +29,19 @@ namespace Cervisia { -TagInfo::TagInfo(const QString& name, Type type) +TagInfo::TagInfo(const TQString& name, Type type) : m_name(name), m_type(type) { } -QString TagInfo::toString(bool prefixWithType) const +TQString TagInfo::toString(bool prefixWithType) const { - QString text; + TQString text; if (prefixWithType) { - text += typeToString() + QString::fromLatin1(": "); + text += typeToString() + TQString::fromLatin1(": "); } text += m_name; @@ -49,9 +49,9 @@ QString TagInfo::toString(bool prefixWithType) const } -QString TagInfo::typeToString() const +TQString TagInfo::typeToString() const { - QString text; + TQString text; switch (m_type) { case Branch: @@ -69,41 +69,41 @@ QString TagInfo::typeToString() const } -QString LogInfo::createToolTipText(bool showTime) const +TQString LogInfo::createToolTipText(bool showTime) const { - QString text(QString::fromLatin1("<nobr><b>")); - text += QStyleSheet::escape(m_revision); - text += QString::fromLatin1("</b> "); - text += QStyleSheet::escape(m_author); - text += QString::fromLatin1(" <b>"); - text += QStyleSheet::escape(dateTimeToString(showTime)); - text += QString::fromLatin1("</b></nobr>"); + TQString text(TQString::fromLatin1("<nobr><b>")); + text += TQStyleSheet::escape(m_revision); + text += TQString::fromLatin1("</b> "); + text += TQStyleSheet::escape(m_author); + text += TQString::fromLatin1(" <b>"); + text += TQStyleSheet::escape(dateTimeToString(showTime)); + text += TQString::fromLatin1("</b></nobr>"); if (!m_comment.isEmpty()) { - text += QString::fromLatin1("<pre>"); - text += QStyleSheet::escape(m_comment); - text += QString::fromLatin1("</pre>"); + text += TQString::fromLatin1("<pre>"); + text += TQStyleSheet::escape(m_comment); + text += TQString::fromLatin1("</pre>"); } if (!m_tags.isEmpty()) { - text += QString::fromLatin1("<i>"); + text += TQString::fromLatin1("<i>"); for (TTagInfoSeq::const_iterator it = m_tags.begin(); it != m_tags.end(); ++it) { if (it != m_tags.begin() || m_comment.isEmpty()) - text += QString::fromLatin1("<br>"); - text += QStyleSheet::escape((*it).toString()); + text += TQString::fromLatin1("<br>"); + text += TQStyleSheet::escape((*it).toString()); } - text += QString::fromLatin1("</i>"); + text += TQString::fromLatin1("</i>"); } return text; } -QString LogInfo::dateTimeToString(bool showTime, bool shortFormat) const +TQString LogInfo::dateTimeToString(bool showTime, bool shortFormat) const { if( showTime ) return KGlobal::locale()->formatDateTime(m_dateTime, shortFormat); @@ -112,11 +112,11 @@ QString LogInfo::dateTimeToString(bool showTime, bool shortFormat) const } -QString LogInfo::tagsToString(unsigned int types, +TQString LogInfo::tagsToString(unsigned int types, unsigned int prefixWithType, - const QString& separator) const + const TQString& separator) const { - QString text; + TQString text; for (TTagInfoSeq::const_iterator it = m_tags.begin(); it != m_tags.end(); ++it) { diff --git a/cervisia/loginfo.h b/cervisia/loginfo.h index e4eb7071..92c67312 100644 --- a/cervisia/loginfo.h +++ b/cervisia/loginfo.h @@ -21,9 +21,9 @@ #define CERVISIA_LOGINFO_H -#include <qdatetime.h> -#include <qstring.h> -#include <qvaluelist.h> +#include <tqdatetime.h> +#include <tqstring.h> +#include <tqvaluelist.h> namespace Cervisia @@ -58,7 +58,7 @@ struct TagInfo Tag = 1 << 2 }; - explicit TagInfo(const QString& name = QString::null, Type type = Tag); + explicit TagInfo(const TQString& name = TQString::null, Type type = Tag); /** * @param prefixWithType prefix the string with the type of the tag @@ -66,17 +66,17 @@ struct TagInfo * * @return tag as string. */ - QString toString(bool prefixWithType = true) const; + TQString toString(bool prefixWithType = true) const; /** * @return type of tag as string. */ - QString typeToString() const; + TQString typeToString() const; /** * The name of the tag. */ - QString m_name; + TQString m_name; /** * The type of the tag. @@ -91,14 +91,14 @@ struct TagInfo */ struct LogInfo { - typedef QValueList<TagInfo> TTagInfoSeq; + typedef TQValueList<TagInfo> TTagInfoSeq; /** * @param showTime show commit time in tooltip. * * @return rich text formatted tooltip text. */ - QString createToolTipText(bool showTime = true) const; + TQString createToolTipText(bool showTime = true) const; /** * Calls KLocale::formatDateTime() to create a formatted string. @@ -108,7 +108,7 @@ struct LogInfo * * @return The date/time formatted to the user's locale's conventions. */ - QString dateTimeToString(bool showTime = true, bool shortFormat = true) const; + TQString dateTimeToString(bool showTime = true, bool shortFormat = true) const; enum { @@ -126,29 +126,29 @@ struct LogInfo * * @return string of joined tags. */ - QString tagsToString(unsigned int types = AllTagTypes, + TQString tagsToString(unsigned int types = AllTagTypes, unsigned int prefixWithType = AllTagTypes, - const QString& separator = QString(QChar('\n'))) const; + const TQString& separator = TQString(TQChar('\n'))) const; /** * The revision of this entry. */ - QString m_revision; + TQString m_revision; /** * The author who committed. */ - QString m_author; + TQString m_author; /** * The commit message. */ - QString m_comment; + TQString m_comment; /** * The date/time of the commit. */ - QDateTime m_dateTime; + TQDateTime m_dateTime; /** * Sequence of tags of this entry. diff --git a/cervisia/loglist.cpp b/cervisia/loglist.cpp index 101dd3d7..833a2429 100644 --- a/cervisia/loglist.cpp +++ b/cervisia/loglist.cpp @@ -20,8 +20,8 @@ #include "loglist.h" -#include <qapplication.h> -#include <qkeycode.h> +#include <tqapplication.h> +#include <tqkeycode.h> #include <klocale.h> #include "loginfo.h" @@ -35,19 +35,19 @@ public: enum { Revision, Author, Date, Branch, Comment, Tags }; - LogListViewItem(QListView* list, const Cervisia::LogInfo& logInfo); + LogListViewItem(TQListView* list, const Cervisia::LogInfo& logInfo); - virtual int compare(QListViewItem* i, int col, bool) const; + virtual int compare(TQListViewItem* i, int col, bool) const; private: - static QString truncateLine(const QString &s); + static TQString truncateLine(const TQString &s); Cervisia::LogInfo m_logInfo; friend class LogListView; }; -LogListViewItem::LogListViewItem(QListView* list, const Cervisia::LogInfo& logInfo) +LogListViewItem::LogListViewItem(TQListView* list, const Cervisia::LogInfo& logInfo) : KListViewItem(list), m_logInfo(logInfo) { @@ -69,15 +69,15 @@ LogListViewItem::LogListViewItem(QListView* list, const Cervisia::LogInfo& logIn setText(Tags, logInfo.tagsToString(Cervisia::TagInfo::Tag, Cervisia::LogInfo::NoTagType, - QString::fromLatin1(", "))); + TQString::fromLatin1(", "))); } -QString LogListViewItem::truncateLine(const QString &s) +TQString LogListViewItem::truncateLine(const TQString &s) { int pos; - QString res = s.simplifyWhiteSpace(); + TQString res = s.simplifyWhiteSpace(); if ( (pos = res.find('\n')) != -1 ) res = res.left(pos) + "..."; @@ -85,7 +85,7 @@ QString LogListViewItem::truncateLine(const QString &s) } -int LogListViewItem::compare(QListViewItem* i, int col, bool ascending) const +int LogListViewItem::compare(TQListViewItem* i, int col, bool ascending) const { const LogListViewItem* item = static_cast<LogListViewItem*>(i); @@ -99,14 +99,14 @@ int LogListViewItem::compare(QListViewItem* i, int col, bool ascending) const iResult = ::compare(m_logInfo.m_dateTime, item->m_logInfo.m_dateTime); break; default: - iResult = QListViewItem::compare(i, col, ascending); + iResult = TQListViewItem::compare(i, col, ascending); } return iResult; } -LogListView::LogListView(KConfig& cfg, QWidget *parent, const char *name) +LogListView::LogListView(KConfig& cfg, TQWidget *parent, const char *name) : KListView(parent, name) , partConfig(cfg) { @@ -124,20 +124,20 @@ LogListView::LogListView(KConfig& cfg, QWidget *parent, const char *name) Cervisia::ToolTip* toolTip = new Cervisia::ToolTip(viewport()); - connect(toolTip, SIGNAL(queryToolTip(const QPoint&, QRect&, QString&)), - this, SLOT(slotQueryToolTip(const QPoint&, QRect&, QString&))); + connect(toolTip, TQT_SIGNAL(queryToolTip(const TQPoint&, TQRect&, TQString&)), + this, TQT_SLOT(slotQueryToolTip(const TQPoint&, TQRect&, TQString&))); // without this restoreLayout() can't change the column widths for (int i = 0; i < columns(); ++i) setColumnWidthMode(i, Manual); - restoreLayout(&partConfig, QString::fromLatin1("LogList view")); + restoreLayout(&partConfig, TQString::fromLatin1("LogList view")); } LogListView::~LogListView() { - saveLayout(&partConfig, QString::fromLatin1("LogList view")); + saveLayout(&partConfig, TQString::fromLatin1("LogList view")); } @@ -147,9 +147,9 @@ void LogListView::addRevision(const Cervisia::LogInfo& logInfo) } -void LogListView::setSelectedPair(const QString &selectionA, const QString &selectionB) +void LogListView::setSelectedPair(const TQString &selectionA, const TQString &selectionB) { - for ( QListViewItem *item = firstChild(); item; + for ( TQListViewItem *item = firstChild(); item; item = item->nextSibling() ) { LogListViewItem *i = static_cast<LogListViewItem*>(item); @@ -158,7 +158,7 @@ void LogListView::setSelectedPair(const QString &selectionA, const QString &sele } } -void LogListView::contentsMousePressEvent(QMouseEvent *e) +void LogListView::contentsMousePressEvent(TQMouseEvent *e) { // Retrieve selected item const LogListViewItem* selItem @@ -167,7 +167,7 @@ void LogListView::contentsMousePressEvent(QMouseEvent *e) return; // Retrieve revision - const QString revision = selItem->text(LogListViewItem::Revision); + const TQString revision = selItem->text(LogListViewItem::Revision); if ( e->button() == LeftButton ) { @@ -182,7 +182,7 @@ void LogListView::contentsMousePressEvent(QMouseEvent *e) } -void LogListView::keyPressEvent(QKeyEvent *e) +void LogListView::keyPressEvent(TQKeyEvent *e) { switch (e->key()) { case Key_A: @@ -203,9 +203,9 @@ void LogListView::keyPressEvent(QKeyEvent *e) case Key_Next: case Key_Prior: if (e->state() == 0) - QListView::keyPressEvent(e); + TQListView::keyPressEvent(e); else - QApplication::postEvent(this, new QKeyEvent(QEvent::KeyPress, e->key(), e->ascii(), 0)); + TQApplication::postEvent(this, new TQKeyEvent(TQEvent::KeyPress, e->key(), e->ascii(), 0)); break; default: // Ignore Key_Enter, Key_Return @@ -214,9 +214,9 @@ void LogListView::keyPressEvent(QKeyEvent *e) } -void LogListView::slotQueryToolTip(const QPoint& viewportPos, - QRect& viewportRect, - QString& text) +void LogListView::slotQueryToolTip(const TQPoint& viewportPos, + TQRect& viewportRect, + TQString& text) { if (const LogListViewItem* item = static_cast<LogListViewItem*>(itemAt(viewportPos))) { diff --git a/cervisia/loglist.h b/cervisia/loglist.h index dc2bca08..3c608ea8 100644 --- a/cervisia/loglist.h +++ b/cervisia/loglist.h @@ -41,22 +41,22 @@ class LogListView : public KListView Q_OBJECT public: - explicit LogListView( KConfig& cfg, QWidget *parent=0, const char *name=0 ); + explicit LogListView( KConfig& cfg, TQWidget *parent=0, const char *name=0 ); virtual ~LogListView(); void addRevision(const Cervisia::LogInfo& logInfo); - void setSelectedPair(const QString &selectionA, const QString &selectionB); + void setSelectedPair(const TQString &selectionA, const TQString &selectionB); signals: - void revisionClicked(QString rev, bool rmb); + void revisionClicked(TQString rev, bool rmb); protected: - virtual void contentsMousePressEvent(QMouseEvent *e); - virtual void keyPressEvent(QKeyEvent *e); + virtual void contentsMousePressEvent(TQMouseEvent *e); + virtual void keyPressEvent(TQKeyEvent *e); private slots: - void slotQueryToolTip(const QPoint&, QRect&, QString&); + void slotQueryToolTip(const TQPoint&, TQRect&, TQString&); private: diff --git a/cervisia/logmessageedit.cpp b/cervisia/logmessageedit.cpp index 33599409..f861c873 100644 --- a/cervisia/logmessageedit.cpp +++ b/cervisia/logmessageedit.cpp @@ -22,11 +22,11 @@ #include "logmessageedit.h" using Cervisia::LogMessageEdit; -#include <qtextstream.h> +#include <tqtextstream.h> #include <kaccel.h> -LogMessageEdit::LogMessageEdit(QWidget* parent) +LogMessageEdit::LogMessageEdit(TQWidget* parent) : KTextEdit(parent) , KCompletionBase() , m_completing(false) @@ -36,18 +36,18 @@ LogMessageEdit::LogMessageEdit(QWidget* parent) completionObject(); // a mouse click stops the completion process - connect( this, SIGNAL(clicked(int, int)), SLOT(stopCompletion()) ); + connect( this, TQT_SIGNAL(clicked(int, int)), TQT_SLOT(stopCompletion()) ); } -void LogMessageEdit::setCompletedText(const QString& match) +void LogMessageEdit::setCompletedText(const TQString& match) { int para, index; getCursorPosition(¶, &index); - QString paragraphText = text(para); + TQString paragraphText = text(para); int length = index - m_completionStartPos; - QString word = match.right(match.length() - length); + TQString word = match.right(match.length() - length); insert(word); @@ -62,12 +62,12 @@ void LogMessageEdit::setCompletedText(const QString& match) } -void LogMessageEdit::setCompletedItems(const QStringList&) +void LogMessageEdit::setCompletedItems(const TQStringList&) { } -void LogMessageEdit::keyPressEvent(QKeyEvent* event) +void LogMessageEdit::keyPressEvent(TQKeyEvent* event) { bool noModifier = (event->state() == NoButton || event->state() == ShiftButton || @@ -75,7 +75,7 @@ void LogMessageEdit::keyPressEvent(QKeyEvent* event) if( noModifier ) { - QString keycode = event->text(); + TQString keycode = event->text(); if( !keycode.isEmpty() && keycode.unicode()->isPrint() ) { KTextEdit::keyPressEvent(event); @@ -155,16 +155,16 @@ void LogMessageEdit::tryCompletion() int para, index; getCursorPosition(¶, &index); - QString paragraphText = text(para); + TQString paragraphText = text(para); if( paragraphText.at(index).isSpace() ) { if( !m_completing ) m_completionStartPos = paragraphText.findRev(' ', index-1) + 1; int length = index - m_completionStartPos; - QString word = paragraphText.mid(m_completionStartPos, length); + TQString word = paragraphText.mid(m_completionStartPos, length); - QString match = compObj()->makeCompletion(word); + TQString match = compObj()->makeCompletion(word); if( !match.isNull() && match != word ) { setCompletedText(match); @@ -184,15 +184,15 @@ void LogMessageEdit::rotateMatches(KeyBindingType type) if( completionObj && m_completing && (type == PrevCompletionMatch || type == NextCompletionMatch) ) { - QString match = (type == PrevCompletionMatch) ? completionObj->previousMatch() + TQString match = (type == PrevCompletionMatch) ? completionObj->previousMatch() : completionObj->nextMatch(); int para, index; getCursorPosition(¶, &index); - QString paragraphText = text(para); + TQString paragraphText = text(para); - QString word = paragraphText.mid(m_completionStartPos, index - m_completionStartPos); + TQString word = paragraphText.mid(m_completionStartPos, index - m_completionStartPos); if( match.isNull() || match == word ) return; diff --git a/cervisia/logmessageedit.h b/cervisia/logmessageedit.h index 05de18fa..c27865b6 100644 --- a/cervisia/logmessageedit.h +++ b/cervisia/logmessageedit.h @@ -35,13 +35,13 @@ class LogMessageEdit : public KTextEdit, public KCompletionBase Q_OBJECT public: - explicit LogMessageEdit(QWidget* parent); + explicit LogMessageEdit(TQWidget* parent); - virtual void setCompletedText(const QString& match); - virtual void setCompletedItems(const QStringList& items); + virtual void setCompletedText(const TQString& match); + virtual void setCompletedItems(const TQStringList& items); protected: - void keyPressEvent(QKeyEvent* event); + void keyPressEvent(TQKeyEvent* event); private slots: void stopCompletion(); diff --git a/cervisia/logplainview.cpp b/cervisia/logplainview.cpp index ca28f8b0..413180af 100644 --- a/cervisia/logplainview.cpp +++ b/cervisia/logplainview.cpp @@ -19,9 +19,9 @@ #include "logplainview.h" -#include <qregexp.h> -#include <qstringlist.h> -#include <qstylesheet.h> +#include <tqregexp.h> +#include <tqstringlist.h> +#include <tqstylesheet.h> #include <kfind.h> #include <kfinddialog.h> #include <klocale.h> @@ -31,7 +31,7 @@ using namespace Cervisia; -LogPlainView::LogPlainView(QWidget* parent, const char* name) +LogPlainView::LogPlainView(TQWidget* parent, const char* name) : KTextBrowser(parent, name) , m_find(0) , m_findPos(0) @@ -48,76 +48,76 @@ LogPlainView::~LogPlainView() void LogPlainView::addRevision(const LogInfo& logInfo) { - setTextFormat(QStyleSheet::RichText); + setTextFormat(TQStyleSheet::RichText); // assemble revision information lines - QString logEntry; + TQString logEntry; - logEntry += "<b>" + i18n("revision %1").arg(QStyleSheet::escape(logInfo.m_revision)) + + logEntry += "<b>" + i18n("revision %1").arg(TQStyleSheet::escape(logInfo.m_revision)) + "</b>"; - logEntry += " [<a href=\"revA#" + QStyleSheet::escape(logInfo.m_revision) + "\">" + + logEntry += " [<a href=\"revA#" + TQStyleSheet::escape(logInfo.m_revision) + "\">" + i18n("Select for revision A") + "</a>]"; - logEntry += " [<a href=\"revB#" + QStyleSheet::escape(logInfo.m_revision) + "\">" + + logEntry += " [<a href=\"revB#" + TQStyleSheet::escape(logInfo.m_revision) + "\">" + i18n("Select for revision B") + "</a>]<br>"; logEntry += "<i>" + - i18n("date: %1; author: %2").arg(QStyleSheet::escape(logInfo.dateTimeToString())) - .arg(QStyleSheet::escape(logInfo.m_author)) + + i18n("date: %1; author: %2").arg(TQStyleSheet::escape(logInfo.dateTimeToString())) + .arg(TQStyleSheet::escape(logInfo.m_author)) + "</i>"; append(logEntry); - setTextFormat(QStyleSheet::PlainText); + setTextFormat(TQStyleSheet::PlainText); - const QChar newline('\n'); + const TQChar newline('\n'); // split comment in separate lines - QStringList lines = QStringList::split(newline, logInfo.m_comment, true); + TQStringList lines = TQStringList::split(newline, logInfo.m_comment, true); append(newline); - QStringList::Iterator it = lines.begin(); - QStringList::Iterator end = lines.end(); + TQStringList::Iterator it = lines.begin(); + TQStringList::Iterator end = lines.end(); for( ; it != end; ++it ) { - append((*it).isEmpty() ? QString(newline) : *it); + append((*it).isEmpty() ? TQString(newline) : *it); } append(newline); - setTextFormat(QStyleSheet::RichText); + setTextFormat(TQStyleSheet::RichText); for( LogInfo::TTagInfoSeq::const_iterator it = logInfo.m_tags.begin(); it != logInfo.m_tags.end(); ++it ) { - append("<i>" + QStyleSheet::escape((*it).toString()) + "</i>"); + append("<i>" + TQStyleSheet::escape((*it).toString()) + "</i>"); } // add an empty line when we had tags or branches if( !logInfo.m_tags.empty() ) { - setTextFormat(QStyleSheet::PlainText); + setTextFormat(TQStyleSheet::PlainText); append(newline); } // add horizontal line - setTextFormat(QStyleSheet::RichText); + setTextFormat(TQStyleSheet::RichText); append("<hr>"); } -void LogPlainView::searchText(int options, const QString& pattern) +void LogPlainView::searchText(int options, const TQString& pattern) { m_find = new KFind(pattern, options, this); - connect(m_find, SIGNAL(highlight(const QString&, int, int)), - this, SLOT(searchHighlight(const QString&, int, int))); - connect(m_find, SIGNAL(findNext()), - this, SLOT(findNext())); + connect(m_find, TQT_SIGNAL(highlight(const TQString&, int, int)), + this, TQT_SLOT(searchHighlight(const TQString&, int, int))); + connect(m_find, TQT_SIGNAL(findNext()), + this, TQT_SLOT(findNext())); m_findPos = 0; if( options & KFindDialog::FromCursor ) { - const QPoint pos(contentsX(), contentsY()); + const TQPoint pos(contentsX(), contentsY()); m_findPos = paragraphAt(pos); } @@ -133,8 +133,8 @@ void LogPlainView::scrollToTop() void LogPlainView::findNext() { - static const QRegExp breakLineTag("<br[^>]*>"); - static const QRegExp htmlTags("<[^>]*>"); + static const TQRegExp breakLineTag("<br[^>]*>"); + static const TQRegExp htmlTags("<[^>]*>"); KFind::Result res = KFind::NoMatch; @@ -142,7 +142,7 @@ void LogPlainView::findNext() { if( m_find->needData() ) { - QString richText = text(m_findPos); + TQString richText = text(m_findPos); // replace <br/> with '\n' richText.replace(breakLineTag, "\n"); @@ -181,14 +181,14 @@ void LogPlainView::findNext() } -void LogPlainView::searchHighlight(const QString& text, int index, int length) +void LogPlainView::searchHighlight(const TQString& text, int index, int length) { Q_UNUSED(text); setSelection(m_findPos, index, m_findPos, index + length); } -void LogPlainView::setSource(const QString& name) +void LogPlainView::setSource(const TQString& name) { if( name.isEmpty() ) return; diff --git a/cervisia/logplainview.h b/cervisia/logplainview.h index f5da46a5..37e60f7b 100644 --- a/cervisia/logplainview.h +++ b/cervisia/logplainview.h @@ -36,23 +36,23 @@ class LogPlainView : public KTextBrowser Q_OBJECT public: - explicit LogPlainView(QWidget* parent = 0, const char* name = 0); + explicit LogPlainView(TQWidget* parent = 0, const char* name = 0); ~LogPlainView(); void addRevision(const Cervisia::LogInfo& logInfo); - void searchText(int options, const QString& pattern); + void searchText(int options, const TQString& pattern); signals: - void revisionClicked(QString rev, bool rmb); + void revisionClicked(TQString rev, bool rmb); public slots: void scrollToTop(); void findNext(); - void searchHighlight(const QString& text, int index, int length); + void searchHighlight(const TQString& text, int index, int length); protected: - virtual void setSource(const QString& name); + virtual void setSource(const TQString& name); private: KFind* m_find; diff --git a/cervisia/logtree.cpp b/cervisia/logtree.cpp index 1b5258ad..d0e8e6d2 100644 --- a/cervisia/logtree.cpp +++ b/cervisia/logtree.cpp @@ -20,7 +20,7 @@ #include "logtree.h" -#include <qpainter.h> +#include <tqpainter.h> #include <kdebug.h> #include <kglobal.h> #include <kglobalsettings.h> @@ -43,7 +43,7 @@ class LogTreeItem { public: Cervisia::LogInfo m_logInfo; - QString branchpoint; + TQString branchpoint; bool firstonbranch; int row; int col; @@ -59,13 +59,13 @@ public: }; -LogTreeView::LogTreeView(QWidget *parent, const char *name) - : QTable(parent, name) +LogTreeView::LogTreeView(TQWidget *parent, const char *name) + : TQTable(parent, name) { if (!static_initialized) { static_initialized = true; - QFontMetrics fm( fontMetrics() ); + TQFontMetrics fm( fontMetrics() ); static_width = fm.width("1234567890") + 2*BORDER + 2*INSPACE; static_height = 2*fm.height() + 2*BORDER + 3*INSPACE; } @@ -73,14 +73,14 @@ LogTreeView::LogTreeView(QWidget *parent, const char *name) setNumCols(0); setNumRows(0); setReadOnly(true); - setFocusStyle(QTable::FollowStyle); - setSelectionMode(QTable::NoSelection); + setFocusStyle(TQTable::FollowStyle); + setSelectionMode(TQTable::NoSelection); setShowGrid(false); horizontalHeader()->hide(); setTopMargin(0); verticalHeader()->hide(); setLeftMargin(0); - setFrameStyle( QFrame::WinPanel | QFrame::Sunken ); + setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken ); setBackgroundMode(PaletteBase); setFocusPolicy(NoFocus); @@ -92,16 +92,16 @@ LogTreeView::LogTreeView(QWidget *parent, const char *name) Cervisia::ToolTip* toolTip = new Cervisia::ToolTip(viewport()); - connect(toolTip, SIGNAL(queryToolTip(const QPoint&, QRect&, QString&)), - this, SLOT(slotQueryToolTip(const QPoint&, QRect&, QString&))); + connect(toolTip, TQT_SIGNAL(queryToolTip(const TQPoint&, TQRect&, TQString&)), + this, TQT_SLOT(slotQueryToolTip(const TQPoint&, TQRect&, TQString&))); } void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo) { - QString branchpoint, branchrev; + TQString branchpoint, branchrev; - const QString rev(logInfo.m_revision); + const TQString rev(logInfo.m_revision); // find branch int pos1, pos2; @@ -133,7 +133,7 @@ void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo) // look whether we have revisions on this branch // shift them up int row=-1, col=-1; - QPtrListIterator<LogTreeItem> it(items); + TQPtrListIterator<LogTreeItem> it(items); for (; it.current(); ++it) { if (branchrev == (it.current()->m_logInfo.m_revision).left(branchrev.length())) @@ -145,7 +145,7 @@ void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo) // Are we at the top of the widget? if (row == 0) { - QPtrListIterator<LogTreeItem> it2(items); + TQPtrListIterator<LogTreeItem> it2(items); for (; it2.current(); ++it2) it2.current()->row++; setNumRows(numRows()+1); @@ -158,13 +158,13 @@ void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo) { // Ok, so we must open a new branch // Let's find the branch point - QPtrListIterator<LogTreeItem> it3(items); + TQPtrListIterator<LogTreeItem> it3(items); for (it3.toLast(); it3.current(); --it3) { if (branchpoint == it3.current()->m_logInfo.m_revision) { // Move existing branches to the right - QPtrListIterator<LogTreeItem> it4(items); + TQPtrListIterator<LogTreeItem> it4(items); for (; it4.current(); ++it4) if (it4.current()->col > it3.current()->col) { @@ -175,7 +175,7 @@ void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo) col = it3.current()->col+1; if (row == -1) { - QPtrListIterator<LogTreeItem> it5(items); + TQPtrListIterator<LogTreeItem> it5(items); for (; it5.current(); ++it5) it5.current()->row++; setNumRows(numRows()+1); @@ -198,7 +198,7 @@ void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo) #if 0 cout << "Dump: " << endl; cout << "Rows: " << numRows() << "Cols: " << numCols() << endl; - QPtrListIterator<LogTreeItem> it5(items); + TQPtrListIterator<LogTreeItem> it5(items); for (; it5.current(); ++it5) { cout << "Rev: "<< it5.current()->rev << endl; @@ -213,12 +213,12 @@ void LogTreeView::addRevision(const Cervisia::LogInfo& logInfo) void LogTreeView::collectConnections() { - QPtrListIterator<LogTreeItem> it(items); + TQPtrListIterator<LogTreeItem> it(items); for (; it.current(); ++it) { - QString rev = it.current()->m_logInfo.m_revision; + TQString rev = it.current()->m_logInfo.m_revision; - QPtrListIterator<LogTreeItem> it2(items); + TQPtrListIterator<LogTreeItem> it2(items); for (it2=it,++it2; it2.current(); ++it2) if (it2.current()->branchpoint == rev && it2.current()->firstonbranch) @@ -232,9 +232,9 @@ void LogTreeView::collectConnections() } -void LogTreeView::setSelectedPair(QString selectionA, QString selectionB) +void LogTreeView::setSelectedPair(TQString selectionA, TQString selectionB) { - QPtrListIterator<LogTreeItem> it(items); + TQPtrListIterator<LogTreeItem> it(items); for(; it.current(); ++it) { bool oldstate = it.current()->selected; @@ -249,17 +249,17 @@ void LogTreeView::setSelectedPair(QString selectionA, QString selectionB) } -QSize LogTreeView::sizeHint() const +TQSize LogTreeView::sizeHint() const { - return QSize(2 * static_width, 3 * static_height); + return TQSize(2 * static_width, 3 * static_height); } -QString LogTreeView::text(int row, int col) const +TQString LogTreeView::text(int row, int col) const { LogTreeItem* item = 0; - QPtrListIterator<LogTreeItem> it(items); + TQPtrListIterator<LogTreeItem> it(items); for( ; it.current(); ++it ) { if( it.current()->col == col && it.current()->row == row ) @@ -269,7 +269,7 @@ QString LogTreeView::text(int row, int col) const } } - QString text; + TQString text; if( item && !item->m_logInfo.m_author.isNull() ) text = item->m_logInfo.createToolTipText(); @@ -278,8 +278,8 @@ QString LogTreeView::text(int row, int col) const } -void LogTreeView::paintCell(QPainter *p, int row, int col, const QRect& cr, - bool selected, const QColorGroup& cg) +void LogTreeView::paintCell(TQPainter *p, int row, int col, const TQRect& cr, + bool selected, const TQColorGroup& cg) { Q_UNUSED(selected) Q_UNUSED(cr) @@ -290,7 +290,7 @@ void LogTreeView::paintCell(QPainter *p, int row, int col, const QRect& cr, followed = false; item = 0; - QPtrListIterator<LogTreeItem> it(items); + TQPtrListIterator<LogTreeItem> it(items); for(; it.current(); ++it) { int itcol = it.current()->col; @@ -300,7 +300,7 @@ void LogTreeView::paintCell(QPainter *p, int row, int col, const QRect& cr, if (itrow == row && itcol == col) item = it.current(); } - QPtrListIterator<LogTreeConnection> it2(connections); + TQPtrListIterator<LogTreeConnection> it2(connections); for (; it2.current(); ++it2) { int itcol1 = it2.current()->start->col; @@ -321,7 +321,7 @@ void LogTreeView::paintCell(QPainter *p, int row, int col, const QRect& cr, } -void LogTreeView::paintConnector(QPainter *p, +void LogTreeView::paintConnector(TQPainter *p, int row, int col, bool followed, bool branched) { const int midx = columnWidth(col) / 2; @@ -333,17 +333,17 @@ void LogTreeView::paintConnector(QPainter *p, } -QSize LogTreeView::computeSize(const Cervisia::LogInfo& logInfo, +TQSize LogTreeView::computeSize(const Cervisia::LogInfo& logInfo, int* authorHeight, int* tagsHeight) const { - const QFontMetrics fm(fontMetrics()); + const TQFontMetrics fm(fontMetrics()); - const QString tags(logInfo.tagsToString(Cervisia::TagInfo::Branch | Cervisia::TagInfo::Tag, + const TQString tags(logInfo.tagsToString(Cervisia::TagInfo::Branch | Cervisia::TagInfo::Tag, Cervisia::TagInfo::Branch)); - const QSize r1 = fm.size(AlignCenter, logInfo.m_revision); - const QSize r3 = fm.size(AlignCenter, logInfo.m_author); + const TQSize r1 = fm.size(AlignCenter, logInfo.m_revision); + const TQSize r3 = fm.size(AlignCenter, logInfo.m_author); if (authorHeight) *authorHeight = r3.height(); @@ -353,7 +353,7 @@ QSize LogTreeView::computeSize(const Cervisia::LogInfo& logInfo, if (!tags.isEmpty()) { - const QSize r2 = fm.size(AlignCenter, tags); + const TQSize r2 = fm.size(AlignCenter, tags); infoWidth = kMax(infoWidth, r2.width()); infoHeight += r2.height() + INSPACE; if (tagsHeight) @@ -366,24 +366,24 @@ QSize LogTreeView::computeSize(const Cervisia::LogInfo& logInfo, } infoWidth += 2 * INSPACE; - return QSize(infoWidth, infoHeight); + return TQSize(infoWidth, infoHeight); } -void LogTreeView::paintRevisionCell(QPainter *p, +void LogTreeView::paintRevisionCell(TQPainter *p, int row, int col, const Cervisia::LogInfo& logInfo, bool followed, bool branched, bool selected) { int authorHeight; int tagsHeight; - const QSize infoSize(computeSize(logInfo, &authorHeight, &tagsHeight)); - const QSize cellSize(columnWidth(col), rowHeight(row)); + const TQSize infoSize(computeSize(logInfo, &authorHeight, &tagsHeight)); + const TQSize cellSize(columnWidth(col), rowHeight(row)); const int midx(cellSize.width() / 2); const int midy(cellSize.height() / 2); - QRect rect(QPoint((cellSize.width() - infoSize.width()) / 2, + TQRect rect(TQPoint((cellSize.width() - infoSize.width()) / 2, (cellSize.height() - infoSize.height()) / 2), infoSize); @@ -412,12 +412,12 @@ void LogTreeView::paintRevisionCell(QPainter *p, p->drawText(rect, AlignHCenter, logInfo.m_author); rect.setY(rect.y() + authorHeight + INSPACE); - const QString tags(logInfo.tagsToString(Cervisia::TagInfo::Branch | Cervisia::TagInfo::Tag, + const TQString tags(logInfo.tagsToString(Cervisia::TagInfo::Branch | Cervisia::TagInfo::Tag, Cervisia::TagInfo::Branch)); if (!tags.isEmpty()) { - const QFont font(p->font()); - QFont underline(font); + const TQFont font(p->font()); + TQFont underline(font); underline.setUnderline(true); p->setFont(underline); @@ -431,7 +431,7 @@ void LogTreeView::paintRevisionCell(QPainter *p, } -void LogTreeView::contentsMousePressEvent(QMouseEvent *e) +void LogTreeView::contentsMousePressEvent(TQMouseEvent *e) { if ( e->button() == MidButton || e->button() == LeftButton) @@ -439,7 +439,7 @@ void LogTreeView::contentsMousePressEvent(QMouseEvent *e) int row = rowAt( e->pos().y() ); int col = columnAt( e->pos().x() ); - QPtrListIterator<LogTreeItem> it(items); + TQPtrListIterator<LogTreeItem> it(items); for(; it.current(); ++it) if (it.current()->row == row && it.current()->col == col) @@ -462,11 +462,11 @@ void LogTreeView::contentsMousePressEvent(QMouseEvent *e) void LogTreeView::recomputeCellSizes () { // Compute maximum for each column and row - for (QPtrListIterator<LogTreeItem> it(items); it.current(); ++it) + for (TQPtrListIterator<LogTreeItem> it(items); it.current(); ++it) { const LogTreeItem *item = it.current(); - const QSize cellSize(computeSize(item->m_logInfo) + QSize(2 * BORDER, 2 * BORDER)); + const TQSize cellSize(computeSize(item->m_logInfo) + TQSize(2 * BORDER, 2 * BORDER)); setColumnWidth(item->col, kMax(columnWidth(item->col), cellSize.width())); setRowHeight(item->row, kMax(rowHeight(item->row), cellSize.height())); @@ -476,11 +476,11 @@ void LogTreeView::recomputeCellSizes () } -void LogTreeView::slotQueryToolTip(const QPoint& viewportPos, - QRect& viewportRect, - QString& tipText) +void LogTreeView::slotQueryToolTip(const TQPoint& viewportPos, + TQRect& viewportRect, + TQString& tipText) { - const QPoint contentsPos(viewportToContents(viewportPos)); + const TQPoint contentsPos(viewportToContents(viewportPos)); const int column(columnAt(contentsPos.x())); const int row(rowAt(contentsPos.y())); diff --git a/cervisia/logtree.h b/cervisia/logtree.h index 9ab505bc..360a1a99 100644 --- a/cervisia/logtree.h +++ b/cervisia/logtree.h @@ -23,9 +23,9 @@ #define LOGTREE_H -#include <qptrlist.h> +#include <tqptrlist.h> -#include <qtable.h> +#include <tqtable.h> class LogTreeItem; @@ -37,8 +37,8 @@ struct LogInfo; } -typedef QPtrList<LogTreeItem> LogTreeItemList; -typedef QPtrList<LogTreeConnection> LogTreeConnectionList; +typedef TQPtrList<LogTreeItem> LogTreeItemList; +typedef TQPtrList<LogTreeConnection> LogTreeConnectionList; class LogTreeView : public QTable @@ -46,34 +46,34 @@ class LogTreeView : public QTable Q_OBJECT public: - explicit LogTreeView( QWidget *parent=0, const char *name=0 ); + explicit LogTreeView( TQWidget *parent=0, const char *name=0 ); void addRevision(const Cervisia::LogInfo& logInfo); - void setSelectedPair(QString selectionA, QString selectionB); + void setSelectedPair(TQString selectionA, TQString selectionB); void collectConnections(); void recomputeCellSizes(); - virtual void paintCell(QPainter *p, int row, int col, const QRect& cr, - bool selected, const QColorGroup& cg); + virtual void paintCell(TQPainter *p, int row, int col, const TQRect& cr, + bool selected, const TQColorGroup& cg); - virtual QSize sizeHint() const; + virtual TQSize sizeHint() const; - virtual QString text(int row, int col) const; + virtual TQString text(int row, int col) const; signals: - void revisionClicked(QString rev, bool rmb); + void revisionClicked(TQString rev, bool rmb); protected: - virtual void contentsMousePressEvent(QMouseEvent *e); + virtual void contentsMousePressEvent(TQMouseEvent *e); private slots: - void slotQueryToolTip(const QPoint&, QRect&, QString&); + void slotQueryToolTip(const TQPoint&, TQRect&, TQString&); private: - QSize computeSize(const Cervisia::LogInfo&, int* = 0, int* = 0) const; - void paintRevisionCell(QPainter *p, int row, int col, const Cervisia::LogInfo& logInfo, + TQSize computeSize(const Cervisia::LogInfo&, int* = 0, int* = 0) const; + void paintRevisionCell(TQPainter *p, int row, int col, const Cervisia::LogInfo& logInfo, bool followed, bool branched, bool selected); - void paintConnector(QPainter *p, int row, int col, bool followed, bool branched); + void paintConnector(TQPainter *p, int row, int col, bool followed, bool branched); LogTreeItemList items; LogTreeConnectionList connections; diff --git a/cervisia/main.cpp b/cervisia/main.cpp index e8e6a505..9d6e181d 100644 --- a/cervisia/main.cpp +++ b/cervisia/main.cpp @@ -20,7 +20,7 @@ #include <iostream> -#include <qfileinfo.h> +#include <tqfileinfo.h> #include <kaboutdata.h> #include <kapplication.h> #include <kcmdlineargs.h> @@ -38,12 +38,12 @@ #include "version.h" -static CvsService_stub* StartDCOPService(const QString& directory) +static CvsService_stub* StartDCOPService(const TQString& directory) { // start the cvs DCOP service - QString error; - QCString appId; - if( KApplication::startServiceByDesktopName("cvsservice", QStringList(), + TQString error; + TQCString appId; + if( KApplication::startServiceByDesktopName("cvsservice", TQStringList(), &error, &appId) ) { std::cerr << "Starting cvsservice failed with message: " @@ -53,14 +53,14 @@ static CvsService_stub* StartDCOPService(const QString& directory) DCOPRef repository(appId, "CvsRepository"); - repository.call("setWorkingCopy(QString)", directory); + repository.call("setWorkingCopy(TQString)", directory); // create a reference to the service return new CvsService_stub(appId, "CvsService"); } -static int ShowResolveDialog(const QString& fileName) +static int ShowResolveDialog(const TQString& fileName) { KConfig* config = new KConfig("cervisiapartrc"); @@ -79,15 +79,15 @@ static int ShowResolveDialog(const QString& fileName) } -static int ShowLogDialog(const QString& fileName) +static int ShowLogDialog(const TQString& fileName) { KConfig* config = new KConfig("cervisiapartrc"); LogDialog* dlg = new LogDialog(*config); kapp->setMainWidget(dlg); // get directory for file - const QFileInfo fi(fileName); - QString directory = fi.dirPath(true); + const TQFileInfo fi(fileName); + TQString directory = fi.dirPath(true); // start the cvs DCOP service CvsService_stub* cvsService = StartDCOPService(directory); @@ -109,15 +109,15 @@ static int ShowLogDialog(const QString& fileName) } -static int ShowAnnotateDialog(const QString& fileName) +static int ShowAnnotateDialog(const TQString& fileName) { KConfig* config = new KConfig("cervisiapartrc"); AnnotateDialog* dlg = new AnnotateDialog(*config); kapp->setMainWidget(dlg); // get directory for file - const QFileInfo fi(fileName); - QString directory = fi.dirPath(true); + const TQFileInfo fi(fileName); + TQString directory = fi.dirPath(true); // start the cvs DCOP service CvsService_stub* cvsService = StartDCOPService(directory); @@ -169,17 +169,17 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) KApplication app; - QString resolvefile = KCmdLineArgs::parsedArgs()->getOption("resolve"); + TQString resolvefile = KCmdLineArgs::parsedArgs()->getOption("resolve"); if (!resolvefile.isEmpty()) return ShowResolveDialog(resolvefile); // is command line option 'show log dialog' specified? - QString logFile = KCmdLineArgs::parsedArgs()->getOption("log"); + TQString logFile = KCmdLineArgs::parsedArgs()->getOption("log"); if( !logFile.isEmpty() ) return ShowLogDialog(logFile); // is command line option 'show annotation dialog' specified? - QString annotateFile = KCmdLineArgs::parsedArgs()->getOption("annotate"); + TQString annotateFile = KCmdLineArgs::parsedArgs()->getOption("annotate"); if( !annotateFile.isEmpty() ) return ShowAnnotateDialog(annotateFile); diff --git a/cervisia/mergedlg.cpp b/cervisia/mergedlg.cpp index 92d337d5..e2b770c6 100644 --- a/cervisia/mergedlg.cpp +++ b/cervisia/mergedlg.cpp @@ -20,13 +20,13 @@ #include "mergedlg.h" -#include <qbuttongroup.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qstyle.h> +#include <tqbuttongroup.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqstyle.h> #include <klocale.h> #include "misc.h" @@ -34,50 +34,50 @@ MergeDialog::MergeDialog(CvsService_stub* service, - QWidget *parent, const char *name) + TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("CVS Merge"), Ok | Cancel, Ok, true), cvsService(service) { int const iComboBoxMinWidth(30 * fontMetrics().width('0')); - int const iWidgetIndent(style().pixelMetric(QStyle::PM_ExclusiveIndicatorWidth, 0) + 6); + int const iWidgetIndent(style().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0) + 6); - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - bybranch_button = new QRadioButton(i18n("Merge from &branch:"), mainWidget); + bybranch_button = new TQRadioButton(i18n("Merge from &branch:"), mainWidget); bybranch_button->setChecked(true); layout->addWidget(bybranch_button); - branch_combo = new QComboBox(true, mainWidget); + branch_combo = new TQComboBox(true, mainWidget); branch_combo->setMinimumWidth(iComboBoxMinWidth); - branch_button = new QPushButton(i18n("Fetch &List"), mainWidget); - connect( branch_button, SIGNAL(clicked()), - this, SLOT(branchButtonClicked()) ); + branch_button = new TQPushButton(i18n("Fetch &List"), mainWidget); + connect( branch_button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(branchButtonClicked()) ); - QBoxLayout *branchedit_layout = new QHBoxLayout(layout); + TQBoxLayout *branchedit_layout = new TQHBoxLayout(layout); branchedit_layout->addSpacing(iWidgetIndent); branchedit_layout->addWidget(branch_combo, 2); branchedit_layout->addWidget(branch_button, 0); - bytags_button = new QRadioButton(i18n("Merge &modifications:"), mainWidget); + bytags_button = new TQRadioButton(i18n("Merge &modifications:"), mainWidget); layout->addWidget(bytags_button); - QLabel *tag1_label = new QLabel(i18n("between tag: "), mainWidget); - tag1_combo = new QComboBox(true, mainWidget); + TQLabel *tag1_label = new TQLabel(i18n("between tag: "), mainWidget); + tag1_combo = new TQComboBox(true, mainWidget); tag1_combo->setMinimumWidth(iComboBoxMinWidth); - QLabel *tag2_label = new QLabel(i18n("and tag: "), mainWidget); - tag2_combo = new QComboBox(true, mainWidget); + TQLabel *tag2_label = new TQLabel(i18n("and tag: "), mainWidget); + tag2_combo = new TQComboBox(true, mainWidget); tag2_combo->setMinimumWidth(iComboBoxMinWidth); - tag_button = new QPushButton(i18n("Fetch L&ist"), mainWidget); - connect( tag_button, SIGNAL(clicked()), - this, SLOT(tagButtonClicked()) ); + tag_button = new TQPushButton(i18n("Fetch L&ist"), mainWidget); + connect( tag_button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(tagButtonClicked()) ); - QGridLayout *tagsedit_layout = new QGridLayout(layout); + TQGridLayout *tagsedit_layout = new TQGridLayout(layout); tagsedit_layout->addColSpacing(0, iWidgetIndent); tagsedit_layout->setColStretch(0, 0); tagsedit_layout->setColStretch(1, 1); @@ -89,12 +89,12 @@ MergeDialog::MergeDialog(CvsService_stub* service, tagsedit_layout->addWidget(tag2_combo, 1, 2); tagsedit_layout->addMultiCellWidget(tag_button, 0, 1, 3, 3); - QButtonGroup* group = new QButtonGroup(mainWidget); + TQButtonGroup* group = new TQButtonGroup(mainWidget); group->hide(); group->insert(bybranch_button); group->insert(bytags_button); - connect( group, SIGNAL(clicked(int)), - this, SLOT(toggled()) ); + connect( group, TQT_SIGNAL(clicked(int)), + this, TQT_SLOT(toggled()) ); // dis-/enable the widgets toggled(); @@ -107,19 +107,19 @@ bool MergeDialog::byBranch() const } -QString MergeDialog::branch() const +TQString MergeDialog::branch() const { return branch_combo->currentText(); } -QString MergeDialog::tag1() const +TQString MergeDialog::tag1() const { return tag1_combo->currentText(); } -QString MergeDialog::tag2() const +TQString MergeDialog::tag2() const { return tag2_combo->currentText(); } @@ -127,7 +127,7 @@ QString MergeDialog::tag2() const void MergeDialog::tagButtonClicked() { - QStringList const listTags(::fetchTags(cvsService, this)); + TQStringList const listTags(::fetchTags(cvsService, this)); tag1_combo->clear(); tag1_combo->insertStringList(listTags); tag2_combo->clear(); diff --git a/cervisia/mergedlg.h b/cervisia/mergedlg.h index bd4464c1..63454dc6 100644 --- a/cervisia/mergedlg.h +++ b/cervisia/mergedlg.h @@ -37,12 +37,12 @@ class MergeDialog : public KDialogBase public: MergeDialog( CvsService_stub* service, - QWidget *parent=0, const char *name=0 ); + TQWidget *parent=0, const char *name=0 ); bool byBranch() const; - QString branch() const; - QString tag1() const; - QString tag2() const; + TQString branch() const; + TQString tag1() const; + TQString tag2() const; private slots: void toggled(); @@ -52,9 +52,9 @@ private slots: private: CvsService_stub* cvsService; - QRadioButton *bybranch_button, *bytags_button; - QComboBox *branch_combo, *tag1_combo, *tag2_combo; - QPushButton *tag_button, *branch_button; + TQRadioButton *bybranch_button, *bytags_button; + TQComboBox *branch_combo, *tag1_combo, *tag2_combo; + TQPushButton *tag_button, *branch_button; }; #endif diff --git a/cervisia/misc.cpp b/cervisia/misc.cpp index e1cfe208..fbff3398 100644 --- a/cervisia/misc.cpp +++ b/cervisia/misc.cpp @@ -25,10 +25,10 @@ #include <pwd.h> #include <sys/types.h> #include <unistd.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qregexp.h> -#include <qstringlist.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqregexp.h> +#include <tqstringlist.h> #include <kconfig.h> #include <kemailsettings.h> #include <klocale.h> @@ -43,14 +43,14 @@ // These regular expression parts aren't useful to check the validity of the // CVSROOT specification. They are just used to extract the different parts of it. -static const QString userNameRegExp("([a-z0-9_][a-z0-9_-.]*)?"); -static const QString passwordRegExp("(:[^@]+)?"); -static const QString hostNameRegExp("([^:/@]+)"); -static const QString portRegExp("(:(\\d*))?"); -static const QString pathRegExp("(/.*)"); +static const TQString userNameRegExp("([a-z0-9_][a-z0-9_-.]*)?"); +static const TQString passwordRegExp("(:[^@]+)?"); +static const TQString hostNameRegExp("([^:/@]+)"); +static const TQString portRegExp("(:(\\d*))?"); +static const TQString pathRegExp("(/.*)"); -static int FindWhiteSpace(const QString& str, int index) +static int FindWhiteSpace(const TQString& str, int index) { const int length = str.length(); @@ -60,10 +60,10 @@ static int FindWhiteSpace(const QString& str, int index) if( index < 0 || index >= length ) return -1; - const QChar* const startPos = str.unicode(); - const QChar* const endPos = startPos + length; + const TQChar* const startPos = str.unicode(); + const TQChar* const endPos = startPos + length; - const QChar* pos = startPos + index; + const TQChar* pos = startPos + index; while( pos < endPos && !pos->isSpace() ) ++pos; @@ -72,21 +72,21 @@ static int FindWhiteSpace(const QString& str, int index) } -static const QStringList FetchBranchesAndTags(const QString& searchedType, +static const TQStringList FetchBranchesAndTags(const TQString& searchedType, CvsService_stub* cvsService, - QWidget* parent) + TQWidget* parent) { - QStringList branchOrTagList; + TQStringList branchOrTagList; - DCOPRef job = cvsService->status(QStringList(), true, true); + DCOPRef job = cvsService->status(TQStringList(), true, true); if( !cvsService->ok() ) return branchOrTagList; - ProgressDialog dlg(parent, "Status", job, QString::null, i18n("CVS Status")); + ProgressDialog dlg(parent, "Status", job, TQString::null, i18n("CVS Status")); if( dlg.execute() ) { - QString line; + TQString line; while( dlg.getLine(line) ) { int wsPos, bracketPos, colonPos; @@ -100,8 +100,8 @@ static const QStringList FetchBranchesAndTags(const QString& searchedType, if( (colonPos = line.find(':', bracketPos + 1)) < 0 ) continue; - const QString tag = line.mid(1, wsPos - 1); - const QString type = line.mid(bracketPos + 1, colonPos - bracketPos - 1); + const TQString tag = line.mid(1, wsPos - 1); + const TQString type = line.mid(bracketPos + 1, colonPos - bracketPos - 1); if( type == searchedType && !branchOrTagList.contains(tag) ) branchOrTagList.push_back(tag); } @@ -113,9 +113,9 @@ static const QStringList FetchBranchesAndTags(const QString& searchedType, } -bool Cervisia::IsValidTag(const QString& tag) +bool Cervisia::IsValidTag(const TQString& tag) { - static const QString prohibitedChars("$,.:;@"); + static const TQString prohibitedChars("$,.:;@"); if( !isalpha(tag[0].latin1()) ) return false; @@ -130,19 +130,19 @@ bool Cervisia::IsValidTag(const QString& tag) } -QString Cervisia::UserName() +TQString Cervisia::UserName() { // 1. Try to retrieve the information from the control center settings KEMailSettings settings; - QString name = settings.getSetting(KEMailSettings::RealName); - QString email = settings.getSetting(KEMailSettings::EmailAddress); + TQString name = settings.getSetting(KEMailSettings::RealName); + TQString email = settings.getSetting(KEMailSettings::EmailAddress); if( name.isEmpty() || email.isEmpty() ) { // 2. Try to retrieve the information from the system struct passwd* pw = getpwuid(getuid()); if( !pw ) - return QString::null; + return TQString::null; char hostname[512]; hostname[0] = '\0'; @@ -150,12 +150,12 @@ QString Cervisia::UserName() if( !gethostname(hostname, sizeof(hostname)) ) hostname[sizeof(hostname)-1] = '0'; - name = QString::fromLocal8Bit(pw->pw_gecos); - email = QString::fromLocal8Bit(pw->pw_name) + "@" + - QString::fromLocal8Bit(hostname); + name = TQString::fromLocal8Bit(pw->pw_gecos); + email = TQString::fromLocal8Bit(pw->pw_name) + "@" + + TQString::fromLocal8Bit(hostname); } - QString result = name; + TQString result = name; result += " <"; result += email; result += ">"; @@ -164,17 +164,17 @@ QString Cervisia::UserName() } -QString Cervisia::NormalizeRepository(const QString& repository) +TQString Cervisia::NormalizeRepository(const TQString& repository) { // only :pserver: repositories if( !repository.startsWith(":pserver:") ) return repository; - QRegExp rx(":pserver:(" + userNameRegExp + passwordRegExp + "@)?" + + TQRegExp rx(":pserver:(" + userNameRegExp + passwordRegExp + "@)?" + hostNameRegExp + portRegExp + pathRegExp); // extract username, hostname, port and path from CVSROOT - QString userName, hostName, port, path; + TQString userName, hostName, port, path; if( rx.search(repository) != -1 ) { userName = rx.cap(2); @@ -193,7 +193,7 @@ QString Cervisia::NormalizeRepository(const QString& repository) if( userName.isEmpty() ) userName = KUser().loginName(); - QString canonicalForm = ":pserver:" + userName + "@" + hostName + + TQString canonicalForm = ":pserver:" + userName + "@" + hostName + ":" + port + path; kdDebug() << "NormalizeRepository(): canonicalForm=" << canonicalForm @@ -205,11 +205,11 @@ QString Cervisia::NormalizeRepository(const QString& repository) } -bool Cervisia::CheckOverwrite(const QString& fileName, QWidget* parent) +bool Cervisia::CheckOverwrite(const TQString& fileName, TQWidget* parent) { bool result = true; - QFileInfo fi(fileName); + TQFileInfo fi(fileName); // does the file already exist? if( fi.exists() ) @@ -224,10 +224,10 @@ bool Cervisia::CheckOverwrite(const QString& fileName, QWidget* parent) } -QString joinLine(const QStringList &list) +TQString joinLine(const TQStringList &list) { - QString line; - for ( QStringList::ConstIterator it = list.begin(); + TQString line; + for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { line += KShellProcess::quote(*it); @@ -241,11 +241,11 @@ QString joinLine(const QStringList &list) } -// Should be replaceable by QStringList::split -QStringList splitLine(QString line, char delim) +// Should be replaceable by TQStringList::split +TQStringList splitLine(TQString line, char delim) { int pos; - QStringList list; + TQStringList list; line = line.simplifyWhiteSpace(); while ((pos = line.find(delim)) != -1) @@ -259,46 +259,46 @@ QStringList splitLine(QString line, char delim) } -const QStringList fetchBranches(CvsService_stub* cvsService, QWidget* parent) +const TQStringList fetchBranches(CvsService_stub* cvsService, TQWidget* parent) { - return FetchBranchesAndTags(QString::fromLatin1("branch"), cvsService, + return FetchBranchesAndTags(TQString::fromLatin1("branch"), cvsService, parent); } -const QStringList fetchTags(CvsService_stub* cvsService, QWidget* parent) +const TQStringList fetchTags(CvsService_stub* cvsService, TQWidget* parent) { - return FetchBranchesAndTags(QString::fromLatin1("revision"), cvsService, + return FetchBranchesAndTags(TQString::fromLatin1("revision"), cvsService, parent); } -static QStringList *tempFiles = 0; +static TQStringList *tempFiles = 0; void cleanupTempFiles() { if (tempFiles) { - QStringList::Iterator it; + TQStringList::Iterator it; for (it = tempFiles->begin(); it != tempFiles->end(); ++it) - QFile::remove(*it); + TQFile::remove(*it); delete tempFiles; } } -QString tempFileName(const QString& suffix) +TQString tempFileName(const TQString& suffix) { if (!tempFiles) tempFiles = new QStringList; - KTempFile f(QString::null, suffix); + KTempFile f(TQString::null, suffix); tempFiles->append(f.name()); return f.name(); } -int compareRevisions(const QString& rev1, const QString& rev2) +int compareRevisions(const TQString& rev1, const TQString& rev2) { const int length1(rev1.length()); const int length2(rev2.length()); diff --git a/cervisia/misc.h b/cervisia/misc.h index b0d912e5..40dca86b 100644 --- a/cervisia/misc.h +++ b/cervisia/misc.h @@ -36,40 +36,40 @@ namespace Cervisia /** * Verifies that the passed tag name is a valid cvs tag. */ -bool IsValidTag(const QString& tag); +bool IsValidTag(const TQString& tag); /** * Returns the user name (real name + mail address) for the changelog entry. */ -QString UserName(); +TQString UserName(); /** * This method makes sure that the cvsroot specification for a pserver repository has * always the form: * :pserver:[user]@[host]:[port][path] */ -QString NormalizeRepository(const QString& repository); +TQString NormalizeRepository(const TQString& repository); -bool CheckOverwrite(const QString& fileName, QWidget* parent=0); +bool CheckOverwrite(const TQString& fileName, TQWidget* parent=0); } -QString joinLine(const QStringList &list); -QStringList splitLine(QString, char delim=' '); +TQString joinLine(const TQStringList &list); +TQStringList splitLine(TQString, char delim=' '); -QString tempFileName(const QString& suffix); +TQString tempFileName(const TQString& suffix); void cleanupTempFiles(); -const QStringList fetchBranches(CvsService_stub* cvsService, QWidget* parent); -const QStringList fetchTags(CvsService_stub* cvsService, QWidget* parent); +const TQStringList fetchBranches(CvsService_stub* cvsService, TQWidget* parent); +const TQStringList fetchTags(CvsService_stub* cvsService, TQWidget* parent); /** * Compares two revision numbers. * * @return -1 / 0 / 1 if rev1 is < / == / > rev2 */ -int compareRevisions(const QString& rev1, const QString& rev2); +int compareRevisions(const TQString& rev1, const TQString& rev2); /** diff --git a/cervisia/patchoptiondlg.cpp b/cervisia/patchoptiondlg.cpp index 9e6f92d1..b764c57c 100644 --- a/cervisia/patchoptiondlg.cpp +++ b/cervisia/patchoptiondlg.cpp @@ -19,52 +19,52 @@ #include "patchoptiondlg.h" using Cervisia::PatchOptionDialog; -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qradiobutton.h> -#include <qvbuttongroup.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqvbuttongroup.h> #include <knuminput.h> #include <klocale.h> -PatchOptionDialog::PatchOptionDialog(QWidget* parent, const char* name) - : KDialogBase(parent, name, true/*modal*/, QString::null, +PatchOptionDialog::PatchOptionDialog(TQWidget* parent, const char* name) + : KDialogBase(parent, name, true/*modal*/, TQString::null, Ok | Cancel | Help, Ok, true/*separator*/) { - QFrame* mainWidget = makeMainWidget(); - QBoxLayout* topLayout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQFrame* mainWidget = makeMainWidget(); + TQBoxLayout* topLayout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - m_formatBtnGroup = new QVButtonGroup(i18n("Output Format"), mainWidget, ""); + m_formatBtnGroup = new TQVButtonGroup(i18n("Output Format"), mainWidget, ""); topLayout->addWidget(m_formatBtnGroup); - connect(m_formatBtnGroup, SIGNAL(clicked(int)), - this, SLOT(formatChanged(int))); + connect(m_formatBtnGroup, TQT_SIGNAL(clicked(int)), + this, TQT_SLOT(formatChanged(int))); - new QRadioButton(i18n( "Context" ), m_formatBtnGroup); - new QRadioButton(i18n( "Normal" ), m_formatBtnGroup); - QRadioButton* unifiedFormatBtn = new QRadioButton(i18n( "Unified" ), m_formatBtnGroup); + new TQRadioButton(i18n( "Context" ), m_formatBtnGroup); + new TQRadioButton(i18n( "Normal" ), m_formatBtnGroup); + TQRadioButton* unifiedFormatBtn = new TQRadioButton(i18n( "Unified" ), m_formatBtnGroup); unifiedFormatBtn->setChecked(true); - QLabel* contextLinesLbl = new QLabel(i18n("&Number of context lines:"), + TQLabel* contextLinesLbl = new TQLabel(i18n("&Number of context lines:"), mainWidget); m_contextLines = new KIntNumInput(3, mainWidget); m_contextLines->setRange(2, 65535, 1, false); contextLinesLbl->setBuddy(m_contextLines); - QBoxLayout* contextLinesLayout = new QHBoxLayout(topLayout); + TQBoxLayout* contextLinesLayout = new TQHBoxLayout(topLayout); contextLinesLayout->addWidget(contextLinesLbl); contextLinesLayout->addWidget(m_contextLines); - QVButtonGroup* ignoreBtnGroup = new QVButtonGroup(i18n("Ignore Options"), mainWidget); + TQVButtonGroup* ignoreBtnGroup = new TQVButtonGroup(i18n("Ignore Options"), mainWidget); topLayout->addWidget(ignoreBtnGroup); - m_blankLineChk = new QCheckBox(i18n("Ignore added or removed empty lines"), + m_blankLineChk = new TQCheckBox(i18n("Ignore added or removed empty lines"), ignoreBtnGroup); - m_spaceChangeChk = new QCheckBox(i18n("Ignore changes in the amount of whitespace"), + m_spaceChangeChk = new TQCheckBox(i18n("Ignore changes in the amount of whitespace"), ignoreBtnGroup); - m_allSpaceChk = new QCheckBox(i18n("Ignore all whitespace"), ignoreBtnGroup); - m_caseChangesChk = new QCheckBox(i18n("Ignore changes in case"), ignoreBtnGroup); + m_allSpaceChk = new TQCheckBox(i18n("Ignore all whitespace"), ignoreBtnGroup); + m_caseChangesChk = new TQCheckBox(i18n("Ignore changes in case"), ignoreBtnGroup); } @@ -73,9 +73,9 @@ PatchOptionDialog::~PatchOptionDialog() } -QString PatchOptionDialog::diffOptions() const +TQString PatchOptionDialog::diffOptions() const { - QString options; + TQString options; if( m_blankLineChk->isChecked() ) options += " -B "; @@ -93,13 +93,13 @@ QString PatchOptionDialog::diffOptions() const } -QString PatchOptionDialog::formatOption() const +TQString PatchOptionDialog::formatOption() const { switch( m_formatBtnGroup->selectedId() ) { - case 0: return "-C " + QString::number(m_contextLines->value()); + case 0: return "-C " + TQString::number(m_contextLines->value()); case 1: return ""; - case 2: return "-U " + QString::number(m_contextLines->value()); + case 2: return "-U " + TQString::number(m_contextLines->value()); } return ""; diff --git a/cervisia/patchoptiondlg.h b/cervisia/patchoptiondlg.h index 64109a2b..148640d2 100644 --- a/cervisia/patchoptiondlg.h +++ b/cervisia/patchoptiondlg.h @@ -36,22 +36,22 @@ class PatchOptionDialog : public KDialogBase Q_OBJECT public: - explicit PatchOptionDialog(QWidget* parent = 0, const char* name = 0); + explicit PatchOptionDialog(TQWidget* parent = 0, const char* name = 0); virtual ~PatchOptionDialog(); - QString diffOptions() const; - QString formatOption() const; + TQString diffOptions() const; + TQString formatOption() const; private slots: void formatChanged(int buttonId); private: - QVButtonGroup* m_formatBtnGroup; + TQVButtonGroup* m_formatBtnGroup; KIntNumInput* m_contextLines; - QCheckBox* m_blankLineChk; - QCheckBox* m_allSpaceChk; - QCheckBox* m_spaceChangeChk; - QCheckBox* m_caseChangesChk; + TQCheckBox* m_blankLineChk; + TQCheckBox* m_allSpaceChk; + TQCheckBox* m_spaceChangeChk; + TQCheckBox* m_caseChangesChk; }; diff --git a/cervisia/progressdlg.cpp b/cervisia/progressdlg.cpp index d72c6565..a7e34018 100644 --- a/cervisia/progressdlg.cpp +++ b/cervisia/progressdlg.cpp @@ -19,12 +19,12 @@ #include "progressdlg.h" -#include <qlabel.h> -#include <qlayout.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qtimer.h> -#include <qvbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqtimer.h> +#include <tqvbox.h> #include <cvsjob_stub.h> #include <dcopref.h> @@ -42,19 +42,19 @@ struct ProgressDialog::Private bool hasError; CvsJob_stub* cvsJob; - QString buffer; - QString errorId1, errorId2; - QStringList output; + TQString buffer; + TQString errorId1, errorId2; + TQStringList output; - QTimer* timer; + TQTimer* timer; KAnimWidget* gear; - QListBox* resultbox; + TQListBox* resultbox; }; -ProgressDialog::ProgressDialog(QWidget* parent, const QString& heading, - const DCOPRef& job, const QString& errorIndicator, - const QString& caption) +ProgressDialog::ProgressDialog(TQWidget* parent, const TQString& heading, + const DCOPRef& job, const TQString& errorIndicator, + const TQString& caption) : KDialogBase(parent, 0, true, caption, Cancel, Cancel, true) , DCOPObject() , d(new Private) @@ -81,27 +81,27 @@ ProgressDialog::~ProgressDialog() } -void ProgressDialog::setupGui(const QString& heading) +void ProgressDialog::setupGui(const TQString& heading) { - QVBox* vbox = makeVBoxMainWidget(); + TQVBox* vbox = makeVBoxMainWidget(); vbox->setSpacing(10); - QWidget* headingBox = new QWidget(vbox); - QHBoxLayout* hboxLayout = new QHBoxLayout(headingBox); + TQWidget* headingBox = new TQWidget(vbox); + TQHBoxLayout* hboxLayout = new TQHBoxLayout(headingBox); - QLabel* textLabel = new QLabel(heading, headingBox); + TQLabel* textLabel = new TQLabel(heading, headingBox); textLabel->setMinimumWidth(textLabel->sizeHint().width()); textLabel->setFixedHeight(textLabel->sizeHint().height()); hboxLayout->addWidget(textLabel); hboxLayout->addStretch(); - d->gear = new KAnimWidget(QString("kde"), 32, headingBox); + d->gear = new KAnimWidget(TQString("kde"), 32, headingBox); d->gear->setFixedSize(32, 32); hboxLayout->addWidget(d->gear); - d->resultbox = new QListBox(vbox); - d->resultbox->setSelectionMode(QListBox::NoSelection); - QFontMetrics fm(d->resultbox->fontMetrics()); + d->resultbox = new TQListBox(vbox); + d->resultbox->setSelectionMode(TQListBox::NoSelection); + TQFontMetrics fm(d->resultbox->fontMetrics()); d->resultbox->setMinimumSize(fm.width("0")*70, fm.lineSpacing()*8); resize(sizeHint()); @@ -111,37 +111,37 @@ void ProgressDialog::setupGui(const QString& heading) bool ProgressDialog::execute() { // get command line and display it - QString cmdLine = d->cvsJob->cvsCommand(); + TQString cmdLine = d->cvsJob->cvsCommand(); d->resultbox->insertItem(cmdLine); // establish connections to the signals of the cvs job connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); - connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStdout(QString)", - "slotReceivedOutputNonGui(QString)", true); - connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStderr(QString)", - "slotReceivedOutputNonGui(QString)", true); + connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStdout(TQString)", + "slotReceivedOutputNonGui(TQString)", true); + connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStderr(TQString)", + "slotReceivedOutputNonGui(TQString)", true); // we wait for 4 seconds (or the timeout set by the user) before we // force the dialog to show up - d->timer = new QTimer(this); - connect(d->timer, SIGNAL(timeout()), this, SLOT(slotTimeoutOccurred())); + d->timer = new TQTimer(this); + connect(d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeoutOccurred())); d->timer->start(CervisiaSettings::timeout(), true); bool started = d->cvsJob->execute(); if( !started ) return false; - QApplication::setOverrideCursor(waitCursor); + TQApplication::setOverrideCursor(waitCursor); kapp->enter_loop(); - if (QApplication::overrideCursor()) - QApplication::restoreOverrideCursor(); + if (TQApplication::overrideCursor()) + TQApplication::restoreOverrideCursor(); return !d->isCancelled; } -bool ProgressDialog::getLine(QString& line) +bool ProgressDialog::getLine(TQString& line) { if( d->output.isEmpty() ) return false; @@ -153,13 +153,13 @@ bool ProgressDialog::getLine(QString& line) } -QStringList ProgressDialog::getOutput() const +TQStringList ProgressDialog::getOutput() const { return d->output; } -void ProgressDialog::slotReceivedOutputNonGui(QString buffer) +void ProgressDialog::slotReceivedOutputNonGui(TQString buffer) { d->buffer += buffer; @@ -172,7 +172,7 @@ void ProgressDialog::slotReceivedOutputNonGui(QString buffer) } -void ProgressDialog::slotReceivedOutput(QString buffer) +void ProgressDialog::slotReceivedOutput(TQString buffer) { d->buffer += buffer; processOutput(); @@ -224,10 +224,10 @@ void ProgressDialog::stopNonGuiPart() { d->timer->stop(); - disconnectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStdout(QString)", - "slotReceivedOutputNonGui(QString)"); - disconnectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStderr(QString)", - "slotReceivedOutputNonGui(QString)"); + disconnectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStdout(TQString)", + "slotReceivedOutputNonGui(TQString)"); + disconnectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStderr(TQString)", + "slotReceivedOutputNonGui(TQString)"); kapp->exit_loop(); } @@ -235,16 +235,16 @@ void ProgressDialog::stopNonGuiPart() void ProgressDialog::startGuiPart() { - connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStdout(QString)", - "slotReceivedOutput(QString)", true); - connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStderr(QString)", - "slotReceivedOutput(QString)", true); + connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStdout(TQString)", + "slotReceivedOutput(TQString)", true); + connectDCOPSignal(d->cvsJob->app(), d->cvsJob->obj(), "receivedStderr(TQString)", + "slotReceivedOutput(TQString)", true); show(); d->isShown = true; d->gear->start(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); kapp->enter_loop(); } @@ -254,7 +254,7 @@ void ProgressDialog::processOutput() int pos; while( (pos = d->buffer.find('\n')) != -1 ) { - QString item = d->buffer.left(pos); + TQString item = d->buffer.left(pos); if( item.startsWith(d->errorId1) || item.startsWith(d->errorId2) || item.startsWith("cvs [server aborted]:") ) diff --git a/cervisia/progressdlg.h b/cervisia/progressdlg.h index 3e9dfed1..9ffa9dbf 100644 --- a/cervisia/progressdlg.h +++ b/cervisia/progressdlg.h @@ -34,17 +34,17 @@ class ProgressDialog : public KDialogBase, public DCOPObject Q_OBJECT public: - ProgressDialog(QWidget* parent, const QString& heading, const DCOPRef& job, - const QString& errorIndicator, const QString& caption = ""); + ProgressDialog(TQWidget* parent, const TQString& heading, const DCOPRef& job, + const TQString& errorIndicator, const TQString& caption = ""); ~ProgressDialog(); bool execute(); - bool getLine(QString& line); - QStringList getOutput() const; + bool getLine(TQString& line); + TQStringList getOutput() const; k_dcop: - void slotReceivedOutputNonGui(QString buffer); - void slotReceivedOutput(QString buffer); + void slotReceivedOutputNonGui(TQString buffer); + void slotReceivedOutput(TQString buffer); void slotJobExited(bool normalExit, int status); protected slots: @@ -54,7 +54,7 @@ private slots: void slotTimeoutOccurred(); private: - void setupGui(const QString& heading); + void setupGui(const TQString& heading); void stopNonGuiPart(); void startGuiPart(); void processOutput(); diff --git a/cervisia/protocolview.cpp b/cervisia/protocolview.cpp index 8496b983..2de8405f 100644 --- a/cervisia/protocolview.cpp +++ b/cervisia/protocolview.cpp @@ -21,8 +21,8 @@ #include "protocolview.h" -#include <qdir.h> -#include <qpopupmenu.h> +#include <tqdir.h> +#include <tqpopupmenu.h> #include <dcopref.h> #include <kconfig.h> #include <klocale.h> @@ -32,8 +32,8 @@ #include "cvsjob_stub.h" -ProtocolView::ProtocolView(const QCString& appId, QWidget *parent, const char *name) - : QTextEdit(parent, name) +ProtocolView::ProtocolView(const TQCString& appId, TQWidget *parent, const char *name) + : TQTextEdit(parent, name) , job(0) , m_isUpdateJob(false) { @@ -47,11 +47,11 @@ ProtocolView::ProtocolView(const QCString& appId, QWidget *parent, const char *n setFont(config->readFontEntry("ProtocolFont")); config->setGroup("Colors"); - QColor defaultColor = QColor(255, 130, 130); + TQColor defaultColor = TQColor(255, 130, 130); conflictColor=config->readColorEntry("Conflict",&defaultColor); - defaultColor=QColor(130, 130, 255); + defaultColor=TQColor(130, 130, 255); localChangeColor=config->readColorEntry("LocalChange",&defaultColor); - defaultColor=QColor(70, 210, 70); + defaultColor=TQColor(70, 210, 70); remoteChangeColor=config->readColorEntry("RemoteChange",&defaultColor); // create a DCOP stub for the non-concurrent cvs job @@ -60,10 +60,10 @@ ProtocolView::ProtocolView(const QCString& appId, QWidget *parent, const char *n // establish connections to the signals of the cvs 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(), "receivedStderr(QString)", - "slotReceivedOutput(QString)", true); + connectDCOPSignal(job->app(), job->obj(), "receivedStdout(TQString)", + "slotReceivedOutput(TQString)", true); + connectDCOPSignal(job->app(), job->obj(), "receivedStderr(TQString)", + "slotReceivedOutput(TQString)", true); } @@ -78,24 +78,24 @@ bool ProtocolView::startJob(bool isUpdateJob) m_isUpdateJob = isUpdateJob; // get command line and add it to output buffer - QString cmdLine = job->cvsCommand(); + TQString cmdLine = job->cvsCommand(); buf += cmdLine; buf += '\n'; processOutput(); // disconnect 3rd party slots from our signals - disconnect( SIGNAL(receivedLine(QString)) ); - disconnect( SIGNAL(jobFinished(bool, int)) ); + disconnect( TQT_SIGNAL(receivedLine(TQString)) ); + disconnect( TQT_SIGNAL(jobFinished(bool, int)) ); return job->execute(); } -QPopupMenu* ProtocolView::createPopupMenu(const QPoint &pos) +TQPopupMenu* ProtocolView::createPopupMenu(const TQPoint &pos) { - QPopupMenu* menu = QTextEdit::createPopupMenu(pos); + TQPopupMenu* menu = TQTextEdit::createPopupMenu(pos); - int id = menu->insertItem(i18n("Clear"), this, SLOT( clear() ), 0, -1, 0); + int id = menu->insertItem(i18n("Clear"), this, TQT_SLOT( clear() ), 0, -1, 0); if( length() == 0 ) menu->setItemEnabled(id, false); @@ -110,7 +110,7 @@ void ProtocolView::cancelJob() } -void ProtocolView::slotReceivedOutput(QString buffer) +void ProtocolView::slotReceivedOutput(TQString buffer) { buf += buffer; processOutput(); @@ -119,7 +119,7 @@ void ProtocolView::slotReceivedOutput(QString buffer) void ProtocolView::slotJobExited(bool normalExit, int exitStatus) { - QString msg; + TQString msg; if( normalExit ) { @@ -144,7 +144,7 @@ void ProtocolView::processOutput() int pos; while ( (pos = buf.find('\n')) != -1) { - QString line = buf.left(pos); + TQString line = buf.left(pos); if (!line.isEmpty()) { appendLine(line); @@ -155,11 +155,11 @@ void ProtocolView::processOutput() } -void ProtocolView::appendLine(const QString &line) +void ProtocolView::appendLine(const TQString &line) { // Escape output line, so that html tags in commit // messages aren't interpreted - const QString escapedLine = QStyleSheet::escape(line); + const TQString escapedLine = TQStyleSheet::escape(line); // When we don't get the output from an update job then // just add it to the text edit. @@ -169,7 +169,7 @@ void ProtocolView::appendLine(const QString &line) return; } - QColor color; + TQColor color; // Colors are the same as in UpdateViewItem::paintCell() if (line.startsWith("C ")) color = conflictColor; @@ -180,7 +180,7 @@ void ProtocolView::appendLine(const QString &line) color = remoteChangeColor; append(color.isValid() - ? QString("<font color=\"%1\"><b>%2</b></font>").arg(color.name()) + ? TQString("<font color=\"%1\"><b>%2</b></font>").arg(color.name()) .arg(escapedLine) : escapedLine); } diff --git a/cervisia/protocolview.h b/cervisia/protocolview.h index 0e0390d2..e3b59f6d 100644 --- a/cervisia/protocolview.h +++ b/cervisia/protocolview.h @@ -22,7 +22,7 @@ #ifndef PROTOCOLVIEW_H #define PROTOCOLVIEW_H -#include <qtextedit.h> +#include <tqtextedit.h> #include <dcopobject.h> class QPoint; @@ -30,26 +30,26 @@ class QPopupMenu; class CvsJob_stub; -class ProtocolView : public QTextEdit, public DCOPObject +class ProtocolView : public TQTextEdit, public DCOPObject { K_DCOP Q_OBJECT public: - explicit ProtocolView(const QCString& appId, QWidget *parent=0, const char *name=0); + explicit ProtocolView(const TQCString& appId, TQWidget *parent=0, const char *name=0); ~ProtocolView(); bool startJob(bool isUpdateJob = false); protected: - virtual QPopupMenu* createPopupMenu(const QPoint &pos); + virtual TQPopupMenu* createPopupMenu(const TQPoint &pos); k_dcop: - void slotReceivedOutput(QString buffer); + void slotReceivedOutput(TQString buffer); void slotJobExited(bool normalExit, int exitStatus); signals: - void receivedLine(QString line); + void receivedLine(TQString line); void jobFinished(bool normalExit, int exitStatus); private slots: @@ -57,13 +57,13 @@ private slots: private: void processOutput(); - void appendLine(const QString &line); + void appendLine(const TQString &line); - QString buf; + TQString buf; - QColor conflictColor; - QColor localChangeColor; - QColor remoteChangeColor; + TQColor conflictColor; + TQColor localChangeColor; + TQColor remoteChangeColor; CvsJob_stub* job; diff --git a/cervisia/qttableview.cpp b/cervisia/qttableview.cpp index 22b2993c..7e877ef8 100644 --- a/cervisia/qttableview.cpp +++ b/cervisia/qttableview.cpp @@ -13,10 +13,10 @@ **********************************************************************/ #include "qttableview.h" -#include "qscrollbar.h" -#include "qpainter.h" -#include "qdrawutil.h" -#include <qapplication.h> +#include "tqscrollbar.h" +#include "tqpainter.h" +#include "tqdrawutil.h" +#include <tqapplication.h> #include <limits.h> enum ScrollBarDirtyFlags { @@ -40,16 +40,16 @@ enum ScrollBarDirtyFlags { class QCornerSquare : public QWidget // internal class { public: - QCornerSquare( QWidget *, const char* = 0 ); - void paintEvent( QPaintEvent * ); + QCornerSquare( TQWidget *, const char* = 0 ); + void paintEvent( TQPaintEvent * ); }; -QCornerSquare::QCornerSquare( QWidget *parent, const char *name ) - : QWidget( parent, name ) +QCornerSquare::QCornerSquare( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { } -void QCornerSquare::paintEvent( QPaintEvent * ) +void QCornerSquare::paintEvent( TQPaintEvent * ) { } @@ -112,9 +112,9 @@ void QCornerSquare::paintEvent( QPaintEvent * ) \warning Experience has shown that use of this widget tends to cause more bugs than expected and our analysis indicates that the widget's - very flexibility is the problem. If QScrollView or QListBox can + very flexibility is the problem. If TQScrollView or TQListBox can easily be made to do the job you need, we recommend subclassing - those widgets rather than QtTableView. In addition, QScrollView makes + those widgets rather than QtTableView. In addition, TQScrollView makes it easy to have child widgets inside tables, which QtTableView doesn't support at all. @@ -125,7 +125,7 @@ void QCornerSquare::paintEvent( QPaintEvent * ) /*! Constructs a table view. The \a parent, \a name and \f arguments - are passed to the QFrame constructor. + are passed to the TQFrame constructor. The \link setTableFlags() table flags\endlink are all cleared (set to 0). Set \c Tbl_autoVScrollBar or \c Tbl_autoHScrollBar to get automatic scroll @@ -134,17 +134,17 @@ void QCornerSquare::paintEvent( QPaintEvent * ) The \link setCellHeight() cell height\endlink and \link setCellWidth() cell width\endlink are set to 0. - Frame line shapes (QFrame::HLink and QFrame::VLine) are disallowed; - see QFrame::setFrameStyle(). + Frame line shapes (TQFrame::HLink and TQFrame::VLine) are disallowed; + see TQFrame::setFrameStyle(). Note that the \a f argument is \e not \link setTableFlags() table - flags \endlink but rather \link QWidget::QWidget() widget + flags \endlink but rather \link TQWidget::TQWidget() widget flags. \endlink */ -QtTableView::QtTableView( QWidget *parent, const char *name, WFlags f ) - : QFrame( parent, name, f ) +QtTableView::QtTableView( TQWidget *parent, const char *name, WFlags f ) + : TQFrame( parent, name, f ) { nRows = nCols = 0; // zero rows/cols xCellOffs = yCellOffs = 0; // zero offset @@ -178,21 +178,21 @@ QtTableView::~QtTableView() /*! \internal - Reimplements QWidget::setBackgroundColor() for binary compatibility. + Reimplements TQWidget::setBackgroundColor() for binary compatibility. \sa setPalette() */ -void QtTableView::setBackgroundColor( const QColor &c ) +void QtTableView::setBackgroundColor( const TQColor &c ) { - QWidget::setBackgroundColor( c ); + TQWidget::setBackgroundColor( c ); } /*!\reimp */ -void QtTableView::setPalette( const QPalette &p ) +void QtTableView::setPalette( const TQPalette &p ) { - QWidget::setPalette( p ); + TQWidget::setPalette( p ); } /*!\reimp @@ -201,7 +201,7 @@ void QtTableView::setPalette( const QPalette &p ) void QtTableView::show() { showOrHideScrollBars(); - QWidget::show(); + TQWidget::show(); } @@ -225,7 +225,7 @@ void QtTableView::show() event. At present, QtTableView is the only widget that reimplements \link - QWidget::repaint() repaint()\endlink. It does this because by + TQWidget::repaint() repaint()\endlink. It does this because by clearing and then repainting one cell at at time, it can make the screen flicker less than it would otherwise. */ @@ -237,10 +237,10 @@ void QtTableView::repaint( int x, int y, int w, int h, bool erase ) w = width() - x; if ( h < 0 ) h = height() - y; - QRect r( x, y, w, h ); + TQRect r( x, y, w, h ); if ( r.isEmpty() ) return; // nothing to do - QPaintEvent e( r ); + TQPaintEvent e( r ); if ( erase && backgroundMode() != NoBackground ) eraseInPaint = TRUE; // erase when painting paintEvent( &e ); @@ -248,7 +248,7 @@ void QtTableView::repaint( int x, int y, int w, int h, bool erase ) } /*! - \overload void QtTableView::repaint( const QRect &r, bool erase ) + \overload void QtTableView::repaint( const TQRect &r, bool erase ) Replaints rectangle \a r. If \a erase is TRUE draws the background using the palette's background. */ @@ -729,7 +729,7 @@ int QtTableView::totalHeight() <dt> Tbl_autoHScrollBar <dd> The table has a horizontal scroll bar if - and only if - the table is wider than the view. <dt> Tbl_autoScrollBars <dd> - The union of the previous two flags. - <dt> Tbl_clipCellPainting <dd> - The table uses QPainter::setClipRect() to + <dt> Tbl_clipCellPainting <dd> - The table uses TQPainter::setClipRect() to make sure that paintCell() will not draw outside the cell boundaries. <dt> Tbl_cutCellsV <dd> - The table will never show part of a @@ -959,7 +959,7 @@ void QtTableView::updateCell( int row, int col, bool erase ) return; if ( !rowYPos( row, &yPos ) ) return; - QRect uR = QRect( xPos, yPos, + TQRect uR = TQRect( xPos, yPos, cellW ? cellW : cellWidth(col), cellH ? cellH : cellHeight(row) ); repaint( uR.intersect(viewRect()), erase ); @@ -967,7 +967,7 @@ void QtTableView::updateCell( int row, int col, bool erase ) /*! - \fn QRect QtTableView::cellUpdateRect() const + \fn TQRect QtTableView::cellUpdateRect() const This function should be called only from the paintCell() function in subclasses. It returns the portion of a cell that actually needs to be @@ -981,9 +981,9 @@ void QtTableView::updateCell( int row, int col, bool erase ) frame, in \e widget coordinates. */ -QRect QtTableView::viewRect() const +TQRect QtTableView::viewRect() const { - return QRect( frameWidth(), frameWidth(), viewWidth(), viewHeight() ); + return TQRect( frameWidth(), frameWidth(), viewWidth(), viewHeight() ); } @@ -1126,7 +1126,7 @@ void QtTableView::snapToGrid( bool horizontal, bool vertical ) /*! \internal This internal slot is connected to the horizontal scroll bar's - QScrollBar::valueChanged() signal. + TQScrollBar::valueChanged() signal. Moves the table horizontally to offset \a val without updating the scroll bar. @@ -1147,7 +1147,7 @@ void QtTableView::horSbValue( int val ) /*! \internal This internal slot is connected to the horizontal scroll bar's - QScrollBar::sliderMoved() signal. + TQScrollBar::sliderMoved() signal. Scrolls the table smoothly horizontally even if \c Tbl_snapToHGrid is set. */ @@ -1167,7 +1167,7 @@ void QtTableView::horSbSliding( int val ) /*! \internal This internal slot is connected to the horizontal scroll bar's - QScrollBar::sliderReleased() signal. + TQScrollBar::sliderReleased() signal. */ void QtTableView::horSbSlidingDone( ) @@ -1180,7 +1180,7 @@ void QtTableView::horSbSlidingDone( ) /*! \internal This internal slot is connected to the vertical scroll bar's - QScrollBar::valueChanged() signal. + TQScrollBar::valueChanged() signal. Moves the table vertically to offset \a val without updating the scroll bar. @@ -1201,7 +1201,7 @@ void QtTableView::verSbValue( int val ) /*! \internal This internal slot is connected to the vertical scroll bar's - QScrollBar::sliderMoved() signal. + TQScrollBar::sliderMoved() signal. Scrolls the table smoothly vertically even if \c Tbl_snapToVGrid is set. */ @@ -1221,7 +1221,7 @@ void QtTableView::verSbSliding( int val ) /*! \internal This internal slot is connected to the vertical scroll bar's - QScrollBar::sliderReleased() signal. + TQScrollBar::sliderReleased() signal. */ void QtTableView::verSbSlidingDone( ) @@ -1239,18 +1239,18 @@ void QtTableView::verSbSlidingDone( ) do so for each cell. */ -void QtTableView::setupPainter( QPainter * ) +void QtTableView::setupPainter( TQPainter * ) { } /*! - \fn void QtTableView::paintCell( QPainter *p, int row, int col ) + \fn void QtTableView::paintCell( TQPainter *p, int row, int col ) This pure virtual function is called to paint the single cell at \a (row,col) using \a p, which is open when paintCell() is called and must remain open. - The coordinate system is \link QPainter::translate() translated \endlink + The coordinate system is \link TQPainter::translate() translated \endlink so that the origin is at the top-left corner of the cell to be painted, i.e. \e cell coordinates. Do not scale or shear the coordinate system (or if you do, restore the transformation matrix before you @@ -1268,16 +1268,16 @@ void QtTableView::setupPainter( QPainter * ) Calls paintCell() for the cells that needs to be repainted. */ -void QtTableView::paintEvent( QPaintEvent *e ) +void QtTableView::paintEvent( TQPaintEvent *e ) { - QRect updateR = e->rect(); // update rectangle + TQRect updateR = e->rect(); // update rectangle if ( sbDirty ) { bool e = eraseInPaint; updateScrollBars(); eraseInPaint = e; } - QPainter paint( this ); + TQPainter paint( this ); if ( !contentsRect().contains( updateR, TRUE ) ) {// update frame ? drawFrame( &paint ); @@ -1311,11 +1311,11 @@ void QtTableView::paintEvent( QPaintEvent *e ) int xPos = maxX+1; // in case the while() is empty int nextX; int nextY; - QRect winR = viewRect(); - QRect cellR; - QRect cellUR; + TQRect winR = viewRect(); + TQRect cellR; + TQRect cellUR; #ifndef QT_NO_TRANSFORMATIONS - QWMatrix matrix; + TQWMatrix matrix; #endif while ( yPos <= maxY && row < nRows ) { @@ -1383,22 +1383,22 @@ void QtTableView::paintEvent( QPaintEvent *e ) // inside the cells. So QtTableView is reponsible for all pixels // outside the cells. - QRect viewR = viewRect(); - const QColorGroup g = colorGroup(); + TQRect viewR = viewRect(); + const TQColorGroup g = colorGroup(); if ( xPos <= maxX ) { - QRect r = viewR; + TQRect r = viewR; r.setLeft( xPos ); r.setBottom( yPos<maxY?yPos:maxY ); - if ( inherits( "QMultiLineEdit" ) ) + if ( inherits( "TQMultiLineEdit" ) ) paint.fillRect( r.intersect( updateR ), g.base() ); else paint.eraseRect( r.intersect( updateR ) ); } if ( yPos <= maxY ) { - QRect r = viewR; + TQRect r = viewR; r.setTop( yPos ); - if ( inherits( "QMultiLineEdit" ) ) + if ( inherits( "TQMultiLineEdit" ) ) paint.fillRect( r.intersect( updateR ), g.base() ); else paint.eraseRect( r.intersect( updateR ) ); @@ -1407,7 +1407,7 @@ void QtTableView::paintEvent( QPaintEvent *e ) /*!\reimp */ -void QtTableView::resizeEvent( QResizeEvent * ) +void QtTableView::resizeEvent( TQResizeEvent * ) { updateScrollBars( horValue | verValue | horSteps | horGeometry | horRange | verSteps | verGeometry | verRange ); @@ -1418,10 +1418,10 @@ void QtTableView::resizeEvent( QResizeEvent * ) setOffset( maxX, maxY ); } -void QtTableView::wheelEvent( QWheelEvent * e ) +void QtTableView::wheelEvent( TQWheelEvent * e ) { if( e->orientation() == Vertical && vScrollBar && vScrollBar->isVisible() ) - QApplication::sendEvent( vScrollBar, e ); + TQApplication::sendEvent( vScrollBar, e ); } /*! @@ -1439,11 +1439,11 @@ void QtTableView::updateView() values; use findRow() to translate to cell numbers. */ -QScrollBar *QtTableView::verticalScrollBar() const +TQScrollBar *QtTableView::verticalScrollBar() const { QtTableView *that = (QtTableView*)this; // semantic const if ( !vScrollBar ) { - QScrollBar *sb = new QScrollBar( QScrollBar::Vertical, that ); + TQScrollBar *sb = new TQScrollBar( TQScrollBar::Vertical, that ); #ifndef QT_NO_CURSOR sb->setCursor( arrowCursor ); #endif @@ -1451,12 +1451,12 @@ QScrollBar *QtTableView::verticalScrollBar() const Q_CHECK_PTR(sb); sb->setTracking( FALSE ); sb->setFocusPolicy( NoFocus ); - connect( sb, SIGNAL(valueChanged(int)), - SLOT(verSbValue(int))); - connect( sb, SIGNAL(sliderMoved(int)), - SLOT(verSbSliding(int))); - connect( sb, SIGNAL(sliderReleased()), - SLOT(verSbSlidingDone())); + connect( sb, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(verSbValue(int))); + connect( sb, TQT_SIGNAL(sliderMoved(int)), + TQT_SLOT(verSbSliding(int))); + connect( sb, TQT_SIGNAL(sliderReleased()), + TQT_SLOT(verSbSlidingDone())); sb->hide(); that->vScrollBar = sb; return sb; @@ -1470,11 +1470,11 @@ QScrollBar *QtTableView::verticalScrollBar() const values; use findCol() to translate to cell numbers. */ -QScrollBar *QtTableView::horizontalScrollBar() const +TQScrollBar *QtTableView::horizontalScrollBar() const { QtTableView *that = (QtTableView*)this; // semantic const if ( !hScrollBar ) { - QScrollBar *sb = new QScrollBar( QScrollBar::Horizontal, that ); + TQScrollBar *sb = new TQScrollBar( TQScrollBar::Horizontal, that ); #ifndef QT_NO_CURSOR sb->setCursor( arrowCursor ); #endif @@ -1482,12 +1482,12 @@ QScrollBar *QtTableView::horizontalScrollBar() const sb->setFocusPolicy( NoFocus ); Q_CHECK_PTR(sb); sb->setTracking( FALSE ); - connect( sb, SIGNAL(valueChanged(int)), - SLOT(horSbValue(int))); - connect( sb, SIGNAL(sliderMoved(int)), - SLOT(horSbSliding(int))); - connect( sb, SIGNAL(sliderReleased()), - SLOT(horSbSlidingDone())); + connect( sb, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(horSbValue(int))); + connect( sb, TQT_SIGNAL(sliderMoved(int)), + TQT_SLOT(horSbSliding(int))); + connect( sb, TQT_SIGNAL(sliderReleased()), + TQT_SLOT(horSbSlidingDone())); sb->hide(); that->hScrollBar = sb; return sb; @@ -1791,10 +1791,10 @@ bool QtTableView::colXPos( int col, int *xPos ) const Moves the visible area of the table right by \a xPixels and down by \a yPixels pixels. Both may be negative. - \warning You might find that QScrollView offers a higher-level of + \warning You might find that TQScrollView offers a higher-level of functionality than using QtTableView and this function. - This function is \e not the same as QWidget::scroll(); in particular, + This function is \e not the same as TQWidget::scroll(); in particular, the signs of \a xPixels and \a yPixels have the reverse semantics. \sa setXOffset(), setYOffset(), setOffset(), setTopCell(), @@ -1803,7 +1803,7 @@ bool QtTableView::colXPos( int col, int *xPos ) const void QtTableView::scroll( int xPixels, int yPixels ) { - QWidget::scroll( -xPixels, -yPixels, contentsRect() ); + TQWidget::scroll( -xPixels, -yPixels, contentsRect() ); } @@ -2062,7 +2062,7 @@ void QtTableView::updateFrameSize() if ( autoUpdate() ) { int fh = frameRect().height(); int fw = frameRect().width(); - setFrameRect( QRect(0,0,rw,rh) ); + setFrameRect( TQRect(0,0,rw,rh) ); if ( rw != fw ) update( QMIN(fw,rw) - frameWidth() - 2, 0, frameWidth()+4, rh ); diff --git a/cervisia/qttableview.h b/cervisia/qttableview.h index 6f8b8397..04cc2a9a 100644 --- a/cervisia/qttableview.h +++ b/cervisia/qttableview.h @@ -16,7 +16,7 @@ #define QTTABLEVIEW_H #ifndef QT_H -#include "qframe.h" +#include "tqframe.h" #endif // QT_H #ifndef QT_NO_QTTABLEVIEW @@ -29,16 +29,16 @@ class QtTableView : public QFrame { Q_OBJECT public: - virtual void setBackgroundColor( const QColor & ); - virtual void setPalette( const QPalette & ); + virtual void setBackgroundColor( const TQColor & ); + virtual void setPalette( const TQPalette & ); void show(); void repaint( bool erase=TRUE ); void repaint( int x, int y, int w, int h, bool erase=TRUE ); - void repaint( const QRect &, bool erase=TRUE ); + void repaint( const TQRect &, bool erase=TRUE ); protected: - QtTableView( QWidget *parent=0, const char *name=0, WFlags f=0 ); + QtTableView( TQWidget *parent=0, const char *name=0, WFlags f=0 ); ~QtTableView(); int numRows() const; @@ -87,8 +87,8 @@ protected: bool rowIsVisible( int row ) const; bool colIsVisible( int col ) const; - QScrollBar *verticalScrollBar() const; - QScrollBar *horizontalScrollBar() const; + TQScrollBar *verticalScrollBar() const; + TQScrollBar *horizontalScrollBar() const; private slots: void horSbValue( int ); @@ -99,12 +99,12 @@ private slots: void verSbSlidingDone(); protected: - virtual void paintCell( QPainter *, int row, int col ) = 0; - virtual void setupPainter( QPainter * ); + virtual void paintCell( TQPainter *, int row, int col ) = 0; + virtual void setupPainter( TQPainter * ); - void paintEvent( QPaintEvent * ); - void resizeEvent( QResizeEvent * ); - virtual void wheelEvent( QWheelEvent *e ); + void paintEvent( TQPaintEvent * ); + void resizeEvent( TQResizeEvent * ); + virtual void wheelEvent( TQWheelEvent *e ); int findRow( int yPos ) const; int findCol( int xPos ) const; @@ -165,8 +165,8 @@ private: uint tFlags; QRect cellUpdateR; - QScrollBar *vScrollBar; - QScrollBar *hScrollBar; + TQScrollBar *vScrollBar; + TQScrollBar *hScrollBar; QCornerSquare *cornerSquare; private: // Disabled copy constructor and operator= @@ -231,7 +231,7 @@ inline uint QtTableView::tableFlags() const inline bool QtTableView::testTableFlags( uint f ) const { return (tFlags & f) != 0; } -inline QRect QtTableView::cellUpdateRect() const +inline TQRect QtTableView::cellUpdateRect() const { return cellUpdateR; } inline bool QtTableView::autoUpdate() const @@ -240,7 +240,7 @@ inline bool QtTableView::autoUpdate() const inline void QtTableView::repaint( bool erase ) { repaint( 0, 0, width(), height(), erase ); } -inline void QtTableView::repaint( const QRect &r, bool erase ) +inline void QtTableView::repaint( const TQRect &r, bool erase ) { repaint( r.x(), r.y(), r.width(), r.height(), erase ); } inline void QtTableView::updateScrollBars() diff --git a/cervisia/repositories.cpp b/cervisia/repositories.cpp index 4c517116..7f52a39d 100644 --- a/cervisia/repositories.cpp +++ b/cervisia/repositories.cpp @@ -19,9 +19,9 @@ #include <stdlib.h> -#include <qfile.h> -#include <qdir.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqdir.h> +#include <tqtextstream.h> #include <kapplication.h> #include <kconfig.h> @@ -29,15 +29,15 @@ #include "cervisiapart.h" -static QString fileNameCvs() +static TQString fileNameCvs() { - return QDir::homeDirPath() + "/.cvspass"; + return TQDir::homeDirPath() + "/.cvspass"; } -static QString fileNameCvsnt() +static TQString fileNameCvsnt() { - return QDir::homeDirPath() + "/.cvs/cvspass"; + return TQDir::homeDirPath() + "/.cvs/cvspass"; } @@ -47,18 +47,18 @@ static QString fileNameCvsnt() // new .cvspass format (since cvs 1.11.1): // /1 user@host:port/path Aencoded_password // -static QStringList readCvsPassFile() +static TQStringList readCvsPassFile() { - QStringList list; + TQStringList list; - QFile f(fileNameCvs()); + TQFile f(fileNameCvs()); if (f.open(IO_ReadOnly)) { - QTextStream stream(&f); + TQTextStream stream(&f); while (!stream.eof()) { int pos; - QString line = stream.readLine(); + TQString line = stream.readLine(); if ( (pos = line.find(' ')) != -1) { if (line[0] != '/') // old format @@ -76,17 +76,17 @@ static QStringList readCvsPassFile() // .cvs/cvspass format // user@host:port/path=Aencoded_password // -static QStringList readCvsntPassFile() +static TQStringList readCvsntPassFile() { - QStringList list; + TQStringList list; - QFile file(fileNameCvsnt()); + TQFile file(fileNameCvsnt()); if (file.open(IO_ReadOnly)) { - QTextStream stream(&file); + TQTextStream stream(&file); while (!stream.atEnd()) { - const QString line(stream.readLine()); + const TQString line(stream.readLine()); const int pos(line.find("=A")); if (pos >= 0) @@ -98,18 +98,18 @@ static QStringList readCvsntPassFile() } -QStringList Repositories::readCvsPassFile() +TQStringList Repositories::readCvsPassFile() { - return (QFileInfo(fileNameCvs()).lastModified() - < QFileInfo(fileNameCvsnt()).lastModified()) + return (TQFileInfo(fileNameCvs()).lastModified() + < TQFileInfo(fileNameCvsnt()).lastModified()) ? readCvsntPassFile() : ::readCvsPassFile(); } -QStringList Repositories::readConfigFile() +TQStringList Repositories::readConfigFile() { - QStringList list; + TQStringList list; KConfig *config = CervisiaPart::config(); config->setGroup("Repositories"); diff --git a/cervisia/repositories.h b/cervisia/repositories.h index 28d7a469..79c1c5ad 100644 --- a/cervisia/repositories.h +++ b/cervisia/repositories.h @@ -25,8 +25,8 @@ class Repositories { public: - static QStringList readCvsPassFile(); - static QStringList readConfigFile(); + static TQStringList readCvsPassFile(); + static TQStringList readConfigFile(); }; diff --git a/cervisia/repositorydlg.cpp b/cervisia/repositorydlg.cpp index d0568398..a30a13ce 100644 --- a/cervisia/repositorydlg.cpp +++ b/cervisia/repositorydlg.cpp @@ -21,8 +21,8 @@ #include "repositorydlg.h" -#include <qlayout.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqpushbutton.h> #include <kbuttonbox.h> #include <kconfig.h> #include <klistview.h> @@ -40,25 +40,25 @@ class RepositoryListItem : public KListViewItem { public: - RepositoryListItem(KListView* parent, const QString& repo, bool loggedin); + RepositoryListItem(KListView* parent, const TQString& repo, bool loggedin); - void setRsh(const QString& rsh); - void setServer(const QString& server) { m_server = server; } + void setRsh(const TQString& rsh); + void setServer(const TQString& server) { m_server = server; } void setCompression(int compression); void setIsLoggedIn(bool isLoggedIn); void setRetrieveCvsignore(bool retrieve) { m_retrieveCvsignore = retrieve; } - QString repository() const + TQString repository() const { return text(0); } - QString rsh() const + TQString rsh() const { - QString str = text(1); + TQString str = text(1); return (str.startsWith("ext (") ? str.mid(5, str.length()-6) - : QString::null); + : TQString::null); } - QString server() const { return m_server; } + TQString server() const { return m_server; } int compression() const { bool ok; @@ -72,20 +72,20 @@ private: void changeLoginStatusColumn(); private: - QString m_server; + TQString m_server; bool m_isLoggedIn; bool m_retrieveCvsignore; }; -static bool LoginNeeded(const QString& repository) +static bool LoginNeeded(const TQString& repository) { return repository.startsWith(":pserver:") || repository.startsWith(":sspi:"); } -RepositoryListItem::RepositoryListItem(KListView* parent, const QString& repo, +RepositoryListItem::RepositoryListItem(KListView* parent, const TQString& repo, bool loggedin) : KListViewItem(parent) , m_isLoggedIn(loggedin) @@ -96,10 +96,10 @@ RepositoryListItem::RepositoryListItem(KListView* parent, const QString& repo, } -void RepositoryListItem::setRsh(const QString& rsh) +void RepositoryListItem::setRsh(const TQString& rsh) { - QString repo = repository(); - QString method; + TQString repo = repository(); + TQString method; if( repo.startsWith(":pserver:") ) method = "pserver"; @@ -124,7 +124,7 @@ void RepositoryListItem::setRsh(const QString& rsh) void RepositoryListItem::setCompression(int compression) { - QString compressionStr = (compression >= 0) ? QString::number(compression) + TQString compressionStr = (compression >= 0) ? TQString::number(compression) : i18n("Default"); setText(2, compressionStr); @@ -141,7 +141,7 @@ void RepositoryListItem::setIsLoggedIn(bool isLoggedIn) void RepositoryListItem::changeLoginStatusColumn() { - QString loginStatus; + TQString loginStatus; if( LoginNeeded(repository()) ) loginStatus = m_isLoggedIn ? i18n("Logged in") : i18n("Not logged in"); @@ -153,15 +153,15 @@ void RepositoryListItem::changeLoginStatusColumn() RepositoryDialog::RepositoryDialog(KConfig& cfg, CvsService_stub* cvsService, - QWidget* parent, const char* name) + TQWidget* parent, const char* name) : KDialogBase(parent, name, true, i18n("Configure Access to Repositories"), Ok | Cancel | Help, Ok, true) , m_partConfig(cfg) , m_cvsService(cvsService) { - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout* hbox = new QHBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout* hbox = new TQHBoxLayout(mainWidget, 0, spacingHint()); m_repoList = new KListView(mainWidget); hbox->addWidget(m_repoList, 10); @@ -173,13 +173,13 @@ RepositoryDialog::RepositoryDialog(KConfig& cfg, CvsService_stub* cvsService, m_repoList->addColumn(i18n("Status")); m_repoList->setFocus(); - connect(m_repoList, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(slotDoubleClicked(QListViewItem*))); - connect(m_repoList, SIGNAL(selectionChanged()), - this, SLOT(slotSelectionChanged())); + connect(m_repoList, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this, TQT_SLOT(slotDoubleClicked(TQListViewItem*))); + connect(m_repoList, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotSelectionChanged())); KButtonBox* actionbox = new KButtonBox(mainWidget, KButtonBox::Vertical); - QPushButton* addbutton = actionbox->addButton(i18n("&Add...")); + TQPushButton* addbutton = actionbox->addButton(i18n("&Add...")); m_modifyButton = actionbox->addButton(i18n("&Modify...")); m_removeButton = actionbox->addButton(i18n("&Remove")); actionbox->addStretch(); @@ -192,16 +192,16 @@ RepositoryDialog::RepositoryDialog(KConfig& cfg, CvsService_stub* cvsService, m_loginButton->setEnabled(false); m_logoutButton->setEnabled(false); - connect( addbutton, SIGNAL(clicked()), - this, SLOT(slotAddClicked()) ); - connect( m_modifyButton, SIGNAL(clicked()), - this, SLOT(slotModifyClicked()) ); - connect( m_removeButton, SIGNAL(clicked()), - this, SLOT(slotRemoveClicked()) ); - connect( m_loginButton, SIGNAL(clicked()), - this, SLOT(slotLoginClicked()) ); - connect( m_logoutButton, SIGNAL(clicked()), - this, SLOT(slotLogoutClicked()) ); + connect( addbutton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddClicked()) ); + connect( m_modifyButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotModifyClicked()) ); + connect( m_removeButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveClicked()) ); + connect( m_loginButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotLoginClicked()) ); + connect( m_logoutButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotLogoutClicked()) ); // open cvs DCOP service configuration file m_serviceConfig = new KConfig("cvsservicerc"); @@ -209,7 +209,7 @@ RepositoryDialog::RepositoryDialog(KConfig& cfg, CvsService_stub* cvsService, readCvsPassFile(); readConfigFile(); - if (QListViewItem* item = m_repoList->firstChild()) + if (TQListViewItem* item = m_repoList->firstChild()) { m_repoList->setCurrentItem(item); m_repoList->setSelected(item, true); @@ -224,14 +224,14 @@ RepositoryDialog::RepositoryDialog(KConfig& cfg, CvsService_stub* cvsService, setWFlags(Qt::WDestructiveClose | getWFlags()); - QSize size = configDialogSize(m_partConfig, "RepositoryDialog"); + TQSize size = configDialogSize(m_partConfig, "RepositoryDialog"); resize(size); // without this restoreLayout() can't change the column widths for (int i = 0; i < m_repoList->columns(); ++i) - m_repoList->setColumnWidthMode(i, QListView::Manual); + m_repoList->setColumnWidthMode(i, TQListView::Manual); - m_repoList->restoreLayout(&m_partConfig, QString::fromLatin1("RepositoryListView")); + m_repoList->restoreLayout(&m_partConfig, TQString::fromLatin1("RepositoryListView")); } @@ -239,7 +239,7 @@ RepositoryDialog::~RepositoryDialog() { saveDialogSize(m_partConfig, "RepositoryDialog"); - m_repoList->saveLayout(&m_partConfig, QString::fromLatin1("RepositoryListView")); + m_repoList->saveLayout(&m_partConfig, TQString::fromLatin1("RepositoryListView")); delete m_serviceConfig; } @@ -247,8 +247,8 @@ RepositoryDialog::~RepositoryDialog() void RepositoryDialog::readCvsPassFile() { - QStringList list = Repositories::readCvsPassFile(); - QStringList::ConstIterator it; + TQStringList list = Repositories::readCvsPassFile(); + TQStringList::ConstIterator it; for( it = list.begin(); it != list.end(); ++it ) (void) new RepositoryListItem(m_repoList, (*it), true); } @@ -256,14 +256,14 @@ void RepositoryDialog::readCvsPassFile() void RepositoryDialog::readConfigFile() { - QStringList list = Repositories::readConfigFile(); + TQStringList list = Repositories::readConfigFile(); // Sort out all list elements which are already in the list view - QListViewItem* item = m_repoList->firstChild(); + TQListViewItem* item = m_repoList->firstChild(); for( ; item; item = item->nextSibling() ) list.remove(item->text(0)); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for( it = list.begin(); it != list.end(); ++it ) new RepositoryListItem(m_repoList, *it, false); @@ -274,11 +274,11 @@ void RepositoryDialog::readConfigFile() RepositoryListItem* ritem = static_cast<RepositoryListItem*>(item); // read entries from cvs DCOP service configuration - m_serviceConfig->setGroup(QString::fromLatin1("Repository-") + + m_serviceConfig->setGroup(TQString::fromLatin1("Repository-") + ritem->repository()); - QString rsh = m_serviceConfig->readEntry("rsh", QString()); - QString server = m_serviceConfig->readEntry("cvs_server", QString()); + TQString rsh = m_serviceConfig->readEntry("rsh", TQString()); + TQString server = m_serviceConfig->readEntry("cvs_server", TQString()); int compression = m_serviceConfig->readNumEntry("Compression", -1); bool retrieveFile = m_serviceConfig->readBoolEntry("RetrieveCvsignore", false); @@ -294,8 +294,8 @@ void RepositoryDialog::readConfigFile() void RepositoryDialog::slotOk() { // Make list of repositories - QListViewItem* item; - QStringList list; + TQListViewItem* item; + TQStringList list; for( item = m_repoList->firstChild(); item; item = item->nextSibling() ) list.append(item->text(0)); @@ -319,18 +319,18 @@ void RepositoryDialog::slotOk() void RepositoryDialog::slotAddClicked() { - AddRepositoryDialog dlg(m_partConfig, QString::null, this); + AddRepositoryDialog dlg(m_partConfig, TQString::null, this); // default compression level dlg.setCompression(-1); if( dlg.exec() ) { - QString repo = Cervisia::NormalizeRepository(dlg.repository()); - QString rsh = dlg.rsh(); - QString server = dlg.server(); + TQString repo = Cervisia::NormalizeRepository(dlg.repository()); + TQString rsh = dlg.rsh(); + TQString server = dlg.server(); int compression = dlg.compression(); bool retrieveFile = dlg.retrieveCvsignoreFile(); - QListViewItem* item = m_repoList->firstChild(); + TQListViewItem* item = m_repoList->firstChild(); for( ; item; item = item->nextSibling() ) if( item->text(0) == repo ) { @@ -369,15 +369,15 @@ void RepositoryDialog::slotRemoveClicked() } -void RepositoryDialog::slotDoubleClicked(QListViewItem* item) +void RepositoryDialog::slotDoubleClicked(TQListViewItem* item) { if( !item ) return; RepositoryListItem* ritem = static_cast<RepositoryListItem*>(item); - QString repo = ritem->repository(); - QString rsh = ritem->rsh(); - QString server = ritem->server(); + TQString repo = ritem->repository(); + TQString rsh = ritem->rsh(); + TQString server = ritem->server(); int compression = ritem->compression(); bool retrieveFile = ritem->retrieveCvsignore(); @@ -422,7 +422,7 @@ void RepositoryDialog::slotLoginClicked() bool success = job.call("execute()"); if( !success ) { - QStringList output = job.call("output()"); + TQStringList output = job.call("output()"); KMessageBox::detailedError(this, i18n("Login failed."), output.join("\n")); return; } @@ -490,7 +490,7 @@ void RepositoryDialog::slotSelectionChanged() void RepositoryDialog::writeRepositoryData(RepositoryListItem* item) { // write entries to cvs DCOP service configuration - m_serviceConfig->setGroup(QString::fromLatin1("Repository-") + + m_serviceConfig->setGroup(TQString::fromLatin1("Repository-") + item->repository()); m_serviceConfig->writeEntry("rsh", item->rsh()); diff --git a/cervisia/repositorydlg.h b/cervisia/repositorydlg.h index c980b712..0ffae1ab 100644 --- a/cervisia/repositorydlg.h +++ b/cervisia/repositorydlg.h @@ -39,7 +39,7 @@ class RepositoryDialog : public KDialogBase public: RepositoryDialog(KConfig& cfg, CvsService_stub* cvsService, - QWidget* parent = 0, const char* name = 0); + TQWidget* parent = 0, const char* name = 0); virtual ~RepositoryDialog(); void readConfigFile(); @@ -52,7 +52,7 @@ private slots: void slotAddClicked(); void slotModifyClicked(); void slotRemoveClicked(); - void slotDoubleClicked(QListViewItem *item); + void slotDoubleClicked(TQListViewItem *item); void slotLoginClicked(); void slotLogoutClicked(); void slotSelectionChanged(); @@ -65,10 +65,10 @@ private: CvsService_stub* m_cvsService; KConfig* m_serviceConfig; KListView* m_repoList; - QPushButton* m_modifyButton; - QPushButton* m_removeButton; - QPushButton* m_loginButton; - QPushButton* m_logoutButton; + TQPushButton* m_modifyButton; + TQPushButton* m_removeButton; + TQPushButton* m_loginButton; + TQPushButton* m_logoutButton; }; #endif diff --git a/cervisia/resolvedlg.cpp b/cervisia/resolvedlg.cpp index 2cf0ffd6..8fce2ee7 100644 --- a/cervisia/resolvedlg.cpp +++ b/cervisia/resolvedlg.cpp @@ -21,18 +21,18 @@ #include "resolvedlg.h" -#include <qfile.h> -#include <qkeycode.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qtextcodec.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqkeycode.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqtextcodec.h> +#include <tqtextstream.h> #include <kdebug.h> #include <kfiledialog.h> #include <klocale.h> #include <kmessagebox.h> -#include <qregexp.h> +#include <tqregexp.h> #include "misc.h" #include "resolvedlg_p.h" using Cervisia::ResolveEditorDialog; @@ -40,13 +40,13 @@ using Cervisia::ResolveEditorDialog; // *UGLY HACK* // The following conditions are a rough hack -static QTextCodec *DetectCodec(const QString &fileName) +static TQTextCodec *DetectCodec(const TQString &fileName) { if (fileName.endsWith(".ui") || fileName.endsWith(".docbook") || fileName.endsWith(".xml")) - return QTextCodec::codecForName("utf8"); + return TQTextCodec::codecForName("utf8"); - return QTextCodec::codecForLocale(); + return TQTextCodec::codecForLocale(); } @@ -56,19 +56,19 @@ namespace class LineSeparator { public: - LineSeparator(const QString& text) + LineSeparator(const TQString& text) : m_text(text) , m_startPos(0) , m_endPos(0) { } - QString nextLine() const + TQString nextLine() const { // already reach end of text on previous call if( m_endPos < 0 ) { - m_currentLine = QString::null; + m_currentLine = TQString::null; return m_currentLine; } @@ -87,16 +87,16 @@ public: } private: - const QString m_text; - mutable QString m_currentLine; + const TQString m_text; + mutable TQString m_currentLine; mutable int m_startPos, m_endPos; }; } -ResolveDialog::ResolveDialog(KConfig& cfg, QWidget *parent, const char *name) - : KDialogBase(parent, name, false, QString::null, +ResolveDialog::ResolveDialog(KConfig& cfg, TQWidget *parent, const char *name) + : KDialogBase(parent, name, false, TQString::null, Close | Help | User1 | User2, Close, true, KStdGuiItem::saveAs(), KStdGuiItem::save()) , markeditem(-1) @@ -104,26 +104,26 @@ ResolveDialog::ResolveDialog(KConfig& cfg, QWidget *parent, const char *name) { items.setAutoDelete(true); - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - QSplitter *vertSplitter = new QSplitter(QSplitter::Vertical, mainWidget); + TQSplitter *vertSplitter = new TQSplitter(TQSplitter::Vertical, mainWidget); - QSplitter *splitter = new QSplitter(QSplitter::Horizontal, vertSplitter); + TQSplitter *splitter = new TQSplitter(TQSplitter::Horizontal, vertSplitter); - QWidget *versionALayoutWidget = new QWidget(splitter); - QBoxLayout *versionAlayout = new QVBoxLayout(versionALayoutWidget, 5); + TQWidget *versionALayoutWidget = new TQWidget(splitter); + TQBoxLayout *versionAlayout = new TQVBoxLayout(versionALayoutWidget, 5); - QLabel *revlabel1 = new QLabel(i18n("Your version (A):"), versionALayoutWidget); + TQLabel *revlabel1 = new TQLabel(i18n("Your version (A):"), versionALayoutWidget); versionAlayout->addWidget(revlabel1); diff1 = new DiffView(cfg, true, false, versionALayoutWidget); versionAlayout->addWidget(diff1, 10); - QWidget* versionBLayoutWidget = new QWidget(splitter); - QBoxLayout *versionBlayout = new QVBoxLayout(versionBLayoutWidget, 5); + TQWidget* versionBLayoutWidget = new TQWidget(splitter); + TQBoxLayout *versionBlayout = new TQVBoxLayout(versionBLayoutWidget, 5); - QLabel *revlabel2 = new QLabel(i18n("Other version (B):"), versionBLayoutWidget); + TQLabel *revlabel2 = new TQLabel(i18n("Other version (B):"), versionBLayoutWidget); versionBlayout->addWidget(revlabel2); diff2 = new DiffView(cfg, true, false, versionBLayoutWidget); versionBlayout->addWidget(diff2, 10); @@ -131,10 +131,10 @@ ResolveDialog::ResolveDialog(KConfig& cfg, QWidget *parent, const char *name) diff1->setPartner(diff2); diff2->setPartner(diff1); - QWidget* mergeLayoutWidget = new QWidget(vertSplitter); - QBoxLayout *mergeLayout = new QVBoxLayout(mergeLayoutWidget, 5); + TQWidget* mergeLayoutWidget = new TQWidget(vertSplitter); + TQBoxLayout *mergeLayout = new TQVBoxLayout(mergeLayoutWidget, 5); - QLabel *mergelabel = new QLabel(i18n("Merged version:"), mergeLayoutWidget); + TQLabel *mergelabel = new TQLabel(i18n("Merged version:"), mergeLayoutWidget); mergeLayout->addWidget(mergelabel); merge = new DiffView(cfg, false, false, mergeLayoutWidget); @@ -142,31 +142,31 @@ ResolveDialog::ResolveDialog(KConfig& cfg, QWidget *parent, const char *name) layout->addWidget(vertSplitter); - abutton = new QPushButton("&A", mainWidget); - connect( abutton, SIGNAL(clicked()), SLOT(aClicked()) ); + abutton = new TQPushButton("&A", mainWidget); + connect( abutton, TQT_SIGNAL(clicked()), TQT_SLOT(aClicked()) ); - bbutton = new QPushButton("&B", mainWidget); - connect( bbutton, SIGNAL(clicked()), SLOT(bClicked()) ); + bbutton = new TQPushButton("&B", mainWidget); + connect( bbutton, TQT_SIGNAL(clicked()), TQT_SLOT(bClicked()) ); - abbutton = new QPushButton("A+B", mainWidget); - connect( abbutton, SIGNAL(clicked()), SLOT(abClicked()) ); + abbutton = new TQPushButton("A+B", mainWidget); + connect( abbutton, TQT_SIGNAL(clicked()), TQT_SLOT(abClicked()) ); - babutton = new QPushButton("B+A", mainWidget); - connect( babutton, SIGNAL(clicked()), SLOT(baClicked()) ); + babutton = new TQPushButton("B+A", mainWidget); + connect( babutton, TQT_SIGNAL(clicked()), TQT_SLOT(baClicked()) ); - editbutton = new QPushButton(i18n("&Edit"), mainWidget); - connect( editbutton, SIGNAL(clicked()), SLOT(editClicked()) ); + editbutton = new TQPushButton(i18n("&Edit"), mainWidget); + connect( editbutton, TQT_SIGNAL(clicked()), TQT_SLOT(editClicked()) ); - nofnlabel = new QLabel(mainWidget); + nofnlabel = new TQLabel(mainWidget); nofnlabel->setAlignment(AlignCenter); - backbutton = new QPushButton("&<<", mainWidget); - connect( backbutton, SIGNAL(clicked()), SLOT(backClicked()) ); + backbutton = new TQPushButton("&<<", mainWidget); + connect( backbutton, TQT_SIGNAL(clicked()), TQT_SLOT(backClicked()) ); - forwbutton = new QPushButton("&>>", mainWidget); - connect( forwbutton, SIGNAL(clicked()), SLOT(forwClicked()) ); + forwbutton = new TQPushButton("&>>", mainWidget); + connect( forwbutton, TQT_SIGNAL(clicked()), TQT_SLOT(forwClicked()) ); - QBoxLayout *buttonlayout = new QHBoxLayout(layout); + TQBoxLayout *buttonlayout = new TQHBoxLayout(layout); buttonlayout->addWidget(abutton, 1); buttonlayout->addWidget(bbutton, 1); buttonlayout->addWidget(abbutton, 1); @@ -178,10 +178,10 @@ ResolveDialog::ResolveDialog(KConfig& cfg, QWidget *parent, const char *name) buttonlayout->addWidget(backbutton, 1); buttonlayout->addWidget(forwbutton, 1); - connect( this, SIGNAL(user2Clicked()), SLOT(saveClicked()) ); - connect( this, SIGNAL(user1Clicked()), SLOT(saveAsClicked()) ); + connect( this, TQT_SIGNAL(user2Clicked()), TQT_SLOT(saveClicked()) ); + connect( this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(saveAsClicked()) ); - QFontMetrics const fm(fontMetrics()); + TQFontMetrics const fm(fontMetrics()); setMinimumSize(fm.width('0') * 120, fm.lineSpacing() * 40); @@ -189,7 +189,7 @@ ResolveDialog::ResolveDialog(KConfig& cfg, QWidget *parent, const char *name) setWFlags(Qt::WDestructiveClose | getWFlags()); - QSize size = configDialogSize(partConfig, "ResolveDialog"); + TQSize size = configDialogSize(partConfig, "ResolveDialog"); resize(size); } @@ -216,7 +216,7 @@ public: }; -bool ResolveDialog::parseFile(const QString &name) +bool ResolveDialog::parseFile(const TQString &name) { int lineno1, lineno2; int advanced1, advanced2; @@ -226,7 +226,7 @@ bool ResolveDialog::parseFile(const QString &name) fname = name; - QString fileContent = readFile(); + TQString fileContent = readFile(); if( fileContent.isNull() ) return false; @@ -237,7 +237,7 @@ bool ResolveDialog::parseFile(const QString &name) advanced1 = advanced2 = 0; do { - QString line = separator.nextLine(); + TQString line = separator.nextLine(); // reached end of file? if( separator.atEnd() ) @@ -250,7 +250,7 @@ bool ResolveDialog::parseFile(const QString &name) // check for start of conflict block // Set to look for <<<<<<< at begining of line with exaclty one // space after then anything after that. - QRegExp rx( "^<{7}\\s.*$" ); + TQRegExp rx( "^<{7}\\s.*$" ); int separatorPos = rx.search(line); if( separatorPos >= 0 ) { @@ -268,7 +268,7 @@ bool ResolveDialog::parseFile(const QString &name) { // Set to look for ======= at begining of line which may have one // or more spaces after then nothing else. - QRegExp rx( "^={7}\\s*$" ); + TQRegExp rx( "^={7}\\s*$" ); int separatorPos = rx.search(line); if( separatorPos < 0 ) // still in version A { @@ -286,7 +286,7 @@ bool ResolveDialog::parseFile(const QString &name) { // Set to look for >>>>>>> at begining of line with exaclty one // space after then anything after that. - QRegExp rx( "^>{7}\\s.*$" ); + TQRegExp rx( "^>{7}\\s.*$" ); int separatorPos = rx.search(line); if( separatorPos < 0 ) // still in version B { @@ -325,7 +325,7 @@ bool ResolveDialog::parseFile(const QString &name) } -void ResolveDialog::addToMergeAndVersionA(const QString& line, +void ResolveDialog::addToMergeAndVersionA(const TQString& line, DiffView::DiffType type, int& lineNo) { lineNo++; @@ -334,7 +334,7 @@ void ResolveDialog::addToMergeAndVersionA(const QString& line, } -void ResolveDialog::addToVersionB(const QString& line, DiffView::DiffType type, +void ResolveDialog::addToVersionB(const TQString& line, DiffView::DiffType type, int& lineNo) { lineNo++; @@ -342,9 +342,9 @@ void ResolveDialog::addToVersionB(const QString& line, DiffView::DiffType type, } -void ResolveDialog::saveFile(const QString &name) +void ResolveDialog::saveFile(const TQString &name) { - QFile f(name); + TQFile f(name); if (!f.open(IO_WriteOnly)) { KMessageBox::sorry(this, @@ -352,11 +352,11 @@ void ResolveDialog::saveFile(const QString &name) "Cervisia"); return; } - QTextStream stream(&f); - QTextCodec *fcodec = DetectCodec(name); + TQTextStream stream(&f); + TQTextCodec *fcodec = DetectCodec(name); stream.setCodec(fcodec); - QString output; + TQString output; for( int i = 0; i < merge->count(); i++ ) output +=merge->stringAtOffset(i); stream << output; @@ -365,14 +365,14 @@ void ResolveDialog::saveFile(const QString &name) } -QString ResolveDialog::readFile() +TQString ResolveDialog::readFile() { - QFile f(fname); + TQFile f(fname); if( !f.open(IO_ReadOnly) ) - return QString::null; + return TQString::null; - QTextStream stream(&f); - QTextCodec* codec = DetectCodec(fname); + TQTextStream stream(&f); + TQTextCodec* codec = DetectCodec(fname); stream.setCodec(codec); return stream.read(); @@ -381,7 +381,7 @@ QString ResolveDialog::readFile() void ResolveDialog::updateNofN() { - QString str; + TQString str; if (markeditem >= 0) str = i18n("%1 of %2").arg(markeditem+1).arg(items.count()); else @@ -441,7 +441,7 @@ void ResolveDialog::updateMergedVersion(ResolveItem* item, // Insert new int total = 0; LineSeparator separator(m_contentMergedVersion); - QString line = separator.nextLine(); + TQString line = separator.nextLine(); while( !separator.atEnd() ) { merge->insertAtOffset(line, DiffView::Change, item->offsetM+total); @@ -546,7 +546,7 @@ void ResolveDialog::editClicked() ResolveItem *item = items.at(markeditem); - QString mergedPart; + TQString mergedPart; int total = item->linecountTotal; int offset = item->offsetM; for( int i = 0; i < total; ++i ) @@ -576,7 +576,7 @@ void ResolveDialog::saveClicked() void ResolveDialog::saveAsClicked() { - QString filename = + TQString filename = KFileDialog::getSaveFileName(0, 0, this, 0); if( !filename.isEmpty() && Cervisia::CheckOverwrite(filename) ) @@ -584,7 +584,7 @@ void ResolveDialog::saveAsClicked() } -void ResolveDialog::keyPressEvent(QKeyEvent *e) +void ResolveDialog::keyPressEvent(TQKeyEvent *e) { switch (e->key()) { @@ -601,10 +601,10 @@ void ResolveDialog::keyPressEvent(QKeyEvent *e) -/* This will return the A side of the diff in a QString. */ -QString ResolveDialog::contentVersionA(const ResolveItem *item) +/* This will return the A side of the diff in a TQString. */ +TQString ResolveDialog::contentVersionA(const ResolveItem *item) { - QString result; + TQString result; for( int i = item->linenoA; i < item->linenoA+item->linecountA; ++i ) { result += diff1->stringAtLine(i); @@ -614,10 +614,10 @@ QString ResolveDialog::contentVersionA(const ResolveItem *item) } -/* This will return the B side of the diff item in a QString. */ -QString ResolveDialog::contentVersionB(const ResolveItem *item) +/* This will return the B side of the diff item in a TQString. */ +TQString ResolveDialog::contentVersionB(const ResolveItem *item) { - QString result; + TQString result; for( int i = item->linenoB; i < item->linenoB+item->linecountB; ++i ) { result += diff2->stringAtLine(i); diff --git a/cervisia/resolvedlg.h b/cervisia/resolvedlg.h index 1cee22b7..334622d9 100644 --- a/cervisia/resolvedlg.h +++ b/cervisia/resolvedlg.h @@ -25,7 +25,7 @@ #include <kdialogbase.h> -#include <qptrlist.h> +#include <tqptrlist.h> #include "diffview.h" @@ -42,13 +42,13 @@ class ResolveDialog : public KDialogBase public: enum ChooseType { ChA, ChB, ChAB, ChBA, ChEdit }; - explicit ResolveDialog( KConfig& cfg, QWidget *parent=0, const char *name=0 ); + explicit ResolveDialog( KConfig& cfg, TQWidget *parent=0, const char *name=0 ); virtual ~ResolveDialog(); - bool parseFile(const QString &name); + bool parseFile(const TQString &name); protected: - virtual void keyPressEvent(QKeyEvent *e); + virtual void keyPressEvent(TQKeyEvent *e); private slots: void backClicked(); @@ -66,27 +66,27 @@ private: void updateHighlight(int newitem); void choose(ChooseType ch); void chooseEdit(); - void saveFile(const QString &name); - QString readFile(); - void addToMergeAndVersionA(const QString& line, DiffView::DiffType type, + void saveFile(const TQString &name); + TQString readFile(); + void addToMergeAndVersionA(const TQString& line, DiffView::DiffType type, int& lineNo); - void addToVersionB(const QString& line, DiffView::DiffType type, int& lineNo); + void addToVersionB(const TQString& line, DiffView::DiffType type, int& lineNo); void updateMergedVersion(ResolveItem* item, ChooseType chosen); - QString contentVersionA(const ResolveItem *item); - QString contentVersionB(const ResolveItem *item); + TQString contentVersionA(const ResolveItem *item); + TQString contentVersionB(const ResolveItem *item); - QLabel *nofnlabel; - QPushButton *backbutton, *forwbutton; - QPushButton *abutton, *bbutton, *abbutton, *babutton, *editbutton; + TQLabel *nofnlabel; + TQPushButton *backbutton, *forwbutton; + TQPushButton *abutton, *bbutton, *abbutton, *babutton, *editbutton; DiffView *diff1, *diff2, *merge; - QPtrList<ResolveItem> items; - QString fname; - QTextCodec *fcodec; + TQPtrList<ResolveItem> items; + TQString fname; + TQTextCodec *fcodec; int markeditem; KConfig& partConfig; - QString m_contentMergedVersion; + TQString m_contentMergedVersion; }; diff --git a/cervisia/resolvedlg_p.cpp b/cervisia/resolvedlg_p.cpp index e925677d..1023465a 100644 --- a/cervisia/resolvedlg_p.cpp +++ b/cervisia/resolvedlg_p.cpp @@ -22,8 +22,8 @@ using namespace Cervisia; #include <ktextedit.h> -ResolveEditorDialog::ResolveEditorDialog(KConfig& cfg, QWidget *parent, const char *name) - : KDialogBase(parent, name, true, QString::null, +ResolveEditorDialog::ResolveEditorDialog(KConfig& cfg, TQWidget *parent, const char *name) + : KDialogBase(parent, name, true, TQString::null, Ok | Cancel, Ok, true) , m_partConfig(cfg) { @@ -32,11 +32,11 @@ ResolveEditorDialog::ResolveEditorDialog(KConfig& cfg, QWidget *parent, const ch setMainWidget(m_edit); - QFontMetrics const fm(fontMetrics()); + TQFontMetrics const fm(fontMetrics()); setMinimumSize(fm.width('0') * 120, fm.lineSpacing() * 40); - QSize size = configDialogSize(m_partConfig, "ResolveEditDialog"); + TQSize size = configDialogSize(m_partConfig, "ResolveEditDialog"); resize(size); } @@ -47,13 +47,13 @@ ResolveEditorDialog::~ResolveEditorDialog() } -void ResolveEditorDialog::setContent(const QString& text) +void ResolveEditorDialog::setContent(const TQString& text) { m_edit->setText(text); } -QString ResolveEditorDialog::content() const +TQString ResolveEditorDialog::content() const { return m_edit->text(); } diff --git a/cervisia/resolvedlg_p.h b/cervisia/resolvedlg_p.h index 30b4559a..08d7a779 100644 --- a/cervisia/resolvedlg_p.h +++ b/cervisia/resolvedlg_p.h @@ -33,11 +33,11 @@ namespace Cervisia class ResolveEditorDialog : public KDialogBase { public: - explicit ResolveEditorDialog(KConfig& cfg, QWidget* parent=0, const char* name=0); + explicit ResolveEditorDialog(KConfig& cfg, TQWidget* parent=0, const char* name=0); virtual ~ResolveEditorDialog(); - void setContent(const QString& text); - QString content() const; + void setContent(const TQString& text); + TQString content() const; private: KTextEdit* m_edit; diff --git a/cervisia/settingsdlg.cpp b/cervisia/settingsdlg.cpp index 71b8b32c..1d50b6c1 100644 --- a/cervisia/settingsdlg.cpp +++ b/cervisia/settingsdlg.cpp @@ -20,16 +20,16 @@ #include "settingsdlg.h" -#include <qapplication.h> -#include <qcheckbox.h> -#include <qgrid.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qvbox.h> -#include <qwidgetlist.h> -#include <qhbuttongroup.h> -#include <qradiobutton.h> +#include <tqapplication.h> +#include <tqcheckbox.h> +#include <tqgrid.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqvbox.h> +#include <tqwidgetlist.h> +#include <tqhbuttongroup.h> +#include <tqradiobutton.h> #include <kbuttonbox.h> #include <kcolorbutton.h> #include <kconfig.h> @@ -49,27 +49,27 @@ namespace { // helper method to load icons for configuration pages - inline QPixmap LoadIcon(const char* iconName) + inline TQPixmap LoadIcon(const char* iconName) { KIconLoader* loader = KGlobal::instance()->iconLoader(); - return loader->loadIcon(QString::fromLatin1(iconName), KIcon::NoGroup, + return loader->loadIcon(TQString::fromLatin1(iconName), KIcon::NoGroup, KIcon::SizeMedium); } } -FontButton::FontButton( const QString &text, QWidget *parent, const char *name ) - : QPushButton(text, parent, name) +FontButton::FontButton( const TQString &text, TQWidget *parent, const char *name ) + : TQPushButton(text, parent, name) { - connect( this, SIGNAL(clicked()), this, SLOT(chooseFont()) ); + connect( this, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseFont()) ); } void FontButton::chooseFont() { - QFont newFont(font()); + TQFont newFont(font()); - if (KFontDialog::getFont(newFont, false, this) == QDialog::Rejected) + if (KFontDialog::getFont(newFont, false, this) == TQDialog::Rejected) return; setFont(newFont); @@ -77,7 +77,7 @@ void FontButton::chooseFont() } -SettingsDialog::SettingsDialog( KConfig *conf, QWidget *parent, const char *name ) +SettingsDialog::SettingsDialog( KConfig *conf, TQWidget *parent, const char *name ) : KDialogBase(KDialogBase::IconList, i18n("Configure Cervisia"), KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Help, KDialogBase::Ok, @@ -204,10 +204,10 @@ void SettingsDialog::writeSettings() CervisiaSettings::setDiffDeleteColor(m_diffDeleteButton->color()); // I'm not yet sure whether this is a hack or not :-) - QWidgetListIt it(*QApplication::allWidgets()); + TQWidgetListIt it(*TQApplication::allWidgets()); for (; it.current(); ++it) { - QWidget *w = it.current(); + TQWidget *w = it.current(); if (w->inherits("ProtocolView")) w->setFont(m_protocolFontBox->font()); if (w->inherits("AnnotateView")) @@ -234,11 +234,11 @@ void SettingsDialog::done(int res) */ void SettingsDialog::addGeneralPage() { - QFrame* generalPage = addPage(i18n("General"), QString::null, + TQFrame* generalPage = addPage(i18n("General"), TQString::null, LoadIcon("misc")); - QVBoxLayout* layout = new QVBoxLayout(generalPage, 0, KDialog::spacingHint()); + TQVBoxLayout* layout = new TQVBoxLayout(generalPage, 0, KDialog::spacingHint()); - QLabel *usernamelabel = new QLabel( i18n("&User name for the change log editor:"), generalPage ); + TQLabel *usernamelabel = new TQLabel( i18n("&User name for the change log editor:"), generalPage ); usernameedit = new KLineEdit(generalPage); usernameedit->setFocus(); usernamelabel->setBuddy(usernameedit); @@ -246,7 +246,7 @@ void SettingsDialog::addGeneralPage() layout->addWidget(usernamelabel); layout->addWidget(usernameedit); - QLabel *cvspathlabel = new QLabel( i18n("&Path to CVS executable, or 'cvs':"), generalPage ); + TQLabel *cvspathlabel = new TQLabel( i18n("&Path to CVS executable, or 'cvs':"), generalPage ); cvspathedit = new KURLRequester(generalPage); cvspathlabel->setBuddy(cvspathedit); @@ -262,29 +262,29 @@ void SettingsDialog::addGeneralPage() */ void SettingsDialog::addDiffPage() { - QGrid *diffPage = addGridPage(2, QGrid::Horizontal, i18n("Diff Viewer"), - QString::null, LoadIcon("vcs_diff")); + TQGrid *diffPage = addGridPage(2, TQGrid::Horizontal, i18n("Diff Viewer"), + TQString::null, LoadIcon("vcs_diff")); - QLabel *contextlabel = new QLabel( i18n("&Number of context lines in diff dialog:"), diffPage ); + TQLabel *contextlabel = new TQLabel( i18n("&Number of context lines in diff dialog:"), diffPage ); contextedit = new KIntNumInput( 0, diffPage ); contextedit->setRange(0, 65535, 1, false); contextlabel->setBuddy(contextedit); - QLabel *diffoptlabel = new QLabel(i18n("Additional &options for cvs diff:"), diffPage); + TQLabel *diffoptlabel = new TQLabel(i18n("Additional &options for cvs diff:"), diffPage); diffoptedit = new KLineEdit(diffPage); diffoptlabel->setBuddy(diffoptedit); - QLabel *tabwidthlabel = new QLabel(i18n("Tab &width in diff dialog:"), diffPage); + TQLabel *tabwidthlabel = new TQLabel(i18n("Tab &width in diff dialog:"), diffPage); tabwidthedit = new KIntNumInput(0, diffPage); tabwidthedit->setRange(1, 16, 1, false); tabwidthlabel->setBuddy(tabwidthedit); - QLabel *extdifflabel = new QLabel(i18n("External diff &frontend:"), diffPage); + TQLabel *extdifflabel = new TQLabel(i18n("External diff &frontend:"), diffPage); extdiffedit = new KURLRequester(diffPage); extdifflabel->setBuddy(extdiffedit); // dummy widget to take up the vertical space - new QWidget(diffPage); + new TQWidget(diffPage); } @@ -293,16 +293,16 @@ void SettingsDialog::addDiffPage() */ void SettingsDialog::addStatusPage() { - QVBox* statusPage = addVBoxPage(i18n("Status"), QString::null, + TQVBox* statusPage = addVBoxPage(i18n("Status"), TQString::null, LoadIcon("fork")); - remotestatusbox = new QCheckBox(i18n("When opening a sandbox from a &remote repository,\n" + remotestatusbox = new TQCheckBox(i18n("When opening a sandbox from a &remote repository,\n" "start a File->Status command automatically"), statusPage); - localstatusbox = new QCheckBox(i18n("When opening a sandbox from a &local repository,\n" + localstatusbox = new TQCheckBox(i18n("When opening a sandbox from a &local repository,\n" "start a File->Status command automatically"), statusPage); // dummy widget to take up the vertical space - new QWidget(statusPage); + new TQWidget(statusPage); } @@ -311,7 +311,7 @@ void SettingsDialog::addStatusPage() */ void SettingsDialog::addAdvancedPage() { - QVBox* frame = addVBoxPage(i18n("Advanced"), QString::null, + TQVBox* frame = addVBoxPage(i18n("Advanced"), TQString::null, LoadIcon("configure")); m_advancedPage = new AdvancedPage(frame); @@ -325,10 +325,10 @@ void SettingsDialog::addAdvancedPage() */ void SettingsDialog::addLookAndFeelPage() { - QVBox* lookPage = addVBoxPage(i18n("Appearance"), QString::null, + TQVBox* lookPage = addVBoxPage(i18n("Appearance"), TQString::null, LoadIcon("looknfeel")); - QGroupBox* fontGroupBox = new QGroupBox(4, Qt::Vertical, i18n("Fonts"), + TQGroupBox* fontGroupBox = new TQGroupBox(4, Qt::Vertical, i18n("Fonts"), lookPage); fontGroupBox->setInsideSpacing(KDialog::spacingHint()); @@ -341,40 +341,40 @@ void SettingsDialog::addLookAndFeelPage() m_changelogFontBox = new FontButton(i18n("Font for ChangeLog View..."), fontGroupBox); - QGroupBox* colorGroupBox = new QGroupBox(4, Qt::Horizontal, + TQGroupBox* colorGroupBox = new TQGroupBox(4, Qt::Horizontal, i18n("Colors"), lookPage); colorGroupBox->setColumns(4); colorGroupBox->setInsideSpacing(KDialog::spacingHint()); - QLabel* conflictLabel = new QLabel(i18n("Conflict:"), colorGroupBox); + TQLabel* conflictLabel = new TQLabel(i18n("Conflict:"), colorGroupBox); m_conflictButton = new KColorButton(colorGroupBox); conflictLabel->setBuddy(m_conflictButton); - QLabel* diffChangeLabel = new QLabel(i18n("Diff change:"), colorGroupBox); + TQLabel* diffChangeLabel = new TQLabel(i18n("Diff change:"), colorGroupBox); m_diffChangeButton = new KColorButton(colorGroupBox); diffChangeLabel->setBuddy(m_diffChangeButton); - QLabel* localChangeLabel = new QLabel(i18n("Local change:"), colorGroupBox); + TQLabel* localChangeLabel = new TQLabel(i18n("Local change:"), colorGroupBox); m_localChangeButton = new KColorButton(colorGroupBox); localChangeLabel->setBuddy(m_localChangeButton); - QLabel* diffInsertLabel = new QLabel(i18n("Diff insertion:"), colorGroupBox); + TQLabel* diffInsertLabel = new TQLabel(i18n("Diff insertion:"), colorGroupBox); m_diffInsertButton = new KColorButton(colorGroupBox); diffInsertLabel->setBuddy(m_diffInsertButton); - QLabel* remoteChangeLabel = new QLabel(i18n("Remote change:"), colorGroupBox); + TQLabel* remoteChangeLabel = new TQLabel(i18n("Remote change:"), colorGroupBox); m_remoteChangeButton = new KColorButton(colorGroupBox); remoteChangeLabel->setBuddy( m_remoteChangeButton ); - QLabel* diffDeleteLabel = new QLabel(i18n("Diff deletion:"), colorGroupBox); + TQLabel* diffDeleteLabel = new TQLabel(i18n("Diff deletion:"), colorGroupBox); m_diffDeleteButton = new KColorButton(colorGroupBox); diffDeleteLabel->setBuddy(m_diffDeleteButton); - QLabel* notInCvsLabel = new QLabel(i18n("Not in cvs:"), colorGroupBox); + TQLabel* notInCvsLabel = new TQLabel(i18n("Not in cvs:"), colorGroupBox); m_notInCvsButton = new KColorButton(colorGroupBox); notInCvsLabel->setBuddy(m_notInCvsButton); - m_splitterBox = new QCheckBox(i18n("Split main window &horizontally"), lookPage); + m_splitterBox = new TQCheckBox(i18n("Split main window &horizontally"), lookPage); } #include "settingsdlg.moc" diff --git a/cervisia/settingsdlg.h b/cervisia/settingsdlg.h index 2f7effb4..e07c2153 100644 --- a/cervisia/settingsdlg.h +++ b/cervisia/settingsdlg.h @@ -22,7 +22,7 @@ #define SETTINGSDLG_H -#include <qpushbutton.h> +#include <tqpushbutton.h> #include <kdialogbase.h> @@ -40,7 +40,7 @@ class FontButton : public QPushButton Q_OBJECT public: - FontButton( const QString &text, QWidget *parent=0, const char *name=0 ); + FontButton( const TQString &text, TQWidget *parent=0, const char *name=0 ); private slots: void chooseFont(); @@ -52,7 +52,7 @@ class SettingsDialog : public KDialogBase Q_OBJECT public: - SettingsDialog( KConfig *conf, QWidget *parent=0, const char *name=0 ); + SettingsDialog( KConfig *conf, TQWidget *parent=0, const char *name=0 ); virtual ~SettingsDialog(); protected slots: @@ -75,8 +75,8 @@ private: KLineEdit *usernameedit; KLineEdit *diffoptedit; KURLRequester *extdiffedit; - QCheckBox *remotestatusbox; - QCheckBox *localstatusbox; + TQCheckBox *remotestatusbox; + TQCheckBox *localstatusbox; FontButton* m_protocolFontBox; FontButton* m_annotateFontBox; FontButton* m_diffFontBox; @@ -90,7 +90,7 @@ private: KColorButton* m_diffInsertButton; KColorButton* m_diffDeleteButton; - QCheckBox* m_splitterBox; + TQCheckBox* m_splitterBox; AdvancedPage* m_advancedPage; KConfig* serviceConfig; diff --git a/cervisia/stringmatcher.cpp b/cervisia/stringmatcher.cpp index 1f0b4de8..6e70a6e0 100644 --- a/cervisia/stringmatcher.cpp +++ b/cervisia/stringmatcher.cpp @@ -28,27 +28,27 @@ namespace Cervisia { namespace { - const QChar asterix('*'); - const QChar question('?'); + const TQChar asterix('*'); + const TQChar question('?'); - inline bool isMetaCharacter(QChar c) + inline bool isMetaCharacter(TQChar c) { return c == asterix || c == question; } - unsigned int countMetaCharacters(const QString& text); + unsigned int countMetaCharacters(const TQString& text); } -bool StringMatcher::match(const QString& text) const +bool StringMatcher::match(const TQString& text) const { if (m_exactPatterns.find(text) != m_exactPatterns.end()) { return true; } - for (QStringList::const_iterator it(m_startPatterns.begin()), + for (TQStringList::const_iterator it(m_startPatterns.begin()), itEnd(m_startPatterns.end()); it != itEnd; ++it) { @@ -58,7 +58,7 @@ bool StringMatcher::match(const QString& text) const } } - for (QStringList::const_iterator it(m_endPatterns.begin()), + for (TQStringList::const_iterator it(m_endPatterns.begin()), itEnd(m_endPatterns.end()); it != itEnd; ++it) { @@ -68,7 +68,7 @@ bool StringMatcher::match(const QString& text) const } } - for (QValueList<QCString>::const_iterator it(m_generalPatterns.begin()), + for (TQValueList<TQCString>::const_iterator it(m_generalPatterns.begin()), itEnd(m_generalPatterns.end()); it != itEnd; ++it) { @@ -82,7 +82,7 @@ bool StringMatcher::match(const QString& text) const } -void StringMatcher::add(const QString& pattern) +void StringMatcher::add(const TQString& pattern) { if (pattern.isEmpty()) { @@ -129,12 +129,12 @@ void StringMatcher::clear() namespace { -unsigned int countMetaCharacters(const QString& text) +unsigned int countMetaCharacters(const TQString& text) { unsigned int count(0); - const QChar* pos(text.unicode()); - const QChar* posEnd(pos + text.length()); + const TQChar* pos(text.unicode()); + const TQChar* posEnd(pos + text.length()); while (pos < posEnd) { count += isMetaCharacter(*pos++); diff --git a/cervisia/stringmatcher.h b/cervisia/stringmatcher.h index 17ecd3e8..baedc69f 100644 --- a/cervisia/stringmatcher.h +++ b/cervisia/stringmatcher.h @@ -21,7 +21,7 @@ #define CERVISIA_STRINGMATCHER_H -#include <qstringlist.h> +#include <tqstringlist.h> namespace Cervisia @@ -35,12 +35,12 @@ public: /** * @return \c true, if text matches one of the given patterns. */ - bool match(const QString& text) const; + bool match(const TQString& text) const; /** * Adds pattern \a pattern. */ - void add(const QString& pattern); + void add(const TQString& pattern); /** * Removes all patterns. @@ -52,22 +52,22 @@ private: /** * The patterns which are tested in match(). */ - QStringList m_exactPatterns; + TQStringList m_exactPatterns; /** * The patterns which are tested in match(). */ - QStringList m_startPatterns; + TQStringList m_startPatterns; /** * The patterns which are tested in match(). */ - QStringList m_endPatterns; + TQStringList m_endPatterns; /** * The patterns which are tested in match(). */ - QValueList<QCString> m_generalPatterns; + TQValueList<TQCString> m_generalPatterns; }; diff --git a/cervisia/tagdlg.cpp b/cervisia/tagdlg.cpp index 2f1e7e89..7dc3df0c 100644 --- a/cervisia/tagdlg.cpp +++ b/cervisia/tagdlg.cpp @@ -20,12 +20,12 @@ #include "tagdlg.h" -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qpushbutton.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> #include <klocale.h> #include <kmessagebox.h> @@ -35,8 +35,8 @@ using Cervisia::TagDialog; TagDialog::TagDialog(ActionType action, CvsService_stub* service, - QWidget *parent, const char *name) - : KDialogBase(parent, name, true, QString::null, + TQWidget *parent, const char *name) + : KDialogBase(parent, name, true, TQString::null, Ok | Cancel | Help, Ok, true), act(action), cvsService(service), @@ -45,43 +45,43 @@ TagDialog::TagDialog(ActionType action, CvsService_stub* service, { setCaption( (action==Delete)? i18n("CVS Delete Tag") : i18n("CVS Tag") ); - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); if (action == Delete) { - tag_combo = new QComboBox(true, mainWidget); + tag_combo = new TQComboBox(true, mainWidget); tag_combo->setFocus(); tag_combo->setMinimumWidth(fontMetrics().width('0') * 30); - QLabel *tag_label = new QLabel(tag_combo, i18n("&Name of tag:"), mainWidget); + TQLabel *tag_label = new TQLabel(tag_combo, i18n("&Name of tag:"), mainWidget); - QPushButton *tag_button = new QPushButton(i18n("Fetch &List"), mainWidget); - connect( tag_button, SIGNAL(clicked()), - this, SLOT(tagButtonClicked()) ); + TQPushButton *tag_button = new TQPushButton(i18n("Fetch &List"), mainWidget); + connect( tag_button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(tagButtonClicked()) ); - QBoxLayout *tagedit_layout = new QHBoxLayout(layout); + TQBoxLayout *tagedit_layout = new TQHBoxLayout(layout); tagedit_layout->addWidget(tag_label); tagedit_layout->addWidget(tag_combo); tagedit_layout->addWidget(tag_button); } else { - tag_edit = new QLineEdit(mainWidget); + tag_edit = new TQLineEdit(mainWidget); tag_edit->setFocus(); tag_edit->setMinimumWidth(fontMetrics().width('0') * 30); - QLabel *tag_label = new QLabel(tag_edit, i18n("&Name of tag:"), mainWidget); + TQLabel *tag_label = new TQLabel(tag_edit, i18n("&Name of tag:"), mainWidget); - QBoxLayout *tagedit_layout = new QHBoxLayout(layout); + TQBoxLayout *tagedit_layout = new TQHBoxLayout(layout); tagedit_layout->addWidget(tag_label); tagedit_layout->addWidget(tag_edit); - branchtag_button = new QCheckBox(i18n("Create &branch with this tag"), mainWidget); + branchtag_button = new TQCheckBox(i18n("Create &branch with this tag"), mainWidget); layout->addWidget(branchtag_button); - forcetag_button = new QCheckBox(i18n("&Force tag creation even if tag already exists"), mainWidget); + forcetag_button = new TQCheckBox(i18n("&Force tag creation even if tag already exists"), mainWidget); layout->addWidget(forcetag_button); } @@ -101,7 +101,7 @@ bool TagDialog::forceTag() const } -QString TagDialog::tag() const +TQString TagDialog::tag() const { return act==Delete? tag_combo->currentText() : tag_edit->text(); } @@ -109,7 +109,7 @@ QString TagDialog::tag() const void TagDialog::slotOk() { - QString const str(tag()); + TQString const str(tag()); if (str.isEmpty()) { diff --git a/cervisia/tagdlg.h b/cervisia/tagdlg.h index 4d1e4754..fedb738a 100644 --- a/cervisia/tagdlg.h +++ b/cervisia/tagdlg.h @@ -41,11 +41,11 @@ public: enum ActionType { Create, Delete }; TagDialog( ActionType action, CvsService_stub* service, - QWidget *parent=0, const char *name=0 ); + TQWidget *parent=0, const char *name=0 ); bool branchTag() const; bool forceTag() const; - QString tag() const; + TQString tag() const; protected: virtual void slotOk(); @@ -57,10 +57,10 @@ private: ActionType act; CvsService_stub* cvsService; - QCheckBox *branchtag_button; - QCheckBox *forcetag_button; - QLineEdit *tag_edit; - QComboBox *tag_combo; + TQCheckBox *branchtag_button; + TQCheckBox *forcetag_button; + TQLineEdit *tag_edit; + TQComboBox *tag_combo; }; } diff --git a/cervisia/tooltip.cpp b/cervisia/tooltip.cpp index 7debf9d7..728945ca 100644 --- a/cervisia/tooltip.cpp +++ b/cervisia/tooltip.cpp @@ -22,27 +22,27 @@ #include <kglobal.h> #include <kglobalsettings.h> -#include <qsimplerichtext.h> +#include <tqsimplerichtext.h> namespace Cervisia { -static QString truncateLines(const QString&, const QFontMetrics&, const QSize&); -static QString truncateLines(const QString&, const QFont&, const QPoint&, const QRect&); +static TQString truncateLines(const TQString&, const TQFontMetrics&, const TQSize&); +static TQString truncateLines(const TQString&, const TQFont&, const TQPoint&, const TQRect&); -ToolTip::ToolTip(QWidget* widget) - : QObject(widget), QToolTip(widget) +ToolTip::ToolTip(TQWidget* widget) + : TQObject(widget), TQToolTip(widget) { } -void ToolTip::maybeTip(const QPoint& pos) +void ToolTip::maybeTip(const TQPoint& pos) { - QRect rect; - QString text; + TQRect rect; + TQString text; emit queryToolTip(pos, rect, text); if (rect.isValid() && !text.isEmpty()) @@ -59,11 +59,11 @@ void ToolTip::maybeTip(const QPoint& pos) // Primtive routine to truncate the text. size.width() is ignored, only // size.height() is used at the moment to keep it fast. It doesn't work // correct if text lines have different heights. -QString truncateLines(const QString& text, - const QFontMetrics& fm, - const QSize& size) +TQString truncateLines(const TQString& text, + const TQFontMetrics& fm, + const TQSize& size) { - const QChar newLine('\n'); + const TQChar newLine('\n'); const int lineSpacing(fm.lineSpacing()); const int numberOfLines(text.contains(newLine) + 1); @@ -72,7 +72,7 @@ QString truncateLines(const QString& text, if (numberOfLines <= maxNumberOfLines) return text; - const QChar* unicode(text.unicode()); + const TQChar* unicode(text.unicode()); for (int count(maxNumberOfLines); count; ++unicode) if (*unicode == newLine) --count; @@ -82,10 +82,10 @@ QString truncateLines(const QString& text, // Truncate the tooltip's text if necessary -QString truncateLines(const QString& text, - const QFont& font, - const QPoint& globalPos, - const QRect& desktopGeometry) +TQString truncateLines(const TQString& text, + const TQFont& font, + const TQPoint& globalPos, + const TQRect& desktopGeometry) { // maximum size of the tooltip, - 10 just to be safe const int maxWidth(kMax(desktopGeometry.width() - globalPos.x(), globalPos.x()) @@ -94,13 +94,13 @@ QString truncateLines(const QString& text, - desktopGeometry.top() - 10); // calculate the tooltip's size - const QSimpleRichText layoutedText(text, font); + const TQSimpleRichText layoutedText(text, font); // only if the tooltip's size is bigger in x- and y-direction the text must // be truncated otherwise the tip is moved to a position where it fits return ((layoutedText.widthUsed() > maxWidth) && (layoutedText.height() > maxHeight)) - ? truncateLines(text, QFontMetrics(font), QSize(maxWidth, maxHeight)) + ? truncateLines(text, TQFontMetrics(font), TQSize(maxWidth, maxHeight)) : text; } diff --git a/cervisia/tooltip.h b/cervisia/tooltip.h index fc0cd7be..f6a47999 100644 --- a/cervisia/tooltip.h +++ b/cervisia/tooltip.h @@ -21,8 +21,8 @@ #define CERVISIA_TOOLTIP_H -#include <qobject.h> -#include <qtooltip.h> +#include <tqobject.h> +#include <tqtooltip.h> namespace Cervisia @@ -30,11 +30,11 @@ namespace Cervisia /** - * This class extends QToolTip: + * This class extends TQToolTip: * - no more need to subclass just connect to the signal queryToolTip() * - truncate too large tooltip texts. */ -class ToolTip : public QObject, public QToolTip +class ToolTip : public TQObject, public QToolTip { Q_OBJECT @@ -42,10 +42,10 @@ public: /** * @param widget The widget you want to add tooltips to. It's also used as - * parent for the QObject. So you don't have to free an instance of this + * parent for the TQObject. So you don't have to free an instance of this * class yourself. */ - explicit ToolTip(QWidget* widget); + explicit ToolTip(TQWidget* widget); signals: @@ -61,11 +61,11 @@ signals: * * @param text The tooltip text. */ - void queryToolTip(const QPoint& pos, QRect& rect, QString& text); + void queryToolTip(const TQPoint& pos, TQRect& rect, TQString& text); protected: - virtual void maybeTip(const QPoint&); + virtual void maybeTip(const TQPoint&); }; diff --git a/cervisia/updatedlg.cpp b/cervisia/updatedlg.cpp index 9a536763..4cd4367c 100644 --- a/cervisia/updatedlg.cpp +++ b/cervisia/updatedlg.cpp @@ -20,12 +20,12 @@ #include "updatedlg.h" -#include <qbuttongroup.h> -#include <qcombobox.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qstyle.h> +#include <tqbuttongroup.h> +#include <tqcombobox.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqstyle.h> #include <klineedit.h> #include <klocale.h> @@ -34,65 +34,65 @@ UpdateDialog::UpdateDialog(CvsService_stub* service, - QWidget *parent, const char *name) + TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("CVS Update"), Ok | Cancel, Ok, true), cvsService(service) { int const iComboBoxMinWidth(40 * fontMetrics().width('0')); - int const iWidgetIndent(style().pixelMetric(QStyle::PM_ExclusiveIndicatorWidth, 0) + 6); + int const iWidgetIndent(style().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0) + 6); - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - bybranch_button = new QRadioButton(i18n("Update to &branch: "), mainWidget); + bybranch_button = new TQRadioButton(i18n("Update to &branch: "), mainWidget); bybranch_button->setChecked(true); layout->addWidget(bybranch_button); - branch_combo = new QComboBox(true, mainWidget); + branch_combo = new TQComboBox(true, mainWidget); branch_combo->setMinimumWidth(iComboBoxMinWidth); - branch_button = new QPushButton(i18n("Fetch &List"), mainWidget); - connect( branch_button, SIGNAL(clicked()), - this, SLOT(branchButtonClicked()) ); + branch_button = new TQPushButton(i18n("Fetch &List"), mainWidget); + connect( branch_button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(branchButtonClicked()) ); - QBoxLayout *branchedit_layout = new QHBoxLayout(layout); + TQBoxLayout *branchedit_layout = new TQHBoxLayout(layout); branchedit_layout->addSpacing(iWidgetIndent); branchedit_layout->addWidget(branch_combo); branchedit_layout->addWidget(branch_button); - bytag_button = new QRadioButton(i18n("Update to &tag: "), mainWidget); + bytag_button = new TQRadioButton(i18n("Update to &tag: "), mainWidget); layout->addWidget(bytag_button); - tag_combo = new QComboBox(true, mainWidget); + tag_combo = new TQComboBox(true, mainWidget); tag_combo->setMinimumWidth(iComboBoxMinWidth); - tag_button = new QPushButton(i18n("Fetch L&ist"), mainWidget); - connect( tag_button, SIGNAL(clicked()), - this, SLOT(tagButtonClicked()) ); + tag_button = new TQPushButton(i18n("Fetch L&ist"), mainWidget); + connect( tag_button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(tagButtonClicked()) ); - QBoxLayout *tagedit_layout = new QHBoxLayout(layout); + TQBoxLayout *tagedit_layout = new TQHBoxLayout(layout); tagedit_layout->addSpacing(iWidgetIndent); tagedit_layout->addWidget(tag_combo); tagedit_layout->addWidget(tag_button); - bydate_button = new QRadioButton(i18n("Update to &date ('yyyy-mm-dd'):"), mainWidget); + bydate_button = new TQRadioButton(i18n("Update to &date ('yyyy-mm-dd'):"), mainWidget); layout->addWidget(bydate_button); date_edit = new KLineEdit(mainWidget); - QBoxLayout *dateedit_layout = new QHBoxLayout(layout); + TQBoxLayout *dateedit_layout = new TQHBoxLayout(layout); dateedit_layout->addSpacing(iWidgetIndent); dateedit_layout->addWidget(date_edit); - QButtonGroup* group = new QButtonGroup(mainWidget); + TQButtonGroup* group = new TQButtonGroup(mainWidget); group->hide(); group->insert(bytag_button); group->insert(bybranch_button); group->insert(bydate_button); - connect( group, SIGNAL(clicked(int)), - this, SLOT(toggled()) ); + connect( group, TQT_SIGNAL(clicked(int)), + this, TQT_SLOT(toggled()) ); // dis-/enable the widgets toggled(); @@ -105,7 +105,7 @@ bool UpdateDialog::byTag() const } -QString UpdateDialog::tag() const +TQString UpdateDialog::tag() const { return bybranch_button->isChecked() ? branch_combo->currentText() @@ -113,7 +113,7 @@ QString UpdateDialog::tag() const } -QString UpdateDialog::date() const +TQString UpdateDialog::date() const { return date_edit->text(); } diff --git a/cervisia/updatedlg.h b/cervisia/updatedlg.h index 2ce143cf..0e4e1718 100644 --- a/cervisia/updatedlg.h +++ b/cervisia/updatedlg.h @@ -38,11 +38,11 @@ class UpdateDialog : public KDialogBase public: UpdateDialog( CvsService_stub* service, - QWidget *parent=0, const char *name=0 ); + TQWidget *parent=0, const char *name=0 ); bool byTag() const; - QString tag() const; - QString date() const; + TQString tag() const; + TQString date() const; private slots: void toggled(); @@ -52,9 +52,9 @@ private slots: private: CvsService_stub* cvsService; - QRadioButton *bytag_button, *bybranch_button, *bydate_button; - QComboBox *tag_combo, *branch_combo; - QPushButton *tag_button, *branch_button; + TQRadioButton *bytag_button, *bybranch_button, *bydate_button; + TQComboBox *tag_combo, *branch_combo; + TQPushButton *tag_button, *branch_button; KLineEdit *date_edit; }; diff --git a/cervisia/updateview.cpp b/cervisia/updateview.cpp index 94679f6c..710eabd8 100644 --- a/cervisia/updateview.cpp +++ b/cervisia/updateview.cpp @@ -22,9 +22,9 @@ #include <set> -#include <qapplication.h> -#include <qfileinfo.h> -#include <qptrstack.h> +#include <tqapplication.h> +#include <tqfileinfo.h> +#include <tqptrstack.h> #include <kconfig.h> #include <klocale.h> @@ -38,7 +38,7 @@ using Cervisia::Entry; using Cervisia::EntryStatus; -UpdateView::UpdateView(KConfig& partConfig, QWidget *parent, const char *name) +UpdateView::UpdateView(KConfig& partConfig, TQWidget *parent, const char *name) : KListView(parent, name), m_partConfig(partConfig), m_unfoldingTree(false) @@ -56,22 +56,22 @@ UpdateView::UpdateView(KConfig& partConfig, QWidget *parent, const char *name) setFilter(NoFilter); - connect( this, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(itemExecuted(QListViewItem*)) ); - connect( this, SIGNAL(returnPressed(QListViewItem*)), - this, SLOT(itemExecuted(QListViewItem*)) ); + connect( this, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this, TQT_SLOT(itemExecuted(TQListViewItem*)) ); + connect( this, TQT_SIGNAL(returnPressed(TQListViewItem*)), + this, TQT_SLOT(itemExecuted(TQListViewItem*)) ); // without this restoreLayout() can't change the column widths for (int col = 0; col < columns(); ++col) - setColumnWidthMode(col, QListView::Manual); + setColumnWidthMode(col, TQListView::Manual); - restoreLayout(&m_partConfig, QString::fromLatin1("UpdateView")); + restoreLayout(&m_partConfig, TQString::fromLatin1("UpdateView")); } UpdateView::~UpdateView() { - saveLayout(&m_partConfig, QString::fromLatin1("UpdateView")); + saveLayout(&m_partConfig, TQString::fromLatin1("UpdateView")); } @@ -98,18 +98,18 @@ UpdateView::Filter UpdateView::filter() const // returns true iff exactly one UpdateFileItem is selected bool UpdateView::hasSingleSelection() const { - const QPtrList<QListViewItem>& listSelectedItems(selectedItems()); + const TQPtrList<TQListViewItem>& listSelectedItems(selectedItems()); return (listSelectedItems.count() == 1) && isFileItem(listSelectedItems.getFirst()); } -void UpdateView::getSingleSelection(QString *filename, QString *revision) const +void UpdateView::getSingleSelection(TQString *filename, TQString *revision) const { - const QPtrList<QListViewItem>& listSelectedItems(selectedItems()); + const TQPtrList<TQListViewItem>& listSelectedItems(selectedItems()); - QString tmpFileName; - QString tmpRevision; + TQString tmpFileName; + TQString tmpRevision; if ((listSelectedItems.count() == 1) && isFileItem(listSelectedItems.getFirst())) { UpdateFileItem* fileItem(static_cast<UpdateFileItem*>(listSelectedItems.getFirst())); @@ -123,12 +123,12 @@ void UpdateView::getSingleSelection(QString *filename, QString *revision) const } -QStringList UpdateView::multipleSelection() const +TQStringList UpdateView::multipleSelection() const { - QStringList res; + TQStringList res; - const QPtrList<QListViewItem>& listSelectedItems(selectedItems()); - for (QPtrListIterator<QListViewItem> it(listSelectedItems); + const TQPtrList<TQListViewItem>& listSelectedItems(selectedItems()); + for (TQPtrListIterator<TQListViewItem> it(listSelectedItems); it.current() != 0; ++it) { if ((*it)->isVisible()) @@ -139,15 +139,15 @@ QStringList UpdateView::multipleSelection() const } -QStringList UpdateView::fileSelection() const +TQStringList UpdateView::fileSelection() const { - QStringList res; + TQStringList res; - const QPtrList<QListViewItem>& listSelectedItems(selectedItems()); - for (QPtrListIterator<QListViewItem> it(listSelectedItems); + const TQPtrList<TQListViewItem>& listSelectedItems(selectedItems()); + for (TQPtrListIterator<TQListViewItem> it(listSelectedItems); it.current() != 0; ++it) { - QListViewItem* item(*it); + TQListViewItem* item(*it); if (isFileItem(item) && item->isVisible()) res.append(static_cast<UpdateFileItem*>(item)->filePath()); @@ -157,25 +157,25 @@ QStringList UpdateView::fileSelection() const } -const QColor& UpdateView::conflictColor() const +const TQColor& UpdateView::conflictColor() const { return m_conflictColor; } -const QColor& UpdateView::localChangeColor() const +const TQColor& UpdateView::localChangeColor() const { return m_localChangeColor; } -const QColor& UpdateView::remoteChangeColor() const +const TQColor& UpdateView::remoteChangeColor() const { return m_remoteChangeColor; } -const QColor& UpdateView::notInCvsColor() const +const TQColor& UpdateView::notInCvsColor() const { return m_notInCvsColor; } @@ -188,8 +188,8 @@ bool UpdateView::isUnfoldingTree() const // updates internal data -void UpdateView::replaceItem(QListViewItem* oldItem, - QListViewItem* newItem) +void UpdateView::replaceItem(TQListViewItem* oldItem, + TQListViewItem* newItem) { const int index(relevantSelection.find(oldItem)); if (index >= 0) @@ -199,15 +199,15 @@ void UpdateView::replaceItem(QListViewItem* oldItem, void UpdateView::unfoldSelectedFolders() { - QApplication::setOverrideCursor(waitCursor); + TQApplication::setOverrideCursor(waitCursor); int previousDepth = 0; bool isUnfolded = false; - QStringList selection = multipleSelection(); + TQStringList selection = multipleSelection(); // setup name of selected folder - QString selectedItem = selection.first(); + TQString selectedItem = selection.first(); if( selectedItem.contains('/') ) selectedItem.remove(0, selectedItem.findRev('/')+1); @@ -215,8 +215,8 @@ void UpdateView::unfoldSelectedFolders() const bool updatesEnabled = isUpdatesEnabled(); setUpdatesEnabled(false); - QListViewItemIterator it(this); - while( QListViewItem* item = it.current() ) + TQListViewItemIterator it(this); + while( TQListViewItem* item = it.current() ) { if( isDirItem(item) ) { @@ -275,13 +275,13 @@ void UpdateView::unfoldSelectedFolders() setUpdatesEnabled(updatesEnabled); triggerUpdate(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } void UpdateView::unfoldTree() { - QApplication::setOverrideCursor(waitCursor); + TQApplication::setOverrideCursor(waitCursor); m_unfoldingTree = true; @@ -289,8 +289,8 @@ void UpdateView::unfoldTree() setUpdatesEnabled(false); - QListViewItemIterator it(this); - while (QListViewItem* item = it.current()) + TQListViewItemIterator it(this); + while (TQListViewItem* item = it.current()) { if (isDirItem(item)) { @@ -323,14 +323,14 @@ void UpdateView::unfoldTree() m_unfoldingTree = false; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } void UpdateView::foldTree() { - QListViewItemIterator it(this); - while (QListViewItem* item = it.current()) + TQListViewItemIterator it(this); + while (TQListViewItem* item = it.current()) { // don't close the top level directory if (isDirItem(item) && item->parent()) @@ -345,7 +345,7 @@ void UpdateView::foldTree() * Clear the tree view and insert the directory dirname * into it as the new root item */ -void UpdateView::openDirectory(const QString& dirName) +void UpdateView::openDirectory(const TQString& dirName) { clear(); @@ -411,11 +411,11 @@ void UpdateView::finishJob(bool normalExit, int exitStatus) */ void UpdateView::markUpdated(bool laststage, bool success) { - QPtrListIterator<QListViewItem> it(relevantSelection); + TQPtrListIterator<TQListViewItem> it(relevantSelection); for ( ; it.current(); ++it) if (isDirItem(it.current())) { - for (QListViewItem *item = it.current()->firstChild(); item; + for (TQListViewItem *item = it.current()->firstChild(); item; item = item->nextSibling() ) if (isFileItem(item)) { @@ -436,10 +436,10 @@ void UpdateView::markUpdated(bool laststage, bool success) */ void UpdateView::rememberSelection(bool recursive) { - std::set<QListViewItem*> setItems; - for (QListViewItemIterator it(this); it.current(); ++it) + std::set<TQListViewItem*> setItems; + for (TQListViewItemIterator it(this); it.current(); ++it) { - QListViewItem* item(it.current()); + TQListViewItem* item(it.current()); // if this item is selected and if it was not inserted already // and if we work recursive and if it is a dir item then insert @@ -450,8 +450,8 @@ void UpdateView::rememberSelection(bool recursive) && recursive && isDirItem(item)) { - QPtrStack<QListViewItem> s; - for (QListViewItem* childItem = item->firstChild(); childItem; + TQPtrStack<TQListViewItem> s; + for (TQListViewItem* childItem = item->firstChild(); childItem; childItem = childItem->nextSibling() ? childItem->nextSibling() : s.pop()) { // if this item is a dir item and if it is was not @@ -459,7 +459,7 @@ void UpdateView::rememberSelection(bool recursive) // DON'T CHANGE TESTING ORDER if (isDirItem(childItem) && setItems.insert(childItem).second) { - if (QListViewItem* childChildItem = childItem->firstChild()) + if (TQListViewItem* childChildItem = childItem->firstChild()) s.push(childChildItem); } } @@ -468,14 +468,14 @@ void UpdateView::rememberSelection(bool recursive) // Copy the set to the list relevantSelection.clear(); - std::set<QListViewItem*>::const_iterator const itItemEnd = setItems.end(); - for (std::set<QListViewItem*>::const_iterator itItem = setItems.begin(); + std::set<TQListViewItem*>::const_iterator const itItemEnd = setItems.end(); + for (std::set<TQListViewItem*>::const_iterator itItem = setItems.begin(); itItem != itItemEnd; ++itItem) relevantSelection.append(*itItem); #if 0 DEBUGOUT("Relevant:"); - QPtrListIterator<QListViewItem> it44(relevantSelection); + TQPtrListIterator<TQListViewItem> it44(relevantSelection); for (; it44.current(); ++it44) DEBUGOUT(" " << (*it44)->text(UpdateFileItem::File)); DEBUGOUT("End"); @@ -492,22 +492,22 @@ void UpdateView::syncSelection() // compute all directories which are selected or contain a selected file // (in recursive mode this includes all sub directories) std::set<UpdateDirItem*> setDirItems; - for (QPtrListIterator<QListViewItem> itItem(relevantSelection); + for (TQPtrListIterator<TQListViewItem> itItem(relevantSelection); itItem.current(); ++itItem) { - QListViewItem* item(itItem.current()); + TQListViewItem* item(itItem.current()); UpdateDirItem* dirItem(0); if (isDirItem(item)) dirItem = static_cast<UpdateDirItem*>(item); - else if (QListViewItem* parentItem = item->parent()) + else if (TQListViewItem* parentItem = item->parent()) dirItem = static_cast<UpdateDirItem*>(parentItem); if (dirItem) setDirItems.insert(dirItem); } - QApplication::setOverrideCursor(waitCursor); + TQApplication::setOverrideCursor(waitCursor); std::set<UpdateDirItem*>::const_iterator const itDirItemEnd = setDirItems.end(); for (std::set<UpdateDirItem*>::const_iterator itDirItem = setDirItems.begin(); @@ -521,7 +521,7 @@ void UpdateView::syncSelection() qApp->processEvents(); } - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } @@ -534,13 +534,13 @@ void UpdateView::updateColors() KConfigGroupSaver cs(&m_partConfig, "Colors"); m_partConfig.setGroup("Colors"); - QColor defaultColor = QColor(255, 130, 130); + TQColor defaultColor = TQColor(255, 130, 130); m_conflictColor = m_partConfig.readColorEntry("Conflict", &defaultColor); - defaultColor = QColor(130, 130, 255); + defaultColor = TQColor(130, 130, 255); m_localChangeColor = m_partConfig.readColorEntry("LocalChange", &defaultColor); - defaultColor = QColor(70, 210, 70); + defaultColor = TQColor(70, 210, 70); m_remoteChangeColor = m_partConfig.readColorEntry("RemoteChange", &defaultColor); m_notInCvsColor = CervisiaSettings::notInCvsColor(); @@ -552,7 +552,7 @@ void UpdateView::updateColors() * is true, it is assumed that the output is from a command * 'cvs update -n', i.e. cvs actually changes no files. */ -void UpdateView::processUpdateLine(QString str) +void UpdateView::processUpdateLine(TQString str) { if (str.length() > 2 && str[1] == ' ') { @@ -586,8 +586,8 @@ void UpdateView::processUpdateLine(QString str) updateItem(str.mid(2), status, false); } - const QString removedFileStart(QString::fromLatin1("cvs server: ")); - const QString removedFileEnd(QString::fromLatin1(" is no longer in the repository")); + const TQString removedFileStart(TQString::fromLatin1("cvs server: ")); + const TQString removedFileEnd(TQString::fromLatin1(" is no longer in the repository")); if (str.startsWith(removedFileStart) && str.endsWith(removedFileEnd)) { } @@ -600,12 +600,12 @@ void UpdateView::processUpdateLine(QString str) } -void UpdateView::updateItem(const QString& filePath, EntryStatus status, bool isdir) +void UpdateView::updateItem(const TQString& filePath, EntryStatus status, bool isdir) { - if (isdir && filePath == QChar('.')) + if (isdir && filePath == TQChar('.')) return; - const QFileInfo fileInfo(filePath); + const TQFileInfo fileInfo(filePath); UpdateDirItem* rootItem = static_cast<UpdateDirItem*>(firstChild()); UpdateDirItem* dirItem = findOrCreateDirItem(fileInfo.dirPath(), rootItem); @@ -614,7 +614,7 @@ void UpdateView::updateItem(const QString& filePath, EntryStatus status, bool is } -void UpdateView::itemExecuted(QListViewItem *item) +void UpdateView::itemExecuted(TQListViewItem *item) { if (isFileItem(item)) emit fileOpened(static_cast<UpdateFileItem*>(item)->filePath()); diff --git a/cervisia/updateview.h b/cervisia/updateview.h index d01446a9..d583b16b 100644 --- a/cervisia/updateview.h +++ b/cervisia/updateview.h @@ -24,7 +24,7 @@ #include <klistview.h> -#include <qptrlist.h> +#include <tqptrlist.h> #include "entry.h" @@ -42,7 +42,7 @@ public: NoRemoved=4, NoNotInCVS=8 , NoEmptyDirectories = 16 }; enum Action { Add, Remove, Update, UpdateNoAct, Commit }; - explicit UpdateView(KConfig& partConfig, QWidget *parent=0, const char *name=0); + explicit UpdateView(KConfig& partConfig, TQWidget *parent=0, const char *name=0); virtual ~UpdateView(); @@ -50,42 +50,42 @@ public: Filter filter() const; bool hasSingleSelection() const; - void getSingleSelection(QString *filename, QString *revision=0) const; + void getSingleSelection(TQString *filename, TQString *revision=0) const; /* Returns a list of all marked files and directories */ - QStringList multipleSelection() const; + TQStringList multipleSelection() const; /* Returns a list of all marked files, excluding directories*/ - QStringList fileSelection() const; + TQStringList fileSelection() const; - void openDirectory(const QString& dirname); + void openDirectory(const TQString& dirname); void prepareJob(bool recursive, Action action); - const QColor& conflictColor() const; - const QColor& localChangeColor() const; - const QColor& remoteChangeColor() const; - const QColor& notInCvsColor() const; + const TQColor& conflictColor() const; + const TQColor& localChangeColor() const; + const TQColor& remoteChangeColor() const; + const TQColor& notInCvsColor() const; /** * @return \c true iff unfoldTree() is active. */ bool isUnfoldingTree() const; - void replaceItem(QListViewItem*, QListViewItem*); + void replaceItem(TQListViewItem*, TQListViewItem*); signals: - void fileOpened(QString filename); + void fileOpened(TQString filename); public slots: void unfoldSelectedFolders(); void unfoldTree(); void foldTree(); void finishJob(bool normalExit, int exitStatus); - void processUpdateLine(QString line); + void processUpdateLine(TQString line); private slots: - void itemExecuted(QListViewItem *item); + void itemExecuted(TQListViewItem *item); private: - void updateItem(const QString &filename, Cervisia::EntryStatus status, bool isdir); + void updateItem(const TQString &filename, Cervisia::EntryStatus status, bool isdir); void rememberSelection(bool recursive); void syncSelection(); void markUpdated(bool laststage, bool success); @@ -96,12 +96,12 @@ private: Filter filt; Action act; - QPtrList<QListViewItem> relevantSelection; + TQPtrList<TQListViewItem> relevantSelection; - QColor m_conflictColor; - QColor m_localChangeColor; - QColor m_remoteChangeColor; - QColor m_notInCvsColor; + TQColor m_conflictColor; + TQColor m_localChangeColor; + TQColor m_remoteChangeColor; + TQColor m_notInCvsColor; /** * \c true iff unfoldTree() is active (is needed by UpdateDirItem::setOpen()). diff --git a/cervisia/updateview_items.cpp b/cervisia/updateview_items.cpp index 76223c24..582c9aae 100644 --- a/cervisia/updateview_items.cpp +++ b/cervisia/updateview_items.cpp @@ -22,9 +22,9 @@ #include <cassert> -#include <qdir.h> -#include <qpainter.h> -#include <qregexp.h> +#include <tqdir.h> +#include <tqpainter.h> +#include <tqregexp.h> #include <kdebug.h> #include <kglobalsettings.h> @@ -47,9 +47,9 @@ using Cervisia::EntryStatus; // ------------------------------------------------------------------------------ -QString UpdateItem::dirPath() const +TQString UpdateItem::dirPath() const { - QString path; + TQString path; const UpdateItem* item = static_cast<UpdateItem*>(parent()); while (item) @@ -57,7 +57,7 @@ QString UpdateItem::dirPath() const const UpdateItem* parentItem = static_cast<UpdateItem*>(item->parent()); if (parentItem) { - path.prepend(item->m_entry.m_name + QDir::separator()); + path.prepend(item->m_entry.m_name + TQDir::separator()); } item = parentItem; @@ -67,10 +67,10 @@ QString UpdateItem::dirPath() const } -QString UpdateItem::filePath() const +TQString UpdateItem::filePath() const { // the filePath of the root item is '.' - return parent() ? dirPath() + m_entry.m_name : QChar('.'); + return parent() ? dirPath() + m_entry.m_name : TQChar('.'); } @@ -102,7 +102,7 @@ UpdateDirItem::UpdateDirItem(UpdateView* parent, /** * Update the status of an item; if it doesn't exist yet, create new one */ -void UpdateDirItem::updateChildItem(const QString& name, +void UpdateDirItem::updateChildItem(const TQString& name, EntryStatus status, bool isdir) { @@ -154,7 +154,7 @@ void UpdateDirItem::updateEntriesItem(const Entry& entry, } fileItem->setRevTag(entry.m_revision, entry.m_tag); fileItem->setDate(entry.m_dateTime); - fileItem->setPixmap(0, isBinary ? SmallIcon("binary") : QPixmap()); + fileItem->setPixmap(0, isBinary ? SmallIcon("binary") : TQPixmap()); } return; } @@ -169,8 +169,8 @@ void UpdateDirItem::updateEntriesItem(const Entry& entry, void UpdateDirItem::scanDirectory() { - const QString& path(filePath()); - if (!QFile::exists(path)) + const TQString& path(filePath()); + if (!TQFile::exists(path)) return; const CvsDir dir(path); @@ -243,24 +243,24 @@ UpdateItem* UpdateDirItem::insertItem(UpdateItem* item) } -UpdateItem* UpdateDirItem::findItem(const QString& name) const +UpdateItem* UpdateDirItem::findItem(const TQString& name) const { const TMapItemsByName::const_iterator it = m_itemsByName.find(name); return (it != m_itemsByName.end()) ? *it : 0; } -// Qt-3.3.8 changed the parsing in QDateTime::fromString() but introduced +// Qt-3.3.8 changed the parsing in TQDateTime::fromString() but introduced // a bug which leads to the problem that days with 1 digit will incorrectly being // parsed as day 0 - which is invalid. // workaround with the implementation from Qt-3.3.6 -QDateTime parseDateTime(const QString &s) +TQDateTime parseDateTime(const TQString &s) { static const char * const qt_shortMonthNames[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; - QString monthName( s.mid( 4, 3 ) ); + TQString monthName( s.mid( 4, 3 ) ); int month = -1; // Assume that English monthnames are the default for ( int i = 0; i < 12; ++i ) { @@ -272,30 +272,30 @@ QDateTime parseDateTime(const QString &s) // If English names can't be found, search the localized ones if ( month == -1 ) { for ( int i = 1; i <= 12; ++i ) { - if ( monthName == QDate::shortMonthName( i ) ) { + if ( monthName == TQDate::shortMonthName( i ) ) { month = i; break; } } } if ( month < 1 || month > 12 ) { - qWarning( "QDateTime::fromString: Parameter out of range" ); - QDateTime dt; + qWarning( "TQDateTime::fromString: Parameter out of range" ); + TQDateTime dt; return dt; } int day = s.mid( 8, 2 ).simplifyWhiteSpace().toInt(); int year = s.right( 4 ).toInt(); - QDate date( year, month, day ); - QTime time; + TQDate date( year, month, day ); + TQTime time; int hour, minute, second; - int pivot = s.find( QRegExp(QString::fromLatin1("[0-9][0-9]:[0-9][0-9]:[0-9][0-9]")) ); + int pivot = s.find( TQRegExp(TQString::fromLatin1("[0-9][0-9]:[0-9][0-9]:[0-9][0-9]")) ); if ( pivot != -1 ) { hour = s.mid( pivot, 2 ).toInt(); minute = s.mid( pivot+3, 2 ).toInt(); second = s.mid( pivot+6, 2 ).toInt(); time.setHMS( hour, minute, second ); } - return QDateTime( date, time ); + return TQDateTime( date, time ); } // Format of the CVS/Entries file: @@ -303,15 +303,15 @@ QDateTime parseDateTime(const QString &s) void UpdateDirItem::syncWithEntries() { - const QString path(filePath() + QDir::separator()); + const TQString path(filePath() + TQDir::separator()); - QFile f(path + "CVS/Entries"); + TQFile f(path + "CVS/Entries"); if( f.open(IO_ReadOnly) ) { - QTextStream stream(&f); + TQTextStream stream(&f); while( !stream.eof() ) { - QString line = stream.readLine(); + TQString line = stream.readLine(); Cervisia::Entry entry; @@ -332,15 +332,15 @@ void UpdateDirItem::syncWithEntries() } else { - QString rev(line.section('/', 2, 2)); - const QString timestamp(line.section('/', 3, 3)); - const QString options(line.section('/', 4, 4)); + TQString rev(line.section('/', 2, 2)); + const TQString timestamp(line.section('/', 3, 3)); + const TQString options(line.section('/', 4, 4)); entry.m_tag = line.section('/', 5, 5); const bool isBinary(options.find("-kb") >= 0); // file date in local time - entry.m_dateTime = QFileInfo(path + entry.m_name).lastModified(); + entry.m_dateTime = TQFileInfo(path + entry.m_name).lastModified(); if( rev == "0" ) entry.m_status = Cervisia::LocallyAdded; @@ -356,9 +356,9 @@ void UpdateDirItem::syncWithEntries() else { // workaround Qt-3.3.8 bug with our own function (see function above) - // const QDateTime date(QDateTime::fromString(timestamp)); // UTC Time - const QDateTime date(parseDateTime(timestamp)); // UTC Time - QDateTime fileDateUTC; + // const TQDateTime date(TQDateTime::fromString(timestamp)); // UTC Time + const TQDateTime date(parseDateTime(timestamp)); // UTC Time + TQDateTime fileDateUTC; fileDateUTC.setTime_t(entry.m_dateTime.toTime_t(), Qt::UTC); if (date != fileDateUTC) entry.m_status = Cervisia::LocallyModified; @@ -378,7 +378,7 @@ void UpdateDirItem::syncWithEntries() */ void UpdateDirItem::syncWithDirectory() { - QDir dir(filePath()); + TQDir dir(filePath()); for (TMapItemsByName::iterator it(m_itemsByName.begin()), itEnd(m_itemsByName.end()); @@ -393,7 +393,7 @@ void UpdateDirItem::syncWithDirectory() if (!dir.exists(it.key())) { fileItem->setStatus(Cervisia::Removed); - fileItem->setRevTag(QString::null, QString::null); + fileItem->setRevTag(TQString::null, TQString::null); } } } @@ -460,11 +460,11 @@ void UpdateDirItem::setOpen(bool open) view->setFilter(view->filter()); } - QListViewItem::setOpen(open); + TQListViewItem::setOpen(open); } -int UpdateDirItem::compare(QListViewItem* i, +int UpdateDirItem::compare(TQListViewItem* i, int /*column*/, bool bAscending) const { @@ -479,9 +479,9 @@ int UpdateDirItem::compare(QListViewItem* i, } -QString UpdateDirItem::text(int column) const +TQString UpdateDirItem::text(int column) const { - QString result; + TQString result; if (column == Name) result = entry().m_name; @@ -541,7 +541,7 @@ bool UpdateFileItem::applyFilter(UpdateView::Filter filter) } -void UpdateFileItem::setRevTag(const QString& rev, const QString& tag) +void UpdateFileItem::setRevTag(const TQString& rev, const TQString& tag) { m_entry.m_revision = rev; @@ -549,13 +549,13 @@ void UpdateFileItem::setRevTag(const QString& rev, const QString& tag) && tag[8] == '.' && tag[11] == '.' && tag[14] == '.' && tag[17] == '.') { - const QDate tagDate(tag.mid(1, 4).toInt(), + const TQDate tagDate(tag.mid(1, 4).toInt(), tag.mid(6, 2).toInt(), tag.mid(9, 2).toInt()); - const QTime tagTime(tag.mid(12, 2).toInt(), + const TQTime tagTime(tag.mid(12, 2).toInt(), tag.mid(15, 2).toInt(), tag.mid(18, 2).toInt()); - const QDateTime tagDateTimeUtc(tagDate, tagTime); + const TQDateTime tagDateTimeUtc(tagDate, tagTime); if (tagDateTimeUtc.isValid()) { @@ -565,11 +565,11 @@ void UpdateFileItem::setRevTag(const QString& rev, const QString& tag) // Compute the difference between UTC and local timezone for this // tag date. const unsigned int dateTimeInSeconds(tagDateTimeUtc.toTime_t()); - QDateTime dateTime; + TQDateTime dateTime; dateTime.setTime_t(dateTimeInSeconds, Qt::UTC); const int localUtcOffset(dateTime.secsTo(tagDateTimeUtc)); - const QDateTime tagDateTimeLocal(tagDateTimeUtc.addSecs(localUtcOffset)); + const TQDateTime tagDateTimeLocal(tagDateTimeUtc.addSecs(localUtcOffset)); m_entry.m_tag = KGlobal::locale()->formatDateTime(tagDateTimeLocal); } @@ -589,7 +589,7 @@ void UpdateFileItem::setRevTag(const QString& rev, const QString& tag) } -void UpdateFileItem::setDate(const QDateTime& date) +void UpdateFileItem::setDate(const TQDateTime& date) { m_entry.m_dateTime = date; } @@ -649,7 +649,7 @@ int UpdateFileItem::statusClass() const } -int UpdateFileItem::compare(QListViewItem* i, +int UpdateFileItem::compare(TQListViewItem* i, int column, bool bAscending) const { @@ -687,9 +687,9 @@ int UpdateFileItem::compare(QListViewItem* i, } -QString UpdateFileItem::text(int column) const +TQString UpdateFileItem::text(int column) const { - QString result; + TQString result; switch (column) { case Name: @@ -717,15 +717,15 @@ QString UpdateFileItem::text(int column) const } -void UpdateFileItem::paintCell(QPainter *p, - const QColorGroup &cg, +void UpdateFileItem::paintCell(TQPainter *p, + const TQColorGroup &cg, int col, int width, int align) { const UpdateView* view(updateView()); - QColor color; + TQColor color; switch (m_entry.m_status) { case Cervisia::Conflict: @@ -752,17 +752,17 @@ void UpdateFileItem::paintCell(QPainter *p, break; } - const QFont oldFont(p->font()); - QColorGroup mycg(cg); + const TQFont oldFont(p->font()); + TQColorGroup mycg(cg); if (color.isValid() && color != KGlobalSettings::textColor()) { - QFont myFont(oldFont); + TQFont myFont(oldFont); myFont.setBold(true); p->setFont(myFont); - mycg.setColor(QColorGroup::Text, color); + mycg.setColor(TQColorGroup::Text, color); } - QListViewItem::paintCell(p, mycg, col, width, align); + TQListViewItem::paintCell(p, mycg, col, width, align); if (color.isValid()) { @@ -775,7 +775,7 @@ void UpdateFileItem::paintCell(QPainter *p, * Finds or creates the UpdateDirItem with path \a dirPath. If \a dirPath * is "." \a rootItem is returned. */ -UpdateDirItem* findOrCreateDirItem(const QString& dirPath, +UpdateDirItem* findOrCreateDirItem(const TQString& dirPath, UpdateDirItem* rootItem) { assert(!dirPath.isEmpty()); @@ -783,14 +783,14 @@ UpdateDirItem* findOrCreateDirItem(const QString& dirPath, UpdateDirItem* dirItem(rootItem); - if (dirPath != QChar('.')) + if (dirPath != TQChar('.')) { - const QStringList& dirNames(QStringList::split('/', dirPath)); - const QStringList::const_iterator itDirNameEnd(dirNames.end()); - for (QStringList::const_iterator itDirName(dirNames.begin()); + const TQStringList& dirNames(TQStringList::split('/', dirPath)); + const TQStringList::const_iterator itDirNameEnd(dirNames.end()); + for (TQStringList::const_iterator itDirName(dirNames.begin()); itDirName != itDirNameEnd; ++itDirName) { - const QString& dirName(*itDirName); + const TQString& dirName(*itDirName); UpdateItem* item = dirItem->findItem(dirName); if (isFileItem(item)) diff --git a/cervisia/updateview_items.h b/cervisia/updateview_items.h index 49f5cf91..0b24ca85 100644 --- a/cervisia/updateview_items.h +++ b/cervisia/updateview_items.h @@ -22,9 +22,9 @@ #define UPDATEVIEW_ITEMS_H -#include <qdatetime.h> -#include <qlistview.h> -#include <qmap.h> +#include <tqdatetime.h> +#include <tqlistview.h> +#include <tqmap.h> #include "entry.h" #include "updateview.h" @@ -35,7 +35,7 @@ class UpdateFileItem; class Visitor; -UpdateDirItem* findOrCreateDirItem(const QString&, UpdateDirItem*); +UpdateDirItem* findOrCreateDirItem(const TQString&, UpdateDirItem*); class UpdateItem : public QListViewItem @@ -43,19 +43,19 @@ class UpdateItem : public QListViewItem public: UpdateItem(UpdateView* parent, const Cervisia::Entry& entry) - : QListViewItem(parent), m_entry(entry) {} + : TQListViewItem(parent), m_entry(entry) {} UpdateItem(UpdateItem* parent, const Cervisia::Entry& entry) - : QListViewItem(parent), m_entry(entry) {} + : TQListViewItem(parent), m_entry(entry) {} const Cervisia::Entry& entry() const { return m_entry; } // Returns the path (relative to the repository). - // QString::null for the root item and its (direct) children. - // If it's not QString::null it ends with '/'. - QString dirPath() const; + // TQString::null for the root item and its (direct) children. + // If it's not TQString::null it ends with '/'. + TQString dirPath() const; // Returns the file name, including the path (relative to the repository) - QString filePath() const; + TQString filePath() const; virtual void accept(Visitor&) = 0; @@ -78,13 +78,13 @@ public: void syncWithDirectory(); void syncWithEntries(); - void updateChildItem(const QString& name, Cervisia::EntryStatus status, bool isdir); + void updateChildItem(const TQString& name, Cervisia::EntryStatus status, bool isdir); void updateEntriesItem(const Cervisia::Entry& entry, bool isBinary); bool wasScanned() const { return m_opened; } - virtual int compare(QListViewItem* i, int col, bool) const; - virtual QString text(int col) const; + virtual int compare(TQListViewItem* i, int col, bool) const; + virtual TQString text(int col) const; virtual void setOpen(bool o); virtual int rtti() const { return RTTI; } @@ -103,15 +103,15 @@ private: UpdateItem* insertItem(UpdateItem* item); - UpdateItem* findItem(const QString& name) const; + UpdateItem* findItem(const TQString& name) const; - typedef QMap<QString, UpdateItem*> TMapItemsByName; + typedef TQMap<TQString, UpdateItem*> TMapItemsByName; TMapItemsByName m_itemsByName; bool m_opened; - friend UpdateDirItem* findOrCreateDirItem(const QString&, UpdateDirItem*); + friend UpdateDirItem* findOrCreateDirItem(const TQString&, UpdateDirItem*); }; @@ -126,15 +126,15 @@ public: bool undefinedState() const { return m_undefined; } - virtual int compare(QListViewItem* i, int col, bool) const; - virtual QString text(int col) const; - virtual void paintCell(QPainter *p, const QColorGroup &cg, + virtual int compare(TQListViewItem* i, int col, bool) const; + virtual TQString text(int col) const; + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int col, int width, int align); virtual int rtti() const { return RTTI; } void setStatus(Cervisia::EntryStatus status); - void setRevTag(const QString& rev, const QString& tag); - void setDate(const QDateTime& date); + void setRevTag(const TQString& rev, const TQString& tag); + void setDate(const TQDateTime& date); void setUndefinedState(bool b) { m_undefined = b; } @@ -154,13 +154,13 @@ private: }; -inline bool isDirItem(const QListViewItem* item) +inline bool isDirItem(const TQListViewItem* item) { return item && item->rtti() == UpdateDirItem::RTTI; } -inline bool isFileItem(const QListViewItem* item) +inline bool isFileItem(const TQListViewItem* item) { return item && item->rtti() == UpdateFileItem::RTTI; } diff --git a/cervisia/updateview_visitors.cpp b/cervisia/updateview_visitors.cpp index e18b5b68..0dae046b 100644 --- a/cervisia/updateview_visitors.cpp +++ b/cervisia/updateview_visitors.cpp @@ -34,7 +34,7 @@ ApplyFilterVisitor::ApplyFilterVisitor(UpdateView::Filter filter) void ApplyFilterVisitor::preVisit(UpdateDirItem* item) { - // as QListViewItem::setVisible() is recursive we have to make + // as TQListViewItem::setVisible() is recursive we have to make // this UpdateDirItem visible first and later we can make it invisible item->setVisible(true); @@ -56,7 +56,7 @@ void ApplyFilterVisitor::postVisit(UpdateDirItem* item) || !(m_filter & UpdateView::NoEmptyDirectories) || !item->parent()); - // only set invisible as QListViewItem::setVisible() is recursive + // only set invisible as TQListViewItem::setVisible() is recursive // and so maybe overrides the state applied by the filter if (visible) { diff --git a/cervisia/watchdlg.cpp b/cervisia/watchdlg.cpp index 317f5c95..1ea42da6 100644 --- a/cervisia/watchdlg.cpp +++ b/cervisia/watchdlg.cpp @@ -20,65 +20,65 @@ #include "watchdlg.h" -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qradiobutton.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqradiobutton.h> #include <klocale.h> -WatchDialog::WatchDialog(ActionType action, QWidget *parent, const char *name) - : KDialogBase(parent, name, true, QString::null, +WatchDialog::WatchDialog(ActionType action, TQWidget *parent, const char *name) + : KDialogBase(parent, name, true, TQString::null, Ok | Cancel | Help, Ok, true) { setCaption( (action==Add)? i18n("CVS Watch Add") : i18n("CVS Watch Remove") ); - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - QLabel *textlabel = new QLabel + TQLabel *textlabel = new QLabel ( (action==Add)? i18n("Add watches for the following events:") : i18n("Remove watches for the following events:"), mainWidget ); layout->addWidget(textlabel, 0); - all_button = new QRadioButton(i18n("&All"), mainWidget); + all_button = new TQRadioButton(i18n("&All"), mainWidget); all_button->setFocus(); all_button->setChecked(true); layout->addWidget(all_button); - only_button = new QRadioButton(i18n("&Only:"), mainWidget); + only_button = new TQRadioButton(i18n("&Only:"), mainWidget); layout->addWidget(only_button); - QGridLayout *eventslayout = new QGridLayout(layout); + TQGridLayout *eventslayout = new TQGridLayout(layout); eventslayout->addColSpacing(0, 20); eventslayout->setColStretch(0, 0); eventslayout->setColStretch(1, 1); - commitbox = new QCheckBox(i18n("&Commits"), mainWidget); + commitbox = new TQCheckBox(i18n("&Commits"), mainWidget); commitbox->setEnabled(false); eventslayout->addWidget(commitbox, 0, 1); - editbox = new QCheckBox(i18n("&Edits"), mainWidget); + editbox = new TQCheckBox(i18n("&Edits"), mainWidget); editbox->setEnabled(false); eventslayout->addWidget(editbox, 1, 1); - uneditbox = new QCheckBox(i18n("&Unedits"), mainWidget); + uneditbox = new TQCheckBox(i18n("&Unedits"), mainWidget); uneditbox->setEnabled(false); eventslayout->addWidget(uneditbox, 2, 1); - QButtonGroup* group = new QButtonGroup(mainWidget); + TQButtonGroup* group = new TQButtonGroup(mainWidget); group->hide(); group->insert(all_button); group->insert(only_button); - connect( only_button, SIGNAL(toggled(bool)), - commitbox, SLOT(setEnabled(bool)) ); - connect( only_button, SIGNAL(toggled(bool)), - editbox, SLOT(setEnabled(bool)) ); - connect( only_button, SIGNAL(toggled(bool)), - uneditbox, SLOT(setEnabled(bool)) ); + connect( only_button, TQT_SIGNAL(toggled(bool)), + commitbox, TQT_SLOT(setEnabled(bool)) ); + connect( only_button, TQT_SIGNAL(toggled(bool)), + editbox, TQT_SLOT(setEnabled(bool)) ); + connect( only_button, TQT_SIGNAL(toggled(bool)), + uneditbox, TQT_SLOT(setEnabled(bool)) ); setHelp("watches"); } diff --git a/cervisia/watchdlg.h b/cervisia/watchdlg.h index 59510dc2..fc58be05 100644 --- a/cervisia/watchdlg.h +++ b/cervisia/watchdlg.h @@ -35,13 +35,13 @@ public: enum ActionType { Add, Remove }; enum Events { None=0, All=1, Commits=2, Edits=4, Unedits=8 }; - explicit WatchDialog( ActionType action, QWidget *parent=0, const char *name=0 ); + explicit WatchDialog( ActionType action, TQWidget *parent=0, const char *name=0 ); Events events() const; private: - QRadioButton *all_button, *only_button; - QCheckBox *commitbox, *editbox, *uneditbox; + TQRadioButton *all_button, *only_button; + TQCheckBox *commitbox, *editbox, *uneditbox; }; #endif diff --git a/cervisia/watchersdlg.cpp b/cervisia/watchersdlg.cpp index d7d849bd..157f154b 100644 --- a/cervisia/watchersdlg.cpp +++ b/cervisia/watchersdlg.cpp @@ -19,8 +19,8 @@ #include "watchersdlg.h" -#include <qlayout.h> -#include <qtable.h> +#include <tqlayout.h> +#include <tqtable.h> #include <kconfig.h> #include <klineedit.h> #include <klocale.h> @@ -30,18 +30,18 @@ #include "progressdlg.h" -WatchersDialog::WatchersDialog(KConfig& cfg, QWidget* parent, const char* name) - : KDialogBase(parent, name, false, QString::null, +WatchersDialog::WatchersDialog(KConfig& cfg, TQWidget* parent, const char* name) + : KDialogBase(parent, name, false, TQString::null, Close, ButtonCode(0), true) , partConfig(cfg) { - QFrame* mainWidget = makeMainWidget(); + TQFrame* mainWidget = makeMainWidget(); - QBoxLayout *layout = new QVBoxLayout(mainWidget, 0, spacingHint()); + TQBoxLayout *layout = new TQVBoxLayout(mainWidget, 0, spacingHint()); - table = new QTable(mainWidget, "watchersTable"); + table = new TQTable(mainWidget, "watchersTable"); table->setNumCols(5); - table->setSelectionMode(QTable::NoSelection); + table->setSelectionMode(TQTable::NoSelection); table->setColumnMovingEnabled(false); table->setRowMovingEnabled(false); table->setReadOnly(true); @@ -50,7 +50,7 @@ WatchersDialog::WatchersDialog(KConfig& cfg, QWidget* parent, const char* name) table->verticalHeader()->hide(); table->setLeftMargin(0); - QHeader* header = table->horizontalHeader(); + TQHeader* header = table->horizontalHeader(); header->setLabel(0, i18n("File")); header->setLabel(1, i18n("Watcher")); header->setLabel(2, i18n("Edit")); @@ -61,7 +61,7 @@ WatchersDialog::WatchersDialog(KConfig& cfg, QWidget* parent, const char* name) setWFlags(Qt::WDestructiveClose | getWFlags()); - QSize size = configDialogSize(partConfig, "WatchersDialog"); + TQSize size = configDialogSize(partConfig, "WatchersDialog"); resize(size); } @@ -73,7 +73,7 @@ WatchersDialog::~WatchersDialog() bool WatchersDialog::parseWatchers(CvsService_stub* cvsService, - const QStringList& files) + const TQStringList& files) { setCaption(i18n("CVS Watchers")); @@ -85,12 +85,12 @@ bool WatchersDialog::parseWatchers(CvsService_stub* cvsService, if( !dlg.execute() ) return false; - QString line; + TQString line; int numRows = 0; while( dlg.getLine(line) ) { // parse the output line - QStringList list = splitLine(line); + TQStringList list = splitLine(line); // ignore empty lines and unknown files if( list.isEmpty() || list[0] == "?" ) @@ -102,15 +102,15 @@ bool WatchersDialog::parseWatchers(CvsService_stub* cvsService, table->setText(numRows, 0, list[0]); table->setText(numRows, 1, list[1]); - QCheckTableItem* item = new QCheckTableItem(table, ""); + TQCheckTableItem* item = new TQCheckTableItem(table, ""); item->setChecked(list.contains("edit")); table->setItem(numRows, 2, item); - item = new QCheckTableItem(table, ""); + item = new TQCheckTableItem(table, ""); item->setChecked(list.contains("unedit")); table->setItem(numRows, 3, item); - item = new QCheckTableItem(table, ""); + item = new TQCheckTableItem(table, ""); item->setChecked(list.contains("commit")); table->setItem(numRows, 4, item); diff --git a/cervisia/watchersdlg.h b/cervisia/watchersdlg.h index 59b2d52c..c98b0dc4 100644 --- a/cervisia/watchersdlg.h +++ b/cervisia/watchersdlg.h @@ -31,14 +31,14 @@ class CvsService_stub; class WatchersDialog : public KDialogBase { public: - explicit WatchersDialog(KConfig& cfg, QWidget* parent = 0, + explicit WatchersDialog(KConfig& cfg, TQWidget* parent = 0, const char* name = 0); virtual ~WatchersDialog(); - bool parseWatchers(CvsService_stub* cvsService, const QStringList& files); + bool parseWatchers(CvsService_stub* cvsService, const TQStringList& files); private: - QTable* table; + TQTable* table; KConfig& partConfig; }; |