summaryrefslogtreecommitdiffstats
path: root/vcs/cvsservice/cvspartimpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vcs/cvsservice/cvspartimpl.cpp')
-rw-r--r--vcs/cvsservice/cvspartimpl.cpp154
1 files changed, 77 insertions, 77 deletions
diff --git a/vcs/cvsservice/cvspartimpl.cpp b/vcs/cvsservice/cvspartimpl.cpp
index e6177739..ca66e610 100644
--- a/vcs/cvsservice/cvspartimpl.cpp
+++ b/vcs/cvsservice/cvspartimpl.cpp
@@ -9,10 +9,10 @@
* *
***************************************************************************/
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include<qcheckbox.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include<tqcheckbox.h>
#include <kapplication.h>
#include <kmessagebox.h>
@@ -61,17 +61,17 @@
///////////////////////////////////////////////////////////////////////////////
// Nice name (relative to projectDirectory()) ;-)
-const QString CvsServicePartImpl::changeLogFileName( "ChangeLog" );
+const TQString CvsServicePartImpl::changeLogFileName( "ChangeLog" );
// Four spaces for every log line (except the first, which includes the
// developers name)
-const QString CvsServicePartImpl::changeLogPrependString( " " );
+const TQString CvsServicePartImpl::changeLogPrependString( " " );
///////////////////////////////////////////////////////////////////////////////
// class CvsServicePartImpl
///////////////////////////////////////////////////////////////////////////////
CvsServicePartImpl::CvsServicePartImpl( CvsServicePart *part, const char *name )
- : QObject( this, name? name : "cvspartimpl" ),
+ : TQObject( this, name? name : "cvspartimpl" ),
m_scheduler( 0 ), m_part( part ), m_widget( 0 )
{
if (requestCvsService())
@@ -80,7 +80,7 @@ CvsServicePartImpl::CvsServicePartImpl( CvsServicePart *part, const char *name )
m_scheduler = new DirectScheduler( m_widget );
m_fileInfoProvider = new CVSFileInfoProvider( part, m_cvsService );
- connect( core(), SIGNAL(projectOpened()), this, SLOT(slotProjectOpened()) );
+ connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(slotProjectOpened()) );
}
else
{
@@ -178,7 +178,7 @@ const KURL::List &CvsServicePartImpl::urlList() const
///////////////////////////////////////////////////////////////////////////////
-QStringList CvsServicePartImpl::fileList( bool relativeToProjectDir ) const
+TQStringList CvsServicePartImpl::fileList( bool relativeToProjectDir ) const
{
if (relativeToProjectDir)
return URLUtil::toRelativePaths( projectDirectory(), urlList() );
@@ -188,7 +188,7 @@ QStringList CvsServicePartImpl::fileList( bool relativeToProjectDir ) const
///////////////////////////////////////////////////////////////////////////////
-bool CvsServicePartImpl::isRegisteredInRepository( const QString &projectDirectory, const KURL &url )
+bool CvsServicePartImpl::isRegisteredInRepository( const TQString &projectDirectory, const KURL &url )
{
kdDebug(9006) << k_funcinfo << endl;
@@ -218,7 +218,7 @@ bool CvsServicePartImpl::isRegisteredInRepository( const QString &projectDirecto
///////////////////////////////////////////////////////////////////////////////
-void CvsServicePartImpl::validateURLs( const QString &projectDirectory, KURL::List &urls, CvsOperation op )
+void CvsServicePartImpl::validateURLs( const TQString &projectDirectory, KURL::List &urls, CvsOperation op )
{
kdDebug(9006) << k_funcinfo << endl;
@@ -229,7 +229,7 @@ void CvsServicePartImpl::validateURLs( const QString &projectDirectory, KURL::Li
kdDebug(9006) << "This is a Cvs Add operation and will not be checked against repository ;-)" << endl;
return;
}
- QValueList<KURL>::iterator it = urls.begin();
+ TQValueList<KURL>::iterator it = urls.begin();
while (it != urls.end())
{
if (!CvsServicePartImpl::isRegisteredInRepository( projectDirectory, (*it) ))
@@ -249,7 +249,7 @@ void CvsServicePartImpl::validateURLs( const QString &projectDirectory, KURL::Li
///////////////////////////////////////////////////////////////////////////////
-void CvsServicePartImpl::addToIgnoreList( const QString &projectDirectory, const KURL &url )
+void CvsServicePartImpl::addToIgnoreList( const TQString &projectDirectory, const KURL &url )
{
kdDebug(9006) << k_funcinfo << endl;
@@ -263,7 +263,7 @@ void CvsServicePartImpl::addToIgnoreList( const QString &projectDirectory, const
cvsdir.ignoreFile( url.fileName() );
}
-void CvsServicePartImpl::addToIgnoreList( const QString &projectDirectory, const KURL::List &urls )
+void CvsServicePartImpl::addToIgnoreList( const TQString &projectDirectory, const KURL::List &urls )
{
for (size_t i=0; i<urls.count(); ++i)
{
@@ -273,17 +273,17 @@ void CvsServicePartImpl::addToIgnoreList( const QString &projectDirectory, const
///////////////////////////////////////////////////////////////////////////////
-void CvsServicePartImpl::removeFromIgnoreList( const QString &/*projectDirectory*/, const KURL &url )
+void CvsServicePartImpl::removeFromIgnoreList( const TQString &/*projectDirectory*/, const KURL &url )
{
kdDebug(9006) << k_funcinfo << endl;
- QStringList ignoreLines;
+ TQStringList ignoreLines;
CVSDir cvsdir( url.directory() );
cvsdir.doNotIgnoreFile( url.fileName() );
}
-void CvsServicePartImpl::removeFromIgnoreList( const QString &projectDirectory, const KURL::List &urls )
+void CvsServicePartImpl::removeFromIgnoreList( const TQString &projectDirectory, const KURL::List &urls )
{
for (size_t i=0; i<urls.count(); ++i)
{
@@ -293,7 +293,7 @@ void CvsServicePartImpl::removeFromIgnoreList( const QString &projectDirectory,
///////////////////////////////////////////////////////////////////////////////
-bool CvsServicePartImpl::isValidDirectory( const QDir &dir ) const
+bool CvsServicePartImpl::isValidDirectory( const TQDir &dir ) const
{
CVSDir cvsdir( dir );
@@ -316,9 +316,9 @@ KDevMainWindow *CvsServicePartImpl::mainWindow() const
///////////////////////////////////////////////////////////////////////////////
-QString CvsServicePartImpl::projectDirectory() const
+TQString CvsServicePartImpl::projectDirectory() const
{
- return m_part->project() ? m_part->project()->projectDirectory() : QString::null;
+ return m_part->project() ? m_part->project()->projectDirectory() : TQString::null;
}
///////////////////////////////////////////////////////////////////////////////
@@ -361,7 +361,7 @@ bool CvsServicePartImpl::checkout()
CheckoutDialog dlg( m_cvsService, mainWindow()->main()->centralWidget() );
- if ( dlg.exec() == QDialog::Accepted )
+ if ( dlg.exec() == TQDialog::Accepted )
{
DCOPRef job = m_cvsService->checkout( dlg.workDir(), dlg.serverPath(),
dlg.module(), dlg.tag(), dlg.pruneDirs(), "", false
@@ -374,7 +374,7 @@ bool CvsServicePartImpl::checkout()
modulePath = dlg.workDir() + dlg.module();
m_scheduler->schedule( job );
- connect( processWidget(), SIGNAL(jobFinished(bool,int)), this, SLOT(slotCheckoutFinished(bool,int)) );
+ connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)), this, TQT_SLOT(slotCheckoutFinished(bool,int)) );
return true;
}
}
@@ -392,11 +392,11 @@ void CvsServicePartImpl::commit( const KURL::List& urlList )
return;
CommitDialog dlg( projectDirectory() + "/ChangeLog" );
- if (dlg.exec() == QDialog::Rejected)
+ if (dlg.exec() == TQDialog::Rejected)
return;
CvsOptions *options = CvsOptions::instance();
- QString logString = dlg.logMessage().join( "\n" );
+ TQString logString = dlg.logMessage().join( "\n" );
DCOPRef cvsJob = m_cvsService->commit( fileList(), logString, options->recursiveWhenCommitRemove() );
if (!m_cvsService->ok())
@@ -406,7 +406,7 @@ void CvsServicePartImpl::commit( const KURL::List& urlList )
}
m_scheduler->schedule( cvsJob );
- connect( processWidget(), SIGNAL(jobFinished(bool,int)), this, SLOT(slotJobFinished(bool,int)) );
+ connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)), this, TQT_SLOT(slotJobFinished(bool,int)) );
// 2. if requested to do so, add an entry to the Changelog too
if (dlg.mustAddToChangeLog())
@@ -434,10 +434,10 @@ void CvsServicePartImpl::update( const KURL::List& urlList )
CvsOptions *options = CvsOptions::instance();
ReleaseInputDialog dlg( mainWindow()->main()->centralWidget() );
- if (dlg.exec() == QDialog::Rejected)
+ if (dlg.exec() == TQDialog::Rejected)
return;
- QString additionalOptions = dlg.release();
+ TQString additionalOptions = dlg.release();
if (dlg.isRevert())
additionalOptions = additionalOptions + " " + options->revertOptions();
@@ -448,7 +448,7 @@ void CvsServicePartImpl::update( const KURL::List& urlList )
additionalOptions );
m_scheduler->schedule( cvsJob );
- connect( processWidget(), SIGNAL(jobFinished(bool,int)), this, SLOT(slotJobFinished(bool,int)) );
+ connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)), this, TQT_SLOT(slotJobFinished(bool,int)) );
doneOperation();
}
@@ -465,7 +465,7 @@ void CvsServicePartImpl::add( const KURL::List& urlList, bool binary )
DCOPRef cvsJob = m_cvsService->add( fileList(), binary );
m_scheduler->schedule( cvsJob );
- connect( processWidget(), SIGNAL(jobFinished(bool,int)), this, SLOT(slotJobFinished(bool,int)) );
+ connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)), this, TQT_SLOT(slotJobFinished(bool,int)) );
doneOperation();
}
@@ -480,18 +480,18 @@ void CvsServicePartImpl::annotate( const KURL::List& urlList )
return;
//get the directory of the file we want to annotate
- QString tagFilename = URLUtil::directory(projectDirectory()+"/"+fileList()[0]);
+ TQString tagFilename = URLUtil::directory(projectDirectory()+"/"+fileList()[0]);
//CVS stores tag information in the ./CVS/Tag file
tagFilename += "/CVS/Tag";
//Check if such a Tag file exists, and try to read the tag/branch from it
- QFile fileTag(tagFilename);
- QString strRev = ""; //default revision is empty ...
+ TQFile fileTag(tagFilename);
+ TQString strRev = ""; //default revision is empty ...
if (fileTag.exists()) { //... but if there is a Tag file, we get the revision from there
if ( fileTag.open( IO_ReadOnly ) ) {
- QTextStream stream( &fileTag );
- QString line;
+ TQTextStream stream( &fileTag );
+ TQString line;
line = stream.readLine();
if (line.startsWith("T")) { //the line always starts with a "T"...
strRev = line.right(line.length()-1); //...and after this there is the tag name
@@ -531,7 +531,7 @@ void CvsServicePartImpl::unedit( const KURL::List& urlList)
DCOPRef cvsJob = m_cvsService->unedit( fileList() );
m_scheduler->schedule( cvsJob );
- connect( processWidget(), SIGNAL(jobFinished(bool,int)), this, SLOT(slotJobFinished(bool,int)) );
+ connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)), this, TQT_SLOT(slotJobFinished(bool,int)) );
doneOperation();
}
@@ -548,7 +548,7 @@ void CvsServicePartImpl::edit( const KURL::List& urlList)
DCOPRef cvsJob = m_cvsService->edit( fileList() );
m_scheduler->schedule( cvsJob );
- connect( processWidget(), SIGNAL(jobFinished(bool,int)), this, SLOT(slotJobFinished(bool,int)) );
+ connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)), this, TQT_SLOT(slotJobFinished(bool,int)) );
doneOperation();
}
@@ -582,8 +582,8 @@ void CvsServicePartImpl::remove( const KURL::List& urlList )
DCOPRef cvsJob = m_cvsService->remove( fileList(), true );
m_scheduler->schedule( cvsJob );
- connect( processWidget(), SIGNAL(jobFinished(bool,int)),
- this, SLOT(slotJobFinished(bool,int)) );
+ connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)),
+ this, TQT_SLOT(slotJobFinished(bool,int)) );
doneOperation();
}
@@ -606,8 +606,8 @@ void CvsServicePartImpl::removeStickyFlag( const KURL::List& urlList )
"-A" );
m_scheduler->schedule( cvsJob );
- connect( processWidget(), SIGNAL(jobFinished(bool,int)),
- this, SLOT(slotJobFinished(bool,int)) );
+ connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)),
+ this, TQT_SLOT(slotJobFinished(bool,int)) );
doneOperation();
}
@@ -642,7 +642,7 @@ void CvsServicePartImpl::diff( const KURL::List& urlList )
CVSEntry entry = cvsdir.fileStatus( urlList[0].fileName() );
DiffDialog dlg(entry);
- if (dlg.exec() != QDialog::Accepted)
+ if (dlg.exec() != TQDialog::Accepted)
return;
CvsOptions *options = CvsOptions::instance();
@@ -656,8 +656,8 @@ void CvsServicePartImpl::diff( const KURL::List& urlList )
}
m_scheduler->schedule( cvsJob );
- connect( processWidget(), SIGNAL(jobFinished(bool,int)),
- this, SLOT(slotDiffFinished(bool,int)) );
+ connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)),
+ this, TQT_SLOT(slotDiffFinished(bool,int)) );
doneOperation();
}
@@ -673,15 +673,15 @@ void CvsServicePartImpl::tag( const KURL::List& urlList )
TagDialog dlg( i18n("Creating Tag/Branch for files ..."),
mainWindow()->main()->centralWidget() );
- if (dlg.exec() != QDialog::Accepted)
+ if (dlg.exec() != TQDialog::Accepted)
return;
DCOPRef cvsJob = m_cvsService->createTag( fileList(), dlg.tagName(),
dlg.isBranch(), dlg.force() );
m_scheduler->schedule( cvsJob );
- connect( processWidget(), SIGNAL(jobFinished(bool,int)),
- this, SLOT(slotJobFinished(bool,int)) );
+ connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)),
+ this, TQT_SLOT(slotJobFinished(bool,int)) );
doneOperation();
}
@@ -698,15 +698,15 @@ void CvsServicePartImpl::unTag( const KURL::List& urlList )
TagDialog dlg( i18n("Removing Tag from files ..."),
mainWindow()->main()->centralWidget() );
dlg.tagAsBranchCheck->hide();
- if (dlg.exec() != QDialog::Accepted)
+ if (dlg.exec() != TQDialog::Accepted)
return;
DCOPRef cvsJob = m_cvsService->deleteTag( fileList(), dlg.tagName(),
dlg.isBranch(), dlg.force() );
m_scheduler->schedule( cvsJob );
- connect( processWidget(), SIGNAL(jobFinished(bool,int)),
- this, SLOT(slotJobFinished(bool,int)) );
+ connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)),
+ this, TQT_SLOT(slotJobFinished(bool,int)) );
doneOperation();
}
@@ -731,34 +731,34 @@ void CvsServicePartImpl::removeFromIgnoreList( const KURL::List& urlList )
* \FIXME Current implementation doesn't use CvsService :-( I just ported the
* old code which relies on buildcvs.sh script. [marios]
*/
-void CvsServicePartImpl::createNewProject( const QString &dirName,
- const QString &cvsRsh, const QString &location,
- const QString &message, const QString &module, const QString &vendor,
- const QString &release, bool mustInitRoot )
+void CvsServicePartImpl::createNewProject( const TQString &dirName,
+ const TQString &cvsRsh, const TQString &location,
+ const TQString &message, const TQString &module, const TQString &vendor,
+ const TQString &release, bool mustInitRoot )
{
- kdDebug( 9006 ) << "====> CvsServicePartImpl::createNewProject( const QString& )" << endl;
+ kdDebug( 9006 ) << "====> CvsServicePartImpl::createNewProject( const TQString& )" << endl;
CvsOptions *options = CvsOptions::instance();
options->setCvsRshEnvVar( cvsRsh );
options->setLocation( location );
/*
- //virtual DCOPRef import( const QString& workingDir, const QString& repository, const QString& module, const QString& ignoreList, const QString& comment, const
- QString filesToIgnore;
+ //virtual DCOPRef import( const TQString& workingDir, const TQString& repository, const TQString& module, const TQString& ignoreList, const TQString& comment, const
+ TQString filesToIgnore;
DCOPRef cvsJob = m_cvsService->import( dirName, location, module, filesToIgnore, message, vendor, release, false );
m_scheduler->schedule( cvsJob );
- connect( processWidget(), SIGNAL(jobFinished(bool,int)), this, SLOT(slotCheckoutFinished(bool,int)) );
+ connect( processWidget(), TQT_SIGNAL(jobFinished(bool,int)), this, TQT_SLOT(slotCheckoutFinished(bool,int)) );
*/
- QString rsh_preamble;
+ TQString rsh_preamble;
if ( !options->cvsRshEnvVar().isEmpty() )
rsh_preamble = "CVS_RSH=" + KShellProcess::quote( options->cvsRshEnvVar() );
- QString init;
+ TQString init;
if (mustInitRoot)
{
init = rsh_preamble + " cvs -d " + KShellProcess::quote( options->location() ) + " init && ";
}
- QString cmdLine = init + "cd " + KShellProcess::quote(dirName) +
+ TQString cmdLine = init + "cd " + KShellProcess::quote(dirName) +
" && " + rsh_preamble +
" cvs -d " + KShellProcess::quote(options->location()) +
" import -m " + KShellProcess::quote(message) + " " +
@@ -782,13 +782,13 @@ void CvsServicePartImpl::createNewProject( const QString &dirName,
bool CvsServicePartImpl::requestCvsService()
{
- QCString appId;
- QString error;
+ TQCString appId;
+ TQString error;
if (KApplication::startServiceByDesktopName( "cvsservice",
- QStringList(), &error, &appId ))
+ TQStringList(), &error, &appId ))
{
- QString msg = i18n( "Unable to find the Cervisia KPart. \n"
+ TQString msg = i18n( "Unable to find the Cervisia KPart. \n"
"Cervisia Integration will not be available. Please check your\n"
"Cervisia installation and re-try. Reason was:\n" ) + error;
KMessageBox::error( processWidget(), msg, "DCOP Error" );
@@ -825,11 +825,11 @@ void CvsServicePartImpl::flushJobs()
///////////////////////////////////////////////////////////////////////////////
-void CvsServicePartImpl::addFilesToProject( const QStringList &filesToAdd )
+void CvsServicePartImpl::addFilesToProject( const TQStringList &filesToAdd )
{
kdDebug( 9006 ) << k_funcinfo << " " << filesToAdd << endl;
- QStringList filesInCVS = checkFileListAgainstCVS( filesToAdd );
+ TQStringList filesInCVS = checkFileListAgainstCVS( filesToAdd );
if (filesInCVS.isEmpty())
return;
@@ -853,11 +853,11 @@ void CvsServicePartImpl::addFilesToProject( const QStringList &filesToAdd )
///////////////////////////////////////////////////////////////////////////////
-void CvsServicePartImpl::removedFilesFromProject(const QStringList &filesToRemove)
+void CvsServicePartImpl::removedFilesFromProject(const TQStringList &filesToRemove)
{
kdDebug( 9006 ) << k_funcinfo << endl;
- QStringList filesInCVS = checkFileListAgainstCVS( filesToRemove );
+ TQStringList filesInCVS = checkFileListAgainstCVS( filesToRemove );
if (filesInCVS.isEmpty())
return;
@@ -878,15 +878,15 @@ void CvsServicePartImpl::removedFilesFromProject(const QStringList &filesToRemov
///////////////////////////////////////////////////////////////////////////////
-QStringList CvsServicePartImpl::checkFileListAgainstCVS( const QStringList &filesToCheck ) const
+TQStringList CvsServicePartImpl::checkFileListAgainstCVS( const TQStringList &filesToCheck ) const
{
- QStringList filesInCVS;
- for (QStringList::const_iterator it = filesToCheck.begin(); it != filesToCheck.end(); ++it )
+ TQStringList filesInCVS;
+ for (TQStringList::const_iterator it = filesToCheck.begin(); it != filesToCheck.end(); ++it )
{
- const QString &fn = (*it);
- QFileInfo fi( fn );
+ const TQString &fn = (*it);
+ TQFileInfo fi( fn );
if (fi.isRelative())
- fi = projectDirectory() + QDir::separator() + fn;
+ fi = projectDirectory() + TQDir::separator() + fn;
if (isValidDirectory( fi.dirPath( true ) ))
filesInCVS += ( fi.filePath() );
}
@@ -915,7 +915,7 @@ void CvsServicePartImpl::slotDiffFinished( bool normalExit, int exitStatus )
{
core()->running( m_part, false );
- QString diff = processWidget()->output().join("\n"),
+ TQString diff = processWidget()->output().join("\n"),
err = processWidget()->errors().join("\n");
kdDebug( 9006 ) << "diff = " << diff << endl;
@@ -946,7 +946,7 @@ void CvsServicePartImpl::slotDiffFinished( bool normalExit, int exitStatus )
{
int s = KMessageBox::warningContinueCancelList( 0,
i18n("CVS output errors during diff. Do you still want to continue?"),
- QStringList::split( "\n", err, false ), i18n("Errors During Diff")
+ TQStringList::split( "\n", err, false ), i18n("Errors During Diff")
);
if ( s != KMessageBox::Continue )
return;
@@ -971,7 +971,7 @@ void CvsServicePartImpl::slotCheckoutFinished( bool exitStatus, int )
<< exitStatus << endl;
// Return a null string if the operation was not succesfull
if (!exitStatus)
- modulePath = QString::null;
+ modulePath = TQString::null;
kdDebug(9006) << " I'll emit modulePath == " << modulePath << endl;