diff options
Diffstat (limited to 'kioslave')
-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 | ||||
-rw-r--r-- | kioslave/svn/svn.cpp | 226 | ||||
-rw-r--r-- | kioslave/svn/svn.h | 36 | ||||
-rw-r--r-- | kioslave/svn/svnhelper/kio_svn_helper.cpp | 110 | ||||
-rw-r--r-- | kioslave/svn/svnhelper/kio_svn_helper.h | 4 |
7 files changed, 254 insertions, 254 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 ); }; diff --git a/kioslave/svn/svn.cpp b/kioslave/svn/svn.cpp index f2afd61f..b7341df0 100644 --- a/kioslave/svn/svn.cpp +++ b/kioslave/svn/svn.cpp @@ -17,10 +17,10 @@ Boston, MA 02110-1301, USA. */ -#include <qcstring.h> -#include <qsocket.h> -#include <qdatetime.h> -#include <qbitarray.h> +#include <tqcstring.h> +#include <tqsocket.h> +#include <tqdatetime.h> +#include <tqbitarray.h> #include <stdlib.h> #include <math.h> @@ -39,7 +39,7 @@ #include <kurl.h> #include <ksock.h> #include <dcopclient.h> -#include <qcstring.h> +#include <tqcstring.h> #include <subversion-1/svn_sorts.h> #include <subversion-1/svn_path.h> @@ -48,7 +48,7 @@ #include <subversion-1/svn_time.h> #include <kmimetype.h> -#include <qfile.h> +#include <tqfile.h> #include "svn.h" #include <apr_portable.h> @@ -111,7 +111,7 @@ compare_items_as_paths (const svn_sort__item_t*a, const svn_sort__item_t*b) { return svn_path_compare_paths ((const char *)a->key, (const char *)b->key); } -kio_svnProtocol::kio_svnProtocol(const QCString &pool_socket, const QCString &app_socket) +kio_svnProtocol::kio_svnProtocol(const TQCString &pool_socket, const TQCString &app_socket) : SlaveBase("kio_svn", pool_socket, app_socket) { kdDebug(7128) << "kio_svnProtocol::kio_svnProtocol()" << endl; @@ -231,7 +231,7 @@ void kio_svnProtocol::recordCurrentURL(const KURL& url) { void kio_svnProtocol::get(const KURL& url ){ kdDebug(7128) << "kio_svn::get(const KURL& url)" << endl ; - QString remoteServer = url.host(); + TQString remoteServer = url.host(); infoMessage(i18n("Looking for %1...").arg( remoteServer ) ); apr_pool_t *subpool = svn_pool_create (pool); @@ -240,7 +240,7 @@ void kio_svnProtocol::get(const KURL& url ){ bt->string_stream = svn_stream_create(bt,subpool); svn_stream_set_write(bt->string_stream,write_to_string); - QString target = makeSvnURL( url ); + TQString target = makeSvnURL( url ); kdDebug(7128) << "SvnURL: " << target << endl; recordCurrentURL( KURL( target ) ); @@ -249,7 +249,7 @@ void kio_svnProtocol::get(const KURL& url ){ svn_opt_revision_t endrev; int idx = target.findRev( "?rev=" ); if ( idx != -1 ) { - QString revstr = target.mid( idx+5 ); + TQString revstr = target.mid( idx+5 ); #if 0 kdDebug(7128) << "revision string found " << revstr << endl; if ( revstr == "HEAD" ) { @@ -278,7 +278,7 @@ void kio_svnProtocol::get(const KURL& url ){ } // Send the mimeType as soon as it is known - QByteArray *cp = new QByteArray(); + TQByteArray *cp = new TQByteArray(); cp->setRawData( bt->target_string->data, bt->target_string->len ); KMimeType::Ptr mt = KMimeType::findByContent(*cp); kdDebug(7128) << "KMimeType returned : " << mt->name() << endl; @@ -289,7 +289,7 @@ void kio_svnProtocol::get(const KURL& url ){ //send data data(*cp); - data(QByteArray()); // empty array means we're done sending the data + data(TQByteArray()); // empty array means we're done sending the data finished(); svn_pool_destroy (subpool); } @@ -302,7 +302,7 @@ void kio_svnProtocol::stat(const KURL & url){ svn_node_kind_t kind; apr_pool_t *subpool = svn_pool_create (pool); - QString target = makeSvnURL( url); + TQString target = makeSvnURL( url); kdDebug(7128) << "SvnURL: " << target << endl; recordCurrentURL( KURL( target ) ); @@ -311,7 +311,7 @@ void kio_svnProtocol::stat(const KURL & url){ svn_opt_revision_t endrev; int idx = target.findRev( "?rev=" ); if ( idx != -1 ) { - QString revstr = target.mid( idx+5 ); + TQString revstr = target.mid( idx+5 ); #if 0 kdDebug(7128) << "revision string found " << revstr << endl; if ( revstr == "HEAD" ) { @@ -407,7 +407,7 @@ void kio_svnProtocol::listDir(const KURL& url){ apr_pool_t *subpool = svn_pool_create (pool); apr_hash_t *dirents; - QString target = makeSvnURL( url); + TQString target = makeSvnURL( url); kdDebug(7128) << "SvnURL: " << target << endl; recordCurrentURL( KURL( target ) ); @@ -416,7 +416,7 @@ void kio_svnProtocol::listDir(const KURL& url){ svn_opt_revision_t endrev; int idx = target.findRev( "?rev=" ); if ( idx != -1 ) { - QString revstr = target.mid( idx+5 ); + TQString revstr = target.mid( idx+5 ); svn_opt_parse_revision( &rev, &endrev, revstr.utf8(), subpool ); #if 0 kdDebug(7128) << "revision string found " << revstr << endl; @@ -476,7 +476,7 @@ void kio_svnProtocol::listDir(const KURL& url){ if (dirent->last_author) svn_utf_cstring_from_utf8 (&native_author, dirent->last_author, subpool); - if ( createUDSEntry(QString( native_entryname ), QString( native_author ), dirent->size, + if ( createUDSEntry(TQString( native_entryname ), TQString( native_author ), dirent->size, dirent->kind==svn_node_dir ? true : false, 0, entry) ) listEntry( entry, false ); } @@ -486,7 +486,7 @@ void kio_svnProtocol::listDir(const KURL& url){ svn_pool_destroy (subpool); } -bool kio_svnProtocol::createUDSEntry( const QString& filename, const QString& user, long long int size, bool isdir, time_t mtime, UDSEntry& entry) { +bool kio_svnProtocol::createUDSEntry( const TQString& filename, const TQString& user, long long int size, bool isdir, time_t mtime, UDSEntry& entry) { kdDebug(7128) << "MTime : " << ( long )mtime << endl; kdDebug(7128) << "UDS filename : " << filename << endl; UDSAtom atom; @@ -523,8 +523,8 @@ void kio_svnProtocol::copy(const KURL & src, const KURL& dest, int /*permissions KURL ndest = dest; nsrc.setProtocol( chooseProtocol( src.protocol() ) ); ndest.setProtocol( chooseProtocol( dest.protocol() ) ); - QString srcsvn = nsrc.url(); - QString destsvn = ndest.url(); + TQString srcsvn = nsrc.url(); + TQString destsvn = ndest.url(); recordCurrentURL( nsrc ); @@ -532,7 +532,7 @@ void kio_svnProtocol::copy(const KURL & src, const KURL& dest, int /*permissions svn_opt_revision_t rev; int idx = srcsvn.findRev( "?rev=" ); if ( idx != -1 ) { - QString revstr = srcsvn.mid( idx+5 ); + TQString revstr = srcsvn.mid( idx+5 ); kdDebug(7128) << "revision string found " << revstr << endl; if ( revstr == "HEAD" ) { rev.kind = svn_opt_revision_head; @@ -571,7 +571,7 @@ void kio_svnProtocol::mkdir( const KURL::List& list, int /*permissions*/ ) { KURL::List::const_iterator it = list.begin(), end = list.end(); for ( ; it != end; ++it ) { - QString cur = makeSvnURL( *it ); + TQString cur = makeSvnURL( *it ); kdDebug( 7128 ) << "kio_svnProtocol::mkdir raw url for subversion : " << cur << endl; const char *_target = apr_pstrdup( subpool, svn_path_canonicalize( apr_pstrdup( subpool, cur.utf8() ), subpool ) ); (*(( const char ** )apr_array_push(( apr_array_header_t* )targets)) ) = _target; @@ -593,7 +593,7 @@ void kio_svnProtocol::mkdir( const KURL& url, int /*permissions*/ ) { apr_pool_t *subpool = svn_pool_create (pool); svn_client_commit_info_t *commit_info = NULL; - QString target = makeSvnURL( url); + TQString target = makeSvnURL( url); kdDebug(7128) << "SvnURL: " << target << endl; recordCurrentURL( KURL( target ) ); @@ -616,7 +616,7 @@ void kio_svnProtocol::del( const KURL& url, bool /*isfile*/ ) { apr_pool_t *subpool = svn_pool_create (pool); svn_client_commit_info_t *commit_info = NULL; - QString target = makeSvnURL(url); + TQString target = makeSvnURL(url); kdDebug(7128) << "SvnURL: " << target << endl; recordCurrentURL( KURL( target ) ); @@ -643,8 +643,8 @@ void kio_svnProtocol::rename(const KURL& src, const KURL& dest, bool /*overwrite KURL ndest = dest; nsrc.setProtocol( chooseProtocol( src.protocol() ) ); ndest.setProtocol( chooseProtocol( dest.protocol() ) ); - QString srcsvn = nsrc.url(); - QString destsvn = ndest.url(); + TQString srcsvn = nsrc.url(); + TQString destsvn = ndest.url(); recordCurrentURL( nsrc ); @@ -652,7 +652,7 @@ void kio_svnProtocol::rename(const KURL& src, const KURL& dest, bool /*overwrite svn_opt_revision_t rev; int idx = srcsvn.findRev( "?rev=" ); if ( idx != -1 ) { - QString revstr = srcsvn.mid( idx+5 ); + TQString revstr = srcsvn.mid( idx+5 ); kdDebug(7128) << "revision string found " << revstr << endl; if ( revstr == "HEAD" ) { rev.kind = svn_opt_revision_head; @@ -679,10 +679,10 @@ void kio_svnProtocol::rename(const KURL& src, const KURL& dest, bool /*overwrite svn_pool_destroy (subpool); } -void kio_svnProtocol::special( const QByteArray& data ) { +void kio_svnProtocol::special( const TQByteArray& data ) { kdDebug(7128) << "kio_svnProtocol::special" << endl; - QDataStream stream(data, IO_ReadOnly); + TQDataStream stream(data, IO_ReadOnly); int tmp; stream >> tmp; @@ -693,7 +693,7 @@ void kio_svnProtocol::special( const QByteArray& data ) { { KURL repository, wc; int revnumber; - QString revkind; + TQString revkind; stream >> repository; stream >> wc; stream >> revnumber; @@ -706,7 +706,7 @@ void kio_svnProtocol::special( const QByteArray& data ) { { KURL wc; int revnumber; - QString revkind; + TQString revkind; stream >> wc; stream >> revnumber; stream >> revkind; @@ -730,7 +730,7 @@ void kio_svnProtocol::special( const QByteArray& data ) { { kdDebug(7128) << "kio_svnProtocol LOG" << endl; int revstart, revend; - QString revkindstart, revkindend; + TQString revkindstart, revkindend; KURL::List targets; stream >> revstart; stream >> revkindstart; @@ -820,7 +820,7 @@ void kio_svnProtocol::special( const QByteArray& data ) { KURL wc,url; bool recurse; int revnumber; - QString revkind; + TQString revkind; stream >> wc; stream >> url; stream >> recurse; @@ -835,7 +835,7 @@ void kio_svnProtocol::special( const QByteArray& data ) { KURL url1,url2; int rev1, rev2; bool recurse; - QString revkind1, revkind2; + TQString revkind1, revkind2; stream >> url1; stream >> url2; stream >> rev1; @@ -855,16 +855,16 @@ void kio_svnProtocol::special( const QByteArray& data ) { } } -void kio_svnProtocol::popupMessage( const QString& message ) { - QByteArray params; - QDataStream stream(params, IO_WriteOnly); +void kio_svnProtocol::popupMessage( const TQString& message ) { + TQByteArray params; + TQDataStream stream(params, IO_WriteOnly); stream << message; - if ( !dcopClient()->send( "kded","ksvnd","popupMessage(QString)", params ) ) + if ( !dcopClient()->send( "kded","ksvnd","popupMessage(TQString)", params ) ) kdWarning() << "Communication with KDED:KSvnd failed" << endl; } -void kio_svnProtocol::svn_log( int revstart, const QString& revkindstart, int revend, const QString& revkindend, const KURL::List& targets ) { +void kio_svnProtocol::svn_log( int revstart, const TQString& revkindstart, int revend, const TQString& revkindend, const KURL::List& targets ) { kdDebug(7128) << "kio_svn::log : " << targets << " from revision " << revstart << " or " << revkindstart << " to " " revision " << revend << " or " << revkindend << endl; @@ -880,7 +880,7 @@ void kio_svnProtocol::svn_log( int revstart, const QString& revkindstart, int re svn_pool_destroy (subpool); } -svn_opt_revision_t kio_svnProtocol::createRevision( int revision, const QString& revkind, apr_pool_t *pool ) { +svn_opt_revision_t kio_svnProtocol::createRevision( int revision, const TQString& revkind, apr_pool_t *pool ) { svn_opt_revision_t result,endrev; if ( revision != -1 ) { @@ -896,7 +896,7 @@ svn_opt_revision_t kio_svnProtocol::createRevision( int revision, const QString& return result; } -void kio_svnProtocol::svn_diff(const KURL & url1, const KURL& url2,int rev1, int rev2,const QString& revkind1,const QString& revkind2,bool recurse) { +void kio_svnProtocol::svn_diff(const KURL & url1, const KURL& url2,int rev1, int rev2,const TQString& revkind1,const TQString& revkind2,bool recurse) { kdDebug(7128) << "kio_svn::diff : " << url1.path() << " at revision " << rev1 << " or " << revkind1 << " with " << url2.path() << " at revision " << rev2 << " or " << revkind2 << endl ; @@ -909,8 +909,8 @@ void kio_svnProtocol::svn_diff(const KURL & url1, const KURL& url2,int rev1, int nurl1.setProtocol( chooseProtocol( url1.protocol() ) ); //svn+https -> https for eg nurl2.setProtocol( chooseProtocol( url2.protocol() ) ); recordCurrentURL( nurl1 ); - QString source = makeSvnURL( nurl1 ); - QString target = makeSvnURL( nurl2 ); + TQString source = makeSvnURL( nurl1 ); + TQString target = makeSvnURL( nurl2 ); const char *path1 = svn_path_canonicalize( apr_pstrdup( subpool, source.utf8() ), subpool ); const char *path2 = svn_path_canonicalize( apr_pstrdup( subpool, target.utf8() ), subpool ); @@ -937,20 +937,20 @@ void kio_svnProtocol::svn_diff(const KURL & url1, const KURL& url2,int rev1, int if ( err ) error( KIO::ERR_SLAVE_DEFINED, err->message ); //read the content of the outfile now - QStringList tmp; + TQStringList tmp; apr_file_close(outfile); - QFile file(templ); + TQFile file(templ); if ( file.open( IO_ReadOnly ) ) { - QTextStream stream( &file ); - QString line; + TQTextStream stream( &file ); + TQString line; while ( !stream.atEnd() ) { line = stream.readLine(); tmp << line; } file.close(); } - for ( QStringList::Iterator itt = tmp.begin(); itt != tmp.end(); itt++ ) { - setMetaData(QString::number( m_counter ).rightJustify( 10,'0' )+ "diffresult", ( *itt ) ); + for ( TQStringList::Iterator itt = tmp.begin(); itt != tmp.end(); itt++ ) { + setMetaData(TQString::number( m_counter ).rightJustify( 10,'0' )+ "diffresult", ( *itt ) ); m_counter++; } //delete temp file @@ -960,7 +960,7 @@ void kio_svnProtocol::svn_diff(const KURL & url1, const KURL& url2,int rev1, int svn_pool_destroy (subpool); } -void kio_svnProtocol::svn_switch( const KURL& wc, const KURL& repos, int revnumber, const QString& revkind, bool recurse) { +void kio_svnProtocol::svn_switch( const KURL& wc, const KURL& repos, int revnumber, const TQString& revkind, bool recurse) { kdDebug(7128) << "kio_svn::switch : " << wc.path() << " at revision " << revnumber << " or " << revkind << endl ; apr_pool_t *subpool = svn_pool_create (pool); @@ -970,8 +970,8 @@ void kio_svnProtocol::svn_switch( const KURL& wc, const KURL& repos, int revnumb nurl.setProtocol( chooseProtocol( repos.protocol() ) ); dest.setProtocol( "file" ); recordCurrentURL( nurl ); - QString source = dest.path(); - QString target = makeSvnURL( repos ); + TQString source = dest.path(); + TQString target = makeSvnURL( repos ); const char *path = svn_path_canonicalize( apr_pstrdup( subpool, source.utf8() ), subpool ); const char *url = svn_path_canonicalize( apr_pstrdup( subpool, target.utf8() ), subpool ); @@ -987,13 +987,13 @@ void kio_svnProtocol::svn_switch( const KURL& wc, const KURL& repos, int revnumb svn_pool_destroy (subpool); } -void kio_svnProtocol::update( const KURL& wc, int revnumber, const QString& revkind ) { +void kio_svnProtocol::update( const KURL& wc, int revnumber, const TQString& revkind ) { kdDebug(7128) << "kio_svn::update : " << wc.path() << " at revision " << revnumber << " or " << revkind << endl ; apr_pool_t *subpool = svn_pool_create (pool); KURL dest = wc; dest.setProtocol( "file" ); - QString target = dest.path(); + TQString target = dest.path(); recordCurrentURL( dest ); svn_opt_revision_t rev = createRevision( revnumber, revkind, subpool ); @@ -1020,8 +1020,8 @@ void kio_svnProtocol::import( const KURL& repos, const KURL& wc ) { dest.setProtocol( "file" ); recordCurrentURL( nurl ); dest.cleanPath( true ); // remove doubled '/' - QString source = dest.path(-1); - QString target = makeSvnURL( repos ); + TQString source = dest.path(-1); + TQString target = makeSvnURL( repos ); const char *path = svn_path_canonicalize( apr_pstrdup( subpool, source.utf8() ), subpool ); const char *url = svn_path_canonicalize( apr_pstrdup( subpool, target.utf8() ), subpool ); @@ -1035,7 +1035,7 @@ void kio_svnProtocol::import( const KURL& repos, const KURL& wc ) { svn_pool_destroy (subpool); } -void kio_svnProtocol::checkout( const KURL& repos, const KURL& wc, int revnumber, const QString& revkind ) { +void kio_svnProtocol::checkout( const KURL& repos, const KURL& wc, int revnumber, const TQString& revkind ) { kdDebug(7128) << "kio_svn::checkout : " << repos.url() << " into " << wc.path() << " at revision " << revnumber << " or " << revkind << endl ; apr_pool_t *subpool = svn_pool_create (pool); @@ -1043,9 +1043,9 @@ void kio_svnProtocol::checkout( const KURL& repos, const KURL& wc, int revnumber KURL dest = wc; nurl.setProtocol( chooseProtocol( repos.protocol() ) ); dest.setProtocol( "file" ); - QString target = makeSvnURL( repos ); + TQString target = makeSvnURL( repos ); recordCurrentURL( nurl ); - QString dpath = dest.path(); + TQString dpath = dest.path(); //find the requested revision svn_opt_revision_t rev = createRevision( revnumber, revkind, subpool ); @@ -1068,7 +1068,7 @@ void kio_svnProtocol::commit(const KURL::List& wc) { apr_array_header_t *targets = apr_array_make(subpool, 1+wc.count(), sizeof(const char *)); - for ( QValueListConstIterator<KURL> it = wc.begin(); it != wc.end() ; ++it ) { + for ( TQValueListConstIterator<KURL> it = wc.begin(); it != wc.end() ; ++it ) { KURL nurl = *it; nurl.setProtocol( "file" ); recordCurrentURL( nurl ); @@ -1081,21 +1081,21 @@ void kio_svnProtocol::commit(const KURL::List& wc) { error( KIO::ERR_SLAVE_DEFINED, err->message ); if ( commit_info ) { - for ( QValueListConstIterator<KURL> it = wc.begin(); it != wc.end() ; ++it ) { + for ( TQValueListConstIterator<KURL> it = wc.begin(); it != wc.end() ; ++it ) { KURL nurl = *it; nurl.setProtocol( "file" ); - QString userstring = i18n ( "Nothing to commit." ); + TQString userstring = i18n ( "Nothing to commit." ); if ( SVN_IS_VALID_REVNUM( commit_info->revision ) ) userstring = i18n( "Committed revision %1." ).arg(commit_info->revision); - setMetaData(QString::number( m_counter ).rightJustify( 10,'0' )+ "path", nurl.path() ); - setMetaData(QString::number( m_counter ).rightJustify( 10,'0' )+ "action", "0" ); - setMetaData(QString::number( m_counter ).rightJustify( 10,'0' )+ "kind", "0" ); - setMetaData(QString::number( m_counter ).rightJustify( 10,'0' )+ "mime_t", "" ); - setMetaData(QString::number( m_counter ).rightJustify( 10,'0' )+ "content", "0" ); - setMetaData(QString::number( m_counter ).rightJustify( 10,'0' )+ "prop", "0" ); - setMetaData(QString::number( m_counter ).rightJustify( 10,'0' )+ "rev" , QString::number( commit_info->revision ) ); - setMetaData(QString::number( m_counter ).rightJustify( 10,'0' )+ "string", userstring ); + setMetaData(TQString::number( m_counter ).rightJustify( 10,'0' )+ "path", nurl.path() ); + setMetaData(TQString::number( m_counter ).rightJustify( 10,'0' )+ "action", "0" ); + setMetaData(TQString::number( m_counter ).rightJustify( 10,'0' )+ "kind", "0" ); + setMetaData(TQString::number( m_counter ).rightJustify( 10,'0' )+ "mime_t", "" ); + setMetaData(TQString::number( m_counter ).rightJustify( 10,'0' )+ "content", "0" ); + setMetaData(TQString::number( m_counter ).rightJustify( 10,'0' )+ "prop", "0" ); + setMetaData(TQString::number( m_counter ).rightJustify( 10,'0' )+ "rev" , TQString::number( commit_info->revision ) ); + setMetaData(TQString::number( m_counter ).rightJustify( 10,'0' )+ "string", userstring ); m_counter++; } } @@ -1112,7 +1112,7 @@ void kio_svnProtocol::add(const KURL& wc) { KURL nurl = wc; nurl.setProtocol( "file" ); - QString target = nurl.url(); + TQString target = nurl.url(); recordCurrentURL( nurl ); initNotifier(false, false, false, subpool); @@ -1133,7 +1133,7 @@ void kio_svnProtocol::wc_delete(const KURL::List& wc) { apr_array_header_t *targets = apr_array_make(subpool, 1+wc.count(), sizeof(const char *)); - for ( QValueListConstIterator<KURL> it = wc.begin(); it != wc.end() ; ++it ) { + for ( TQValueListConstIterator<KURL> it = wc.begin(); it != wc.end() ; ++it ) { KURL nurl = *it; nurl.setProtocol( "file" ); recordCurrentURL( nurl ); @@ -1158,7 +1158,7 @@ void kio_svnProtocol::wc_revert(const KURL::List& wc) { apr_array_header_t *targets = apr_array_make(subpool, 1 + wc.count(), sizeof(const char *)); - for ( QValueListConstIterator<KURL> it = wc.begin(); it != wc.end() ; ++it ) { + for ( TQValueListConstIterator<KURL> it = wc.begin(); it != wc.end() ; ++it ) { KURL nurl = *it; nurl.setProtocol( "file" ); recordCurrentURL( nurl ); @@ -1174,7 +1174,7 @@ void kio_svnProtocol::wc_revert(const KURL::List& wc) { svn_pool_destroy (subpool); } -void kio_svnProtocol::wc_status(const KURL& wc, bool checkRepos, bool fullRecurse, bool getAll, int revnumber, const QString& revkind) { +void kio_svnProtocol::wc_status(const KURL& wc, bool checkRepos, bool fullRecurse, bool getAll, int revnumber, const TQString& revkind) { kdDebug(7128) << "kio_svnProtocol::status() : " << wc.url() << endl; apr_pool_t *subpool = svn_pool_create (pool); @@ -1200,11 +1200,11 @@ void kio_svnProtocol::wc_status(const KURL& wc, bool checkRepos, bool fullRecurs //change the proto and remove trailing / //remove double / also -QString kio_svnProtocol::makeSvnURL ( const KURL& url ) const { - QString kproto = url.protocol(); +TQString kio_svnProtocol::makeSvnURL ( const KURL& url ) const { + TQString kproto = url.protocol(); KURL tpURL = url; tpURL.cleanPath( true ); - QString svnUrl; + TQString svnUrl; if ( kproto == "svn+http" ) { kdDebug(7128) << "http:/ " << url.url() << endl; tpURL.setProtocol("http"); @@ -1241,12 +1241,12 @@ QString kio_svnProtocol::makeSvnURL ( const KURL& url ) const { return tpURL.url(-1); } -QString kio_svnProtocol::chooseProtocol ( const QString& kproto ) const { - if ( kproto == "svn+http" ) return QString( "http" ); - else if ( kproto == "svn+https" ) return QString( "https" ); - else if ( kproto == "svn+ssh" ) return QString( "svn+ssh" ); - else if ( kproto == "svn" ) return QString( "svn" ); - else if ( kproto == "svn+file" ) return QString( "file" ); +TQString kio_svnProtocol::chooseProtocol ( const TQString& kproto ) const { + if ( kproto == "svn+http" ) return TQString( "http" ); + else if ( kproto == "svn+https" ) return TQString( "https" ); + else if ( kproto == "svn+ssh" ) return TQString( "svn+ssh" ); + else if ( kproto == "svn" ) return TQString( "svn" ); + else if ( kproto == "svn+file" ) return TQString( "file" ); return kproto; } @@ -1270,16 +1270,16 @@ svn_error_t *kio_svnProtocol::clientCertPasswdPrompt(svn_auth_cred_ssl_client_ce } svn_error_t *kio_svnProtocol::commitLogPrompt( const char **log_msg, const char **/*file*/, apr_array_header_t *commit_items, void *baton, apr_pool_t *pool ) { - QCString replyType; - QByteArray params; - QByteArray reply; - QString result; - QStringList slist; + TQCString replyType; + TQByteArray params; + TQByteArray reply; + TQString result; + TQStringList slist; kio_svnProtocol *p = ( kio_svnProtocol* )baton; svn_stringbuf_t *message = NULL; for (int i = 0; i < commit_items->nelts; i++) { - QString list; + TQString list; svn_client_commit_item_t *item = ((svn_client_commit_item_t **) commit_items->elts)[i]; const char *path = item->path; char text_mod = '_', prop_mod = ' '; @@ -1312,20 +1312,20 @@ svn_error_t *kio_svnProtocol::commitLogPrompt( const char **log_msg, const char slist << list; } - QDataStream stream(params, IO_WriteOnly); + TQDataStream stream(params, IO_WriteOnly); stream << slist.join("\n"); - if ( !p->dcopClient()->call( "kded","ksvnd","commitDialog(QString)", params, replyType, reply ) ) { + if ( !p->dcopClient()->call( "kded","ksvnd","commitDialog(TQString)", params, replyType, reply ) ) { kdWarning() << "Communication with KDED:KSvnd failed" << endl; return SVN_NO_ERROR; } - if ( replyType != "QString" ) { + if ( replyType != "TQString" ) { kdWarning() << "Unexpected reply type" << endl; return SVN_NO_ERROR; } - QDataStream stream2 ( reply, IO_ReadOnly ); + TQDataStream stream2 ( reply, IO_ReadOnly ); stream2 >> result; if ( result.isNull() ) { //cancelled @@ -1342,7 +1342,7 @@ svn_error_t *kio_svnProtocol::commitLogPrompt( const char **log_msg, const char void kio_svnProtocol::notify(void *baton, const char *path, svn_wc_notify_action_t action, svn_node_kind_t kind, const char *mime_type, svn_wc_notify_state_t content_state, svn_wc_notify_state_t prop_state, svn_revnum_t revision) { kdDebug(7128) << "NOTIFY : " << path << " updated at revision " << revision << " action : " << action << ", kind : " << kind << " , content_state : " << content_state << ", prop_state : " << prop_state << endl; - QString userstring; + TQString userstring; struct notify_baton *nb = ( struct notify_baton* ) baton; //// Convert notification to a user readable string @@ -1418,7 +1418,7 @@ void kio_svnProtocol::notify(void *baton, const char *path, svn_wc_notify_action || content_state == svn_wc_notify_state_unknown) && (prop_state == svn_wc_notify_state_unchanged || prop_state == svn_wc_notify_state_unknown))) - userstring += QString( " " ) + path; + userstring += TQString( " " ) + path; } break; } @@ -1518,14 +1518,14 @@ void kio_svnProtocol::notify(void *baton, const char *path, svn_wc_notify_action kio_svnProtocol *p = ( kio_svnProtocol* )nb->master; - p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "path" , QString::fromUtf8( path )); - p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "action", QString::number( action )); - p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "kind", QString::number( kind )); - p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "mime_t", QString::fromUtf8( mime_type )); - p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "content", QString::number( content_state )); - p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "prop", QString::number( prop_state )); - p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "rev", QString::number( revision )); - p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "string", userstring ); + p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "path" , TQString::fromUtf8( path )); + p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "action", TQString::number( action )); + p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "kind", TQString::number( kind )); + p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "mime_t", TQString::fromUtf8( mime_type )); + p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "content", TQString::number( content_state )); + p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "prop", TQString::number( prop_state )); + p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "rev", TQString::number( revision )); + p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "string", userstring ); p->incCounter(); } @@ -1536,19 +1536,19 @@ void kio_svnProtocol::status(void *baton, const char *path, svn_wc_status_t *sta << ", repos prop status : " << status->repos_prop_status << endl; - QByteArray params; + TQByteArray params; kio_svnProtocol *p = ( kio_svnProtocol* )baton; - QDataStream stream(params, IO_WriteOnly); + TQDataStream stream(params, IO_WriteOnly); long int rev = status->entry ? status->entry->revision : 0; - stream << QString::fromUtf8( path ) << status->text_status << status->prop_status << status->repos_text_status << status->repos_prop_status << rev; - - p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "path", QString::fromUtf8( path )); - p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "text", QString::number( status->text_status )); - p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "prop", QString::number( status->prop_status )); - p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "reptxt", QString::number( status->repos_text_status )); - p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "repprop", QString::number( status->repos_prop_status )); - p->setMetaData(QString::number( p->counter() ).rightJustify( 10,'0' )+ "rev", QString::number( rev )); + stream << TQString::fromUtf8( path ) << status->text_status << status->prop_status << status->repos_text_status << status->repos_prop_status << rev; + + p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "path", TQString::fromUtf8( path )); + p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "text", TQString::number( status->text_status )); + p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "prop", TQString::number( status->prop_status )); + p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "reptxt", TQString::number( status->repos_text_status )); + p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "repprop", TQString::number( status->repos_prop_status )); + p->setMetaData(TQString::number( p->counter() ).rightJustify( 10,'0' )+ "rev", TQString::number( rev )); p->incCounter(); } diff --git a/kioslave/svn/svn.h b/kioslave/svn/svn.h index 3738ad17..7f85ae4b 100644 --- a/kioslave/svn/svn.h +++ b/kioslave/svn/svn.h @@ -20,8 +20,8 @@ #ifndef _svn_H_ #define _svn_H_ -#include <qstring.h> -#include <qcstring.h> +#include <tqstring.h> +#include <tqcstring.h> #include <kurl.h> #include <kio/global.h> @@ -31,7 +31,7 @@ #include <subversion-1/svn_client.h> #include <subversion-1/svn_config.h> #include <sys/stat.h> -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <subversion-1/svn_wc.h> class QCString; @@ -67,9 +67,9 @@ typedef struct notify_baton { class kio_svnProtocol : public KIO::SlaveBase { public: - kio_svnProtocol(const QCString &pool_socket, const QCString &app_socket); + kio_svnProtocol(const TQCString &pool_socket, const TQCString &app_socket); virtual ~kio_svnProtocol(); - virtual void special( const QByteArray& data ); + virtual void special( const TQByteArray& data ); virtual void get(const KURL& url); virtual void listDir(const KURL& url); virtual void stat(const KURL& url); @@ -78,20 +78,20 @@ class kio_svnProtocol : public KIO::SlaveBase virtual void del( const KURL& url, bool isfile ); virtual void copy(const KURL & src, const KURL& dest, int permissions, bool overwrite); virtual void rename(const KURL& src, const KURL& dest, bool overwrite); - void checkout( const KURL& repos, const KURL& wc, int revnumber, const QString& revkind ); + void checkout( const KURL& repos, const KURL& wc, int revnumber, const TQString& revkind ); void import( const KURL& repos, const KURL& wc ); - void svn_switch( const KURL& wc, const KURL& url, int revnumber, const QString& revkind, bool recurse); - void svn_log( int revstart, const QString& revkindstart, int revend, const QString& revkindend, const KURL::List& targets ); - void svn_diff( const KURL& url1, const KURL& url2, int rev1, int rev2, const QString& revkind1, const QString& revkind2, bool recurse); + void svn_switch( const KURL& wc, const KURL& url, int revnumber, const TQString& revkind, bool recurse); + void svn_log( int revstart, const TQString& revkindstart, int revend, const TQString& revkindend, const KURL::List& targets ); + void svn_diff( const KURL& url1, const KURL& url2, int rev1, int rev2, const TQString& revkind1, const TQString& revkind2, bool recurse); //TODO fix with svn 1.2 : support a KURL::List -> svn_client_update2() - void update( const KURL& wc, int revnumber, const QString& revkind ); + void update( const KURL& wc, int revnumber, const TQString& revkind ); void commit( const KURL::List& wc ); void add( const KURL& wc ); //these work using the working copy void wc_resolve( const KURL& wc, bool recurse = true ); void wc_delete( const KURL::List& wc ); void wc_revert( const KURL::List& wc ); - void wc_status(const KURL& wc, bool checkRepos=false, bool fullRecurse=true, bool getAll=true, int revnumber=-1, const QString& revkind="HEAD"); + void wc_status(const KURL& wc, bool checkRepos=false, bool fullRecurse=true, bool getAll=true, int revnumber=-1, const TQString& revkind="HEAD"); static svn_error_t* checkAuth(svn_auth_cred_simple_t **cred, void *baton, const char *realm, const char *username, svn_boolean_t may_save, apr_pool_t *pool); static svn_error_t *trustSSLPrompt(svn_auth_cred_ssl_server_trust_t **cred_p, void *, const char *realm, apr_uint32_t failures, const svn_auth_ssl_server_cert_info_t *cert_info, svn_boolean_t may_save, apr_pool_t *pool); @@ -101,23 +101,23 @@ class kio_svnProtocol : public KIO::SlaveBase static void notify(void *baton, const char *path, svn_wc_notify_action_t action, svn_node_kind_t kind, const char *mime_type, svn_wc_notify_state_t content_state, svn_wc_notify_state_t prop_state, svn_revnum_t revision); static void status(void *baton, const char *path, svn_wc_status_t *status); - QString chooseProtocol ( const QString& kproto ) const; - QString makeSvnURL ( const KURL& url ) const; + TQString chooseProtocol ( const TQString& kproto ) const; + TQString makeSvnURL ( const KURL& url ) const; void initNotifier(bool is_checkout, bool is_export, bool suppress_final_line, apr_pool_t *spool); void recordCurrentURL(const KURL& url); - void popupMessage( const QString& message ); + void popupMessage( const TQString& message ); int counter() { return m_counter; } void incCounter() { m_counter++; } - svn_opt_revision_t createRevision( int revision, const QString& revkind, apr_pool_t *pool ); + svn_opt_revision_t createRevision( int revision, const TQString& revkind, apr_pool_t *pool ); KURL myURL; svn_client_ctx_t *ctx; KIO::AuthInfo info; enum SVN_METHOD { - SVN_CHECKOUT=1, //KURL repository, KURL workingcopy, int revnumber=-1, QString revkind(HEAD, ...) //revnumber==-1 => use of revkind - SVN_UPDATE=2, // KURL wc (svn:///tmp/test, int revnumber=-1, QString revkind(HEAD, ...) // revnumber==-1 => use of revkind + SVN_CHECKOUT=1, //KURL repository, KURL workingcopy, int revnumber=-1, TQString revkind(HEAD, ...) //revnumber==-1 => use of revkind + SVN_UPDATE=2, // KURL wc (svn:///tmp/test, int revnumber=-1, TQString revkind(HEAD, ...) // revnumber==-1 => use of revkind SVN_COMMIT=3, SVN_LOG=4, SVN_IMPORT=5, @@ -132,7 +132,7 @@ class kio_svnProtocol : public KIO::SlaveBase }; private: - bool createUDSEntry( const QString& filename, const QString& user, long long int size, bool isdir, time_t mtime, KIO::UDSEntry& entry); + bool createUDSEntry( const TQString& filename, const TQString& user, long long int size, bool isdir, time_t mtime, KIO::UDSEntry& entry); apr_pool_t *pool; int m_counter; }; diff --git a/kioslave/svn/svnhelper/kio_svn_helper.cpp b/kioslave/svn/svnhelper/kio_svn_helper.cpp index d38eee3c..e58fb410 100644 --- a/kioslave/svn/svnhelper/kio_svn_helper.cpp +++ b/kioslave/svn/svnhelper/kio_svn_helper.cpp @@ -25,11 +25,11 @@ #include <dcopclient.h> #include <kdebug.h> #include <kglobal.h> -#include <qtimer.h> +#include <tqtimer.h> #include <kio/job.h> #include <kio/jobclasses.h> #include <kio/netaccess.h> -#include <qpixmap.h> +#include <tqpixmap.h> #include <kmessagebox.h> #include "kio_svn_helper.h" @@ -37,14 +37,14 @@ #include "subversionswitch.h" #include "subversiondiff.h" #include <kurlrequester.h> -#include <qspinbox.h> +#include <tqspinbox.h> #include <kprocess.h> #include <ktempfile.h> -#include <qtextstream.h> -#include <qtextedit.h> +#include <tqtextstream.h> +#include <tqtextedit.h> #include <kstandarddirs.h> -#include <qtextbrowser.h> -#include <qtextcodec.h> +#include <tqtextbrowser.h> +#include <tqtextcodec.h> SvnHelper::SvnHelper():KApplication() { KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); @@ -59,68 +59,68 @@ SvnHelper::SvnHelper():KApplication() { kdDebug(7128) << "update " << list << endl; KURL servURL = "svn+http://this_is_a_fake_URL_and_this_is_normal/"; //FIXME when 1.2 is out (move the loop inside kio_svn's ::update) - for ( QValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) { - QByteArray parms; - QDataStream s( parms, IO_WriteOnly ); + for ( TQValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) { + TQByteArray parms; + TQDataStream s( parms, IO_WriteOnly ); int cmd = 2; int rev = -1; kdDebug(7128) << "updating : " << (*it).prettyURL() << endl; - s << cmd << *it << rev << QString( "HEAD" ); + s << cmd << *it << rev << TQString( "HEAD" ); KIO::SimpleJob * job = KIO::special(servURL, parms, true); - connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) ); KIO::NetAccess::synchronousRun( job, 0 ); } } else if (args->isSet("c")) { kdDebug(7128) << "commit " << list << endl; KURL servURL = "svn+http://this_is_a_fake_URL_and_this_is_normal/"; - QByteArray parms; - QDataStream s( parms, IO_WriteOnly ); + TQByteArray parms; + TQDataStream s( parms, IO_WriteOnly ); int cmd = 3; s<<cmd; - for ( QValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) { + for ( TQValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) { kdDebug(7128) << "commiting : " << (*it).prettyURL() << endl; s << *it; } KIO::SimpleJob * job = KIO::special(servURL, parms, true); - connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) ); KIO::NetAccess::synchronousRun( job, 0 ); } else if (args->isSet("a")) { kdDebug(7128) << "add " << list << endl; KURL servURL = "svn+http://this_is_a_fake_URL_and_this_is_normal/"; - for ( QValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) { - QByteArray parms; - QDataStream s( parms, IO_WriteOnly ); + for ( TQValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) { + TQByteArray parms; + TQDataStream s( parms, IO_WriteOnly ); int cmd = 6; kdDebug(7128) << "adding : " << (*it).prettyURL() << endl; s << cmd << *it; KIO::SimpleJob * job = KIO::special(servURL, parms, true); - connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) ); KIO::NetAccess::synchronousRun( job, 0 ); } } else if (args->isSet("D")) { kdDebug(7128) << "diff " << list << endl; KURL servURL = "svn+http://this_is_a_fake_URL_and_this_is_normal/"; - for ( QValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) { - QByteArray parms; - QDataStream s( parms, IO_WriteOnly ); + for ( TQValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) { + TQByteArray parms; + TQDataStream s( parms, IO_WriteOnly ); int cmd = 13; kdDebug(7128) << "diffing : " << (*it).prettyURL() << endl; int rev1=-1; int rev2=-1; - QString revkind1 = "BASE"; - QString revkind2 = "WORKING"; + TQString revkind1 = "BASE"; + TQString revkind2 = "WORKING"; s << cmd << *it << *it << rev1 << revkind1 << rev2 << revkind2 << true ; KIO::SimpleJob * job = KIO::special(servURL, parms, true); - connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) ); KIO::NetAccess::synchronousRun( job, 0 ); if ( diffresult.count() > 0 ) { //check kompare is available if ( !KStandardDirs::findExe( "kompare" ).isNull() ) { KTempFile *tmp = new KTempFile; tmp->setAutoDelete(true); - QTextStream *stream = tmp->textStream(); - stream->setCodec( QTextCodec::codecForName( "utf8" ) ); - for ( QStringList::Iterator it2 = diffresult.begin();it2 != diffresult.end() ; ++it2 ) { + TQTextStream *stream = tmp->textStream(); + stream->setCodec( TQTextCodec::codecForName( "utf8" ) ); + for ( TQStringList::Iterator it2 = diffresult.begin();it2 != diffresult.end() ; ++it2 ) { ( *stream ) << ( *it2 ) << "\n"; } tmp->close(); @@ -129,10 +129,10 @@ SvnHelper::SvnHelper():KApplication() { p->start(); } else { //else do it with message box Subversion_Diff df; - for ( QStringList::Iterator it2 = diffresult.begin();it2 != diffresult.end() ; ++it2 ) { + for ( TQStringList::Iterator it2 = diffresult.begin();it2 != diffresult.end() ; ++it2 ) { df.text->append( *it2 ); } - QFont f = df.font(); + TQFont f = df.font(); f.setFixedPitch( true ); df.text->setFont( f ); df.exec(); @@ -143,29 +143,29 @@ SvnHelper::SvnHelper():KApplication() { } else if (args->isSet("d")) { kdDebug(7128) << "delete " << list << endl; KURL servURL = "svn+http://this_is_a_fake_URL_and_this_is_normal/"; - QByteArray parms; - QDataStream s( parms, IO_WriteOnly ); + TQByteArray parms; + TQDataStream s( parms, IO_WriteOnly ); int cmd = 7; s<<cmd; - for ( QValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) { + for ( TQValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) { kdDebug(7128) << "deleting : " << (*it).prettyURL() << endl; s << *it; } KIO::SimpleJob * job = KIO::special(servURL, parms, true); - connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) ); KIO::NetAccess::synchronousRun( job, 0 ); } else if (args->isSet("s")) { kdDebug(7128) << "switch " << list << endl; SubversionSwitch d; int result = d.exec(); - if ( result == QDialog::Accepted ) { - for ( QValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) { + if ( result == TQDialog::Accepted ) { + for ( TQValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) { kdDebug(7128) << "switching : " << (*it).prettyURL() << endl; KURL servURL = "svn+http://this_is_a_fake_URL_and_this_is_normal/"; - QByteArray parms; - QDataStream s( parms, IO_WriteOnly ); + TQByteArray parms; + TQDataStream s( parms, IO_WriteOnly ); int revnumber = -1; - QString revkind = "HEAD"; + TQString revkind = "HEAD"; if ( d.revision->value() != 0 ) { revnumber = d.revision->value(); revkind = ""; @@ -179,36 +179,36 @@ SvnHelper::SvnHelper():KApplication() { s << revnumber; s << revkind; KIO::SimpleJob * job = KIO::special(servURL, parms, true); - connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) ); KIO::NetAccess::synchronousRun( job, 0 ); } } } else if (args->isSet("r")) { kdDebug(7128) << "revert " << list << endl; KURL servURL = "svn+http://this_is_a_fake_URL_and_this_is_normal/"; - QByteArray parms; - QDataStream s( parms, IO_WriteOnly ); + TQByteArray parms; + TQDataStream s( parms, IO_WriteOnly ); int cmd = 8; s<<cmd; - for ( QValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) { + for ( TQValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) { kdDebug(7128) << "reverting : " << (*it).prettyURL() << endl; s << *it; } KIO::SimpleJob * job = KIO::special(servURL, parms, true); - connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) ); KIO::NetAccess::synchronousRun( job, 0 ); } else if (args->isSet("C")) { kdDebug(7128) << "checkout " << list << endl; SubversionCheckout d; int result = d.exec(); - if ( result == QDialog::Accepted ) { - for ( QValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) { + if ( result == TQDialog::Accepted ) { + for ( TQValueListConstIterator<KURL> it = list.begin(); it != list.end() ; ++it ) { KURL servURL = "svn+http://this_is_a_fake_URL_and_this_is_normal/"; - QByteArray parms; - QDataStream s( parms, IO_WriteOnly ); + TQByteArray parms; + TQDataStream s( parms, IO_WriteOnly ); int cmd = 1; int rev = -1; - QString revkind = "HEAD"; + TQString revkind = "HEAD"; if ( d.revision->value() != 0 ) { rev = d.revision->value(); revkind = ""; @@ -220,14 +220,14 @@ SvnHelper::SvnHelper():KApplication() { s << revkind; kdDebug(7128) << "checkouting : " << d.url->url() << " into " << (*it).prettyURL() << " at rev : " << rev << " or " << revkind << endl; KIO::SimpleJob * job = KIO::special(servURL, parms, true); - connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotResult( KIO::Job * ) ) ); KIO::NetAccess::synchronousRun( job, 0 ); } } } else { KMessageBox::sorry(0, "Sorry, request not recognised. Perhaps not implemented yet?", "Feature Not Implemented"); } - QTimer::singleShot( 0, this, SLOT( finished() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( finished() ) ); } void SvnHelper::slotResult( KIO::Job* job ) { @@ -235,11 +235,11 @@ void SvnHelper::slotResult( KIO::Job* job ) { job->showErrorDialog( ); KIO::MetaData ma = job->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; - QStringList message; + TQStringList message; for ( it = begin; it != end; ++it ) { // kdDebug(7128) << "METADATA helper : " << *it << ":" << ma[ *it ] << endl; if ( ( *it ).endsWith( "string" ) ) { diff --git a/kioslave/svn/svnhelper/kio_svn_helper.h b/kioslave/svn/svnhelper/kio_svn_helper.h index ad2872b5..7f4eb626 100644 --- a/kioslave/svn/svnhelper/kio_svn_helper.h +++ b/kioslave/svn/svnhelper/kio_svn_helper.h @@ -23,7 +23,7 @@ #include <kapplication.h> #include <kio/job.h> #include <kwinmodule.h> -#include <qstringlist.h> +#include <tqstringlist.h> class SvnHelper:public KApplication { Q_OBJECT @@ -35,7 +35,7 @@ private slots: void slotResult( KIO::Job *); private: WId m_id; - QStringList diffresult; //for diff commands ;) + TQStringList diffresult; //for diff commands ;) }; #endif |