From c663b6440964f6ac48027143ac9e63298991f9d0 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:33:34 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kioslave/about/kio_about.cpp | 10 +- kioslave/about/kio_about.h | 4 +- kioslave/cgi/cgi.cpp | 46 +-- kioslave/cgi/cgi.h | 8 +- kioslave/cgi/kcmcgi/kcmcgi.cpp | 42 +-- kioslave/cgi/kcmcgi/kcmcgi.h | 12 +- kioslave/filter/filter.cc | 12 +- kioslave/filter/filter.h | 6 +- kioslave/finger/kio_finger.cpp | 48 +-- kioslave/finger/kio_finger.h | 14 +- kioslave/fish/fish.cpp | 124 +++--- kioslave/fish/fish.h | 46 +-- kioslave/floppy/kio_floppy.cpp | 146 ++++---- kioslave/floppy/kio_floppy.h | 12 +- kioslave/floppy/program.cpp | 4 +- kioslave/floppy/program.h | 6 +- kioslave/home/homeimpl.cpp | 42 +-- kioslave/home/homeimpl.h | 10 +- kioslave/home/kdedmodule/homedirnotify.cpp | 24 +- kioslave/home/kdedmodule/homedirnotify.h | 4 +- kioslave/home/kdedmodule/homedirnotifymodule.cpp | 4 +- kioslave/home/kdedmodule/homedirnotifymodule.h | 2 +- kioslave/home/kio_home.cpp | 12 +- kioslave/home/kio_home.h | 4 +- kioslave/home/testhome.cpp | 6 +- kioslave/info/info.cc | 28 +- kioslave/info/info.h | 16 +- kioslave/ldap/kio_ldap.cpp | 94 ++--- kioslave/ldap/kio_ldap.h | 28 +- kioslave/mac/kio_mac.cpp | 256 ++++++------- kioslave/mac/kio_mac.h | 28 +- kioslave/man/kio_man.cpp | 386 +++++++++---------- kioslave/man/kio_man.h | 60 +-- kioslave/man/kio_man_test.cpp | 4 +- kioslave/man/kmanpart.cpp | 16 +- kioslave/man/kmanpart.h | 14 +- kioslave/man/man2html.cpp | 206 +++++----- kioslave/man/man2html.h | 4 +- kioslave/media/kcmodule/main.cpp | 22 +- kioslave/media/kcmodule/main.h | 4 +- kioslave/media/kcmodule/managermodule.cpp | 8 +- kioslave/media/kcmodule/managermodule.h | 2 +- kioslave/media/kcmodule/mimetypelistboxitem.cpp | 6 +- kioslave/media/kcmodule/mimetypelistboxitem.h | 10 +- kioslave/media/kcmodule/notifiermodule.cpp | 50 +-- kioslave/media/kcmodule/notifiermodule.h | 6 +- kioslave/media/kcmodule/serviceconfigdialog.cpp | 38 +- kioslave/media/kcmodule/serviceconfigdialog.h | 4 +- kioslave/media/kfile-plugin/kfilemediaplugin.cpp | 52 +-- kioslave/media/kfile-plugin/kfilemediaplugin.h | 4 +- kioslave/media/kio_media.cpp | 30 +- kioslave/media/kio_media.h | 6 +- .../media/libmediacommon/actionlistboxitem.cpp | 8 +- kioslave/media/libmediacommon/actionlistboxitem.h | 6 +- kioslave/media/libmediacommon/medium.cpp | 94 ++--- kioslave/media/libmediacommon/medium.h | 84 ++--- kioslave/media/libmediacommon/notifieraction.cpp | 28 +- kioslave/media/libmediacommon/notifieraction.h | 30 +- .../media/libmediacommon/notifiernothingaction.cpp | 2 +- .../media/libmediacommon/notifiernothingaction.h | 2 +- .../media/libmediacommon/notifieropenaction.cpp | 4 +- kioslave/media/libmediacommon/notifieropenaction.h | 4 +- .../media/libmediacommon/notifierserviceaction.cpp | 54 +-- .../media/libmediacommon/notifierserviceaction.h | 22 +- kioslave/media/libmediacommon/notifiersettings.cpp | 104 +++--- kioslave/media/libmediacommon/notifiersettings.h | 34 +- kioslave/media/mediaimpl.cpp | 66 ++-- kioslave/media/mediaimpl.h | 30 +- kioslave/media/mediamanager/fstabbackend.cpp | 104 +++--- kioslave/media/mediamanager/fstabbackend.h | 40 +- kioslave/media/mediamanager/halbackend.cpp | 324 ++++++++-------- kioslave/media/mediamanager/halbackend.h | 38 +- kioslave/media/mediamanager/linuxcdpolling.cpp | 96 ++--- kioslave/media/mediamanager/linuxcdpolling.h | 26 +- kioslave/media/mediamanager/mediadirnotify.cpp | 8 +- kioslave/media/mediamanager/medialist.cpp | 68 ++-- kioslave/media/mediamanager/medialist.h | 60 +-- kioslave/media/mediamanager/mediamanager.cpp | 84 ++--- kioslave/media/mediamanager/mediamanager.h | 52 +-- kioslave/media/mediamanager/removablebackend.cpp | 62 +-- kioslave/media/mediamanager/removablebackend.h | 22 +- kioslave/media/medianotifier/medianotifier.cpp | 108 +++--- kioslave/media/medianotifier/medianotifier.h | 20 +- .../media/medianotifier/notificationdialog.cpp | 52 +-- kioslave/media/medianotifier/notificationdialog.h | 4 +- kioslave/media/mounthelper/dialog.cpp | 14 +- kioslave/media/mounthelper/dialog.h | 14 +- .../media/mounthelper/kio_media_mounthelper.cpp | 40 +- kioslave/media/mounthelper/kio_media_mounthelper.h | 10 +- kioslave/media/propsdlgplugin/propertiespage.cpp | 76 ++-- kioslave/media/propsdlgplugin/propertiespage.h | 8 +- .../media/propsdlgplugin/propsdlgshareplugin.cpp | 20 +- .../media/propsdlgplugin/propsdlgshareplugin.h | 2 +- kioslave/media/testmedia.cpp | 6 +- kioslave/nfs/kio_nfs.cpp | 148 ++++---- kioslave/nfs/kio_nfs.h | 38 +- kioslave/nntp/nntp.cpp | 108 +++--- kioslave/nntp/nntp.h | 22 +- kioslave/pop3/pop3.cc | 90 ++--- kioslave/pop3/pop3.h | 16 +- kioslave/remote/kdedmodule/remotedirnotify.cpp | 6 +- .../remote/kdedmodule/remotedirnotifymodule.cpp | 4 +- kioslave/remote/kdedmodule/remotedirnotifymodule.h | 2 +- kioslave/remote/kio_remote.cpp | 12 +- kioslave/remote/kio_remote.h | 4 +- kioslave/remote/remoteimpl.cpp | 84 ++--- kioslave/remote/remoteimpl.h | 20 +- kioslave/remote/testremote.cpp | 6 +- kioslave/settings/kio_settings.cc | 32 +- kioslave/sftp/kio_sftp.cpp | 220 +++++------ kioslave/sftp/kio_sftp.h | 44 +-- kioslave/sftp/ksshprocess.cpp | 114 +++--- kioslave/sftp/ksshprocess.h | 50 +-- kioslave/sftp/ksshprocesstest.cpp | 8 +- kioslave/sftp/process.cpp | 24 +- kioslave/sftp/process.h | 42 +-- kioslave/sftp/sftpfileattr.cpp | 22 +- kioslave/sftp/sftpfileattr.h | 32 +- kioslave/smb/kio_smb.cpp | 2 +- kioslave/smb/kio_smb.h | 30 +- kioslave/smb/kio_smb_auth.cpp | 16 +- kioslave/smb/kio_smb_browse.cpp | 26 +- kioslave/smb/kio_smb_config.cpp | 14 +- kioslave/smb/kio_smb_file.cpp | 6 +- kioslave/smb/kio_smb_internal.cpp | 8 +- kioslave/smb/kio_smb_internal.h | 22 +- kioslave/smb/kio_smb_mount.cpp | 42 +-- kioslave/smtp/capabilities.cc | 48 +-- kioslave/smtp/capabilities.h | 30 +- kioslave/smtp/command.cc | 60 +-- kioslave/smtp/command.h | 58 +-- kioslave/smtp/interactivesmtpserver.cc | 74 ++-- kioslave/smtp/interactivesmtpserver.h | 38 +- kioslave/smtp/request.cc | 36 +- kioslave/smtp/request.h | 42 +-- kioslave/smtp/response.cc | 16 +- kioslave/smtp/response.h | 8 +- kioslave/smtp/smtp.cc | 56 +-- kioslave/smtp/smtp.h | 32 +- kioslave/smtp/test_commands.cc | 26 +- kioslave/smtp/test_headergeneration.cc | 4 +- kioslave/smtp/test_responseparser.cc | 6 +- kioslave/smtp/transactionstate.cc | 14 +- kioslave/smtp/transactionstate.h | 26 +- kioslave/system/kdedmodule/systemdirnotify.cpp | 28 +- kioslave/system/kdedmodule/systemdirnotify.h | 4 +- .../system/kdedmodule/systemdirnotifymodule.cpp | 4 +- kioslave/system/kdedmodule/systemdirnotifymodule.h | 2 +- kioslave/system/kio_system.cpp | 14 +- kioslave/system/kio_system.h | 4 +- kioslave/system/systemimpl.cpp | 94 ++--- kioslave/system/systemimpl.h | 22 +- kioslave/system/testsystem.cpp | 6 +- kioslave/tar/ktartest.cpp | 28 +- kioslave/tar/tar.cc | 56 +-- kioslave/tar/tar.h | 6 +- kioslave/thumbnail/cursorcreator.cpp | 12 +- kioslave/thumbnail/cursorcreator.h | 2 +- kioslave/thumbnail/djvucreator.cpp | 12 +- kioslave/thumbnail/djvucreator.h | 2 +- kioslave/thumbnail/exrcreator.cpp | 10 +- kioslave/thumbnail/exrcreator.h | 2 +- kioslave/thumbnail/htmlcreator.cpp | 22 +- kioslave/thumbnail/htmlcreator.h | 6 +- kioslave/thumbnail/imagecreator.cpp | 4 +- kioslave/thumbnail/imagecreator.h | 2 +- kioslave/thumbnail/textcreator.cpp | 32 +- kioslave/thumbnail/textcreator.h | 6 +- kioslave/thumbnail/thumbnail.cpp | 70 ++-- kioslave/thumbnail/thumbnail.h | 12 +- kioslave/trash/kfile-plugin/kfile_trash.cpp | 22 +- kioslave/trash/kfile-plugin/kfile_trash.h | 4 +- kioslave/trash/kio_trash.cpp | 108 +++--- kioslave/trash/kio_trash.h | 16 +- kioslave/trash/ktrash.cpp | 14 +- kioslave/trash/testtrash.cpp | 414 ++++++++++----------- kioslave/trash/testtrash.h | 36 +- kioslave/trash/trashimpl.cpp | 242 ++++++------ kioslave/trash/trashimpl.h | 86 ++--- 179 files changed, 3626 insertions(+), 3626 deletions(-) (limited to 'kioslave') diff --git a/kioslave/about/kio_about.cpp b/kioslave/about/kio_about.cpp index 226de2f4f..5f012fdd6 100644 --- a/kioslave/about/kio_about.cpp +++ b/kioslave/about/kio_about.cpp @@ -21,13 +21,13 @@ #include "kio_about.h" #include -#include +#include #include #include using namespace KIO; -AboutProtocol::AboutProtocol(const QCString &pool_socket, const QCString &app_socket) +AboutProtocol::AboutProtocol(const TQCString &pool_socket, const TQCString &app_socket) : SlaveBase("about", pool_socket, app_socket) { } @@ -38,10 +38,10 @@ AboutProtocol::~AboutProtocol() void AboutProtocol::get( const KURL& ) { - QByteArray output; + TQByteArray output; - QTextStream os( output, IO_WriteOnly ); - os.setEncoding( QTextStream::Latin1 ); // In fast ASCII + TQTextStream os( output, IO_WriteOnly ); + os.setEncoding( TQTextStream::Latin1 ); // In fast ASCII os << "about:blank"; diff --git a/kioslave/about/kio_about.h b/kioslave/about/kio_about.h index 29982dbe7..a5bff2a8f 100644 --- a/kioslave/about/kio_about.h +++ b/kioslave/about/kio_about.h @@ -20,7 +20,7 @@ #ifndef __kio_about_h__ #define __kio_about_h__ -#include +#include #include #include @@ -29,7 +29,7 @@ class AboutProtocol : public KIO::SlaveBase { public: - AboutProtocol(const QCString &pool_socket, const QCString &app_socket); + AboutProtocol(const TQCString &pool_socket, const TQCString &app_socket); virtual ~AboutProtocol(); virtual void get(const KURL& url); diff --git a/kioslave/cgi/cgi.cpp b/kioslave/cgi/cgi.cpp index 011760e0b..5f57c3fe8 100644 --- a/kioslave/cgi/cgi.cpp +++ b/kioslave/cgi/cgi.cpp @@ -19,8 +19,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -33,7 +33,7 @@ using namespace KIO; -CgiProtocol::CgiProtocol( const QCString &pool, const QCString &app ) +CgiProtocol::CgiProtocol( const TQCString &pool, const TQCString &app ) : SlaveBase( "cgi", pool, app ) { kdDebug(7124) << "CgiProtocol::CgiProtocol" << endl; @@ -49,10 +49,10 @@ CgiProtocol::~CgiProtocol() } /** - * Search in reverse order through a QByteArray for a given character. The position + * Search in reverse order through a TQByteArray for a given character. The position * of the character is returned, or -1 if it was not found. */ -static int qByteArrayFindRev( const QByteArray &ba, char c, int startIndex ) +static int qByteArrayFindRev( const TQByteArray &ba, char c, int startIndex ) { for ( int i = startIndex; i >= 0; --i ) if ( ba[i] == c ) return i; @@ -62,29 +62,29 @@ static int qByteArrayFindRev( const QByteArray &ba, char c, int startIndex ) /** * Extract data in ba from start, including no more than len characters from ba. - * Should be exactly comparable to QCString::mid() + * Should be exactly comparable to TQCString::mid() */ -static QCString extractQCString( const QByteArray &ba, uint start, uint len = 0xffffffff ) +static TQCString extractQCString( const TQByteArray &ba, uint start, uint len = 0xffffffff ) { uint realLen = len; if ( ( ba.size() - start ) < len ) realLen = ba.size() - start; - return QCString( &ba[ start ], realLen + 1 ); + return TQCString( &ba[ start ], realLen + 1 ); } /** - * Search through a QByteArray for a given string. The position of the string + * Search through a TQByteArray for a given string. The position of the string * is returned, or -1 if it was not found. */ -static int qByteArrayFindStr( const QByteArray &ba, const char *str ) +static int qByteArrayFindStr( const TQByteArray &ba, const char *str ) { int strLen = qstrlen( str ); int searchLen = ba.size() - strLen; for ( int i = 0; i <= searchLen; ++i ) { - QCString temp = extractQCString( ba, i, strLen ); + TQCString temp = extractQCString( ba, i, strLen ); if ( temp == str ) return i; } @@ -102,30 +102,30 @@ void CgiProtocol::get( const KURL& url ) kdDebug(7124) << " Protocol: " << url.protocol() << endl; kdDebug(7124) << " Filename: " << url.filename() << endl; #endif - QCString protocol = "SERVER_PROTOCOL=HTTP"; + TQCString protocol = "SERVER_PROTOCOL=HTTP"; putenv( protocol.data() ); - QCString requestMethod = "REQUEST_METHOD=GET"; + TQCString requestMethod = "REQUEST_METHOD=GET"; putenv( requestMethod.data() ); - QCString query = url.query().mid( 1 ).local8Bit(); + TQCString query = url.query().mid( 1 ).local8Bit(); query.prepend( "QUERY_STRING=" ); putenv( query.data() ); - QString path = url.path(); + TQString path = url.path(); - QString file; + TQString file; int pos = path.findRev('/'); if ( pos >= 0 ) file = path.mid( pos + 1 ); else file = path; - QString cmd; + TQString cmd; bool stripHeader = false; bool forwardFile = true; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for( it = mCgiPaths.begin(); it != mCgiPaths.end(); ++it ) { cmd = *it; if ( !(*it).endsWith("/") ) @@ -143,7 +143,7 @@ void CgiProtocol::get( const KURL& url ) if ( forwardFile ) { kdDebug(7124) << "Forwarding to '" << path << "'" << endl; - QCString filepath = QFile::encodeName( path ); + TQCString filepath = TQFile::encodeName( path ); fd = fopen( filepath.data(), "r" ); @@ -155,7 +155,7 @@ void CgiProtocol::get( const KURL& url ) } else { kdDebug(7124) << "Cmd: " << cmd << endl; - fd = popen( QFile::encodeName(KProcess::quote( cmd )).data(), "r" ); + fd = popen( TQFile::encodeName(KProcess::quote( cmd )).data(), "r" ); if ( !fd ) { kdDebug(7124) << "Error running '" << cmd << "'" << endl; @@ -184,7 +184,7 @@ void CgiProtocol::get( const KURL& url ) buffer[n] = 0; if ( stripHeader ) { - QByteArray output; + TQByteArray output; // Access the buffer in-place by using setRawData() output.setRawData( buffer, n ); @@ -203,7 +203,7 @@ void CgiProtocol::get( const KURL& url ) kdDebug(7124) << " end: " << end << endl; #endif - QCString contentType = extractQCString( output, colon + 1, end - colon - 1 ); + TQCString contentType = extractQCString( output, colon + 1, end - colon - 1 ); contentType = contentType.stripWhiteSpace(); @@ -231,7 +231,7 @@ void CgiProtocol::get( const KURL& url ) stripHeader = false; } else { - QByteArray array; + TQByteArray array; array.setRawData( buffer, n ); data( array ); array.resetRawData( buffer, n ); diff --git a/kioslave/cgi/cgi.h b/kioslave/cgi/cgi.h index fec90aa59..fbfba7a91 100644 --- a/kioslave/cgi/cgi.h +++ b/kioslave/cgi/cgi.h @@ -18,7 +18,7 @@ #ifndef KIO_CGI_H #define KIO_CGI_H -#include +#include #include @@ -31,7 +31,7 @@ class KProcess; class CgiProtocol : public KIO::SlaveBase { public: - CgiProtocol( const QCString &pool, const QCString &app ); + CgiProtocol( const TQCString &pool, const TQCString &app ); virtual ~CgiProtocol(); virtual void get( const KURL& url ); @@ -39,10 +39,10 @@ class CgiProtocol : public KIO::SlaveBase // virtual void mimetype( const KURL& url ); protected: -// QCString errorMessage(); +// TQCString errorMessage(); private: - QStringList mCgiPaths; + TQStringList mCgiPaths; }; #endif diff --git a/kioslave/cgi/kcmcgi/kcmcgi.cpp b/kioslave/cgi/kcmcgi/kcmcgi.cpp index 18436e8d9..521c0fd95 100644 --- a/kioslave/cgi/kcmcgi/kcmcgi.cpp +++ b/kioslave/cgi/kcmcgi/kcmcgi.cpp @@ -22,18 +22,18 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "kcmcgi.h" #include "kcmcgi.moc" extern "C" { - KDE_EXPORT KCModule *create_cgi( QWidget *parent, const char * ) + KDE_EXPORT KCModule *create_cgi( TQWidget *parent, const char * ) { KGlobal::locale()->insertCatalogue("kcmcgi"); return new KCMCgi( parent, "kcmcgi" ); @@ -41,27 +41,27 @@ extern "C" } -KCMCgi::KCMCgi(QWidget *parent, const char *name) +KCMCgi::KCMCgi(TQWidget *parent, const char *name) : KCModule(parent, name) { setButtons(Default|Apply); - QVBoxLayout *topLayout = new QVBoxLayout(this, 0, KDialog::spacingHint()); + TQVBoxLayout *topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint()); - QGroupBox *topBox = new QGroupBox( 1, Horizontal, i18n("Paths to Local CGI Programs"), this ); + TQGroupBox *topBox = new TQGroupBox( 1, Horizontal, i18n("Paths to Local CGI Programs"), this ); topLayout->addWidget( topBox ); - mListBox = new QListBox( topBox ); + mListBox = new TQListBox( topBox ); - QHBox *buttonBox = new QHBox( topBox ); + TQHBox *buttonBox = new TQHBox( topBox ); buttonBox->setSpacing( KDialog::spacingHint() ); - mAddButton = new QPushButton( i18n("Add..."), buttonBox ); - connect( mAddButton, SIGNAL( clicked() ), SLOT( addPath() ) ); + mAddButton = new TQPushButton( i18n("Add..."), buttonBox ); + connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addPath() ) ); - mRemoveButton = new QPushButton( i18n("Remove"), buttonBox ); - connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removePath() ) ); - connect( mListBox, SIGNAL( clicked ( QListBoxItem * )),this, SLOT( slotItemSelected( QListBoxItem *))); + mRemoveButton = new TQPushButton( i18n("Remove"), buttonBox ); + connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removePath() ) ); + connect( mListBox, TQT_SIGNAL( clicked ( TQListBoxItem * )),this, TQT_SLOT( slotItemSelected( TQListBoxItem *))); mConfig = new KConfig("kcmcgirc"); @@ -82,7 +82,7 @@ KCMCgi::~KCMCgi() delete mConfig; } -void KCMCgi::slotItemSelected( QListBoxItem * ) +void KCMCgi::slotItemSelected( TQListBoxItem * ) { updateButton(); } @@ -100,7 +100,7 @@ void KCMCgi::defaults() void KCMCgi::save() { - QStringList paths; + TQStringList paths; uint i; for( i = 0; i < mListBox->count(); ++i ) { @@ -116,14 +116,14 @@ void KCMCgi::save() void KCMCgi::load() { mConfig->setGroup( "General" ); - QStringList paths = mConfig->readListEntry( "Paths" ); + TQStringList paths = mConfig->readListEntry( "Paths" ); mListBox->insertStringList( paths ); } void KCMCgi::addPath() { - QString path = KFileDialog::getExistingDirectory( QString::null, this ); + TQString path = KFileDialog::getExistingDirectory( TQString::null, this ); if ( !path.isEmpty() ) { mListBox->insertItem( path ); @@ -142,7 +142,7 @@ void KCMCgi::removePath() updateButton(); } -QString KCMCgi::quickHelp() const +TQString KCMCgi::quickHelp() const { return i18n("

