summaryrefslogtreecommitdiffstats
path: root/vcs/subversion/subversion_fileinfo.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/subversion/subversion_fileinfo.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/subversion/subversion_fileinfo.cpp')
-rw-r--r--vcs/subversion/subversion_fileinfo.cpp108
1 files changed, 54 insertions, 54 deletions
diff --git a/vcs/subversion/subversion_fileinfo.cpp b/vcs/subversion/subversion_fileinfo.cpp
index ee68575c..be0a4411 100644
--- a/vcs/subversion/subversion_fileinfo.cpp
+++ b/vcs/subversion/subversion_fileinfo.cpp
@@ -20,14 +20,14 @@
#include "subversion_fileinfo.h"
#include "subversion_core.h"
#include <kdebug.h>
-#include <qfileinfo.h>
-#include <qdir.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
#include <kdevproject.h>
#include <unistd.h>
#include <kapplication.h>
#include <kdevmainwindow.h>
#include <kmainwindow.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kio/netaccess.h>
#include <klocale.h>
@@ -47,7 +47,7 @@ SVNFileInfoProvider::~SVNFileInfoProvider() {
}
//synchronous
-const VCSFileInfoMap *SVNFileInfoProvider::status( const QString &dirPath ) {
+const VCSFileInfoMap *SVNFileInfoProvider::status( const TQString &dirPath ) {
if ( !m_cachedDirEntries )
m_cachedDirEntries = new VCSFileInfoMap;
// return m_cachedDirEntries;
@@ -57,38 +57,38 @@ const VCSFileInfoMap *SVNFileInfoProvider::status( const QString &dirPath ) {
if ( dirPath != m_previousDirPath ) {
m_previousDirPath = dirPath;
KURL servURL = "kdevsvn+http://fakeserver_this_is_normal_behavior/";
- QByteArray parms;
- QDataStream s( parms, IO_WriteOnly );
+ TQByteArray parms;
+ TQDataStream s( parms, IO_WriteOnly );
int cmd = 9;
- QString rPath = projectDirectory( );
- rPath += QDir::separator() + dirPath;
- kdDebug(9036) << "DIR : " << rPath << " " << KURL( QFileInfo( rPath ).absFilePath() ) << endl;
+ TQString rPath = projectDirectory( );
+ rPath += TQDir::separator() + dirPath;
+ kdDebug(9036) << "DIR : " << rPath << " " << KURL( TQFileInfo( rPath ).absFilePath() ) << endl;
-// s << cmd << KURL( QFileInfo( rPath ).absFilePath() ) << true << true; //original line
+// s << cmd << KURL( TQFileInfo( rPath ).absFilePath() ) << true << true; //original line
// Dukju Ahn: if checkRepos is set, status() accesses remote repository,
// which causes significant delaym_owner especially when network speed is not fast enough.
// Of course, the user cannot get information about the out-of-dateness of his local copy.
- s << cmd << KURL( QFileInfo( rPath ).absFilePath() ) << false/*checkRepos*/ << false /*fullRecurse*/;
+ s << cmd << KURL( TQFileInfo( rPath ).absFilePath() ) << false/*checkRepos*/ << false /*fullRecurse*/;
KIO::SimpleJob *job2 = KIO::special(servURL, parms, false);
job2->setWindow( m_part->mainWindow()->main() );
- QMap<QString,QString> ma;
+ TQMap<TQString,TQString> ma;
KIO::NetAccess::synchronousRun(job2, m_part->mainWindow()->main(), 0, 0, &ma );
- QValueList<QString> keys = ma.keys();
+ TQValueList<TQString> keys = ma.keys();
qHeapSort( keys );
- QValueList<QString>::Iterator begin = keys.begin(), end = keys.end(), it;
+ TQValueList<TQString>::Iterator begin = keys.begin(), end = keys.end(), it;
- QString path;
+ TQString path;
int text_status = 0, prop_status = 0, repos_text_status = 0, repos_prop_status = 0;
long int rev = 0;
int curIdx, lastIdx;
- QRegExp rx( "([0-9]*)(.*)" );
+ TQRegExp rx( "([0-9]*)(.*)" );
for ( it = begin; it != end; ) {
kdDebug(9036) << "METADATA : " << *it << ":" << ma[ *it ] << endl;
if ( rx.search( *it ) == -1 ) return m_cachedDirEntries; // something is wrong ! :)
@@ -130,7 +130,7 @@ const VCSFileInfoMap *SVNFileInfoProvider::status( const QString &dirPath ) {
return m_cachedDirEntries;
}
-bool SVNFileInfoProvider::requestStatus( const QString &dirPath, void *callerData, bool recursive, bool checkRepos ) {
+bool SVNFileInfoProvider::requestStatus( const TQString &dirPath, void *callerData, bool recursive, bool checkRepos ) {
kdDebug(9036) << "##################################################################################### svn provider : request status" << endl;
m_savedCallerData = callerData;
// Flush old cache
@@ -141,21 +141,21 @@ bool SVNFileInfoProvider::requestStatus( const QString &dirPath, void *callerDat
m_previousDirPath = dirPath;
}
- QByteArray parms;
- QDataStream s( parms, IO_WriteOnly );
+ TQByteArray parms;
+ TQDataStream s( parms, IO_WriteOnly );
int cmd = 9;
- QString rPath = projectDirectory( );
- rPath += QDir::separator() + dirPath;
+ TQString rPath = projectDirectory( );
+ rPath += TQDir::separator() + dirPath;
if( ! m_part->isValidDirectory( rPath ) ){
return false;
}
- kdDebug(9036) << "DIR : " << rPath << " " << QFileInfo( rPath ).absFilePath() << endl;
- s << cmd << KURL( QFileInfo( rPath ).absFilePath() ) << checkRepos << recursive;
+ kdDebug(9036) << "DIR : " << rPath << " " << TQFileInfo( rPath ).absFilePath() << endl;
+ s << cmd << KURL( TQFileInfo( rPath ).absFilePath() ) << checkRepos << recursive;
KURL servURL = "kdevsvn+http://fakeserver_this_is_normal_behavior/";
job = KIO::special(servURL, parms, false);
- connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) );
if( checkRepos )
m_part->svncore()->initProcessDlg( job, dirPath, i18n("Subversion File/Directory Status") );
return true;
@@ -166,16 +166,16 @@ void SVNFileInfoProvider::slotResult( KIO::Job *j ) {
j->showErrorDialog( m_part->mainWindow()->main() );
KIO::MetaData ma = j->metaData();
- QValueList<QString> keys = ma.keys();
+ TQValueList<TQString> keys = ma.keys();
qHeapSort( keys );
- QValueList<QString>::Iterator begin = keys.begin(), end = keys.end(), it;
+ TQValueList<TQString>::Iterator begin = keys.begin(), end = keys.end(), it;
- QString path;
+ TQString path;
int text_status = 0, prop_status = 0, repos_text_status = 0, repos_prop_status = 0;
long int rev = 0;
int curIdx, lastIdx;
- QRegExp rx( "([0-9]*)(.*)" );
+ TQRegExp rx( "([0-9]*)(.*)" );
for ( it = begin; it != end; ) {
kdDebug(9036) << "METADATA : " << *it << ":" << ma[ *it ] << endl;
if ( rx.search( *it ) == -1 ) return; // something is wrong ! :)
@@ -217,7 +217,7 @@ void SVNFileInfoProvider::slotResult( KIO::Job *j ) {
emit statusReady(*m_cachedDirEntries, m_savedCallerData);
}
-void SVNFileInfoProvider::slotStatus( const QString& path,int text_status, int prop_status,int repos_text_status, int repos_prop_status, long int rev) {
+void SVNFileInfoProvider::slotStatus( const TQString& path,int text_status, int prop_status,int repos_text_status, int repos_prop_status, long int rev) {
// kdDebug(9036) << "##################################################################################### svn provider : slotstatus"
// << " path " << path << " text_status " << text_status << " prop_status " << prop_status << " repos_text_status " << repos_text_status
// << " repos_prop_status " << repos_prop_status << " rev " << rev
@@ -226,8 +226,8 @@ void SVNFileInfoProvider::slotStatus( const QString& path,int text_status, int p
if ( !m_cachedDirEntries )
m_cachedDirEntries = new VCSFileInfoMap;
- QString wRev = QString::number( rev ); //work rev
- QString rRev = QString::number( rev );// repo rev
+ TQString wRev = TQString::number( rev ); //work rev
+ TQString rRev = TQString::number( rev );// repo rev
VCSFileInfo::FileState state = VCSFileInfo::Unknown;
switch ( text_status ) {
@@ -303,16 +303,16 @@ void SVNFileInfoProvider::slotStatus( const QString& path,int text_status, int p
break;
}
- VCSFileInfo info(QFileInfo( path ).fileName(),wRev,rRev,state);
+ VCSFileInfo info(TQFileInfo( path ).fileName(),wRev,rRev,state);
kdDebug(9036) << "Inserting " << info.toString() << endl;
- m_cachedDirEntries->insert( QFileInfo( path ).fileName(), info);
+ m_cachedDirEntries->insert( TQFileInfo( path ).fileName(), info);
}
-QString SVNFileInfoProvider::projectDirectory() const {
+TQString SVNFileInfoProvider::projectDirectory() const {
return owner()->project()->projectDirectory();
}
-const VCSFileInfoMap *SVNFileInfoProvider::statusExt( const QString &dirPath,
+const VCSFileInfoMap *SVNFileInfoProvider::statusExt( const TQString &dirPath,
bool checkRepos, bool fullRecurse, bool getAll, bool noIgnore )
{
if ( !m_recursiveDirEntries )
@@ -322,30 +322,30 @@ const VCSFileInfoMap *SVNFileInfoProvider::statusExt( const QString &dirPath,
m_recursiveDirEntries->clear();
m_recursivePreviousDirPath = dirPath;
KURL servURL = "kdevsvn+http://fakeserver_this_is_normal_behavior/";
- QByteArray parms;
- QDataStream s( parms, IO_WriteOnly );
+ TQByteArray parms;
+ TQDataStream s( parms, IO_WriteOnly );
int cmd = 109;
- QString rPath = projectDirectory( );
- rPath += QDir::separator() + dirPath;
- kdDebug(9036) << "DIR : " << rPath << " " << KURL( QFileInfo( rPath ).absFilePath() ) << endl;
- s << cmd << checkRepos << fullRecurse << getAll << noIgnore << -1 << "WORKING" << KURL( QFileInfo( rPath ).absFilePath() );
+ TQString rPath = projectDirectory( );
+ rPath += TQDir::separator() + dirPath;
+ kdDebug(9036) << "DIR : " << rPath << " " << KURL( TQFileInfo( rPath ).absFilePath() ) << endl;
+ s << cmd << checkRepos << fullRecurse << getAll << noIgnore << -1 << "WORKING" << KURL( TQFileInfo( rPath ).absFilePath() );
KIO::SimpleJob *job2 = KIO::special(servURL, parms, false);
job2->setWindow( m_part->mainWindow()->main() );
- QMap<QString,QString> ma;
+ TQMap<TQString,TQString> ma;
KIO::NetAccess::synchronousRun(job2, m_part->mainWindow()->main(), 0, 0, &ma );
- QValueList<QString> keys = ma.keys();
+ TQValueList<TQString> keys = ma.keys();
qHeapSort( keys );
- QValueList<QString>::Iterator begin = keys.begin(), end = keys.end(), it;
+ TQValueList<TQString>::Iterator begin = keys.begin(), end = keys.end(), it;
- QString path;
+ TQString path;
int text_status = 0, prop_status = 0, repos_text_status = 0, repos_prop_status = 0;
long int rev = 0;
int curIdx, lastIdx;
- QRegExp rx( "([0-9]*)(.*)" );
+ TQRegExp rx( "([0-9]*)(.*)" );
for ( it = begin; it != end; ) {
kdDebug(9036) << "METADATA : " << *it << ":" << ma[ *it ] << endl;
if ( rx.search( *it ) == -1 ) return m_recursiveDirEntries; // something is wrong ! :)
@@ -389,14 +389,14 @@ const VCSFileInfoMap *SVNFileInfoProvider::statusExt( const QString &dirPath,
}
void SVNFileInfoProvider::slotStatusExt(
- const QString& reqPath, const QString& path,int text_status, int prop_status,int repos_text_status, int repos_prop_status, long int rev)
+ const TQString& reqPath, const TQString& path,int text_status, int prop_status,int repos_text_status, int repos_prop_status, long int rev)
{
if ( !m_recursiveDirEntries )
m_recursiveDirEntries = new VCSFileInfoMap;
- QString wRev = QString::number( rev ); //work rev
- QString rRev = QString::number( rev );// repo rev
+ TQString wRev = TQString::number( rev ); //work rev
+ TQString rRev = TQString::number( rev );// repo rev
VCSFileInfo::FileState state = VCSFileInfo::Unknown;
switch ( text_status ) {
@@ -472,10 +472,10 @@ void SVNFileInfoProvider::slotStatusExt(
break;
}
- QString relativeReqPath;
+ TQString relativeReqPath;
if (reqPath == "./"){
// case of project top directory
- QString reqAbsPath = projectDirectory();
+ TQString reqAbsPath = projectDirectory();
if( path == reqAbsPath ){
//key of VCSInfo is project directory itself. So it is set to .
@@ -486,7 +486,7 @@ void SVNFileInfoProvider::slotStatusExt(
}
}
else {
- QString reqAbsPath = projectDirectory() + QDir::separator() + reqPath;
+ TQString reqAbsPath = projectDirectory() + TQDir::separator() + reqPath;
relativeReqPath = path.right( path.length() - reqAbsPath.length() - 1 );
if (relativeReqPath == reqAbsPath){
@@ -498,9 +498,9 @@ void SVNFileInfoProvider::slotStatusExt(
VCSFileInfo info(relativeReqPath, wRev, rRev, state);
m_recursiveDirEntries->insert( relativeReqPath, info );
-// VCSFileInfo info(QFileInfo( path ).fileName(),wRev,rRev,state);
+// VCSFileInfo info(TQFileInfo( path ).fileName(),wRev,rRev,state);
kdDebug(9036) << "Inserting " << info.toString() << endl;
-// m_recursiveDirEntries->insert( QFileInfo( path ).fileName(), info);
+// m_recursiveDirEntries->insert( TQFileInfo( path ).fileName(), info);
}
#include "subversion_fileinfo.moc"