diff options
Diffstat (limited to 'kioslave/svn/ksvnd')
-rw-r--r-- | kioslave/svn/ksvnd/commitdlg.ui.h | 4 | ||||
-rw-r--r-- | kioslave/svn/ksvnd/ksvnd.cpp | 104 | ||||
-rw-r--r-- | kioslave/svn/ksvnd/ksvnd.h | 24 |
3 files changed, 66 insertions, 66 deletions
diff --git a/kioslave/svn/ksvnd/commitdlg.ui.h b/kioslave/svn/ksvnd/commitdlg.ui.h index 3e1994ad..317476a5 100644 --- a/kioslave/svn/ksvnd/commitdlg.ui.h +++ b/kioslave/svn/ksvnd/commitdlg.ui.h @@ -18,13 +18,13 @@ */ -void CommitDlg::setLog( const QString & comment ) +void CommitDlg::setLog( const TQString & comment ) { listMessage->setText(comment); } -QString CommitDlg::logMessage() const +TQString CommitDlg::logMessage() const { return textMessage->text(); } 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" ) ); } diff --git a/kioslave/svn/ksvnd/ksvnd.h b/kioslave/svn/ksvnd/ksvnd.h index 1dd304c8..edb1073e 100644 --- a/kioslave/svn/ksvnd/ksvnd.h +++ b/kioslave/svn/ksvnd/ksvnd.h @@ -24,7 +24,7 @@ #include <dcopclient.h> #include <kdedmodule.h> #include <kurl.h> -#include <qstringlist.h> +#include <tqstringlist.h> class KSvnd : public KDEDModule { @@ -34,34 +34,34 @@ class KSvnd : public KDEDModule //note: InSVN means parent is added. InRepos means itself is added enum { SomeAreFiles = 1, SomeAreFolders = 2, SomeAreInParentsEntries = 4, SomeParentsHaveSvn = 8, SomeHaveSvn = 16, SomeAreExternalToParent = 32, AllAreInParentsEntries = 64, AllParentsHaveSvn = 128, AllHaveSvn = 256, AllAreExternalToParent = 512, AllAreFolders = 1024 }; public: - KSvnd(const QCString &); + KSvnd(const TQCString &); ~KSvnd(); k_dcop: // void addAuthInfo(KIO::AuthInfo, long); - QString commitDialog(QString); + TQString commitDialog(TQString); bool anyNotValidWorkingCopy( const KURL::List& wclist ); bool anyValidWorkingCopy( const KURL::List& wclist ); bool AreAnyFilesNotInSvn( const KURL::List& wclist ); bool AreAnyFilesInSvn( const KURL::List& wclist ); bool AreAllFilesNotInSvn( const KURL::List& wclist ); bool AreAllFilesInSvn( const KURL::List& wclist ); - QStringList getActionMenu ( const KURL::List& list ); - QStringList getTopLevelActionMenu ( const KURL::List &list ); -// void notify(const QString&, int ,int, const QString& , int , int, long int, const QString&); -// void status(const QString& path, int text_status, int prop_status, int repos_text_status, int repos_prop_status ,long int rev); -// void popupMessage( const QString& message ); + TQStringList getActionMenu ( const KURL::List& list ); + TQStringList getTopLevelActionMenu ( const KURL::List &list ); +// void notify(const TQString&, int ,int, const TQString& , int , int, long int, const TQString&); +// void status(const TQString& path, int text_status, int prop_status, int repos_text_status, int repos_prop_status ,long int rev); +// void popupMessage( const TQString& message ); k_dcop_signals: //emitted whenever something happens using subversion ;) -// void subversionNotify(const QString&, int ,int, const QString& , int , int, long int, const QString&); -// void subversionStatus(const QString&,int,int,int,int,long int); +// void subversionNotify(const TQString&, int ,int, const TQString& , int , int, long int, const TQString&); +// void subversionStatus(const TQString&,int,int,int,int,long int); public slots: protected: - bool isFileInSvnEntries ( const QString filename, const QString entfile ); - bool isFileInExternals ( const QString filename, const QString propfile ); + bool isFileInSvnEntries ( const TQString filename, const TQString entfile ); + bool isFileInExternals ( const TQString filename, const TQString propfile ); bool isFolder( const KURL& url ); int getStatus( const KURL::List& list ); }; |