CGI Scripts

The CGI KIO slave lets you execute " "local CGI programs without the need to run a web server. " diff --git a/kioslave/cgi/kcmcgi/kcmcgi.h b/kioslave/cgi/kcmcgi/kcmcgi.h index 10e4e3385..344a27b4d 100644 --- a/kioslave/cgi/kcmcgi/kcmcgi.h +++ b/kioslave/cgi/kcmcgi/kcmcgi.h @@ -29,25 +29,25 @@ class KCMCgi : public KCModule { Q_OBJECT public: - KCMCgi( QWidget *parent = 0, const char *name = 0 ); + KCMCgi( TQWidget *parent = 0, const char *name = 0 ); ~KCMCgi(); void load(); void save(); void defaults(); - QString quickHelp() const; + TQString quickHelp() const; public slots: protected slots: void addPath(); void removePath(); - void slotItemSelected( QListBoxItem * item ); + void slotItemSelected( TQListBoxItem * item ); private: void updateButton(); - QListBox *mListBox; - QPushButton *mAddButton; - QPushButton *mRemoveButton; + TQListBox *mListBox; + TQPushButton *mAddButton; + TQPushButton *mRemoveButton; KConfig *mConfig; }; diff --git a/kioslave/filter/filter.cc b/kioslave/filter/filter.cc index fe7cbc154..8392dd160 100644 --- a/kioslave/filter/filter.cc +++ b/kioslave/filter/filter.cc @@ -53,10 +53,10 @@ int kdemain( int argc, char ** argv) return 0; } -FilterProtocol::FilterProtocol( const QCString & protocol, const QCString &pool, const QCString &app ) +FilterProtocol::FilterProtocol( const TQCString & protocol, const TQCString &pool, const TQCString &app ) : KIO::SlaveBase( protocol, pool, app ) { - QString mimetype = QString::fromLatin1("application/x-") + QString::fromLatin1(protocol); + TQString mimetype = TQString::fromLatin1("application/x-") + TQString::fromLatin1(protocol); filter = KFilterBase::findFilterByMimeType( mimetype ); Q_ASSERT(filter); } @@ -82,8 +82,8 @@ void FilterProtocol::get( const KURL & ) bool bError = true; int result; - QByteArray inputBuffer; - QByteArray outputBuffer(8*1024); // Start with a modest buffer + TQByteArray inputBuffer; + TQByteArray outputBuffer(8*1024); // Start with a modest buffer filter->setOutBuffer( outputBuffer.data(), outputBuffer.size() ); while(true) { @@ -139,7 +139,7 @@ void FilterProtocol::get( const KURL & ) dataReq(); // Request data result = readData( inputBuffer); kdDebug(7110) << "requestData: got " << result << "(expecting 0)" << endl; - data( QByteArray() ); // Send EOF + data( TQByteArray() ); // Send EOF } filter->terminate(); @@ -157,7 +157,7 @@ void FilterProtocol::get( const KURL & ) void FilterProtocol::put( const KURL &/*url*/, int, bool /*_overwrite*/, bool /*_resume*/ ) { - error( KIO::ERR_UNSUPPORTED_ACTION, QString::fromLatin1("put")); + error( KIO::ERR_UNSUPPORTED_ACTION, TQString::fromLatin1("put")); } void FilterProtocol::setSubURL(const KURL &url) diff --git a/kioslave/filter/filter.h b/kioslave/filter/filter.h index 51b56061b..4f81af3c7 100644 --- a/kioslave/filter/filter.h +++ b/kioslave/filter/filter.h @@ -24,14 +24,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __filter_h__ #define __filter_h__ -#include +#include #include #include -class FilterProtocol : public QObject, public KIO::SlaveBase +class FilterProtocol : public TQObject, public KIO::SlaveBase { public: - FilterProtocol( const QCString & protocol, const QCString &pool, const QCString &app ); + FilterProtocol( const TQCString & protocol, const TQCString &pool, const TQCString &app ); virtual void get( const KURL &url ); virtual void put( const KURL &url, int _mode, bool _overwrite, diff --git a/kioslave/finger/kio_finger.cpp b/kioslave/finger/kio_finger.cpp index c940998b9..8bfc25106 100644 --- a/kioslave/finger/kio_finger.cpp +++ b/kioslave/finger/kio_finger.cpp @@ -21,11 +21,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -39,7 +39,7 @@ using namespace KIO; -static const QString defaultRefreshRate = "60"; +static const TQString defaultRefreshRate = "60"; extern "C" { @@ -67,10 +67,10 @@ extern "C" /* ---------------------------------------------------------------------------------- */ -FingerProtocol::FingerProtocol(const QCString &pool_socket, const QCString &app_socket) - : QObject(), SlaveBase("finger", pool_socket, app_socket) +FingerProtocol::FingerProtocol(const TQCString &pool_socket, const TQCString &app_socket) + : TQObject(), SlaveBase("finger", pool_socket, app_socket) { - myStdStream = new QString(); + myStdStream = new TQString(); getProgramPath(); } @@ -104,17 +104,17 @@ void FingerProtocol::get(const KURL& url ) // Reset the stream *myStdStream=""; - QString query = myURL->query(); - QString refreshRate = defaultRefreshRate; + TQString query = myURL->query(); + TQString refreshRate = defaultRefreshRate; //kdDebug() << "query: " << query << endl; // Check the validity of the query - QRegExp regExp("?refreshRate=[0-9][0-9]*", true, true); + TQRegExp regExp("?refreshRate=[0-9][0-9]*", true, true); if (query.contains(regExp)) { //kdDebug() << "looks like a valid query" << endl; - QRegExp regExp( "([0-9]+)" ); + TQRegExp regExp( "([0-9]+)" ); regExp.search(query); refreshRate = regExp.cap(0); } @@ -126,16 +126,16 @@ void FingerProtocol::get(const KURL& url ) << *myFingerPath << *myFingerCSSFile << refreshRate << myURL->host() << myURL->user() ; - connect(myKProcess, SIGNAL(receivedStdout(KProcess *, char *, int)), - this, SLOT(slotGetStdOutput(KProcess *, char *, int))); - //connect(myKProcess, SIGNAL(receivedStderr(KProcess *, char *, int)), - // this, SLOT(slotGetStdOutput(KProcess *, char *, int))); + connect(myKProcess, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + this, TQT_SLOT(slotGetStdOutput(KProcess *, char *, int))); + //connect(myKProcess, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), + // this, TQT_SLOT(slotGetStdOutput(KProcess *, char *, int))); myKProcess->start(KProcess::Block, KProcess::All); - data(QCString(myStdStream->local8Bit())); + data(TQCString(myStdStream->local8Bit())); - data(QByteArray()); + data(TQByteArray()); finished(); //clean up @@ -150,7 +150,7 @@ void FingerProtocol::get(const KURL& url ) void FingerProtocol::slotGetStdOutput(KProcess* /* p */, char *s, int len) { //kdDebug() << "void FingerProtocol::slotGetStdoutOutput()" << endl; - *myStdStream += QString::fromLocal8Bit(s, len); + *myStdStream += TQString::fromLocal8Bit(s, len); } @@ -172,7 +172,7 @@ void FingerProtocol::getProgramPath() //kdDebug() << "kfingerMainWindow::getProgramPath()" << endl; // Not to sure wether I'm using the right error number here. - schlpbch - - myPerlPath = new QString(KGlobal::dirs()->findExe("perl")); + myPerlPath = new TQString(KGlobal::dirs()->findExe("perl")); if (myPerlPath->isEmpty()) { //kdDebug() << "Perl command not found" << endl; @@ -185,7 +185,7 @@ void FingerProtocol::getProgramPath() //kdDebug() << "Perl command found:" << *myPerlPath << endl; } - myFingerPath = new QString(KGlobal::dirs()->findExe("finger")); + myFingerPath = new TQString(KGlobal::dirs()->findExe("finger")); if ((myFingerPath->isEmpty())) { //kdDebug() << "Finger command not found" << endl; @@ -198,7 +198,7 @@ void FingerProtocol::getProgramPath() //kdDebug() << "Finger command found:" << *myFingerPath << endl; } - myFingerPerlScript = new QString(locate("data","kio_finger/kio_finger.pl")); + myFingerPerlScript = new TQString(locate("data","kio_finger/kio_finger.pl")); if (myFingerPerlScript->isEmpty()) { //kdDebug() << "kio_finger.pl script not found" << endl; @@ -211,7 +211,7 @@ void FingerProtocol::getProgramPath() //kdDebug() << "kio_finger perl script found: " << *myFingerPerlScript << endl; } - myFingerCSSFile = new QString(locate("data","kio_finger/kio_finger.css")); + myFingerCSSFile = new TQString(locate("data","kio_finger/kio_finger.css")); if (myFingerCSSFile->isEmpty()) { //kdDebug() << "kio_finger.css file not found" << endl; diff --git a/kioslave/finger/kio_finger.h b/kioslave/finger/kio_finger.h index 8d63236d4..92366f45d 100644 --- a/kioslave/finger/kio_finger.h +++ b/kioslave/finger/kio_finger.h @@ -20,21 +20,21 @@ #ifndef __kio_finger_h__ #define __kio_finger_h__ -#include -#include +#include +#include #include #include #include #include -class FingerProtocol : public QObject, public KIO::SlaveBase +class FingerProtocol : public TQObject, public KIO::SlaveBase { Q_OBJECT public: - FingerProtocol(const QCString &pool_socket, const QCString &app_socket); + FingerProtocol(const TQCString &pool_socket, const TQCString &app_socket); virtual ~FingerProtocol(); virtual void mimetype(const KURL& url); @@ -47,9 +47,9 @@ private: KURL *myURL; QString *myPerlPath; - QString *myFingerPath; - QString *myFingerPerlScript; - QString *myFingerCSSFile; + TQString *myFingerPath; + TQString *myFingerPerlScript; + TQString *myFingerCSSFile; QString *myStdStream; diff --git a/kioslave/fish/fish.cpp b/kioslave/fish/fish.cpp index 3967bcd6b..77533964c 100644 --- a/kioslave/fish/fish.cpp +++ b/kioslave/fish/fish.cpp @@ -26,12 +26,12 @@ #include "config.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #ifdef HAVE_PTY_H @@ -245,7 +245,7 @@ const struct fishProtocol::fish_info fishProtocol::fishInfo[] = { 0 } }; -fishProtocol::fishProtocol(const QCString &pool_socket, const QCString &app_socket) +fishProtocol::fishProtocol(const TQCString &pool_socket, const TQCString &app_socket) : SlaveBase("fish", pool_socket, app_socket), mimeBuffer(1024), mimeTypeSent(false) { @@ -254,12 +254,12 @@ fishProtocol::fishProtocol(const QCString &pool_socket, const QCString &app_sock // disabled: currently not needed. Didn't work reliably. // isOpenSSH = !system("ssh -V 2>&1 | grep OpenSSH > /dev/null"); if (isNXFish) - sshPath = strdup(QFile::encodeName(KStandardDirs::findExe("nxfish"))); + sshPath = strdup(TQFile::encodeName(KStandardDirs::findExe("nxfish"))); else - sshPath = strdup(QFile::encodeName(KStandardDirs::findExe("ssh"))); + sshPath = strdup(TQFile::encodeName(KStandardDirs::findExe("ssh"))); } if (suPath == NULL) { - suPath = strdup(QFile::encodeName(KStandardDirs::findExe("su"))); + suPath = strdup(TQFile::encodeName(KStandardDirs::findExe("su"))); } childPid = 0; connectionPort = 0; @@ -282,7 +282,7 @@ fishProtocol::fishProtocol(const QCString &pool_socket, const QCString &app_sock typeAtom.m_long = 0; mimeAtom.m_uds = UDS_MIME_TYPE; mimeAtom.m_long = 0; - mimeAtom.m_str = QString::null; + mimeAtom.m_str = TQString::null; hasAppend = false; @@ -310,7 +310,7 @@ void fishProtocol::openConnection() { if (connectionHost.isEmpty() && !isNXFish) { - error( KIO::ERR_UNKNOWN_HOST, QString::null ); + error( KIO::ERR_UNKNOWN_HOST, TQString::null ); return; } @@ -398,7 +398,7 @@ creates the subprocess bool fishProtocol::connectionStart() { int fd[2]; int rc, flags; - thisFn = QString::null; + thisFn = TQString::null; rc = open_pty_pair(fd); if (rc == -1) { @@ -462,7 +462,7 @@ bool fishProtocol::connectionStart() { // (isOpenSSH?"-C":"+C"), if (connectionPort) - execl(sshPath, "ssh", "-p", QString::number(connectionPort).latin1(), common_args); + execl(sshPath, "ssh", "-p", TQString::number(connectionPort).latin1(), common_args); else execl(sshPath, "ssh", common_args); #undef common_args @@ -535,7 +535,7 @@ writes one chunk of data to stdin of child process void fishProtocol::writeChild(const char *buf, KIO::fileoffset_t len) { if (outBufPos >= 0 && outBuf) { #if 0 - QString debug; + TQString debug; debug.setLatin1(outBuf,outBufLen); if (len > 0) myDebug( << "write request while old one is pending, throwing away input (" << outBufLen << "," << outBufPos << "," << debug.left(10) << "...)" << endl); #endif @@ -550,7 +550,7 @@ void fishProtocol::writeChild(const char *buf, KIO::fileoffset_t len) { manages initial communication setup including password queries */ int fishProtocol::establishConnection(char *buffer, KIO::fileoffset_t len) { - QString buf; + TQString buf; buf.setLatin1(buffer,len); int pos; // Strip trailing whitespace @@ -561,12 +561,12 @@ int fishProtocol::establishConnection(char *buffer, KIO::fileoffset_t len) { while (childPid && ((pos = buf.find('\n')) >= 0 || buf.endsWith(":") || buf.endsWith("?"))) { pos++; - QString str = buf.left(pos); + TQString str = buf.left(pos); buf = buf.mid(pos); if (str == "\n") continue; if (str == "FISH:\n") { - thisFn = QString::null; + thisFn = TQString::null; infoMessage(i18n("Initiating protocol...")); if (!connectionAuth.password.isEmpty()) { connectionAuth.password = connectionAuth.password.left(connectionAuth.password.length()-1); @@ -591,7 +591,7 @@ int fishProtocol::establishConnection(char *buffer, KIO::fileoffset_t len) { } else if (!connectionPassword.isEmpty()) { myDebug( << "sending cpass" << endl); connectionAuth.password = connectionPassword+"\n"; - connectionPassword = QString::null; + connectionPassword = TQString::null; // su does not like receiving a password directly after sending // the password prompt so we wait a while. if (local) @@ -605,7 +605,7 @@ int fishProtocol::establishConnection(char *buffer, KIO::fileoffset_t len) { else connectionAuth.caption = i18n("SSH Authorization") + " - " + url.user() + "@" + url.host(); if ((!firstLogin || !checkCachedAuthentication(connectionAuth))) { - connectionAuth.password = QString::null; // don't prefill + connectionAuth.password = TQString::null; // don't prefill if ( !openPassDlg(connectionAuth)) { error(ERR_USER_CANCELED,connectionHost); shutdownConnection(); @@ -633,7 +633,7 @@ int fishProtocol::establishConnection(char *buffer, KIO::fileoffset_t len) { sleep(1); writeChild(connectionAuth.password.latin1(),connectionAuth.password.length()); } - thisFn = QString::null; + thisFn = TQString::null; return 0; } else if (buf.endsWith("?")) { int rc = messageBox(QuestionYesNo,thisFn+buf); @@ -642,7 +642,7 @@ int fishProtocol::establishConnection(char *buffer, KIO::fileoffset_t len) { } else { writeChild("no\n",3); } - thisFn = QString::null; + thisFn = TQString::null; return 0; } else { myDebug( << "unmatched case in initial handling! shouldn't happen!" << endl); @@ -653,8 +653,8 @@ int fishProtocol::establishConnection(char *buffer, KIO::fileoffset_t len) { /** sets connection information for subsequent commands */ -void fishProtocol::setHost(const QString & host, int port, const QString & u, const QString & pass){ - QString user(u); +void fishProtocol::setHost(const TQString & host, int port, const TQString & u, const TQString & pass){ + TQString user(u); if (isNXFish) local = 0; @@ -731,20 +731,20 @@ bool fishProtocol::sendCommand(fish_command_type cmd, ...) { va_list list; va_start(list, cmd); - QString realCmd = info.command; - QString realAlt = info.alt; - static QRegExp rx("[][\\\\\n $`#!()*?{}~&<>;'\"%^@|\t]"); + TQString realCmd = info.command; + TQString realAlt = info.alt; + static TQRegExp rx("[][\\\\\n $`#!()*?{}~&<>;'\"%^@|\t]"); for (int i = 0; i < info.params; i++) { - QString arg(va_arg(list, const char *)); + TQString arg(va_arg(list, const char *)); int pos = -2; while ((pos = rx.search(arg,pos+2)) >= 0) { - arg.replace(pos,0,QString("\\")); + arg.replace(pos,0,TQString("\\")); } //myDebug( << "arg " << i << ": " << arg << endl); realCmd.append(" ").append(arg); - realAlt.replace(QRegExp("%"+QString::number(i+1)),arg); + realAlt.replace(TQRegExp("%"+TQString::number(i+1)),arg); } - QString s("#"); + TQString s("#"); s.append(realCmd).append("\n ").append(realAlt).append(" 2>&1;echo '### 000'\n"); if (realCmd == "FISH") s.prepend(" "); @@ -756,7 +756,7 @@ bool fishProtocol::sendCommand(fish_command_type cmd, ...) { /** checks response string for result code, converting 000 and 001 appropriately */ -int fishProtocol::handleResponse(const QString &str){ +int fishProtocol::handleResponse(const TQString &str){ myDebug( << "handling: " << str << endl); if (str.startsWith("### ")) { bool isOk = false; @@ -772,9 +772,9 @@ int fishProtocol::handleResponse(const QString &str){ } } -int fishProtocol::makeTimeFromLs(const QString &monthStr, const QString &dayStr, const QString &timeyearStr) +int fishProtocol::makeTimeFromLs(const TQString &monthStr, const TQString &dayStr, const TQString &timeyearStr) { - QDateTime dt(QDate::currentDate(Qt::UTC)); + TQDateTime dt(TQDate::currentDate(Qt::UTC)); int year = dt.date().year(); int month = dt.date().month(); int currentMonth = month; @@ -807,11 +807,11 @@ int fishProtocol::makeTimeFromLs(const QString &monthStr, const QString &dayStr, /** parses response from server and acts accordingly */ -void fishProtocol::manageConnection(const QString &l) { - QString line(l); +void fishProtocol::manageConnection(const TQString &l) { + TQString line(l); int rc = handleResponse(line); UDSAtom atom; - QDateTime dt; + TQDateTime dt; KIO::filesize_t fsize; int pos, pos2, pos3; bool isOk = false; @@ -927,12 +927,12 @@ void fishProtocol::manageConnection(const QString &l) { pos2 = line.find(' ',pos+1); pos3 = line.find(' ',pos2+1); if (pos < 0 || pos2 < 0 || pos3 < 0) break; - dt.setDate(QDate(line.mid(1,pos-1).toInt(),line.mid(pos+1,pos2-pos-1).toInt(),line.mid(pos2+1,pos3-pos2-1).toInt())); + dt.setDate(TQDate(line.mid(1,pos-1).toInt(),line.mid(pos+1,pos2-pos-1).toInt(),line.mid(pos2+1,pos3-pos2-1).toInt())); pos = pos3; pos2 = line.find(' ',pos+1); pos3 = line.find(' ',pos2+1); if (pos < 0 || pos2 < 0 || pos3 < 0) break; - dt.setTime(QTime(line.mid(pos+1,pos2-pos-1).toInt(),line.mid(pos2+1,pos3-pos2-1).toInt(),line.mid(pos3+1).toInt())); + dt.setTime(TQTime(line.mid(pos+1,pos2-pos-1).toInt(),line.mid(pos2+1,pos3-pos2-1).toInt(),line.mid(pos3+1).toInt())); errorCount--; atom.m_long = dt.toTime_t(); udsEntry.append(atom); @@ -970,7 +970,7 @@ void fishProtocol::manageConnection(const QString &l) { break; case 'M': { - QString type = line.mid(1); + TQString type = line.mid(1); // First thing's first. If remote says this is a directory, throw out any // name-based file type guesses. @@ -1001,7 +1001,7 @@ void fishProtocol::manageConnection(const QString &l) { } else { if (!mimeAtom.m_str.isNull()) udsEntry.append(mimeAtom); - mimeAtom.m_str = QString::null; + mimeAtom.m_str = TQString::null; udsEntry.append(typeAtom); typeAtom.m_long = 0; @@ -1164,23 +1164,23 @@ void fishProtocol::manageConnection(const QString &l) { statEntry(udsStatEntry); } else if (fishCommand == FISH_APPEND) { dataReq(); - if (readData(rawData) > 0) sendCommand(FISH_APPEND,E(QString::number(rawData.size())),E(url.path())); - else if (!checkExist && putPerm > -1) sendCommand(FISH_CHMOD,E(QString::number(putPerm,8)),E(url.path())); + if (readData(rawData) > 0) sendCommand(FISH_APPEND,E(TQString::number(rawData.size())),E(url.path())); + else if (!checkExist && putPerm > -1) sendCommand(FISH_CHMOD,E(TQString::number(putPerm,8)),E(url.path())); sendLen = rawData.size(); } else if (fishCommand == FISH_WRITE) { dataReq(); - if (readData(rawData) > 0) sendCommand(FISH_WRITE,E(QString::number(putPos)),E(QString::number(rawData.size())),E(url.path())); - else if (!checkExist && putPerm > -1) sendCommand(FISH_CHMOD,E(QString::number(putPerm,8)),E(url.path())); + if (readData(rawData) > 0) sendCommand(FISH_WRITE,E(TQString::number(putPos)),E(TQString::number(rawData.size())),E(url.path())); + else if (!checkExist && putPerm > -1) sendCommand(FISH_CHMOD,E(TQString::number(putPerm,8)),E(url.path())); putPos += rawData.size(); sendLen = rawData.size(); } else if (fishCommand == FISH_RETR) { - data(QByteArray()); + data(TQByteArray()); } finished(); } } -void fishProtocol::writeStdin(const QString &line) +void fishProtocol::writeStdin(const TQString &line) { qlist.append(line); @@ -1277,7 +1277,7 @@ int fishProtocol::received(const char *buffer, KIO::fileoffset_t buflen) continue; // Process rest of buffer/buflen } - QByteArray bdata; + TQByteArray bdata; bdata.duplicate(buffer,dataSize); data(bdata); @@ -1301,7 +1301,7 @@ int fishProtocol::received(const char *buffer, KIO::fileoffset_t buflen) if (pos < buflen) { - QString s = remoteEncoding()->decode(QCString(buffer,pos+1)); + TQString s = remoteEncoding()->decode(TQCString(buffer,pos+1)); buffer += pos+1; buflen -= pos+1; @@ -1374,7 +1374,7 @@ void fishProtocol::finished() { } } /** aborts command sequence and calls error() */ -void fishProtocol::error(int type, const QString &detail) { +void fishProtocol::error(int type, const TQString &detail) { commandList.clear(); commandCodes.clear(); myDebug( << "ERROR: " << type << " - " << detail << endl); @@ -1409,7 +1409,7 @@ void fishProtocol::run() { } if (FD_ISSET(childFd,&wfds) && outBufPos >= 0) { #if 0 - QString debug; + TQString debug; debug.setLatin1(outBuf+outBufPos,outBufLen-outBufPos); myDebug( << "now writing " << (outBufLen-outBufPos) << " " << debug.left(40) << "..." << endl); #endif @@ -1436,7 +1436,7 @@ void fishProtocol::run() { if (rc > 0) { int noff = received(buf,rc+offset); if (noff > 0) memmove(buf,buf+offset+rc-noff,noff); - //myDebug( << "left " << noff << " bytes: " << QString::fromLatin1(buf,offset) << endl); + //myDebug( << "left " << noff << " bytes: " << TQString::fromLatin1(buf,offset) << endl); offset = noff; } else { if (errno == EINTR) @@ -1513,7 +1513,7 @@ void fishProtocol::mkdir(const KURL& u, int permissions) { sendCommand(FISH_PWD); } else { sendCommand(FISH_MKD,E(url.path())); - if (permissions > -1) sendCommand(FISH_CHMOD,E(QString::number(permissions,8)),E(url.path())); + if (permissions > -1) sendCommand(FISH_CHMOD,E(TQString::number(permissions,8)),E(url.path())); } run(); } @@ -1544,7 +1544,7 @@ void fishProtocol::rename(const KURL& s, const KURL& d, bool overwrite) { run(); } /** create a symlink */ -void fishProtocol::symlink(const QString& target, const KURL& u, bool overwrite) { +void fishProtocol::symlink(const TQString& target, const KURL& u, bool overwrite) { myDebug( << "@@@@@@@@@ symlink " << target << " " << u << " " << overwrite << endl); setHost(u.host(),u.port(),u.user(),u.pass()); url = u; @@ -1574,7 +1574,7 @@ void fishProtocol::chmod(const KURL& u, int permissions){ if (!url.hasPath()) { sendCommand(FISH_PWD); } else { - if (permissions > -1) sendCommand(FISH_CHMOD,E(QString::number(permissions,8)),E(url.path())); + if (permissions > -1) sendCommand(FISH_CHMOD,E(TQString::number(permissions,8)),E(url.path())); } run(); } @@ -1602,7 +1602,7 @@ void fishProtocol::copy(const KURL &s, const KURL &d, int permissions, bool over sendCommand(FISH_LIST,E(url.path())); } sendCommand(FISH_COPY,E(src.path()),E(url.path())); - if (permissions > -1) sendCommand(FISH_CHMOD,E(QString::number(permissions,8)),E(url.path())); + if (permissions > -1) sendCommand(FISH_CHMOD,E(TQString::number(permissions,8)),E(url.path())); } run(); } @@ -1622,18 +1622,18 @@ void fishProtocol::del(const KURL &u, bool isFile){ run(); } /** special like background execute */ -void fishProtocol::special( const QByteArray &data ){ +void fishProtocol::special( const TQByteArray &data ){ int tmp; - QDataStream stream(data, IO_ReadOnly); + TQDataStream stream(data, IO_ReadOnly); stream >> tmp; switch (tmp) { case FISH_EXEC_CMD: // SSH EXEC { KURL u; - QString command; - QString tempfile; + TQString command; + TQString tempfile; stream >> u; stream >> command; myDebug( << "@@@@@@@@@ exec " << u << " " << command << endl); @@ -1647,7 +1647,7 @@ void fishProtocol::special( const QByteArray &data ){ } default: // Some command we don't understand. - error(ERR_UNSUPPORTED_ACTION,QString().setNum(tmp)); + error(ERR_UNSUPPORTED_ACTION,TQString().setNum(tmp)); break; } } @@ -1657,5 +1657,5 @@ void fishProtocol::slave_status() { if (childPid > 0) slaveStatus(connectionHost,isLoggedIn); else - slaveStatus(QString::null,false); + slaveStatus(TQString::null,false); } diff --git a/kioslave/fish/fish.h b/kioslave/fish/fish.h index e2665a320..6508d39ba 100644 --- a/kioslave/fish/fish.h +++ b/kioslave/fish/fish.h @@ -16,8 +16,8 @@ #ifndef __fish_h__ #define __fish_h__ -#include -#include +#include +#include #include @@ -32,7 +32,7 @@ class fishProtocol : public KIO::SlaveBase { public: - fishProtocol(const QCString &pool_socket, const QCString &app_socket); + fishProtocol(const TQCString &pool_socket, const TQCString &app_socket); virtual ~fishProtocol(); /** @@ -48,7 +48,7 @@ It is set to false if the connection becomes closed. */ void shutdownConnection(bool forced=false); /** sets connection information for subsequent commands */ - void setHost(const QString & host, int port, const QString & user, const QString & pass); + void setHost(const TQString & host, int port, const TQString & user, const TQString & pass); /** Forced close of the connection */ void closeConnection(); /** get a file */ @@ -56,7 +56,7 @@ It is set to false if the connection becomes closed. /** put a file */ void put(const KURL& url, int permissions, bool overwrite, bool resume); /** aborts command sequence and calls error() */ - void error(int type, const QString &detail); + void error(int type, const TQString &detail); /** executes next command in sequence or calls finished() if all is done */ void finished(); /** stat a file */ @@ -70,7 +70,7 @@ It is set to false if the connection becomes closed. /** rename a file */ void rename(const KURL& src, const KURL& dest, bool overwrite); /** create a symlink */ - void symlink(const QString& target, const KURL& dest, bool overwrite); + void symlink(const TQString& target, const KURL& dest, bool overwrite); /** change file permissions */ void chmod(const KURL& url, int permissions); /** copies a file */ @@ -80,7 +80,7 @@ It is set to false if the connection becomes closed. /** removes a file or directory */ void del(const KURL &u, bool isfile); /** special like background execute */ - void special( const QByteArray &data ); + void special( const TQByteArray &data ); private: // Private attributes /** the SSH process used to communicate with the remote end */ @@ -98,7 +98,7 @@ private: // Private attributes /** // FIXME: just a workaround for konq deficiencies */ bool isStat; /** // FIXME: just a workaround for konq deficiencies */ - QString redirectUser, redirectPass; + TQString redirectUser, redirectPass; protected: // Protected attributes /** for LIST/STAT */ @@ -110,32 +110,32 @@ protected: // Protected attributes /** for LIST/STAT */ KIO::UDSAtom mimeAtom; /** for LIST/STAT */ - QString thisFn; + TQString thisFn; /** for STAT */ - QString wantedFn; - QString statPath; + TQString wantedFn; + TQString statPath; /** url of current request */ KURL url; /** true if connection is logged in successfully */ bool isLoggedIn; /** host name of current connection */ - QString connectionHost; + TQString connectionHost; /** user name of current connection */ - QString connectionUser; + TQString connectionUser; /** port of current connection */ int connectionPort; /** password of current connection */ - QString connectionPassword; + TQString connectionPassword; /** AuthInfo object used for logging in */ KIO::AuthInfo connectionAuth; /** number of lines received, == 0 -> everything went ok */ int errorCount; /** queue for lines to be sent */ - QStringList qlist; + TQStringList qlist; /** queue for commands to be sent */ - QStringList commandList; + TQStringList commandList; /** queue for commands to be sent */ - QValueList commandCodes; + TQValueList commandCodes; /** bytes still to be read in raw mode */ KIO::fileoffset_t rawRead; /** bytes still to be written in raw mode */ @@ -163,9 +163,9 @@ protected: // Protected attributes /** true if this is the first login attempt (== use cached password) */ bool firstLogin; /** write buffer */ - QByteArray rawData; + TQByteArray rawData; /** buffer for storing bytes used for MimeMagic */ - QByteArray mimeBuffer; + TQByteArray mimeBuffer; /** whther the mimetype has been sent already */ bool mimeTypeSent; /** number of bytes read so far */ @@ -192,9 +192,9 @@ protected: // Protected methods /** builds each FISH request and sets the error counter */ bool sendCommand(fish_command_type cmd, ...); /** checks response string for result code, converting 000 and 001 appropriately */ - int handleResponse(const QString &str); + int handleResponse(const TQString &str); /** parses a ls -l time spec */ - int makeTimeFromLs(const QString &dayStr, const QString &monthStr, const QString &timeyearStr); + int makeTimeFromLs(const TQString &dayStr, const TQString &monthStr, const TQString &timeyearStr); /** executes a chain of commands */ void run(); /** creates the subprocess */ @@ -202,9 +202,9 @@ protected: // Protected methods /** writes one chunk of data to stdin of child process */ void writeChild(const char *buf, KIO::fileoffset_t len); /** parses response from server and acts accordingly */ - void manageConnection(const QString &line); + void manageConnection(const TQString &line); /** writes to process */ - void writeStdin(const QString &line); + void writeStdin(const TQString &line); }; diff --git a/kioslave/floppy/kio_floppy.cpp b/kioslave/floppy/kio_floppy.cpp index ef3d6e6f2..a0c68a9d2 100644 --- a/kioslave/floppy/kio_floppy.cpp +++ b/kioslave/floppy/kio_floppy.cpp @@ -36,9 +36,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "kio_floppy.h" @@ -67,12 +67,12 @@ int kdemain( int argc, char **argv ) return 0; } -void getDriveAndPath(const QString& path, QString& drive, QString& rest) +void getDriveAndPath(const TQString& path, TQString& drive, TQString& rest) { - drive=QString::null; - rest=QString::null; - QStringList list=QStringList::split("/",path); - for (QStringList::Iterator it=list.begin(); it!=list.end(); it++) + drive=TQString::null; + rest=TQString::null; + TQStringList list=TQStringList::split("/",path); + for (TQStringList::Iterator it=list.begin(); it!=list.end(); it++) { if (it==list.begin()) drive=(*it)+":"; @@ -81,7 +81,7 @@ void getDriveAndPath(const QString& path, QString& drive, QString& rest) } } -FloppyProtocol::FloppyProtocol (const QCString &pool, const QCString &app ) +FloppyProtocol::FloppyProtocol (const TQCString &pool, const TQCString &app ) :SlaveBase( "floppy", pool, app ) ,m_mtool(0) ,m_stdoutBuffer(0) @@ -185,15 +185,15 @@ void FloppyProtocol::terminateBuffers() //kdDebug(7101)<<"Floppy::terminateBuffers() ends"< -1) { @@ -255,7 +255,7 @@ void FloppyProtocol::listDir( const KURL& _url) { kdDebug(7101)<<"Floppy::listDir() "<<_url.path()<0) { name=line.mid(0,nameLength); - QString ext=line.mid(9,3); + TQString ext=line.mid(9,3); ext=ext.stripWhiteSpace(); if (!ext.isEmpty()) name+="."+ext; @@ -470,7 +470,7 @@ StatInfo FloppyProtocol::createStatInfo(const QString line, bool makeStat, const info.name=name; info.size=size.toInt(); - QDateTime date(QDate(year.toInt(),month.toInt(),day.toInt()),QTime(hour.toInt(),minute.toInt())); + TQDateTime date(TQDate(year.toInt(),month.toInt(),day.toInt()),TQTime(hour.toInt(),minute.toInt())); info.time=date.toTime_t(); if (isDir) @@ -489,9 +489,9 @@ StatInfo FloppyProtocol::_stat(const KURL& url) { StatInfo info; - QString path(url.path()); - QString drive; - QString floppyPath; + TQString path(url.path()); + TQString drive; + TQString floppyPath; getDriveAndPath(path,drive,floppyPath); if (floppyPath.isEmpty()) @@ -511,7 +511,7 @@ StatInfo FloppyProtocol::_stat(const KURL& url) if (m_mtool!=0) delete m_mtool; - QStringList args; + TQStringList args; args<<"mdir"<<"-a"<<(drive+floppyPath); //kdDebug(7101)<<"Floppy::_stat(): create m_mtool"<start()) { delete m_mtool; m_mtool=0; - errorMissingMToolsProgram(usingmdel ? QString("mdel") : QString("mrd")); + errorMissingMToolsProgram(usingmdel ? TQString("mdel") : TQString("mrd")); return; } @@ -870,8 +870,8 @@ void FloppyProtocol::del( const KURL& url, bool isfile) void FloppyProtocol::rename( const KURL &src, const KURL &dest, bool _overwrite ) { - QString srcPath(src.path()); - QString destPath(dest.path()); + TQString srcPath(src.path()); + TQString destPath(dest.path()); kdDebug(7101)<<"Floppy::rename() -"< +#include struct StatInfo { StatInfo():name(""),time(0),size(0),mode(0),freeSpace(0),isDir(false),isValid(false) {;} - QString name; + TQString name; time_t time; int size; int mode; @@ -43,7 +43,7 @@ struct StatInfo class FloppyProtocol : public KIO::SlaveBase { public: - FloppyProtocol (const QCString &pool, const QCString &app ); + FloppyProtocol (const TQCString &pool, const TQCString &app ); virtual ~FloppyProtocol(); virtual void listDir( const KURL& url); @@ -59,13 +59,13 @@ class FloppyProtocol : public KIO::SlaveBase int readStdout(); int readStderr(); - StatInfo createStatInfo(const QString line, bool makeStat=false, const QString& dirName=""); + StatInfo createStatInfo(const TQString line, bool makeStat=false, const TQString& dirName=""); void createUDSEntry(const StatInfo& info, KIO::UDSEntry& entry); StatInfo _stat(const KURL& _url); int freeSpace(const KURL& url); - bool stopAfterError(const KURL& url, const QString& drive); - void errorMissingMToolsProgram(const QString& name); + bool stopAfterError(const KURL& url, const TQString& drive); + void errorMissingMToolsProgram(const TQString& name); void clearBuffers(); void terminateBuffers(); diff --git a/kioslave/floppy/program.cpp b/kioslave/floppy/program.cpp index 7cfd4989a..83080c233 100644 --- a/kioslave/floppy/program.cpp +++ b/kioslave/floppy/program.cpp @@ -31,7 +31,7 @@ #include -Program::Program(const QStringList &args) +Program::Program(const TQStringList &args) :m_pid(0) ,mArgs(args) ,mStarted(false) @@ -135,7 +135,7 @@ bool Program::start() char **arglist=(char**)malloc((mArgs.count()+1)*sizeof(char*)); int c=0; - for (QStringList::Iterator it=mArgs.begin(); it!=mArgs.end(); ++it) + for (TQStringList::Iterator it=mArgs.begin(); it!=mArgs.end(); ++it) { arglist[c]=(char*)malloc((*it).length()+1); strcpy(arglist[c], (*it).latin1()); diff --git a/kioslave/floppy/program.h b/kioslave/floppy/program.h index 29ea634ad..409603689 100644 --- a/kioslave/floppy/program.h +++ b/kioslave/floppy/program.h @@ -20,7 +20,7 @@ #ifndef PROGRAM_H #define PROGRAM_H -#include +#include /** * start programs and write to thieir stdin, stderr, @@ -29,7 +29,7 @@ class Program { public: - Program(const QStringList &args); + Program(const TQStringList &args); ~Program(); bool start(); bool isRunning(); @@ -45,7 +45,7 @@ protected: int mStdin[2]; int mStderr[2]; int m_pid; - QStringList mArgs; + TQStringList mArgs; bool mStarted; }; diff --git a/kioslave/home/homeimpl.cpp b/kioslave/home/homeimpl.cpp index 7e86173ba..12a692319 100644 --- a/kioslave/home/homeimpl.cpp +++ b/kioslave/home/homeimpl.cpp @@ -20,8 +20,8 @@ #include "homeimpl.h" #include -#include -#include +#include +#include #include @@ -33,9 +33,9 @@ HomeImpl::HomeImpl() m_effectiveUid = user.uid(); } -bool HomeImpl::parseURL(const KURL &url, QString &name, QString &path) const +bool HomeImpl::parseURL(const KURL &url, TQString &name, TQString &path) const { - QString url_path = url.path(); + TQString url_path = url.path(); int i = url_path.find('/', 1); if (i > 0) @@ -46,13 +46,13 @@ bool HomeImpl::parseURL(const KURL &url, QString &name, QString &path) const else { name = url_path.mid(1); - path = QString::null; + path = TQString::null; } - return name != QString::null; + return name != TQString::null; } -bool HomeImpl::realURL(const QString &name, const QString &path, KURL &url) +bool HomeImpl::realURL(const TQString &name, const TQString &path, KURL &url) { KUser user(name); @@ -69,23 +69,23 @@ bool HomeImpl::realURL(const QString &name, const QString &path, KURL &url) } -bool HomeImpl::listHomes(QValueList &list) +bool HomeImpl::listHomes(TQValueList &list) { kdDebug() << "HomeImpl::listHomes" << endl; KUser current_user; - QValueList groups = current_user.groups(); - QValueList uid_list; + TQValueList groups = current_user.groups(); + TQValueList uid_list; - QValueList::iterator groups_it = groups.begin(); - QValueList::iterator groups_end = groups.end(); + TQValueList::iterator groups_it = groups.begin(); + TQValueList::iterator groups_end = groups.end(); for(; groups_it!=groups_end; ++groups_it) { - QValueList users = (*groups_it).users(); + TQValueList users = (*groups_it).users(); - QValueList::iterator it = users.begin(); - QValueList::iterator users_end = users.end(); + TQValueList::iterator it = users.begin(); + TQValueList::iterator users_end = users.end(); for(; it!=users_end; ++it) { @@ -104,7 +104,7 @@ bool HomeImpl::listHomes(QValueList &list) } static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l, - const QString &s = QString::null) + const TQString &s = TQString::null) { KIO::UDSAtom atom; atom.m_uds = ID; @@ -133,7 +133,7 @@ void HomeImpl::createHomeEntry(KIO::UDSEntry &entry, entry.clear(); - QString full_name = user.loginName(); + TQString full_name = user.loginName(); if (!user.fullName().isEmpty()) { @@ -148,7 +148,7 @@ void HomeImpl::createHomeEntry(KIO::UDSEntry &entry, addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory"); - QString icon_name = "folder_home2"; + TQString icon_name = "folder_home2"; if (user.uid()==m_effectiveUid) { @@ -162,7 +162,7 @@ void HomeImpl::createHomeEntry(KIO::UDSEntry &entry, entry += extractUrlInfos(url); } -bool HomeImpl::statHome(const QString &name, KIO::UDSEntry &entry) +bool HomeImpl::statHome(const TQString &name, KIO::UDSEntry &entry) { kdDebug() << "HomeImpl::statHome: " << name << endl; @@ -193,8 +193,8 @@ KIO::UDSEntry HomeImpl::extractUrlInfos(const KURL &url) m_entryBuffer.clear(); KIO::StatJob *job = KIO::stat(url, false); - connect( job, SIGNAL( result(KIO::Job *) ), - this, SLOT( slotStatResult(KIO::Job *) ) ); + connect( job, TQT_SIGNAL( result(KIO::Job *) ), + this, TQT_SLOT( slotStatResult(KIO::Job *) ) ); qApp->eventLoop()->enterLoop(); KIO::UDSEntry::iterator it = m_entryBuffer.begin(); diff --git a/kioslave/home/homeimpl.h b/kioslave/home/homeimpl.h index 8c4ace279..62c7b3868 100644 --- a/kioslave/home/homeimpl.h +++ b/kioslave/home/homeimpl.h @@ -25,7 +25,7 @@ #include #include -#include +#include class HomeImpl : public QObject { @@ -33,11 +33,11 @@ Q_OBJECT public: HomeImpl(); - bool parseURL(const KURL &url, QString &name, QString &path) const; - bool realURL(const QString &name, const QString &path, KURL &url); + bool parseURL(const KURL &url, TQString &name, TQString &path) const; + bool realURL(const TQString &name, const TQString &path, KURL &url); - bool statHome(const QString &name, KIO::UDSEntry &entry); - bool listHomes(QValueList &list); + bool statHome(const TQString &name, KIO::UDSEntry &entry); + bool listHomes(TQValueList &list); void createTopLevelEntry(KIO::UDSEntry &entry) const; diff --git a/kioslave/home/kdedmodule/homedirnotify.cpp b/kioslave/home/kdedmodule/homedirnotify.cpp index e4eab44bb..823027fe2 100644 --- a/kioslave/home/kdedmodule/homedirnotify.cpp +++ b/kioslave/home/kdedmodule/homedirnotify.cpp @@ -37,18 +37,18 @@ void HomeDirNotify::init() mInited = true; KUser current_user; - QValueList groups = current_user.groups(); - QValueList uid_list; + TQValueList groups = current_user.groups(); + TQValueList uid_list; - QValueList::iterator groups_it = groups.begin(); - QValueList::iterator groups_end = groups.end(); + TQValueList::iterator groups_it = groups.begin(); + TQValueList::iterator groups_end = groups.end(); for(; groups_it!=groups_end; ++groups_it) { - QValueList users = (*groups_it).users(); + TQValueList users = (*groups_it).users(); - QValueList::iterator it = users.begin(); - QValueList::iterator users_end = users.end(); + TQValueList::iterator it = users.begin(); + TQValueList::iterator users_end = users.end(); for(; it!=users_end; ++it) { @@ -57,7 +57,7 @@ void HomeDirNotify::init() { uid_list.append( (*it).uid() ); - QString name = (*it).loginName(); + TQString name = (*it).loginName(); KURL url; url.setPath( (*it).homeDir() ); @@ -72,17 +72,17 @@ KURL HomeDirNotify::toHomeURL(const KURL &url) kdDebug() << "HomeDirNotify::toHomeURL(" << url << ")" << endl; init(); - QMap::iterator it = m_homeFoldersMap.begin(); - QMap::iterator end = m_homeFoldersMap.end(); + TQMap::iterator it = m_homeFoldersMap.begin(); + TQMap::iterator end = m_homeFoldersMap.end(); for (; it!=end; ++it) { - QString name = it.key(); + TQString name = it.key(); KURL base = it.data(); if ( base.isParentOf(url) ) { - QString path = KURL::relativePath(base.path(), + TQString path = KURL::relativePath(base.path(), url.path()); KURL result("home:/"+name+"/"+path); result.cleanPath(); diff --git a/kioslave/home/kdedmodule/homedirnotify.h b/kioslave/home/kdedmodule/homedirnotify.h index 14655a1cd..dbbd0845e 100644 --- a/kioslave/home/kdedmodule/homedirnotify.h +++ b/kioslave/home/kdedmodule/homedirnotify.h @@ -22,7 +22,7 @@ #include #include -#include +#include class HomeDirNotify : public KDirNotify { @@ -41,7 +41,7 @@ private: KURL toHomeURL(const KURL &url); KURL::List toHomeURLList(const KURL::List &list); - QMap m_homeFoldersMap; + TQMap m_homeFoldersMap; bool mInited; }; diff --git a/kioslave/home/kdedmodule/homedirnotifymodule.cpp b/kioslave/home/kdedmodule/homedirnotifymodule.cpp index 1b91ccc31..03f664117 100644 --- a/kioslave/home/kdedmodule/homedirnotifymodule.cpp +++ b/kioslave/home/kdedmodule/homedirnotifymodule.cpp @@ -22,13 +22,13 @@ #include #include -HomeDirNotifyModule::HomeDirNotifyModule(const QCString &obj) +HomeDirNotifyModule::HomeDirNotifyModule(const TQCString &obj) : KDEDModule(obj) { } extern "C" { - KDE_EXPORT KDEDModule *create_homedirnotify(const QCString &obj) + KDE_EXPORT KDEDModule *create_homedirnotify(const TQCString &obj) { KGlobal::locale()->insertCatalogue("kio_home"); return new HomeDirNotifyModule(obj); diff --git a/kioslave/home/kdedmodule/homedirnotifymodule.h b/kioslave/home/kdedmodule/homedirnotifymodule.h index 159670fb6..69d96dfc9 100644 --- a/kioslave/home/kdedmodule/homedirnotifymodule.h +++ b/kioslave/home/kdedmodule/homedirnotifymodule.h @@ -28,7 +28,7 @@ class HomeDirNotifyModule : public KDEDModule K_DCOP public: - HomeDirNotifyModule(const QCString &obj); + HomeDirNotifyModule(const TQCString &obj); private: HomeDirNotify notifier; }; diff --git a/kioslave/home/kio_home.cpp b/kioslave/home/kio_home.cpp index 36a3161d8..c8a77acc5 100644 --- a/kioslave/home/kio_home.cpp +++ b/kioslave/home/kio_home.cpp @@ -56,8 +56,8 @@ extern "C" { } -HomeProtocol::HomeProtocol(const QCString &protocol, - const QCString &pool, const QCString &app) +HomeProtocol::HomeProtocol(const TQCString &protocol, + const TQCString &pool, const TQCString &app) : ForwardingSlaveBase(protocol, pool, app) { } @@ -68,7 +68,7 @@ HomeProtocol::~HomeProtocol() bool HomeProtocol::rewriteURL(const KURL &url, KURL &newUrl) { - QString name, path; + TQString name, path; if ( !m_impl.parseURL(url, name, path) ) { @@ -97,7 +97,7 @@ void HomeProtocol::listDir(const KURL &url) return; } - QString name, path; + TQString name, path; bool ok = m_impl.parseURL(url, name, path); if ( !ok ) @@ -145,7 +145,7 @@ void HomeProtocol::stat(const KURL &url) { kdDebug() << "HomeProtocol::stat: " << url << endl; - QString path = url.path(); + TQString path = url.path(); if ( path.isEmpty() || path == "/" ) { // The root is "virtual" - it's not a single physical directory @@ -156,7 +156,7 @@ void HomeProtocol::stat(const KURL &url) return; } - QString name; + TQString name; bool ok = m_impl.parseURL(url, name, path); if ( !ok ) diff --git a/kioslave/home/kio_home.h b/kioslave/home/kio_home.h index 1d5e237ea..cf5f3a3cd 100644 --- a/kioslave/home/kio_home.h +++ b/kioslave/home/kio_home.h @@ -26,8 +26,8 @@ class HomeProtocol : public KIO::ForwardingSlaveBase { public: - HomeProtocol(const QCString &protocol, const QCString &pool, - const QCString &app); + HomeProtocol(const TQCString &protocol, const TQCString &pool, + const TQCString &app); virtual ~HomeProtocol(); virtual bool rewriteURL(const KURL &url, KURL &newUrl); diff --git a/kioslave/home/testhome.cpp b/kioslave/home/testhome.cpp index e9d64ec68..61e7d9fa6 100644 --- a/kioslave/home/testhome.cpp +++ b/kioslave/home/testhome.cpp @@ -28,12 +28,12 @@ #include -static bool check(const QString& txt, QString a, QString b) +static bool check(const TQString& txt, TQString a, TQString b) { if (a.isEmpty()) - a = QString::null; + a = TQString::null; if (b.isEmpty()) - b = QString::null; + b = TQString::null; if (a == b) { kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl; } diff --git a/kioslave/info/info.cc b/kioslave/info/info.cc index 6b829ec1c..ab35f282b 100644 --- a/kioslave/info/info.cc +++ b/kioslave/info/info.cc @@ -2,10 +2,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -18,7 +18,7 @@ using namespace KIO; -InfoProtocol::InfoProtocol( const QCString &pool, const QCString &app ) +InfoProtocol::InfoProtocol( const TQCString &pool, const TQCString &app ) : SlaveBase( "info", pool, app ) , m_page( "" ) , m_node( "" ) @@ -31,11 +31,11 @@ InfoProtocol::InfoProtocol( const QCString &pool, const QCString &app ) if( m_perl.isNull() || m_infoScript.isNull() || m_infoConf.isNull() ) { kdError( 7108 ) << "Critical error: Cannot locate files for HTML-conversion" << endl; - QString errorStr; + TQString errorStr; if ( m_perl.isNull() ) { errorStr = "perl."; } else { - QString missing =m_infoScript.isNull() ? "kio_info/kde-info2html" : "kio_info/kde-info2html.conf"; + TQString missing =m_infoScript.isNull() ? "kio_info/kde-info2html" : "kio_info/kde-info2html.conf"; errorStr = "kde-info2html" + i18n( "\nUnable to locate file %1 which is necessary to run this service. " "Please check your software installation" ).arg( missing ); } @@ -70,7 +70,7 @@ void InfoProtocol::get( const KURL& url ) if (!url.host().isEmpty()) { KURL newURl(url); newURl.setPath(url.host()+url.path()); - newURl.setHost(QString::null); + newURl.setHost(TQString::null); redirection(newURl); finished(); return; @@ -80,7 +80,7 @@ void InfoProtocol::get( const KURL& url ) { // Trailing / are not supported, so we need to remove them. KURL newUrl( url ); - QString newPath( url.path() ); + TQString newPath( url.path() ); newPath.truncate( newPath.length()-1 ); newUrl.setPath( newPath ); redirection( newUrl ); @@ -92,11 +92,11 @@ void InfoProtocol::get( const KURL& url ) // extract the path and node from url decodeURL( url ); - QString path = KGlobal::iconLoader()->iconPath("up", KIcon::Toolbar, true); + TQString path = KGlobal::iconLoader()->iconPath("up", KIcon::Toolbar, true); int revindex = path.findRev('/'); path = path.left(revindex); - QString cmd = KProcess::quote(m_perl); + TQString cmd = KProcess::quote(m_perl); cmd += " "; cmd += KProcess::quote(m_infoScript); cmd += " "; @@ -110,7 +110,7 @@ void InfoProtocol::get( const KURL& url ) kdDebug( 7108 ) << "cmd: " << cmd << endl; - FILE *file = popen( QFile::encodeName(cmd), "r" ); + FILE *file = popen( TQFile::encodeName(cmd), "r" ); if ( !file ) { kdDebug( 7108 ) << "InfoProtocol::get popen failed" << endl; error( ERR_CANNOT_LAUNCH_PROCESS, cmd ); @@ -118,7 +118,7 @@ void InfoProtocol::get( const KURL& url ) } char buffer[ 4096 ]; - QByteArray array; + TQByteArray array; bool empty = true; while ( !feof( file ) ) @@ -192,7 +192,7 @@ void InfoProtocol::decodeURL( const KURL &url ) kdDebug( 7108 ) << "InfoProtocol::decodeURL - done" << endl; } -void InfoProtocol::decodePath( QString path ) +void InfoProtocol::decodePath( TQString path ) { kdDebug( 7108 ) << "InfoProtocol::decodePath(-" < +#include #include @@ -11,7 +11,7 @@ class InfoProtocol : public KIO::SlaveBase { public: - InfoProtocol( const QCString &pool, const QCString &app ); + InfoProtocol( const TQCString &pool, const TQCString &app ); virtual ~InfoProtocol(); virtual void get( const KURL& url ); @@ -21,16 +21,16 @@ public: protected: void decodeURL( const KURL &url ); - void decodePath( QString path ); + void decodePath( TQString path ); private: - QString m_page; - QString m_node; + TQString m_page; + TQString m_node; - QString m_perl; - QString m_infoScript; - QString m_infoConf; + TQString m_perl; + TQString m_infoScript; + TQString m_infoConf; }; #endif // __info_h__ diff --git a/kioslave/ldap/kio_ldap.cpp b/kioslave/ldap/kio_ldap.cpp index 749ab6121..7abc95509 100644 --- a/kioslave/ldap/kio_ldap.cpp +++ b/kioslave/ldap/kio_ldap.cpp @@ -54,8 +54,8 @@ int kdemain( int argc, char **argv ) /** * Initialize the ldap slave */ -LDAPProtocol::LDAPProtocol( const QCString &protocol, const QCString &pool, - const QCString &app ) : SlaveBase( protocol, pool, app ) +LDAPProtocol::LDAPProtocol( const TQCString &protocol, const TQCString &pool, + const TQCString &app ) : SlaveBase( protocol, pool, app ) { mLDAP = 0; mTLS = 0; mVer = 3; mAuthSASL = false; mRealm = ""; mBindName = ""; @@ -79,11 +79,11 @@ void LDAPProtocol::LDAPErr( const KURL &url, int err ) if ( err == LDAP_SUCCESS ) return; kdDebug(7125) << "error code: " << err << " msg: " << ldap_err2string(err) << " Additonal error message: '" << errmsg << "'" << endl; - QString msg; - QString extraMsg; + TQString msg; + TQString extraMsg; if ( errmsg ) { if ( errmsg[0] ) - extraMsg = i18n("\nAdditional info: ") + QString::fromUtf8( errmsg ); + extraMsg = i18n("\nAdditional info: ") + TQString::fromUtf8( errmsg ); free( errmsg ); } msg = url.prettyURL(); @@ -164,24 +164,24 @@ void LDAPProtocol::LDAPErr( const KURL &url, int err ) void LDAPProtocol::controlsFromMetaData( LDAPControl ***serverctrls, LDAPControl ***clientctrls ) { - QString oid; bool critical; QByteArray value; + TQString oid; bool critical; TQByteArray value; int i = 0; - while ( hasMetaData( QString::fromLatin1("SERVER_CTRL%1").arg(i) ) ) { - QCString val = metaData( QString::fromLatin1("SERVER_CTRL%1").arg(i) ).utf8(); + while ( hasMetaData( TQString::fromLatin1("SERVER_CTRL%1").arg(i) ) ) { + TQCString val = metaData( TQString::fromLatin1("SERVER_CTRL%1").arg(i) ).utf8(); LDIF::splitControl( val, oid, critical, value ); kdDebug(7125) << "server ctrl #" << i << " value: " << val << " oid: " << oid << " critical: " << critical << " value: " << - QString::fromUtf8( value, value.size() ) << endl; + TQString::fromUtf8( value, value.size() ) << endl; addControlOp( serverctrls, oid, value, critical ); i++; } i = 0; - while ( hasMetaData( QString::fromLatin1("CLIENT_CTRL%1").arg(i) ) ) { - QCString val = metaData( QString::fromLatin1("CLIENT_CTRL%1").arg(i) ).utf8(); + while ( hasMetaData( TQString::fromLatin1("CLIENT_CTRL%1").arg(i) ) ) { + TQCString val = metaData( TQString::fromLatin1("CLIENT_CTRL%1").arg(i) ).utf8(); LDIF::splitControl( val, oid, critical, value ); kdDebug(7125) << "client ctrl #" << i << " value: " << val << " oid: " << oid << " critical: " << critical << " value: " << - QString::fromUtf8( value, value.size() ) << endl; + TQString::fromUtf8( value, value.size() ) << endl; addControlOp( clientctrls, oid, value, critical ); i++; } @@ -220,7 +220,7 @@ int LDAPProtocol::asyncSearch( LDAPUrl &usrc ) usrc.scope() << " filter=\"" << usrc.filter() << "\" attrs=" << usrc.attributes() << endl; retval = ldap_search_ext( mLDAP, usrc.dn().utf8(), scope, - usrc.filter().isEmpty() ? QCString() : usrc.filter().utf8(), attrs, 0, + usrc.filter().isEmpty() ? TQCString() : usrc.filter().utf8(), attrs, 0, serverctrls, clientctrls, 0, mSizeLimit, &msgid ); @@ -237,16 +237,16 @@ int LDAPProtocol::asyncSearch( LDAPUrl &usrc ) return retval; } -QCString LDAPProtocol::LDAPEntryAsLDIF( LDAPMessage *message ) +TQCString LDAPProtocol::LDAPEntryAsLDIF( LDAPMessage *message ) { - QCString result; + TQCString result; char *name; struct berval **bvals; BerElement *entry; - QByteArray tmp; + TQByteArray tmp; char *dn = ldap_get_dn( mLDAP, message ); - if ( dn == NULL ) return QCString( "" ); + if ( dn == NULL ) return TQCString( "" ); tmp.setRawData( dn, strlen( dn ) ); result += LDIF::assembleLine( "dn", tmp ) + '\n'; tmp.resetRawData( dn, strlen( dn ) ); @@ -264,7 +264,7 @@ QCString LDAPProtocol::LDAPEntryAsLDIF( LDAPMessage *message ) char* val = bvals[i]->bv_val; unsigned long len = bvals[i]->bv_len; tmp.setRawData( val, len ); - result += LDIF::assembleLine( QString::fromUtf8( name ), tmp, 76 ) + '\n'; + result += LDIF::assembleLine( TQString::fromUtf8( name ), tmp, 76 ) + '\n'; tmp.resetRawData( val, len ); } ldap_value_free_len(bvals); @@ -276,8 +276,8 @@ QCString LDAPProtocol::LDAPEntryAsLDIF( LDAPMessage *message ) return result; } -void LDAPProtocol::addControlOp( LDAPControl ***pctrls, const QString &oid, - const QByteArray &value, bool critical ) +void LDAPProtocol::addControlOp( LDAPControl ***pctrls, const TQString &oid, + const TQByteArray &value, bool critical ) { LDAPControl **ctrls; LDAPControl *ctrl = (LDAPControl *) malloc( sizeof( LDAPControl ) ); @@ -285,7 +285,7 @@ void LDAPProtocol::addControlOp( LDAPControl ***pctrls, const QString &oid, ctrls = *pctrls; kdDebug(7125) << "addControlOp: oid:'" << oid << "' val: '" << - QString::fromUtf8(value, value.size()) << "'" << endl; + TQString::fromUtf8(value, value.size()) << "'" << endl; int vallen = value.size(); ctrl->ldctl_value.bv_len = vallen; if ( vallen ) { @@ -313,11 +313,11 @@ void LDAPProtocol::addControlOp( LDAPControl ***pctrls, const QString &oid, *pctrls = ctrls; } -void LDAPProtocol::addModOp( LDAPMod ***pmods, int mod_type, const QString &attr, - const QByteArray &value ) +void LDAPProtocol::addModOp( LDAPMod ***pmods, int mod_type, const TQString &attr, + const TQByteArray &value ) { // kdDebug(7125) << "type: " << mod_type << " attr: " << attr << -// " value: " << QString::fromUtf8(value,value.size()) << +// " value: " << TQString::fromUtf8(value,value.size()) << // " size: " << value.size() << endl; LDAPMod **mods; @@ -380,7 +380,7 @@ void LDAPProtocol::addModOp( LDAPMod ***pmods, int mod_type, const QString &attr } } -void LDAPProtocol::LDAPEntry2UDSEntry( const QString &dn, UDSEntry &entry, +void LDAPProtocol::LDAPEntry2UDSEntry( const TQString &dn, UDSEntry &entry, const LDAPUrl &usrc, bool dir ) { UDSAtom atom; @@ -389,7 +389,7 @@ void LDAPProtocol::LDAPEntry2UDSEntry( const QString &dn, UDSEntry &entry, entry.clear(); atom.m_uds = UDS_NAME; atom.m_long = 0; - QString name = dn; + TQString name = dn; if ( (pos = name.find(",")) > 0 ) name = name.left( pos ); if ( (pos = name.find("=")) > 0 ) @@ -437,13 +437,13 @@ void LDAPProtocol::changeCheck( LDAPUrl &url ) if ( url.hasExtension( "x-ver" ) ) ver = url.extension( "x-ver", critical).toInt(); bool authSASL = url.hasExtension( "x-sasl" ); - QString mech; + TQString mech; if ( url.hasExtension( "x-mech" ) ) mech = url.extension( "x-mech", critical).upper(); - QString realm; + TQString realm; if ( url.hasExtension( "x-realm" ) ) mech = url.extension( "x-realm", critical).upper(); - QString bindname; + TQString bindname; if ( url.hasExtension( "bindname" ) ) bindname = url.extension( "bindname", critical).upper(); int timelimit = 0; @@ -480,8 +480,8 @@ void LDAPProtocol::changeCheck( LDAPUrl &url ) } } -void LDAPProtocol::setHost( const QString& host, int port, - const QString& user, const QString& password ) +void LDAPProtocol::setHost( const TQString& host, int port, + const TQString& user, const TQString& password ) { if( mHost != host || mPort != port || mUser != user || mPassword != password ) @@ -519,8 +519,8 @@ void LDAPProtocol::fillAuthInfo( AuthInfo &info ) info.url.setPort( mPort ); info.url.setUser( mUser ); info.caption = i18n("LDAP Login"); - info.comment = QString::fromLatin1( mProtocol ) + "://" + mHost + ":" + - QString::number( mPort ); + info.comment = TQString::fromLatin1( mProtocol ) + "://" + mHost + ":" + + TQString::number( mPort ); info.commentLabel = i18n("site:"); info.username = mAuthSASL ? mUser : mBindName; info.password = mPassword; @@ -561,7 +561,7 @@ int LDAPProtocol::saslInteract( void *in ) } interact = ( sasl_interact_t * ) in; - QString value; + TQString value; while( interact->id != SASL_CB_LIST_END ) { value = ""; @@ -668,7 +668,7 @@ void LDAPProtocol::openConnection() #endif bool auth = false; - QString mechanism = mMech.isEmpty() ? "DIGEST-MD5" : mMech; + TQString mechanism = mMech.isEmpty() ? "DIGEST-MD5" : mMech; mFirstAuth = true; mCancel = false; const bool cached = checkCachedAuthentication( info ); @@ -689,7 +689,7 @@ void LDAPProtocol::openConnection() mPassword = info.password; } else { kdDebug(7125) << "Dialog cancelled!" << endl; - error( ERR_USER_CANCELED, QString::null ); + error( ERR_USER_CANCELED, TQString::null ); closeConnection(); return; } @@ -711,7 +711,7 @@ void LDAPProtocol::openConnection() auth = true; if ( ret != LDAP_SUCCESS ) { if ( mCancel ) - error( ERR_USER_CANCELED, QString::null ); + error( ERR_USER_CANCELED, TQString::null ); else LDAPErr( Url ); closeConnection(); @@ -756,9 +756,9 @@ void LDAPProtocol::get( const KURL &_url ) // tell the mimetype mimeType("text/plain"); // collect the result - QCString result; + TQCString result; filesize_t processed_size = 0; - QByteArray array; + TQByteArray array; while( true ) { ret = ldap_result( mLDAP, id, 0, NULL, &msg ); @@ -806,7 +806,7 @@ void LDAPProtocol::stat( const KURL &_url ) { kdDebug(7125) << "stat(" << _url << ")" << endl; - QStringList att,saveatt; + TQStringList att,saveatt; LDAPUrl usrc(_url); LDAPMessage *msg; int ret, id; @@ -902,7 +902,7 @@ void LDAPProtocol::put( const KURL &_url, int, bool overwrite, bool ) LDAPMod **lmod = 0; LDAPControl **serverctrls = 0, **clientctrls = 0; - QByteArray buffer; + TQByteArray buffer; int result = 0; LDIF::ParseVal ret; LDIF ldif; @@ -956,7 +956,7 @@ void LDAPProtocol::put( const KURL &_url, int, bool overwrite, bool ) " deloldrdn: " << ldif.delOldRdn() << endl; controlsFromMetaData( &serverctrls, &clientctrls ); ldaperr = ldap_rename_s( mLDAP, ldif.dn().utf8(), ldif.newRdn().utf8(), - ldif.newSuperior().isEmpty() ? QCString() : ldif.newSuperior().utf8(), + ldif.newSuperior().isEmpty() ? TQCString() : ldif.newSuperior().utf8(), ldif.delOldRdn(), serverctrls, clientctrls ); FREELDAPMEM; @@ -1049,7 +1049,7 @@ void LDAPProtocol::listDir( const KURL &_url ) int ret, ret2, id, id2; unsigned long total=0; char *dn; - QStringList att,saveatt; + TQStringList att,saveatt; LDAPMessage *entry,*msg,*entry2,*msg2; LDAPUrl usrc(_url),usrc2; bool critical; @@ -1100,17 +1100,17 @@ void LDAPProtocol::listDir( const KURL &_url ) dn = ldap_get_dn( mLDAP, entry ); kdDebug(7125) << "dn: " << dn << endl; - LDAPEntry2UDSEntry( QString::fromUtf8(dn), uds, usrc ); + LDAPEntry2UDSEntry( TQString::fromUtf8(dn), uds, usrc ); listEntry( uds, false ); // processedSize( total ); kdDebug(7125) << " total: " << total << " " << usrc.prettyURL() << endl; // publish the sub-directories (if dirmode==sub) if ( isSub ) { - usrc2.setDn( QString::fromUtf8( dn ) ); + usrc2.setDn( TQString::fromUtf8( dn ) ); usrc2.setScope( LDAPUrl::One ); usrc2.setAttributes( att ); - usrc2.setFilter( QString::null ); + usrc2.setFilter( TQString::null ); kdDebug(7125) << "search2 " << dn << endl; if ( (id2 = asyncSearch( usrc2 )) != -1 ) { while ( true ) { @@ -1126,7 +1126,7 @@ void LDAPProtocol::listDir( const KURL &_url ) if ( entry2 ) { usrc2.setAttributes( saveatt ); usrc2.setFilter( usrc.filter() ); - LDAPEntry2UDSEntry( QString::fromUtf8( dn ), uds, usrc2, true ); + LDAPEntry2UDSEntry( TQString::fromUtf8( dn ), uds, usrc2, true ); listEntry( uds, false ); total++; } diff --git a/kioslave/ldap/kio_ldap.h b/kioslave/ldap/kio_ldap.h index ff722d345..d262b61ea 100644 --- a/kioslave/ldap/kio_ldap.h +++ b/kioslave/ldap/kio_ldap.h @@ -1,8 +1,8 @@ #ifndef __LDAP_H__ #define __LDAP_H__ -#include -#include +#include +#include #include #include @@ -15,11 +15,11 @@ class LDAPProtocol : public KIO::SlaveBase { public: - LDAPProtocol( const QCString &protocol, const QCString &pool, const QCString &app ); + LDAPProtocol( const TQCString &protocol, const TQCString &pool, const TQCString &app ); virtual ~LDAPProtocol(); - virtual void setHost( const QString& host, int port, - const QString& user, const QString& pass ); + virtual void setHost( const TQString& host, int port, + const TQString& user, const TQString& pass ); virtual void openConnection(); virtual void closeConnection(); @@ -34,28 +34,28 @@ class LDAPProtocol : public KIO::SlaveBase private: - QString mHost; + TQString mHost; int mPort; - QString mUser; - QString mPassword; + TQString mUser; + TQString mPassword; LDAP *mLDAP; int mVer, mSizeLimit, mTimeLimit; bool mTLS; bool mAuthSASL; - QString mMech,mRealm,mBindName; + TQString mMech,mRealm,mBindName; bool mCancel, mFirstAuth; void controlsFromMetaData( LDAPControl ***serverctrls, LDAPControl ***clientctrls ); - void addControlOp( LDAPControl ***pctrls, const QString &oid, - const QByteArray &value, bool critical ); + void addControlOp( LDAPControl ***pctrls, const TQString &oid, + const TQByteArray &value, bool critical ); void addModOp( LDAPMod ***pmods, int mod_type, - const QString &attr, const QByteArray &value ); - void LDAPEntry2UDSEntry( const QString &dn, KIO::UDSEntry &entry, + const TQString &attr, const TQByteArray &value ); + void LDAPEntry2UDSEntry( const TQString &dn, KIO::UDSEntry &entry, const KABC::LDAPUrl &usrc, bool dir=false ); int asyncSearch( KABC::LDAPUrl &usrc ); - QCString LDAPEntryAsLDIF( LDAPMessage *msg ); + TQCString LDAPEntryAsLDIF( LDAPMessage *msg ); void LDAPErr( const KURL &url, int err = LDAP_SUCCESS ); void changeCheck( KABC::LDAPUrl &url ); diff --git a/kioslave/mac/kio_mac.cpp b/kioslave/mac/kio_mac.cpp index 56989487a..e64d22d65 100644 --- a/kioslave/mac/kio_mac.cpp +++ b/kioslave/mac/kio_mac.cpp @@ -22,8 +22,8 @@ #include #include #include -#include -#include +#include +#include #include #include @@ -43,11 +43,11 @@ extern "C" { } } -MacProtocol::MacProtocol(const QCString &pool, const QCString &app) - : QObject(), SlaveBase("mac", pool, app) { -/* logFile = new QFile("/home/jr/logfile"); +MacProtocol::MacProtocol(const TQCString &pool, const TQCString &app) + : TQObject(), SlaveBase("mac", pool, app) { +/* logFile = new TQFile("/home/jr/logfile"); logFile->open(IO_ReadWrite | IO_Append); - logStream = new QTextStream(logFile); + logStream = new TQTextStream(logFile); *logStream << "Start Macprotocol()" << endl; */ } @@ -66,10 +66,10 @@ MacProtocol::~MacProtocol() { //get() called when a file is to be read void MacProtocol::get(const KURL& url) { - QString path = prepareHP(url); //mount and change to correct directory - return the filename - QString query = url.query(); - QString mode("-"); - QString mime; + TQString path = prepareHP(url); //mount and change to correct directory - return the filename + TQString query = url.query(); + TQString mode("-"); + TQString mime; processedBytes = 0; //Find out the size and if it's a text file @@ -105,8 +105,8 @@ void MacProtocol::get(const KURL& url) { *myKProcess << "hpcopy" << mode << path << "-"; //data is now sent directly from the slot - connect(myKProcess, SIGNAL(receivedStdout(KProcess *, char *, int)), - this, SLOT(slotSetDataStdOutput(KProcess *, char *, int))); + connect(myKProcess, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + this, TQT_SLOT(slotSetDataStdOutput(KProcess *, char *, int))); myKProcess->start(KProcess::Block, KProcess::All); @@ -119,13 +119,13 @@ void MacProtocol::get(const KURL& url) { //clean up delete myKProcess; myKProcess = 0; //finish - data(QByteArray()); + data(TQByteArray()); finished(); } //listDir() called when the user is looking at a directory void MacProtocol::listDir(const KURL& url) { - QString filename = prepareHP(url); + TQString filename = prepareHP(url); if (filename.isNull()) { error(ERR_CANNOT_LAUNCH_PROCESS, i18n("No filename was found")); @@ -133,9 +133,9 @@ void MacProtocol::listDir(const KURL& url) { myKProcess = new KProcess(); *myKProcess << "hpls" << "-la" << filename; - standardOutputStream = QString::null; - connect(myKProcess, SIGNAL(receivedStdout(KProcess *, char *, int)), - this, SLOT(slotGetStdOutput(KProcess *, char *, int))); + standardOutputStream = TQString::null; + connect(myKProcess, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + this, TQT_SLOT(slotGetStdOutput(KProcess *, char *, int))); myKProcess->start(KProcess::Block, KProcess::All); @@ -146,13 +146,13 @@ void MacProtocol::listDir(const KURL& url) { //clean up delete myKProcess; myKProcess = 0; - disconnect(myKProcess, SIGNAL(receivedStdout(KProcess *, char *, int)), - this, SLOT(slotGetStdOutput(KProcess *, char *, int))); + disconnect(myKProcess, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + this, TQT_SLOT(slotGetStdOutput(KProcess *, char *, int))); UDSEntry entry; if (!standardOutputStream.isEmpty()) { - QTextStream in(&standardOutputStream, IO_ReadOnly); - QString line = in.readLine(); //throw away top file which shows current directory + TQTextStream in(&standardOutputStream, IO_ReadOnly); + TQString line = in.readLine(); //throw away top file which shows current directory line = in.readLine(); while (line != NULL) { @@ -180,8 +180,8 @@ void MacProtocol::stat(const KURL& url) { //doStat(), does all the work that stat() needs //it's been separated out so it can be called from get() which //also need information -QValueList MacProtocol::doStat(const KURL& url) { - QString filename = prepareHP(url); +TQValueList MacProtocol::doStat(const KURL& url) { + TQString filename = prepareHP(url); if (filename.isNull()) { error(ERR_SLAVE_DEFINED, i18n("No filename was found in the URL")); @@ -190,9 +190,9 @@ QValueList MacProtocol::doStat(const KURL& url) { *myKProcess << "hpls" << "-ld" << filename; - standardOutputStream = QString::null; - connect(myKProcess, SIGNAL(receivedStdout(KProcess *, char *, int)), - this, SLOT(slotGetStdOutput(KProcess *, char *, int))); + standardOutputStream = TQString::null; + connect(myKProcess, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + this, TQT_SLOT(slotGetStdOutput(KProcess *, char *, int))); myKProcess->start(KProcess::Block, KProcess::All); @@ -203,8 +203,8 @@ QValueList MacProtocol::doStat(const KURL& url) { //clean up delete myKProcess; myKProcess = 0; - disconnect(myKProcess, SIGNAL(receivedStdout(KProcess *, char *, int)), - this, SLOT(slotGetStdOutput(KProcess *, char *, int))); + disconnect(myKProcess, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + this, TQT_SLOT(slotGetStdOutput(KProcess *, char *, int))); if (standardOutputStream.isEmpty()) { filename.replace("\\ ", " "); //get rid of escapes @@ -215,7 +215,7 @@ QValueList MacProtocol::doStat(const KURL& url) { error(ERR_DOES_NOT_EXIST, filename); } else { //remove trailing \n - QString line = standardOutputStream.left(standardOutputStream.length()-1); + TQString line = standardOutputStream.left(standardOutputStream.length()-1); UDSEntry entry = makeUDS(line); return entry; } @@ -225,23 +225,23 @@ QValueList MacProtocol::doStat(const KURL& url) { return entry; }//if filename == null - return QValueList(); + return TQValueList(); } //prepareHP() called from get() listDir() and stat() //(re)mounts the partition and changes to the appropriate directory -QString MacProtocol::prepareHP(const KURL& url) { - QString path = url.path(-1); +TQString MacProtocol::prepareHP(const KURL& url) { + TQString path = url.path(-1); if (path.left(1) == "/") { path = path.mid(1); // strip leading slash } //find out if a device has been specified in the query e.g. ?dev=/dev/fd0 //or in the config file (query device entries are saved to config file) - QString device; + TQString device; KConfig* config = new KConfig("macrc"); - QString query = url.query(); + TQString query = url.query(); int modepos = query.find("dev="); if (modepos == -1) { //no device specified, read from config or go with #define PARTITION @@ -256,9 +256,9 @@ QString MacProtocol::prepareHP(const KURL& url) { //first we run just hpmount and check the output to see if it's version 1.0.2 or 1.0.4 myKProcess = new KProcess(); *myKProcess << "hpmount"; - standardOutputStream = QString::null; - connect(myKProcess, SIGNAL(receivedStderr(KProcess *, char *, int)), - this, SLOT(slotGetStdOutput(KProcess *, char *, int))); + standardOutputStream = TQString::null; + connect(myKProcess, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), + this, TQT_SLOT(slotGetStdOutput(KProcess *, char *, int))); myKProcess->start(KProcess::Block, KProcess::All); @@ -269,8 +269,8 @@ QString MacProtocol::prepareHP(const KURL& url) { } delete myKProcess; myKProcess = 0; - disconnect(myKProcess, SIGNAL(receivedStderr(KProcess *, char *, int)), - this, SLOT(slotGetStdOutput(KProcess *, char *, int))); + disconnect(myKProcess, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), + this, TQT_SLOT(slotGetStdOutput(KProcess *, char *, int))); //now mount the drive myKProcess = new KProcess(); @@ -304,7 +304,7 @@ QString MacProtocol::prepareHP(const KURL& url) { path.replace(")", "\\)"); //then change to the right directory - int s; QString dir; + int s; TQString dir; s = path.find('/'); while (s != -1) { dir = path.left(s); @@ -333,13 +333,13 @@ QString MacProtocol::prepareHP(const KURL& url) { //makeUDS() takes a line of output from hpls -l and converts it into // one of these UDSEntrys to return //called from listDir() and stat() -QValueList MacProtocol::makeUDS(const QString& _line) { - QString line(_line); +TQValueList MacProtocol::makeUDS(const TQString& _line) { + TQString line(_line); UDSEntry entry; //is it a file or a directory - QRegExp dirRE("^d. +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+) +(.*)"); - QRegExp fileRE("^([f|F]). +(....)/(....) +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+) +(.*)"); + TQRegExp dirRE("^d. +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+) +(.*)"); + TQRegExp fileRE("^([f|F]). +(....)/(....) +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+) +(.*)"); if (dirRE.exactMatch(line)) { UDSAtom atom; atom.m_uds = KIO::UDS_NAME; @@ -365,7 +365,7 @@ QValueList MacProtocol::makeUDS(const QString& _line) { entry.append(atom); atom.m_uds = KIO::UDS_SIZE; - QString theSize(fileRE.cap(4)); //TODO: this is data size, what about resource size? + TQString theSize(fileRE.cap(4)); //TODO: this is data size, what about resource size? atom.m_long = theSize.toLong(); entry.append(atom); @@ -374,7 +374,7 @@ QValueList MacProtocol::makeUDS(const QString& _line) { entry.append(atom); atom.m_uds = KIO::UDS_ACCESS; - if (QString(fileRE.cap(1)) == QString("F")) { //if locked then read only + if (TQString(fileRE.cap(1)) == TQString("F")) { //if locked then read only atom.m_long = 0444; } else { atom.m_long = 0644; @@ -382,13 +382,13 @@ QValueList MacProtocol::makeUDS(const QString& _line) { entry.append(atom); atom.m_uds = KIO::UDS_MIME_TYPE; - QString mimetype = getMimetype(fileRE.cap(2),fileRE.cap(3)); + TQString mimetype = getMimetype(fileRE.cap(2),fileRE.cap(3)); atom.m_str = mimetype.local8Bit(); entry.append(atom); // Is it a file or a link/alias, just make aliases link to themselves - if (QString(fileRE.cap(2)) == QString("adrp") || - QString(fileRE.cap(2)) == QString("fdrp")) { + if (TQString(fileRE.cap(2)) == TQString("adrp") || + TQString(fileRE.cap(2)) == TQString("fdrp")) { atom.m_uds = KIO::UDS_FILE_TYPE; atom.m_long = S_IFREG; entry.append(atom); @@ -413,7 +413,7 @@ QValueList MacProtocol::makeUDS(const QString& _line) { //slotGetStdOutput() grabs output from the hp commands // and adds it to the buffer void MacProtocol::slotGetStdOutput(KProcess*, char *s, int len) { - standardOutputStream += QString::fromLocal8Bit(s, len); + standardOutputStream += TQString::fromLocal8Bit(s, len); } //slotSetDataStdOutput() is used during hpcopy to give @@ -421,7 +421,7 @@ void MacProtocol::slotGetStdOutput(KProcess*, char *s, int len) { void MacProtocol::slotSetDataStdOutput(KProcess*, char *s, int len) { processedBytes += len; processedSize(processedBytes); - QByteArray array; + TQByteArray array; array.setRawData(s, len); data(array); array.resetRawData(s, len); @@ -429,7 +429,7 @@ void MacProtocol::slotSetDataStdOutput(KProcess*, char *s, int len) { //makeTime() takes in the date output from hpls -l //and returns as good a timestamp as we're going to get -int MacProtocol::makeTime(QString mday, QString mon, QString third) { +int MacProtocol::makeTime(TQString mday, TQString mon, TQString third) { int year; int month; int day; int hour; int minute; @@ -453,17 +453,17 @@ int MacProtocol::makeTime(QString mday, QString mon, QString third) { //if the file is recent (last 12 months) hpls gives us the time, // otherwise it only prints the year - QRegExp hourMin("(..):(..)"); + TQRegExp hourMin("(..):(..)"); if (hourMin.exactMatch(third)) { - QDate currentDate(QDate::currentDate()); + TQDate currentDate(TQDate::currentDate()); if (month > currentDate.month()) { year = currentDate.year() - 1; } else { year = currentDate.year(); } - QString h(hourMin.cap(1)); - QString m(hourMin.cap(2)); + TQString h(hourMin.cap(1)); + TQString m(hourMin.cap(2)); hour = h.toInt(); minute = m.toInt(); } else { @@ -475,87 +475,87 @@ int MacProtocol::makeTime(QString mday, QString mon, QString third) { day = mday.toInt(); //check it's valid - if ( (!QDate::isValid(year, month, day)) || (!QTime::isValid(hour, minute, 0) ) ) { + if ( (!TQDate::isValid(year, month, day)) || (!TQTime::isValid(hour, minute, 0) ) ) { error(ERR_INTERNAL, i18n("Could not parse a valid date from hpls")); } //put it together and work it out - QDate fileDate(year, month, day); - QTime fileTime(hour, minute); - QDateTime fileDateTime(fileDate, fileTime); + TQDate fileDate(year, month, day); + TQTime fileTime(hour, minute); + TQDateTime fileDateTime(fileDate, fileTime); return fileDateTime.toTime_t(); } -QString MacProtocol::getMimetype(QString type, QString app) { - if (type == QString("TEXT") && app == QString("ttxt")) { - return QString("text/plain"); - } else if (type == QString("TEXT") && app == QString("udog")) { - return QString("text/html"); - } else if (type == QString("svgs")) { - return QString("text/xml"); - } else if (type == QString("ZIP ")) { - return QString("application/zip"); - } else if (type == QString("pZip")) { - return QString("application/zip"); - } else if (type == QString("APPL")) { - return QString("application/x-executable"); - } else if (type == QString("MooV")) { - return QString("video/quicktime"); - } else if (type == QString("TEXT") && app == QString("MSWD")) { - return QString("application/vnd.ms-word"); - } else if (type == QString("PDF ")) { - return QString("application/pdf"); - } else if (app == QString("CARO")) { - return QString("application/pdf"); - } else if (type == QString("SIT5")) { - return QString("application/x-stuffit"); - } else if (type == QString("SITD")) { - return QString("application/x-stuffit"); - } else if (type == QString("SIT!")) { - return QString("application/x-stuffit"); - } else if (app == QString("SIT!")) { - return QString("application/x-stuffit"); - } else if (type == QString("RTFf")) { - return QString("text/rtf"); - } else if (type == QString("GIFf")) { - return QString("image/gif"); - } else if (type == QString("JPEG")) { - return QString("image/jpeg"); - } else if (type == QString("PNGf")) { - return QString("image/png"); - } else if (type == QString("XBMm")) { - return QString("image/x-xbm"); - } else if (type == QString("EPSF")) { - return QString("image/x-epsf"); - } else if (type == QString("TIFF")) { - return QString("image/tiff"); - } else if (type == QString("PICT")) { - return QString("image/pict"); - } else if (type == QString("TPIC")) { - return QString("image/x-targa"); - } else if (type == QString("ULAW")) { - return QString("audio/basic"); - } else if (type == QString("AIFF")) { - return QString("audio/x-aiff"); - } else if (type == QString("WAVE")) { - return QString("audio/x-wav"); - } else if (type == QString("FFIL") && app == QString("DMOV")) { - return QString("application/x-font"); - } else if (type == QString("XLS3")) { - return QString("application/vnd.ms-excel"); - } else if (type == QString("XLS4")) { - return QString("application/vnd.ms-excel"); - } else if (type == QString("XLS5")) { - return QString("application/vnd.ms-excel"); - } else if (app == QString("MSWD")) { - return QString("application/vnd.ms-word"); - } else if (type == QString("TEXT")) { - return QString("text/plain"); - } else if (app == QString("ttxt")) { - return QString("text/plain"); +TQString MacProtocol::getMimetype(TQString type, TQString app) { + if (type == TQString("TEXT") && app == TQString("ttxt")) { + return TQString("text/plain"); + } else if (type == TQString("TEXT") && app == TQString("udog")) { + return TQString("text/html"); + } else if (type == TQString("svgs")) { + return TQString("text/xml"); + } else if (type == TQString("ZIP ")) { + return TQString("application/zip"); + } else if (type == TQString("pZip")) { + return TQString("application/zip"); + } else if (type == TQString("APPL")) { + return TQString("application/x-executable"); + } else if (type == TQString("MooV")) { + return TQString("video/quicktime"); + } else if (type == TQString("TEXT") && app == TQString("MSWD")) { + return TQString("application/vnd.ms-word"); + } else if (type == TQString("PDF ")) { + return TQString("application/pdf"); + } else if (app == TQString("CARO")) { + return TQString("application/pdf"); + } else if (type == TQString("SIT5")) { + return TQString("application/x-stuffit"); + } else if (type == TQString("SITD")) { + return TQString("application/x-stuffit"); + } else if (type == TQString("SIT!")) { + return TQString("application/x-stuffit"); + } else if (app == TQString("SIT!")) { + return TQString("application/x-stuffit"); + } else if (type == TQString("RTFf")) { + return TQString("text/rtf"); + } else if (type == TQString("GIFf")) { + return TQString("image/gif"); + } else if (type == TQString("JPEG")) { + return TQString("image/jpeg"); + } else if (type == TQString("PNGf")) { + return TQString("image/png"); + } else if (type == TQString("XBMm")) { + return TQString("image/x-xbm"); + } else if (type == TQString("EPSF")) { + return TQString("image/x-epsf"); + } else if (type == TQString("TIFF")) { + return TQString("image/tiff"); + } else if (type == TQString("PICT")) { + return TQString("image/pict"); + } else if (type == TQString("TPIC")) { + return TQString("image/x-targa"); + } else if (type == TQString("ULAW")) { + return TQString("audio/basic"); + } else if (type == TQString("AIFF")) { + return TQString("audio/x-aiff"); + } else if (type == TQString("WAVE")) { + return TQString("audio/x-wav"); + } else if (type == TQString("FFIL") && app == TQString("DMOV")) { + return TQString("application/x-font"); + } else if (type == TQString("XLS3")) { + return TQString("application/vnd.ms-excel"); + } else if (type == TQString("XLS4")) { + return TQString("application/vnd.ms-excel"); + } else if (type == TQString("XLS5")) { + return TQString("application/vnd.ms-excel"); + } else if (app == TQString("MSWD")) { + return TQString("application/vnd.ms-word"); + } else if (type == TQString("TEXT")) { + return TQString("text/plain"); + } else if (app == TQString("ttxt")) { + return TQString("text/plain"); } - return QString("application/octet-stream"); + return TQString("application/octet-stream"); } diff --git a/kioslave/mac/kio_mac.h b/kioslave/mac/kio_mac.h index c87217e08..7f74dfca7 100644 --- a/kioslave/mac/kio_mac.h +++ b/kioslave/mac/kio_mac.h @@ -21,16 +21,16 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include -class MacProtocol : public QObject, public KIO::SlaveBase +class MacProtocol : public TQObject, public KIO::SlaveBase { Q_OBJECT public: - MacProtocol(const QCString &pool, const QCString &app); + MacProtocol(const TQCString &pool, const TQCString &app); ~MacProtocol(); virtual void get(const KURL& url ); virtual void listDir(const KURL& url); @@ -39,17 +39,17 @@ protected slots: void slotGetStdOutput(KProcess*, char*, int); void slotSetDataStdOutput(KProcess*, char *s, int len); protected: - QString prepareHP(const KURL& _url); - QValueList makeUDS(const QString& _line); - int makeTime(QString mday, QString mon, QString third); - QString getMimetype(QString type, QString app); - QValueList doStat(const KURL& url); + TQString prepareHP(const KURL& _url); + TQValueList makeUDS(const TQString& _line); + int makeTime(TQString mday, TQString mon, TQString third); + TQString getMimetype(TQString type, TQString app); + TQValueList doStat(const KURL& url); KIO::filesize_t processedBytes; - QString standardOutputStream; + TQString standardOutputStream; KProcess* myKProcess; //for debugging - //QFile* logFile; - //QTextStream* logStream; + //TQFile* logFile; + //TQTextStream* logStream; }; diff --git a/kioslave/man/kio_man.cpp b/kioslave/man/kio_man.cpp index 068287b7e..013a15248 100644 --- a/kioslave/man/kio_man.cpp +++ b/kioslave/man/kio_man.cpp @@ -22,14 +22,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -56,7 +56,7 @@ MANProtocol *MANProtocol::_self = 0; * Drop trailing ".section[.gz]" from name */ static -void stripExtension( QString *name ) +void stripExtension( TQString *name ) { int pos = name->length(); @@ -77,11 +77,11 @@ void stripExtension( QString *name ) } static -bool parseUrl(const QString& _url, QString &title, QString §ion) +bool parseUrl(const TQString& _url, TQString &title, TQString §ion) { - section = QString::null; + section = TQString::null; - QString url = _url; + TQString url = _url; if (url.at(0) == '/') { if (KStandardDirs::exists(url)) { title = url; @@ -111,13 +111,13 @@ bool parseUrl(const QString& _url, QString &title, QString §ion) } -MANProtocol::MANProtocol(const QCString &pool_socket, const QCString &app_socket) - : QObject(), SlaveBase("man", pool_socket, app_socket) +MANProtocol::MANProtocol(const TQCString &pool_socket, const TQCString &app_socket) + : TQObject(), SlaveBase("man", pool_socket, app_socket) { assert(!_self); _self = this; - const QString common_dir = KGlobal::dirs()->findResourceDir( "html", "en/common/kde-common.css" ); - const QString strPath=QString( "file:%1/en/common" ).arg( common_dir ); + const TQString common_dir = KGlobal::dirs()->findResourceDir( "html", "en/common/kde-common.css" ); + const TQString strPath=TQString( "file:%1/en/common" ).arg( common_dir ); m_htmlPath=strPath.local8Bit(); // ### TODO encode for HTML m_cssPath=strPath.local8Bit(); // ### TODO encode for CSS section_names << "1" << "2" << "3" << "3n" << "3p" << "4" << "5" << "6" << "7" @@ -132,18 +132,18 @@ MANProtocol::~MANProtocol() _self = 0; } -void MANProtocol::parseWhatIs( QMap &i, QTextStream &t, const QString &mark ) +void MANProtocol::parseWhatIs( TQMap &i, TQTextStream &t, const TQString &mark ) { - QRegExp re( mark ); - QString l; + TQRegExp re( mark ); + TQString l; while ( !t.atEnd() ) { l = t.readLine(); int pos = re.search( l ); if (pos != -1) { - QString names = l.left(pos); - QString descr = l.mid(pos + re.matchedLength()); + TQString names = l.left(pos); + TQString descr = l.mid(pos + re.matchedLength()); while ((pos = names.find(",")) != -1) { i[names.left(pos++)] = descr; @@ -156,20 +156,20 @@ void MANProtocol::parseWhatIs( QMap &i, QTextStream &t, const } } -bool MANProtocol::addWhatIs(QMap &i, const QString &name, const QString &mark) +bool MANProtocol::addWhatIs(TQMap &i, const TQString &name, const TQString &mark) { - QFile f(name); + TQFile f(name); if (!f.open(IO_ReadOnly)) return false; - QTextStream t(&f); + TQTextStream t(&f); parseWhatIs( i, t, mark ); return true; } -QMap MANProtocol::buildIndexMap(const QString §ion) +TQMap MANProtocol::buildIndexMap(const TQString §ion) { - QMap i; - QStringList man_dirs = manDirectories(); + TQMap i; + TQStringList man_dirs = manDirectories(); // Supplementary places for whatis databases man_dirs += m_mandbpath; if (man_dirs.find("/var/cache/man")==man_dirs.end()) @@ -177,16 +177,16 @@ QMap MANProtocol::buildIndexMap(const QString §ion) if (man_dirs.find("/var/catman")==man_dirs.end()) man_dirs << "/var/catman"; - QStringList names; + TQStringList names; names << "whatis.db" << "whatis"; - QString mark = "\\s+\\(" + section + "[a-z]*\\)\\s+-\\s+"; + TQString mark = "\\s+\\(" + section + "[a-z]*\\)\\s+-\\s+"; - for ( QStringList::ConstIterator it_dir = man_dirs.begin(); + for ( TQStringList::ConstIterator it_dir = man_dirs.begin(); it_dir != man_dirs.end(); ++it_dir ) { - if ( QFile::exists( *it_dir ) ) { - QStringList::ConstIterator it_name; + if ( TQFile::exists( *it_dir ) ) { + TQStringList::ConstIterator it_name; for ( it_name = names.begin(); it_name != names.end(); it_name++ ) @@ -197,11 +197,11 @@ QMap MANProtocol::buildIndexMap(const QString §ion) if ( it_name == names.end() ) { KProcess proc; proc << "whatis" << "-M" << (*it_dir) << "-w" << "*"; - myStdStream = QString::null; - connect( &proc, SIGNAL( receivedStdout(KProcess *, char *, int ) ), - SLOT( slotGetStdOutput( KProcess *, char *, int ) ) ); + myStdStream = TQString::null; + connect( &proc, TQT_SIGNAL( receivedStdout(KProcess *, char *, int ) ), + TQT_SLOT( slotGetStdOutput( KProcess *, char *, int ) ) ); proc.start( KProcess::Block, KProcess::Stdout ); - QTextStream t( &myStdStream, IO_ReadOnly ); + TQTextStream t( &myStdStream, IO_ReadOnly ); parseWhatIs( i, t, mark ); } } @@ -209,54 +209,54 @@ QMap MANProtocol::buildIndexMap(const QString §ion) return i; } -QStringList MANProtocol::manDirectories() +TQStringList MANProtocol::manDirectories() { checkManPaths(); // // Build a list of man directories including translations // - QStringList man_dirs; + TQStringList man_dirs; - for ( QStringList::ConstIterator it_dir = m_manpath.begin(); + for ( TQStringList::ConstIterator it_dir = m_manpath.begin(); it_dir != m_manpath.end(); it_dir++ ) { // Translated pages in "/" if the directory // exists - QStringList languages = KGlobal::locale()->languageList(); + TQStringList languages = KGlobal::locale()->languageList(); - for (QStringList::ConstIterator it_lang = languages.begin(); + for (TQStringList::ConstIterator it_lang = languages.begin(); it_lang != languages.end(); it_lang++ ) { - if ( !(*it_lang).isEmpty() && (*it_lang) != QString("C") ) { - QString dir = (*it_dir) + '/' + (*it_lang); + if ( !(*it_lang).isEmpty() && (*it_lang) != TQString("C") ) { + TQString dir = (*it_dir) + '/' + (*it_lang); struct stat sbuf; - if ( ::stat( QFile::encodeName( dir ), &sbuf ) == 0 + if ( ::stat( TQFile::encodeName( dir ), &sbuf ) == 0 && S_ISDIR( sbuf.st_mode ) ) { - const QString p = QDir(dir).canonicalPath(); + const TQString p = TQDir(dir).canonicalPath(); if (!man_dirs.contains(p)) man_dirs += p; } } } // Untranslated pages in "" - const QString p = QDir(*it_dir).canonicalPath(); + const TQString p = TQDir(*it_dir).canonicalPath(); if (!man_dirs.contains(p)) man_dirs += p; } return man_dirs; } -QStringList MANProtocol::findPages(const QString &_section, - const QString &title, +TQStringList MANProtocol::findPages(const TQString &_section, + const TQString &title, bool full_path) { - QString section = _section; + TQString section = _section; - QStringList list; + TQStringList list; // kdDebug() << "findPages '" << section << "' '" << title << "'\n"; if (title.at(0) == '/') { @@ -264,12 +264,12 @@ QStringList MANProtocol::findPages(const QString &_section, return list; } - const QString star( "*" ); + const TQString star( "*" ); // // Find man sections in this directory // - QStringList sect_list; + TQStringList sect_list; if ( section.isEmpty() ) section = star; @@ -287,41 +287,41 @@ QStringList MANProtocol::findPages(const QString &_section, sect_list += section; } - QStringList man_dirs = manDirectories(); + TQStringList man_dirs = manDirectories(); // // Find man pages in the sections listed above // - for ( QStringList::ConstIterator it_sect = sect_list.begin(); + for ( TQStringList::ConstIterator it_sect = sect_list.begin(); it_sect != sect_list.end(); it_sect++ ) { - QString it_real = (*it_sect).lower(); + TQString it_real = (*it_sect).lower(); // // Find pages // - for ( QStringList::ConstIterator it_dir = man_dirs.begin(); + for ( TQStringList::ConstIterator it_dir = man_dirs.begin(); it_dir != man_dirs.end(); it_dir++ ) { - QString man_dir = (*it_dir); + TQString man_dir = (*it_dir); // // Sections = all sub directories "man*" and "sman*" // - DIR *dp = ::opendir( QFile::encodeName( man_dir ) ); + DIR *dp = ::opendir( TQFile::encodeName( man_dir ) ); if ( !dp ) continue; struct dirent *ep; - const QString man = QString("man"); - const QString sman = QString("sman"); + const TQString man = TQString("man"); + const TQString sman = TQString("sman"); while ( (ep = ::readdir( dp )) != 0L ) { - const QString file = QFile::decodeName( ep->d_name ); - QString sect = QString::null; + const TQString file = TQFile::decodeName( ep->d_name ); + TQString sect = TQString::null; if ( file.startsWith( man ) ) sect = file.mid(3); @@ -340,8 +340,8 @@ QStringList MANProtocol::findPages(const QString &_section, ::closedir( dp ); if ( *it_sect != star ) { // in that case we only look around for sections - const QString dir = man_dir + QString("/man") + (it_real) + '/'; - const QString sdir = man_dir + QString("/sman") + (it_real) + '/'; + const TQString dir = man_dir + TQString("/man") + (it_real) + '/'; + const TQString sdir = man_dir + TQString("/sman") + (it_real) + '/'; findManPagesInSection(dir, title, full_path, list); findManPagesInSection(sdir, title, full_path, list); @@ -354,12 +354,12 @@ QStringList MANProtocol::findPages(const QString &_section, return list; } -void MANProtocol::findManPagesInSection(const QString &dir, const QString &title, bool full_path, QStringList &list) +void MANProtocol::findManPagesInSection(const TQString &dir, const TQString &title, bool full_path, TQStringList &list) { kdDebug() << "findManPagesInSection " << dir << " " << title << endl; bool title_given = !title.isEmpty(); - DIR *dp = ::opendir( QFile::encodeName( dir ) ); + DIR *dp = ::opendir( TQFile::encodeName( dir ) ); if ( !dp ) return; @@ -369,7 +369,7 @@ void MANProtocol::findManPagesInSection(const QString &dir, const QString &title while ( (ep = ::readdir( dp )) != 0L ) { if ( ep->d_name[0] != '.' ) { - QString name = QFile::decodeName( ep->d_name ); + TQString name = TQFile::decodeName( ep->d_name ); // check title if we're looking for a specific page if ( title_given ) { @@ -378,7 +378,7 @@ void MANProtocol::findManPagesInSection(const QString &dir, const QString &title } else { // beginning matches, do a more thorough check... - QString tmp_name = name; + TQString tmp_name = name; stripExtension( &tmp_name ); if ( tmp_name != title ) continue; @@ -404,7 +404,7 @@ void MANProtocol::output(const char *insert) { m_outputBuffer.close(); data(m_outputBuffer.buffer()); - m_outputBuffer.setBuffer(QByteArray()); + m_outputBuffer.setBuffer(TQByteArray()); m_outputBuffer.open(IO_WriteOnly); } } @@ -421,9 +421,9 @@ void output_real(const char *insert) MANProtocol::self()->output(insert); } -static QString text2html(const QString& txt) +static TQString text2html(const TQString& txt) { - QString reply = txt; + TQString reply = txt; reply = reply.replace('&', "&"); reply = reply.replace('<', "<"); @@ -437,7 +437,7 @@ void MANProtocol::get(const KURL& url ) { kdDebug(7107) << "GET " << url.url() << endl; - QString title, section; + TQString title, section; if (!parseUrl(url.path(), title, section)) { @@ -458,7 +458,7 @@ void MANProtocol::get(const KURL& url ) // tell the mimetype mimeType("text/html"); - const QStringList foundPages=findPages(section, title); + const TQStringList foundPages=findPages(section, title); bool pageFound=true; if (foundPages.isEmpty()) { @@ -488,7 +488,7 @@ void MANProtocol::get(const KURL& url ) { setResourcePath(m_htmlPath,m_cssPath); m_outputBuffer.open(IO_WriteOnly); - const QCString filename=QFile::encodeName(foundPages[0]); + const TQCString filename=TQFile::encodeName(foundPages[0]); char *buf = readManPage(filename); if (!buf) @@ -505,26 +505,26 @@ void MANProtocol::get(const KURL& url ) m_outputBuffer.close(); data(m_outputBuffer.buffer()); - m_outputBuffer.setBuffer(QByteArray()); + m_outputBuffer.setBuffer(TQByteArray()); // tell we are done - data(QByteArray()); + data(TQByteArray()); } finished(); } void MANProtocol::slotGetStdOutput(KProcess* /* p */, char *s, int len) { - myStdStream += QString::fromLocal8Bit(s, len); + myStdStream += TQString::fromLocal8Bit(s, len); } void MANProtocol::slotGetStdOutputUtf8(KProcess* /* p */, char *s, int len) { - myStdStream += QString::fromUtf8(s, len); + myStdStream += TQString::fromUtf8(s, len); } char *MANProtocol::readManPage(const char *_filename) { - QCString filename = _filename; + TQCString filename = _filename; char *buf = NULL; @@ -533,21 +533,21 @@ char *MANProtocol::readManPage(const char *_filename) * /usr/man/sman7fs/pcfs.7fs -> text/x-csrc : WRONG * If the path name constains the string sman, assume that it's SGML and * convert it to roff format (used on Solaris). */ - //QString file_mimetype = KMimeType::findByPath(QString(filename), 0, false)->name(); + //TQString file_mimetype = KMimeType::findByPath(TQString(filename), 0, false)->name(); if (filename.contains("sman", false)) //file_mimetype == "text/html" || ) { - myStdStream =QString::null; + myStdStream =TQString::null; KProcess proc; /* Determine path to sgml2roff, if not already done. */ getProgramPath(); proc << mySgml2RoffPath << filename; - QApplication::connect(&proc, SIGNAL(receivedStdout (KProcess *, char *, int)), - this, SLOT(slotGetStdOutput(KProcess *, char *, int))); + TQApplication::connect(&proc, TQT_SIGNAL(receivedStdout (KProcess *, char *, int)), + this, TQT_SLOT(slotGetStdOutput(KProcess *, char *, int))); proc.start(KProcess::Block, KProcess::All); - const QCString cstr=myStdStream.latin1(); + const TQCString cstr=myStdStream.latin1(); const int len = cstr.size()-1; buf = new char[len + 4]; qmemmove(buf + 1, cstr.data(), len); @@ -556,30 +556,30 @@ char *MANProtocol::readManPage(const char *_filename) } else { - if (QDir::isRelativePath(filename)) { + if (TQDir::isRelativePath(filename)) { kdDebug(7107) << "relative " << filename << endl; - filename = QDir::cleanDirPath(lastdir + "/" + filename).utf8(); + filename = TQDir::cleanDirPath(lastdir + "/" + filename).utf8(); if (!KStandardDirs::exists(filename)) { // exists perhaps with suffix lastdir = filename.left(filename.findRev('/')); - QDir mandir(lastdir); + TQDir mandir(lastdir); mandir.setNameFilter(filename.mid(filename.findRev('/') + 1) + ".*"); - filename = lastdir + "/" + QFile::encodeName(mandir.entryList().first()); + filename = lastdir + "/" + TQFile::encodeName(mandir.entryList().first()); } kdDebug(7107) << "resolved to " << filename << endl; } lastdir = filename.left(filename.findRev('/')); - myStdStream = QString::null; + myStdStream = TQString::null; KProcess proc; /* TODO: detect availability of 'man --recode' so that this can go * upstream */ proc << "man" << "--recode" << "UTF-8" << filename; - QApplication::connect(&proc, SIGNAL(receivedStdout (KProcess *, char *, int)), - this, SLOT(slotGetStdOutputUtf8(KProcess *, char *, int))); + TQApplication::connect(&proc, TQT_SIGNAL(receivedStdout (KProcess *, char *, int)), + this, TQT_SLOT(slotGetStdOutputUtf8(KProcess *, char *, int))); proc.start(KProcess::Block, KProcess::All); - const QCString cstr=myStdStream.utf8(); + const TQCString cstr=myStdStream.utf8(); const int len = cstr.size()-1; buf = new char[len + 4]; qmemmove(buf + 1, cstr.data(), len); @@ -590,11 +590,11 @@ char *MANProtocol::readManPage(const char *_filename) } -void MANProtocol::outputError(const QString& errmsg) +void MANProtocol::outputError(const TQString& errmsg) { - QByteArray array; - QTextStream os(array, IO_WriteOnly); - os.setEncoding(QTextStream::UnicodeUTF8); + TQByteArray array; + TQTextStream os(array, IO_WriteOnly); + os.setEncoding(TQTextStream::UnicodeUTF8); os << "" << endl; os << "" << endl; @@ -608,11 +608,11 @@ void MANProtocol::outputError(const QString& errmsg) data(array); } -void MANProtocol::outputMatchingPages(const QStringList &matchingPages) +void MANProtocol::outputMatchingPages(const TQStringList &matchingPages) { - QByteArray array; - QTextStream os(array, IO_WriteOnly); - os.setEncoding(QTextStream::UnicodeUTF8); + TQByteArray array; + TQTextStream os(array, IO_WriteOnly); + os.setEncoding(TQTextStream::UnicodeUTF8); os << "" << endl; os << "\n"<\n