diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
commit | dc6b8e72fed2586239e3514819238c520636c9d9 (patch) | |
tree | 88b200df0a0b7fab9d6f147596173556f1ed9a13 /quanta/components/cvsservice/cvsservice.cpp | |
parent | 6927d4436e54551917f600b706a8d6109e49de1c (diff) | |
download | tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/components/cvsservice/cvsservice.cpp')
-rw-r--r-- | quanta/components/cvsservice/cvsservice.cpp | 146 |
1 files changed, 73 insertions, 73 deletions
diff --git a/quanta/components/cvsservice/cvsservice.cpp b/quanta/components/cvsservice/cvsservice.cpp index 043af54e..4849ea72 100644 --- a/quanta/components/cvsservice/cvsservice.cpp +++ b/quanta/components/cvsservice/cvsservice.cpp @@ -14,12 +14,12 @@ ***************************************************************************/ //qt include -#include <qfile.h> -#include <qfileinfo.h> -#include <qradiobutton.h> -#include <qtextedit.h> -#include <qtextstream.h> -#include <qtimer.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqradiobutton.h> +#include <tqtextedit.h> +#include <tqtextstream.h> +#include <tqtimer.h> //kde includes #include <kaction.h> @@ -47,30 +47,30 @@ CVSService::CVSService(KActionCollection *ac) { m_menu = new KPopupMenu(); - KAction *action = new KAction(i18n("&Commit..."), "vcs_commit", 0, this, SLOT(slotCommit()), ac, "vcs_commit"); + KAction *action = new KAction(i18n("&Commit..."), "vcs_commit", 0, this, TQT_SLOT(slotCommit()), ac, "vcs_commit"); action->plug(m_menu); - action = new KAction(i18n("&Update"), "vcs_update", 0, this, SLOT(slotUpdate()), ac, "vcs_update"); + action = new KAction(i18n("&Update"), "vcs_update", 0, this, TQT_SLOT(slotUpdate()), ac, "vcs_update"); action->plug(m_menu); KPopupMenu *updateToMenu = new KPopupMenu(m_menu); m_menu->insertItem(SmallIconSet("vcs_update"), i18n("Update &To"), updateToMenu); - action = new KAction(i18n("&Tag/Date..."), "vcs_update", 0, this, SLOT(slotUpdateToTag()), ac, "vcs_update_tag_date"); + action = new KAction(i18n("&Tag/Date..."), "vcs_update", 0, this, TQT_SLOT(slotUpdateToTag()), ac, "vcs_update_tag_date"); action->plug(updateToMenu); - action = new KAction(i18n("&HEAD"), "vcs_update", 0, this, SLOT(slotUpdateToHead()), ac, "vcs_update_head"); + action = new KAction(i18n("&HEAD"), "vcs_update", 0, this, TQT_SLOT(slotUpdateToHead()), ac, "vcs_update_head"); action->plug(updateToMenu); - action = new KAction(i18n("Re&vert"), "reload", 0, this, SLOT(slotRevert()), ac, "vcs_revert"); + action = new KAction(i18n("Re&vert"), "reload", 0, this, TQT_SLOT(slotRevert()), ac, "vcs_revert"); action->plug(m_menu); m_menu->insertSeparator(); - action = new KAction(i18n("&Add to Repository..."), "vcs_add", 0, this, SLOT(slotAdd()), ac, "vcs_add"); + action = new KAction(i18n("&Add to Repository..."), "vcs_add", 0, this, TQT_SLOT(slotAdd()), ac, "vcs_add"); action->plug(m_menu); - action = new KAction(i18n("&Remove From Repository..."), "vcs_remove", 0, this, SLOT(slotRemove()), ac, "vcs_remove"); + action = new KAction(i18n("&Remove From Repository..."), "vcs_remove", 0, this, TQT_SLOT(slotRemove()), ac, "vcs_remove"); action->plug(m_menu); - action = new KAction(i18n("&Ignore in CVS Operations"), 0, this, SLOT(slotAddToCVSIgnore()), ac); + action = new KAction(i18n("&Ignore in CVS Operations"), 0, this, TQT_SLOT(slotAddToCVSIgnore()), ac); action->plug(m_menu); - action = new KAction(i18n("Do &Not Ignore in CVS Operations"), 0, this, SLOT(slotRemoveFromCVSIgnore()), ac); + action = new KAction(i18n("Do &Not Ignore in CVS Operations"), 0, this, TQT_SLOT(slotRemoveFromCVSIgnore()), ac); action->plug(m_menu); m_menu->insertSeparator(); - action = new KAction(i18n("Show &Log Messages"), 0, this, SLOT(slotBrowseLog()), ac); + action = new KAction(i18n("Show &Log Messages"), 0, this, TQT_SLOT(slotBrowseLog()), ac); action->plug(m_menu); m_cvsJob = 0L; @@ -78,8 +78,8 @@ CVSService::CVSService(KActionCollection *ac) m_cvsService =0L; m_commitDlg = new CVSCommitDlgS(); m_updateToDlg = new CVSUpdateToDlgS(); - m_timer = new QTimer(this); - connect(m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout())); + m_timer = new TQTimer(this); + connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout())); } CVSService::~CVSService() @@ -95,14 +95,14 @@ CVSService::~CVSService() delete m_updateToDlg; } -void CVSService::setAppId(const QCString &id) +void CVSService::setAppId(const TQCString &id) { m_appId = id; m_cvsService = new CvsService_stub(m_appId, "CvsService"); m_timer->start(CVSSERVICE_TIMEOUT, true); } -void CVSService::setRepository(const QString &repository) +void CVSService::setRepository(const TQString &repository) { startService(); delete m_repository; @@ -117,7 +117,7 @@ void CVSService::setRepository(const QString &repository) void CVSService::slotUpdate() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -131,7 +131,7 @@ void CVSService::slotUpdate() } } -void CVSService::slotUpdate(const QStringList &files) +void CVSService::slotUpdate(const TQStringList &files) { startService(); if (m_repository && !m_appId.isEmpty()) @@ -144,15 +144,15 @@ void CVSService::slotUpdate(const QStringList &files) m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } void CVSService::slotUpdateToTag() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -166,13 +166,13 @@ void CVSService::slotUpdateToTag() } } -void CVSService::slotUpdateToTag(const QStringList &files) +void CVSService::slotUpdateToTag(const TQStringList &files) { startService(); if (m_repository && !m_appId.isEmpty() && m_updateToDlg->exec()) { - QString extraOpts; - QString commandStr; + TQString extraOpts; + TQString commandStr; if (m_updateToDlg->tagRadioButton->isChecked()) { extraOpts = "-r " + m_updateToDlg->tagCombo->currentText(); @@ -190,15 +190,15 @@ void CVSService::slotUpdateToTag(const QStringList &files) m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } void CVSService::slotUpdateToHead() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -212,7 +212,7 @@ void CVSService::slotUpdateToHead() } } -void CVSService::slotUpdateToHead(const QStringList &files) +void CVSService::slotUpdateToHead(const TQStringList &files) { startService(); if (m_repository && !m_appId.isEmpty()) @@ -225,15 +225,15 @@ void CVSService::slotUpdateToHead(const QStringList &files) m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } void CVSService::slotCommit() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -247,7 +247,7 @@ void CVSService::slotCommit() } } -void CVSService::slotCommit(const QStringList &files) +void CVSService::slotCommit(const TQStringList &files) { startService(); m_commitDlg->fileList->clear(); @@ -259,7 +259,7 @@ void CVSService::slotCommit(const QStringList &files) if (m_repository && !m_appId.isEmpty() && m_commitDlg->exec()) { m_commitDlg->messageCombo->removeItem(0); - QString message = m_commitDlg->logEdit->text(); + TQString message = m_commitDlg->logEdit->text(); if (message != m_commitDlg->messageCombo->currentText()) m_commitDlg->messageCombo->insertItem(message, 0); emit clearMessages(); @@ -270,15 +270,15 @@ void CVSService::slotCommit(const QStringList &files) m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } void CVSService::slotRevert() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -292,7 +292,7 @@ void CVSService::slotRevert() } } -void CVSService::slotRevert(const QStringList &files) +void CVSService::slotRevert(const TQStringList &files) { startService(); if (m_repository && !m_appId.isEmpty()) @@ -305,15 +305,15 @@ void CVSService::slotRevert(const QStringList &files) m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } void CVSService::slotAdd() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -327,7 +327,7 @@ void CVSService::slotAdd() } } -void CVSService::slotAdd(const QStringList &files) +void CVSService::slotAdd(const TQStringList &files) { startService(); if (m_repository && !m_appId.isEmpty() && (KMessageBox::questionYesNoList(0, i18n("Add the following files to repository?"), files, i18n("CVS Add"), KStdGuiItem::add(), i18n("Do Not Add")) == KMessageBox::Yes)) @@ -340,15 +340,15 @@ void CVSService::slotAdd(const QStringList &files) m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } void CVSService::slotRemove() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -362,7 +362,7 @@ void CVSService::slotRemove() } } -void CVSService::slotRemove(const QStringList &files) +void CVSService::slotRemove(const TQStringList &files) { startService(); if (m_repository && !m_appId.isEmpty() && (KMessageBox::warningContinueCancelList(0, i18n("<qt>Remove the following files from the repository?<br>This will remove your <b>working copy</b> as well.</qt>"), files, i18n("CVS Remove")) == KMessageBox::Continue)) @@ -375,8 +375,8 @@ void CVSService::slotRemove(const QStringList &files) m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } @@ -388,7 +388,7 @@ void CVSService::slotBrowseLog() { if (m_defaultFile.startsWith(m_repositoryPath)) { - QString file = m_defaultFile.remove(m_repositoryPath); + TQString file = m_defaultFile.remove(m_repositoryPath); if (m_repository && !m_appId.isEmpty() ) { emit clearMessages(); @@ -399,8 +399,8 @@ void CVSService::slotBrowseLog() m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } else @@ -417,14 +417,14 @@ void CVSService::slotAddToCVSIgnore() if (m_defaultFile.startsWith(m_repositoryPath)) { emit clearMessages(); - QFileInfo fInfo(m_defaultFile); - QFile f(fInfo.dirPath()+ "/.cvsignore"); + TQFileInfo fInfo(m_defaultFile); + TQFile f(fInfo.dirPath()+ "/.cvsignore"); if (f.open(IO_ReadWrite)) { bool found = false; - QTextStream str(&f); - str.setEncoding(QTextStream::UnicodeUTF8); - QString line; + TQTextStream str(&f); + str.setEncoding(TQTextStream::UnicodeUTF8); + TQString line; while (!str.atEnd()) { line = str.readLine().stripWhiteSpace(); @@ -457,15 +457,15 @@ void CVSService::slotRemoveFromCVSIgnore() if (m_defaultFile.startsWith(m_repositoryPath)) { emit clearMessages(); - QString content; - QFileInfo fInfo(m_defaultFile); - QFile f(fInfo.dirPath()+ "/.cvsignore"); + TQString content; + TQFileInfo fInfo(m_defaultFile); + TQFile f(fInfo.dirPath()+ "/.cvsignore"); bool found = false; if (f.open(IO_ReadWrite)) { - QTextStream str(&f); - str.setEncoding(QTextStream::UnicodeUTF8); - QString line; + TQTextStream str(&f); + str.setEncoding(TQTextStream::UnicodeUTF8); + TQString line; while (!str.atEnd()) { line = str.readLine().stripWhiteSpace(); @@ -483,8 +483,8 @@ void CVSService::slotRemoveFromCVSIgnore() } if (found && f.open(IO_WriteOnly)) { - QTextStream str(&f); - str.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream str(&f); + str.setEncoding(TQTextStream::UnicodeUTF8); str << content; emit showMessage(i18n("\"%1\" removed from the CVS ignore list.").arg(fInfo.fileName()) + "\n", false); f.close(); @@ -508,20 +508,20 @@ void CVSService::slotJobExited(bool normalExit, int exitStatus) emit commandExecuted(m_cvsCommand, m_files); } disconnectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)"); - disconnectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)"); - disconnectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)"); + disconnectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)"); + disconnectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)"); //delete m_cvsJob; //m_cvsJob = 0L; emit showMessage(i18n("CVS command finished."), false); emit showMessage(" ", false); } -void CVSService::slotReceivedStdout(QString output) +void CVSService::slotReceivedStdout(TQString output) { emit showMessage(output, true); } -void CVSService::slotReceivedStderr(QString output) +void CVSService::slotReceivedStderr(TQString output) { emit showMessage(output, true); } @@ -536,8 +536,8 @@ void CVSService::startService() { if (!m_cvsService) { - QString error; - KApplication::startServiceByDesktopName("cvsservice", QStringList(), &error, + TQString error; + KApplication::startServiceByDesktopName("cvsservice", TQStringList(), &error, &m_appId); m_cvsService = new CvsService_stub(m_appId, "CvsService"); } |