diff options
Diffstat (limited to 'kioslave/svn/svnhelper')
-rw-r--r-- | kioslave/svn/svnhelper/kio_svn_helper.cpp | 110 | ||||
-rw-r--r-- | kioslave/svn/svnhelper/kio_svn_helper.h | 4 |
2 files changed, 57 insertions, 57 deletions
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 |