summaryrefslogtreecommitdiffstats
path: root/kioslave/svn/ksvnd/ksvnd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kioslave/svn/ksvnd/ksvnd.cpp')
-rw-r--r--kioslave/svn/ksvnd/ksvnd.cpp104
1 files changed, 52 insertions, 52 deletions
diff --git a/kioslave/svn/ksvnd/ksvnd.cpp b/kioslave/svn/ksvnd/ksvnd.cpp
index 7442ee95..5da4d9d9 100644
--- a/kioslave/svn/ksvnd/ksvnd.cpp
+++ b/kioslave/svn/ksvnd/ksvnd.cpp
@@ -22,8 +22,8 @@
#include <klocale.h>
#include <kdebug.h>
#include <kmessagebox.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include "config.h"
@@ -31,33 +31,33 @@
#include "commitdlg.h"
extern "C" {
- KDE_EXPORT KDEDModule *create_ksvnd(const QCString &name) {
+ KDE_EXPORT KDEDModule *create_ksvnd(const TQCString &name) {
return new KSvnd(name);
}
}
-KSvnd::KSvnd(const QCString &name)
+KSvnd::KSvnd(const TQCString &name)
: KDEDModule(name) {
}
KSvnd::~KSvnd() {
}
-QString KSvnd::commitDialog(QString modifiedFiles) {
+TQString KSvnd::commitDialog(TQString modifiedFiles) {
CommitDlg commitDlg;
commitDlg.setLog( modifiedFiles );
int result = commitDlg.exec();
- if ( result == QDialog::Accepted ) {
+ if ( result == TQDialog::Accepted ) {
return commitDlg.logMessage();
} else
- return QString::null;
+ return TQString::null;
}
bool KSvnd::AreAnyFilesInSvn( const KURL::List& wclist ) {
- for ( QValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
kdDebug( 7128 ) << "Checking file " << ( *it ) << endl;
- QDir bdir ( ( *it ).path() );
- if ( bdir.exists() && QFile::exists( ( *it ).path() + "/.svn/entries" ) ) {
+ TQDir bdir ( ( *it ).path() );
+ if ( bdir.exists() && TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) {
return true;
} else if ( !bdir.exists() ) {
if ( isFileInSvnEntries( ( *it ).fileName(), ( *it ).directory() + "/.svn/entries" ) || isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) )
@@ -68,10 +68,10 @@ bool KSvnd::AreAnyFilesInSvn( const KURL::List& wclist ) {
}
bool KSvnd::AreAnyFilesNotInSvn( const KURL::List& wclist ) {
- for ( QValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
kdDebug( 7128 ) << "Checking file " << ( *it ) << endl;
- QDir bdir ( ( *it ).path() );
- if ( bdir.exists() && !QFile::exists( ( *it ).path() + "/.svn/entries" ) ) {
+ TQDir bdir ( ( *it ).path() );
+ if ( bdir.exists() && !TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) {
return true;
} else if ( !bdir.exists() ) {
if ( !isFileInSvnEntries( ( *it ).fileName(),( *it ).directory() + "/.svn/entries" ) && !isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) )
@@ -82,10 +82,10 @@ bool KSvnd::AreAnyFilesNotInSvn( const KURL::List& wclist ) {
}
bool KSvnd::AreAllFilesInSvn( const KURL::List& wclist ) {
- for ( QValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
kdDebug( 7128 ) << "Checking file " << ( *it ) << endl;
- QDir bdir ( ( *it ).path() );
- if ( bdir.exists() && !QFile::exists( ( *it ).path() + "/.svn/entries" ) ) {
+ TQDir bdir ( ( *it ).path() );
+ if ( bdir.exists() && !TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) {
return false;
} else if ( !bdir.exists() ) {
if ( !isFileInSvnEntries( ( *it ).fileName(),( *it ).directory() + "/.svn/entries" ) && !isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) )
@@ -96,10 +96,10 @@ bool KSvnd::AreAllFilesInSvn( const KURL::List& wclist ) {
}
bool KSvnd::AreAllFilesNotInSvn( const KURL::List& wclist ) {
- for ( QValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
kdDebug( 7128 ) << "Checking file " << ( *it ) << endl;
- QDir bdir ( ( *it ).path() );
- if ( bdir.exists() && QFile::exists( ( *it ).path() + "/.svn/entries" ) ) {
+ TQDir bdir ( ( *it ).path() );
+ if ( bdir.exists() && TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) {
return false;
} else if ( !bdir.exists() ) {
if ( isFileInSvnEntries( ( *it ).fileName(),( *it ).directory() + "/.svn/entries" ) || isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) )
@@ -109,11 +109,11 @@ bool KSvnd::AreAllFilesNotInSvn( const KURL::List& wclist ) {
return true;
}
-bool KSvnd::isFileInSvnEntries ( const QString filename, const QString entfile ) {
- QFile file( entfile );
+bool KSvnd::isFileInSvnEntries ( const TQString filename, const TQString entfile ) {
+ TQFile file( entfile );
if ( file.open( IO_ReadOnly ) ) {
- QTextStream stream( &file );
- QString line;
+ TQTextStream stream( &file );
+ TQString line;
while ( !stream.atEnd() ) {
line = stream.readLine().simplifyWhiteSpace();
if ( line == "name=\""+ filename + "\"" ) {
@@ -126,11 +126,11 @@ bool KSvnd::isFileInSvnEntries ( const QString filename, const QString entfile )
return false;
}
-bool KSvnd::isFileInExternals ( const QString filename, const QString propfile ) {
- QFile file( propfile );
+bool KSvnd::isFileInExternals ( const TQString filename, const TQString propfile ) {
+ TQFile file( propfile );
if ( file.open( IO_ReadOnly ) ) {
- QTextStream stream( &file );
- QStringList line;
+ TQTextStream stream( &file );
+ TQStringList line;
while ( !stream.atEnd() )
line << stream.readLine().simplifyWhiteSpace();
for ( uint i = 0 ; i < line.count(); i++ ) {
@@ -159,38 +159,38 @@ bool KSvnd::isFileInExternals ( const QString filename, const QString propfile )
bool KSvnd::anyNotValidWorkingCopy( const KURL::List& wclist ) {
bool result = true; //one negative match is enough
- for ( QValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
//exception for .svn dirs
if ( ( *it ).path(-1).endsWith( "/.svn" ) )
return true;
//if is a directory check whether it contains a .svn/entries file
- QDir dir( ( *it ).path() );
+ TQDir dir( ( *it ).path() );
if ( dir.exists() ) { //it's a dir
- if ( !QFile::exists( ( *it ).path() + "/.svn/entries" ) )
+ if ( !TQFile::exists( ( *it ).path() + "/.svn/entries" ) )
result = false;
}
//else check if ./.svn/entries exists
- if ( !QFile::exists( ( *it ).directory() + "/.svn/entries" ) )
+ if ( !TQFile::exists( ( *it ).directory() + "/.svn/entries" ) )
result = false;
}
return result;
}
bool KSvnd::anyValidWorkingCopy( const KURL::List& wclist ) {
- for ( QValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = wclist.begin(); it != wclist.end() ; ++it ) {
//skip .svn dirs
if ( ( *it ).path(-1).endsWith( "/.svn" ) )
continue;
//if is a directory check whether it contains a .svn/entries file
- QDir dir( ( *it ).path() );
+ TQDir dir( ( *it ).path() );
if ( dir.exists() ) { //it's a dir
- if ( QFile::exists( ( *it ).path() + "/.svn/entries" ) )
+ if ( TQFile::exists( ( *it ).path() + "/.svn/entries" ) )
return true;
}
//else check if ./.svn/entries exists
- if ( QFile::exists( ( *it ).directory() + "/.svn/entries" ) )
+ if ( TQFile::exists( ( *it ).directory() + "/.svn/entries" ) )
return true;
}
return false;
@@ -199,7 +199,7 @@ bool KSvnd::anyValidWorkingCopy( const KURL::List& wclist ) {
int KSvnd::getStatus( const KURL::List& list ) {
int result = 0;
uint files = 0, folders = 0, parentsentries = 0, parentshavesvn = 0, subdirhavesvn = 0, external = 0;
- for ( QValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
+ for ( TQValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) {
if ( isFolder ( ( *it ) ) ) {
folders++;
} else {
@@ -208,13 +208,13 @@ int KSvnd::getStatus( const KURL::List& list ) {
if ( isFileInSvnEntries ( (*it).filename(),( *it ).directory() + "/.svn/entries" ) ) { // normal subdir known in the working copy
parentsentries++;
} else if ( isFolder( *it ) ) { // other subfolders (either another module checkouted or an external, or something not known at all)
- if ( QFile::exists( ( *it ).path() + "/.svn/entries" ) )
+ if ( TQFile::exists( ( *it ).path() + "/.svn/entries" ) )
subdirhavesvn++;
if ( isFileInExternals( (*it).filename(), ( *it ).directory() + "/.svn/dir-props" ) ) {
external++;
}
}
- if ( ( isFolder( ( *it ) ) && QFile::exists( ( *it ).directory() + "../.svn/entries" ) ) || QFile::exists( ( *it ).directory() + "/.svn/entries" ) ) //parent has a .svn ?
+ if ( ( isFolder( ( *it ) ) && TQFile::exists( ( *it ).directory() + "../.svn/entries" ) ) || TQFile::exists( ( *it ).directory() + "/.svn/entries" ) ) //parent has a .svn ?
parentshavesvn++;
}
if ( files > 0 )
@@ -250,12 +250,12 @@ int KSvnd::getStatus( const KURL::List& list ) {
}
bool KSvnd::isFolder( const KURL& url ) {
- QDir d( url.path() );
+ TQDir d( url.path() );
return d.exists();
}
-QStringList KSvnd::getActionMenu ( const KURL::List &list ) {
- QStringList result;
+TQStringList KSvnd::getActionMenu ( const KURL::List &list ) {
+ TQStringList result;
int listStatus = getStatus( list );
if ( !(listStatus & SomeAreInParentsEntries) &&
@@ -304,8 +304,8 @@ QStringList KSvnd::getActionMenu ( const KURL::List &list ) {
return result;
}
-QStringList KSvnd::getTopLevelActionMenu ( const KURL::List &list ) {
- QStringList result;
+TQStringList KSvnd::getTopLevelActionMenu ( const KURL::List &list ) {
+ TQStringList result;
int listStatus = getStatus( list );
@@ -321,28 +321,28 @@ QStringList KSvnd::getTopLevelActionMenu ( const KURL::List &list ) {
}
#if 0
-void KSvnd::notify(const QString& path, int action, int kind, const QString& mime_type, int content_state, int prop_state, long int revision, const QString& userstring) {
+void KSvnd::notify(const TQString& path, int action, int kind, const TQString& mime_type, int content_state, int prop_state, long int revision, const TQString& userstring) {
kdDebug(7128) << "KDED/Subversion : notify " << path << " action : " << action << " mime_type : " << mime_type << " content_state : " << content_state << " prop_state : " << prop_state << " revision : " << revision << " userstring : " << userstring << endl;
- QByteArray params;
+ TQByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+ TQDataStream stream(params, IO_WriteOnly);
stream << path << action << kind << mime_type << content_state << prop_state << revision << userstring;
- emitDCOPSignal( "subversionNotify(QString,int,int,QString,int,int,long int,QString)", params );
+ emitDCOPSignal( "subversionNotify(TQString,int,int,TQString,int,int,long int,TQString)", params );
}
-void KSvnd::status(const QString& path, int text_status, int prop_status, int repos_text_status, int repos_prop_status, long int rev ) {
+void KSvnd::status(const TQString& path, int text_status, int prop_status, int repos_text_status, int repos_prop_status, long int rev ) {
kdDebug(7128) << "KDED/Subversion : status " << path << " " << text_status << " " << prop_status << " "
<< repos_text_status << " " << repos_prop_status << " " << rev << endl;
- QByteArray params;
+ TQByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+ TQDataStream stream(params, IO_WriteOnly);
stream << path << text_status << prop_status << repos_text_status << repos_prop_status << rev;
- emitDCOPSignal( "subversionStatus(QString,int,int,int,int,long int)", params );
+ emitDCOPSignal( "subversionStatus(TQString,int,int,int,int,long int)", params );
}
-void KSvnd::popupMessage( const QString& message ) {
+void KSvnd::popupMessage( const TQString& message ) {
kdDebug(7128) << "KDED/Subversion : popupMessage" << message << endl;
KMessageBox::information(0, message, i18n( "Subversion" ) );
}