summaryrefslogtreecommitdiffstats
path: root/vcs/cvsservice/cvsfileinfoprovider.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /vcs/cvsservice/cvsfileinfoprovider.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'vcs/cvsservice/cvsfileinfoprovider.cpp')
-rw-r--r--vcs/cvsservice/cvsfileinfoprovider.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/vcs/cvsservice/cvsfileinfoprovider.cpp b/vcs/cvsservice/cvsfileinfoprovider.cpp
index 1ac5bd76..cbfc726f 100644
--- a/vcs/cvsservice/cvsfileinfoprovider.cpp
+++ b/vcs/cvsservice/cvsfileinfoprovider.cpp
@@ -9,8 +9,8 @@
* *
***************************************************************************/
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <kurl.h>
#include <kdebug.h>
@@ -35,7 +35,7 @@ CVSFileInfoProvider::CVSFileInfoProvider( CvsServicePart *parent, CvsService_stu
: KDevVCSFileInfoProvider( parent, "cvsfileinfoprovider" ),
m_requestStatusJob( 0 ), m_cvsService( cvsService ), m_cachedDirEntries( 0 )
{
- connect( this, SIGNAL(needStatusUpdate(const CVSDir&)), this, SLOT(updateStatusFor(const CVSDir&)));
+ connect( this, TQT_SIGNAL(needStatusUpdate(const CVSDir&)), this, TQT_SLOT(updateStatusFor(const CVSDir&)));
}
///////////////////////////////////////////////////////////////////////////////
@@ -50,14 +50,14 @@ CVSFileInfoProvider::~CVSFileInfoProvider()
///////////////////////////////////////////////////////////////////////////////
-const VCSFileInfoMap *CVSFileInfoProvider::status( const QString &dirPath )
+const VCSFileInfoMap *CVSFileInfoProvider::status( const TQString &dirPath )
{
// Same dir: we can do with cache ...
if (dirPath != m_previousDirPath)
{
// ... different dir: flush old cache and cache new dir
delete m_cachedDirEntries;
- CVSDir cvsdir( projectDirectory() + QDir::separator() + dirPath );
+ CVSDir cvsdir( projectDirectory() + TQDir::separator() + dirPath );
m_previousDirPath = dirPath;
m_cachedDirEntries = cvsdir.cacheableDirStatus();
}
@@ -66,7 +66,7 @@ const VCSFileInfoMap *CVSFileInfoProvider::status( const QString &dirPath )
///////////////////////////////////////////////////////////////////////////////
-bool CVSFileInfoProvider::requestStatus( const QString &dirPath, void *callerData, bool recursive, bool checkRepos )
+bool CVSFileInfoProvider::requestStatus( const TQString &dirPath, void *callerData, bool recursive, bool checkRepos )
{
m_savedCallerData = callerData;
if (m_requestStatusJob)
@@ -85,7 +85,7 @@ bool CVSFileInfoProvider::requestStatus( const QString &dirPath, void *callerDat
if (!checkRepos) {
kdDebug(9006) << "No repo check reqested; Just read CVS/Entries from: " << dirPath << endl;
- QDir qd(projectDirectory()+QDir::separator()+dirPath);
+ TQDir qd(projectDirectory()+TQDir::separator()+dirPath);
CVSDir cdir(qd);
if (cdir.isValid())
{
@@ -100,7 +100,7 @@ bool CVSFileInfoProvider::requestStatus( const QString &dirPath, void *callerDat
// When "cvs status" get's called nonrecursiv for a directory, it will
// not print anything if the path ends with a slash. So we need to ensure
// this here.
- QString newPath = dirPath;
+ TQString newPath = dirPath;
if (newPath.endsWith("/"))
newPath.truncate( newPath.length()-1 );
@@ -111,11 +111,11 @@ bool CVSFileInfoProvider::requestStatus( const QString &dirPath, void *callerDat
kdDebug(9006) << "Running command : " << m_requestStatusJob->cvsCommand() << endl;
connectDCOPSignal( job.app(), job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true );
- connectDCOPSignal( job.app(), job.obj(), "receivedStdout(QString)", "slotReceivedOutput(QString)", true );
+ connectDCOPSignal( job.app(), job.obj(), "receivedStdout(TQString)", "slotReceivedOutput(TQString)", true );
return m_requestStatusJob->execute();
/*
kdDebug(9006) << k_funcinfo << "Attempting to parse " << dirPath << " using CVS/Entries" << endl;
- QDir qd(dirPath);
+ TQDir qd(dirPath);
CVSDir cdir(qd);
if (cdir.isValid())
{
@@ -146,7 +146,7 @@ void CVSFileInfoProvider::updateStatusFor(const CVSDir& dir)
* item conains any childs. Therefor we need to give FileTree some time
* to update the directory item before we give the status infos.
*/
- QTimer::singleShot( 1000, this, SLOT(propagateUpdate()) );
+ TQTimer::singleShot( 1000, this, TQT_SLOT(propagateUpdate()) );
}
///////////////////////////////////////////////////////////////////////////////
@@ -167,9 +167,9 @@ void CVSFileInfoProvider::slotJobExited( bool normalExit, int /*exitStatus*/ )
///////////////////////////////////////////////////////////////////////////////
-void CVSFileInfoProvider::slotReceivedOutput( QString someOutput )
+void CVSFileInfoProvider::slotReceivedOutput( TQString someOutput )
{
- QStringList strings = m_bufferedReader.process( someOutput );
+ TQStringList strings = m_bufferedReader.process( someOutput );
if (strings.count() > 0)
{
m_statusLines += strings;
@@ -178,32 +178,32 @@ void CVSFileInfoProvider::slotReceivedOutput( QString someOutput )
///////////////////////////////////////////////////////////////////////////////
-void CVSFileInfoProvider::slotReceivedErrors( QString /*someErrors*/ )
+void CVSFileInfoProvider::slotReceivedErrors( TQString /*someErrors*/ )
{
/* Nothing to do */
}
///////////////////////////////////////////////////////////////////////////////
-QString CVSFileInfoProvider::projectDirectory() const
+TQString CVSFileInfoProvider::projectDirectory() const
{
return owner()->project()->projectDirectory();
}
///////////////////////////////////////////////////////////////////////////////
-VCSFileInfoMap *CVSFileInfoProvider::parse( QStringList stringStream )
+VCSFileInfoMap *CVSFileInfoProvider::parse( TQStringList stringStream )
{
- QRegExp rx_recordStart( "^=+$" );
- QRegExp rx_fileName( "^File: (\\.|\\-|\\w)+" );
- QRegExp rx_fileStatus( "Status: (\\.|-|\\s|\\w)+" );
- QRegExp rx_fileWorkRev( "\\bWorking revision:" );
- QRegExp rx_fileRepoRev( "\\bRepository revision:" );
- //QRegExp rx_stickyTag( "\\s+(Sticky Tag:\\W+(w+|\\(none\\)))" );
- //QRegExp rx_stickyDate( "" ); // @todo but are they useful?? :-/
- //QRegExp rx_stickyOptions( "" ); //@todo
-
- QString fileName,
+ TQRegExp rx_recordStart( "^=+$" );
+ TQRegExp rx_fileName( "^File: (\\.|\\-|\\w)+" );
+ TQRegExp rx_fileStatus( "Status: (\\.|-|\\s|\\w)+" );
+ TQRegExp rx_fileWorkRev( "\\bWorking revision:" );
+ TQRegExp rx_fileRepoRev( "\\bRepository revision:" );
+ //TQRegExp rx_stickyTag( "\\s+(Sticky Tag:\\W+(w+|\\(none\\)))" );
+ //TQRegExp rx_stickyDate( "" ); // @todo but are they useful?? :-/
+ //TQRegExp rx_stickyOptions( "" ); //@todo
+
+ TQString fileName,
fileStatus,
workingRevision,
repositoryRevision,
@@ -217,9 +217,9 @@ VCSFileInfoMap *CVSFileInfoProvider::parse( QStringList stringStream )
const int lastAcceptableState = 4;
// This is where the dirty parsing is done: from a string stream representing the
// 'cvs log' output we build a map with more useful strunctured data ;-)
- for (QStringList::const_iterator it=stringStream.begin(); it != stringStream.end(); ++it)
+ for (TQStringList::const_iterator it=stringStream.begin(); it != stringStream.end(); ++it)
{
- QString s = (*it).stripWhiteSpace();
+ TQString s = (*it).stripWhiteSpace();
kdDebug(9006) << ">> Parsing: " << s << endl;
if (rx_recordStart.exactMatch( s ))
@@ -235,7 +235,7 @@ VCSFileInfoMap *CVSFileInfoProvider::parse( QStringList stringStream )
{
workingRevision = s.replace( "Working revision:", "" ).stripWhiteSpace();
- QRegExp rx_revision( "\\b(((\\d)+\\.?)*|New file!)" );
+ TQRegExp rx_revision( "\\b(((\\d)+\\.?)*|New file!)" );
if (rx_revision.search( workingRevision ) >= 0)
{
workingRevision = rx_revision.cap();
@@ -247,7 +247,7 @@ VCSFileInfoMap *CVSFileInfoProvider::parse( QStringList stringStream )
{
repositoryRevision = s.replace( "Repository revision:", "" ).stripWhiteSpace();
- QRegExp rx_revision( "\\b(((\\d)+\\.?)*|No revision control file)" );
+ TQRegExp rx_revision( "\\b(((\\d)+\\.?)*|No revision control file)" );
if (rx_revision.search( s ) >= 0)
{
repositoryRevision = rx_revision.cap();
@@ -276,11 +276,11 @@ VCSFileInfoMap *CVSFileInfoProvider::parse( QStringList stringStream )
///////////////////////////////////////////////////////////////////////////////
-VCSFileInfo::FileState CVSFileInfoProvider::String2EnumState( QString stateAsString )
+VCSFileInfo::FileState CVSFileInfoProvider::String2EnumState( TQString stateAsString )
{
// @todo add more status as "Conflict" and "Sticky" (but I dunno how CVS writes it so I'm going
// to await until I have a conflict or somebody else fix it ;-)
- // @todo use QRegExp for better matching since it seems strings have changed between CVS releases :-(
+ // @todo use TQRegExp for better matching since it seems strings have changed between CVS releases :-(
// @todo a new state for 'Needs patch'
if (stateAsString == "Up-to-date")
return VCSFileInfo::Uptodate;