summaryrefslogtreecommitdiffstats
path: root/kioslave
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kioslave
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kioslave')
-rw-r--r--kioslave/about/kio_about.cpp10
-rw-r--r--kioslave/about/kio_about.h4
-rw-r--r--kioslave/cgi/cgi.cpp46
-rw-r--r--kioslave/cgi/cgi.h8
-rw-r--r--kioslave/cgi/kcmcgi/kcmcgi.cpp42
-rw-r--r--kioslave/cgi/kcmcgi/kcmcgi.h12
-rw-r--r--kioslave/filter/filter.cc12
-rw-r--r--kioslave/filter/filter.h6
-rw-r--r--kioslave/finger/kio_finger.cpp48
-rw-r--r--kioslave/finger/kio_finger.h14
-rw-r--r--kioslave/fish/fish.cpp124
-rw-r--r--kioslave/fish/fish.h46
-rw-r--r--kioslave/floppy/kio_floppy.cpp146
-rw-r--r--kioslave/floppy/kio_floppy.h12
-rw-r--r--kioslave/floppy/program.cpp4
-rw-r--r--kioslave/floppy/program.h6
-rw-r--r--kioslave/home/homeimpl.cpp42
-rw-r--r--kioslave/home/homeimpl.h10
-rw-r--r--kioslave/home/kdedmodule/homedirnotify.cpp24
-rw-r--r--kioslave/home/kdedmodule/homedirnotify.h4
-rw-r--r--kioslave/home/kdedmodule/homedirnotifymodule.cpp4
-rw-r--r--kioslave/home/kdedmodule/homedirnotifymodule.h2
-rw-r--r--kioslave/home/kio_home.cpp12
-rw-r--r--kioslave/home/kio_home.h4
-rw-r--r--kioslave/home/testhome.cpp6
-rw-r--r--kioslave/info/info.cc28
-rw-r--r--kioslave/info/info.h16
-rw-r--r--kioslave/ldap/kio_ldap.cpp94
-rw-r--r--kioslave/ldap/kio_ldap.h28
-rw-r--r--kioslave/mac/kio_mac.cpp256
-rw-r--r--kioslave/mac/kio_mac.h28
-rw-r--r--kioslave/man/kio_man.cpp386
-rw-r--r--kioslave/man/kio_man.h60
-rw-r--r--kioslave/man/kio_man_test.cpp4
-rw-r--r--kioslave/man/kmanpart.cpp16
-rw-r--r--kioslave/man/kmanpart.h14
-rw-r--r--kioslave/man/man2html.cpp206
-rw-r--r--kioslave/man/man2html.h4
-rw-r--r--kioslave/media/kcmodule/main.cpp22
-rw-r--r--kioslave/media/kcmodule/main.h4
-rw-r--r--kioslave/media/kcmodule/managermodule.cpp8
-rw-r--r--kioslave/media/kcmodule/managermodule.h2
-rw-r--r--kioslave/media/kcmodule/mimetypelistboxitem.cpp6
-rw-r--r--kioslave/media/kcmodule/mimetypelistboxitem.h10
-rw-r--r--kioslave/media/kcmodule/notifiermodule.cpp50
-rw-r--r--kioslave/media/kcmodule/notifiermodule.h6
-rw-r--r--kioslave/media/kcmodule/serviceconfigdialog.cpp38
-rw-r--r--kioslave/media/kcmodule/serviceconfigdialog.h4
-rw-r--r--kioslave/media/kfile-plugin/kfilemediaplugin.cpp52
-rw-r--r--kioslave/media/kfile-plugin/kfilemediaplugin.h4
-rw-r--r--kioslave/media/kio_media.cpp30
-rw-r--r--kioslave/media/kio_media.h6
-rw-r--r--kioslave/media/libmediacommon/actionlistboxitem.cpp8
-rw-r--r--kioslave/media/libmediacommon/actionlistboxitem.h6
-rw-r--r--kioslave/media/libmediacommon/medium.cpp94
-rw-r--r--kioslave/media/libmediacommon/medium.h84
-rw-r--r--kioslave/media/libmediacommon/notifieraction.cpp28
-rw-r--r--kioslave/media/libmediacommon/notifieraction.h30
-rw-r--r--kioslave/media/libmediacommon/notifiernothingaction.cpp2
-rw-r--r--kioslave/media/libmediacommon/notifiernothingaction.h2
-rw-r--r--kioslave/media/libmediacommon/notifieropenaction.cpp4
-rw-r--r--kioslave/media/libmediacommon/notifieropenaction.h4
-rw-r--r--kioslave/media/libmediacommon/notifierserviceaction.cpp54
-rw-r--r--kioslave/media/libmediacommon/notifierserviceaction.h22
-rw-r--r--kioslave/media/libmediacommon/notifiersettings.cpp104
-rw-r--r--kioslave/media/libmediacommon/notifiersettings.h34
-rw-r--r--kioslave/media/mediaimpl.cpp66
-rw-r--r--kioslave/media/mediaimpl.h30
-rw-r--r--kioslave/media/mediamanager/fstabbackend.cpp104
-rw-r--r--kioslave/media/mediamanager/fstabbackend.h40
-rw-r--r--kioslave/media/mediamanager/halbackend.cpp324
-rw-r--r--kioslave/media/mediamanager/halbackend.h38
-rw-r--r--kioslave/media/mediamanager/linuxcdpolling.cpp96
-rw-r--r--kioslave/media/mediamanager/linuxcdpolling.h26
-rw-r--r--kioslave/media/mediamanager/mediadirnotify.cpp8
-rw-r--r--kioslave/media/mediamanager/medialist.cpp68
-rw-r--r--kioslave/media/mediamanager/medialist.h60
-rw-r--r--kioslave/media/mediamanager/mediamanager.cpp84
-rw-r--r--kioslave/media/mediamanager/mediamanager.h52
-rw-r--r--kioslave/media/mediamanager/removablebackend.cpp62
-rw-r--r--kioslave/media/mediamanager/removablebackend.h22
-rw-r--r--kioslave/media/medianotifier/medianotifier.cpp108
-rw-r--r--kioslave/media/medianotifier/medianotifier.h20
-rw-r--r--kioslave/media/medianotifier/notificationdialog.cpp52
-rw-r--r--kioslave/media/medianotifier/notificationdialog.h4
-rw-r--r--kioslave/media/mounthelper/dialog.cpp14
-rw-r--r--kioslave/media/mounthelper/dialog.h14
-rw-r--r--kioslave/media/mounthelper/kio_media_mounthelper.cpp40
-rw-r--r--kioslave/media/mounthelper/kio_media_mounthelper.h10
-rw-r--r--kioslave/media/propsdlgplugin/propertiespage.cpp76
-rw-r--r--kioslave/media/propsdlgplugin/propertiespage.h8
-rw-r--r--kioslave/media/propsdlgplugin/propsdlgshareplugin.cpp20
-rw-r--r--kioslave/media/propsdlgplugin/propsdlgshareplugin.h2
-rw-r--r--kioslave/media/testmedia.cpp6
-rw-r--r--kioslave/nfs/kio_nfs.cpp148
-rw-r--r--kioslave/nfs/kio_nfs.h38
-rw-r--r--kioslave/nntp/nntp.cpp108
-rw-r--r--kioslave/nntp/nntp.h22
-rw-r--r--kioslave/pop3/pop3.cc90
-rw-r--r--kioslave/pop3/pop3.h16
-rw-r--r--kioslave/remote/kdedmodule/remotedirnotify.cpp6
-rw-r--r--kioslave/remote/kdedmodule/remotedirnotifymodule.cpp4
-rw-r--r--kioslave/remote/kdedmodule/remotedirnotifymodule.h2
-rw-r--r--kioslave/remote/kio_remote.cpp12
-rw-r--r--kioslave/remote/kio_remote.h4
-rw-r--r--kioslave/remote/remoteimpl.cpp84
-rw-r--r--kioslave/remote/remoteimpl.h20
-rw-r--r--kioslave/remote/testremote.cpp6
-rw-r--r--kioslave/settings/kio_settings.cc32
-rw-r--r--kioslave/sftp/kio_sftp.cpp220
-rw-r--r--kioslave/sftp/kio_sftp.h44
-rw-r--r--kioslave/sftp/ksshprocess.cpp114
-rw-r--r--kioslave/sftp/ksshprocess.h50
-rw-r--r--kioslave/sftp/ksshprocesstest.cpp8
-rw-r--r--kioslave/sftp/process.cpp24
-rw-r--r--kioslave/sftp/process.h42
-rw-r--r--kioslave/sftp/sftpfileattr.cpp22
-rw-r--r--kioslave/sftp/sftpfileattr.h32
-rw-r--r--kioslave/smb/kio_smb.cpp2
-rw-r--r--kioslave/smb/kio_smb.h30
-rw-r--r--kioslave/smb/kio_smb_auth.cpp16
-rw-r--r--kioslave/smb/kio_smb_browse.cpp26
-rw-r--r--kioslave/smb/kio_smb_config.cpp14
-rw-r--r--kioslave/smb/kio_smb_file.cpp6
-rw-r--r--kioslave/smb/kio_smb_internal.cpp8
-rw-r--r--kioslave/smb/kio_smb_internal.h22
-rw-r--r--kioslave/smb/kio_smb_mount.cpp42
-rw-r--r--kioslave/smtp/capabilities.cc48
-rw-r--r--kioslave/smtp/capabilities.h30
-rw-r--r--kioslave/smtp/command.cc60
-rw-r--r--kioslave/smtp/command.h58
-rw-r--r--kioslave/smtp/interactivesmtpserver.cc74
-rw-r--r--kioslave/smtp/interactivesmtpserver.h38
-rw-r--r--kioslave/smtp/request.cc36
-rw-r--r--kioslave/smtp/request.h42
-rw-r--r--kioslave/smtp/response.cc16
-rw-r--r--kioslave/smtp/response.h8
-rw-r--r--kioslave/smtp/smtp.cc56
-rw-r--r--kioslave/smtp/smtp.h32
-rw-r--r--kioslave/smtp/test_commands.cc26
-rw-r--r--kioslave/smtp/test_headergeneration.cc4
-rw-r--r--kioslave/smtp/test_responseparser.cc6
-rw-r--r--kioslave/smtp/transactionstate.cc14
-rw-r--r--kioslave/smtp/transactionstate.h26
-rw-r--r--kioslave/system/kdedmodule/systemdirnotify.cpp28
-rw-r--r--kioslave/system/kdedmodule/systemdirnotify.h4
-rw-r--r--kioslave/system/kdedmodule/systemdirnotifymodule.cpp4
-rw-r--r--kioslave/system/kdedmodule/systemdirnotifymodule.h2
-rw-r--r--kioslave/system/kio_system.cpp14
-rw-r--r--kioslave/system/kio_system.h4
-rw-r--r--kioslave/system/systemimpl.cpp94
-rw-r--r--kioslave/system/systemimpl.h22
-rw-r--r--kioslave/system/testsystem.cpp6
-rw-r--r--kioslave/tar/ktartest.cpp28
-rw-r--r--kioslave/tar/tar.cc56
-rw-r--r--kioslave/tar/tar.h6
-rw-r--r--kioslave/thumbnail/cursorcreator.cpp12
-rw-r--r--kioslave/thumbnail/cursorcreator.h2
-rw-r--r--kioslave/thumbnail/djvucreator.cpp12
-rw-r--r--kioslave/thumbnail/djvucreator.h2
-rw-r--r--kioslave/thumbnail/exrcreator.cpp10
-rw-r--r--kioslave/thumbnail/exrcreator.h2
-rw-r--r--kioslave/thumbnail/htmlcreator.cpp22
-rw-r--r--kioslave/thumbnail/htmlcreator.h6
-rw-r--r--kioslave/thumbnail/imagecreator.cpp4
-rw-r--r--kioslave/thumbnail/imagecreator.h2
-rw-r--r--kioslave/thumbnail/textcreator.cpp32
-rw-r--r--kioslave/thumbnail/textcreator.h6
-rw-r--r--kioslave/thumbnail/thumbnail.cpp70
-rw-r--r--kioslave/thumbnail/thumbnail.h12
-rw-r--r--kioslave/trash/kfile-plugin/kfile_trash.cpp22
-rw-r--r--kioslave/trash/kfile-plugin/kfile_trash.h4
-rw-r--r--kioslave/trash/kio_trash.cpp108
-rw-r--r--kioslave/trash/kio_trash.h16
-rw-r--r--kioslave/trash/ktrash.cpp14
-rw-r--r--kioslave/trash/testtrash.cpp414
-rw-r--r--kioslave/trash/testtrash.h36
-rw-r--r--kioslave/trash/trashimpl.cpp242
-rw-r--r--kioslave/trash/trashimpl.h86
179 files changed, 3626 insertions, 3626 deletions
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 <stdlib.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kinstance.h>
#include <kurl.h>
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 << "<html><head><title>about:blank</title></head><body></body></html>";
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 <qcstring.h>
+#include <tqcstring.h>
#include <kio/global.h>
#include <kio/slavebase.h>
@@ -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 <stdio.h>
#include <stdlib.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kprocess.h>
@@ -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 <qobject.h>
+#include <tqobject.h>
#include <kio/slavebase.h>
@@ -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 <kaboutdata.h>
#include <kfiledialog.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
#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("<h1>CGI Scripts</h1> 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 <qobject.h>
+#include <tqobject.h>
#include <kio/global.h>
#include <kio/slavebase.h>
-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 <sys/stat.h>
#include <string.h>
-#include <qtextstream.h>
-#include <qdict.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqtextstream.h>
+#include <tqdict.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kinstance.h>
@@ -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 <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include <kurl.h>
#include <kprocess.h>
#include <kio/global.h>
#include <kio/slavebase.h>
-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 <qcstring.h>
-#include <qfile.h>
-#include <qsocket.h>
-#include <qdatetime.h>
-#include <qbitarray.h>
-#include <qregexp.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqsocket.h>
+#include <tqdatetime.h>
+#include <tqbitarray.h>
+#include <tqregexp.h>
#include <stdlib.h>
#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 <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include <kurl.h>
@@ -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<int> commandCodes;
+ TQValueList<int> 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 <sys/time.h>
#include <sys/types.h>
-#include <qtextstream.h>
-#include <qcstring.h>
-#include <qfile.h>
+#include <tqtextstream.h>
+#include <tqcstring.h>
+#include <tqfile.h>
#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"<<endl;
}
-bool FloppyProtocol::stopAfterError(const KURL& url, const QString& drive)
+bool FloppyProtocol::stopAfterError(const KURL& url, const TQString& drive)
{
if (m_stderrSize==0)
return true;
//m_stderrBuffer[m_stderrSize]='\0';
- QString outputString(m_stderrBuffer);
- QTextIStream output(&outputString);
- QString line=output.readLine();
+ TQString outputString(m_stderrBuffer);
+ TQTextIStream output(&outputString);
+ TQString line=output.readLine();
kdDebug(7101)<<"line: -"<<line<<"-"<<endl;
if (line.find("resource busy") > -1)
{
@@ -255,7 +255,7 @@ void FloppyProtocol::listDir( const KURL& _url)
{
kdDebug(7101)<<"Floppy::listDir() "<<_url.path()<<endl;
KURL url(_url);
- QString path(url.path());
+ TQString path(url.path());
if ((path.isEmpty()) || (path=="/"))
{
@@ -264,11 +264,11 @@ void FloppyProtocol::listDir( const KURL& _url)
finished();
return;
}
- QString drive;
- QString floppyPath;
+ TQString drive;
+ TQString floppyPath;
getDriveAndPath(path,drive,floppyPath);
- QStringList args;
+ TQStringList args;
args<<"mdir"<<"-a"<<(drive+floppyPath);
if (m_mtool!=0)
@@ -318,9 +318,9 @@ void FloppyProtocol::listDir( const KURL& _url)
if (errorOccured)
return;
- QString outputString(m_stdoutBuffer);
- QTextIStream output(&outputString);
- QString line;
+ TQString outputString(m_stdoutBuffer);
+ TQTextIStream output(&outputString);
+ TQString line;
int totalNumber(0);
int mode(0);
@@ -363,7 +363,7 @@ void FloppyProtocol::listDir( const KURL& _url)
//kdDebug(7101)<<"Floppy::listDir() ends"<<endl;
}
-void FloppyProtocol::errorMissingMToolsProgram(const QString& name)
+void FloppyProtocol::errorMissingMToolsProgram(const TQString& name)
{
error(KIO::ERR_SLAVE_DEFINED,i18n("Could not start program \"%1\".\nEnsure that the mtools package is installed correctly on your system.").arg(name));
}
@@ -392,14 +392,14 @@ void FloppyProtocol::createUDSEntry(const StatInfo& info, UDSEntry& entry)
entry.append( atom );
}
-StatInfo FloppyProtocol::createStatInfo(const QString line, bool makeStat, const QString& dirName)
+StatInfo FloppyProtocol::createStatInfo(const TQString line, bool makeStat, const TQString& dirName)
{
//kdDebug(7101)<<"Floppy::createUDSEntry()"<<endl;
- QString name;
- QString size;
+ TQString name;
+ TQString size;
bool isDir(false);
- QString day,month, year;
- QString hour, minute;
+ TQString day,month, year;
+ TQString hour, minute;
StatInfo info;
if (line.length()==41)
@@ -409,7 +409,7 @@ StatInfo FloppyProtocol::createStatInfo(const QString line, bool makeStat, const
if (nameLength>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"<<endl;
@@ -573,9 +573,9 @@ StatInfo FloppyProtocol::_stat(const KURL& url)
}
kdDebug(7101)<<"Floppy::_stat(): parse stuff"<<endl;
- QString outputString(m_stdoutBuffer);
- QTextIStream output(&outputString);
- QString line;
+ TQString outputString(m_stdoutBuffer);
+ TQTextIStream output(&outputString);
+ TQString line;
for (int lineNumber=0; !output.atEnd(); lineNumber++)
{
line=output.readLine();
@@ -593,16 +593,16 @@ StatInfo FloppyProtocol::_stat(const KURL& url)
int FloppyProtocol::freeSpace(const KURL& url)
{
- QString path(url.path());
- QString drive;
- QString floppyPath;
+ TQString path(url.path());
+ TQString drive;
+ TQString floppyPath;
getDriveAndPath(path,drive,floppyPath);
//kdDebug(7101)<<"Floppy::freeSpace(): delete m_mtool"<<endl;
if (m_mtool!=0)
delete m_mtool;
- QStringList args;
+ TQStringList args;
args<<"mdir"<<"-a"<<drive;
//kdDebug(7101)<<"Floppy::freeSpace(): create m_mtool"<<endl;
@@ -662,16 +662,16 @@ int FloppyProtocol::freeSpace(const KURL& url)
}
kdDebug(7101)<<"Floppy::freeSpace(): parse stuff"<<endl;
- QString outputString(m_stdoutBuffer);
- QTextIStream output(&outputString);
- QString line;
+ TQString outputString(m_stdoutBuffer);
+ TQTextIStream output(&outputString);
+ TQString line;
int lineNumber(0);
while (!output.atEnd())
{
line=output.readLine();
if (line.find("bytes free")==36)
{
- QString tmp=line.mid(24,3);
+ TQString tmp=line.mid(24,3);
tmp=tmp.stripWhiteSpace();
tmp+=line.mid(28,3);
tmp=tmp.stripWhiteSpace();
@@ -689,7 +689,7 @@ void FloppyProtocol::stat( const KURL & _url)
{
kdDebug(7101)<<"Floppy::stat() "<<_url.path()<<endl;
KURL url(_url);
- QString path(url.path());
+ TQString path(url.path());
if ((path.isEmpty()) || (path=="/"))
{
@@ -714,7 +714,7 @@ void FloppyProtocol::stat( const KURL & _url)
void FloppyProtocol::mkdir( const KURL& url, int)
{
kdDebug(7101)<<"FloppyProtocol::mkdir()"<<endl;
- QString path(url.path());
+ TQString path(url.path());
if ((path.isEmpty()) || (path=="/"))
{
@@ -724,8 +724,8 @@ void FloppyProtocol::mkdir( const KURL& url, int)
finished();
return;
}
- QString drive;
- QString floppyPath;
+ TQString drive;
+ TQString floppyPath;
getDriveAndPath(path,drive,floppyPath);
if (floppyPath.isEmpty())
{
@@ -735,7 +735,7 @@ void FloppyProtocol::mkdir( const KURL& url, int)
if (m_mtool!=0)
delete m_mtool;
//kdDebug(7101)<<"Floppy::stat(): create args"<<endl;
- QStringList args;
+ TQStringList args;
args<<"mmd"<<(drive+floppyPath);
kdDebug(7101)<<"Floppy::mkdir(): executing: mmd -"<<(drive+floppyPath)<<"-"<<endl;
@@ -786,7 +786,7 @@ void FloppyProtocol::mkdir( const KURL& url, int)
void FloppyProtocol::del( const KURL& url, bool isfile)
{
kdDebug(7101)<<"FloppyProtocol::del()"<<endl;
- QString path(url.path());
+ TQString path(url.path());
if ((path.isEmpty()) || (path=="/"))
{
@@ -796,8 +796,8 @@ void FloppyProtocol::del( const KURL& url, bool isfile)
finished();
return;
}
- QString drive;
- QString floppyPath;
+ TQString drive;
+ TQString floppyPath;
getDriveAndPath(path,drive,floppyPath);
if (floppyPath.isEmpty())
{
@@ -808,7 +808,7 @@ void FloppyProtocol::del( const KURL& url, bool isfile)
if (m_mtool!=0)
delete m_mtool;
//kdDebug(7101)<<"Floppy::stat(): create args"<<endl;
- QStringList args;
+ TQStringList args;
bool usingmdel;
@@ -823,14 +823,14 @@ void FloppyProtocol::del( const KURL& url, bool isfile)
usingmdel=false;
}
- kdDebug(7101)<<"Floppy::del(): executing: " << (usingmdel ? QString("mdel") : QString("mrd") ) << "-"<<(drive+floppyPath)<<"-"<<endl;
+ kdDebug(7101)<<"Floppy::del(): executing: " << (usingmdel ? TQString("mdel") : TQString("mrd") ) << "-"<<(drive+floppyPath)<<"-"<<endl;
m_mtool=new Program(args);
if (!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() -"<<srcPath<<"- to -"<<destPath<<"-"<<endl;
@@ -881,8 +881,8 @@ void FloppyProtocol::rename( const KURL &src, const KURL &dest, bool _overwrite
if ((destPath.isEmpty()) || (destPath=="/"))
destPath="/a/";
- QString srcDrive;
- QString srcFloppyPath;
+ TQString srcDrive;
+ TQString srcFloppyPath;
getDriveAndPath(srcPath,srcDrive,srcFloppyPath);
if (srcFloppyPath.isEmpty())
{
@@ -890,8 +890,8 @@ void FloppyProtocol::rename( const KURL &src, const KURL &dest, bool _overwrite
return;
}
- QString destDrive;
- QString destFloppyPath;
+ TQString destDrive;
+ TQString destFloppyPath;
getDriveAndPath(destPath,destDrive,destFloppyPath);
if (destFloppyPath.isEmpty())
{
@@ -902,7 +902,7 @@ void FloppyProtocol::rename( const KURL &src, const KURL &dest, bool _overwrite
if (m_mtool!=0)
delete m_mtool;
//kdDebug(7101)<<"Floppy::stat(): create args"<<endl;
- QStringList args;
+ TQStringList args;
if (_overwrite)
args<<"mren"<<"-o"<<(srcDrive+srcFloppyPath)<<(destDrive+destFloppyPath);
@@ -956,7 +956,7 @@ void FloppyProtocol::rename( const KURL &src, const KURL &dest, bool _overwrite
void FloppyProtocol::get( const KURL& url )
{
- QString path(url.path());
+ TQString path(url.path());
kdDebug(7101)<<"Floppy::get() -"<<path<<"-"<<endl;
if ((path.isEmpty()) || (path=="/"))
@@ -974,8 +974,8 @@ void FloppyProtocol::get( const KURL& url )
totalSize( info.size);
- QString drive;
- QString floppyPath;
+ TQString drive;
+ TQString floppyPath;
getDriveAndPath(path,drive,floppyPath);
if (floppyPath.isEmpty())
{
@@ -986,7 +986,7 @@ void FloppyProtocol::get( const KURL& url )
if (m_mtool!=0)
delete m_mtool;
//kdDebug(7101)<<"Floppy::stat(): create args"<<endl;
- QStringList args;
+ TQStringList args;
args<<"mcopy"<<(drive+floppyPath)<<"-";
kdDebug(7101)<<"Floppy::get(): executing: mcopy -"<<(drive+floppyPath)<<"-"<<endl;
@@ -1003,7 +1003,7 @@ void FloppyProtocol::get( const KURL& url )
clearBuffers();
int result;
int bytesRead(0);
- QByteArray array;
+ TQByteArray array;
bool loopFinished(false);
bool errorOccured(false);
do
@@ -1050,13 +1050,13 @@ void FloppyProtocol::get( const KURL& url )
return;
//kdDebug(7101)<<"Floppy::get(): finishing"<<endl;
- data( QByteArray() );
+ data( TQByteArray() );
finished();
}
void FloppyProtocol::put( const KURL& url, int , bool overwrite, bool )
{
- QString path(url.path());
+ TQString path(url.path());
kdDebug(7101)<<"Floppy::put() -"<<path<<"-"<<endl;
if ((path.isEmpty()) || (path=="/"))
@@ -1067,8 +1067,8 @@ void FloppyProtocol::put( const KURL& url, int , bool overwrite, bool )
finished();
return;
}
- QString drive;
- QString floppyPath;
+ TQString drive;
+ TQString floppyPath;
getDriveAndPath(path,drive,floppyPath);
if (floppyPath.isEmpty())
{
@@ -1082,7 +1082,7 @@ void FloppyProtocol::put( const KURL& url, int , bool overwrite, bool )
if (m_mtool!=0)
delete m_mtool;
//kdDebug(7101)<<"Floppy::stat(): create args"<<endl;
- QStringList args;
+ TQStringList args;
if (overwrite)
args<<"mcopy"<<"-o"<<"-"<<(drive+floppyPath);
else
@@ -1103,7 +1103,7 @@ void FloppyProtocol::put( const KURL& url, int , bool overwrite, bool )
clearBuffers();
int result(0);
int bytesRead(0);
- QByteArray array;
+ TQByteArray array;
//from file.cc
// Loop until we got 0 (end of data)
@@ -1129,7 +1129,7 @@ void FloppyProtocol::put( const KURL& url, int , bool overwrite, bool )
}
else
{
- QByteArray buffer;
+ TQByteArray buffer;
dataReq(); // Request for data
//kdDebug(7101)<<"Floppy::put(): after dataReq()"<<endl;
result = readData( buffer );
diff --git a/kioslave/floppy/kio_floppy.h b/kioslave/floppy/kio_floppy.h
index bfc003b9f..3cc58488f 100644
--- a/kioslave/floppy/kio_floppy.h
+++ b/kioslave/floppy/kio_floppy.h
@@ -25,12 +25,12 @@
#include "program.h"
-#include <qstring.h>
+#include <tqstring.h>
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 <kdebug.h>
-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 <qstringlist.h>
+#include <tqstringlist.h>
/**
* 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 <kdebug.h>
-#include <qapplication.h>
-#include <qeventloop.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
#include <sys/stat.h>
@@ -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<KIO::UDSEntry> &list)
+bool HomeImpl::listHomes(TQValueList<KIO::UDSEntry> &list)
{
kdDebug() << "HomeImpl::listHomes" << endl;
KUser current_user;
- QValueList<KUserGroup> groups = current_user.groups();
- QValueList<int> uid_list;
+ TQValueList<KUserGroup> groups = current_user.groups();
+ TQValueList<int> uid_list;
- QValueList<KUserGroup>::iterator groups_it = groups.begin();
- QValueList<KUserGroup>::iterator groups_end = groups.end();
+ TQValueList<KUserGroup>::iterator groups_it = groups.begin();
+ TQValueList<KUserGroup>::iterator groups_end = groups.end();
for(; groups_it!=groups_end; ++groups_it)
{
- QValueList<KUser> users = (*groups_it).users();
+ TQValueList<KUser> users = (*groups_it).users();
- QValueList<KUser>::iterator it = users.begin();
- QValueList<KUser>::iterator users_end = users.end();
+ TQValueList<KUser>::iterator it = users.begin();
+ TQValueList<KUser>::iterator users_end = users.end();
for(; it!=users_end; ++it)
{
@@ -104,7 +104,7 @@ bool HomeImpl::listHomes(QValueList<KIO::UDSEntry> &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 <kurl.h>
#include <kuser.h>
-#include <qstring.h>
+#include <tqstring.h>
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<KIO::UDSEntry> &list);
+ bool statHome(const TQString &name, KIO::UDSEntry &entry);
+ bool listHomes(TQValueList<KIO::UDSEntry> &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<KUserGroup> groups = current_user.groups();
- QValueList<int> uid_list;
+ TQValueList<KUserGroup> groups = current_user.groups();
+ TQValueList<int> uid_list;
- QValueList<KUserGroup>::iterator groups_it = groups.begin();
- QValueList<KUserGroup>::iterator groups_end = groups.end();
+ TQValueList<KUserGroup>::iterator groups_it = groups.begin();
+ TQValueList<KUserGroup>::iterator groups_end = groups.end();
for(; groups_it!=groups_end; ++groups_it)
{
- QValueList<KUser> users = (*groups_it).users();
+ TQValueList<KUser> users = (*groups_it).users();
- QValueList<KUser>::iterator it = users.begin();
- QValueList<KUser>::iterator users_end = users.end();
+ TQValueList<KUser>::iterator it = users.begin();
+ TQValueList<KUser>::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<QString,KURL>::iterator it = m_homeFoldersMap.begin();
- QMap<QString,KURL>::iterator end = m_homeFoldersMap.end();
+ TQMap<TQString,KURL>::iterator it = m_homeFoldersMap.begin();
+ TQMap<TQString,KURL>::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 <kurl.h>
#include <kdirnotify.h>
-#include <qmap.h>
+#include <tqmap.h>
class HomeDirNotify : public KDirNotify
{
@@ -41,7 +41,7 @@ private:
KURL toHomeURL(const KURL &url);
KURL::List toHomeURLList(const KURL::List &list);
- QMap<QString,KURL> m_homeFoldersMap;
+ TQMap<TQString,KURL> 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 <klocale.h>
#include <kglobal.h>
-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 <stdlib.h>
-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 <stdlib.h>
#include <sys/stat.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kprocess.h>
@@ -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(-" <<path<<"-)"<< endl;
diff --git a/kioslave/info/info.h b/kioslave/info/info.h
index ccf41fc5e..20c142cf3 100644
--- a/kioslave/info/info.h
+++ b/kioslave/info/info.h
@@ -1,7 +1,7 @@
#ifndef __info_h__
#define __info_h__
-#include <qobject.h>
+#include <tqobject.h>
#include <kio/slavebase.h>
@@ -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 <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <kio/slavebase.h>
#include <kio/authinfo.h>
@@ -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 <kdebug.h>
#include <klocale.h>
#include <kconfig.h>
-#include <qstring.h>
-#include <qregexp.h>
+#include <tqstring.h>
+#include <tqregexp.h>
#include <sys/stat.h>
#include <stdlib.h>
@@ -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<KIO::UDSAtom> MacProtocol::doStat(const KURL& url) {
- QString filename = prepareHP(url);
+TQValueList<KIO::UDSAtom> 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<KIO::UDSAtom> 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<KIO::UDSAtom> 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<KIO::UDSAtom> 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<KIO::UDSAtom> MacProtocol::doStat(const KURL& url) {
return entry;
}//if filename == null
- return QValueList<KIO::UDSAtom>();
+ return TQValueList<KIO::UDSAtom>();
}
//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<KIO::UDSAtom> MacProtocol::makeUDS(const QString& _line) {
- QString line(_line);
+TQValueList<KIO::UDSAtom> 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<KIO::UDSAtom> 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<KIO::UDSAtom> 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<KIO::UDSAtom> 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<KIO::UDSAtom> 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 <kurl.h>
#include <kprocess.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
-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<KIO::UDSAtom> makeUDS(const QString& _line);
- int makeTime(QString mday, QString mon, QString third);
- QString getMimetype(QString type, QString app);
- QValueList<KIO::UDSAtom> doStat(const KURL& url);
+ TQString prepareHP(const KURL& _url);
+ TQValueList<KIO::UDSAtom> makeUDS(const TQString& _line);
+ int makeTime(TQString mday, TQString mon, TQString third);
+ TQString getMimetype(TQString type, TQString app);
+ TQValueList<KIO::UDSAtom> 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 <string.h>
#include <dirent.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdatastream.h>
-#include <qcstring.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdatastream.h>
+#include <tqcstring.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kinstance.h>
@@ -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 &section)
+bool parseUrl(const TQString& _url, TQString &title, TQString &section)
{
- 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 &section)
}
-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<QString, QString> &i, QTextStream &t, const QString &mark )
+void MANProtocol::parseWhatIs( TQMap<TQString, TQString> &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<QString, QString> &i, QTextStream &t, const
}
}
-bool MANProtocol::addWhatIs(QMap<QString, QString> &i, const QString &name, const QString &mark)
+bool MANProtocol::addWhatIs(TQMap<TQString, TQString> &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<QString, QString> MANProtocol::buildIndexMap(const QString &section)
+TQMap<TQString, TQString> MANProtocol::buildIndexMap(const TQString &section)
{
- QMap<QString, QString> i;
- QStringList man_dirs = manDirectories();
+ TQMap<TQString, TQString> 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<QString, QString> MANProtocol::buildIndexMap(const QString &section)
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<QString, QString> MANProtocol::buildIndexMap(const QString &section)
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<QString, QString> MANProtocol::buildIndexMap(const QString &section)
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 "<mandir>/<lang>" 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 "<mandir>"
- 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('&', "&amp;");
reply = reply.replace('<', "&lt;");
@@ -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 << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Strict//EN\">" << endl;
os << "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">" << 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 << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Strict//EN\">" << endl;
os << "<html>\n<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">"<<endl;
@@ -624,7 +624,7 @@ void MANProtocol::outputMatchingPages(const QStringList &matchingPages)
os << "</h1>\n<ul>\n";
int acckey=1;
- for (QStringList::ConstIterator it = matchingPages.begin(); it != matchingPages.end(); ++it)
+ for (TQStringList::ConstIterator it = matchingPages.begin(); it != matchingPages.end(); ++it)
{
os<<"<li><a href='man:"<<(*it)<<"' accesskey='"<< acckey <<"'>"<< *it <<"</a><br>\n<br>\n";
acckey++;
@@ -645,7 +645,7 @@ void MANProtocol::stat( const KURL& url)
{
kdDebug(7107) << "ENTERING STAT " << url.url() << endl;
- QString title, section;
+ TQString title, section;
if (!parseUrl(url.path(), title, section))
{
@@ -670,9 +670,9 @@ void MANProtocol::stat( const KURL& url)
atom.m_uds = UDS_URL;
atom.m_long = 0;
- QString newUrl = "man:"+title;
+ TQString newUrl = "man:"+title;
if (!section.isEmpty())
- newUrl += QString("(%1)").arg(section);
+ newUrl += TQString("(%1)").arg(section);
atom.m_str = newUrl;
entry.append(atom);
@@ -718,7 +718,7 @@ void MANProtocol::mimetype(const KURL & /*url*/)
finished();
}
-static QString sectionName(const QString& section)
+static TQString sectionName(const TQString& section)
{
if (section == "1")
return i18n("User Commands");
@@ -747,20 +747,20 @@ static QString sectionName(const QString& section)
else if (section == "n")
return i18n("New");
- return QString::null;
+ return TQString::null;
}
-QStringList MANProtocol::buildSectionList(const QStringList& dirs) const
+TQStringList MANProtocol::buildSectionList(const TQStringList& dirs) const
{
- QStringList l;
+ TQStringList l;
- for (QStringList::ConstIterator it = section_names.begin();
+ for (TQStringList::ConstIterator it = section_names.begin();
it != section_names.end(); ++it)
{
- for (QStringList::ConstIterator dir = dirs.begin();
+ for (TQStringList::ConstIterator dir = dirs.begin();
dir != dirs.end(); ++dir)
{
- QDir d((*dir)+"/man"+(*it));
+ TQDir d((*dir)+"/man"+(*it));
if (d.exists())
{
l << *it;
@@ -773,9 +773,9 @@ QStringList MANProtocol::buildSectionList(const QStringList& dirs) const
void MANProtocol::showMainIndex()
{
- QByteArray array;
- QTextStream os(array, IO_WriteOnly);
- os.setEncoding(QTextStream::UnicodeUTF8);
+ TQByteArray array;
+ TQTextStream os(array, IO_WriteOnly);
+ os.setEncoding(TQTextStream::UnicodeUTF8);
// print header
os << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Strict//EN\">" << endl;
@@ -787,16 +787,16 @@ void MANProtocol::showMainIndex()
os << "<body><h1>" << i18n("UNIX Manual Index") << "</h1>" << endl;
// ### TODO: why still the environment variable
- const QString sectList = getenv("MANSECT");
- QStringList sections;
+ const TQString sectList = getenv("MANSECT");
+ TQStringList sections;
if (sectList.isEmpty())
sections = buildSectionList(manDirectories());
else
- sections = QStringList::split(':', sectList);
+ sections = TQStringList::split(':', sectList);
os << "<table>" << endl;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = sections.begin(); it != sections.end(); ++it)
os << "<tr><td><a href=\"man:(" << *it << ")\" accesskey=\"" <<
(((*it).length()==1)?(*it):(*it).right(1))<<"\">" << i18n("Section ")
@@ -811,10 +811,10 @@ void MANProtocol::showMainIndex()
finished();
}
-void MANProtocol::constructPath(QStringList& constr_path, QStringList constr_catmanpath)
+void MANProtocol::constructPath(TQStringList& constr_path, TQStringList constr_catmanpath)
{
- QMap<QString, QString> manpath_map;
- QMap<QString, QString> mandb_map;
+ TQMap<TQString, TQString> manpath_map;
+ TQMap<TQString, TQString> mandb_map;
// Add paths from /etc/man.conf
//
@@ -823,14 +823,14 @@ void MANProtocol::constructPath(QStringList& constr_path, QStringList constr_cat
// Mappings from $PATH to manpath are given by lines starting with
// "MANPATH_MAP"
- QRegExp manpath_regex( "^MANPATH\\s" );
- QRegExp mandatory_regex( "^MANDATORY_MANPATH\\s" );
- QRegExp manpath_map_regex( "^MANPATH_MAP\\s" );
- QRegExp mandb_map_regex( "^MANDB_MAP\\s" );
- //QRegExp section_regex( "^SECTION\\s" );
- QRegExp space_regex( "\\s+" ); // for parsing manpath map
+ TQRegExp manpath_regex( "^MANPATH\\s" );
+ TQRegExp mandatory_regex( "^MANDATORY_MANPATH\\s" );
+ TQRegExp manpath_map_regex( "^MANPATH_MAP\\s" );
+ TQRegExp mandb_map_regex( "^MANDB_MAP\\s" );
+ //TQRegExp section_regex( "^SECTION\\s" );
+ TQRegExp space_regex( "\\s+" ); // for parsing manpath map
- QFile mc("/etc/man.conf"); // Caldera
+ TQFile mc("/etc/man.conf"); // Caldera
if (!mc.exists())
mc.setName("/etc/manpath.config"); // SuSE, Debian
if (!mc.exists())
@@ -838,32 +838,32 @@ void MANProtocol::constructPath(QStringList& constr_path, QStringList constr_cat
if (mc.open(IO_ReadOnly))
{
- QTextStream is(&mc);
- is.setEncoding(QTextStream::Locale);
+ TQTextStream is(&mc);
+ is.setEncoding(TQTextStream::Locale);
while (!is.eof())
{
- const QString line = is.readLine();
+ const TQString line = is.readLine();
if ( manpath_regex.search(line, 0) == 0 )
{
- const QString path = line.mid(8).stripWhiteSpace();
+ const TQString path = line.mid(8).stripWhiteSpace();
constr_path += path;
}
else if ( mandatory_regex.search(line, 0) == 0 )
{
- const QString path = line.mid(18).stripWhiteSpace();
+ const TQString path = line.mid(18).stripWhiteSpace();
constr_path += path;
}
else if ( manpath_map_regex.search(line, 0) == 0 )
{
// The entry is "MANPATH_MAP <path> <manpath>"
- const QStringList mapping =
- QStringList::split(space_regex, line);
+ const TQStringList mapping =
+ TQStringList::split(space_regex, line);
if ( mapping.count() == 3 )
{
- const QString dir = QDir::cleanDirPath( mapping[1] );
- const QString mandir = QDir::cleanDirPath( mapping[2] );
+ const TQString dir = TQDir::cleanDirPath( mapping[1] );
+ const TQString mandir = TQDir::cleanDirPath( mapping[2] );
manpath_map[ dir ] = mandir;
}
@@ -871,13 +871,13 @@ void MANProtocol::constructPath(QStringList& constr_path, QStringList constr_cat
else if ( mandb_map_regex.search(line, 0) == 0 )
{
// The entry is "MANDB_MAP <manpath> <catmanpath>"
- const QStringList mapping =
- QStringList::split(space_regex, line);
+ const TQStringList mapping =
+ TQStringList::split(space_regex, line);
if ( mapping.count() == 3 )
{
- const QString mandir = QDir::cleanDirPath( mapping[1] );
- const QString catmandir = QDir::cleanDirPath( mapping[2] );
+ const TQString mandir = TQDir::cleanDirPath( mapping[1] );
+ const TQString catmandir = TQDir::cleanDirPath( mapping[2] );
mandb_map[ mandir ] = catmandir;
}
@@ -920,8 +920,8 @@ void MANProtocol::constructPath(QStringList& constr_path, QStringList constr_cat
int i = 0;
while (manpaths[i]) {
- if ( constr_path.findIndex( QString( manpaths[i] ) ) == -1 )
- constr_path += QString( manpaths[i] );
+ if ( constr_path.findIndex( TQString( manpaths[i] ) ) == -1 )
+ constr_path += TQString( manpaths[i] );
i++;
}
@@ -931,16 +931,16 @@ void MANProtocol::constructPath(QStringList& constr_path, QStringList constr_cat
// to the man path (the actual existence check is done further down)
if ( ::getenv("PATH") ) {
- const QStringList path =
- QStringList::split( ":",
- QString::fromLocal8Bit( ::getenv("PATH") ) );
+ const TQStringList path =
+ TQStringList::split( ":",
+ TQString::fromLocal8Bit( ::getenv("PATH") ) );
- for ( QStringList::const_iterator it = path.begin();
+ for ( TQStringList::const_iterator it = path.begin();
it != path.end();
++it )
{
- const QString dir = QDir::cleanDirPath( *it );
- QString mandir = manpath_map[ dir ];
+ const TQString dir = TQDir::cleanDirPath( *it );
+ TQString mandir = manpath_map[ dir ];
if ( !mandir.isEmpty() ) {
// a path mapping exists
@@ -950,18 +950,18 @@ void MANProtocol::constructPath(QStringList& constr_path, QStringList constr_cat
else {
// no manpath mapping, use "<path>/man" and "<path>/../man"
- mandir = dir + QString( "/man" );
+ mandir = dir + TQString( "/man" );
if ( constr_path.findIndex( mandir ) == -1 )
constr_path += mandir;
int pos = dir.findRev( '/' );
if ( pos > 0 ) {
- mandir = dir.left( pos ) + QString("/man");
+ mandir = dir.left( pos ) + TQString("/man");
if ( constr_path.findIndex( mandir ) == -1 )
constr_path += mandir;
}
}
- QString catmandir = mandb_map[ mandir ];
+ TQString catmandir = mandb_map[ mandir ];
if ( !mandir.isEmpty() )
{
if ( constr_catmanpath.findIndex( catmandir ) == -1 )
@@ -988,8 +988,8 @@ void MANProtocol::checkManPaths()
inited = true;
- const QString manpath_env = QString::fromLocal8Bit( ::getenv("MANPATH") );
- //QString mansect_env = QString::fromLocal8Bit( ::getenv("MANSECT") );
+ const TQString manpath_env = TQString::fromLocal8Bit( ::getenv("MANPATH") );
+ //TQString mansect_env = TQString::fromLocal8Bit( ::getenv("MANSECT") );
// Decide if $MANPATH is enough on its own or if it should be merged
// with the constructed path.
@@ -1010,10 +1010,10 @@ void MANProtocol::checkManPaths()
// /etc/man.conf
// default dirs
// $PATH
- QStringList constr_path;
- QStringList constr_catmanpath; // catmanpath
+ TQStringList constr_path;
+ TQStringList constr_catmanpath; // catmanpath
- QString conf_section;
+ TQString conf_section;
if ( construct_path )
{
@@ -1029,20 +1029,20 @@ void MANProtocol::checkManPaths()
// satisfied if any empty string in path_list_env (there
// should be 1 or 0) is replaced by the constructed path.
- const QStringList path_list_env = QStringList::split( ':', manpath_env , true );
+ const TQStringList path_list_env = TQStringList::split( ':', manpath_env , true );
- for ( QStringList::const_iterator it = path_list_env.begin();
+ for ( TQStringList::const_iterator it = path_list_env.begin();
it != path_list_env.end();
++it )
{
struct stat sbuf;
- QString dir = (*it);
+ TQString dir = (*it);
if ( !dir.isEmpty() ) {
// Add dir to the man path if it exists
if ( m_manpath.findIndex( dir ) == -1 ) {
- if ( ::stat( QFile::encodeName( dir ), &sbuf ) == 0
+ if ( ::stat( TQFile::encodeName( dir ), &sbuf ) == 0
&& S_ISDIR( sbuf.st_mode ) )
{
m_manpath += dir;
@@ -1053,7 +1053,7 @@ void MANProtocol::checkManPaths()
// Insert constructed path ($MANPATH was empty, or
// there was a ":" at an end or "::")
- for ( QStringList::Iterator it2 = constr_path.begin();
+ for ( TQStringList::Iterator it2 = constr_path.begin();
it2 != constr_path.end();
it2++ )
{
@@ -1061,7 +1061,7 @@ void MANProtocol::checkManPaths()
if ( !dir.isEmpty() ) {
if ( m_manpath.findIndex( dir ) == -1 ) {
- if ( ::stat( QFile::encodeName( dir ), &sbuf ) == 0
+ if ( ::stat( TQFile::encodeName( dir ), &sbuf ) == 0
&& S_ISDIR( sbuf.st_mode ) )
{
m_manpath += dir;
@@ -1074,14 +1074,14 @@ void MANProtocol::checkManPaths()
/* sections are not used
// Sections
- QStringList m_mansect = QStringList::split( ':', mansect_env, true );
+ TQStringList m_mansect = TQStringList::split( ':', mansect_env, true );
const char* default_sect[] =
{ "1", "2", "3", "4", "5", "6", "7", "8", "9", "n", 0L };
for ( int i = 0; default_sect[i] != 0L; i++ )
- if ( m_mansect.findIndex( QString( default_sect[i] ) ) == -1 )
- m_mansect += QString( default_sect[i] );
+ if ( m_mansect.findIndex( TQString( default_sect[i] ) ) == -1 )
+ m_mansect += TQString( default_sect[i] );
*/
}
@@ -1151,14 +1151,14 @@ int compare_man_index(const void *s1, const void *s2)
#warning using heapsort
// Set up my own man page list,
// with a special compare function to sort itself
-typedef QPtrList<struct man_index_t> QManIndexListBase;
-typedef QPtrListIterator<struct man_index_t> QManIndexListIterator;
+typedef TQPtrList<struct man_index_t> QManIndexListBase;
+typedef TQPtrListIterator<struct man_index_t> QManIndexListIterator;
class QManIndexList : public QManIndexListBase
{
public:
private:
- int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 )
+ int compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 )
{
struct man_index_t *m1 = (struct man_index_t *)s1;
struct man_index_t *m2 = (struct man_index_t *)s2;
@@ -1198,11 +1198,11 @@ private:
-void MANProtocol::showIndex(const QString& section)
+void MANProtocol::showIndex(const TQString& section)
{
- QByteArray array;
- QTextStream os(array, IO_WriteOnly);
- os.setEncoding(QTextStream::UnicodeUTF8);
+ TQByteArray array;
+ TQTextStream os(array, IO_WriteOnly);
+ os.setEncoding(TQTextStream::UnicodeUTF8);
// print header
os << "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Strict//EN\">" << endl;
@@ -1220,9 +1220,9 @@ void MANProtocol::showIndex(const QString& section)
infoMessage(i18n("Generating Index"));
// search for the man pages
- QStringList pages = findPages( section, QString::null );
+ TQStringList pages = findPages( section, TQString::null );
- QMap<QString, QString> indexmap = buildIndexMap(section);
+ TQMap<TQString, TQString> indexmap = buildIndexMap(section);
// print out the list
os << "<table>" << endl;
@@ -1230,12 +1230,12 @@ void MANProtocol::showIndex(const QString& section)
#ifdef _USE_OLD_CODE
pages.sort();
- QMap<QString, QString> pagemap;
+ TQMap<TQString, TQString> pagemap;
- QStringList::ConstIterator page;
+ TQStringList::ConstIterator page;
for (page = pages.begin(); page != pages.end(); ++page)
{
- QString fileName = *page;
+ TQString fileName = *page;
stripExtension( &fileName );
@@ -1248,7 +1248,7 @@ void MANProtocol::showIndex(const QString& section)
}
- for (QMap<QString,QString>::ConstIterator it = pagemap.begin();
+ for (TQMap<TQString,TQString>::ConstIterator it = pagemap.begin();
it != pagemap.end(); ++it)
{
os << "<tr><td><a href=\"man:" << it.data() << "\">\n"
@@ -1272,7 +1272,7 @@ void MANProtocol::showIndex(const QString& section)
#endif /* _USE_QSORT */
- QStringList::const_iterator page;
+ TQStringList::const_iterator page;
for (page = pages.begin(); page != pages.end(); ++page)
{
// I look for the beginning of the man page name
@@ -1366,13 +1366,13 @@ void MANProtocol::showIndex(const QString& section)
// sort and print
qsort(indexlist, listlen, sizeof(struct man_index_t *), compare_man_index);
- QChar firstchar, tmp;
- QString indexLine="<div class=\"secidxshort\">\n";
+ TQChar firstchar, tmp;
+ TQString indexLine="<div class=\"secidxshort\">\n";
if (indexlist[0]->manpage_len>0)
{
- firstchar=QChar((indexlist[0]->manpage_begin)[0]).lower();
+ firstchar=TQChar((indexlist[0]->manpage_begin)[0]).lower();
- const QString appendixstr = QString(
+ const TQString appendixstr = TQString(
" [<a href=\"#%1\" accesskey=\"%2\">%3</a>]\n"
).arg(firstchar).arg(firstchar).arg(firstchar);
indexLine.append(appendixstr);
@@ -1397,14 +1397,14 @@ void MANProtocol::showIndex(const QString& section)
continue;
}
- tmp=QChar((manindex->manpage_begin)[0]).lower();
+ tmp=TQChar((manindex->manpage_begin)[0]).lower();
if (firstchar != tmp)
{
firstchar = tmp;
os << "<tr><td class=\"secidxnextletter\"" << " colspan=\"3\">\n <a name=\""
<< firstchar << "\">" << firstchar << "</a>\n</td></tr>" << endl;
- const QString appendixstr = QString(
+ const TQString appendixstr = TQString(
" [<a href=\"#%1\" accesskey=\"%2\">%3</a>]\n"
).arg(firstchar).arg(firstchar).arg(firstchar);
indexLine.append(appendixstr);
@@ -1471,7 +1471,7 @@ void MANProtocol::showIndex(const QString& section)
// print footer
os << "</body></html>" << endl;
- infoMessage(QString::null);
+ infoMessage(TQString::null);
mimeType("text/html");
data(array);
finished();
@@ -1481,15 +1481,15 @@ void MANProtocol::listDir(const KURL &url)
{
kdDebug( 7107 ) << "ENTER listDir: " << url.prettyURL() << endl;
- QString title;
- QString section;
+ TQString title;
+ TQString section;
if ( !parseUrl(url.path(), title, section) ) {
error( KIO::ERR_MALFORMED_URL, url.url() );
return;
}
- QStringList list = findPages( section, QString::null, false );
+ TQStringList list = findPages( section, TQString::null, false );
UDSEntryList uds_entry_list;
UDSEntry uds_entry;
@@ -1498,8 +1498,8 @@ void MANProtocol::listDir(const KURL &url)
uds_atom.m_uds = KIO::UDS_NAME; // we only do names...
uds_entry.append( uds_atom );
- QStringList::Iterator it = list.begin();
- QStringList::Iterator end = list.end();
+ TQStringList::Iterator it = list.begin();
+ TQStringList::Iterator end = list.end();
for ( ; it != end; ++it ) {
stripExtension( &(*it) );
@@ -1522,7 +1522,7 @@ void MANProtocol::getProgramPath()
return;
/* sgml2roff isn't found in PATH. Check some possible locations where it may be found. */
- mySgml2RoffPath = KGlobal::dirs()->findExe("sgml2roff", QString(SGML2ROFF_DIRS));
+ mySgml2RoffPath = KGlobal::dirs()->findExe("sgml2roff", TQString(SGML2ROFF_DIRS));
if (!mySgml2RoffPath.isEmpty())
return;
diff --git a/kioslave/man/kio_man.h b/kioslave/man/kio_man.h
index d1d924ce0..617245f80 100644
--- a/kioslave/man/kio_man.h
+++ b/kioslave/man/kio_man.h
@@ -21,24 +21,24 @@
#define __kio_man_h__
-#include <qstring.h>
-#include <qcstring.h>
-#include <qstringlist.h>
-#include <qdict.h>
-#include <qbuffer.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
+#include <tqbuffer.h>
#include <kio/global.h>
#include <kio/slavebase.h>
-class MANProtocol : public QObject, public KIO::SlaveBase
+class MANProtocol : public TQObject, public KIO::SlaveBase
{
Q_OBJECT
public:
- MANProtocol(const QCString &pool_socket, const QCString &app_socket);
+ MANProtocol(const TQCString &pool_socket, const TQCString &app_socket);
virtual ~MANProtocol();
virtual void get(const KURL& url);
@@ -47,11 +47,11 @@ public:
virtual void mimetype(const KURL &url);
virtual void listDir(const KURL &url);
- void outputError(const QString& errmsg);
- void outputMatchingPages(const QStringList &matchingPages);
+ void outputError(const TQString& errmsg);
+ void outputMatchingPages(const TQStringList &matchingPages);
void showMainIndex();
- void showIndex(const QString& section);
+ void showIndex(const TQString& section);
// the following two functions are the interface to man2html
void output(const char *insert);
@@ -65,35 +65,35 @@ private slots:
private:
void checkManPaths();
- QStringList manDirectories();
- QMap<QString, QString> buildIndexMap(const QString& section);
- bool addWhatIs(QMap<QString, QString>& i, const QString& f, const QString& mark);
- void parseWhatIs( QMap<QString, QString> &i, QTextStream &t, const QString &mark );
- QStringList findPages(const QString& section,
- const QString &title,
+ TQStringList manDirectories();
+ TQMap<TQString, TQString> buildIndexMap(const TQString& section);
+ bool addWhatIs(TQMap<TQString, TQString>& i, const TQString& f, const TQString& mark);
+ void parseWhatIs( TQMap<TQString, TQString> &i, TQTextStream &t, const TQString &mark );
+ TQStringList findPages(const TQString& section,
+ const TQString &title,
bool full_path = true);
void addToBuffer(const char *buffer, int buflen);
- QString pageName(const QString& page) const;
- QStringList buildSectionList(const QStringList& dirs) const;
- void constructPath(QStringList& constr_path, QStringList constr_catmanpath);
+ TQString pageName(const TQString& page) const;
+ TQStringList buildSectionList(const TQStringList& dirs) const;
+ void constructPath(TQStringList& constr_path, TQStringList constr_catmanpath);
private:
static MANProtocol *_self;
- QCString lastdir;
+ TQCString lastdir;
- void findManPagesInSection(const QString &dir, const QString &title, bool full_path, QStringList &list);
- QStringList m_manpath; ///< Path of man directories
- QStringList m_mandbpath; ///< Path of catman directories
- QStringList section_names;
+ void findManPagesInSection(const TQString &dir, const TQString &title, bool full_path, TQStringList &list);
+ TQStringList m_manpath; ///< Path of man directories
+ TQStringList m_mandbpath; ///< Path of catman directories
+ TQStringList section_names;
- QString myStdStream;
- QString mySgml2RoffPath;
+ TQString myStdStream;
+ TQString mySgml2RoffPath;
void getProgramPath();
- QCString m_htmlPath; ///< Path to KDE resources, encoded for HTML
- QCString m_cssPath; ///< Path to KDE resources, encoded for CSS
- QBuffer m_outputBuffer; ///< Buffer for the output
- QString m_manCSSFile; ///< Path to kio_man.css
+ TQCString m_htmlPath; ///< Path to KDE resources, encoded for HTML
+ TQCString m_cssPath; ///< Path to KDE resources, encoded for CSS
+ TQBuffer m_outputBuffer; ///< Buffer for the output
+ TQString m_manCSSFile; ///< Path to kio_man.css
};
diff --git a/kioslave/man/kio_man_test.cpp b/kioslave/man/kio_man_test.cpp
index bfb78a652..44623cb9f 100644
--- a/kioslave/man/kio_man_test.cpp
+++ b/kioslave/man/kio_man_test.cpp
@@ -1,6 +1,6 @@
-#include <qobject.h>
+#include <tqobject.h>
#include "kio_man.h"
@@ -14,7 +14,7 @@ class kio_man_test : public MANProtocol
Q_OBJECT
public:
- kio_man_test(const QCString &pool_socket, const QCString &app_socket);
+ kio_man_test(const TQCString &pool_socket, const TQCString &app_socket);
protected:
virtual void data(int);
diff --git a/kioslave/man/kmanpart.cpp b/kioslave/man/kmanpart.cpp
index 307a8c6b2..b52085596 100644
--- a/kioslave/man/kmanpart.cpp
+++ b/kioslave/man/kmanpart.cpp
@@ -18,7 +18,7 @@
*/
#include "kmanpart.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <kinstance.h>
#include <kglobal.h>
@@ -39,7 +39,7 @@ extern "C"
KInstance* KManPartFactory::s_instance = 0L;
KAboutData* KManPartFactory::s_about = 0L;
-KManPartFactory::KManPartFactory( QObject* parent, const char* name )
+KManPartFactory::KManPartFactory( TQObject* parent, const char* name )
: KParts::Factory( parent, name )
{}
@@ -50,8 +50,8 @@ KManPartFactory::~KManPartFactory()
delete s_about;
}
-KParts::Part* KManPartFactory::createPartObject( QWidget * parentWidget, const char* /*widgetName*/, QObject *,
- const char* name, const char* /*className*/,const QStringList & )
+KParts::Part* KManPartFactory::createPartObject( TQWidget * parentWidget, const char* /*widgetName*/, TQObject *,
+ const char* name, const char* /*className*/,const TQStringList & )
{
KManPart* part = new KManPart(parentWidget, name );
return part;
@@ -69,7 +69,7 @@ KInstance* KManPartFactory::instance()
}
-KManPart::KManPart( QWidget * parent, const char * name )
+KManPart::KManPart( TQWidget * parent, const char * name )
: KHTMLPart( parent, name )
,m_job(0)
{
@@ -95,12 +95,12 @@ bool KManPart::openFile()
url.setPath( m_file );
m_job = KIO::get( url, true, false );
- connect( m_job, SIGNAL( data( KIO::Job *, const QByteArray &) ), SLOT( readData( KIO::Job *, const QByteArray &) ) );
- connect( m_job, SIGNAL( result( KIO::Job * ) ), SLOT( jobDone( KIO::Job * ) ) );
+ connect( m_job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray &) ), TQT_SLOT( readData( KIO::Job *, const TQByteArray &) ) );
+ connect( m_job, TQT_SIGNAL( result( KIO::Job * ) ), TQT_SLOT( jobDone( KIO::Job * ) ) );
return true;
}
-void KManPart::readData(KIO::Job * , const QByteArray & data)
+void KManPart::readData(KIO::Job * , const TQByteArray & data)
{
write(data,data.size());
}
diff --git a/kioslave/man/kmanpart.h b/kioslave/man/kmanpart.h
index f68b68784..f2d9e3891 100644
--- a/kioslave/man/kmanpart.h
+++ b/kioslave/man/kmanpart.h
@@ -28,7 +28,7 @@
#include <kio/job.h>
#include <kio/jobclasses.h>
-#include <qcstring.h>
+#include <tqcstring.h>
class KInstance;
class KAboutData;
@@ -41,12 +41,12 @@ class KManPartFactory: public KParts::Factory
{
Q_OBJECT
public:
- KManPartFactory( QObject * parent = 0, const char * name = 0 );
+ KManPartFactory( TQObject * parent = 0, const char * name = 0 );
virtual ~KManPartFactory();
- virtual KParts::Part* createPartObject( QWidget * parentWidget, const char * widgetName ,
- QObject* parent, const char* name, const char * classname,
- const QStringList &args);
+ virtual KParts::Part* createPartObject( TQWidget * parentWidget, const char * widgetName ,
+ TQObject* parent, const char* name, const char * classname,
+ const TQStringList &args);
static KInstance * instance();
@@ -60,13 +60,13 @@ class KManPart : public KHTMLPart
{
Q_OBJECT
public:
- KManPart( QWidget * parent, const char * name = 0L );
+ KManPart( TQWidget * parent, const char * name = 0L );
KParts::BrowserExtension * extension() {return m_extension;}
public slots:
virtual bool openURL( const KURL &url );
protected slots:
- void readData(KIO::Job * , const QByteArray & data);
+ void readData(KIO::Job * , const TQByteArray & data);
void jobDone( KIO::Job *);
protected:
virtual bool openFile();
diff --git a/kioslave/man/man2html.cpp b/kioslave/man/man2html.cpp
index b502e8edc..089ba239b 100644
--- a/kioslave/man/man2html.cpp
+++ b/kioslave/man/man2html.cpp
@@ -130,11 +130,11 @@
#include <stdio.h>
-#include <qvaluestack.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qdatetime.h>
+#include <tqvaluestack.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqdatetime.h>
#ifdef SIMPLE_MAN2HTML
# include <stdlib.h>
@@ -144,7 +144,7 @@
# define kdDebug(x) cerr
# define kdWarning(x) cerr << "WARNING "
#else
-# include <qtextcodec.h>
+# include <tqtextcodec.h>
# include <kdebug.h>
# include <kdeversion.h>
#endif
@@ -233,7 +233,7 @@ public:
StringDefinition( int len, const char* cstr ) : m_length( len ), m_output( cstr ) {}
public:
int m_length; ///< Length of output text
- QCString m_output; ///< Defined string
+ TQCString m_output; ///< Defined string
};
/**
@@ -255,19 +255,19 @@ class NumberDefinition
/**
* Map of character definitions
*/
-static QMap<QCString,StringDefinition> s_characterDefinitionMap;
+static TQMap<TQCString,StringDefinition> s_characterDefinitionMap;
/**
* Map of string variable and macro definitions
* \note String variables and macros are the same thing!
*/
-static QMap<QCString,StringDefinition> s_stringDefinitionMap;
+static TQMap<TQCString,StringDefinition> s_stringDefinitionMap;
/**
* Map of number registers
* \note Intern number registers (starting with a dot are not handled here)
*/
-static QMap<QCString,NumberDefinition> s_numberDefinitionMap;
+static TQMap<TQCString,NumberDefinition> s_numberDefinitionMap;
static void fill_old_character_definitions( void );
@@ -319,7 +319,7 @@ static void InitStringDefinitions( void )
// \*S "Change to default font size"
#ifndef SIMPLE_MAN2HTML
// Special KDE KIO man:
- const QCString kdeversion(KDE_VERSION_STRING);
+ const TQCString kdeversion(KDE_VERSION_STRING);
s_stringDefinitionMap.insert( ".KDE_VERSION_STRING", StringDefinition( kdeversion.length(), kdeversion ) );
#endif
}
@@ -332,7 +332,7 @@ static void InitNumberDefinitions( void )
{
// As the date number registers are more for end-users, better choose local time.
// Groff seems to support Gregorian dates only
- QDate today( QDate::currentDate( Qt::LocalTime ) );
+ TQDate today( TQDate::currentDate( Qt::LocalTime ) );
s_numberDefinitionMap.insert( "year", today.year() ); // Y2K-correct year
s_numberDefinitionMap.insert( "yr", today.year() - 1900 ); // Y2K-incorrect year
s_numberDefinitionMap.insert( "mo", today.month() );
@@ -639,13 +639,13 @@ static int curpos=0;
static char *scan_troff(char *c, bool san, char **result);
static char *scan_troff_mandoc(char *c, bool san, char **result);
-static QValueList<char*> s_argumentList;
+static TQValueList<char*> s_argumentList;
-static QCString htmlPath, cssPath;
+static TQCString htmlPath, cssPath;
-static QCString s_dollarZero; // Value of $0
+static TQCString s_dollarZero; // Value of $0
-void setResourcePath(const QCString& _htmlPath, const QCString& _cssPath)
+void setResourcePath(const TQCString& _htmlPath, const TQCString& _cssPath)
{
htmlPath=_htmlPath;
cssPath=_cssPath;
@@ -657,7 +657,7 @@ static void fill_old_character_definitions( void )
{
const int nr = standardchar[i].nr;
const char temp[3] = { nr / 256, nr % 256, 0 };
- QCString name( temp );
+ TQCString name( temp );
s_characterDefinitionMap.insert( name, StringDefinition( standardchar[i].slen, standardchar[i].st ) );
}
}
@@ -733,11 +733,11 @@ static void add_links(char *c)
if (g!=c) {
- QCString dir;
- QCString file(g, h - g + 1);
+ TQCString dir;
+ TQCString file(g, h - g + 1);
file = file.stripWhiteSpace();
for (int index = 0; includedirs[index]; index++) {
- QCString str = QCString(includedirs[index]) + "/" + file;
+ TQCString str = TQCString(includedirs[index]) + "/" + file;
if (!access(str, R_OK)) {
dir = includedirs[index];
break;
@@ -751,7 +751,7 @@ static void add_links(char *c)
output_real(c);
*g=t;*h=0;
- QCString str;
+ TQCString str;
str.sprintf("<A HREF=\"file:%s/%s\">%s</A>&gt;", dir.data(), file.data(), file.data());
output_real(str.data());
c=f+6;
@@ -817,8 +817,8 @@ static void add_links(char *c)
}
if (isalnum(*h)) {
char t,sec, *e;
- QString subsec; // ### TODO avoid using QString, as we do not know the encoding
- QString fstr(f); // ### TODO avoid using QString, as we do not know the encoding
+ TQString subsec; // ### TODO avoid using TQString, as we do not know the encoding
+ TQString fstr(f); // ### TODO avoid using TQString, as we do not know the encoding
e=h+1;
sec=f[1];
subsec=f[2];
@@ -836,7 +836,7 @@ static void add_links(char *c)
*h=t;
t=*e;
*e='\0';
- QCString str;
+ TQCString str;
if (subsec.isEmpty())
str.sprintf("<A HREF=\"man:%s(%c)\">%s</A>", h, sec, h);
else
@@ -863,7 +863,7 @@ static void add_links(char *c)
t=*f; *f='\0';
output_real(c);
*f=t; t=*g;*g='\0';
- QCString str;
+ TQCString str;
str.sprintf("<A HREF=\"%s://%s\">%s</A>", ((j==3)?"ftp":"http"), f, f);
output_real(str.data());
*g=t;
@@ -895,7 +895,7 @@ static void add_links(char *c)
*g='\0';
output_real(c);
*g=t;t=*h;*h='\0';
- QCString str;
+ TQCString str;
str.sprintf("<A HREF=\"mailto:%s\">%s</A>", g, g);
output_real(str.data());
*h=t;
@@ -920,7 +920,7 @@ static void add_links(char *c)
*g='\0';
output_real(c);
*g=t; t=*h; *h='\0';
- QCString str;
+ TQCString str;
str.sprintf("<A HREF=\"%s\">%s</A>", g, g);
output_real(str.data());
*h=t;
@@ -947,7 +947,7 @@ static void add_links(char *c)
output_real(c);
}
-static QCString current_font;
+static TQCString current_font;
static int current_size=0;
static int fillout=1;
@@ -1007,10 +1007,10 @@ static void out_html(const char *c)
delete [] c3;
}
-static QCString set_font( const QCString& name )
+static TQCString set_font( const TQCString& name )
{
// Every font but R (Regular) creates <span> elements
- QCString markup;
+ TQCString markup;
if ( current_font != "R" && !current_font.isEmpty() )
markup += "</span>";
const uint len = name.length();
@@ -1075,18 +1075,18 @@ static QCString set_font( const QCString& name )
}
/// \deprecated
-static QCString set_font( const char ch )
+static TQCString set_font( const char ch )
#ifndef SIMPLE_MAN2HTML
KDE_DEPRECATED;
-static QCString set_font( const char ch )
+static TQCString set_font( const char ch )
#endif
{
- const QCString name = &ch;
+ const TQCString name = &ch;
return set_font( name );
}
-static QCString change_to_size(int nr)
+static TQCString change_to_size(int nr)
{
switch (nr)
{
@@ -1097,8 +1097,8 @@ static QCString change_to_size(int nr)
}
if ( nr == current_size )
return "";
- const QCString font ( current_font );
- QCString markup;
+ const TQCString font ( current_font );
+ TQCString markup;
markup = set_font("R");
if (current_size)
markup += "</FONT>";
@@ -1128,21 +1128,21 @@ static int intresult=0;
static bool skip_escape=false;
static bool single_escape=false;
-static char *scan_escape_direct( char *c, QCString& cstr );
+static char *scan_escape_direct( char *c, TQCString& cstr );
/**
* scan a named character
* param c position
*/
-static QCString scan_named_character( char*& c )
+static TQCString scan_named_character( char*& c )
{
- QCString name;
+ TQCString name;
if ( *c == '(' )
{
// \*(ab Name of two characters
if ( c[1] == escapesym )
{
- QCString cstr;
+ TQCString cstr;
c = scan_escape_direct( c+2, cstr );
// ### HACK: as we convert characters too early to HTML, we need to support more than 2 characters here and assume that all characters passed by the variable are to be used.
name = cstr;
@@ -1164,7 +1164,7 @@ static QCString scan_named_character( char*& c )
{
if ( *c == escapesym )
{
- QCString cstr;
+ TQCString cstr;
c = scan_escape_direct( c+1, cstr );
const int result = cstr.find(']');
if ( result == -1 )
@@ -1196,7 +1196,7 @@ static QCString scan_named_character( char*& c )
{
if ( *c == escapesym )
{
- QCString cstr;
+ TQCString cstr;
c = scan_escape_direct( c+1, cstr );
const int result = cstr.find('\'');
if ( result == -1 )
@@ -1223,7 +1223,7 @@ static QCString scan_named_character( char*& c )
// Note: characters with a one character length name doe not exist, as they would collide with other escapes
// Now we have the name, let us find it between the string names
- QMap<QCString,StringDefinition>::iterator it=s_characterDefinitionMap.find(name);
+ TQMap<TQCString,StringDefinition>::iterator it=s_characterDefinitionMap.find(name);
if (it==s_characterDefinitionMap.end())
{
kdDebug(7107) << "EXCEPTION: cannot find character with name: " << name << endl;
@@ -1237,15 +1237,15 @@ static QCString scan_named_character( char*& c )
}
}
-static QCString scan_named_string(char*& c)
+static TQCString scan_named_string(char*& c)
{
- QCString name;
+ TQCString name;
if ( *c == '(' )
{
// \*(ab Name of two characters
if ( c[1] == escapesym )
{
- QCString cstr;
+ TQCString cstr;
c = scan_escape_direct( c+2, cstr );
kdDebug(7107) << "\\(" << cstr << endl;
// ### HACK: as we convert characters too early to HTML, we need to support more than 2 characters here and assume that all characters passed by the variable are to be used.
@@ -1268,7 +1268,7 @@ static QCString scan_named_string(char*& c)
{
if ( *c == escapesym )
{
- QCString cstr;
+ TQCString cstr;
c = scan_escape_direct( c+1, cstr );
const int result = cstr.find(']');
if ( result == -1 )
@@ -1299,7 +1299,7 @@ static QCString scan_named_string(char*& c)
c++;
}
// Now we have the name, let us find it between the string names
- QMap<QCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
+ TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
if (it==s_stringDefinitionMap.end())
{
kdDebug(7107) << "EXCEPTION: cannot find string with name: " << name << endl;
@@ -1313,7 +1313,7 @@ static QCString scan_named_string(char*& c)
}
}
-static QCString scan_dollar_parameter(char*& c)
+static TQCString scan_dollar_parameter(char*& c)
{
unsigned int argno = 0; // No dollar argument number yet!
if ( *c == '0' )
@@ -1367,8 +1367,8 @@ static QCString scan_dollar_parameter(char*& c)
else if ( ( *c == '*' ) || ( *c == '@' ) )
{
const bool quote = ( *c == '@' );
- QValueList<char*>::const_iterator it = s_argumentList.begin();
- QCString param;
+ TQValueList<char*>::const_iterator it = s_argumentList.begin();
+ TQCString param;
bool space = false;
for ( ; it != s_argumentList.end(); ++it )
{
@@ -1406,7 +1406,7 @@ static QCString scan_dollar_parameter(char*& c)
}
/// return the value of read-only number registers
-static int read_only_number_register( const QCString& name )
+static int read_only_number_register( const TQCString& name )
{
// Internal read-only variables
if ( name == ".$" )
@@ -1459,7 +1459,7 @@ static int scan_number_register( char*& c)
case '-': sign = -1; c++; break;
default: break;
}
- QCString name;
+ TQCString name;
if ( *c == '[' )
{
c++;
@@ -1514,7 +1514,7 @@ static int scan_number_register( char*& c)
}
else
{
- QMap< QCString, NumberDefinition >::iterator it = s_numberDefinitionMap.find( name );
+ TQMap< TQCString, NumberDefinition >::iterator it = s_numberDefinitionMap.find( name );
if ( it == s_numberDefinitionMap.end() )
{
return 0; // Undefined variable
@@ -1528,15 +1528,15 @@ static int scan_number_register( char*& c)
}
/// get and set font
-static QCString scan_named_font( char*& c )
+static TQCString scan_named_font( char*& c )
{
- QCString name;
+ TQCString name;
if ( *c == '(' )
{
// \f(ab Name of two characters
if ( c[1] == escapesym )
{
- QCString cstr;
+ TQCString cstr;
c = scan_escape_direct( c+2, cstr );
kdDebug(7107) << "\\(" << cstr << endl;
// ### HACK: as we convert characters too early to HTML, we need to support more than 2 characters here and assume that all characters passed by the variable are to be used.
@@ -1558,7 +1558,7 @@ static QCString scan_named_font( char*& c )
{
if ( *c == escapesym )
{
- QCString cstr;
+ TQCString cstr;
c = scan_escape_direct( c+1, cstr );
const int result = cstr.find(']');
if ( result == -1 )
@@ -1617,9 +1617,9 @@ static QCString scan_named_font( char*& c )
return "";
}
-static QCString scan_number_code( char*& c )
+static TQCString scan_number_code( char*& c )
{
- QCString number;
+ TQCString number;
if ( *c != '\'' )
return "";
while ( *c && ( *c != '\n' ) && ( *c != '\'' ) )
@@ -1647,7 +1647,7 @@ static QCString scan_number_code( char*& c )
// ### TODO known missing escapes from groff(7):
// ### TODO \& \! \) \: \R
-static char *scan_escape_direct( char *c, QCString& cstr )
+static char *scan_escape_direct( char *c, TQCString& cstr )
{
bool exoutputp;
bool exskipescape;
@@ -1682,7 +1682,7 @@ static char *scan_escape_direct( char *c, QCString& cstr )
c--;
}
else
- cstr = QCString( c, 1 );
+ cstr = TQCString( c, 1 );
break;
}
case 'k': c++; if (*c=='(') c+=2; // ### FIXME \k[REG] exists too
@@ -1807,7 +1807,7 @@ static char *scan_escape_direct( char *c, QCString& cstr )
if (*++c) c++; // c += 2
if (sscanf(c, "%d", &i) != 1) // (### FIXME ugly!)
break;
- QCString temp;
+ TQCString temp;
temp.sprintf( "%d", i ); // Skip over number (### FIXME ugly!)
c += temp.length();
switch(i) {
@@ -1831,7 +1831,7 @@ static char *scan_escape_direct( char *c, QCString& cstr )
static char *scan_escape(char *c)
{
- QCString cstr;
+ TQCString cstr;
char* result = scan_escape_direct( c, cstr );
if ( !skip_escape )
out_html(cstr);
@@ -1916,7 +1916,7 @@ public:
TABLEROW *prev, *next;
private:
- QPtrList<TABLEITEM> items;
+ TQPtrList<TABLEITEM> items;
};
TABLEITEM::TABLEITEM(TABLEROW *row) : contents(0), _parent(row) {
@@ -1927,7 +1927,7 @@ TABLEITEM::TABLEITEM(TABLEROW *row) : contents(0), _parent(row) {
TABLEROW *TABLEROW::copyLayout() const {
TABLEROW *newrow = new TABLEROW();
- QPtrListIterator<TABLEITEM> it(items);
+ TQPtrListIterator<TABLEITEM> it(items);
for ( ; it.current(); ++it) {
TABLEITEM *newitem = new TABLEITEM(newrow);
newitem->copyLayout(it.current());
@@ -2063,7 +2063,7 @@ static char *scan_table(char *c)
char *g;
int center=0, expand=0, box=0, border=0, linesize=1;
int i,j,maxcol=0, finished=0;
- QCString oldfont;
+ TQCString oldfont;
int oldsize,oldfillout;
char itemsep='\t';
TABLEROW *layout=NULL, *currow;
@@ -2775,8 +2775,8 @@ static void request_while( char*& c, int j, bool mdoc )
char* newline = skip_till_newline( c );
const char oldchar = *newline;
*newline = 0;
- // We store the full .while stuff into a QCString as if it would be a macro
- const QCString macro = c ;
+ // We store the full .while stuff into a TQCString as if it would be a macro
+ const TQCString macro = c ;
kdDebug(7107) << "'Macro' of .while" << endl << macro << endl;
// Prepare for continuing after .while loop end
*newline = oldchar;
@@ -3039,7 +3039,7 @@ static int get_request(char *req, int len)
// &%(#@ c programs !!!
//static int ifelseval=0;
// If/else can be nested!
-static QValueStack<int> s_ifelseval;
+static TQValueStack<int> s_ifelseval;
// Process a (mdoc) request involving quotes
static char* process_quote(char* c, int j, const char* open, const char* close)
@@ -3088,7 +3088,7 @@ static bool is_identifier_char( const char c )
return false;
}
-static QCString scan_identifier( char*& c )
+static TQCString scan_identifier( char*& c )
{
char* h = c; // help pointer
// ### TODO Groff seems to eat nearly everything as identifier name (info:/groff/Identifiers)
@@ -3096,7 +3096,7 @@ static QCString scan_identifier( char*& c )
++h;
const char tempchar = *h;
*h = 0;
- const QCString name = c;
+ const TQCString name = c;
*h = tempchar;
if ( name.isEmpty() )
{
@@ -3140,7 +3140,7 @@ static char *scan_request(char *c)
else
{
int nlen = 0;
- QCString macroName;
+ TQCString macroName;
while (c[nlen] && (c[nlen] != ' ') && (c[nlen] != '\t') && (c[nlen] != '\n') && (c[nlen] != escapesym))
{
macroName+=c[nlen];
@@ -3149,11 +3149,11 @@ static char *scan_request(char *c)
int j = nlen;
while (c[j] && c[j]==' ' || c[j]=='\t') j++;
/* search macro database of self-defined macros */
- QMap<QCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(macroName);
+ TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(macroName);
if (it!=s_stringDefinitionMap.end())
{
kdDebug(7107) << "CALLING MACRO: " << macroName << endl;
- const QCString oldDollarZero = s_dollarZero; // Previous value of $0
+ const TQCString oldDollarZero = s_dollarZero; // Previous value of $0
s_dollarZero = macroName;
sl=fill_words(c+j, wordlist, &words, true, &c);
*sl='\0';
@@ -3176,7 +3176,7 @@ static char *scan_request(char *c)
char* work = new char [length+2];
work[0] = '\n'; // The macro must start after an end of line to allow a request on first line
qstrncpy(work+1,(*it).m_output.data(),length+1);
- const QValueList<char*> oldArgumentList( s_argumentList );
+ const TQValueList<char*> oldArgumentList( s_argumentList );
s_argumentList.clear();
for ( i = 0 ; i < max_wordlist; i++ )
{
@@ -3233,7 +3233,7 @@ static char *scan_request(char *c)
++c;
break;
}
- const QCString name ( scan_identifier( c ) );
+ const TQCString name ( scan_identifier( c ) );
while (*c && *c!='\n') c++;
c++;
h=c;
@@ -3241,7 +3241,7 @@ static char *scan_request(char *c)
*c='\0';
char* result=0;
scan_troff(h,0,&result);
- QMap<QCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
+ TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
if (it==s_stringDefinitionMap.end())
{
StringDefinition def;
@@ -3267,7 +3267,7 @@ static char *scan_request(char *c)
kdDebug(7107) << "start .ds/.as" << endl;
int oldcurpos=curpos;
c+=j;
- const QCString name( scan_identifier( c) );
+ const TQCString name( scan_identifier( c) );
if ( name.isEmpty() )
break;
while (*c && isspace(*c)) c++;
@@ -3276,7 +3276,7 @@ static char *scan_request(char *c)
curpos=0;
char* result=0;
c=scan_troff(c,1,&result);
- QMap<QCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
+ TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
if (it==s_stringDefinitionMap.end())
{
StringDefinition def;
@@ -3424,7 +3424,7 @@ static char *scan_request(char *c)
h = skip_till_newline( c );
const char oldChar = *h;
*h = 0;
- const QCString name = c;
+ const TQCString name = c;
// ### TODO: name might contain a variable
if ( name.isEmpty() )
out_html( set_font( "P" ) ); // Previous font
@@ -4075,7 +4075,7 @@ static char *scan_request(char *c)
#else
// kio_man transforms from local to UTF-8
out_html("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=");
- out_html(QTextCodec::codecForLocale()->mimeName());
+ out_html(TQTextCodec::codecForLocale()->mimeName());
out_html("\">\n");
#endif
out_html("<TITLE>");
@@ -4163,13 +4163,13 @@ static char *scan_request(char *c)
{
kdDebug(7107) << "start .rm/.rn" << endl;
c+=j;
- const QCString name( scan_identifier( c ) );
+ const TQCString name( scan_identifier( c ) );
if ( name.isEmpty() )
{
kdDebug(7107) << "EXCEPTION: empty origin string to remove/rename: " << endl;
break;
}
- QCString name2;
+ TQCString name2;
if ( !mode )
{
while (*c && isspace(*c) && *c!='\n') ++c;
@@ -4181,7 +4181,7 @@ static char *scan_request(char *c)
}
}
c=skip_till_newline(c);
- QMap<QCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
+ TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
if (it==s_stringDefinitionMap.end())
{
kdDebug(7107) << "EXCEPTION: cannot find string to rename or remove: " << name << endl;
@@ -4216,7 +4216,7 @@ static char *scan_request(char *c)
{
kdDebug(7107) << "start .nr" << endl;
c += j;
- const QCString name( scan_identifier( c ) );
+ const TQCString name( scan_identifier( c ) );
if ( name.isEmpty() )
{
kdDebug(7107) << "EXCEPTION: empty name for register variable" << endl;
@@ -4240,7 +4240,7 @@ static char *scan_request(char *c)
c=scan_expression( c, &increment );
}
c = skip_till_newline( c );
- QMap <QCString, NumberDefinition>::iterator it = s_numberDefinitionMap.find( name );
+ TQMap <TQCString, NumberDefinition>::iterator it = s_numberDefinitionMap.find( name );
if ( it == s_numberDefinitionMap.end() )
{
if ( sign < 1 )
@@ -4277,9 +4277,9 @@ static char *scan_request(char *c)
c = nameStart;
while (*c && (*c != ' ') && (*c != '\n')) c++;
*c = '\0';
- const QCString name(nameStart);
+ const TQCString name(nameStart);
- QCString endmacro;
+ TQCString endmacro;
if (words == 1)
{
endmacro="..";
@@ -4297,7 +4297,7 @@ static char *scan_request(char *c)
while (*c && qstrncmp(c,endmacro,length))
c=skip_till_newline(c);
- QCString macro;
+ TQCString macro;
while (sl!=c)
{
if (sl[0]=='\\' && sl[1]=='\\')
@@ -4310,7 +4310,7 @@ static char *scan_request(char *c)
sl++;
}
- QMap<QCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
+ TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name);
if (it==s_stringDefinitionMap.end())
{
StringDefinition def;
@@ -5069,14 +5069,14 @@ static char *scan_request(char *c)
// Be careful: unlike .rn, the destination is first, origin is second
kdDebug(7107) << "start .als" << endl;
c+=j;
- const QCString name ( scan_identifier( c ) );
+ const TQCString name ( scan_identifier( c ) );
if ( name.isEmpty() )
{
kdDebug(7107) << "EXCEPTION: empty destination string to alias" << endl;
break;
}
while (*c && isspace(*c) && *c!='\n') ++c;
- const QCString name2 ( scan_identifier ( c ) );
+ const TQCString name2 ( scan_identifier ( c ) );
if ( name2.isEmpty() )
{
kdDebug(7107) << "EXCEPTION: empty origin string to alias" << endl;
@@ -5090,7 +5090,7 @@ static char *scan_request(char *c)
break;
}
// Second parametr is origin (unlike in .rn)
- QMap<QCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name2);
+ TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name2);
if (it==s_stringDefinitionMap.end())
{
kdDebug(7107) << "EXCEPTION: cannot find string to make alias: " << name2 << endl;
@@ -5107,14 +5107,14 @@ static char *scan_request(char *c)
{
kdDebug(7107) << "start .rr" << endl;
c += j;
- const QCString name ( scan_identifier( c ) );
+ const TQCString name ( scan_identifier( c ) );
if ( name.isEmpty() )
{
kdDebug(7107) << "EXCEPTION: empty origin string to remove/rename: " << endl;
break;
}
c = skip_till_newline( c );
- QMap <QCString, NumberDefinition>::iterator it = s_numberDefinitionMap.find( name );
+ TQMap <TQCString, NumberDefinition>::iterator it = s_numberDefinitionMap.find( name );
if ( it == s_numberDefinitionMap.end() )
{
kdDebug(7107) << "EXCEPTION: trying to remove inexistant number register: " << endl;
@@ -5130,21 +5130,21 @@ static char *scan_request(char *c)
{
kdDebug(7107) << "start .rnn" << endl;
c+=j;
- const QCString name ( scan_identifier ( c ) );
+ const TQCString name ( scan_identifier ( c ) );
if ( name.isEmpty() )
{
kdDebug(7107) << "EXCEPTION: empty origin to remove/rename number register" << endl;
break;
}
while (*c && isspace(*c) && *c!='\n') ++c;
- const QCString name2 ( scan_identifier ( c ) );
+ const TQCString name2 ( scan_identifier ( c ) );
if ( name2.isEmpty() )
{
kdDebug(7107) << "EXCEPTION: empty destination to rename number register " << endl;
break;
}
c = skip_till_newline( c );
- QMap<QCString,NumberDefinition>::iterator it=s_numberDefinitionMap.find(name);
+ TQMap<TQCString,NumberDefinition>::iterator it=s_numberDefinitionMap.find(name);
if (it==s_numberDefinitionMap.end())
{
kdDebug(7107) << "EXCEPTION: cannot find number register to rename: " << name << endl;
@@ -5167,14 +5167,14 @@ static char *scan_request(char *c)
// Be careful: unlike .rnn, the destination is first, origin is second
kdDebug(7107) << "start .aln" << endl;
c+=j;
- const QCString name ( scan_identifier( c ) );
+ const TQCString name ( scan_identifier( c ) );
if ( name.isEmpty() )
{
kdDebug(7107) << "EXCEPTION: empty destination number register to alias" << endl;
break;
}
while (*c && isspace(*c) && *c!='\n') ++c;
- const QCString name2 ( scan_identifier( c ) );
+ const TQCString name2 ( scan_identifier( c ) );
if ( name2.isEmpty() )
{
kdDebug(7107) << "EXCEPTION: empty origin number register to alias" << endl;
@@ -5188,7 +5188,7 @@ static char *scan_request(char *c)
break;
}
// Second parametr is origin (unlike in .rnn)
- QMap<QCString,NumberDefinition>::iterator it=s_numberDefinitionMap.find(name2);
+ TQMap<TQCString,NumberDefinition>::iterator it=s_numberDefinitionMap.find(name2);
if (it==s_numberDefinitionMap.end())
{
kdDebug(7107) << "EXCEPTION: cannot find string to make alias: " << name2 << endl;
@@ -5208,7 +5208,7 @@ static char *scan_request(char *c)
while (*h && *h!='\n' && isdigit(*h) ) ++h;
const char tempchar = *h;
*h = 0;
- const QCString number = c;
+ const TQCString number = c;
*h = tempchar;
c = skip_till_newline( h );
unsigned int result = 1; // Numbers of shifts to do
diff --git a/kioslave/man/man2html.h b/kioslave/man/man2html.h
index ab672c4e5..e4d19a87b 100644
--- a/kioslave/man/man2html.h
+++ b/kioslave/man/man2html.h
@@ -6,7 +6,7 @@
*
*/
-#include <qcstring.h>
+#include <tqcstring.h>
/** call this with the buffer you have */
void scan_man_page(const char *man_page);
@@ -19,7 +19,7 @@ void scan_man_page(const char *man_page);
* \since 3.5
*
*/
-extern void setResourcePath(const QCString& _htmlPath, const QCString& _cssPath);
+extern void setResourcePath(const TQCString& _htmlPath, const TQCString& _cssPath);
/** implement this somewhere. It will be called
with HTML contents
diff --git a/kioslave/media/kcmodule/main.cpp b/kioslave/media/kcmodule/main.cpp
index e431e95f8..da52ea119 100644
--- a/kioslave/media/kcmodule/main.cpp
+++ b/kioslave/media/kcmodule/main.cpp
@@ -19,8 +19,8 @@
#include "main.h"
-#include <qtabwidget.h>
-#include <qlayout.h>
+#include <tqtabwidget.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kaboutdata.h>
@@ -32,16 +32,16 @@
#include "managermodule.h"
-typedef KGenericFactory<MediaModule, QWidget> MediaFactory;
+typedef KGenericFactory<MediaModule, TQWidget> MediaFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_media, MediaFactory( "kcmmedia" ) )
-MediaModule::MediaModule( QWidget *parent, const char *name, const QStringList& )
+MediaModule::MediaModule( TQWidget *parent, const char *name, const TQStringList& )
: KCModule(MediaFactory::instance(), parent, name )
{
KGlobal::locale()->insertCatalogue("kio_media");
- QVBoxLayout *layout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
- QTabWidget *tab = new QTabWidget( this );
+ TQVBoxLayout *layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQTabWidget *tab = new TQTabWidget( this );
layout->addWidget( tab );
@@ -49,13 +49,13 @@ MediaModule::MediaModule( QWidget *parent, const char *name, const QStringList&
m_notifierModule = new NotifierModule( this, "notifier" );
tab->addTab( m_notifierModule, i18n( "&Notifications" ) );
- connect( m_notifierModule, SIGNAL( changed( bool ) ),
- this, SLOT( moduleChanged( bool ) ) );
+ connect( m_notifierModule, TQT_SIGNAL( changed( bool ) ),
+ this, TQT_SLOT( moduleChanged( bool ) ) );
m_managerModule = new ManagerModule( this, "manager" );
tab->addTab( m_managerModule, i18n( "&Advanced" ) );
- connect( m_managerModule, SIGNAL( changed( bool ) ),
- this, SLOT( moduleChanged( bool ) ) );
+ connect( m_managerModule, TQT_SIGNAL( changed( bool ) ),
+ this, TQT_SLOT( moduleChanged( bool ) ) );
@@ -95,7 +95,7 @@ void MediaModule::moduleChanged( bool state )
emit changed( state );
}
-QString MediaModule::quickHelp() const
+TQString MediaModule::quickHelp() const
{
return i18n("FIXME : Write me...");
}
diff --git a/kioslave/media/kcmodule/main.h b/kioslave/media/kcmodule/main.h
index 1ab909527..14e747bd9 100644
--- a/kioslave/media/kcmodule/main.h
+++ b/kioslave/media/kcmodule/main.h
@@ -27,12 +27,12 @@ class MediaModule : public KCModule
Q_OBJECT
public:
- MediaModule( QWidget *parent, const char *name, const QStringList& );
+ MediaModule( TQWidget *parent, const char *name, const TQStringList& );
virtual void load();
virtual void save();
virtual void defaults();
- virtual QString quickHelp() const;
+ virtual TQString quickHelp() const;
protected slots:
void moduleChanged( bool state );
diff --git a/kioslave/media/kcmodule/managermodule.cpp b/kioslave/media/kcmodule/managermodule.cpp
index e5f493d27..e0b30b90f 100644
--- a/kioslave/media/kcmodule/managermodule.cpp
+++ b/kioslave/media/kcmodule/managermodule.cpp
@@ -22,13 +22,13 @@
#include <klocale.h>
#include <dcopref.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kdirnotify_stub.h>
#include "managermoduleview.h"
#include "mediamanagersettings.h"
-ManagerModule::ManagerModule( QWidget* parent, const char* name )
+ManagerModule::ManagerModule( TQWidget* parent, const char* name )
: KCModule( parent, name )
{
ManagerModuleView *view = new ManagerModuleView( this );
@@ -36,14 +36,14 @@ ManagerModule::ManagerModule( QWidget* parent, const char* name )
addConfig( MediaManagerSettings::self(), view );
#ifndef COMPILE_HALBACKEND
- QString hal_text = view->kcfg_HalBackendEnabled->text();
+ TQString hal_text = view->kcfg_HalBackendEnabled->text();
hal_text += " ("+i18n("No support for HAL on this system")+")";
view->kcfg_HalBackendEnabled->setText( hal_text );
#endif
view->kcfg_HalBackendEnabled->setEnabled( false );
#ifndef COMPILE_LINUXCDPOLLING
- QString poll_text = view->kcfg_CdPollingEnabled->text();
+ TQString poll_text = view->kcfg_CdPollingEnabled->text();
poll_text += " ("+i18n("No support for CD polling on this system")+")";
view->kcfg_CdPollingEnabled->setText( poll_text );
#endif
diff --git a/kioslave/media/kcmodule/managermodule.h b/kioslave/media/kcmodule/managermodule.h
index 7fa3d649a..0b62dfc5e 100644
--- a/kioslave/media/kcmodule/managermodule.h
+++ b/kioslave/media/kcmodule/managermodule.h
@@ -26,7 +26,7 @@ class ManagerModule : public KCModule
Q_OBJECT
public:
- ManagerModule( QWidget* parent = 0, const char* name = 0);
+ ManagerModule( TQWidget* parent = 0, const char* name = 0);
void save();
};
diff --git a/kioslave/media/kcmodule/mimetypelistboxitem.cpp b/kioslave/media/kcmodule/mimetypelistboxitem.cpp
index 86460ed88..e7334248a 100644
--- a/kioslave/media/kcmodule/mimetypelistboxitem.cpp
+++ b/kioslave/media/kcmodule/mimetypelistboxitem.cpp
@@ -21,14 +21,14 @@
#include <kmimetype.h>
-MimetypeListBoxItem::MimetypeListBoxItem(const QString &mimetype, QListBox *parent)
- : QListBoxText(parent), m_mimetype(mimetype)
+MimetypeListBoxItem::MimetypeListBoxItem(const TQString &mimetype, TQListBox *parent)
+ : TQListBoxText(parent), m_mimetype(mimetype)
{
KMimeType::Ptr mime = KMimeType::mimeType( mimetype );
setText( mime->comment() );
}
-const QString &MimetypeListBoxItem::mimetype() const
+const TQString &MimetypeListBoxItem::mimetype() const
{
return m_mimetype;
}
diff --git a/kioslave/media/kcmodule/mimetypelistboxitem.h b/kioslave/media/kcmodule/mimetypelistboxitem.h
index fee215ecf..f61afba3d 100644
--- a/kioslave/media/kcmodule/mimetypelistboxitem.h
+++ b/kioslave/media/kcmodule/mimetypelistboxitem.h
@@ -20,18 +20,18 @@
#ifndef _MIMETYPELISTBOXITEM_H_
#define _MIMETYPELISTBOXITEM_H_
-#include <qlistbox.h>
-#include <qstring.h>
+#include <tqlistbox.h>
+#include <tqstring.h>
class MimetypeListBoxItem : public QListBoxText
{
public:
- MimetypeListBoxItem(const QString &mimetype, QListBox *parent);
+ MimetypeListBoxItem(const TQString &mimetype, TQListBox *parent);
- const QString &mimetype() const;
+ const TQString &mimetype() const;
private:
- QString m_mimetype;
+ TQString m_mimetype;
};
#endif
diff --git a/kioslave/media/kcmodule/notifiermodule.cpp b/kioslave/media/kcmodule/notifiermodule.cpp
index 015d7396a..c7871c953 100644
--- a/kioslave/media/kcmodule/notifiermodule.cpp
+++ b/kioslave/media/kcmodule/notifiermodule.cpp
@@ -21,7 +21,7 @@
#include <klocale.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kcombobox.h>
#include <kpushbutton.h>
#include <kstdguiitem.h>
@@ -31,10 +31,10 @@
#include "actionlistboxitem.h"
#include "mimetypelistboxitem.h"
-NotifierModule::NotifierModule(QWidget *parent, const char *name)
+NotifierModule::NotifierModule(TQWidget *parent, const char *name)
: KCModule(parent, name)
{
- QBoxLayout *layout = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQBoxLayout *layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
m_view = new NotifierModuleView( this );
layout->addWidget( m_view );
@@ -45,10 +45,10 @@ NotifierModule::NotifierModule(QWidget *parent, const char *name)
m_view->mimetypesCombo->insertItem( i18n("All Mime Types") );
- QStringList mimetypes = m_settings.supportedMimetypes();
+ TQStringList mimetypes = m_settings.supportedMimetypes();
- QStringList::iterator it = mimetypes.begin();
- QStringList::iterator end = mimetypes.end();
+ TQStringList::iterator it = mimetypes.begin();
+ TQStringList::iterator end = mimetypes.end();
for ( ; it!=end; ++it )
{
@@ -57,18 +57,18 @@ NotifierModule::NotifierModule(QWidget *parent, const char *name)
updateListBox();
- connect( m_view->mimetypesCombo, SIGNAL( activated(int) ),
- this, SLOT( slotMimeTypeChanged(int) ) );
- connect( m_view->actionsList, SIGNAL( selectionChanged(QListBoxItem*) ),
- this, SLOT( slotActionSelected(QListBoxItem*) ) );
- connect( m_view->addButton, SIGNAL( clicked() ),
- this, SLOT( slotAdd() ) );
- connect( m_view->editButton, SIGNAL( clicked() ),
- this, SLOT( slotEdit() ) );
- connect( m_view->deleteButton, SIGNAL( clicked() ),
- this, SLOT( slotDelete() ) );
- connect( m_view->toggleAutoButton, SIGNAL( clicked() ),
- this, SLOT( slotToggleAuto() ) );
+ connect( m_view->mimetypesCombo, TQT_SIGNAL( activated(int) ),
+ this, TQT_SLOT( slotMimeTypeChanged(int) ) );
+ connect( m_view->actionsList, TQT_SIGNAL( selectionChanged(TQListBoxItem*) ),
+ this, TQT_SLOT( slotActionSelected(TQListBoxItem*) ) );
+ connect( m_view->addButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotAdd() ) );
+ connect( m_view->editButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotEdit() ) );
+ connect( m_view->deleteButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotDelete() ) );
+ connect( m_view->toggleAutoButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotToggleAuto() ) );
}
NotifierModule::~NotifierModule()
@@ -97,7 +97,7 @@ void NotifierModule::updateListBox()
m_view->actionsList->clear();
slotActionSelected( 0L );
- QValueList<NotifierAction*> services;
+ TQValueList<NotifierAction*> services;
if ( m_mimetype.isEmpty() )
{
services = m_settings.actions();
@@ -107,7 +107,7 @@ void NotifierModule::updateListBox()
services = m_settings.actionsForMimetype( m_mimetype );
}
- QValueList<NotifierAction*>::iterator it;
+ TQValueList<NotifierAction*>::iterator it;
for ( it = services.begin(); it != services.end(); ++it )
{
@@ -115,7 +115,7 @@ void NotifierModule::updateListBox()
}
}
-void NotifierModule::slotActionSelected(QListBoxItem *item)
+void NotifierModule::slotActionSelected(TQListBoxItem *item)
{
NotifierAction *action = 0L;
@@ -137,11 +137,11 @@ void NotifierModule::slotMimeTypeChanged(int index)
{
if ( index == 0 )
{
- m_mimetype = QString();
+ m_mimetype = TQString();
}
else
{
- QListBoxItem *item = m_view->mimetypesCombo->listBox()->item( index );
+ TQListBoxItem *item = m_view->mimetypesCombo->listBox()->item( index );
MimetypeListBoxItem *mime_item
= static_cast<MimetypeListBoxItem*>( item );
m_mimetype = mime_item->mimetype();
@@ -157,7 +157,7 @@ void NotifierModule::slotAdd()
int value = dialog.exec();
- if ( value == QDialog::Accepted )
+ if ( value == TQDialog::Accepted )
{
m_settings.addAction( action );
updateListBox();
@@ -181,7 +181,7 @@ void NotifierModule::slotEdit()
int value = dialog.exec();
- if ( value == QDialog::Accepted )
+ if ( value == TQDialog::Accepted )
{
updateListBox();
emit changed( true );
diff --git a/kioslave/media/kcmodule/notifiermodule.h b/kioslave/media/kcmodule/notifiermodule.h
index 6c71df51f..e284e87fe 100644
--- a/kioslave/media/kcmodule/notifiermodule.h
+++ b/kioslave/media/kcmodule/notifiermodule.h
@@ -30,7 +30,7 @@ class NotifierModule : public KCModule
Q_OBJECT
public:
- NotifierModule( QWidget* parent = 0, const char* name = 0);
+ NotifierModule( TQWidget* parent = 0, const char* name = 0);
~NotifierModule();
void load();
@@ -43,13 +43,13 @@ private slots:
void slotEdit();
void slotToggleAuto();
- void slotActionSelected( QListBoxItem * item );
+ void slotActionSelected( TQListBoxItem * item );
void slotMimeTypeChanged( int index );
private:
void updateListBox();
- QString m_mimetype;
+ TQString m_mimetype;
NotifierSettings m_settings;
NotifierModuleView *m_view;
};
diff --git a/kioslave/media/kcmodule/serviceconfigdialog.cpp b/kioslave/media/kcmodule/serviceconfigdialog.cpp
index 1a127d12b..61dd060f2 100644
--- a/kioslave/media/kcmodule/serviceconfigdialog.cpp
+++ b/kioslave/media/kcmodule/serviceconfigdialog.cpp
@@ -23,20 +23,20 @@
#include <klineedit.h>
#include <kactionselector.h>
#include <kicondialog.h>
-#include <qlistbox.h>
+#include <tqlistbox.h>
#include <kservice.h>
#include <kopenwith.h>
#include <kpushbutton.h>
#include <kiconloader.h>
-#include <qpixmap.h>
-#include <qiconset.h>
+#include <tqpixmap.h>
+#include <tqiconset.h>
#include "mimetypelistboxitem.h"
ServiceConfigDialog::ServiceConfigDialog(NotifierServiceAction *action,
- const QStringList &mimetypesList,
- QWidget* parent, const char* name)
+ const TQStringList &mimetypesList,
+ TQWidget* parent, const char* name)
: KDialogBase(parent, name, true, i18n("Edit Service"), Ok|Cancel, Ok, true),
m_action(action)
{
@@ -46,22 +46,22 @@ ServiceConfigDialog::ServiceConfigDialog(NotifierServiceAction *action,
m_view->labelEdit->setText( m_action->label() );
m_view->commandEdit->setText( m_action->service().m_strExec );
- QIconSet iconSet = SmallIconSet("configure");
- QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
+ TQIconSet iconSet = SmallIconSet("configure");
+ TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal );
m_view->commandButton->setIconSet( iconSet );
m_view->commandButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
m_iconChanged = false;
- QStringList all_mimetypes = mimetypesList;
- QStringList action_mimetypes = action->mimetypes();
+ TQStringList all_mimetypes = mimetypesList;
+ TQStringList action_mimetypes = action->mimetypes();
- QStringList::iterator it = all_mimetypes.begin();
- QStringList::iterator end = all_mimetypes.end();
+ TQStringList::iterator it = all_mimetypes.begin();
+ TQStringList::iterator end = all_mimetypes.end();
for ( ; it!=end; ++it )
{
- QListBox *list;
+ TQListBox *list;
if ( action_mimetypes.contains( *it ) )
{
@@ -78,10 +78,10 @@ ServiceConfigDialog::ServiceConfigDialog(NotifierServiceAction *action,
setMainWidget(m_view);
setCaption( m_action->label() );
- connect( m_view->iconButton, SIGNAL( iconChanged(QString) ),
- this, SLOT( slotIconChanged() ) );
- connect( m_view->commandButton, SIGNAL( clicked() ),
- this, SLOT( slotCommand() ) );
+ connect( m_view->iconButton, TQT_SIGNAL( iconChanged(TQString) ),
+ this, TQT_SLOT( slotIconChanged() ) );
+ connect( m_view->commandButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotCommand() ) );
}
bool operator==( KDEDesktopMimeType::Service s1, KDEDesktopMimeType::Service s2 )
@@ -103,12 +103,12 @@ void ServiceConfigDialog::slotOk()
service.m_strIcon = m_view->iconButton->icon();
service.m_strExec = m_view->commandEdit->text();
- QStringList mimetypes;
+ TQStringList mimetypes;
uint list_count = m_view->mimetypesSelector->selectedListBox()->count();
for( uint i=0; i < list_count; ++i )
{
- QListBoxItem *item = m_view->mimetypesSelector->selectedListBox()->item(i);
+ TQListBoxItem *item = m_view->mimetypesSelector->selectedListBox()->item(i);
MimetypeListBoxItem *mime_item = static_cast<MimetypeListBoxItem*>( item );
mimetypes.append( mime_item->mimetype() );
}
@@ -134,7 +134,7 @@ void ServiceConfigDialog::slotCommand()
{
KOpenWithDlg d(this);
int value = d.exec();
- if ( value == QDialog::Accepted )
+ if ( value == TQDialog::Accepted )
{
KService::Ptr service = d.service();
if ( service != 0L )
diff --git a/kioslave/media/kcmodule/serviceconfigdialog.h b/kioslave/media/kcmodule/serviceconfigdialog.h
index 090a978d4..24e907205 100644
--- a/kioslave/media/kcmodule/serviceconfigdialog.h
+++ b/kioslave/media/kcmodule/serviceconfigdialog.h
@@ -31,8 +31,8 @@ class ServiceConfigDialog : public KDialogBase
public:
ServiceConfigDialog(NotifierServiceAction *action,
- const QStringList &mimetypesList,
- QWidget* parent = 0, const char* name = 0);
+ const TQStringList &mimetypesList,
+ TQWidget* parent = 0, const char* name = 0);
public slots:
void slotOk();
diff --git a/kioslave/media/kfile-plugin/kfilemediaplugin.cpp b/kioslave/media/kfile-plugin/kfilemediaplugin.cpp
index 37aa7d61f..bda34bff2 100644
--- a/kioslave/media/kfile-plugin/kfilemediaplugin.cpp
+++ b/kioslave/media/kfile-plugin/kfilemediaplugin.cpp
@@ -24,11 +24,11 @@
#include <dcopref.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qapplication.h>
-#include <qfile.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqapplication.h>
+#include <tqfile.h>
#ifdef HAVE_STATVFS
# include <sys/statvfs.h>
@@ -41,8 +41,8 @@
typedef KGenericFactory<KFileMediaPlugin> KFileMediaPluginFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_media, KFileMediaPluginFactory("kio_media"))
-KFileMediaPlugin::KFileMediaPlugin(QObject *parent, const char *name,
- const QStringList& args)
+KFileMediaPlugin::KFileMediaPlugin(TQObject *parent, const char *name,
+ const TQStringList& args)
: KFilePlugin(parent, name, args)
{
addMimeType( "media/audiocd" );
@@ -94,9 +94,9 @@ bool KFileMediaPlugin::readInfo(KFileMetaInfo &info, uint /*what*/)
if (medium.id().isNull()) return false;
- QString mount_point = medium.mountPoint();
+ TQString mount_point = medium.mountPoint();
KURL base_url = medium.prettyBaseURL();
- QString device_node = medium.deviceNode();
+ TQString device_node = medium.deviceNode();
KFileMetaInfoGroup group = appendGroup(info, "mediumInfo");
@@ -119,7 +119,7 @@ bool KFileMediaPlugin::readInfo(KFileMetaInfo &info, uint /*what*/)
struct statvfs vfs;
memset(&vfs, 0, sizeof(vfs));
- if ( ::statvfs(QFile::encodeName(mount_point), &vfs) != -1 )
+ if ( ::statvfs(TQFile::encodeName(mount_point), &vfs) != -1 )
{
m_total = static_cast<KIO::filesize_t>(vfs.f_blocks) * static_cast<KIO::filesize_t>(vfs.f_frsize);
m_free = static_cast<KIO::filesize_t>(vfs.f_bavail) * static_cast<KIO::filesize_t>(vfs.f_frsize);
@@ -140,19 +140,19 @@ bool KFileMediaPlugin::readInfo(KFileMetaInfo &info, uint /*what*/)
group = appendGroup(info, "mediumSummary");
- appendItem(group, "percent", QString("%1%").arg(percent));
+ appendItem(group, "percent", TQString("%1%").arg(percent));
- QPixmap bar(150, 20);
- QPainter p(&bar);
+ TQPixmap bar(150, 20);
+ TQPainter p(&bar);
p.fillRect(0, 0, length, 20, Qt::red);
p.fillRect(length, 0, 150-length, 20, Qt::green);
- QColorGroup cg = QApplication::palette().active();
+ TQColorGroup cg = TQApplication::palette().active();
- QApplication::style().drawPrimitive(QStyle::PE_Panel, &p,
- QRect(0, 0, 150, 20), cg,
- QStyle::Style_Sunken);
+ TQApplication::style().drawPrimitive(TQStyle::PE_Panel, &p,
+ TQRect(0, 0, 150, 20), cg,
+ TQStyle::Style_Sunken);
appendItem( group, "thumbnail", bar );
}
@@ -169,7 +169,7 @@ const Medium KFileMediaPlugin::askMedium(KFileMetaInfo &info)
if ( !reply.isValid() )
{
- return Medium(QString::null, QString::null);
+ return Medium(TQString::null, TQString::null);
}
return Medium::create(reply);
@@ -183,24 +183,24 @@ void KFileMediaPlugin::addMimeType(const char *mimeType)
= addGroupInfo(info, "mediumInfo", i18n("Medium Information"));
KFileMimeTypeInfo::ItemInfo *item
- = addItemInfo(group, "free", i18n("Free"), QVariant::ULongLong);
+ = addItemInfo(group, "free", i18n("Free"), TQVariant::ULongLong);
setUnit(item, KFileMimeTypeInfo::Bytes);
- item = addItemInfo(group, "used", i18n("Used"), QVariant::ULongLong);
+ item = addItemInfo(group, "used", i18n("Used"), TQVariant::ULongLong);
setUnit(item, KFileMimeTypeInfo::Bytes);
- item = addItemInfo(group, "total", i18n("Total"), QVariant::ULongLong);
+ item = addItemInfo(group, "total", i18n("Total"), TQVariant::ULongLong);
setUnit(item, KFileMimeTypeInfo::Bytes);
- item = addItemInfo(group, "baseURL", i18n("Base URL"), QVariant::String);
- item = addItemInfo(group, "mountPoint", i18n("Mount Point"), QVariant::String);
- item = addItemInfo(group, "deviceNode", i18n("Device Node"), QVariant::String);
+ item = addItemInfo(group, "baseURL", i18n("Base URL"), TQVariant::String);
+ item = addItemInfo(group, "mountPoint", i18n("Mount Point"), TQVariant::String);
+ item = addItemInfo(group, "deviceNode", i18n("Device Node"), TQVariant::String);
group = addGroupInfo(info, "mediumSummary", i18n("Medium Summary"));
- item = addItemInfo(group, "percent", i18n("Usage"), QVariant::String);
+ item = addItemInfo(group, "percent", i18n("Usage"), TQVariant::String);
- item = addItemInfo( group, "thumbnail", i18n("Bar Graph"), QVariant::Image );
+ item = addItemInfo( group, "thumbnail", i18n("Bar Graph"), TQVariant::Image );
setHint( item, KFileMimeTypeInfo::Thumbnail );
}
diff --git a/kioslave/media/kfile-plugin/kfilemediaplugin.h b/kioslave/media/kfile-plugin/kfilemediaplugin.h
index 666f75df3..7799ffc3d 100644
--- a/kioslave/media/kfile-plugin/kfilemediaplugin.h
+++ b/kioslave/media/kfile-plugin/kfilemediaplugin.h
@@ -30,8 +30,8 @@ class KFileMediaPlugin : public KFilePlugin
{
Q_OBJECT
public:
- KFileMediaPlugin(QObject *parent, const char *name,
- const QStringList &args);
+ KFileMediaPlugin(TQObject *parent, const char *name,
+ const TQStringList &args);
bool readInfo(KFileMetaInfo &info, uint what = KFileMetaInfo::Fastest);
diff --git a/kioslave/media/kio_media.cpp b/kioslave/media/kio_media.cpp
index b9283592c..6aff0ae1a 100644
--- a/kioslave/media/kio_media.cpp
+++ b/kioslave/media/kio_media.cpp
@@ -25,7 +25,7 @@
#include <dcopclient.h>
#include <kcmdlineargs.h>
-#include <qeventloop.h>
+#include <tqeventloop.h>
#include "kio_media.h"
@@ -57,12 +57,12 @@ extern "C" {
}
-MediaProtocol::MediaProtocol(const QCString &protocol,
- const QCString &pool, const QCString &app)
+MediaProtocol::MediaProtocol(const TQCString &protocol,
+ const TQCString &pool, const TQCString &app)
: ForwardingSlaveBase(protocol, pool, app)
{
- connect( &m_impl, SIGNAL( warning( const QString & ) ),
- this, SLOT( slotWarning( const QString & ) ) );
+ connect( &m_impl, TQT_SIGNAL( warning( const TQString & ) ),
+ this, TQT_SLOT( slotWarning( const TQString & ) ) );
}
MediaProtocol::~MediaProtocol()
@@ -71,7 +71,7 @@ MediaProtocol::~MediaProtocol()
bool MediaProtocol::rewriteURL(const KURL &url, KURL &newUrl)
{
- QString name, path;
+ TQString name, path;
if ( !m_impl.parseURL(url, name, path) )
{
@@ -94,7 +94,7 @@ void MediaProtocol::put(const KURL &url, int permissions,
{
kdDebug(1219) << "MediaProtocol::put: " << url << endl;
- QString name, path;
+ TQString name, path;
bool ok = m_impl.parseURL(url, name, path);
if ( ok && path.isEmpty() )
@@ -112,9 +112,9 @@ void MediaProtocol::rename(const KURL &src, const KURL &dest, bool overwrite)
kdDebug(1219) << "MediaProtocol::rename: " << src << ", " << dest << ", "
<< overwrite << endl;
- QString src_name, src_path;
+ TQString src_name, src_path;
bool ok = m_impl.parseURL(src, src_name, src_path);
- QString dest_name, dest_path;
+ TQString dest_name, dest_path;
ok &= m_impl.parseURL(dest, dest_name, dest_path);
if ( ok && src_path.isEmpty() && dest_path.isEmpty()
@@ -139,7 +139,7 @@ void MediaProtocol::mkdir(const KURL &url, int permissions)
{
kdDebug(1219) << "MediaProtocol::mkdir: " << url << endl;
- QString name, path;
+ TQString name, path;
bool ok = m_impl.parseURL(url, name, path);
if ( ok && path.isEmpty() )
@@ -156,7 +156,7 @@ void MediaProtocol::del(const KURL &url, bool isFile)
{
kdDebug(1219) << "MediaProtocol::del: " << url << endl;
- QString name, path;
+ TQString name, path;
bool ok = m_impl.parseURL(url, name, path);
if ( ok && path.isEmpty() )
@@ -172,7 +172,7 @@ void MediaProtocol::del(const KURL &url, bool isFile)
void MediaProtocol::stat(const KURL &url)
{
kdDebug(1219) << "MediaProtocol::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
@@ -183,7 +183,7 @@ void MediaProtocol::stat(const KURL &url)
return;
}
- QString name;
+ TQString name;
bool ok = m_impl.parseURL(url, name, path);
if ( !ok )
@@ -223,7 +223,7 @@ void MediaProtocol::listDir(const KURL &url)
return;
}
- QString name, path;
+ TQString name, path;
bool ok = m_impl.parseURL(url, name, path);
if ( !ok )
@@ -267,7 +267,7 @@ void MediaProtocol::listRoot()
finished();
}
-void MediaProtocol::slotWarning( const QString &msg )
+void MediaProtocol::slotWarning( const TQString &msg )
{
warning( msg );
}
diff --git a/kioslave/media/kio_media.h b/kioslave/media/kio_media.h
index 55b3ae670..80da4a6cc 100644
--- a/kioslave/media/kio_media.h
+++ b/kioslave/media/kio_media.h
@@ -28,8 +28,8 @@ class MediaProtocol : public KIO::ForwardingSlaveBase
{
Q_OBJECT
public:
- MediaProtocol(const QCString &protocol, const QCString &pool,
- const QCString &app);
+ MediaProtocol(const TQCString &protocol, const TQCString &pool,
+ const TQCString &app);
virtual ~MediaProtocol();
virtual bool rewriteURL(const KURL &url, KURL &newUrl);
@@ -43,7 +43,7 @@ public:
virtual void listDir(const KURL &url);
private slots:
- void slotWarning( const QString &msg );
+ void slotWarning( const TQString &msg );
private:
void listRoot();
diff --git a/kioslave/media/libmediacommon/actionlistboxitem.cpp b/kioslave/media/libmediacommon/actionlistboxitem.cpp
index 3551857c1..271d2e487 100644
--- a/kioslave/media/libmediacommon/actionlistboxitem.cpp
+++ b/kioslave/media/libmediacommon/actionlistboxitem.cpp
@@ -21,13 +21,13 @@
#include <klocale.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
-ActionListBoxItem::ActionListBoxItem(NotifierAction *action, QString mimetype, QListBox *parent)
- : QListBoxPixmap(parent, action->pixmap()),
+ActionListBoxItem::ActionListBoxItem(NotifierAction *action, TQString mimetype, TQListBox *parent)
+ : TQListBoxPixmap(parent, action->pixmap()),
m_action(action)
{
- QString text = m_action->label();
+ TQString text = m_action->label();
if ( m_action->autoMimetypes().contains( mimetype ) )
{
diff --git a/kioslave/media/libmediacommon/actionlistboxitem.h b/kioslave/media/libmediacommon/actionlistboxitem.h
index cdd8a3ff1..0378e1d6f 100644
--- a/kioslave/media/libmediacommon/actionlistboxitem.h
+++ b/kioslave/media/libmediacommon/actionlistboxitem.h
@@ -20,15 +20,15 @@
#ifndef _ACTIONLISTBOXITEM_H_
#define _ACTIONLISTBOXITEM_H_
-#include <qlistbox.h>
-#include <qstring.h>
+#include <tqlistbox.h>
+#include <tqstring.h>
#include "notifieraction.h"
class ActionListBoxItem : public QListBoxPixmap
{
public:
- ActionListBoxItem(NotifierAction *action, QString mimetype, QListBox *parent);
+ ActionListBoxItem(NotifierAction *action, TQString mimetype, TQListBox *parent);
~ActionListBoxItem();
NotifierAction *action() const;
diff --git a/kioslave/media/libmediacommon/medium.cpp b/kioslave/media/libmediacommon/medium.cpp
index 4cba32aeb..e7e91dd54 100644
--- a/kioslave/media/libmediacommon/medium.cpp
+++ b/kioslave/media/libmediacommon/medium.cpp
@@ -21,25 +21,25 @@
#include <kconfig.h>
#include <klocale.h>
-const QString Medium::SEPARATOR = "---";
+const TQString Medium::SEPARATOR = "---";
-Medium::Medium(const QString &id, const QString &name)
+Medium::Medium(const TQString &id, const TQString &name)
{
m_properties+= id; /* ID */
m_properties+= name; /* NAME */
m_properties+= name; /* LABEL */
- m_properties+= QString::null; /* USER_LABEL */
+ m_properties+= TQString::null; /* USER_LABEL */
m_properties+= "false"; /* MOUNTABLE */
- m_properties+= QString::null; /* DEVICE_NODE */
- m_properties+= QString::null; /* MOUNT_POINT */
- m_properties+= QString::null; /* FS_TYPE */
+ m_properties+= TQString::null; /* DEVICE_NODE */
+ m_properties+= TQString::null; /* MOUNT_POINT */
+ m_properties+= TQString::null; /* FS_TYPE */
m_properties+= "false"; /* MOUNTED */
- m_properties+= QString::null; /* BASE_URL */
- m_properties+= QString::null; /* MIME_TYPE */
- m_properties+= QString::null; /* ICON_NAME */
+ m_properties+= TQString::null; /* BASE_URL */
+ m_properties+= TQString::null; /* MIME_TYPE */
+ m_properties+= TQString::null; /* ICON_NAME */
m_properties+= "false"; /* ENCRYPTED */
- m_properties+= QString::null; /* CLEAR_DEVICE_UDI */
+ m_properties+= TQString::null; /* CLEAR_DEVICE_UDI */
loadUserLabel();
@@ -48,26 +48,26 @@ Medium::Medium(const QString &id, const QString &name)
Medium::Medium()
{
- m_properties+= QString::null; /* ID */
- m_properties+= QString::null; /* NAME */
- m_properties+= QString::null; /* LABEL */
- m_properties+= QString::null; /* USER_LABEL */
-
- m_properties+= QString::null; /* MOUNTABLE */
- m_properties+= QString::null; /* DEVICE_NODE */
- m_properties+= QString::null; /* MOUNT_POINT */
- m_properties+= QString::null; /* FS_TYPE */
- m_properties+= QString::null; /* MOUNTED */
- m_properties+= QString::null; /* BASE_URL */
- m_properties+= QString::null; /* MIME_TYPE */
- m_properties+= QString::null; /* ICON_NAME */
- m_properties+= QString::null; /* ENCRYPTED */
- m_properties+= QString::null; /* CLEAR_DEVICE_UDI */
+ m_properties+= TQString::null; /* ID */
+ m_properties+= TQString::null; /* NAME */
+ m_properties+= TQString::null; /* LABEL */
+ m_properties+= TQString::null; /* USER_LABEL */
+
+ m_properties+= TQString::null; /* MOUNTABLE */
+ m_properties+= TQString::null; /* DEVICE_NODE */
+ m_properties+= TQString::null; /* MOUNT_POINT */
+ m_properties+= TQString::null; /* FS_TYPE */
+ m_properties+= TQString::null; /* MOUNTED */
+ m_properties+= TQString::null; /* BASE_URL */
+ m_properties+= TQString::null; /* MIME_TYPE */
+ m_properties+= TQString::null; /* ICON_NAME */
+ m_properties+= TQString::null; /* ENCRYPTED */
+ m_properties+= TQString::null; /* CLEAR_DEVICE_UDI */
m_halmounted = false;
}
-const Medium Medium::create(const QStringList &properties)
+const Medium Medium::create(const TQStringList &properties)
{
Medium m;
@@ -93,7 +93,7 @@ const Medium Medium::create(const QStringList &properties)
return m;
}
-Medium::List Medium::createList(const QStringList &properties)
+Medium::List Medium::createList(const TQStringList &properties)
{
List l;
@@ -101,15 +101,15 @@ Medium::List Medium::createList(const QStringList &properties)
{
int media_count = properties.size()/(PROPERTIES_COUNT+1);
- QStringList props = properties;
+ TQStringList props = properties;
for(int i=0; i<media_count; i++)
{
const Medium m = create(props);
l.append(m);
- QStringList::iterator first = props.begin();
- QStringList::iterator last = props.find(SEPARATOR);
+ TQStringList::iterator first = props.begin();
+ TQStringList::iterator last = props.find(SEPARATOR);
++last;
props.erase(first, last);
}
@@ -119,12 +119,12 @@ Medium::List Medium::createList(const QStringList &properties)
}
-void Medium::setName(const QString &name)
+void Medium::setName(const TQString &name)
{
m_properties[NAME] = name;
}
-void Medium::setLabel(const QString &label)
+void Medium::setLabel(const TQString &label)
{
m_properties[LABEL] = label;
}
@@ -134,12 +134,12 @@ void Medium::setEncrypted(bool state)
m_properties[ENCRYPTED] = ( state ? "true" : "false" );
}
-void Medium::setUserLabel(const QString &label)
+void Medium::setUserLabel(const TQString &label)
{
KConfig cfg("mediamanagerrc");
cfg.setGroup("UserLabels");
- QString entry_name = m_properties[ID];
+ TQString entry_name = m_properties[ID];
if ( label.isNull() )
{
@@ -158,7 +158,7 @@ void Medium::loadUserLabel()
KConfig cfg("mediamanagerrc");
cfg.setGroup("UserLabels");
- QString entry_name = m_properties[ID];
+ TQString entry_name = m_properties[ID];
if ( cfg.hasKey(entry_name) )
{
@@ -166,7 +166,7 @@ void Medium::loadUserLabel()
}
else
{
- m_properties[USER_LABEL] = QString::null;
+ m_properties[USER_LABEL] = TQString::null;
}
}
@@ -185,9 +185,9 @@ bool Medium::mountableState(bool mounted)
return true;
}
-void Medium::mountableState(const QString &deviceNode,
- const QString &mountPoint,
- const QString &fsType, bool mounted)
+void Medium::mountableState(const TQString &deviceNode,
+ const TQString &mountPoint,
+ const TQString &fsType, bool mounted)
{
m_properties[MOUNTABLE] = "true";
m_properties[DEVICE_NODE] = deviceNode;
@@ -196,10 +196,10 @@ void Medium::mountableState(const QString &deviceNode,
m_properties[MOUNTED] = ( mounted ? "true" : "false" );
}
-void Medium::mountableState(const QString &deviceNode,
- const QString &clearDeviceUdi,
- const QString &mountPoint,
- const QString &fsType, bool mounted)
+void Medium::mountableState(const TQString &deviceNode,
+ const TQString &clearDeviceUdi,
+ const TQString &mountPoint,
+ const TQString &fsType, bool mounted)
{
m_properties[MOUNTABLE] = "true";
m_properties[DEVICE_NODE] = deviceNode;
@@ -209,18 +209,18 @@ void Medium::mountableState(const QString &deviceNode,
m_properties[MOUNTED] = ( mounted ? "true" : "false" );
}
-void Medium::unmountableState(const QString &baseURL)
+void Medium::unmountableState(const TQString &baseURL)
{
m_properties[MOUNTABLE] = "false";
m_properties[BASE_URL] = baseURL;
}
-void Medium::setMimeType(const QString &mimeType)
+void Medium::setMimeType(const TQString &mimeType)
{
m_properties[MIME_TYPE] = mimeType;
}
-void Medium::setIconName(const QString &iconName)
+void Medium::setIconName(const TQString &iconName)
{
m_properties[ICON_NAME] = iconName;
}
@@ -243,7 +243,7 @@ KURL Medium::prettyBaseURL() const
return KURL( mountPoint() );
}
-QString Medium::prettyLabel() const
+TQString Medium::prettyLabel() const
{
if ( !userLabel().isEmpty() )
{
diff --git a/kioslave/media/libmediacommon/medium.h b/kioslave/media/libmediacommon/medium.h
index 543bdf596..54e1556dc 100644
--- a/kioslave/media/libmediacommon/medium.h
+++ b/kioslave/media/libmediacommon/medium.h
@@ -19,15 +19,15 @@
#ifndef _MEDIUM_H_
#define _MEDIUM_H_
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kurl.h>
-#include <qmap.h>
+#include <tqmap.h>
class Medium
{
public:
- typedef QValueList<const Medium> List;
+ typedef TQValueList<const Medium> List;
static const uint ID = 0;
static const uint NAME = 1;
@@ -44,51 +44,51 @@ public:
static const uint ENCRYPTED = 12;
static const uint CLEAR_DEVICE_UDI = 13;
static const uint PROPERTIES_COUNT = 14;
- static const QString SEPARATOR;
+ static const TQString SEPARATOR;
- Medium(const QString &id, const QString &name);
- static const Medium create(const QStringList &properties);
- static List createList(const QStringList &properties);
+ Medium(const TQString &id, const TQString &name);
+ static const Medium create(const TQStringList &properties);
+ static List createList(const TQStringList &properties);
- const QStringList &properties() const { return m_properties; }
+ const TQStringList &properties() const { return m_properties; }
- QString id() const { return m_properties[ID]; }
- QString name() const { return m_properties[NAME]; }
- QString label() const { return m_properties[LABEL]; }
- QString userLabel() const { return m_properties[USER_LABEL]; }
+ TQString id() const { return m_properties[ID]; }
+ TQString name() const { return m_properties[NAME]; }
+ TQString label() const { return m_properties[LABEL]; }
+ TQString userLabel() const { return m_properties[USER_LABEL]; }
bool isMountable() const { return m_properties[MOUNTABLE]=="true"; }
- QString deviceNode() const { return m_properties[DEVICE_NODE]; }
- QString mountPoint() const { return m_properties[MOUNT_POINT]; }
- QString fsType() const { return m_properties[FS_TYPE]; }
+ TQString deviceNode() const { return m_properties[DEVICE_NODE]; }
+ TQString mountPoint() const { return m_properties[MOUNT_POINT]; }
+ TQString fsType() const { return m_properties[FS_TYPE]; }
bool isMounted() const { return m_properties[MOUNTED]=="true"; }
- QString baseURL() const { return m_properties[BASE_URL]; }
- QString mimeType() const { return m_properties[MIME_TYPE]; }
- QString iconName() const { return m_properties[ICON_NAME]; }
+ TQString baseURL() const { return m_properties[BASE_URL]; }
+ TQString mimeType() const { return m_properties[MIME_TYPE]; }
+ TQString iconName() const { return m_properties[ICON_NAME]; }
bool isEncrypted() const { return m_properties[ENCRYPTED]=="true"; };
- QString clearDeviceUdi() const { return m_properties[CLEAR_DEVICE_UDI]; };
+ TQString clearDeviceUdi() const { return m_properties[CLEAR_DEVICE_UDI]; };
bool needMounting() const;
bool needDecryption() const;
KURL prettyBaseURL() const;
- QString prettyLabel() const;
+ TQString prettyLabel() const;
- void setName(const QString &name);
- void setLabel(const QString &label);
- void setUserLabel(const QString &label);
+ void setName(const TQString &name);
+ void setLabel(const TQString &label);
+ void setUserLabel(const TQString &label);
void setEncrypted(bool state);
bool mountableState(bool mounted);
- void mountableState(const QString &deviceNode,
- const QString &mountPoint,
- const QString &fsType, bool mounted);
- void mountableState(const QString &deviceNode,
- const QString &clearDeviceUdi,
- const QString &mountPoint,
- const QString &fsType, bool mounted);
- void unmountableState(const QString &baseURL = QString::null);
-
- void setMimeType(const QString &mimeType);
- void setIconName(const QString &iconName);
+ void mountableState(const TQString &deviceNode,
+ const TQString &mountPoint,
+ const TQString &fsType, bool mounted);
+ void mountableState(const TQString &deviceNode,
+ const TQString &clearDeviceUdi,
+ const TQString &mountPoint,
+ const TQString &fsType, bool mounted);
+ void unmountableState(const TQString &baseURL = TQString::null);
+
+ void setMimeType(const TQString &mimeType);
+ void setIconName(const TQString &iconName);
void setHalMounted(bool flag) const { m_halmounted = flag; }
bool halMounted() const { return m_halmounted; }
@@ -96,21 +96,21 @@ private:
Medium();
void loadUserLabel();
- QStringList m_properties;
+ TQStringList m_properties;
mutable bool m_halmounted;
-friend class QValueListNode<const Medium>;
+friend class TQValueListNode<const Medium>;
};
namespace MediaManagerUtils {
- static inline QMap<QString,QString> splitOptions(const QStringList & options)
+ static inline TQMap<TQString,TQString> splitOptions(const TQStringList & options)
{
- QMap<QString,QString> valids;
+ TQMap<TQString,TQString> valids;
- for (QStringList::ConstIterator it = options.begin(); it != options.end(); ++it)
+ for (TQStringList::ConstIterator it = options.begin(); it != options.end(); ++it)
{
- QString key = (*it).left((*it).find('='));
- QString value = (*it).mid((*it).find('=') + 1);
+ TQString key = (*it).left((*it).find('='));
+ TQString value = (*it).mid((*it).find('=') + 1);
valids[key] = value;
}
return valids;
diff --git a/kioslave/media/libmediacommon/notifieraction.cpp b/kioslave/media/libmediacommon/notifieraction.cpp
index 3eea682d4..d10314701 100644
--- a/kioslave/media/libmediacommon/notifieraction.cpp
+++ b/kioslave/media/libmediacommon/notifieraction.cpp
@@ -19,7 +19,7 @@
#include "notifieraction.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kglobal.h>
#include <kiconloader.h>
#include <kicontheme.h>
@@ -32,42 +32,42 @@ NotifierAction::~NotifierAction()
{
}
-void NotifierAction::setIconName(const QString &iconName)
+void NotifierAction::setIconName(const TQString &iconName)
{
m_iconName = iconName;
}
-void NotifierAction::setLabel(const QString &label)
+void NotifierAction::setLabel(const TQString &label)
{
m_label = label;
}
-QString NotifierAction::iconName() const
+TQString NotifierAction::iconName() const
{
return m_iconName;
}
-QPixmap NotifierAction::pixmap() const
+TQPixmap NotifierAction::pixmap() const
{
- QFile f( m_iconName );
+ TQFile f( m_iconName );
if ( f.exists() )
{
- return QPixmap( m_iconName );
+ return TQPixmap( m_iconName );
}
else
{
- QString path = KGlobal::iconLoader()->iconPath( m_iconName, -32 );
- return QPixmap( path );
+ TQString path = KGlobal::iconLoader()->iconPath( m_iconName, -32 );
+ return TQPixmap( path );
}
}
-QString NotifierAction::label() const
+TQString NotifierAction::label() const
{
return m_label;
}
-void NotifierAction::addAutoMimetype( const QString &mimetype )
+void NotifierAction::addAutoMimetype( const TQString &mimetype )
{
if ( !m_autoMimetypes.contains( mimetype ) )
{
@@ -75,12 +75,12 @@ void NotifierAction::addAutoMimetype( const QString &mimetype )
}
}
-void NotifierAction::removeAutoMimetype( const QString &mimetype )
+void NotifierAction::removeAutoMimetype( const TQString &mimetype )
{
m_autoMimetypes.remove( mimetype );
}
-QStringList NotifierAction::autoMimetypes()
+TQStringList NotifierAction::autoMimetypes()
{
return m_autoMimetypes;
}
@@ -90,7 +90,7 @@ bool NotifierAction::isWritable() const
return false;
}
-bool NotifierAction::supportsMimetype(const QString &/*mimetype*/) const
+bool NotifierAction::supportsMimetype(const TQString &/*mimetype*/) const
{
return true;
}
diff --git a/kioslave/media/libmediacommon/notifieraction.h b/kioslave/media/libmediacommon/notifieraction.h
index 028ce7433..21e2f01f4 100644
--- a/kioslave/media/libmediacommon/notifieraction.h
+++ b/kioslave/media/libmediacommon/notifieraction.h
@@ -21,8 +21,8 @@
#define _NOTIFIERACTION_H_
#include <kfileitem.h>
-#include <qstring.h>
-#include <qpixmap.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
class NotifierSettings;
@@ -32,27 +32,27 @@ public:
NotifierAction();
virtual ~NotifierAction();
- virtual QString label() const;
- virtual QString iconName() const;
- virtual void setLabel( const QString &label );
- virtual void setIconName( const QString &icon );
+ virtual TQString label() const;
+ virtual TQString iconName() const;
+ virtual void setLabel( const TQString &label );
+ virtual void setIconName( const TQString &icon );
- QPixmap pixmap() const;
+ TQPixmap pixmap() const;
- QStringList autoMimetypes();
+ TQStringList autoMimetypes();
- virtual QString id() const = 0;
+ virtual TQString id() const = 0;
virtual bool isWritable() const;
- virtual bool supportsMimetype( const QString &mimetype ) const;
+ virtual bool supportsMimetype( const TQString &mimetype ) const;
virtual void execute( KFileItem &medium ) = 0;
private:
- void addAutoMimetype( const QString &mimetype );
- void removeAutoMimetype( const QString &mimetype );
+ void addAutoMimetype( const TQString &mimetype );
+ void removeAutoMimetype( const TQString &mimetype );
- QString m_label;
- QString m_iconName;
- QStringList m_autoMimetypes;
+ TQString m_label;
+ TQString m_iconName;
+ TQStringList m_autoMimetypes;
friend class NotifierSettings;
};
diff --git a/kioslave/media/libmediacommon/notifiernothingaction.cpp b/kioslave/media/libmediacommon/notifiernothingaction.cpp
index adf7fcf04..6a86ad92f 100644
--- a/kioslave/media/libmediacommon/notifiernothingaction.cpp
+++ b/kioslave/media/libmediacommon/notifiernothingaction.cpp
@@ -28,7 +28,7 @@ NotifierNothingAction::NotifierNothingAction()
setLabel(i18n("Do Nothing"));
}
-QString NotifierNothingAction::id() const
+TQString NotifierNothingAction::id() const
{
return "#NothinAction";
}
diff --git a/kioslave/media/libmediacommon/notifiernothingaction.h b/kioslave/media/libmediacommon/notifiernothingaction.h
index 6fd564f61..2c0d22cfb 100644
--- a/kioslave/media/libmediacommon/notifiernothingaction.h
+++ b/kioslave/media/libmediacommon/notifiernothingaction.h
@@ -26,7 +26,7 @@ class NotifierNothingAction : public NotifierAction
{
public:
NotifierNothingAction();
- virtual QString id() const;
+ virtual TQString id() const;
virtual void execute(KFileItem &medium);
};
diff --git a/kioslave/media/libmediacommon/notifieropenaction.cpp b/kioslave/media/libmediacommon/notifieropenaction.cpp
index 2cf664cc6..4d6d8025c 100644
--- a/kioslave/media/libmediacommon/notifieropenaction.cpp
+++ b/kioslave/media/libmediacommon/notifieropenaction.cpp
@@ -28,7 +28,7 @@ NotifierOpenAction::NotifierOpenAction()
setLabel(i18n("Open in New Window"));
}
-QString NotifierOpenAction::id() const
+TQString NotifierOpenAction::id() const
{
return "#OpenAction";
}
@@ -38,7 +38,7 @@ void NotifierOpenAction::execute(KFileItem &medium)
medium.run();
}
-bool NotifierOpenAction::supportsMimetype( const QString &mimetype ) const
+bool NotifierOpenAction::supportsMimetype( const TQString &mimetype ) const
{
return !mimetype.contains( "blank" ) && !mimetype.contains( "encrypted" );
}
diff --git a/kioslave/media/libmediacommon/notifieropenaction.h b/kioslave/media/libmediacommon/notifieropenaction.h
index 3239e5ca2..4fe8a614e 100644
--- a/kioslave/media/libmediacommon/notifieropenaction.h
+++ b/kioslave/media/libmediacommon/notifieropenaction.h
@@ -26,9 +26,9 @@ class NotifierOpenAction : public NotifierAction
{
public:
NotifierOpenAction();
- virtual QString id() const;
+ virtual TQString id() const;
virtual void execute(KFileItem &medium);
- bool supportsMimetype( const QString &mimetype ) const;
+ bool supportsMimetype( const TQString &mimetype ) const;
};
#endif
diff --git a/kioslave/media/libmediacommon/notifierserviceaction.cpp b/kioslave/media/libmediacommon/notifierserviceaction.cpp
index ee2401945..c7bece4f8 100644
--- a/kioslave/media/libmediacommon/notifierserviceaction.cpp
+++ b/kioslave/media/libmediacommon/notifierserviceaction.cpp
@@ -19,9 +19,9 @@
#include "notifierserviceaction.h"
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
#include <kstddirs.h>
#include <kdesktopfile.h>
#include <klocale.h>
@@ -37,11 +37,11 @@ NotifierServiceAction::NotifierServiceAction()
m_service.m_strExec = "konqueror %u";
}
-QString NotifierServiceAction::id() const
+TQString NotifierServiceAction::id() const
{
if (m_filePath.isEmpty() || m_service.m_strName.isEmpty())
{
- return QString();
+ return TQString();
}
else
{
@@ -49,13 +49,13 @@ QString NotifierServiceAction::id() const
}
}
-void NotifierServiceAction::setIconName( const QString &icon )
+void NotifierServiceAction::setIconName( const TQString &icon )
{
m_service.m_strIcon = icon;
NotifierAction::setIconName( icon );
}
-void NotifierServiceAction::setLabel( const QString &label )
+void NotifierServiceAction::setLabel( const TQString &label )
{
m_service.m_strName = label;
NotifierAction::setLabel( label );
@@ -84,12 +84,12 @@ KDEDesktopMimeType::Service NotifierServiceAction::service() const
return m_service;
}
-void NotifierServiceAction::setFilePath(const QString &filePath)
+void NotifierServiceAction::setFilePath(const TQString &filePath)
{
m_filePath = filePath;
}
-QString NotifierServiceAction::filePath() const
+TQString NotifierServiceAction::filePath() const
{
return m_filePath;
}
@@ -98,18 +98,18 @@ void NotifierServiceAction::updateFilePath()
{
if ( !m_filePath.isEmpty() ) return;
- QString action_name = m_service.m_strName;
+ TQString action_name = m_service.m_strName;
action_name.replace( " ", "_" );
- QDir actions_dir( locateLocal( "data", "konqueror/servicemenus/", true ) );
+ TQDir actions_dir( locateLocal( "data", "konqueror/servicemenus/", true ) );
- QString filename = actions_dir.absFilePath( action_name + ".desktop" );
+ TQString filename = actions_dir.absFilePath( action_name + ".desktop" );
int counter = 1;
- while ( QFile::exists( filename ) )
+ while ( TQFile::exists( filename ) )
{
filename = actions_dir.absFilePath( action_name
- + QString::number( counter )
+ + TQString::number( counter )
+ ".desktop" );
counter++;
}
@@ -117,19 +117,19 @@ void NotifierServiceAction::updateFilePath()
m_filePath = filename;
}
-void NotifierServiceAction::setMimetypes(const QStringList &mimetypes)
+void NotifierServiceAction::setMimetypes(const TQStringList &mimetypes)
{
m_mimetypes = mimetypes;
}
-QStringList NotifierServiceAction::mimetypes()
+TQStringList NotifierServiceAction::mimetypes()
{
return m_mimetypes;
}
bool NotifierServiceAction::isWritable() const
{
- QFileInfo info( m_filePath );
+ TQFileInfo info( m_filePath );
if ( info.exists() )
{
@@ -137,30 +137,30 @@ bool NotifierServiceAction::isWritable() const
}
else
{
- info = QFileInfo( info.dirPath() );
+ info = TQFileInfo( info.dirPath() );
return info.isWritable();
}
}
-bool NotifierServiceAction::supportsMimetype(const QString &mimetype) const
+bool NotifierServiceAction::supportsMimetype(const TQString &mimetype) const
{
return m_mimetypes.contains(mimetype);
}
void NotifierServiceAction::save() const
{
- QFile::remove( m_filePath );
+ TQFile::remove( m_filePath );
KDesktopFile desktopFile(m_filePath);
- desktopFile.setGroup(QString("Desktop Action ") + m_service.m_strName);
- desktopFile.writeEntry(QString("Icon"), m_service.m_strIcon);
- desktopFile.writeEntry(QString("Name"), m_service.m_strName);
- desktopFile.writeEntry(QString("Exec"), m_service.m_strExec);
+ desktopFile.setGroup(TQString("Desktop Action ") + m_service.m_strName);
+ desktopFile.writeEntry(TQString("Icon"), m_service.m_strIcon);
+ desktopFile.writeEntry(TQString("Name"), m_service.m_strName);
+ desktopFile.writeEntry(TQString("Exec"), m_service.m_strExec);
desktopFile.setDesktopGroup();
- desktopFile.writeEntry(QString("ServiceTypes"), m_mimetypes, ",");
- desktopFile.writeEntry(QString("Actions"),
- QStringList(m_service.m_strName),";");
+ desktopFile.writeEntry(TQString("ServiceTypes"), m_mimetypes, ",");
+ desktopFile.writeEntry(TQString("Actions"),
+ TQStringList(m_service.m_strName),";");
}
diff --git a/kioslave/media/libmediacommon/notifierserviceaction.h b/kioslave/media/libmediacommon/notifierserviceaction.h
index 4d61a6b74..829193fba 100644
--- a/kioslave/media/libmediacommon/notifierserviceaction.h
+++ b/kioslave/media/libmediacommon/notifierserviceaction.h
@@ -21,7 +21,7 @@
#define _NOTIFIERSERVICEACTION_H_
#include <kmimetype.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "notifieraction.h"
@@ -29,23 +29,23 @@ class NotifierServiceAction : public NotifierAction
{
public:
NotifierServiceAction();
- virtual QString id() const;
+ virtual TQString id() const;
virtual void execute(KFileItem &item);
- virtual void setIconName( const QString &icon );
- virtual void setLabel( const QString &label );
+ virtual void setIconName( const TQString &icon );
+ virtual void setLabel( const TQString &label );
void setService(KDEDesktopMimeType::Service service);
KDEDesktopMimeType::Service service() const;
- void setFilePath(const QString &filePath);
- QString filePath() const;
+ void setFilePath(const TQString &filePath);
+ TQString filePath() const;
- void setMimetypes(const QStringList &mimetypes);
- QStringList mimetypes();
+ void setMimetypes(const TQStringList &mimetypes);
+ TQStringList mimetypes();
virtual bool isWritable() const;
- virtual bool supportsMimetype(const QString &mimetype) const;
+ virtual bool supportsMimetype(const TQString &mimetype) const;
void save() const;
@@ -53,8 +53,8 @@ private:
void updateFilePath();
KDEDesktopMimeType::Service m_service;
- QString m_filePath;
- QStringList m_mimetypes;
+ TQString m_filePath;
+ TQStringList m_mimetypes;
};
#endif
diff --git a/kioslave/media/libmediacommon/notifiersettings.cpp b/kioslave/media/libmediacommon/notifiersettings.cpp
index c7ba40e85..d1ab55d87 100644
--- a/kioslave/media/libmediacommon/notifiersettings.cpp
+++ b/kioslave/media/libmediacommon/notifiersettings.cpp
@@ -22,8 +22,8 @@
#include <kglobal.h>
#include <kdesktopfile.h>
#include <kstandarddirs.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include "notifieropenaction.h"
#include "notifiernothingaction.h"
@@ -81,22 +81,22 @@ NotifierSettings::~NotifierSettings()
}
}
-QValueList<NotifierAction*> NotifierSettings::actions()
+TQValueList<NotifierAction*> NotifierSettings::actions()
{
return m_actions;
}
-const QStringList &NotifierSettings::supportedMimetypes()
+const TQStringList &NotifierSettings::supportedMimetypes()
{
return m_supportedMimetypes;
}
-QValueList<NotifierAction*> NotifierSettings::actionsForMimetype( const QString &mimetype )
+TQValueList<NotifierAction*> NotifierSettings::actionsForMimetype( const TQString &mimetype )
{
- QValueList<NotifierAction*> result;
+ TQValueList<NotifierAction*> result;
- QValueList<NotifierAction*>::iterator it = m_actions.begin();
- QValueList<NotifierAction*>::iterator end = m_actions.end();
+ TQValueList<NotifierAction*>::iterator it = m_actions.begin();
+ TQValueList<NotifierAction*>::iterator end = m_actions.end();
for ( ; it!=end; ++it )
{
@@ -128,9 +128,9 @@ bool NotifierSettings::deleteAction( NotifierServiceAction *action )
m_idMap.remove( action->id() );
m_deletedActions.append( action );
- QStringList auto_mimetypes = action->autoMimetypes();
- QStringList::iterator it = auto_mimetypes.begin();
- QStringList::iterator end = auto_mimetypes.end();
+ TQStringList auto_mimetypes = action->autoMimetypes();
+ TQStringList::iterator it = auto_mimetypes.begin();
+ TQStringList::iterator end = auto_mimetypes.end();
for ( ; it!=end; ++it )
{
@@ -143,7 +143,7 @@ bool NotifierSettings::deleteAction( NotifierServiceAction *action )
return false;
}
-void NotifierSettings::setAutoAction( const QString &mimetype, NotifierAction *action )
+void NotifierSettings::setAutoAction( const TQString &mimetype, NotifierAction *action )
{
resetAutoAction( mimetype );
m_autoMimetypesMap[mimetype] = action;
@@ -151,7 +151,7 @@ void NotifierSettings::setAutoAction( const QString &mimetype, NotifierAction *a
}
-void NotifierSettings::resetAutoAction( const QString &mimetype )
+void NotifierSettings::resetAutoAction( const TQString &mimetype )
{
if ( m_autoMimetypesMap.contains( mimetype ) )
{
@@ -163,13 +163,13 @@ void NotifierSettings::resetAutoAction( const QString &mimetype )
void NotifierSettings::clearAutoActions()
{
- QMap<QString,NotifierAction*>::iterator it = m_autoMimetypesMap.begin();
- QMap<QString,NotifierAction*>::iterator end = m_autoMimetypesMap.end();
+ TQMap<TQString,NotifierAction*>::iterator it = m_autoMimetypesMap.begin();
+ TQMap<TQString,NotifierAction*>::iterator end = m_autoMimetypesMap.end();
for ( ; it!=end; ++it )
{
NotifierAction *action = it.data();
- QString mimetype = it.key();
+ TQString mimetype = it.key();
if ( action )
action->removeAutoMimetype( mimetype );
@@ -177,7 +177,7 @@ void NotifierSettings::clearAutoActions()
}
}
-NotifierAction *NotifierSettings::autoActionForMimetype( const QString &mimetype )
+NotifierAction *NotifierSettings::autoActionForMimetype( const TQString &mimetype )
{
if ( m_autoMimetypesMap.contains( mimetype ) )
{
@@ -212,10 +212,10 @@ void NotifierSettings::reload()
m_actions.append( open );
m_idMap[ open->id() ] = open;
- QValueList<NotifierServiceAction*> services = listServices();
+ TQValueList<NotifierServiceAction*> services = listServices();
- QValueList<NotifierServiceAction*>::iterator serv_it = services.begin();
- QValueList<NotifierServiceAction*>::iterator serv_end = services.end();
+ TQValueList<NotifierServiceAction*>::iterator serv_it = services.begin();
+ TQValueList<NotifierServiceAction*>::iterator serv_end = services.end();
for ( ; serv_it!=serv_end; ++serv_it )
{
@@ -228,15 +228,15 @@ void NotifierSettings::reload()
m_idMap[ nothing->id() ] = nothing;
KConfig config( "medianotifierrc", true );
- QMap<QString,QString> auto_actions_map = config.entryMap( "Auto Actions" );
+ TQMap<TQString,TQString> auto_actions_map = config.entryMap( "Auto Actions" );
- QMap<QString,QString>::iterator auto_it = auto_actions_map.begin();
- QMap<QString,QString>::iterator auto_end = auto_actions_map.end();
+ TQMap<TQString,TQString>::iterator auto_it = auto_actions_map.begin();
+ TQMap<TQString,TQString>::iterator auto_end = auto_actions_map.end();
for ( ; auto_it!=auto_end; ++auto_it )
{
- QString mime = auto_it.key();
- QString action_id = auto_it.data();
+ TQString mime = auto_it.key();
+ TQString action_id = auto_it.data();
if ( m_idMap.contains( action_id ) )
{
@@ -250,8 +250,8 @@ void NotifierSettings::reload()
}
void NotifierSettings::save()
{
- QValueList<NotifierAction*>::iterator act_it = m_actions.begin();
- QValueList<NotifierAction*>::iterator act_end = m_actions.end();
+ TQValueList<NotifierAction*>::iterator act_it = m_actions.begin();
+ TQValueList<NotifierAction*>::iterator act_end = m_actions.end();
for ( ; act_it!=act_end; ++act_it )
{
@@ -267,15 +267,15 @@ void NotifierSettings::save()
{
NotifierServiceAction *a = m_deletedActions.first();
m_deletedActions.remove( a );
- QFile::remove( a->filePath() );
+ TQFile::remove( a->filePath() );
delete a;
}
KSimpleConfig config( "medianotifierrc" );
config.setGroup( "Auto Actions" );
- QMap<QString,NotifierAction*>::iterator auto_it = m_autoMimetypesMap.begin();
- QMap<QString,NotifierAction*>::iterator auto_end = m_autoMimetypesMap.end();
+ TQMap<TQString,NotifierAction*>::iterator auto_it = m_autoMimetypesMap.begin();
+ TQMap<TQString,NotifierAction*>::iterator auto_end = m_autoMimetypesMap.end();
for ( ; auto_it!=auto_end; ++auto_it )
{
@@ -290,20 +290,20 @@ void NotifierSettings::save()
}
}
-QValueList<NotifierServiceAction*> NotifierSettings::loadActions( KDesktopFile &desktop ) const
+TQValueList<NotifierServiceAction*> NotifierSettings::loadActions( KDesktopFile &desktop ) const
{
desktop.setDesktopGroup();
- QValueList<NotifierServiceAction*> services;
+ TQValueList<NotifierServiceAction*> services;
- const QString filename = desktop.fileName();
- const QStringList mimetypes = desktop.readListEntry( "ServiceTypes" );
+ const TQString filename = desktop.fileName();
+ const TQStringList mimetypes = desktop.readListEntry( "ServiceTypes" );
- QValueList<KDEDesktopMimeType::Service> type_services
+ TQValueList<KDEDesktopMimeType::Service> type_services
= KDEDesktopMimeType::userDefinedServices(filename, true);
- QValueList<KDEDesktopMimeType::Service>::iterator service_it = type_services.begin();
- QValueList<KDEDesktopMimeType::Service>::iterator service_end = type_services.end();
+ TQValueList<KDEDesktopMimeType::Service>::iterator service_it = type_services.begin();
+ TQValueList<KDEDesktopMimeType::Service>::iterator service_end = type_services.end();
for (; service_it!=service_end; ++service_it)
{
NotifierServiceAction *service_action
@@ -320,7 +320,7 @@ QValueList<NotifierServiceAction*> NotifierSettings::loadActions( KDesktopFile &
}
-bool NotifierSettings::shouldLoadActions( KDesktopFile &desktop, const QString &mimetype ) const
+bool NotifierSettings::shouldLoadActions( KDesktopFile &desktop, const TQString &mimetype ) const
{
desktop.setDesktopGroup();
@@ -328,19 +328,19 @@ bool NotifierSettings::shouldLoadActions( KDesktopFile &desktop, const QString &
&& desktop.hasKey( "ServiceTypes" )
&& !desktop.readBoolEntry( "X-KDE-MediaNotifierHide", false ) )
{
- const QStringList actions = desktop.readListEntry( "Actions" );
+ const TQStringList actions = desktop.readListEntry( "Actions" );
if ( actions.size()!=1 )
{
return false;
}
- const QStringList types = desktop.readListEntry( "ServiceTypes" );
+ const TQStringList types = desktop.readListEntry( "ServiceTypes" );
if ( mimetype.isEmpty() )
{
- QStringList::ConstIterator type_it = types.begin();
- QStringList::ConstIterator type_end = types.end();
+ TQStringList::ConstIterator type_it = types.begin();
+ TQStringList::ConstIterator type_end = types.end();
for (; type_it != type_end; ++type_it)
{
if ( (*type_it).startsWith( "media/" ) )
@@ -358,25 +358,25 @@ bool NotifierSettings::shouldLoadActions( KDesktopFile &desktop, const QString &
return false;
}
-QValueList<NotifierServiceAction*> NotifierSettings::listServices( const QString &mimetype ) const
+TQValueList<NotifierServiceAction*> NotifierSettings::listServices( const TQString &mimetype ) const
{
- QValueList<NotifierServiceAction*> services;
- QStringList dirs = KGlobal::dirs()->findDirs("data", "konqueror/servicemenus/");
+ TQValueList<NotifierServiceAction*> services;
+ TQStringList dirs = KGlobal::dirs()->findDirs("data", "konqueror/servicemenus/");
- QStringList::ConstIterator dir_it = dirs.begin();
- QStringList::ConstIterator dir_end = dirs.end();
+ TQStringList::ConstIterator dir_it = dirs.begin();
+ TQStringList::ConstIterator dir_end = dirs.end();
for (; dir_it != dir_end; ++dir_it)
{
- QDir dir( *dir_it );
+ TQDir dir( *dir_it );
- QStringList entries = dir.entryList( "*.desktop", QDir::Files );
+ TQStringList entries = dir.entryList( "*.desktop", TQDir::Files );
- QStringList::ConstIterator entry_it = entries.begin();
- QStringList::ConstIterator entry_end = entries.end();
+ TQStringList::ConstIterator entry_it = entries.begin();
+ TQStringList::ConstIterator entry_end = entries.end();
for (; entry_it != entry_end; ++entry_it )
{
- QString filename = *dir_it + *entry_it;
+ TQString filename = *dir_it + *entry_it;
KDesktopFile desktop( filename, true );
diff --git a/kioslave/media/libmediacommon/notifiersettings.h b/kioslave/media/libmediacommon/notifiersettings.h
index 6ddee318b..dee5c440b 100644
--- a/kioslave/media/libmediacommon/notifiersettings.h
+++ b/kioslave/media/libmediacommon/notifiersettings.h
@@ -20,8 +20,8 @@
#ifndef _NOTIFIERSETTINGS_H_
#define _NOTIFIERSETTINGS_H_
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
#include "notifieraction.h"
#include "notifierserviceaction.h"
@@ -33,31 +33,31 @@ public:
NotifierSettings();
~NotifierSettings();
- QValueList<NotifierAction*> actions();
- QValueList<NotifierAction*> actionsForMimetype( const QString &mimetype );
+ TQValueList<NotifierAction*> actions();
+ TQValueList<NotifierAction*> actionsForMimetype( const TQString &mimetype );
bool addAction( NotifierServiceAction *action );
bool deleteAction( NotifierServiceAction *action );
- void setAutoAction( const QString &mimetype, NotifierAction *action );
- void resetAutoAction( const QString &mimetype );
+ void setAutoAction( const TQString &mimetype, NotifierAction *action );
+ void resetAutoAction( const TQString &mimetype );
void clearAutoActions();
- NotifierAction *autoActionForMimetype( const QString &mimetype );
+ NotifierAction *autoActionForMimetype( const TQString &mimetype );
- const QStringList &supportedMimetypes();
+ const TQStringList &supportedMimetypes();
void reload();
void save();
private:
- QValueList<NotifierServiceAction*> listServices( const QString &mimetype = QString() ) const;
- bool shouldLoadActions( KDesktopFile &desktop, const QString &mimetype ) const;
- QValueList<NotifierServiceAction*> loadActions( KDesktopFile &desktop ) const;
-
- QStringList m_supportedMimetypes;
- QValueList<NotifierAction*> m_actions;
- QValueList<NotifierServiceAction*> m_deletedActions;
- QMap<QString,NotifierAction*> m_idMap;
- QMap<QString,NotifierAction*> m_autoMimetypesMap;
+ TQValueList<NotifierServiceAction*> listServices( const TQString &mimetype = TQString() ) const;
+ bool shouldLoadActions( KDesktopFile &desktop, const TQString &mimetype ) const;
+ TQValueList<NotifierServiceAction*> loadActions( KDesktopFile &desktop ) const;
+
+ TQStringList m_supportedMimetypes;
+ TQValueList<NotifierAction*> m_actions;
+ TQValueList<NotifierServiceAction*> m_deletedActions;
+ TQMap<TQString,NotifierAction*> m_idMap;
+ TQMap<TQString,NotifierAction*> m_autoMimetypesMap;
};
#endif
diff --git a/kioslave/media/mediaimpl.cpp b/kioslave/media/mediaimpl.cpp
index 516bcdb01..fb9e01480 100644
--- a/kioslave/media/mediaimpl.cpp
+++ b/kioslave/media/mediaimpl.cpp
@@ -28,20 +28,20 @@
#include <kmimetype.h>
#include <kapplication.h>
-#include <qeventloop.h>
+#include <tqeventloop.h>
#include <sys/stat.h>
#include "medium.h"
-MediaImpl::MediaImpl() : QObject(), DCOPObject("mediaimpl"), mp_mounting(0L)
+MediaImpl::MediaImpl() : TQObject(), DCOPObject("mediaimpl"), mp_mounting(0L)
{
}
-bool MediaImpl::parseURL(const KURL &url, QString &name, QString &path) const
+bool MediaImpl::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)
@@ -52,13 +52,13 @@ bool MediaImpl::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 MediaImpl::realURL(const QString &name, const QString &path, KURL &url)
+bool MediaImpl::realURL(const TQString &name, const TQString &path, KURL &url)
{
bool ok;
Medium m = findMediumByName(name, ok);
@@ -73,7 +73,7 @@ bool MediaImpl::realURL(const QString &name, const QString &path, KURL &url)
}
-bool MediaImpl::statMedium(const QString &name, KIO::UDSEntry &entry)
+bool MediaImpl::statMedium(const TQString &name, KIO::UDSEntry &entry)
{
kdDebug(1219) << "MediaImpl::statMedium: " << name << endl;
@@ -100,7 +100,7 @@ bool MediaImpl::statMedium(const QString &name, KIO::UDSEntry &entry)
return true;
}
-bool MediaImpl::statMediumByLabel(const QString &label, KIO::UDSEntry &entry)
+bool MediaImpl::statMediumByLabel(const TQString &label, KIO::UDSEntry &entry)
{
kdDebug(1219) << "MediaImpl::statMediumByLabel: " << label << endl;
@@ -114,7 +114,7 @@ bool MediaImpl::statMediumByLabel(const QString &label, KIO::UDSEntry &entry)
return false;
}
- QString name = reply;
+ TQString name = reply;
if (name.isEmpty())
{
@@ -126,7 +126,7 @@ bool MediaImpl::statMediumByLabel(const QString &label, KIO::UDSEntry &entry)
}
-bool MediaImpl::listMedia(QValueList<KIO::UDSEntry> &list)
+bool MediaImpl::listMedia(TQValueList<KIO::UDSEntry> &list)
{
kdDebug(1219) << "MediaImpl::listMedia" << endl;
@@ -159,7 +159,7 @@ bool MediaImpl::listMedia(QValueList<KIO::UDSEntry> &list)
return true;
}
-bool MediaImpl::setUserLabel(const QString &name, const QString &label)
+bool MediaImpl::setUserLabel(const TQString &name, const TQString &label)
{
kdDebug(1219) << "MediaImpl::setUserLabel: " << name << ", " << label << endl;
@@ -175,7 +175,7 @@ bool MediaImpl::setUserLabel(const QString &name, const QString &label)
}
else
{
- QString returned_name = reply;
+ TQString returned_name = reply;
if (!returned_name.isEmpty()
&& returned_name!=name)
{
@@ -199,7 +199,7 @@ bool MediaImpl::setUserLabel(const QString &name, const QString &label)
}
}
-const Medium MediaImpl::findMediumByName(const QString &name, bool &ok)
+const Medium MediaImpl::findMediumByName(const TQString &name, bool &ok)
{
DCOPRef mediamanager("kded", "mediamanager");
DCOPReply reply = mediamanager.call( "properties", name );
@@ -246,16 +246,16 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
medium.deviceNode(),
medium.mountPoint());
job->setAutoWarningHandlingEnabled(false);
- connect( job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotMountResult( KIO::Job * ) ) );
- connect( job, SIGNAL( warning( KIO::Job *, const QString & ) ),
- this, SLOT( slotWarning( KIO::Job *, const QString & ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotMountResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( warning( KIO::Job *, const TQString & ) ),
+ this, TQT_SLOT( slotWarning( KIO::Job *, const TQString & ) ) );
*/
kapp->dcopClient()
->connectDCOPSignal("kded", "mediamanager",
- "mediumChanged(QString, bool)",
+ "mediumChanged(TQString, bool)",
"mediaimpl",
- "slotMediumChanged(QString)",
+ "slotMediumChanged(TQString)",
false);
DCOPRef mediamanager("kded", "mediamanager");
@@ -274,9 +274,9 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
kapp->dcopClient()
->disconnectDCOPSignal("kded", "mediamanager",
- "mediumChanged(QString, bool)",
+ "mediumChanged(TQString, bool)",
"mediaimpl",
- "slotMediumChanged(QString)");
+ "slotMediumChanged(TQString)");
return m_lastErrorCode==0;
}
@@ -284,7 +284,7 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
return true;
}
-void MediaImpl::slotWarning( KIO::Job * /*job*/, const QString &msg )
+void MediaImpl::slotWarning( KIO::Job * /*job*/, const TQString &msg )
{
emit warning( msg );
}
@@ -301,7 +301,7 @@ void MediaImpl::slotMountResult(KIO::Job *job)
}
}
-void MediaImpl::slotMediumChanged(const QString &name)
+void MediaImpl::slotMediumChanged(const TQString &name)
{
kdDebug(1219) << "MediaImpl::slotMediumChanged:" << name << endl;
@@ -315,7 +315,7 @@ void MediaImpl::slotMediumChanged(const QString &name)
}
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;
@@ -353,10 +353,10 @@ KIO::UDSEntry MediaImpl::extractUrlInfos(const KURL &url)
KIO::StatJob *job = KIO::stat(url, false);
job->setAutoWarningHandlingEnabled( false );
- connect( job, SIGNAL( result(KIO::Job *) ),
- this, SLOT( slotStatResult(KIO::Job *) ) );
- connect( job, SIGNAL( warning( KIO::Job *, const QString & ) ),
- this, SLOT( slotWarning( KIO::Job *, const QString & ) ) );
+ connect( job, TQT_SIGNAL( result(KIO::Job *) ),
+ this, TQT_SLOT( slotStatResult(KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( warning( KIO::Job *, const TQString & ) ),
+ this, TQT_SLOT( slotWarning( KIO::Job *, const TQString & ) ) );
qApp->eventLoop()->enterLoop();
KIO::UDSEntry::iterator it = m_entryBuffer.begin();
@@ -395,7 +395,7 @@ void MediaImpl::createMediumEntry(KIO::UDSEntry& entry,
{
kdDebug(1219) << "MediaProtocol::createMedium" << endl;
- QString url = "media:/"+medium.name();
+ TQString url = "media:/"+medium.name();
kdDebug(1219) << "url = " << url << ", mime = " << medium.mimeType() << endl;
@@ -403,7 +403,7 @@ void MediaImpl::createMediumEntry(KIO::UDSEntry& entry,
addAtom(entry, KIO::UDS_URL, 0, url);
- QString label = KIO::encodeFileName( medium.prettyLabel() );
+ TQString label = KIO::encodeFileName( medium.prettyLabel() );
addAtom(entry, KIO::UDS_NAME, 0, label);
addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
@@ -417,8 +417,8 @@ void MediaImpl::createMediumEntry(KIO::UDSEntry& entry,
}
else
{
- QString mime = medium.mimeType();
- QString icon = KMimeType::mimeType(mime)->icon(mime, false);
+ TQString mime = medium.mimeType();
+ TQString icon = KMimeType::mimeType(mime)->icon(mime, false);
addAtom(entry, KIO::UDS_ICON_NAME, 0, icon);
}
diff --git a/kioslave/media/mediaimpl.h b/kioslave/media/mediaimpl.h
index 2d82aefda..92b1d0202 100644
--- a/kioslave/media/mediaimpl.h
+++ b/kioslave/media/mediaimpl.h
@@ -25,43 +25,43 @@
#include <kurl.h>
#include <dcopobject.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include "medium.h"
-class MediaImpl : public QObject, public DCOPObject
+class MediaImpl : public TQObject, public DCOPObject
{
Q_OBJECT
K_DCOP
public:
MediaImpl();
- 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 statMedium(const QString &name, KIO::UDSEntry &entry);
- bool statMediumByLabel(const QString &label, KIO::UDSEntry &entry);
- bool listMedia(QValueList<KIO::UDSEntry> &list);
- bool setUserLabel(const QString &name, const QString &label);
+ bool statMedium(const TQString &name, KIO::UDSEntry &entry);
+ bool statMediumByLabel(const TQString &label, KIO::UDSEntry &entry);
+ bool listMedia(TQValueList<KIO::UDSEntry> &list);
+ bool setUserLabel(const TQString &name, const TQString &label);
void createTopLevelEntry(KIO::UDSEntry& entry) const;
int lastErrorCode() const { return m_lastErrorCode; }
- QString lastErrorMessage() const { return m_lastErrorMessage; }
+ TQString lastErrorMessage() const { return m_lastErrorMessage; }
k_dcop:
- void slotMediumChanged(const QString &name);
+ void slotMediumChanged(const TQString &name);
signals:
- void warning(const QString &msg);
+ void warning(const TQString &msg);
private slots:
- void slotWarning(KIO::Job *job, const QString &msg);
+ void slotWarning(KIO::Job *job, const TQString &msg);
void slotMountResult(KIO::Job *job);
void slotStatResult(KIO::Job *job);
private:
- const Medium findMediumByName(const QString &name, bool &ok);
+ const Medium findMediumByName(const TQString &name, bool &ok);
bool ensureMediumMounted(Medium &medium);
KIO::UDSEntry extractUrlInfos(const KURL &url);
@@ -75,7 +75,7 @@ private:
/// Last error code stored in class to simplify API.
/// Note that this means almost no method can be const.
int m_lastErrorCode;
- QString m_lastErrorMessage;
+ TQString m_lastErrorMessage;
};
#endif
diff --git a/kioslave/media/mediamanager/fstabbackend.cpp b/kioslave/media/mediamanager/fstabbackend.cpp
index 4ffcf4b2d..189f52aee 100644
--- a/kioslave/media/mediamanager/fstabbackend.cpp
+++ b/kioslave/media/mediamanager/fstabbackend.cpp
@@ -33,7 +33,7 @@
#define CDC_CD_R 0x2000 /* drive is a CD-R */
#define CDC_CD_RW 0x4000 /* drive is a CD-RW */
#define CDC_DVD 0x8000 /* drive is a DVD */
-#include <qfile.h>
+#include <tqfile.h>
#endif
#include <klocale.h>
@@ -56,13 +56,13 @@
FstabBackend::FstabBackend(MediaList &list, bool networkSharesOnly)
- : QObject(), BackendBase(list), m_networkSharesOnly(networkSharesOnly)
+ : TQObject(), BackendBase(list), m_networkSharesOnly(networkSharesOnly)
{
KDirWatch::self()->addFile(MTAB);
KDirWatch::self()->addFile(FSTAB);
- connect( KDirWatch::self(), SIGNAL( dirty(const QString&) ),
- this, SLOT( slotDirty(const QString&) ) );
+ connect( KDirWatch::self(), TQT_SIGNAL( dirty(const TQString&) ),
+ this, TQT_SLOT( slotDirty(const TQString&) ) );
handleFstabChange(false);
handleMtabChange(false);
@@ -70,16 +70,16 @@ FstabBackend::FstabBackend(MediaList &list, bool networkSharesOnly)
KDirWatch::self()->startScan();
#ifdef Q_OS_FREEBSD
- connect( &m_mtabTimer, SIGNAL( timeout() ),
- this, SLOT( handleMtabChange() ) );
+ connect( &m_mtabTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( handleMtabChange() ) );
m_mtabTimer.start(250);
#endif
}
FstabBackend::~FstabBackend()
{
- QStringList::iterator it = m_mtabIds.begin();
- QStringList::iterator end = m_mtabIds.end();
+ TQStringList::iterator it = m_mtabIds.begin();
+ TQStringList::iterator end = m_mtabIds.end();
for (; it!=end; ++it)
{
@@ -97,27 +97,27 @@ FstabBackend::~FstabBackend()
KDirWatch::self()->removeFile(MTAB);
}
-QString FstabBackend::mount( const QString &_udi )
+TQString FstabBackend::mount( const TQString &_udi )
{
const Medium* medium = m_mediaList.findById(_udi);
if (!medium)
return i18n("No such medium: %1").arg(_udi);
KIO::Job* job = KIO::mount( false, 0, medium->deviceNode(), medium->mountPoint());
KIO::NetAccess::synchronousRun( job, 0 );
- return QString::null;
+ return TQString::null;
}
-QString FstabBackend::unmount( const QString &_udi )
+TQString FstabBackend::unmount( const TQString &_udi )
{
const Medium* medium = m_mediaList.findById(_udi);
if (!medium)
return i18n("No such medium: %1").arg(_udi);
KIO::Job* job = KIO::unmount( medium->mountPoint(), false);
KIO::NetAccess::synchronousRun( job, 0 );
- return QString::null;
+ return TQString::null;
}
-void FstabBackend::slotDirty(const QString &path)
+void FstabBackend::slotDirty(const TQString &path)
{
if (path==MTAB)
{
@@ -169,7 +169,7 @@ bool inExclusionPattern(KMountPoint *mount, bool networkSharesOnly)
void FstabBackend::handleMtabChange(bool allowNotification)
{
- QStringList new_mtabIds;
+ TQStringList new_mtabIds;
KMountPoint::List mtab = KMountPoint::currentMountPoints();
KMountPoint::List::iterator it = mtab.begin();
@@ -177,28 +177,28 @@ void FstabBackend::handleMtabChange(bool allowNotification)
for (; it!=end; ++it)
{
- QString dev = (*it)->mountedFrom();
- QString mp = (*it)->mountPoint();
- QString fs = (*it)->mountType();
+ TQString dev = (*it)->mountedFrom();
+ TQString mp = (*it)->mountPoint();
+ TQString fs = (*it)->mountType();
if ( ::inExclusionPattern(*it, m_networkSharesOnly) ) continue;
/* Did we know this already before ? If yes, then
nothing has changed, do not stat the mount point. Avoids
hang if network shares are stalling */
- QString mtabEntry = dev + "*" + mp + "*" + fs;
+ TQString mtabEntry = dev + "*" + mp + "*" + fs;
if(m_mtabEntries.contains(mtabEntry)) {
new_mtabIds += m_mtabEntries[mtabEntry];
continue;
}
- QString id = generateId(dev, mp);
+ TQString id = generateId(dev, mp);
new_mtabIds+=id;
m_mtabEntries[mtabEntry] = id;
if ( !m_mtabIds.contains(id) && m_fstabIds.contains(id) )
{
- QString mime, icon, label;
+ TQString mime, icon, label;
guess(dev, mp, fs, true, mime, icon, label);
m_mediaList.changeMediumState(id, true, false,
mime, icon, label);
@@ -206,13 +206,13 @@ void FstabBackend::handleMtabChange(bool allowNotification)
#if 0
else if ( !m_mtabIds.contains(id) )
{
- QString name = generateName(dev, fs);
+ TQString name = generateName(dev, fs);
Medium *m = new Medium(id, name);
m->mountableState(dev, mp, fs, true);
- QString mime, icon, label;
+ TQString mime, icon, label;
guess(dev, mp, fs, true, mime, icon, label);
m->setMimeType(mime);
@@ -224,8 +224,8 @@ void FstabBackend::handleMtabChange(bool allowNotification)
#endif
}
- QStringList::iterator it2 = m_mtabIds.begin();
- QStringList::iterator end2 = m_mtabIds.end();
+ TQStringList::iterator it2 = m_mtabIds.begin();
+ TQStringList::iterator end2 = m_mtabIds.end();
for (; it2!=end2; ++it2)
{
@@ -233,15 +233,15 @@ void FstabBackend::handleMtabChange(bool allowNotification)
{
const Medium *medium = m_mediaList.findById(*it2);
- QString dev = medium->deviceNode();
- QString mp = medium->mountPoint();
- QString fs = medium->fsType();
+ TQString dev = medium->deviceNode();
+ TQString mp = medium->mountPoint();
+ TQString fs = medium->fsType();
- QString mtabEntry = dev + "*" + mp + "*" + fs;
+ TQString mtabEntry = dev + "*" + mp + "*" + fs;
m_mtabEntries.remove(mtabEntry);
- QString mime, icon, label;
+ TQString mime, icon, label;
guess(dev, mp, fs, false, mime, icon, label);
m_mediaList.changeMediumState(*it2, false, false,
@@ -260,7 +260,7 @@ void FstabBackend::handleMtabChange(bool allowNotification)
void FstabBackend::handleFstabChange(bool allowNotification)
{
- QStringList new_fstabIds;
+ TQStringList new_fstabIds;
KMountPoint::List fstab = KMountPoint::possibleMountPoints();
KMountPoint::List::iterator it = fstab.begin();
@@ -268,24 +268,24 @@ void FstabBackend::handleFstabChange(bool allowNotification)
for (; it!=end; ++it)
{
- QString dev = (*it)->mountedFrom();
- QString mp = (*it)->mountPoint();
- QString fs = (*it)->mountType();
+ TQString dev = (*it)->mountedFrom();
+ TQString mp = (*it)->mountPoint();
+ TQString fs = (*it)->mountType();
if ( ::inExclusionPattern(*it, m_networkSharesOnly) ) continue;
- QString id = generateId(dev, mp);
+ TQString id = generateId(dev, mp);
new_fstabIds+=id;
if ( !m_fstabIds.contains(id) )
{
- QString name = generateName(dev, fs);
+ TQString name = generateName(dev, fs);
Medium *m = new Medium(id, name);
m->mountableState(dev, mp, fs, false);
- QString mime, icon, label;
+ TQString mime, icon, label;
guess(dev, mp, fs, false, mime, icon, label);
m->setMimeType(mime);
@@ -296,8 +296,8 @@ void FstabBackend::handleFstabChange(bool allowNotification)
}
}
- QStringList::iterator it2 = m_fstabIds.begin();
- QStringList::iterator end2 = m_fstabIds.end();
+ TQStringList::iterator it2 = m_fstabIds.begin();
+ TQStringList::iterator end2 = m_fstabIds.end();
for (; it2!=end2; ++it2)
{
@@ -310,18 +310,18 @@ void FstabBackend::handleFstabChange(bool allowNotification)
m_fstabIds = new_fstabIds;
}
-QString FstabBackend::generateId(const QString &devNode,
- const QString &mountPoint)
+TQString FstabBackend::generateId(const TQString &devNode,
+ const TQString &mountPoint)
{
- QString d = KStandardDirs::realFilePath(devNode);
- QString m = KStandardDirs::realPath(mountPoint);
+ TQString d = KStandardDirs::realFilePath(devNode);
+ TQString m = KStandardDirs::realPath(mountPoint);
return "/org/kde/mediamanager/fstab/"
+d.replace("/", "")
+m.replace("/", "");
}
-QString FstabBackend::generateName(const QString &devNode, const QString &fsType)
+TQString FstabBackend::generateName(const TQString &devNode, const TQString &fsType)
{
KURL url( devNode );
@@ -335,19 +335,19 @@ QString FstabBackend::generateName(const QString &devNode, const QString &fsType
}
}
-void FstabBackend::guess(const QString &devNode, const QString &mountPoint,
- const QString &fsType, bool mounted,
- QString &mimeType, QString &iconName, QString &label)
+void FstabBackend::guess(const TQString &devNode, const TQString &mountPoint,
+ const TQString &fsType, bool mounted,
+ TQString &mimeType, TQString &iconName, TQString &label)
{
enum { UNKNOWN, CD, CDWRITER, DVD, DVDWRITER } devType = UNKNOWN;
#ifdef __linux__
// Guessing device types by mount point is not exactly accurate...
// Do something accurate first, and fall back if necessary.
- int device=open(QFile::encodeName(devNode), O_RDONLY|O_NONBLOCK);
+ int device=open(TQFile::encodeName(devNode), O_RDONLY|O_NONBLOCK);
if(device>=0)
{
bool isCd=false;
- QString devname=devNode.section('/', -1);
+ TQString devname=devNode.section('/', -1);
if(devname.startsWith("scd") || devname.startsWith("sr"))
{
// SCSI CD/DVD drive
@@ -358,10 +358,10 @@ void FstabBackend::guess(const QString &devNode, const QString &mountPoint,
// IDE device -- we can't tell if this is a
// CD/DVD drive or harddisk by just looking at the
// filename
- QFile m(QString("/proc/ide/") + devname + "/media");
+ TQFile m(TQString("/proc/ide/") + devname + "/media");
if(m.open(IO_ReadOnly))
{
- QString buf;
+ TQString buf;
m.readLine(buf, 1024);
if(buf.contains("cdrom"))
isCd=true;
@@ -469,7 +469,7 @@ void FstabBackend::guess(const QString &devNode, const QString &mountPoint,
}
else
{
- QString tmp = devNode;
+ TQString tmp = devNode;
if ( tmp.startsWith("/dev/") )
{
tmp = tmp.mid(5);
@@ -477,7 +477,7 @@ void FstabBackend::guess(const QString &devNode, const QString &mountPoint,
label+= " (" + tmp + ")";
}
mimeType+= (mounted ? "_mounted" : "_unmounted");
- iconName = QString::null;
+ iconName = TQString::null;
}
#include "fstabbackend.moc"
diff --git a/kioslave/media/mediamanager/fstabbackend.h b/kioslave/media/mediamanager/fstabbackend.h
index ceb2f23ef..e43ed48c0 100644
--- a/kioslave/media/mediamanager/fstabbackend.h
+++ b/kioslave/media/mediamanager/fstabbackend.h
@@ -21,15 +21,15 @@
#include "backendbase.h"
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
#ifdef Q_OS_FREEBSD
-#include <qtimer.h>
+#include <tqtimer.h>
#endif
-class FstabBackend : public QObject, public BackendBase
+class FstabBackend : public TQObject, public BackendBase
{
Q_OBJECT
@@ -37,31 +37,31 @@ public:
FstabBackend(MediaList &list, bool networkSharesOnly = false);
virtual ~FstabBackend();
- static void guess(const QString &devNode, const QString &mountPoint,
- const QString &fsType, bool mounted,
- QString &mimeType, QString &iconName,
- QString &label);
+ static void guess(const TQString &devNode, const TQString &mountPoint,
+ const TQString &fsType, bool mounted,
+ TQString &mimeType, TQString &iconName,
+ TQString &label);
- QString mount(const QString &id);
- QString unmount(const QString &id);
+ TQString mount(const TQString &id);
+ TQString unmount(const TQString &id);
private slots:
- void slotDirty(const QString &path);
+ void slotDirty(const TQString &path);
void handleFstabChange(bool allowNotification = true);
void handleMtabChange(bool allowNotification = true);
private:
- static QString generateId(const QString &devNode,
- const QString &mountPoint);
- static QString generateName(const QString &devNode,
- const QString &fsType);
+ static TQString generateId(const TQString &devNode,
+ const TQString &mountPoint);
+ static TQString generateName(const TQString &devNode,
+ const TQString &fsType);
bool m_networkSharesOnly;
- QStringList m_mtabIds;
- QMap<QString, QString> m_mtabEntries;
- QStringList m_fstabIds;
+ TQStringList m_mtabIds;
+ TQMap<TQString, TQString> m_mtabEntries;
+ TQStringList m_fstabIds;
#ifdef Q_OS_FREEBSD
- QTimer m_mtabTimer;
+ TQTimer m_mtabTimer;
#endif
};
diff --git a/kioslave/media/mediamanager/halbackend.cpp b/kioslave/media/mediamanager/halbackend.cpp
index 4d6d9b19d..b6763ee84 100644
--- a/kioslave/media/mediamanager/halbackend.cpp
+++ b/kioslave/media/mediamanager/halbackend.cpp
@@ -24,14 +24,14 @@
#include <kapplication.h>
#include <kmessagebox.h>
-#include <qeventloop.h>
-#include <qfile.h>
+#include <tqeventloop.h>
+#include <tqfile.h>
#include <klocale.h>
#include <kurl.h>
#include <kdebug.h>
#include <kprocess.h>
#include <kconfig.h>
-#include <qstylesheet.h>
+#include <tqstylesheet.h>
#include <kmountpoint.h>
#include <kmessagebox.h>
#include <kio/job.h>
@@ -39,22 +39,22 @@
#include <kprocess.h>
#define MOUNT_SUFFIX ( \
- (medium->isMounted() ? QString("_mounted") : QString("_unmounted")) + \
+ (medium->isMounted() ? TQString("_mounted") : TQString("_unmounted")) + \
(medium->isEncrypted() ? (halClearVolume ? "_decrypted" : "_encrypted") : "" ) \
)
#define MOUNT_ICON_SUFFIX ( \
- (medium->isMounted() ? QString("_mount") : QString("_unmount")) + \
+ (medium->isMounted() ? TQString("_mount") : TQString("_unmount")) + \
(medium->isEncrypted() ? (halClearVolume ? "_decrypt" : "_encrypt") : "" ) \
)
/* Static instance of this class, for static HAL callbacks */
static HALBackend* s_HALBackend;
-/* A macro function to convert HAL string properties to QString */
-QString libhal_device_get_property_QString(LibHalContext *ctx, const char* udi, const char *key)
+/* A macro function to convert HAL string properties to TQString */
+TQString libhal_device_get_property_QString(LibHalContext *ctx, const char* udi, const char *key)
{
char* _ppt_string;
- QString _ppt_QString;
+ TQString _ppt_QString;
DBusError error;
dbus_error_init(&error);
_ppt_string = libhal_device_get_property_string(ctx, udi, key, &error);
@@ -65,8 +65,8 @@ QString libhal_device_get_property_QString(LibHalContext *ctx, const char* udi,
}
/* Constructor */
-HALBackend::HALBackend(MediaList &list, QObject* parent)
- : QObject()
+HALBackend::HALBackend(MediaList &list, TQObject* parent)
+ : TQObject()
, BackendBase(list)
, m_halContext(NULL)
, m_halStoragePolicy(NULL)
@@ -81,8 +81,8 @@ HALBackend::~HALBackend()
/* Close HAL connection */
if (m_halContext)
{
- const QPtrList<Medium> medlist = m_mediaList.list();
- QPtrListIterator<Medium> it (medlist);
+ const TQPtrList<Medium> medlist = m_mediaList.list();
+ TQPtrListIterator<Medium> it (medlist);
for ( const Medium *current_medium = it.current(); current_medium; current_medium = ++it)
{
if( !current_medium->id().startsWith( "/org/kde" ))
@@ -235,7 +235,7 @@ void HALBackend::AddDevice(const char *udi, bool allowNotification)
return;
/* Query drive udi */
- QString driveUdi = libhal_device_get_property_QString(m_halContext, udi, "block.storage_device");
+ TQString driveUdi = libhal_device_get_property_QString(m_halContext, udi, "block.storage_device");
if ( driveUdi.isNull() ) // no storage - no fun
return;
@@ -284,10 +284,10 @@ void HALBackend::AddDevice(const char *udi, bool allowNotification)
m_mediaList.addMedium(medium, allowNotification);
// finally check for automount
- QMap<QString,QString> options = MediaManagerUtils::splitOptions(mountoptions(udi));
+ TQMap<TQString,TQString> options = MediaManagerUtils::splitOptions(mountoptions(udi));
kdDebug() << "automount " << options["automount"] << endl;
if (options["automount"] == "true" && allowNotification ) {
- QString error = mount(medium);
+ TQString error = mount(medium);
if (!error.isEmpty())
kdDebug() << "error " << error << endl;
}
@@ -354,20 +354,20 @@ void HALBackend::ModifyDevice(const char *udi, const char* key)
void HALBackend::DeviceCondition(const char* udi, const char* condition)
{
- QString conditionName = QString(condition);
+ TQString conditionName = TQString(condition);
kdDebug(1219) << "Processing device condition " << conditionName << " for " << udi << endl;
if (conditionName == "EjectPressed") {
const Medium* medium = m_mediaList.findById(udi);
if (!medium) {
/* the ejectpressed appears on the drive and we need to find the volume */
- const QPtrList<Medium> medlist = m_mediaList.list();
- QPtrListIterator<Medium> it (medlist);
+ const TQPtrList<Medium> medlist = m_mediaList.list();
+ TQPtrListIterator<Medium> it (medlist);
for ( const Medium *current_medium = it.current(); current_medium; current_medium = ++it)
{
if( current_medium->id().startsWith( "/org/kde" ))
continue;
- QString driveUdi = libhal_device_get_property_QString(m_halContext, current_medium->id().latin1(), "block.storage_device");
+ TQString driveUdi = libhal_device_get_property_QString(m_halContext, current_medium->id().latin1(), "block.storage_device");
if (driveUdi == udi)
{
medium = current_medium;
@@ -436,7 +436,7 @@ const char* HALBackend::findMediumUdiFromUdi(const char* udi)
libhal_volume_free(halVolume);
/* this is a volume whose drive is registered */
- QString driveUdi = libhal_device_get_property_QString(m_halContext, udi, "block.storage_device");
+ TQString driveUdi = libhal_device_get_property_QString(m_halContext, udi, "block.storage_device");
return findMediumUdiFromUdi(driveUdi.ascii());
}
@@ -446,7 +446,7 @@ const char* HALBackend::findMediumUdiFromUdi(const char* udi)
void HALBackend::ResetProperties(const char* mediumUdi, bool allowNotification)
{
kdDebug(1219) << "HALBackend::setProperties" << endl;
- if ( QString::fromLatin1( mediumUdi ).startsWith( "/org/kde/" ) )
+ if ( TQString::fromLatin1( mediumUdi ).startsWith( "/org/kde/" ) )
{
const Medium *cmedium = m_mediaList.findById(mediumUdi);
if ( cmedium )
@@ -487,7 +487,7 @@ void HALBackend::setVolumeProperties(Medium* medium)
LibHalVolume* halVolume = libhal_volume_from_udi(m_halContext, udi);
if (!halVolume)
return;
- QString driveUdi = libhal_volume_get_storage_device_udi(halVolume);
+ TQString driveUdi = libhal_volume_get_storage_device_udi(halVolume);
LibHalDrive* halDrive = 0;
if ( !driveUdi.isNull() )
halDrive = libhal_drive_from_udi(m_halContext, driveUdi.ascii());
@@ -507,7 +507,7 @@ void HALBackend::setVolumeProperties(Medium* medium)
medium->setEncrypted(true);
char* clearUdi = libhal_volume_crypto_get_clear_volume_udi(m_halContext, halVolume);
- QString clearUdiString;
+ TQString clearUdiString;
if (clearUdi != NULL) {
kdDebug(1219) << "HALBackend::setVolumeProperties : crypto clear volume avail - " << clearUdi << endl;
halClearVolume = libhal_volume_from_udi(m_halContext, clearUdi);
@@ -526,9 +526,9 @@ void HALBackend::setVolumeProperties(Medium* medium)
else
medium->mountableState(
libhal_volume_get_device_file(halVolume), /* Device node */
- QString::null,
- QString::null, /* Mount point */
- QString::null, /* Filesystem type */
+ TQString::null,
+ TQString::null, /* Mount point */
+ TQString::null, /* Filesystem type */
false ); /* Mounted ? */
}
else
@@ -543,12 +543,12 @@ void HALBackend::setVolumeProperties(Medium* medium)
char* name = libhal_volume_policy_compute_display_name(halDrive, halVolume, m_halStoragePolicy);
- QString volume_name = QString::fromUtf8(name);
- QString media_name = volume_name;
+ TQString volume_name = TQString::fromUtf8(name);
+ TQString media_name = volume_name;
medium->setLabel(media_name);
free(name);
- QString mimeType;
+ TQString mimeType;
if (libhal_volume_is_disc(halVolume))
{
mimeType = "media/cdrom" + MOUNT_SUFFIX;
@@ -579,10 +579,10 @@ void HALBackend::setVolumeProperties(Medium* medium)
if (libhal_volume_disc_has_audio(halVolume) && !libhal_volume_disc_has_data(halVolume))
{
mimeType = "media/audiocd";
- medium->unmountableState( "audiocd:/?device=" + QString(libhal_volume_get_device_file(halVolume)) );
+ medium->unmountableState( "audiocd:/?device=" + TQString(libhal_volume_get_device_file(halVolume)) );
}
- medium->setIconName(QString::null);
+ medium->setIconName(TQString::null);
/* check if the disc id a vcd or a video dvd */
DiscType type = LinuxCDPolling::identifyDiscType(libhal_volume_get_device_file(halVolume));
@@ -602,7 +602,7 @@ void HALBackend::setVolumeProperties(Medium* medium)
else
{
mimeType = "media/hdd" + MOUNT_SUFFIX;
- medium->setIconName(QString::null); // reset icon
+ medium->setIconName(TQString::null); // reset icon
if (libhal_drive_is_hotpluggable(halDrive))
{
mimeType = "media/removable" + MOUNT_SUFFIX;
@@ -640,13 +640,13 @@ void HALBackend::setVolumeProperties(Medium* medium)
break;
}
case LIBHAL_DRIVE_TYPE_TAPE:
- medium->setIconName(QString::null); //FIXME need icon
+ medium->setIconName(TQString::null); //FIXME need icon
break;
default:
- medium->setIconName(QString::null);
+ medium->setIconName(TQString::null);
}
- if (medium->isMounted() && QFile::exists(medium->mountPoint() + "/dcim"))
+ if (medium->isMounted() && TQFile::exists(medium->mountPoint() + "/dcim"))
{
mimeType = "media/camera" + MOUNT_SUFFIX;
}
@@ -660,7 +660,7 @@ void HALBackend::setVolumeProperties(Medium* medium)
bool HALBackend::setFstabProperties( Medium *medium )
{
- QString mp = isInFstab(medium);
+ TQString mp = isInFstab(medium);
if (!mp.isNull() && !medium->id().startsWith( "/org/kde" ) )
{
@@ -682,7 +682,7 @@ bool HALBackend::setFstabProperties( Medium *medium )
}
kdDebug() << mp << " " << mounted << " " << medium->deviceNode() << " " << endl;
- QString fstype = medium->fsType();
+ TQString fstype = medium->fsType();
if ( fstype.isNull() )
fstype = "auto";
@@ -713,7 +713,7 @@ bool HALBackend::setFloppyProperties(Medium* medium)
if (!halDrive)
return false;
- QString drive_type = libhal_device_get_property_QString(m_halContext, udi, "storage.drive_type");
+ TQString drive_type = libhal_device_get_property_QString(m_halContext, udi, "storage.drive_type");
if (drive_type == "zip") {
int numVolumes;
@@ -731,7 +731,7 @@ bool HALBackend::setFloppyProperties(Medium* medium)
medium->setLabel(i18n("Unknown Drive"));
// HAL hates floppies - so we have to do it twice ;(
- medium->mountableState(libhal_drive_get_device_file(halDrive), QString::null, QString::null, false);
+ medium->mountableState(libhal_drive_get_device_file(halDrive), TQString::null, TQString::null, false);
setFloppyMountState(medium);
if (drive_type == "floppy")
@@ -753,7 +753,7 @@ bool HALBackend::setFloppyProperties(Medium* medium)
/** @todo And mimtype for JAZ drives ? */
- medium->setIconName(QString::null);
+ medium->setIconName(TQString::null);
libhal_drive_free(halDrive);
@@ -768,8 +768,8 @@ void HALBackend::setFloppyMountState( Medium *medium )
KMountPoint::List::iterator it = mtab.begin();
KMountPoint::List::iterator end = mtab.end();
- QString fstype;
- QString mountpoint;
+ TQString fstype;
+ TQString mountpoint;
for (; it!=end; ++it)
{
if ((*it)->mountedFrom() == medium->deviceNode() )
@@ -795,7 +795,7 @@ void HALBackend::setCameraProperties(Medium* medium)
/** @todo find name */
medium->setName("camera");
- QString device = "camera:/";
+ TQString device = "camera:/";
char *cam = libhal_device_get_property_string(m_halContext, udi, "camera.libgphoto2.name", NULL);
DBusError error;
@@ -812,7 +812,7 @@ void HALBackend::setCameraProperties(Medium* medium)
/** @todo find the rest of this URL */
medium->unmountableState(device);
medium->setMimeType("media/gphoto2camera");
- medium->setIconName(QString::null);
+ medium->setIconName(TQString::null);
if (libhal_device_property_exists(m_halContext, udi, "usb_device.product", NULL))
medium->setLabel(libhal_device_get_property_QString(m_halContext, udi, "usb_device.product"));
else if (libhal_device_property_exists(m_halContext, udi, "usb.product", NULL))
@@ -821,7 +821,7 @@ void HALBackend::setCameraProperties(Medium* medium)
medium->setLabel(i18n("Camera"));
}
-QString HALBackend::generateName(const QString &devNode)
+TQString HALBackend::generateName(const TQString &devNode)
{
return KURL(devNode).fileName();
}
@@ -865,15 +865,15 @@ void HALBackend::hal_device_condition(LibHalContext *ctx, const char *udi,
s_HALBackend->DeviceCondition(udi, condition_name);
}
-QStringList HALBackend::mountoptions(const QString &name)
+TQStringList HALBackend::mountoptions(const TQString &name)
{
const Medium* medium = m_mediaList.findById(name);
if (!medium)
- return QStringList(); // we don't know about that one
+ return TQStringList(); // we don't know about that one
if (!isInFstab(medium).isNull())
- return QStringList(); // not handled by HAL - fstab entry
+ return TQStringList(); // not handled by HAL - fstab entry
- QString volume_udi = name;
+ TQString volume_udi = name;
if (medium->isEncrypted()) {
// see if we have a clear volume
LibHalVolume* halVolume = libhal_volume_from_udi(m_halContext, medium->id().latin1());
@@ -884,12 +884,12 @@ QStringList HALBackend::mountoptions(const QString &name)
libhal_free_string(clearUdi);
} else {
// if not decrypted yet then no mountoptions
- return QStringList();
+ return TQStringList();
}
libhal_volume_free(halVolume);
} else {
// strange...
- return QStringList();
+ return TQStringList();
}
}
@@ -897,24 +897,24 @@ QStringList HALBackend::mountoptions(const QString &name)
config.setGroup(name);
char ** array = libhal_device_get_property_strlist(m_halContext, volume_udi.latin1(), "volume.mount.valid_options", NULL);
- QMap<QString,bool> valids;
+ TQMap<TQString,bool> valids;
for (int index = 0; array && array[index]; ++index) {
- QString t = array[index];
+ TQString t = array[index];
if (t.endsWith("="))
t = t.left(t.length() - 1);
valids[t] = true;
kdDebug() << "valid " << t << endl;
}
libhal_free_string_array(array);
- QStringList result;
- QString tmp;
+ TQStringList result;
+ TQString tmp;
- QString fstype = libhal_device_get_property_QString(m_halContext, volume_udi.latin1(), "volume.fstype");
+ TQString fstype = libhal_device_get_property_QString(m_halContext, volume_udi.latin1(), "volume.fstype");
if (fstype.isNull())
fstype = libhal_device_get_property_QString(m_halContext, volume_udi.latin1(), "volume.policy.mount_filesystem");
- QString drive_udi = libhal_device_get_property_QString(m_halContext, volume_udi.latin1(), "block.storage_device");
+ TQString drive_udi = libhal_device_get_property_QString(m_halContext, volume_udi.latin1(), "block.storage_device");
bool removable = false;
if ( !drive_udi.isNull() )
@@ -932,12 +932,12 @@ QStringList HALBackend::mountoptions(const QString &name)
|| libhal_device_get_property_bool(m_halContext, volume_udi.latin1(), "volume.disc.has_audio", NULL))
value = false;
- result << QString("automount=%1").arg(value ? "true" : "false");
+ result << TQString("automount=%1").arg(value ? "true" : "false");
if (valids.contains("ro"))
{
value = config.readBoolEntry("ro", false);
- tmp = QString("ro=%1").arg(value ? "true" : "false");
+ tmp = TQString("ro=%1").arg(value ? "true" : "false");
if (fstype != "iso9660") // makes no sense
result << tmp;
}
@@ -945,7 +945,7 @@ QStringList HALBackend::mountoptions(const QString &name)
if (valids.contains("quiet"))
{
value = config.readBoolEntry("quiet", false);
- tmp = QString("quiet=%1").arg(value ? "true" : "false");
+ tmp = TQString("quiet=%1").arg(value ? "true" : "false");
if (fstype != "iso9660") // makes no sense
result << tmp;
}
@@ -953,27 +953,27 @@ QStringList HALBackend::mountoptions(const QString &name)
if (valids.contains("flush"))
{
value = config.readBoolEntry("flush", fstype.endsWith("fat"));
- tmp = QString("flush=%1").arg(value ? "true" : "false");
+ tmp = TQString("flush=%1").arg(value ? "true" : "false");
result << tmp;
}
if (valids.contains("uid"))
{
value = config.readBoolEntry("uid", true);
- tmp = QString("uid=%1").arg(value ? "true" : "false");
+ tmp = TQString("uid=%1").arg(value ? "true" : "false");
result << tmp;
}
if (valids.contains("utf8"))
{
value = config.readBoolEntry("utf8", true);
- tmp = QString("utf8=%1").arg(value ? "true" : "false");
+ tmp = TQString("utf8=%1").arg(value ? "true" : "false");
result << tmp;
}
if (valids.contains("shortname"))
{
- QString svalue = config.readEntry("shortname", "lower").lower();
+ TQString svalue = config.readEntry("shortname", "lower").lower();
if (svalue == "winnt")
result << "shortname=winnt";
else if (svalue == "win95")
@@ -991,14 +991,14 @@ QStringList HALBackend::mountoptions(const QString &name)
// check in the same order as `locale` does
char *cType;
if ( (cType = getenv("LC_ALL")) || (cType = getenv("LC_CTYPE")) || (cType = getenv("LANG")) ) {
- result << QString("locale=%1").arg(cType);
+ result << TQString("locale=%1").arg(cType);
}
}
if (valids.contains("sync"))
{
value = config.readBoolEntry("sync", ( valids.contains("flush") && !fstype.endsWith("fat") ) && removable);
- tmp = QString("sync=%1").arg(value ? "true" : "false");
+ tmp = TQString("sync=%1").arg(value ? "true" : "false");
if (fstype != "iso9660") // makes no sense
result << tmp;
}
@@ -1006,12 +1006,12 @@ QStringList HALBackend::mountoptions(const QString &name)
if (valids.contains("noatime"))
{
value = config.readBoolEntry("atime", !fstype.endsWith("fat"));
- tmp = QString("atime=%1").arg(value ? "true" : "false");
+ tmp = TQString("atime=%1").arg(value ? "true" : "false");
if (fstype != "iso9660") // makes no sense
result << tmp;
}
- QString mount_point = libhal_device_get_property_QString(m_halContext, volume_udi.latin1(), "volume.mount_point");
+ TQString mount_point = libhal_device_get_property_QString(m_halContext, volume_udi.latin1(), "volume.mount_point");
if (mount_point.isEmpty())
mount_point = libhal_device_get_property_QString(m_halContext, volume_udi.latin1(), "volume.policy.desired_mount_point");
@@ -1020,12 +1020,12 @@ QStringList HALBackend::mountoptions(const QString &name)
if (!mount_point.startsWith("/"))
mount_point = "/media/" + mount_point;
- result << QString("mountpoint=%1").arg(mount_point);
- result << QString("filesystem=%1").arg(fstype);
+ result << TQString("mountpoint=%1").arg(mount_point);
+ result << TQString("filesystem=%1").arg(fstype);
if (valids.contains("data"))
{
- QString svalue = config.readEntry("journaling").lower();
+ TQString svalue = config.readEntry("journaling").lower();
if (svalue == "ordered")
result << "journaling=ordered";
else if (svalue == "writeback")
@@ -1039,14 +1039,14 @@ QStringList HALBackend::mountoptions(const QString &name)
return result;
}
-bool HALBackend::setMountoptions(const QString &name, const QStringList &options )
+bool HALBackend::setMountoptions(const TQString &name, const TQStringList &options )
{
kdDebug() << "setMountoptions " << name << " " << options << endl;
KConfig config("mediamanagerrc");
config.setGroup(name);
- QMap<QString,QString> valids = MediaManagerUtils::splitOptions(options);
+ TQMap<TQString,TQString> valids = MediaManagerUtils::splitOptions(options);
const char *names[] = { "ro", "quiet", "atime", "uid", "utf8", "flush", "sync", 0 };
for (int index = 0; names[index]; ++index)
@@ -1059,11 +1059,11 @@ bool HALBackend::setMountoptions(const QString &name, const QStringList &options
if (valids.contains("journaling"))
config.writeEntry("journaling", valids["journaling"]);
- if (!mountoptions(name).contains(QString("mountpoint=%1").arg(valids["mountpoint"])))
+ if (!mountoptions(name).contains(TQString("mountpoint=%1").arg(valids["mountpoint"])))
config.writeEntry("mountpoint", valids["mountpoint"]);
if (valids.contains("automount")) {
- QString drive_udi = libhal_device_get_property_QString(m_halContext, name.latin1(), "block.storage_device");
+ TQString drive_udi = libhal_device_get_property_QString(m_halContext, name.latin1(), "block.storage_device");
config.setGroup(drive_udi);
config.writeEntry("automount", valids["automount"]);
}
@@ -1071,8 +1071,8 @@ bool HALBackend::setMountoptions(const QString &name, const QStringList &options
return true;
}
-QString startKdeSudoProcess(const QString& kdesudoPath, const QString& command,
- const QString& dialogCaption, const QString& dialogComment)
+TQString startKdeSudoProcess(const TQString& kdesudoPath, const TQString& command,
+ const TQString& dialogCaption, const TQString& dialogComment)
{
KProcess kdesudoProcess;
@@ -1086,11 +1086,11 @@ QString startKdeSudoProcess(const QString& kdesudoPath, const QString& command,
// @todo handle kdesudo output
kdesudoProcess.start(KProcess::Block);
- return QString();
+ return TQString();
}
-QString startKdeSuProcess(const QString& kdesuPath, const QString& command,
- const QString& dialogCaption)
+TQString startKdeSuProcess(const TQString& kdesuPath, const TQString& command,
+ const TQString& dialogCaption)
{
KProcess kdesuProcess;
@@ -1103,19 +1103,19 @@ QString startKdeSuProcess(const QString& kdesuPath, const QString& command,
// @todo handle kdesu output
kdesuProcess.start(KProcess::Block);
- return QString();
+ return TQString();
}
-QString startPrivilegedProcess(const QString& command, const QString& dialogCaption, const QString& dialogComment)
+TQString startPrivilegedProcess(const TQString& command, const TQString& dialogCaption, const TQString& dialogComment)
{
- QString error;
+ TQString error;
- QString kdesudoPath = KStandardDirs::findExe("kdesudo");
+ TQString kdesudoPath = KStandardDirs::findExe("kdesudo");
if (!kdesudoPath.isEmpty())
error = startKdeSudoProcess(kdesudoPath, command, dialogCaption, dialogComment);
else {
- QString kdesuPath = KStandardDirs::findExe("kdesu");
+ TQString kdesuPath = KStandardDirs::findExe("kdesu");
if (!kdesuPath.isEmpty())
error = startKdeSuProcess(kdesuPath, command, dialogCaption);
@@ -1124,28 +1124,28 @@ QString startPrivilegedProcess(const QString& command, const QString& dialogCapt
return error;
}
-QString privilegedMount(const char* udi, const char* mountPoint, const char** options, int numberOfOptions)
+TQString privilegedMount(const char* udi, const char* mountPoint, const char** options, int numberOfOptions)
{
- QString error;
+ TQString error;
kdDebug() << "run privileged mount for " << udi << endl;
- QString dbusSendPath = KStandardDirs::findExe("dbus-send");
+ TQString dbusSendPath = KStandardDirs::findExe("dbus-send");
// @todo return error message
if (dbusSendPath.isEmpty())
- return QString();
+ return TQString();
- QString mountOptions;
- QTextOStream optionsStream(&mountOptions);
+ TQString mountOptions;
+ TQTextOStream optionsStream(&mountOptions);
for (int optionIndex = 0; optionIndex < numberOfOptions; optionIndex++) {
optionsStream << options[optionIndex];
if (optionIndex < numberOfOptions - 1)
optionsStream << ",";
}
- QString command;
- QTextOStream(&command) << dbusSendPath
+ TQString command;
+ TQTextOStream(&command) << dbusSendPath
<< " --system --print-reply --dest=org.freedesktop.Hal " << udi
<< " org.freedesktop.Hal.Device.Volume.Mount string:" << mountPoint
<< " string: array:string:" << mountOptions;
@@ -1159,20 +1159,20 @@ QString privilegedMount(const char* udi, const char* mountPoint, const char** op
return error;
}
-QString privilegedUnmount(const char* udi)
+TQString privilegedUnmount(const char* udi)
{
- QString error;
+ TQString error;
kdDebug() << "run privileged unmount for " << udi << endl;
- QString dbusSendPath = KStandardDirs::findExe("dbus-send");
+ TQString dbusSendPath = KStandardDirs::findExe("dbus-send");
// @todo return error message
if (dbusSendPath.isEmpty())
- return QString();
+ return TQString();
- QString command;
- QTextOStream(&command) << dbusSendPath
+ TQString command;
+ TQTextOStream(&command) << dbusSendPath
<< " --system --print-reply --dest=org.freedesktop.Hal " << udi
<< " org.freedesktop.Hal.Device.Volume.Unmount array:string:force";
@@ -1185,7 +1185,7 @@ QString privilegedUnmount(const char* udi)
return error;
}
-static QString mount_priv(const char *udi, const char *mount_point, const char **poptions, int noptions,
+static TQString mount_priv(const char *udi, const char *mount_point, const char **poptions, int noptions,
DBusConnection *dbus_connection)
{
DBusMessage *dmesg, *reply;
@@ -1208,12 +1208,12 @@ static QString mount_priv(const char *udi, const char *mount_point, const char *
return i18n("Internal Error");
}
- QString qerror;
+ TQString qerror;
dbus_error_init (&error);
if (!(reply = dbus_connection_send_with_reply_and_block (dbus_connection, dmesg, -1, &error)))
{
- QString qerror = error.message;
+ TQString qerror = error.message;
kdError() << "mount failed for " << udi << ": " << error.name << " - " << qerror << endl;
if ( !strcmp(error.name, "org.freedesktop.Hal.Device.Volume.UnknownFilesystemType"))
qerror = i18n("Invalid filesystem type");
@@ -1242,20 +1242,20 @@ static QString mount_priv(const char *udi, const char *mount_point, const char *
}
-QString HALBackend::listUsingProcesses(const Medium* medium)
+TQString HALBackend::listUsingProcesses(const Medium* medium)
{
- QString proclist, fullmsg;
- QString cmdline = QString("/usr/bin/env fuser -vm %1 2>&1").arg(KProcess::quote(medium->mountPoint()));
+ TQString proclist, fullmsg;
+ TQString cmdline = TQString("/usr/bin/env fuser -vm %1 2>&1").arg(KProcess::quote(medium->mountPoint()));
FILE *fuser = popen(cmdline.latin1(), "r");
uint counter = 0;
if (fuser) {
proclist += "<pre>";
- QTextIStream is(fuser);
- QString tmp;
+ TQTextIStream is(fuser);
+ TQString tmp;
while (!is.atEnd()) {
tmp = is.readLine();
- tmp = QStyleSheet::escape(tmp) + "\n";
+ tmp = TQStyleSheet::escape(tmp) + "\n";
proclist += tmp;
if (counter++ > 10)
@@ -1275,24 +1275,24 @@ QString HALBackend::listUsingProcesses(const Medium* medium)
fullmsg += "<br>" + proclist;
return fullmsg;
} else {
- return QString::null;
+ return TQString::null;
}
}
-QString HALBackend::killUsingProcesses(const Medium* medium)
+TQString HALBackend::killUsingProcesses(const Medium* medium)
{
- QString proclist, fullmsg;
- QString cmdline = QString("/usr/bin/env fuser -vmk %1 2>&1").arg(KProcess::quote(medium->mountPoint()));
+ TQString proclist, fullmsg;
+ TQString cmdline = TQString("/usr/bin/env fuser -vmk %1 2>&1").arg(KProcess::quote(medium->mountPoint()));
FILE *fuser = popen(cmdline.latin1(), "r");
uint counter = 0;
if (fuser) {
proclist += "<pre>";
- QTextIStream is(fuser);
- QString tmp;
+ TQTextIStream is(fuser);
+ TQString tmp;
while (!is.atEnd()) {
tmp = is.readLine();
- tmp = QStyleSheet::escape(tmp) + "\n";
+ tmp = TQStyleSheet::escape(tmp) + "\n";
proclist += tmp;
if (counter++ > 10)
@@ -1310,7 +1310,7 @@ QString HALBackend::killUsingProcesses(const Medium* medium)
fullmsg += "<br>" + proclist;
return fullmsg;
} else {
- return QString::null;
+ return TQString::null;
}
}
@@ -1319,11 +1319,11 @@ void HALBackend::slotResult(KIO::Job *job)
kdDebug() << "slotResult " << mount_jobs[job] << endl;
struct mount_job_data *data = mount_jobs[job];
- QString& qerror = data->errorMessage;
+ TQString& qerror = data->errorMessage;
const Medium* medium = data->medium;
if (job->error() == KIO::ERR_COULD_NOT_UNMOUNT) {
- QString proclist(listUsingProcesses(medium));
+ TQString proclist(listUsingProcesses(medium));
qerror = "<qt>";
qerror += "<p>" + i18n("Unfortunately, the device <b>%1</b> (%2) named <b>'%3'</b> and "
@@ -1352,7 +1352,7 @@ void HALBackend::slotResult(KIO::Job *job)
kapp->eventLoop()->exitLoop();
}
-QString HALBackend::isInFstab(const Medium *medium)
+TQString HALBackend::isInFstab(const Medium *medium)
{
KMountPoint::List fstab = KMountPoint::possibleMountPoints(KMountPoint::NeedMountOptions|KMountPoint::NeedRealDeviceName);
@@ -1361,27 +1361,27 @@ QString HALBackend::isInFstab(const Medium *medium)
for (; it!=end; ++it)
{
- QString reald = (*it)->realDeviceName();
+ TQString reald = (*it)->realDeviceName();
if ( reald.endsWith( "/" ) )
reald = reald.left( reald.length() - 1 );
kdDebug() << "isInFstab -" << medium->deviceNode() << "- -" << reald << "- -" << (*it)->mountedFrom() << "-" << endl;
if ((*it)->mountedFrom() == medium->deviceNode() || ( !medium->deviceNode().isEmpty() && reald == medium->deviceNode() ) )
{
- QStringList opts = (*it)->mountOptions();
+ TQStringList opts = (*it)->mountOptions();
if (opts.contains("user") || opts.contains("users"))
return (*it)->mountPoint();
}
}
- return QString::null;
+ return TQString::null;
}
-QString HALBackend::mount(const Medium *medium)
+TQString HALBackend::mount(const Medium *medium)
{
if (medium->isMounted())
- return QString(); // that was easy
+ return TQString(); // that was easy
- QString mountPoint = isInFstab(medium);
+ TQString mountPoint = isInFstab(medium);
if (!mountPoint.isNull())
{
struct mount_job_data data;
@@ -1390,8 +1390,8 @@ QString HALBackend::mount(const Medium *medium)
kdDebug() << "triggering user mount " << medium->deviceNode() << " " << mountPoint << " " << medium->id() << endl;
KIO::Job *job = KIO::mount( false, 0, medium->deviceNode(), mountPoint );
- connect(job, SIGNAL( result (KIO::Job *)),
- SLOT( slotResult( KIO::Job *)));
+ connect(job, TQT_SIGNAL( result (KIO::Job *)),
+ TQT_SLOT( slotResult( KIO::Job *)));
mount_jobs[job] = &data;
// The caller expects the device to be mounted when the function
// completes. Thus block until the job completes.
@@ -1399,22 +1399,22 @@ QString HALBackend::mount(const Medium *medium)
kapp->eventLoop()->enterLoop();
}
// Return the error message (if any) to the caller
- return (data.error) ? data.errorMessage : QString::null;
+ return (data.error) ? data.errorMessage : TQString::null;
} else if (medium->id().startsWith("/org/kde/") )
return i18n("Permissions denied");
- QStringList soptions;
+ TQStringList soptions;
kdDebug() << "mounting " << medium->id() << "..." << endl;
- QMap<QString,QString> valids = MediaManagerUtils::splitOptions(mountoptions(medium->id()));
+ TQMap<TQString,TQString> valids = MediaManagerUtils::splitOptions(mountoptions(medium->id()));
if (valids["flush"] == "true")
soptions << "flush";
if ((valids["uid"] == "true") && (medium->fsType() != "ntfs"))
{
- soptions << QString("uid=%1").arg(getuid());
+ soptions << TQString("uid=%1").arg(getuid());
}
if (valids["ro"] == "true")
@@ -1433,44 +1433,44 @@ QString HALBackend::mount(const Medium *medium)
soptions << "sync";
if (medium->fsType() == "ntfs") {
- QString fsLocale("locale=");
+ TQString fsLocale("locale=");
fsLocale += setlocale(LC_ALL, "");
soptions << fsLocale;
}
- QString mount_point = valids["mountpoint"];
+ TQString mount_point = valids["mountpoint"];
if (mount_point.startsWith("/media/"))
mount_point = mount_point.mid(7);
if (valids.contains("shortname"))
{
- soptions << QString("shortname=%1").arg(valids["shortname"]);
+ soptions << TQString("shortname=%1").arg(valids["shortname"]);
}
if (valids.contains("locale"))
{
- soptions << QString("locale=%1").arg(valids["locale"]);
+ soptions << TQString("locale=%1").arg(valids["locale"]);
}
if (valids.contains("journaling"))
{
- QString option = valids["journaling"];
+ TQString option = valids["journaling"];
if (option == "data")
- soptions << QString("data=journal");
+ soptions << TQString("data=journal");
else if (option == "writeback")
- soptions << QString("data=writeback");
+ soptions << TQString("data=writeback");
else
- soptions << QString("data=ordered");
+ soptions << TQString("data=ordered");
}
const char **options = new const char*[soptions.size() + 1];
uint noptions = 0;
- for (QStringList::ConstIterator it = soptions.begin(); it != soptions.end(); ++it, ++noptions)
+ for (TQStringList::ConstIterator it = soptions.begin(); it != soptions.end(); ++it, ++noptions)
options[noptions] = (*it).latin1();
options[noptions] = NULL;
- QString qerror = i18n("Cannot mount encrypted drives!");
+ TQString qerror = i18n("Cannot mount encrypted drives!");
if (!medium->isEncrypted()) {
// normal volume
@@ -1496,10 +1496,10 @@ QString HALBackend::mount(const Medium *medium)
medium->setHalMounted(true);
ResetProperties(medium->id().latin1());
- return QString();
+ return TQString();
}
-QString HALBackend::mount(const QString &_udi)
+TQString HALBackend::mount(const TQString &_udi)
{
const Medium* medium = m_mediaList.findById(_udi);
if (!medium)
@@ -1508,7 +1508,7 @@ QString HALBackend::mount(const QString &_udi)
return mount(medium);
}
-QString HALBackend::unmount(const QString &_udi)
+TQString HALBackend::unmount(const TQString &_udi)
{
const Medium* medium = m_mediaList.findById(_udi);
if (!medium)
@@ -1528,9 +1528,9 @@ QString HALBackend::unmount(const QString &_udi)
return i18n("No such medium: %1").arg(_udi);
if (!medium->isMounted())
- return QString(); // that was easy
+ return TQString(); // that was easy
- QString mountPoint = isInFstab(medium);
+ TQString mountPoint = isInFstab(medium);
if (!mountPoint.isNull())
{
struct mount_job_data data;
@@ -1539,8 +1539,8 @@ QString HALBackend::unmount(const QString &_udi)
kdDebug() << "triggering user unmount " << medium->deviceNode() << " " << mountPoint << endl;
KIO::Job *job = KIO::unmount( medium->mountPoint(), false );
- connect(job, SIGNAL( result (KIO::Job *)),
- SLOT( slotResult( KIO::Job *)));
+ connect(job, TQT_SIGNAL( result (KIO::Job *)),
+ TQT_SLOT( slotResult( KIO::Job *)));
mount_jobs[job] = &data;
// The caller expects the device to be unmounted when the function
// completes. Thus block until the job completes.
@@ -1548,13 +1548,13 @@ QString HALBackend::unmount(const QString &_udi)
kapp->eventLoop()->enterLoop();
}
// Return the error message (if any) to the caller
- return (data.error) ? data.errorMessage : QString::null;
+ return (data.error) ? data.errorMessage : TQString::null;
}
DBusMessage *dmesg, *reply;
DBusError error;
const char *options[2];
- QString udi = QString::null;
+ TQString udi = TQString::null;
if (!medium->isEncrypted()) {
// normal volume
@@ -1607,7 +1607,7 @@ QString HALBackend::unmount(const QString &_udi)
if (!(reply = dbus_connection_send_with_reply_and_block (dbus_connection, dmesg, -1, &error)))
{
thisunmounthasfailed = 1;
- QString qerror, reason, origqerror;
+ TQString qerror, reason, origqerror;
if (!strcmp(error.name, "org.freedesktop.Hal.Device.PermissionDeniedByPolicy")) {
qerror = privilegedUnmount(udi.latin1());
@@ -1615,7 +1615,7 @@ QString HALBackend::unmount(const QString &_udi)
if (qerror.isEmpty()) {
dbus_message_unref(dmesg);
dbus_error_free(&error);
- return QString();
+ return TQString();
}
// @todo handle unmount error message
@@ -1675,17 +1675,17 @@ QString HALBackend::unmount(const QString &_udi)
while (dbus_connection_dispatch(dbus_connection) == DBUS_DISPATCH_DATA_REMAINS) ;
- return QString();
+ return TQString();
}
-QString HALBackend::decrypt(const QString &_udi, const QString &password)
+TQString HALBackend::decrypt(const TQString &_udi, const TQString &password)
{
const Medium* medium = m_mediaList.findById(_udi);
if (!medium)
return i18n("No such medium: %1").arg(_udi);
if (!medium->isEncrypted() || !medium->clearDeviceUdi().isNull())
- return QString();
+ return TQString();
const char *udi = medium->id().latin1();
DBusMessage *msg = NULL;
@@ -1702,7 +1702,7 @@ QString HALBackend::decrypt(const QString &_udi, const QString &password)
return i18n("Internal Error");
}
- QCString pwdUtf8 = password.utf8();
+ TQCString pwdUtf8 = password.utf8();
const char *pwd_utf8 = pwdUtf8;
if (!dbus_message_append_args (msg, DBUS_TYPE_STRING, &pwd_utf8, DBUS_TYPE_INVALID)) {
kdDebug() << "decrypt failed for " << udi << ": could not append args to dbus message\n";
@@ -1714,7 +1714,7 @@ QString HALBackend::decrypt(const QString &_udi, const QString &password)
if (!(reply = dbus_connection_send_with_reply_and_block (dbus_connection, msg, -1, &error)) ||
dbus_error_is_set (&error))
{
- QString qerror = i18n("Internal Error");
+ TQString qerror = i18n("Internal Error");
kdDebug() << "decrypt failed for " << udi << ": " << error.name << " " << error.message << endl;
if (strcmp (error.name, "org.freedesktop.Hal.Device.Volume.Crypto.SetupPasswordError") == 0) {
qerror = i18n("Wrong password");
@@ -1730,17 +1730,17 @@ QString HALBackend::decrypt(const QString &_udi, const QString &password)
while (dbus_connection_dispatch(dbus_connection) == DBUS_DISPATCH_DATA_REMAINS) ;
- return QString();
+ return TQString();
}
-QString HALBackend::undecrypt(const QString &_udi)
+TQString HALBackend::undecrypt(const TQString &_udi)
{
const Medium* medium = m_mediaList.findById(_udi);
if (!medium)
return i18n("No such medium: %1").arg(_udi);
if (!medium->isEncrypted() || medium->clearDeviceUdi().isNull())
- return QString();
+ return TQString();
const char *udi = medium->id().latin1();
DBusMessage *msg = NULL;
@@ -1767,7 +1767,7 @@ QString HALBackend::undecrypt(const QString &_udi)
if (!(reply = dbus_connection_send_with_reply_and_block (dbus_connection, msg, -1, &error)) ||
dbus_error_is_set (&error))
{
- QString qerror = i18n("Internal Error");
+ TQString qerror = i18n("Internal Error");
kdDebug() << "teardown failed for " << udi << ": " << error.name << " " << error.message << endl;
dbus_error_free (&error);
dbus_message_unref (msg);
@@ -1782,7 +1782,7 @@ QString HALBackend::undecrypt(const QString &_udi)
while (dbus_connection_dispatch(dbus_connection) == DBUS_DISPATCH_DATA_REMAINS) ;
- return QString();
+ return TQString();
}
#include "halbackend.moc"
diff --git a/kioslave/media/mediamanager/halbackend.h b/kioslave/media/mediamanager/halbackend.h
index c5bdd532c..59c7aa366 100644
--- a/kioslave/media/mediamanager/halbackend.h
+++ b/kioslave/media/mediamanager/halbackend.h
@@ -31,9 +31,9 @@
#include "backendbase.h"
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
#include <config.h>
@@ -49,7 +49,7 @@ namespace KIO {
class Job;
}
-class HALBackend : public QObject, public BackendBase
+class HALBackend : public TQObject, public BackendBase
{
Q_OBJECT
@@ -57,7 +57,7 @@ public:
/**
* Constructor
*/
- HALBackend(MediaList &list, QObject* parent);
+ HALBackend(MediaList &list, TQObject* parent);
/**
* Destructor
@@ -78,15 +78,15 @@ public:
*/
bool ListDevices();
- QStringList mountoptions(const QString &id);
+ TQStringList mountoptions(const TQString &id);
- bool setMountoptions(const QString &id, const QStringList &options);
+ bool setMountoptions(const TQString &id, const TQStringList &options);
- QString mount(const QString &id);
- QString mount(const Medium *medium);
- QString unmount(const QString &id);
- QString decrypt(const QString &id, const QString &password);
- QString undecrypt(const QString &id);
+ TQString mount(const TQString &id);
+ TQString mount(const Medium *medium);
+ TQString unmount(const TQString &id);
+ TQString decrypt(const TQString &id, const TQString &password);
+ TQString undecrypt(const TQString &id);
private:
/**
@@ -142,10 +142,10 @@ private:
void setFloppyMountState( Medium* medium );
bool setFstabProperties(Medium* medium);
void setCameraProperties(Medium* medium);
- QString generateName(const QString &devNode);
- static QString isInFstab(const Medium *medium);
- static QString listUsingProcesses(const Medium *medium);
- static QString killUsingProcesses(const Medium *medium);
+ TQString generateName(const TQString &devNode);
+ static TQString isInFstab(const Medium *medium);
+ static TQString listUsingProcesses(const Medium *medium);
+ static TQString killUsingProcesses(const Medium *medium);
private slots:
void slotResult(KIO::Job *job);
@@ -207,7 +207,7 @@ private:
/**
* Object for the kded module
*/
- QObject* m_parent;
+ TQObject* m_parent;
DBusConnection *dbus_connection;
@@ -222,10 +222,10 @@ private:
// [out] KIO::Error if an error occured during operation. Otherwise, 0
int error;
// [out] Error message to be displayed to the user
- QString errorMessage;
+ TQString errorMessage;
};
- QMap<KIO::Job *, struct mount_job_data*> mount_jobs;
+ TQMap<KIO::Job *, struct mount_job_data*> mount_jobs;
};
#endif /* _HALBACKEND_H_ */
diff --git a/kioslave/media/mediamanager/linuxcdpolling.cpp b/kioslave/media/mediamanager/linuxcdpolling.cpp
index 7519023fe..945fd950a 100644
--- a/kioslave/media/mediamanager/linuxcdpolling.cpp
+++ b/kioslave/media/mediamanager/linuxcdpolling.cpp
@@ -21,9 +21,9 @@
#include "linuxcdpolling.h"
-#include <qthread.h>
-#include <qmutex.h>
-#include <qfile.h>
+#include <tqthread.h>
+#include <tqmutex.h>
+#include <tqfile.h>
#include <kdebug.h>
@@ -113,7 +113,7 @@ DiscType::operator int() const
class PollingThread : public QThread
{
public:
- PollingThread(const QCString &devNode) : m_dev(devNode)
+ PollingThread(const TQCString &devNode) : m_dev(devNode)
{
kdDebug(1219) << "PollingThread::PollingThread("
<< devNode << ")" << endl;
@@ -125,20 +125,20 @@ public:
void stop()
{
- QMutexLocker locker(&m_mutex);
+ TQMutexLocker locker(&m_mutex);
m_stop = true;
}
bool hasChanged()
{
- QMutexLocker locker(&m_mutex);
+ TQMutexLocker locker(&m_mutex);
return m_currentType!=m_lastPollType;
}
DiscType type()
{
- QMutexLocker locker(&m_mutex);
+ TQMutexLocker locker(&m_mutex);
m_currentType = m_lastPollType;
return m_currentType;
}
@@ -165,36 +165,36 @@ protected:
}
private:
- QMutex m_mutex;
+ TQMutex m_mutex;
bool m_stop;
- const QCString m_dev;
+ const TQCString m_dev;
DiscType m_currentType;
DiscType m_lastPollType;
};
LinuxCDPolling::LinuxCDPolling(MediaList &list)
- : QObject(), BackendBase(list)
+ : TQObject(), BackendBase(list)
{
- connect(&m_mediaList, SIGNAL(mediumAdded(const QString &,
- const QString &, bool)),
- this, SLOT(slotMediumAdded(const QString &)) );
+ connect(&m_mediaList, TQT_SIGNAL(mediumAdded(const TQString &,
+ const TQString &, bool)),
+ this, TQT_SLOT(slotMediumAdded(const TQString &)) );
- connect(&m_mediaList, SIGNAL(mediumRemoved(const QString &,
- const QString &, bool)),
- this, SLOT(slotMediumRemoved(const QString &)) );
+ connect(&m_mediaList, TQT_SIGNAL(mediumRemoved(const TQString &,
+ const TQString &, bool)),
+ this, TQT_SLOT(slotMediumRemoved(const TQString &)) );
- connect(&m_mediaList, SIGNAL(mediumStateChanged(const QString &,
- const QString &, bool, bool)),
- this, SLOT(slotMediumStateChanged(const QString &)) );
+ connect(&m_mediaList, TQT_SIGNAL(mediumStateChanged(const TQString &,
+ const TQString &, bool, bool)),
+ this, TQT_SLOT(slotMediumStateChanged(const TQString &)) );
- connect(&m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout()));
+ connect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()));
}
LinuxCDPolling::~LinuxCDPolling()
{
- QMap<QString, PollingThread*>::iterator it = m_threads.begin();
- QMap<QString, PollingThread*>::iterator end = m_threads.end();
+ TQMap<TQString, PollingThread*>::iterator it = m_threads.begin();
+ TQMap<TQString, PollingThread*>::iterator end = m_threads.end();
for(; it!=end; ++it)
{
@@ -205,7 +205,7 @@ LinuxCDPolling::~LinuxCDPolling()
}
}
-void LinuxCDPolling::slotMediumAdded(const QString &id)
+void LinuxCDPolling::slotMediumAdded(const TQString &id)
{
kdDebug(1219) << "LinuxCDPolling::slotMediumAdded(" << id << ")" << endl;
@@ -213,7 +213,7 @@ void LinuxCDPolling::slotMediumAdded(const QString &id)
const Medium *medium = m_mediaList.findById(id);
- QString mime = medium->mimeType();
+ TQString mime = medium->mimeType();
kdDebug(1219) << "mime == " << mime << endl;
if (mime.find("dvd")==-1 && mime.find("cd")==-1) return;
@@ -222,7 +222,7 @@ void LinuxCDPolling::slotMediumAdded(const QString &id)
{
m_excludeNotification.append( id );
- QCString dev = QFile::encodeName( medium->deviceNode() ).data();
+ TQCString dev = TQFile::encodeName( medium->deviceNode() ).data();
PollingThread *thread = new PollingThread(dev);
m_threads[id] = thread;
thread->start();
@@ -230,7 +230,7 @@ void LinuxCDPolling::slotMediumAdded(const QString &id)
}
}
-void LinuxCDPolling::slotMediumRemoved(const QString &id)
+void LinuxCDPolling::slotMediumRemoved(const TQString &id)
{
kdDebug(1219) << "LinuxCDPolling::slotMediumRemoved(" << id << ")" << endl;
@@ -245,14 +245,14 @@ void LinuxCDPolling::slotMediumRemoved(const QString &id)
m_excludeNotification.remove(id);
}
-void LinuxCDPolling::slotMediumStateChanged(const QString &id)
+void LinuxCDPolling::slotMediumStateChanged(const TQString &id)
{
kdDebug(1219) << "LinuxCDPolling::slotMediumStateChanged("
<< id << ")" << endl;
const Medium *medium = m_mediaList.findById(id);
- QString mime = medium->mimeType();
+ TQString mime = medium->mimeType();
kdDebug(1219) << "mime == " << mime << endl;
if (mime.find("dvd")==-1 && mime.find("cd")==-1) return;
@@ -262,7 +262,7 @@ void LinuxCDPolling::slotMediumStateChanged(const QString &id)
// It is just a mount state change, no need to notify
m_excludeNotification.append( id );
- QCString dev = QFile::encodeName( medium->deviceNode() ).data();
+ TQCString dev = TQFile::encodeName( medium->deviceNode() ).data();
PollingThread *thread = new PollingThread(dev);
m_threads[id] = thread;
thread->start();
@@ -288,12 +288,12 @@ void LinuxCDPolling::slotTimeout()
return;
}
- QMap<QString, PollingThread*>::iterator it = m_threads.begin();
- QMap<QString, PollingThread*>::iterator end = m_threads.end();
+ TQMap<TQString, PollingThread*>::iterator it = m_threads.begin();
+ TQMap<TQString, PollingThread*>::iterator end = m_threads.end();
for(; it!=end; ++it)
{
- QString id = it.key();
+ TQString id = it.key();
PollingThread *thread = it.data();
if (thread->hasChanged())
@@ -305,16 +305,16 @@ void LinuxCDPolling::slotTimeout()
}
}
-static QString baseType(const Medium *medium)
+static TQString baseType(const Medium *medium)
{
kdDebug(1219) << "baseType(" << medium->id() << ")" << endl;
- QString devNode = medium->deviceNode();
- QString mountPoint = medium->mountPoint();
- QString fsType = medium->fsType();
+ TQString devNode = medium->deviceNode();
+ TQString mountPoint = medium->mountPoint();
+ TQString fsType = medium->fsType();
bool mounted = medium->isMounted();
- QString mimeType, iconName, label;
+ TQString mimeType, iconName, label;
FstabBackend::guess(devNode, mountPoint, fsType, mounted,
mimeType, iconName, label);
@@ -336,13 +336,13 @@ static void restoreEmptyState(MediaList &list, const Medium *medium,
{
kdDebug(1219) << "restoreEmptyState(" << medium->id() << ")" << endl;
- QString id = medium->id();
- QString devNode = medium->deviceNode();
- QString mountPoint = medium->mountPoint();
- QString fsType = medium->fsType();
+ TQString id = medium->id();
+ TQString devNode = medium->deviceNode();
+ TQString mountPoint = medium->mountPoint();
+ TQString fsType = medium->fsType();
bool mounted = medium->isMounted();
- QString mimeType, iconName, label;
+ TQString mimeType, iconName, label;
FstabBackend::guess(devNode, mountPoint, fsType, mounted,
mimeType, iconName, label);
@@ -357,8 +357,8 @@ void LinuxCDPolling::applyType(DiscType type, const Medium *medium)
kdDebug(1219) << "LinuxCDPolling::applyType(" << type << ", "
<< medium->id() << ")" << endl;
- QString id = medium->id();
- QString dev = medium->deviceNode();
+ TQString id = medium->id();
+ TQString dev = medium->deviceNode();
bool notify = !m_excludeNotification.contains(id);
m_excludeNotification.remove(id);
@@ -402,7 +402,7 @@ void LinuxCDPolling::applyType(DiscType type, const Medium *medium)
}
}
-DiscType LinuxCDPolling::identifyDiscType(const QCString &devNode,
+DiscType LinuxCDPolling::identifyDiscType(const TQCString &devNode,
const DiscType &current)
{
//kdDebug(1219) << "LinuxCDPolling::identifyDiscType("
@@ -475,7 +475,7 @@ DiscType LinuxCDPolling::identifyDiscType(const QCString &devNode,
}
}
-bool LinuxCDPolling::hasDirectory(const QCString &devNode, const QCString &dir)
+bool LinuxCDPolling::hasDirectory(const TQCString &devNode, const TQCString &dir)
{
bool ret = false; // return value
int fd = 0; // file descriptor for drive
@@ -487,7 +487,7 @@ bool LinuxCDPolling::hasDirectory(const QCString &devNode, const QCString &dir)
char dirname[256]; // filename for the current path table entry
int pos = 0; // our position into the path table
int curr_record = 1; // the path table record we're on
- QCString fixed_directory = dir.upper(); // the uppercase version of the "directory" parameter
+ TQCString fixed_directory = dir.upper(); // the uppercase version of the "directory" parameter
// open the drive
fd = open(devNode, O_RDONLY | O_NONBLOCK);
@@ -555,7 +555,7 @@ bool LinuxCDPolling::hasDirectory(const QCString &devNode, const QCString &dir)
break;
}
dirname[len_di] = 0;
- qstrcpy(dirname, QCString(dirname).upper());
+ qstrcpy(dirname, TQCString(dirname).upper());
// if we found a folder that has the root as a parent, and the directory name matches
// then return success
diff --git a/kioslave/media/mediamanager/linuxcdpolling.h b/kioslave/media/mediamanager/linuxcdpolling.h
index 1df113962..3dec7e3ee 100644
--- a/kioslave/media/mediamanager/linuxcdpolling.h
+++ b/kioslave/media/mediamanager/linuxcdpolling.h
@@ -21,10 +21,10 @@
#include "backendbase.h"
-#include <qobject.h>
-#include <qcstring.h>
-#include <qmap.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqcstring.h>
+#include <tqmap.h>
+#include <tqtimer.h>
class DiscType
{
@@ -47,7 +47,7 @@ private:
class PollingThread;
-class LinuxCDPolling : public QObject, public BackendBase
+class LinuxCDPolling : public TQObject, public BackendBase
{
Q_OBJECT
@@ -64,23 +64,23 @@ public:
* @param current the current known state of the drive
* @return the disc type
*/
- static DiscType identifyDiscType(const QCString &devNode,
+ static DiscType identifyDiscType(const TQCString &devNode,
const DiscType &current = DiscType::Unknown);
private slots:
- void slotMediumAdded(const QString &id);
- void slotMediumRemoved(const QString &id);
- void slotMediumStateChanged(const QString &id);
+ void slotMediumAdded(const TQString &id);
+ void slotMediumRemoved(const TQString &id);
+ void slotMediumStateChanged(const TQString &id);
void slotTimeout();
private:
void applyType(DiscType type, const Medium *medium);
- static bool hasDirectory(const QCString &devNode, const QCString &dir);
+ static bool hasDirectory(const TQCString &devNode, const TQCString &dir);
- QMap<QString, PollingThread*> m_threads;
- QStringList m_excludeNotification;
- QTimer m_timer;
+ TQMap<TQString, PollingThread*> m_threads;
+ TQStringList m_excludeNotification;
+ TQTimer m_timer;
};
#endif
diff --git a/kioslave/media/mediamanager/mediadirnotify.cpp b/kioslave/media/mediamanager/mediadirnotify.cpp
index 340414634..9e6658153 100644
--- a/kioslave/media/mediamanager/mediadirnotify.cpp
+++ b/kioslave/media/mediamanager/mediadirnotify.cpp
@@ -36,10 +36,10 @@ KURL::List MediaDirNotify::toMediaURL(const KURL &url)
KURL::List result;
- const QPtrList<Medium> list = m_mediaList.list();
+ const TQPtrList<Medium> list = m_mediaList.list();
- QPtrList<Medium>::const_iterator it = list.begin();
- QPtrList<Medium>::const_iterator end = list.end();
+ TQPtrList<Medium>::const_iterator it = list.begin();
+ TQPtrList<Medium>::const_iterator end = list.end();
for (; it!=end; ++it)
{
@@ -48,7 +48,7 @@ KURL::List MediaDirNotify::toMediaURL(const KURL &url)
if ( base.isParentOf(url) )
{
- QString path = KURL::relativePath(base.path(),
+ TQString path = KURL::relativePath(base.path(),
url.path());
KURL new_url("media:/"+m->name()+"/"+path );
diff --git a/kioslave/media/mediamanager/medialist.cpp b/kioslave/media/mediamanager/medialist.cpp
index 974eddbf6..bb0de6248 100644
--- a/kioslave/media/mediamanager/medialist.cpp
+++ b/kioslave/media/mediamanager/medialist.cpp
@@ -27,14 +27,14 @@ MediaList::MediaList()
m_media.setAutoDelete(true);
}
-const QPtrList<Medium> MediaList::list() const
+const TQPtrList<Medium> MediaList::list() const
{
kdDebug(1219) << "MediaList::list()" << endl;
return m_media;
}
-const Medium *MediaList::findById(const QString &id) const
+const Medium *MediaList::findById(const TQString &id) const
{
kdDebug(1219) << "MediaList::findById(" << id << ")" << endl;
@@ -43,7 +43,7 @@ const Medium *MediaList::findById(const QString &id) const
return m_idMap[id];
}
-const Medium *MediaList::findByName(const QString &name) const
+const Medium *MediaList::findByName(const TQString &name) const
{
kdDebug(1219) << "MediaList::findByName(" << name << ")" << endl;
@@ -52,7 +52,7 @@ const Medium *MediaList::findByName(const QString &name) const
return m_nameMap[name];
}
-const Medium *MediaList::findByClearUdi(const QString &name)
+const Medium *MediaList::findByClearUdi(const TQString &name)
{
kdDebug(1219) << "MediaList::findByClearUdi(" << name << ")" << endl;
@@ -65,17 +65,17 @@ const Medium *MediaList::findByClearUdi(const QString &name)
}
-QString MediaList::addMedium(Medium *medium, bool allowNotification)
+TQString MediaList::addMedium(Medium *medium, bool allowNotification)
{
kdDebug(1219) << "MediaList::addMedium(@" << medium->id() << ")" << endl;
- QString id = medium->id();
- if ( m_idMap.contains(id) ) return QString::null;
+ TQString id = medium->id();
+ if ( m_idMap.contains(id) ) return TQString::null;
m_media.append( medium );
m_idMap[id] = medium;
- QString name = medium->name();
+ TQString name = medium->name();
if ( !m_nameMap.contains(name) )
{
m_nameMap[name] = medium;
@@ -87,15 +87,15 @@ QString MediaList::addMedium(Medium *medium, bool allowNotification)
return name;
}
- QString base_name = name+"_";
+ TQString base_name = name+"_";
int i = 1;
- while ( m_nameMap.contains(base_name+QString::number(i)) )
+ while ( m_nameMap.contains(base_name+TQString::number(i)) )
{
i++;
}
- name = base_name+QString::number(i);
+ name = base_name+TQString::number(i);
medium->setName(name);
m_nameMap[name] = medium;
@@ -105,14 +105,14 @@ QString MediaList::addMedium(Medium *medium, bool allowNotification)
return name;
}
-bool MediaList::removeMedium(const QString &id, bool allowNotification)
+bool MediaList::removeMedium(const TQString &id, bool allowNotification)
{
kdDebug(1219) << "MediaList::removeMedium(" << id << ")" << endl;
if ( !m_idMap.contains(id) ) return false;
Medium *medium = m_idMap[id];
- QString name = medium->name();
+ TQString name = medium->name();
m_idMap.remove(id);
m_nameMap.remove( medium->name() );
@@ -132,10 +132,10 @@ bool MediaList::changeMediumState(const Medium &medium, bool allowNotification)
if ( medium.isMountable() )
{
- QString device_node = medium.deviceNode();
- QString clear_device_udi = medium.clearDeviceUdi();
- QString mount_point = medium.mountPoint();
- QString fs_type = medium.fsType();
+ TQString device_node = medium.deviceNode();
+ TQString clear_device_udi = medium.clearDeviceUdi();
+ TQString mount_point = medium.mountPoint();
+ TQString fs_type = medium.fsType();
bool mounted = medium.isMounted();
m->mountableState( device_node, clear_device_udi, mount_point,
@@ -166,12 +166,12 @@ bool MediaList::changeMediumState(const Medium &medium, bool allowNotification)
return true;
}
-bool MediaList::changeMediumState(const QString &id,
- const QString &baseURL,
+bool MediaList::changeMediumState(const TQString &id,
+ const TQString &baseURL,
bool allowNotification,
- const QString &mimeType,
- const QString &iconName,
- const QString &label)
+ const TQString &mimeType,
+ const TQString &iconName,
+ const TQString &label)
{
kdDebug(1219) << "MediaList::changeMediumState(" << id << ", "
<< baseURL << ", " << mimeType << ", " << iconName << ")"
@@ -204,14 +204,14 @@ bool MediaList::changeMediumState(const QString &id,
return true;
}
-bool MediaList::changeMediumState(const QString &id,
- const QString &deviceNode,
- const QString &mountPoint,
- const QString &fsType, bool mounted,
+bool MediaList::changeMediumState(const TQString &id,
+ const TQString &deviceNode,
+ const TQString &mountPoint,
+ const TQString &fsType, bool mounted,
bool allowNotification,
- const QString &mimeType,
- const QString &iconName,
- const QString &label)
+ const TQString &mimeType,
+ const TQString &iconName,
+ const TQString &label)
{
kdDebug(1219) << "MediaList::changeMediumState(" << id << ", "
<< deviceNode << ", " << mountPoint << ", " << fsType << ", "
@@ -245,11 +245,11 @@ bool MediaList::changeMediumState(const QString &id,
return true;
}
-bool MediaList::changeMediumState(const QString &id, bool mounted,
+bool MediaList::changeMediumState(const TQString &id, bool mounted,
bool allowNotification,
- const QString &mimeType,
- const QString &iconName,
- const QString &label)
+ const TQString &mimeType,
+ const TQString &iconName,
+ const TQString &label)
{
kdDebug(1219) << "MediaList::changeMediumState(" << id << ", "
<< mounted << ", " << mimeType << ", " << iconName << ")"
@@ -282,7 +282,7 @@ bool MediaList::changeMediumState(const QString &id, bool mounted,
return true;
}
-bool MediaList::setUserLabel(const QString &name, const QString &label)
+bool MediaList::setUserLabel(const TQString &name, const TQString &label)
{
kdDebug(1219) << "MediaList::setUserLabel(" << name << ", "
<< label << ")" << endl;
diff --git a/kioslave/media/mediamanager/medialist.h b/kioslave/media/mediamanager/medialist.h
index 4de333875..59ddb6bd2 100644
--- a/kioslave/media/mediamanager/medialist.h
+++ b/kioslave/media/mediamanager/medialist.h
@@ -19,7 +19,7 @@
#ifndef _MEDIALIST_H_
#define _MEDIALIST_H_
-#include <qobject.h>
+#include <tqobject.h>
#include "medium.h"
@@ -31,50 +31,50 @@ public:
MediaList();
// FIXME: should be <const Medium> or something similar...
- const QPtrList<Medium> list() const;
- const Medium *findById(const QString &id) const;
- const Medium *findByName(const QString &name) const;
- const Medium *findByClearUdi(const QString &name);
+ const TQPtrList<Medium> list() const;
+ const Medium *findById(const TQString &id) const;
+ const Medium *findByName(const TQString &name) const;
+ const Medium *findByClearUdi(const TQString &name);
public:
- QString addMedium(Medium *medium, bool allowNotification = true);
- bool removeMedium(const QString &id, bool allowNotification = true);
+ TQString addMedium(Medium *medium, bool allowNotification = true);
+ bool removeMedium(const TQString &id, bool allowNotification = true);
bool changeMediumState(const Medium &medium, bool allowNotification);
- bool changeMediumState(const QString &id,
- const QString &baseURL,
+ bool changeMediumState(const TQString &id,
+ const TQString &baseURL,
bool allowNotification = true,
- const QString &mimeType = QString::null,
- const QString &iconName = QString::null,
- const QString &label = QString::null);
- bool changeMediumState(const QString &id,
- const QString &deviceNode,
- const QString &mountPoint,
- const QString &fsType, bool mounted,
+ const TQString &mimeType = TQString::null,
+ const TQString &iconName = TQString::null,
+ const TQString &label = TQString::null);
+ bool changeMediumState(const TQString &id,
+ const TQString &deviceNode,
+ const TQString &mountPoint,
+ const TQString &fsType, bool mounted,
bool allowNotification = true,
- const QString &mimeType = QString::null,
- const QString &iconName = QString::null,
- const QString &label = QString::null);
- bool changeMediumState(const QString &id, bool mounted,
+ const TQString &mimeType = TQString::null,
+ const TQString &iconName = TQString::null,
+ const TQString &label = TQString::null);
+ bool changeMediumState(const TQString &id, bool mounted,
bool allowNotification = true,
- const QString &mimeType = QString::null,
- const QString &iconName = QString::null,
- const QString &label = QString::null);
+ const TQString &mimeType = TQString::null,
+ const TQString &iconName = TQString::null,
+ const TQString &label = TQString::null);
- bool setUserLabel(const QString &name, const QString &label);
+ bool setUserLabel(const TQString &name, const TQString &label);
signals:
- void mediumAdded(const QString &id, const QString &name,
+ void mediumAdded(const TQString &id, const TQString &name,
bool allowNotification);
- void mediumRemoved(const QString &id, const QString &name,
+ void mediumRemoved(const TQString &id, const TQString &name,
bool allowNotification);
- void mediumStateChanged(const QString &id, const QString &name,
+ void mediumStateChanged(const TQString &id, const TQString &name,
bool mounted, bool allowNotification);
private:
- QPtrList<Medium> m_media;
- QMap<QString,Medium*> m_nameMap;
- QMap<QString,Medium*> m_idMap;
+ TQPtrList<Medium> m_media;
+ TQMap<TQString,Medium*> m_nameMap;
+ TQMap<TQString,Medium*> m_idMap;
};
#endif
diff --git a/kioslave/media/mediamanager/mediamanager.cpp b/kioslave/media/mediamanager/mediamanager.cpp
index f1569e817..5d8eb4143 100644
--- a/kioslave/media/mediamanager/mediamanager.cpp
+++ b/kioslave/media/mediamanager/mediamanager.cpp
@@ -19,7 +19,7 @@
#include "mediamanager.h"
#include <config.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -41,18 +41,18 @@
#endif //COMPILE_LINUXCDPOLLING
-MediaManager::MediaManager(const QCString &obj)
+MediaManager::MediaManager(const TQCString &obj)
: KDEDModule(obj), m_dirNotify(m_mediaList)
{
- connect( &m_mediaList, SIGNAL(mediumAdded(const QString&, const QString&, bool)),
- SLOT(slotMediumAdded(const QString&, const QString&, bool)) );
- connect( &m_mediaList, SIGNAL(mediumRemoved(const QString&, const QString&, bool)),
- SLOT(slotMediumRemoved(const QString&, const QString&, bool)) );
+ connect( &m_mediaList, TQT_SIGNAL(mediumAdded(const TQString&, const TQString&, bool)),
+ TQT_SLOT(slotMediumAdded(const TQString&, const TQString&, bool)) );
+ connect( &m_mediaList, TQT_SIGNAL(mediumRemoved(const TQString&, const TQString&, bool)),
+ TQT_SLOT(slotMediumRemoved(const TQString&, const TQString&, bool)) );
connect( &m_mediaList,
- SIGNAL(mediumStateChanged(const QString&, const QString&, bool, bool)),
- SLOT(slotMediumChanged(const QString&, const QString&, bool, bool)) );
+ TQT_SIGNAL(mediumStateChanged(const TQString&, const TQString&, bool, bool)),
+ TQT_SLOT(slotMediumChanged(const TQString&, const TQString&, bool, bool)) );
- QTimer::singleShot( 10, this, SLOT( loadBackends() ) );
+ TQTimer::singleShot( 10, this, TQT_SLOT( loadBackends() ) );
}
MediaManager::~MediaManager()
@@ -117,14 +117,14 @@ void MediaManager::loadBackends()
}
-QStringList MediaManager::fullList()
+TQStringList MediaManager::fullList()
{
- QPtrList<Medium> list = m_mediaList.list();
+ TQPtrList<Medium> list = m_mediaList.list();
- QStringList result;
+ TQStringList result;
- QPtrList<Medium>::const_iterator it = list.begin();
- QPtrList<Medium>::const_iterator end = list.end();
+ TQPtrList<Medium>::const_iterator it = list.begin();
+ TQPtrList<Medium>::const_iterator end = list.end();
for (; it!=end; ++it)
{
result+= (*it)->properties();
@@ -134,7 +134,7 @@ QStringList MediaManager::fullList()
return result;
}
-QStringList MediaManager::properties(const QString &name)
+TQStringList MediaManager::properties(const TQString &name)
{
const Medium *m = m_mediaList.findByName(name);
@@ -146,7 +146,7 @@ QStringList MediaManager::properties(const QString &name)
{
if (u.protocol() == "system")
{
- QString path = u.path();
+ TQString path = u.path();
if (path.startsWith("/media/"))
path = path.mid(strlen("/media/"));
m = m_mediaList.findByName(path);
@@ -160,10 +160,10 @@ QStringList MediaManager::properties(const QString &name)
else if (u.protocol() == "file")
{
// look for the mount point
- QPtrList<Medium> list = m_mediaList.list();
- QPtrList<Medium>::const_iterator it = list.begin();
- QPtrList<Medium>::const_iterator end = list.end();
- QString path;
+ TQPtrList<Medium> list = m_mediaList.list();
+ TQPtrList<Medium>::const_iterator it = list.begin();
+ TQPtrList<Medium>::const_iterator end = list.end();
+ TQString path;
for (; it!=end; ++it)
{
@@ -181,21 +181,21 @@ QStringList MediaManager::properties(const QString &name)
if (m)
return m->properties();
else
- return QStringList();
+ return TQStringList();
}
-QStringList MediaManager::mountoptions(const QString &name)
+TQStringList MediaManager::mountoptions(const TQString &name)
{
#ifdef COMPILE_HALBACKEND
if (!m_halbackend)
- return QStringList();
+ return TQStringList();
return m_halbackend->mountoptions(name);
#else
- return QStringList();
+ return TQStringList();
#endif
}
-bool MediaManager::setMountoptions(const QString &name, const QStringList &options)
+bool MediaManager::setMountoptions(const TQString &name, const TQStringList &options)
{
#ifdef COMPILE_HALBACKEND
if (!m_halbackend)
@@ -206,7 +206,7 @@ bool MediaManager::setMountoptions(const QString &name, const QStringList &optio
#endif
}
-QString MediaManager::mount(const QString &name)
+TQString MediaManager::mount(const TQString &name)
{
#ifdef COMPILE_HALBACKEND
if (!m_halbackend)
@@ -219,7 +219,7 @@ QString MediaManager::mount(const QString &name)
#endif
}
-QString MediaManager::unmount(const QString &name)
+TQString MediaManager::unmount(const TQString &name)
{
#ifdef COMPILE_HALBACKEND
if (!m_halbackend)
@@ -232,7 +232,7 @@ QString MediaManager::unmount(const QString &name)
#endif
}
-QString MediaManager::decrypt(const QString &name, const QString &password)
+TQString MediaManager::decrypt(const TQString &name, const TQString &password)
{
#ifdef COMPILE_HALBACKEND
if (!m_halbackend)
@@ -243,7 +243,7 @@ QString MediaManager::decrypt(const QString &name, const QString &password)
#endif
}
-QString MediaManager::undecrypt(const QString &name)
+TQString MediaManager::undecrypt(const TQString &name)
{
#ifdef COMPILE_HALBACKEND
if (!m_halbackend)
@@ -254,12 +254,12 @@ QString MediaManager::undecrypt(const QString &name)
#endif
}
-QString MediaManager::nameForLabel(const QString &label)
+TQString MediaManager::nameForLabel(const TQString &label)
{
- const QPtrList<Medium> media = m_mediaList.list();
+ const TQPtrList<Medium> media = m_mediaList.list();
- QPtrList<Medium>::const_iterator it = media.begin();
- QPtrList<Medium>::const_iterator end = media.end();
+ TQPtrList<Medium>::const_iterator it = media.begin();
+ TQPtrList<Medium>::const_iterator end = media.end();
for (; it!=end; ++it)
{
const Medium *m = *it;
@@ -270,10 +270,10 @@ QString MediaManager::nameForLabel(const QString &label)
}
}
- return QString::null;
+ return TQString::null;
}
-ASYNC MediaManager::setUserLabel(const QString &name, const QString &label)
+ASYNC MediaManager::setUserLabel(const TQString &name, const TQString &label)
{
m_mediaList.setUserLabel(name, label);
}
@@ -284,7 +284,7 @@ ASYNC MediaManager::reloadBackends()
loadBackends();
}
-bool MediaManager::removablePlug(const QString &devNode, const QString &label)
+bool MediaManager::removablePlug(const TQString &devNode, const TQString &label)
{
if (mp_removableBackend)
{
@@ -293,7 +293,7 @@ bool MediaManager::removablePlug(const QString &devNode, const QString &label)
return false;
}
-bool MediaManager::removableUnplug(const QString &devNode)
+bool MediaManager::removableUnplug(const TQString &devNode)
{
if (mp_removableBackend)
{
@@ -302,7 +302,7 @@ bool MediaManager::removableUnplug(const QString &devNode)
return false;
}
-bool MediaManager::removableCamera(const QString &devNode)
+bool MediaManager::removableCamera(const TQString &devNode)
{
if (mp_removableBackend)
{
@@ -312,7 +312,7 @@ bool MediaManager::removableCamera(const QString &devNode)
}
-void MediaManager::slotMediumAdded(const QString &/*id*/, const QString &name,
+void MediaManager::slotMediumAdded(const TQString &/*id*/, const TQString &name,
bool allowNotification)
{
kdDebug(1219) << "MediaManager::slotMediumAdded: " << name << endl;
@@ -324,7 +324,7 @@ void MediaManager::slotMediumAdded(const QString &/*id*/, const QString &name,
emit mediumAdded(name);
}
-void MediaManager::slotMediumRemoved(const QString &/*id*/, const QString &name,
+void MediaManager::slotMediumRemoved(const TQString &/*id*/, const TQString &name,
bool allowNotification)
{
kdDebug(1219) << "MediaManager::slotMediumRemoved: " << name << endl;
@@ -336,7 +336,7 @@ void MediaManager::slotMediumRemoved(const QString &/*id*/, const QString &name,
emit mediumRemoved(name);
}
-void MediaManager::slotMediumChanged(const QString &/*id*/, const QString &name,
+void MediaManager::slotMediumChanged(const TQString &/*id*/, const TQString &name,
bool mounted, bool allowNotification)
{
kdDebug(1219) << "MediaManager::slotMediumChanged: " << name << endl;
@@ -354,7 +354,7 @@ void MediaManager::slotMediumChanged(const QString &/*id*/, const QString &name,
extern "C" {
- KDE_EXPORT KDEDModule *create_mediamanager(const QCString &obj)
+ KDE_EXPORT KDEDModule *create_mediamanager(const TQCString &obj)
{
KGlobal::locale()->insertCatalogue("kio_media");
return new MediaManager(obj);
diff --git a/kioslave/media/mediamanager/mediamanager.h b/kioslave/media/mediamanager/mediamanager.h
index 36942362d..2cc46f8cf 100644
--- a/kioslave/media/mediamanager/mediamanager.h
+++ b/kioslave/media/mediamanager/mediamanager.h
@@ -20,8 +20,8 @@
#define _MEDIAMANAGER_H_
#include <kdedmodule.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "medialist.h"
#include "backendbase.h"
@@ -36,53 +36,53 @@ class MediaManager : public KDEDModule
Q_OBJECT
K_DCOP
public:
- MediaManager(const QCString &obj);
+ MediaManager(const TQCString &obj);
~MediaManager();
k_dcop:
- QStringList fullList();
- QStringList properties(const QString &name);
- QStringList mountoptions(const QString &name);
- bool setMountoptions(const QString &name, const QStringList &options);
+ TQStringList fullList();
+ TQStringList properties(const TQString &name);
+ TQStringList mountoptions(const TQString &name);
+ bool setMountoptions(const TQString &name, const TQStringList &options);
- QString mount(const QString &uid);
- QString unmount(const QString &uid);
- QString decrypt(const QString &uid, const QString &password);
- QString undecrypt(const QString &uid);
+ TQString mount(const TQString &uid);
+ TQString unmount(const TQString &uid);
+ TQString decrypt(const TQString &uid, const TQString &password);
+ TQString undecrypt(const TQString &uid);
- QString nameForLabel(const QString &label);
- ASYNC setUserLabel(const QString &name, const QString &label);
+ TQString nameForLabel(const TQString &label);
+ ASYNC setUserLabel(const TQString &name, const TQString &label);
ASYNC reloadBackends();
// Removable media handling (for people not having HAL)
- bool removablePlug(const QString &devNode, const QString &label);
- bool removableUnplug(const QString &devNode);
- bool removableCamera(const QString &devNode);
+ bool removablePlug(const TQString &devNode, const TQString &label);
+ bool removableUnplug(const TQString &devNode);
+ bool removableCamera(const TQString &devNode);
k_dcop_signals:
- void mediumAdded(const QString &name, bool allowNotification);
- void mediumRemoved(const QString &name, bool allowNotification);
- void mediumChanged(const QString &name, bool allowNotification);
+ void mediumAdded(const TQString &name, bool allowNotification);
+ void mediumRemoved(const TQString &name, bool allowNotification);
+ void mediumChanged(const TQString &name, bool allowNotification);
// For compatibility purpose, not needed for KDE4
- void mediumAdded(const QString &name);
- void mediumRemoved(const QString &name);
- void mediumChanged(const QString &name);
+ void mediumAdded(const TQString &name);
+ void mediumRemoved(const TQString &name);
+ void mediumChanged(const TQString &name);
private slots:
void loadBackends();
- void slotMediumAdded(const QString &id, const QString &name,
+ void slotMediumAdded(const TQString &id, const TQString &name,
bool allowNotification);
- void slotMediumRemoved(const QString &id, const QString &name,
+ void slotMediumRemoved(const TQString &id, const TQString &name,
bool allowNotification);
- void slotMediumChanged(const QString &id, const QString &name,
+ void slotMediumChanged(const TQString &id, const TQString &name,
bool mounted, bool allowNotification);
private:
MediaList m_mediaList;
- QValueList<BackendBase*> m_backends;
+ TQValueList<BackendBase*> m_backends;
RemovableBackend *mp_removableBackend;
HALBackend *m_halbackend;
MediaDirNotify m_dirNotify;
diff --git a/kioslave/media/mediamanager/removablebackend.cpp b/kioslave/media/mediamanager/removablebackend.cpp
index ea8318ecf..f307ee2f8 100644
--- a/kioslave/media/mediamanager/removablebackend.cpp
+++ b/kioslave/media/mediamanager/removablebackend.cpp
@@ -33,19 +33,19 @@
RemovableBackend::RemovableBackend(MediaList &list)
- : QObject(), BackendBase(list)
+ : TQObject(), BackendBase(list)
{
KDirWatch::self()->addFile(MTAB);
- connect( KDirWatch::self(), SIGNAL( dirty(const QString&) ),
- this, SLOT( slotDirty(const QString&) ) );
+ connect( KDirWatch::self(), TQT_SIGNAL( dirty(const TQString&) ),
+ this, TQT_SLOT( slotDirty(const TQString&) ) );
KDirWatch::self()->startScan();
}
RemovableBackend::~RemovableBackend()
{
- QStringList::iterator it = m_removableIds.begin();
- QStringList::iterator end = m_removableIds.end();
+ TQStringList::iterator it = m_removableIds.begin();
+ TQStringList::iterator end = m_removableIds.end();
for (; it!=end; ++it)
{
@@ -55,25 +55,25 @@ RemovableBackend::~RemovableBackend()
KDirWatch::self()->removeFile(MTAB);
}
-bool RemovableBackend::plug(const QString &devNode, const QString &label)
+bool RemovableBackend::plug(const TQString &devNode, const TQString &label)
{
- QString name = generateName(devNode);
- QString id = generateId(devNode);
+ TQString name = generateName(devNode);
+ TQString id = generateId(devNode);
if (!m_removableIds.contains(id))
{
Medium *medium = new Medium(id, name);
- medium->mountableState(devNode, QString::null,
- QString::null, false);
+ medium->mountableState(devNode, TQString::null,
+ TQString::null, false);
- QStringList words = QStringList::split(" ", label);
+ TQStringList words = TQStringList::split(" ", label);
- QStringList::iterator it = words.begin();
- QStringList::iterator end = words.end();
+ TQStringList::iterator it = words.begin();
+ TQStringList::iterator end = words.end();
- QString tmp = (*it).lower();
+ TQString tmp = (*it).lower();
tmp[0] = tmp[0].upper();
- QString new_label = tmp;
+ TQString new_label = tmp;
++it;
for (; it!=end; ++it)
@@ -92,9 +92,9 @@ bool RemovableBackend::plug(const QString &devNode, const QString &label)
return false;
}
-bool RemovableBackend::unplug(const QString &devNode)
+bool RemovableBackend::unplug(const TQString &devNode)
{
- QString id = generateId(devNode);
+ TQString id = generateId(devNode);
if (m_removableIds.contains(id))
{
m_removableIds.remove(id);
@@ -103,18 +103,18 @@ bool RemovableBackend::unplug(const QString &devNode)
return false;
}
-bool RemovableBackend::camera(const QString &devNode)
+bool RemovableBackend::camera(const TQString &devNode)
{
- QString id = generateId(devNode);
+ TQString id = generateId(devNode);
if (m_removableIds.contains(id))
{
return m_mediaList.changeMediumState(id,
- QString("camera:/"), false, "media/gphoto2camera");
+ TQString("camera:/"), false, "media/gphoto2camera");
}
return false;
}
-void RemovableBackend::slotDirty(const QString &path)
+void RemovableBackend::slotDirty(const TQString &path)
{
if (path==MTAB)
{
@@ -125,7 +125,7 @@ void RemovableBackend::slotDirty(const QString &path)
void RemovableBackend::handleMtabChange()
{
- QStringList new_mtabIds;
+ TQStringList new_mtabIds;
KMountPoint::List mtab = KMountPoint::currentMountPoints();
KMountPoint::List::iterator it = mtab.begin();
@@ -133,11 +133,11 @@ void RemovableBackend::handleMtabChange()
for (; it!=end; ++it)
{
- QString dev = (*it)->mountedFrom();
- QString mp = (*it)->mountPoint();
- QString fs = (*it)->mountType();
+ TQString dev = (*it)->mountedFrom();
+ TQString mp = (*it)->mountPoint();
+ TQString fs = (*it)->mountType();
- QString id = generateId(dev);
+ TQString id = generateId(dev);
new_mtabIds+=id;
if ( !m_mtabIds.contains(id)
@@ -148,8 +148,8 @@ void RemovableBackend::handleMtabChange()
}
}
- QStringList::iterator it2 = m_mtabIds.begin();
- QStringList::iterator end2 = m_mtabIds.end();
+ TQStringList::iterator it2 = m_mtabIds.begin();
+ TQStringList::iterator end2 = m_mtabIds.end();
for (; it2!=end2; ++it2)
{
@@ -164,15 +164,15 @@ void RemovableBackend::handleMtabChange()
m_mtabIds = new_mtabIds;
}
-QString RemovableBackend::generateId(const QString &devNode)
+TQString RemovableBackend::generateId(const TQString &devNode)
{
- QString dev = KStandardDirs::realFilePath(devNode);
+ TQString dev = KStandardDirs::realFilePath(devNode);
return "/org/kde/mediamanager/removable/"
+dev.replace("/", "");
}
-QString RemovableBackend::generateName(const QString &devNode)
+TQString RemovableBackend::generateName(const TQString &devNode)
{
return KURL(devNode).fileName();
}
diff --git a/kioslave/media/mediamanager/removablebackend.h b/kioslave/media/mediamanager/removablebackend.h
index 02fc0409e..fa16a391b 100644
--- a/kioslave/media/mediamanager/removablebackend.h
+++ b/kioslave/media/mediamanager/removablebackend.h
@@ -21,10 +21,10 @@
#include "backendbase.h"
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
-class RemovableBackend : public QObject, public BackendBase
+class RemovableBackend : public TQObject, public BackendBase
{
Q_OBJECT
@@ -32,21 +32,21 @@ public:
RemovableBackend(MediaList &list);
virtual ~RemovableBackend();
- bool plug(const QString &devNode, const QString &label);
- bool unplug(const QString &devNode);
- bool camera(const QString &devNode);
+ bool plug(const TQString &devNode, const TQString &label);
+ bool unplug(const TQString &devNode);
+ bool camera(const TQString &devNode);
private slots:
- void slotDirty(const QString &path);
+ void slotDirty(const TQString &path);
private:
void handleMtabChange();
- static QString generateId(const QString &devNode);
- static QString generateName(const QString &devNode);
+ static TQString generateId(const TQString &devNode);
+ static TQString generateName(const TQString &devNode);
- QStringList m_removableIds;
- QStringList m_mtabIds;
+ TQStringList m_removableIds;
+ TQStringList m_mtabIds;
};
#endif
diff --git a/kioslave/media/medianotifier/medianotifier.cpp b/kioslave/media/medianotifier/medianotifier.cpp
index ce39215d9..b0596e31d 100644
--- a/kioslave/media/medianotifier/medianotifier.cpp
+++ b/kioslave/media/medianotifier/medianotifier.cpp
@@ -21,10 +21,10 @@
#include <sys/vfs.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qcheckbox.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqcheckbox.h>
#include <kapplication.h>
#include <kglobal.h>
@@ -41,30 +41,30 @@
#include "notifieraction.h"
#include "mediamanagersettings.h"
-MediaNotifier::MediaNotifier(const QCString &name) : KDEDModule(name)
+MediaNotifier::MediaNotifier(const TQCString &name) : KDEDModule(name)
{
- connectDCOPSignal( "kded", "mediamanager", "mediumAdded(QString, bool)",
- "onMediumChange(QString, bool)", true );
+ connectDCOPSignal( "kded", "mediamanager", "mediumAdded(TQString, bool)",
+ "onMediumChange(TQString, bool)", true );
- connectDCOPSignal( "kded", "mediamanager", "mediumChanged(QString, bool)",
- "onMediumChange(QString, bool)", true );
+ connectDCOPSignal( "kded", "mediamanager", "mediumChanged(TQString, bool)",
+ "onMediumChange(TQString, bool)", true );
- m_freeTimer = new QTimer( this );
- connect( m_freeTimer, SIGNAL( timeout() ), SLOT( checkFreeDiskSpace() ) );
+ m_freeTimer = new TQTimer( this );
+ connect( m_freeTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( checkFreeDiskSpace() ) );
m_freeTimer->start( 1000*6*2 /* 20 minutes */ );
m_freeDialog = 0;
}
MediaNotifier::~MediaNotifier()
{
- disconnectDCOPSignal( "kded", "mediamanager", "mediumAdded(QString, bool)",
- "onMediumChange(QString, bool)" );
+ disconnectDCOPSignal( "kded", "mediamanager", "mediumAdded(TQString, bool)",
+ "onMediumChange(TQString, bool)" );
- disconnectDCOPSignal( "kded", "mediamanager", "mediumChanged(QString, bool)",
- "onMediumChange(QString, bool)" );
+ disconnectDCOPSignal( "kded", "mediamanager", "mediumChanged(TQString, bool)",
+ "onMediumChange(TQString, bool)" );
}
-void MediaNotifier::onMediumChange( const QString &name, bool allowNotification )
+void MediaNotifier::onMediumChange( const TQString &name, bool allowNotification )
{
kdDebug() << "MediaNotifier::onMediumChange( " << name << ", "
<< allowNotification << ")" << endl;
@@ -85,8 +85,8 @@ void MediaNotifier::onMediumChange( const QString &name, bool allowNotification
m_allowNotificationMap[job] = allowNotification;
- connect( job, SIGNAL( result( KIO::Job * ) ),
- this, SLOT( slotStatResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ this, TQT_SLOT( slotStatResult( KIO::Job * ) ) );
}
void MediaNotifier::slotStatResult( KIO::Job *job )
@@ -110,7 +110,7 @@ void MediaNotifier::slotStatResult( KIO::Job *job )
bool MediaNotifier::autostart( const KFileItem &medium )
{
- QString mimetype = medium.mimetype();
+ TQString mimetype = medium.mimetype();
bool is_cdrom = mimetype.startsWith( "media/cd" ) || mimetype.startsWith( "media/dvd" );
bool is_mounted = mimetype.contains( "_mounted" );
@@ -136,20 +136,20 @@ bool MediaNotifier::autostart( const KFileItem &medium )
// From now we're sure the medium is already mounted.
// We can use the local path for stating, no need to use KIO here.
bool local;
- QString path = medium.mostLocalURL( local ).path(); // local is always true here...
+ TQString path = medium.mostLocalURL( local ).path(); // local is always true here...
// When a new medium is mounted the root directory of the medium should
// be checked for the following Autostart files in order of precedence:
// .autorun, autorun, autorun.sh
- QStringList autorun_list;
+ TQStringList autorun_list;
autorun_list << ".autorun" << "autorun" << "autorun.sh";
- QStringList::iterator it = autorun_list.begin();
- QStringList::iterator end = autorun_list.end();
+ TQStringList::iterator it = autorun_list.begin();
+ TQStringList::iterator end = autorun_list.end();
for ( ; it!=end; ++it )
{
- if ( QFile::exists( path + "/" + *it ) )
+ if ( TQFile::exists( path + "/" + *it ) )
{
return execAutorun( medium, path, *it );
}
@@ -158,7 +158,7 @@ bool MediaNotifier::autostart( const KFileItem &medium )
// When a new medium is mounted the root directory of the medium should
// be checked for the following Autoopen files in order of precedence:
// .autoopen, autoopen
- QStringList autoopen_list;
+ TQStringList autoopen_list;
autoopen_list << ".autoopen" << "autoopen";
it = autoopen_list.begin();
@@ -166,7 +166,7 @@ bool MediaNotifier::autostart( const KFileItem &medium )
for ( ; it!=end; ++it )
{
- if ( QFile::exists( path + "/" + *it ) )
+ if ( TQFile::exists( path + "/" + *it ) )
{
return execAutoopen( medium, path, *it );
}
@@ -175,23 +175,23 @@ bool MediaNotifier::autostart( const KFileItem &medium )
return false;
}
-bool MediaNotifier::execAutorun( const KFileItem &medium, const QString &path,
- const QString &autorunFile )
+bool MediaNotifier::execAutorun( const KFileItem &medium, const TQString &path,
+ const TQString &autorunFile )
{
// The desktop environment MUST prompt the user for confirmation
// before automatically starting an application.
- QString mediumType = medium.mimeTypePtr()->name();
- QString text = i18n( "An autorun file has been found on your '%1'."
+ TQString mediumType = medium.mimeTypePtr()->name();
+ TQString text = i18n( "An autorun file has been found on your '%1'."
" Do you want to execute it?\n"
"Note that executing a file on a medium may compromise"
" your system's security").arg( mediumType );
- QString caption = i18n( "Autorun - %1" ).arg( medium.url().prettyURL() );
+ TQString caption = i18n( "Autorun - %1" ).arg( medium.url().prettyURL() );
KGuiItem yes = KStdGuiItem::yes();
KGuiItem no = KStdGuiItem::no();
int options = KMessageBox::Notify | KMessageBox::Dangerous;
int answer = KMessageBox::warningYesNo( 0L, text, caption, yes, no,
- QString::null, options );
+ TQString::null, options );
if ( answer == KMessageBox::Yes )
{
@@ -209,16 +209,16 @@ bool MediaNotifier::execAutorun( const KFileItem &medium, const QString &path,
return true;
}
-bool MediaNotifier::execAutoopen( const KFileItem &medium, const QString &path,
- const QString &autoopenFile )
+bool MediaNotifier::execAutoopen( const KFileItem &medium, const TQString &path,
+ const TQString &autoopenFile )
{
// An Autoopen file MUST contain a single relative path that points
// to a non-executable file contained on the medium. [...]
- QFile file( path+"/"+autoopenFile );
+ TQFile file( path+"/"+autoopenFile );
file.open( IO_ReadOnly );
- QTextStream stream( &file );
+ TQTextStream stream( &file );
- QString relative_path = stream.readLine().stripWhiteSpace();
+ TQString relative_path = stream.readLine().stripWhiteSpace();
// The relative path MUST NOT contain path components that
// refer to a parent directory ( ../ )
@@ -229,7 +229,7 @@ bool MediaNotifier::execAutoopen( const KFileItem &medium, const QString &path,
// The desktop environment MUST verify that the relative path points
// to a file that is actually located on the medium [...]
- QString resolved_path
+ TQString resolved_path
= KStandardDirs::realFilePath( path+"/"+relative_path );
if ( !resolved_path.startsWith( path ) )
@@ -238,12 +238,12 @@ bool MediaNotifier::execAutoopen( const KFileItem &medium, const QString &path,
}
- QFile document( resolved_path );
+ TQFile document( resolved_path );
// TODO: What about FAT all files are executable...
// If the relative path points to an executable file then the desktop
// environment MUST NOT execute the file.
- if ( !document.exists() /*|| QFileInfo(document).isExecutable()*/ )
+ if ( !document.exists() /*|| TQFileInfo(document).isExecutable()*/ )
{
return false;
}
@@ -253,19 +253,19 @@ bool MediaNotifier::execAutoopen( const KFileItem &medium, const QString &path,
// The desktop environment MUST prompt the user for confirmation
// before opening the file.
- QString mediumType = medium.mimeTypePtr()->name();
- QString filename = url.filename();
- QString text = i18n( "An autoopen file has been found on your '%1'."
+ TQString mediumType = medium.mimeTypePtr()->name();
+ TQString filename = url.filename();
+ TQString text = i18n( "An autoopen file has been found on your '%1'."
" Do you want to open '%2'?\n"
"Note that opening a file on a medium may compromise"
" your system's security").arg( mediumType ).arg( filename );
- QString caption = i18n( "Autoopen - %1" ).arg( medium.url().prettyURL() );
+ TQString caption = i18n( "Autoopen - %1" ).arg( medium.url().prettyURL() );
KGuiItem yes = KStdGuiItem::yes();
KGuiItem no = KStdGuiItem::no();
int options = KMessageBox::Notify | KMessageBox::Dangerous;
int answer = KMessageBox::warningYesNo( 0L, text, caption, yes, no,
- QString::null, options );
+ TQString::null, options );
// TODO: Take case of the "UNLESS" part?
// When an Autoopen file has been detected and the user has confirmed
@@ -289,7 +289,7 @@ void MediaNotifier::notify( KFileItem &medium )
if ( settings->autoActionForMimetype( medium.mimetype() )==0L )
{
- QValueList<NotifierAction*> actions
+ TQValueList<NotifierAction*> actions
= settings->actionsForMimetype( medium.mimetype() );
// If only one action remains, it's the "do nothing" action
@@ -311,7 +311,7 @@ void MediaNotifier::notify( KFileItem &medium )
extern "C"
{
- KDE_EXPORT KDEDModule *create_medianotifier(const QCString &name)
+ KDE_EXPORT KDEDModule *create_medianotifier(const TQCString &name)
{
KGlobal::locale()->insertCatalogue("kay");
return new MediaNotifier(name);
@@ -325,7 +325,7 @@ void MediaNotifier::checkFreeDiskSpace()
if ( m_freeDialog )
return;
- if ( statfs( QFile::encodeName( QDir::homeDirPath() ), &sfs ) == 0 )
+ if ( statfs( TQFile::encodeName( TQDir::homeDirPath() ), &sfs ) == 0 )
{
total = sfs.f_blocks;
avail = ( getuid() ? sfs.f_bavail : sfs.f_bfree );
@@ -344,15 +344,15 @@ void MediaNotifier::checkFreeDiskSpace()
0, "warningYesNo", false, true,
i18n( "Start Konqueror" ), KStdGuiItem::cancel());
- QString text = i18n( "You are running low on disk space on your home partition (currently %1% free), would you like to "
+ TQString text = i18n( "You are running low on disk space on your home partition (currently %1% free), would you like to "
"run Konqueror to free some disk space and fix the problem?" ).arg( freeperc );
bool checkboxResult = false;
- KMessageBox::createKMessageBox(m_freeDialog, QMessageBox::Warning, text, QStringList(),
+ KMessageBox::createKMessageBox(m_freeDialog, TQMessageBox::Warning, text, TQStringList(),
i18n("Do not ask again"),
&checkboxResult, KMessageBox::Notify | KMessageBox::NoExec);
m_freeDialog->show();
- connect( m_freeDialog, SIGNAL( yesClicked() ), SLOT( slotFreeContinue() ) );
- connect( m_freeDialog, SIGNAL( noClicked() ), SLOT( slotFreeCancel() ) );
+ connect( m_freeDialog, TQT_SIGNAL( yesClicked() ), TQT_SLOT( slotFreeContinue() ) );
+ connect( m_freeDialog, TQT_SIGNAL( noClicked() ), TQT_SLOT( slotFreeCancel() ) );
}
}
}
@@ -369,7 +369,7 @@ void MediaNotifier::slotFreeCancel()
void MediaNotifier::slotFreeFinished( KMessageBox::ButtonCode res )
{
- QCheckBox *checkbox = ::qt_cast<QCheckBox*>( m_freeDialog->child( 0, "QCheckBox" ) );
+ TQCheckBox *checkbox = ::qt_cast<TQCheckBox*>( m_freeDialog->child( 0, "TQCheckBox" ) );
if ( checkbox && checkbox->isChecked() )
KMessageBox::saveDontShowAgainYesNo("dontagainfreespace", res);
m_freeDialog->delayedDestruct();
@@ -377,7 +377,7 @@ void MediaNotifier::slotFreeFinished( KMessageBox::ButtonCode res )
if ( res == KMessageBox::Continue ) // start Konqi
{
- ( void ) new KRun( KURL::fromPathOrURL( QDir::homeDirPath() ) );
+ ( void ) new KRun( KURL::fromPathOrURL( TQDir::homeDirPath() ) );
}
else // people don't want to be bothered, at least stop the timer; there's no way to save the dontshowagain entry in this case
m_freeTimer->stop();
diff --git a/kioslave/media/medianotifier/medianotifier.h b/kioslave/media/medianotifier/medianotifier.h
index e070ac7ac..23f203f97 100644
--- a/kioslave/media/medianotifier/medianotifier.h
+++ b/kioslave/media/medianotifier/medianotifier.h
@@ -25,8 +25,8 @@
#include <kio/job.h>
#include <kmessagebox.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
class KDialogBase;
@@ -36,11 +36,11 @@ class MediaNotifier: public KDEDModule
K_DCOP
public:
- MediaNotifier( const QCString &name );
+ MediaNotifier( const TQCString &name );
virtual ~MediaNotifier();
k_dcop:
- void onMediumChange( const QString &name, bool allowNotification );
+ void onMediumChange( const TQString &name, bool allowNotification );
private slots:
void slotStatResult( KIO::Job *job );
@@ -53,13 +53,13 @@ private:
bool autostart( const KFileItem &medium );
void notify( KFileItem &medium );
- bool execAutorun( const KFileItem &medium, const QString &path,
- const QString &autorunFile );
- bool execAutoopen( const KFileItem &medium, const QString &path,
- const QString &autoopenFile );
+ bool execAutorun( const KFileItem &medium, const TQString &path,
+ const TQString &autorunFile );
+ bool execAutoopen( const KFileItem &medium, const TQString &path,
+ const TQString &autoopenFile );
- QMap<KIO::Job*,bool> m_allowNotificationMap;
- QTimer * m_freeTimer;
+ TQMap<KIO::Job*,bool> m_allowNotificationMap;
+ TQTimer * m_freeTimer;
KDialogBase * m_freeDialog;
};
#endif
diff --git a/kioslave/media/medianotifier/notificationdialog.cpp b/kioslave/media/medianotifier/notificationdialog.cpp
index a4dab0245..7ba172601 100644
--- a/kioslave/media/medianotifier/notificationdialog.cpp
+++ b/kioslave/media/medianotifier/notificationdialog.cpp
@@ -18,31 +18,31 @@
*/
#include "notificationdialog.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <krun.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kio/global.h>
#include <klistbox.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
#include "actionlistboxitem.h"
#include "notificationdialogview.h"
NotificationDialog::NotificationDialog( KFileItem medium, NotifierSettings *settings,
- QWidget* parent, const char* name )
+ TQWidget* parent, const char* name )
: KDialogBase( parent, name, false, i18n( "Medium Detected" ), Ok|Cancel|User1, Ok, true),
m_medium(medium), m_settings( settings )
{
setCaption( KIO::decodeFileName(m_medium.name()) );
clearWState( WState_Polished );
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
m_view = new NotificationDialogView( page );
@@ -53,30 +53,30 @@ NotificationDialog::NotificationDialog( KFileItem medium, NotifierSettings *sett
updateActionsListBox();
- resize( QSize(400,400).expandedTo( minimumSizeHint() ) );
+ resize( TQSize(400,400).expandedTo( minimumSizeHint() ) );
m_actionWatcher = new KDirWatch();
- QString services_dir
+ TQString services_dir
= locateLocal( "data", "konqueror/servicemenus", true );
m_actionWatcher->addDir( services_dir );
setButtonText( User1, i18n("Configure...") );
- connect( m_actionWatcher, SIGNAL( dirty( const QString & ) ),
- this, SLOT( slotActionsChanged( const QString & ) ) );
- connect( this , SIGNAL( okClicked() ),
- this, SLOT( slotOk() ) );
- connect( this, SIGNAL( user1Clicked() ),
- this, SLOT( slotConfigure() ) );
- connect( m_view->actionsList, SIGNAL( doubleClicked ( QListBoxItem*, const QPoint & ) ),
- this, SLOT( slotOk() ) );
+ connect( m_actionWatcher, TQT_SIGNAL( dirty( const TQString & ) ),
+ this, TQT_SLOT( slotActionsChanged( const TQString & ) ) );
+ connect( this , TQT_SIGNAL( okClicked() ),
+ this, TQT_SLOT( slotOk() ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ),
+ this, TQT_SLOT( slotConfigure() ) );
+ connect( m_view->actionsList, TQT_SIGNAL( doubleClicked ( TQListBoxItem*, const TQPoint & ) ),
+ this, TQT_SLOT( slotOk() ) );
- connect( this, SIGNAL( finished() ),
- this, SLOT( delayedDestruct() ) );
+ connect( this, TQT_SIGNAL( finished() ),
+ this, TQT_SLOT( delayedDestruct() ) );
m_actionWatcher->startScan();
- QPushButton * btn = actionButton( Ok );
+ TQPushButton * btn = actionButton( Ok );
btn->setFocus();
}
@@ -90,11 +90,11 @@ void NotificationDialog::updateActionsListBox()
{
m_view->actionsList->clear();
- QValueList<NotifierAction*> actions
+ TQValueList<NotifierAction*> actions
= m_settings->actionsForMimetype( m_medium.mimetype() );
- QValueList<NotifierAction*>::iterator it = actions.begin();
- QValueList<NotifierAction*>::iterator end = actions.end();
+ TQValueList<NotifierAction*>::iterator it = actions.begin();
+ TQValueList<NotifierAction*>::iterator end = actions.end();
for ( ; it!=end; ++it )
{
@@ -106,7 +106,7 @@ void NotificationDialog::updateActionsListBox()
}
-void NotificationDialog::slotActionsChanged(const QString &/*dir*/)
+void NotificationDialog::slotActionsChanged(const TQString &/*dir*/)
{
m_settings->reload();
updateActionsListBox();
@@ -114,7 +114,7 @@ void NotificationDialog::slotActionsChanged(const QString &/*dir*/)
void NotificationDialog::slotOk()
{
- QListBoxItem *item = m_view->actionsList->selectedItem();
+ TQListBoxItem *item = m_view->actionsList->selectedItem();
if ( item != 0L )
{
@@ -136,7 +136,7 @@ void NotificationDialog::launchAction( NotifierAction *action )
action->execute(m_medium);
- QDialog::accept();
+ TQDialog::accept();
}
void NotificationDialog::slotConfigure()
diff --git a/kioslave/media/medianotifier/notificationdialog.h b/kioslave/media/medianotifier/notificationdialog.h
index 94db1fee0..f073676e3 100644
--- a/kioslave/media/medianotifier/notificationdialog.h
+++ b/kioslave/media/medianotifier/notificationdialog.h
@@ -35,13 +35,13 @@ class NotificationDialog : public KDialogBase
public:
NotificationDialog( KFileItem medium, NotifierSettings *settings,
- QWidget* parent = 0, const char* name = 0 );
+ TQWidget* parent = 0, const char* name = 0 );
~NotificationDialog();
private slots:
void slotOk();
void slotConfigure();
- void slotActionsChanged(const QString& dir);
+ void slotActionsChanged(const TQString& dir);
private:
void launchAction( NotifierAction *action );
diff --git a/kioslave/media/mounthelper/dialog.cpp b/kioslave/media/mounthelper/dialog.cpp
index 74bcfb388..549bbdc4a 100644
--- a/kioslave/media/mounthelper/dialog.cpp
+++ b/kioslave/media/mounthelper/dialog.cpp
@@ -22,7 +22,7 @@
#include "dialog.h"
-Dialog::Dialog(QString url, QString iconName) :
+Dialog::Dialog(TQString url, TQString iconName) :
KDialogBase(NULL, "Dialog", true, "Decrypt Storage Device", (Cancel|User1), User1, false, KGuiItem(i18n("Decrypt"), "decrypted" ))
{
decryptDialog = new DecryptDialog(this);
@@ -34,10 +34,10 @@ Dialog::Dialog(QString url, QString iconName) :
enableButton( User1, false );
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon(iconName, KIcon::NoGroup, KIcon::SizeLarge);
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon(iconName, KIcon::NoGroup, KIcon::SizeLarge);
decryptDialog->encryptedIcon->setPixmap( pixmap );
- connect(decryptDialog->passwordEdit, SIGNAL (textChanged(const QString &)), this, SLOT (slotPasswordChanged(const QString &)));
+ connect(decryptDialog->passwordEdit, TQT_SIGNAL (textChanged(const TQString &)), this, TQT_SLOT (slotPasswordChanged(const TQString &)));
setMainWidget(decryptDialog);
}
@@ -47,20 +47,20 @@ Dialog::~Dialog()
delete decryptDialog;
}
-QString Dialog::getPassword()
+TQString Dialog::getPassword()
{
return decryptDialog->passwordEdit->text();
}
-void Dialog::slotDialogError(QString errorMsg)
+void Dialog::slotDialogError(TQString errorMsg)
{
kdDebug() << __func__ << "(" << errorMsg << " )" << endl;
- decryptDialog->errorLabel->setText(QString("<b>%1</b>").arg(errorMsg));
+ decryptDialog->errorLabel->setText(TQString("<b>%1</b>").arg(errorMsg));
decryptDialog->errorBox->show();
}
-void Dialog::slotPasswordChanged(const QString &text)
+void Dialog::slotPasswordChanged(const TQString &text)
{
enableButton( User1, !text.isEmpty() );
}
diff --git a/kioslave/media/mounthelper/dialog.h b/kioslave/media/mounthelper/dialog.h
index 1f544c370..872486f5b 100644
--- a/kioslave/media/mounthelper/dialog.h
+++ b/kioslave/media/mounthelper/dialog.h
@@ -30,9 +30,9 @@
#include <kdialogbase.h>
#include <kiconloader.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
#include "decryptdialog.h"
@@ -44,14 +44,14 @@ class Dialog : public KDialogBase
Q_OBJECT
public:
- Dialog(QString url, QString iconName);
+ Dialog(TQString url, TQString iconName);
~Dialog();
- QString getPassword();
+ TQString getPassword();
public slots:
- void slotDialogError(QString errorMsg);
- void slotPasswordChanged(const QString &text);
+ void slotDialogError(TQString errorMsg);
+ void slotPasswordChanged(const TQString &text);
private:
DecryptDialog *decryptDialog;
diff --git a/kioslave/media/mounthelper/kio_media_mounthelper.cpp b/kioslave/media/mounthelper/kio_media_mounthelper.cpp
index 5dae9e0d3..01448f79d 100644
--- a/kioslave/media/mounthelper/kio_media_mounthelper.cpp
+++ b/kioslave/media/mounthelper/kio_media_mounthelper.cpp
@@ -26,7 +26,7 @@
#include <kmessagebox.h>
#include <dcopclient.h>
#include <dcopref.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <stdlib.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -45,7 +45,7 @@ const Medium MountHelper::findMedium(const KURL &url)
DCOPReply reply = mediamanager.call( "properties", url.fileName() );
if ( !reply.isValid() ) {
m_errorStr = i18n("The KDE mediamanager is not running.")+"\n";
- return Medium(QString::null, QString::null);
+ return Medium(TQString::null, TQString::null);
}
const Medium& medium = Medium::create(reply);
if ( medium.id().isEmpty() ) {
@@ -53,7 +53,7 @@ const Medium MountHelper::findMedium(const KURL &url)
reply = mediamanager.call( "properties", url.prettyURL() );
if ( !reply.isValid() ) {
m_errorStr = i18n("Internal Error");
- return Medium(QString::null, QString::null);
+ return Medium(TQString::null, TQString::null);
}
return Medium::create(reply);
} else {
@@ -65,7 +65,7 @@ MountHelper::MountHelper() : KApplication()
{
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- m_errorStr = QString::null;
+ m_errorStr = TQString::null;
KURL url(args->url(0));
const Medium medium = findMedium(url);
@@ -74,19 +74,19 @@ MountHelper::MountHelper() : KApplication()
{
if (m_errorStr.isEmpty())
m_errorStr+= i18n("%1 cannot be found.").arg(url.prettyURL());
- QTimer::singleShot(0, this, SLOT(error()) );
+ TQTimer::singleShot(0, this, TQT_SLOT(error()) );
return;
}
if ( !medium.isMountable() && !args->isSet("e") && !args->isSet("s"))
{
m_errorStr = i18n("%1 is not a mountable media.").arg(url.prettyURL());
- QTimer::singleShot(0, this, SLOT(error()) );
+ TQTimer::singleShot(0, this, TQT_SLOT(error()) );
return;
}
- QString device = medium.deviceNode();
- QString mount_point = medium.mountPoint();
+ TQString device = medium.deviceNode();
+ TQString mount_point = medium.mountPoint();
m_isCdrom = medium.mimeType().find("dvd")!=-1
|| medium.mimeType().find("cd")!=-1;
@@ -96,20 +96,20 @@ MountHelper::MountHelper() : KApplication()
if (!medium.isEncrypted())
{
m_errorStr = i18n("%1 is not an encrypted media.").arg(url.prettyURL());
- QTimer::singleShot(0, this, SLOT(error()) );
+ TQTimer::singleShot(0, this, TQT_SLOT(error()) );
return;
}
if (!medium.needDecryption())
{
m_errorStr = i18n("%1 is already decrypted.").arg(url.prettyURL());
- QTimer::singleShot(0, this, SLOT(error()) );
+ TQTimer::singleShot(0, this, TQT_SLOT(error()) );
return;
}
- QString iconName = medium.iconName();
+ TQString iconName = medium.iconName();
if (iconName.isEmpty())
{
- QString mime = medium.mimeType();
+ TQString mime = medium.mimeType();
iconName = KMimeType::mimeType(mime)->icon(mime, false);
}
@@ -117,9 +117,9 @@ MountHelper::MountHelper() : KApplication()
dialog = new Dialog(url.prettyURL(), iconName);
dialog->show();
- connect(dialog, SIGNAL (user1Clicked()), this, SLOT (slotSendPassword()));
- connect(dialog, SIGNAL (cancelClicked()), this, SLOT (slotCancel()));
- connect(this, SIGNAL (signalPasswordError(QString)), dialog, SLOT (slotDialogError(QString)));
+ connect(dialog, TQT_SIGNAL (user1Clicked()), this, TQT_SLOT (slotSendPassword()));
+ connect(dialog, TQT_SIGNAL (cancelClicked()), this, TQT_SLOT (slotCancel()));
+ connect(this, TQT_SIGNAL (signalPasswordError(TQString)), dialog, TQT_SLOT (slotDialogError(TQString)));
}
else if (args->isSet("u"))
{
@@ -180,7 +180,7 @@ MountHelper::MountHelper() : KApplication()
}
}
-void MountHelper::invokeEject(const QString &device, bool quiet)
+void MountHelper::invokeEject(const TQString &device, bool quiet)
{
KProcess *proc = new KProcess(this);
*proc << "kdeeject";
@@ -189,8 +189,8 @@ void MountHelper::invokeEject(const QString &device, bool quiet)
*proc << "-q";
}
*proc << device;
- connect( proc, SIGNAL(processExited(KProcess *)),
- this, SLOT( ejectFinished(KProcess *) ) );
+ connect( proc, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT( ejectFinished(KProcess *) ) );
proc->start();
}
@@ -209,7 +209,7 @@ void MountHelper::ejectFinished(KProcess* proc)
m_errorStr = i18n("The device was successfully unmounted, but could not be ejected");
}
//X Comment this because the error is useless as long as the unmount is successfull.
-//X QTimer::singleShot(0, this, SLOT(error()));
+//X TQTimer::singleShot(0, this, TQT_SLOT(error()));
::exit(0);
}
}
@@ -229,7 +229,7 @@ void MountHelper::slotSendPassword()
m_errorStr = i18n("The KDE mediamanager is not running.");
error();
} else {
- QString errorMsg = reply;
+ TQString errorMsg = reply;
if (errorMsg.isNull()) {
exit(0);
} else {
diff --git a/kioslave/media/mounthelper/kio_media_mounthelper.h b/kioslave/media/mounthelper/kio_media_mounthelper.h
index ed5884d4f..4779c75ec 100644
--- a/kioslave/media/mounthelper/kio_media_mounthelper.h
+++ b/kioslave/media/mounthelper/kio_media_mounthelper.h
@@ -23,7 +23,7 @@
#define _KIO_MEDIA_MOUNTHELPER_H_
#include <kapplication.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kio/job.h>
#include "medium.h"
@@ -38,10 +38,10 @@ public:
private:
const Medium findMedium(const KURL &url);
- void invokeEject(const QString &device, bool quiet=false);
- QString m_errorStr;
+ void invokeEject(const TQString &device, bool quiet=false);
+ TQString m_errorStr;
bool m_isCdrom;
- QString m_mediumId;
+ TQString m_mediumId;
Dialog *dialog;
private slots:
@@ -51,7 +51,7 @@ private slots:
void error();
signals:
- void signalPasswordError(QString errorMsg);
+ void signalPasswordError(TQString errorMsg);
};
#endif
diff --git a/kioslave/media/propsdlgplugin/propertiespage.cpp b/kioslave/media/propsdlgplugin/propertiespage.cpp
index 455d1e2e3..14ac2b33f 100644
--- a/kioslave/media/propsdlgplugin/propertiespage.cpp
+++ b/kioslave/media/propsdlgplugin/propertiespage.cpp
@@ -17,18 +17,18 @@
Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qbuttongroup.h>
-#include <qlineedit.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qregexp.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqbuttongroup.h>
+#include <tqlineedit.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
#include <kpushbutton.h>
#include <kmessagebox.h>
#include <klocale.h>
-#include <qcombobox.h>
-#include <qtimer.h>
+#include <tqcombobox.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include "propertiespage.h"
#include <dcopref.h>
@@ -37,14 +37,14 @@
const char *short_names[] = {"lower", "win95", "winnt", "mixed", 0 };
const char *journales[] = {"data", "ordered", "writeback", 0 };
-PropertiesPage::PropertiesPage(QWidget* parent, const QString &_id)
+PropertiesPage::PropertiesPage(TQWidget* parent, const TQString &_id)
: PropertiesPageGUI(parent), id(_id)
{
kdDebug() << "props page " << id << endl;
DCOPRef mediamanager("kded", "mediamanager");
DCOPReply reply = mediamanager.call( "mountoptions", id);
- QStringList list;
+ TQStringList list;
if (reply.isValid())
list = reply;
@@ -52,10 +52,10 @@ PropertiesPage::PropertiesPage(QWidget* parent, const QString &_id)
if (list.size()) {
kdDebug() << "list " << list << endl;
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
{
- QString key = (*it).left((*it).find('='));
- QString value = (*it).mid((*it).find('=') + 1);
+ TQString key = (*it).left((*it).find('='));
+ TQString value = (*it).mid((*it).find('=') + 1);
kdDebug() << "key '" << key << "' value '" << value << "'\n";
options[key] = value;
}
@@ -64,43 +64,43 @@ PropertiesPage::PropertiesPage(QWidget* parent, const QString &_id)
option_ro->hide();
else
option_ro->setChecked(options["ro"] == "true");
- connect( option_ro, SIGNAL( stateChanged(int) ), SIGNAL( changed() ) );
+ connect( option_ro, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) );
if (!options.contains("quiet"))
option_quiet->hide();
else
option_quiet->setChecked(options["quiet"] == "true");
- connect( option_quiet, SIGNAL( stateChanged(int) ), SIGNAL( changed() ) );
+ connect( option_quiet, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) );
if (!options.contains("sync"))
option_sync->hide();
else
option_sync->setChecked(options["sync"] == "true");
- connect( option_sync, SIGNAL( stateChanged(int) ), SIGNAL( changed() ) );
+ connect( option_sync, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) );
if (!options.contains("atime"))
option_atime->hide();
else
option_atime->setChecked(options["atime"] == "true");
- connect( option_atime, SIGNAL( stateChanged(int) ), SIGNAL( changed() ) );
+ connect( option_atime, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) );
if (!options.contains("flush"))
option_flush->hide();
else
option_flush->setChecked(options["flush"] == "true");
- connect( option_flush, SIGNAL( stateChanged(int) ), SIGNAL( changed() ) );
+ connect( option_flush, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) );
if (!options.contains("utf8"))
option_utf8->hide();
else
option_utf8->setChecked(options["utf8"] == "true");
- connect( option_utf8, SIGNAL( stateChanged(int) ), SIGNAL( changed() ) );
+ connect( option_utf8, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) );
if (!options.contains("uid"))
option_uid->hide();
else
option_uid->setChecked(options["uid"] == "true");
- connect( option_uid, SIGNAL( stateChanged(int) ), SIGNAL( changed() ) );
+ connect( option_uid, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) );
if (!options.contains("shortname"))
{
@@ -115,7 +115,7 @@ PropertiesPage::PropertiesPage(QWidget* parent, const QString &_id)
option_shortname->setCurrentItem(index);
break;
}
- connect( option_shortname, SIGNAL( activated(int) ), SIGNAL( changed() ) );
+ connect( option_shortname, TQT_SIGNAL( activated(int) ), TQT_SIGNAL( changed() ) );
}
if (!options.contains("journaling"))
@@ -131,14 +131,14 @@ PropertiesPage::PropertiesPage(QWidget* parent, const QString &_id)
option_journaling->setCurrentItem(index);
break;
}
- connect( option_journaling, SIGNAL( activated(int) ), SIGNAL( changed() ) );
+ connect( option_journaling, TQT_SIGNAL( activated(int) ), TQT_SIGNAL( changed() ) );
}
label_filesystem->setText(i18n("Filesystem: %1").arg(options["filesystem"]));
option_mountpoint->setText(options["mountpoint"]);
- connect( option_mountpoint, SIGNAL( textChanged( const QString &) ), SIGNAL( changed() ) );
+ connect( option_mountpoint, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SIGNAL( changed() ) );
option_automount->setChecked(options["automount"] == "true");
- connect( option_automount, SIGNAL( stateChanged(int) ), SIGNAL( changed() ) );
+ connect( option_automount, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) );
if (!options.contains("journaling") &&
!options.contains("shortname") &&
@@ -161,43 +161,43 @@ PropertiesPage::~PropertiesPage()
bool PropertiesPage::save()
{
- QStringList result;
+ TQStringList result;
if (options.contains("ro"))
- result << QString("ro=%1").arg(option_ro->isChecked() ? "true" : "false");
+ result << TQString("ro=%1").arg(option_ro->isChecked() ? "true" : "false");
if (options.contains("quiet"))
- result << QString("quiet=%1").arg(option_quiet->isChecked() ? "true" : "false");
+ result << TQString("quiet=%1").arg(option_quiet->isChecked() ? "true" : "false");
if (options.contains("sync"))
- result << QString("sync=%1").arg(option_sync->isChecked() ? "true" : "false");
+ result << TQString("sync=%1").arg(option_sync->isChecked() ? "true" : "false");
if (options.contains("atime"))
- result << QString("atime=%1").arg(option_atime->isChecked() ? "true" : "false");
+ result << TQString("atime=%1").arg(option_atime->isChecked() ? "true" : "false");
if (options.contains("flush"))
- result << QString("flush=%1").arg(option_flush->isChecked() ? "true" : "false");
+ result << TQString("flush=%1").arg(option_flush->isChecked() ? "true" : "false");
if (options.contains("utf8"))
- result << QString("utf8=%1").arg(option_utf8->isChecked() ? "true" : "false");
+ result << TQString("utf8=%1").arg(option_utf8->isChecked() ? "true" : "false");
if (options.contains("uid"))
- result << QString("uid=%1").arg(option_uid->isChecked() ? "true" : "false");
+ result << TQString("uid=%1").arg(option_uid->isChecked() ? "true" : "false");
if (options.contains("shortname"))
- result << QString("shortname=%1").arg(short_names[option_shortname->currentItem()]);
+ result << TQString("shortname=%1").arg(short_names[option_shortname->currentItem()]);
if (options.contains("journaling"))
- result << QString("journaling=%1").arg(journales[option_journaling->currentItem()]);
+ result << TQString("journaling=%1").arg(journales[option_journaling->currentItem()]);
- QString mp = option_mountpoint->text();
+ TQString mp = option_mountpoint->text();
if (!mp.startsWith("/media/"))
{
KMessageBox::sorry(this, i18n("Mountpoint has to be below /media"));
return false;
}
- result << QString("mountpoint=%1").arg(mp);
- result << QString("automount=%1").arg(option_automount->isChecked() ? "true" : "false");
+ result << TQString("mountpoint=%1").arg(mp);
+ result << TQString("automount=%1").arg(option_automount->isChecked() ? "true" : "false");
kdDebug() << result << endl;
diff --git a/kioslave/media/propsdlgplugin/propertiespage.h b/kioslave/media/propsdlgplugin/propertiespage.h
index fa23c7873..f36e27ded 100644
--- a/kioslave/media/propsdlgplugin/propertiespage.h
+++ b/kioslave/media/propsdlgplugin/propertiespage.h
@@ -21,7 +21,7 @@
#define PROPERTIESPAGE_H
#include "propertiespagegui.h"
-#include <qmap.h>
+#include <tqmap.h>
class QCheckBox;
class Medium;
@@ -31,15 +31,15 @@ class PropertiesPage : public PropertiesPageGUI
Q_OBJECT
public:
- PropertiesPage(QWidget* parent, const QString &_id);
+ PropertiesPage(TQWidget* parent, const TQString &_id);
virtual ~PropertiesPage();
bool save();
protected:
- QMap<QString,QString> options;
- QString id;
+ TQMap<TQString,TQString> options;
+ TQString id;
};
diff --git a/kioslave/media/propsdlgplugin/propsdlgshareplugin.cpp b/kioslave/media/propsdlgplugin/propsdlgshareplugin.cpp
index dbaf6e898..59433a5da 100644
--- a/kioslave/media/propsdlgplugin/propsdlgshareplugin.cpp
+++ b/kioslave/media/propsdlgplugin/propsdlgshareplugin.cpp
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtimer.h>
+#include <tqstring.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
#include <kgenericfactory.h>
#include <kdebug.h>
@@ -50,7 +50,7 @@ class PropsDlgSharePlugin::Private
};
PropsDlgSharePlugin::PropsDlgSharePlugin( KPropertiesDialog *dlg,
- const char *, const QStringList & )
+ const char *, const TQStringList & )
: KPropsDlgPlugin(dlg), d(0)
{
if (properties->items().count() != 1)
@@ -65,15 +65,15 @@ PropsDlgSharePlugin::PropsDlgSharePlugin( KPropertiesDialog *dlg,
if ( !reply.isValid() )
return;
- QVBox* vbox = properties->addVBoxPage(i18n("&Mounting"));
+ TQVBox* vbox = properties->addVBoxPage(i18n("&Mounting"));
d = new Private();
d->page = new PropertiesPage(vbox, Medium::create(reply).id());
- connect(d->page, SIGNAL(changed()),
- SLOT(slotChanged()));
+ connect(d->page, TQT_SIGNAL(changed()),
+ TQT_SLOT(slotChanged()));
- // QTimer::singleShot(100, this, SLOT(slotChanged()));
+ // TQTimer::singleShot(100, this, TQT_SLOT(slotChanged()));
}
diff --git a/kioslave/media/propsdlgplugin/propsdlgshareplugin.h b/kioslave/media/propsdlgplugin/propsdlgshareplugin.h
index cb9fdfaab..87b7d1e13 100644
--- a/kioslave/media/propsdlgplugin/propsdlgshareplugin.h
+++ b/kioslave/media/propsdlgplugin/propsdlgshareplugin.h
@@ -26,7 +26,7 @@ class PropsDlgSharePlugin : public KPropsDlgPlugin
{
Q_OBJECT
public:
- PropsDlgSharePlugin( KPropertiesDialog *dlg, const char *, const QStringList & );
+ PropsDlgSharePlugin( KPropertiesDialog *dlg, const char *, const TQStringList & );
virtual ~PropsDlgSharePlugin();
virtual void applyChanges();
diff --git a/kioslave/media/testmedia.cpp b/kioslave/media/testmedia.cpp
index d3f19512c..89ced4ba1 100644
--- a/kioslave/media/testmedia.cpp
+++ b/kioslave/media/testmedia.cpp
@@ -28,12 +28,12 @@
#include <stdlib.h>
-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/nfs/kio_nfs.cpp b/kioslave/nfs/kio_nfs.cpp
index b35489c8d..debe19d3d 100644
--- a/kioslave/nfs/kio_nfs.cpp
+++ b/kioslave/nfs/kio_nfs.cpp
@@ -45,8 +45,8 @@
#include <time.h>
#include <unistd.h>
-#include <qfile.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqdir.h>
#include <kdebug.h>
#include <kinstance.h>
@@ -127,12 +127,12 @@ int kdemain( int argc, char **argv )
return 0;
}
-static bool isRoot(const QString& path)
+static bool isRoot(const TQString& path)
{
return (path.isEmpty() || (path=="/"));
}
-static bool isAbsoluteLink(const QString& path)
+static bool isAbsoluteLink(const TQString& path)
{
//hmm, don't know
if (path.isEmpty()) return TRUE;
@@ -166,23 +166,23 @@ static void createVirtualDirEntry(UDSEntry & entry)
}
-static void stripTrailingSlash(QString& path)
+static void stripTrailingSlash(TQString& path)
{
//if (path=="/") return;
if (path=="/") path="";
else if (path[path.length()-1]=='/') path.truncate(path.length()-1);
}
-static void getLastPart(const QString& path, QString& lastPart, QString& rest)
+static void getLastPart(const TQString& path, TQString& lastPart, TQString& rest)
{
int slashPos=path.findRev("/");
lastPart=path.mid(slashPos+1);
rest=path.left(slashPos+1);
}
-static QString removeFirstPart(const QString& path)
+static TQString removeFirstPart(const TQString& path)
{
- QString result("");
+ TQString result("");
if (path.isEmpty()) return result;
result=path.mid(1);
int slashPos=result.find("/");
@@ -235,7 +235,7 @@ NFSFileHandle& NFSFileHandle::operator= (const char* src)
}*/
-NFSProtocol::NFSProtocol (const QCString &pool, const QCString &app )
+NFSProtocol::NFSProtocol (const TQCString &pool, const TQCString &app )
:SlaveBase( "nfs", pool, app )
,m_client(0)
,m_sock(-1)
@@ -291,7 +291,7 @@ void NFSProtocol::closeConnection()
m_client=0;
}
-bool NFSProtocol::isExportedDir(const QString& path)
+bool NFSProtocol::isExportedDir(const TQString& path)
{
return (m_exportedDirs.find(path.mid(1))!=m_exportedDirs.end());
}
@@ -301,7 +301,7 @@ bool NFSProtocol::isExportedDir(const QString& path)
If this doesn't succeed, it needs to do a nfs rpc call
in order to obtain one.
*/
-NFSFileHandle NFSProtocol::getFileHandle(QString path)
+NFSFileHandle NFSProtocol::getFileHandle(TQString path)
{
if (m_client==0) openConnection();
@@ -326,7 +326,7 @@ NFSFileHandle NFSProtocol::getFileHandle(QString path)
kdDebug(7121)<<"path is in the cache, returning the FH -"<<m_handleCache[path]<<"-"<<endl;
return m_handleCache[path];
}
- QString rest, lastPart;
+ TQString rest, lastPart;
getLastPart(path,lastPart,rest);
kdDebug(7121)<<"splitting path into rest -"<<rest<<"- and lastPart -"<<lastPart<<"-"<<endl;
@@ -341,7 +341,7 @@ NFSFileHandle NFSProtocol::getFileHandle(QString path)
diropargs dirargs;
diropres dirres;
memcpy(dirargs.dir.data,(const char*)parentFH,NFS_FHSIZE);
- QCString tmpStr=QFile::encodeName(lastPart);
+ TQCString tmpStr=TQFile::encodeName(lastPart);
dirargs.name=tmpStr.data();
//cerr<<"calling rpc: FH: -"<<parentFH<<"- with name -"<<dirargs.name<<"-"<<endl;
@@ -416,7 +416,7 @@ void NFSProtocol::openConnection()
return;
}
}
- QCString hostName("localhost");
+ TQCString hostName("localhost");
char nameBuffer[1024];
nameBuffer[0] = '\0';
if (gethostname(nameBuffer, 1024)==0)
@@ -466,12 +466,12 @@ void NFSProtocol::openConnection()
atLeastOnceSucceeded=TRUE;
NFSFileHandle fh;
fh=fhStatus.fhstatus_u.fhs_fhandle;
- QString fname;
+ TQString fname;
if ( exportlist->ex_dir[0] == '/' )
fname = KIO::encodeFileName(exportlist->ex_dir + 1);
else
fname = KIO::encodeFileName(exportlist->ex_dir);
- m_handleCache.insert(QString("/")+fname,fh);
+ m_handleCache.insert(TQString("/")+fname,fh);
m_exportedDirs.append(fname);
// kdDebug() <<"appending file -"<<fname<<"- with FH: -"<<fhStatus.fhstatus_u.fhs_fhandle<<"-"<<endl;
}
@@ -511,7 +511,7 @@ void NFSProtocol::openConnection()
void NFSProtocol::listDir( const KURL& _url)
{
KURL url(_url);
- QString path( QFile::encodeName(url.path()));
+ TQString path( TQFile::encodeName(url.path()));
if (path.isEmpty())
{
@@ -530,7 +530,7 @@ void NFSProtocol::listDir( const KURL& _url)
totalSize( m_exportedDirs.count());
//in this case we don't need to do a real listdir
UDSEntry entry;
- for (QStringList::Iterator it=m_exportedDirs.begin(); it!=m_exportedDirs.end(); it++)
+ for (TQStringList::Iterator it=m_exportedDirs.begin(); it!=m_exportedDirs.end(); it++)
{
UDSAtom atom;
entry.clear();
@@ -546,7 +546,7 @@ void NFSProtocol::listDir( const KURL& _url)
return;
}
- QStringList filesToList;
+ TQStringList filesToList;
kdDebug(7121)<<"getting subdir -"<<path<<"-"<<endl;
stripTrailingSlash(path);
NFSFileHandle fh=getFileHandle(path);
@@ -569,7 +569,7 @@ void NFSProtocol::listDir( const KURL& _url)
if (!checkForError(clnt_stat,listres.status,path)) return;
for (entry *dirEntry=listres.readdirres_u.reply.entries;dirEntry!=0;dirEntry=dirEntry->nextentry)
{
- if ((QString(".")!=dirEntry->name) && (QString("..")!=dirEntry->name))
+ if ((TQString(".")!=dirEntry->name) && (TQString("..")!=dirEntry->name))
filesToList.append(dirEntry->name);
}
} while (!listres.readdirres_u.reply.eof);
@@ -577,13 +577,13 @@ void NFSProtocol::listDir( const KURL& _url)
UDSEntry entry;
//stat all files in filesToList
- for (QStringList::Iterator it=filesToList.begin(); it!=filesToList.end(); it++)
+ for (TQStringList::Iterator it=filesToList.begin(); it!=filesToList.end(); it++)
{
UDSAtom atom;
diropargs dirargs;
diropres dirres;
memcpy(dirargs.dir.data,fh,NFS_FHSIZE);
- QCString tmpStr=QFile::encodeName(*it);
+ TQCString tmpStr=TQFile::encodeName(*it);
dirargs.name=tmpStr.data();
kdDebug(7121)<<"calling rpc: FH: -"<<fh<<"- with name -"<<dirargs.name<<"-"<<endl;
@@ -619,7 +619,7 @@ void NFSProtocol::listDir( const KURL& _url)
(xdrproc_t) xdr_readlinkres, (char*)&readLinkRes,total_timeout);
if (!checkForError(clnt_stat,readLinkRes.status,(*it))) return;
kdDebug(7121)<<"link dest is -"<<readLinkRes.readlinkres_u.data<<"-"<<endl;
- QCString linkDest(readLinkRes.readlinkres_u.data);
+ TQCString linkDest(readLinkRes.readlinkres_u.data);
atom.m_uds = KIO::UDS_LINK_DEST;
atom.m_str = linkDest;
entry.append( atom );
@@ -637,7 +637,7 @@ void NFSProtocol::listDir( const KURL& _url)
}
else
{
- tmpStr=QDir::cleanDirPath(path+QString("/")+QString(linkDest)).latin1();
+ tmpStr=TQDir::cleanDirPath(path+TQString("/")+TQString(linkDest)).latin1();
dirargs.name=tmpStr.data();
tmpFH=getFileHandle(tmpStr);
memcpy(dirargs.dir.data,tmpFH,NFS_FHSIZE);
@@ -664,10 +664,10 @@ void NFSProtocol::listDir( const KURL& _url)
void NFSProtocol::stat( const KURL & url)
{
- QString path( QFile::encodeName(url.path()));
+ TQString path( TQFile::encodeName(url.path()));
stripTrailingSlash(path);
kdDebug(7121)<<"NFS::stat for -"<<path<<"-"<<endl;
- QString tmpPath=path;
+ TQString tmpPath=path;
if ((tmpPath.length()>1) && (tmpPath[0]=='/')) tmpPath=tmpPath.mid(1);
// We can't stat root, but we know it's a dir
if (isRoot(path) || isExportedDir(path))
@@ -696,7 +696,7 @@ void NFSProtocol::stat( const KURL & url)
diropargs dirargs;
attrstat attrAndStat;
memcpy(dirargs.dir.data,fh,NFS_FHSIZE);
- QCString tmpStr=QFile::encodeName(path);
+ TQCString tmpStr=TQFile::encodeName(path);
dirargs.name=tmpStr.data();
kdDebug(7121)<<"calling rpc: FH: -"<<fh<<"- with name -"<<dirargs.name<<"-"<<endl;
@@ -710,7 +710,7 @@ void NFSProtocol::stat( const KURL & url)
UDSAtom atom;
- QString fileName, parentDir;
+ TQString fileName, parentDir;
getLastPart(path, fileName, parentDir);
stripTrailingSlash(parentDir);
@@ -734,7 +734,7 @@ void NFSProtocol::stat( const KURL & url)
(xdrproc_t) xdr_readlinkres, (char*)&readLinkRes,total_timeout);
if (!checkForError(clnt_stat,readLinkRes.status,path)) return;
kdDebug(7121)<<"link dest is -"<<readLinkRes.readlinkres_u.data<<"-"<<endl;
- QCString linkDest(readLinkRes.readlinkres_u.data);
+ TQCString linkDest(readLinkRes.readlinkres_u.data);
atom.m_uds = KIO::UDS_LINK_DEST;
atom.m_str = linkDest;
entry.append( atom );
@@ -753,7 +753,7 @@ void NFSProtocol::stat( const KURL & url)
else
{
- tmpStr=QDir::cleanDirPath(parentDir+QString("/")+QString(linkDest)).latin1();
+ tmpStr=TQDir::cleanDirPath(parentDir+TQString("/")+TQString(linkDest)).latin1();
diropargs dirargs;
dirargs.name=tmpStr.data();
NFSFileHandle tmpFH;
@@ -775,7 +775,7 @@ void NFSProtocol::stat( const KURL & url)
finished();
}
-void NFSProtocol::completeAbsoluteLinkUDSEntry(UDSEntry& entry, const QCString& path)
+void NFSProtocol::completeAbsoluteLinkUDSEntry(UDSEntry& entry, const TQCString& path)
{
//taken from file.cc
struct stat buff;
@@ -800,14 +800,14 @@ void NFSProtocol::completeAbsoluteLinkUDSEntry(UDSEntry& entry, const QCString&
atom.m_uds = KIO::UDS_USER;
uid_t uid = buff.st_uid;
- QString *temp = m_usercache.find( uid );
+ TQString *temp = m_usercache.find( uid );
if ( !temp )
{
struct passwd *user = getpwuid( uid );
if ( user )
{
- m_usercache.insert( uid, new QString(QString::fromLatin1(user->pw_name)) );
+ m_usercache.insert( uid, new TQString(TQString::fromLatin1(user->pw_name)) );
atom.m_str = user->pw_name;
}
else
@@ -825,7 +825,7 @@ void NFSProtocol::completeAbsoluteLinkUDSEntry(UDSEntry& entry, const QCString&
struct group *grp = getgrgid( gid );
if ( grp )
{
- m_groupcache.insert( gid, new QString(QString::fromLatin1(grp->gr_name)) );
+ m_groupcache.insert( gid, new TQString(TQString::fromLatin1(grp->gr_name)) );
atom.m_str = grp->gr_name;
}
else
@@ -893,13 +893,13 @@ void NFSProtocol::completeUDSEntry(UDSEntry& entry, fattr& attributes)
atom.m_uds = KIO::UDS_USER;
uid_t uid = attributes.uid;
- QString *temp = m_usercache.find( uid );
+ TQString *temp = m_usercache.find( uid );
if ( !temp )
{
struct passwd *user = getpwuid( uid );
if ( user )
{
- m_usercache.insert( uid, new QString(user->pw_name) );
+ m_usercache.insert( uid, new TQString(user->pw_name) );
atom.m_str = user->pw_name;
}
else
@@ -917,7 +917,7 @@ void NFSProtocol::completeUDSEntry(UDSEntry& entry, fattr& attributes)
struct group *grp = getgrgid( gid );
if ( grp )
{
- m_groupcache.insert( gid, new QString(grp->gr_name) );
+ m_groupcache.insert( gid, new TQString(grp->gr_name) );
atom.m_str = grp->gr_name;
}
else
@@ -959,7 +959,7 @@ void NFSProtocol::completeUDSEntry(UDSEntry& entry, fattr& attributes)
}*/
}
-void NFSProtocol::setHost(const QString& host, int /*port*/, const QString& /*user*/, const QString& /*pass*/)
+void NFSProtocol::setHost(const TQString& host, int /*port*/, const TQString& /*user*/, const TQString& /*pass*/)
{
kdDebug(7121)<<"setHost: -"<<host<<"-"<<endl;
if (host.isEmpty())
@@ -977,9 +977,9 @@ void NFSProtocol::setHost(const QString& host, int /*port*/, const QString& /*us
void NFSProtocol::mkdir( const KURL& url, int permissions )
{
kdDebug(7121)<<"mkdir"<<endl;
- QString thePath( QFile::encodeName(url.path()));
+ TQString thePath( TQFile::encodeName(url.path()));
stripTrailingSlash(thePath);
- QString dirName, parentDir;
+ TQString dirName, parentDir;
getLastPart(thePath, dirName, parentDir);
stripTrailingSlash(parentDir);
kdDebug(7121)<<"path: -"<<thePath<<"- dir: -"<<dirName<<"- parentDir: -"<<parentDir<<"-"<<endl;
@@ -997,7 +997,7 @@ void NFSProtocol::mkdir( const KURL& url, int permissions )
createargs createArgs;
memcpy(createArgs.where.dir.data,fh,NFS_FHSIZE);
- QCString tmpName=QFile::encodeName(dirName);
+ TQCString tmpName=TQFile::encodeName(dirName);
createArgs.where.name=tmpName.data();
if (permissions==-1) createArgs.attributes.mode=0755;
else createArgs.attributes.mode=permissions;
@@ -1011,7 +1011,7 @@ void NFSProtocol::mkdir( const KURL& url, int permissions )
finished();
}
-bool NFSProtocol::checkForError(int clientStat, int nfsStat, const QString& text)
+bool NFSProtocol::checkForError(int clientStat, int nfsStat, const TQString& text)
{
if (clientStat!=RPC_SUCCESS)
{
@@ -1090,10 +1090,10 @@ bool NFSProtocol::checkForError(int clientStat, int nfsStat, const QString& text
void NFSProtocol::del( const KURL& url, bool isfile)
{
- QString thePath( QFile::encodeName(url.path()));
+ TQString thePath( TQFile::encodeName(url.path()));
stripTrailingSlash(thePath);
- QString fileName, parentDir;
+ TQString fileName, parentDir;
getLastPart(thePath, fileName, parentDir);
stripTrailingSlash(parentDir);
kdDebug(7121)<<"del(): path: -"<<thePath<<"- file -"<<fileName<<"- parentDir: -"<<parentDir<<"-"<<endl;
@@ -1115,7 +1115,7 @@ void NFSProtocol::del( const KURL& url, bool isfile)
kdDebug(7121)<<"Deleting file "<<thePath<<endl;
diropargs dirOpArgs;
memcpy(dirOpArgs.dir.data,fh,NFS_FHSIZE);
- QCString tmpName=QFile::encodeName(fileName);
+ TQCString tmpName=TQFile::encodeName(fileName);
dirOpArgs.name=tmpName.data();
nfsstat nfsStat;
@@ -1133,7 +1133,7 @@ void NFSProtocol::del( const KURL& url, bool isfile)
kdDebug(7121)<<"Deleting directory "<<thePath<<endl;
diropargs dirOpArgs;
memcpy(dirOpArgs.dir.data,fh,NFS_FHSIZE);
- QCString tmpName=QFile::encodeName(fileName);
+ TQCString tmpName=TQFile::encodeName(fileName);
dirOpArgs.name=tmpName.data();
nfsstat nfsStat;
@@ -1150,7 +1150,7 @@ void NFSProtocol::del( const KURL& url, bool isfile)
void NFSProtocol::chmod( const KURL& url, int permissions )
{
- QString thePath( QFile::encodeName(url.path()));
+ TQString thePath( TQFile::encodeName(url.path()));
stripTrailingSlash(thePath);
kdDebug( 7121 ) << "chmod -"<< thePath << "-"<<endl;
if (isRoot(thePath) || isExportedDir(thePath))
@@ -1190,7 +1190,7 @@ void NFSProtocol::chmod( const KURL& url, int permissions )
void NFSProtocol::get( const KURL& url )
{
- QString thePath( QFile::encodeName(url.path()));
+ TQString thePath( TQFile::encodeName(url.path()));
kdDebug(7121)<<"get() -"<<thePath<<"-"<<endl;
NFSFileHandle fh=getFileHandle(thePath);
if (fh.isInvalid())
@@ -1208,7 +1208,7 @@ void NFSProtocol::get( const KURL& url )
char buf[NFS_MAXDATA];
readRes.readres_u.reply.data.data_val=buf;
- QByteArray array;
+ TQByteArray array;
do
{
int clnt_stat = clnt_call(m_client, NFSPROC_READ,
@@ -1231,20 +1231,20 @@ void NFSProtocol::get( const KURL& url )
}
} while (offset>0);
- data( QByteArray() );
+ data( TQByteArray() );
finished();
}
//TODO the partial putting thing is not yet implemented
void NFSProtocol::put( const KURL& url, int _mode, bool _overwrite, bool /*_resume*/ )
{
- QString destPath( QFile::encodeName(url.path()));
+ TQString destPath( TQFile::encodeName(url.path()));
kdDebug( 7121 ) << "Put -" << destPath <<"-"<<endl;
- /*QString dest_part( dest_orig );
+ /*TQString dest_part( dest_orig );
dest_part += ".part";*/
stripTrailingSlash(destPath);
- QString parentDir, fileName;
+ TQString parentDir, fileName;
getLastPart(destPath,fileName, parentDir);
if (isRoot(parentDir))
{
@@ -1282,7 +1282,7 @@ void NFSProtocol::put( const KURL& url, int _mode, bool _overwrite, bool /*_resu
}
createargs createArgs;
memcpy(createArgs.where.dir.data,(const char*)parentFH,NFS_FHSIZE);
- QCString tmpName=QFile::encodeName(fileName);
+ TQCString tmpName=TQFile::encodeName(fileName);
createArgs.where.name=tmpName.data();
//the mode is apparently ignored if the file already exists
@@ -1322,7 +1322,7 @@ void NFSProtocol::put( const KURL& url, int _mode, bool _overwrite, bool /*_resu
kdDebug(7121)<<"starting to put"<<endl;
do
{
- QByteArray buffer;
+ TQByteArray buffer;
dataReq(); // Request for data
result = readData( buffer );
//kdDebug(7121)<<"received "<<result<<" bytes for putting"<<endl;
@@ -1364,8 +1364,8 @@ void NFSProtocol::put( const KURL& url, int _mode, bool _overwrite, bool /*_resu
void NFSProtocol::rename( const KURL &src, const KURL &dest, bool _overwrite )
{
- QString srcPath( QFile::encodeName(src.path()));
- QString destPath( QFile::encodeName(dest.path()));
+ TQString srcPath( TQFile::encodeName(src.path()));
+ TQString destPath( TQFile::encodeName(dest.path()));
stripTrailingSlash(srcPath);
stripTrailingSlash(destPath);
kdDebug(7121)<<"renaming -"<<srcPath<<"- to -"<<destPath<<"-"<<endl;
@@ -1387,7 +1387,7 @@ void NFSProtocol::rename( const KURL &src, const KURL &dest, bool _overwrite )
}
}
- QString srcFileName, srcParentDir, destFileName, destParentDir;
+ TQString srcFileName, srcParentDir, destFileName, destParentDir;
getLastPart(srcPath, srcFileName, srcParentDir);
NFSFileHandle srcFH=getFileHandle(srcParentDir);
@@ -1398,7 +1398,7 @@ void NFSProtocol::rename( const KURL &src, const KURL &dest, bool _overwrite )
}
renameargs renameArgs;
memcpy(renameArgs.from.dir.data,srcFH,NFS_FHSIZE);
- QCString tmpName=QFile::encodeName(srcFileName);
+ TQCString tmpName=TQFile::encodeName(srcFileName);
renameArgs.from.name=tmpName.data();
getLastPart(destPath, destFileName, destParentDir);
@@ -1409,7 +1409,7 @@ void NFSProtocol::rename( const KURL &src, const KURL &dest, bool _overwrite )
return;
}
memcpy(renameArgs.to.dir.data,destFH,NFS_FHSIZE);
- QCString tmpName2=QFile::encodeName(destFileName);
+ TQCString tmpName2=TQFile::encodeName(destFileName);
renameArgs.to.name=tmpName2.data();
nfsstat nfsStat;
@@ -1423,7 +1423,7 @@ void NFSProtocol::rename( const KURL &src, const KURL &dest, bool _overwrite )
void NFSProtocol::copy( const KURL &src, const KURL &dest, int _mode, bool _overwrite )
{
//prepare the source
- QString thePath( QFile::encodeName(src.path()));
+ TQString thePath( TQFile::encodeName(src.path()));
stripTrailingSlash(thePath);
kdDebug( 7121 ) << "Copy to -" << thePath <<"-"<<endl;
NFSFileHandle fh=getFileHandle(thePath);
@@ -1434,9 +1434,9 @@ void NFSProtocol::copy( const KURL &src, const KURL &dest, int _mode, bool _over
};
//create the destination
- QString destPath( QFile::encodeName(dest.path()));
+ TQString destPath( TQFile::encodeName(dest.path()));
stripTrailingSlash(destPath);
- QString parentDir, fileName;
+ TQString parentDir, fileName;
getLastPart(destPath,fileName, parentDir);
if (isRoot(parentDir))
{
@@ -1472,7 +1472,7 @@ void NFSProtocol::copy( const KURL &src, const KURL &dest, int _mode, bool _over
};
createargs createArgs;
memcpy(createArgs.where.dir.data,(const char*)parentFH,NFS_FHSIZE);
- QCString tmpName=QFile::encodeName(fileName);
+ TQCString tmpName=TQFile::encodeName(fileName);
createArgs.where.name=tmpName.data();
if (_mode==-1) createArgs.attributes.mode=0644;
else createArgs.attributes.mode=_mode;
@@ -1543,13 +1543,13 @@ void NFSProtocol::copy( const KURL &src, const KURL &dest, int _mode, bool _over
}
//TODO why isn't this even called ?
-void NFSProtocol::symlink( const QString &target, const KURL &dest, bool )
+void NFSProtocol::symlink( const TQString &target, const KURL &dest, bool )
{
kdDebug(7121)<<"symlinking "<<endl;
- QString destPath=dest.path();
+ TQString destPath=dest.path();
stripTrailingSlash(destPath);
- QString parentDir, fileName;
+ TQString parentDir, fileName;
getLastPart(destPath,fileName, parentDir);
kdDebug(7121)<<"symlinking "<<parentDir<<" "<<fileName<<" to "<<target<<endl;
NFSFileHandle fh=getFileHandle(parentDir);
@@ -1565,11 +1565,11 @@ void NFSProtocol::symlink( const QString &target, const KURL &dest, bool )
}
kdDebug(7121)<<"tach"<<endl;
- QCString tmpStr=target.latin1();
+ TQCString tmpStr=target.latin1();
symlinkargs symLinkArgs;
symLinkArgs.to=tmpStr.data();
memcpy(symLinkArgs.from.dir.data,(const char*)fh,NFS_FHSIZE);
- QCString tmpStr2=QFile::encodeName(destPath);
+ TQCString tmpStr2=TQFile::encodeName(destPath);
symLinkArgs.from.name=tmpStr2.data();
nfsstat nfsStat;
@@ -1582,30 +1582,30 @@ void NFSProtocol::symlink( const QString &target, const KURL &dest, bool )
}
-bool NFSProtocol::isValidLink(const QString& parentDir, const QString& linkDest)
+bool NFSProtocol::isValidLink(const TQString& parentDir, const TQString& linkDest)
{
kdDebug(7121)<<"isValidLink: parent: "<<parentDir<<" link: "<<linkDest<<endl;
if (linkDest.isEmpty()) return FALSE;
if (isAbsoluteLink(linkDest))
{
kdDebug(7121)<<"is an absolute link"<<endl;
- return QFile::exists(linkDest);
+ return TQFile::exists(linkDest);
}
else
{
kdDebug(7121)<<"is a relative link"<<endl;
- QString absDest=parentDir+"/"+linkDest;
+ TQString absDest=parentDir+"/"+linkDest;
kdDebug(7121)<<"pointing abs to "<<absDest<<endl;
absDest=removeFirstPart(absDest);
kdDebug(7121)<<"removed first part "<<absDest<<endl;
- absDest=QDir::cleanDirPath(absDest);
+ absDest=TQDir::cleanDirPath(absDest);
kdDebug(7121)<<"simplified to "<<absDest<<endl;
if (absDest.find("../")==0)
return FALSE;
kdDebug(7121)<<"is inside the nfs tree"<<endl;
absDest=parentDir+"/"+linkDest;
- absDest=QDir::cleanDirPath(absDest);
+ absDest=TQDir::cleanDirPath(absDest);
kdDebug(7121)<<"getting file handle of "<<absDest<<endl;
NFSFileHandle fh=getFileHandle(absDest);
return (!fh.isInvalid());
diff --git a/kioslave/nfs/kio_nfs.h b/kioslave/nfs/kio_nfs.h
index 23eb0b467..9f6d38103 100644
--- a/kioslave/nfs/kio_nfs.h
+++ b/kioslave/nfs/kio_nfs.h
@@ -23,11 +23,11 @@
#include <kio/slavebase.h>
#include <kio/global.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qintdict.h>
-#include <qtimer.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqintdict.h>
+#include <tqtimer.h>
#define PORTMAP //this seems to be required to compile on Solaris
#include <rpc/rpc.h>
@@ -55,24 +55,24 @@ class NFSFileHandle
//ostream& operator<<(ostream&, const NFSFileHandle&);
-typedef QMap<QString,NFSFileHandle> NFSFileHandleMap;
+typedef TQMap<TQString,NFSFileHandle> NFSFileHandleMap;
class NFSProtocol : public KIO::SlaveBase
{
public:
- NFSProtocol (const QCString &pool, const QCString &app );
+ NFSProtocol (const TQCString &pool, const TQCString &app );
virtual ~NFSProtocol();
virtual void openConnection();
virtual void closeConnection();
- 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 put( const KURL& url, int _mode,bool _overwrite, bool _resume );
virtual void get( const KURL& url );
virtual void listDir( const KURL& url);
- virtual void symlink( const QString &target, const KURL &dest, bool );
+ virtual void symlink( const TQString &target, const KURL &dest, bool );
virtual void stat( const KURL & url);
virtual void mkdir( const KURL& url, int permissions );
virtual void del( const KURL& url, bool isfile);
@@ -81,22 +81,22 @@ class NFSProtocol : public KIO::SlaveBase
virtual void copy( const KURL& src, const KURL &dest, int mode, bool overwrite );
protected:
// void createVirtualDirEntry(KIO::UDSEntry & entry);
- bool checkForError(int clientStat, int nfsStat, const QString& text);
- bool isExportedDir(const QString& path);
+ bool checkForError(int clientStat, int nfsStat, const TQString& text);
+ bool isExportedDir(const TQString& path);
void completeUDSEntry(KIO::UDSEntry& entry, fattr& attributes);
void completeBadLinkUDSEntry(KIO::UDSEntry& entry, fattr& attributes);
- void completeAbsoluteLinkUDSEntry(KIO::UDSEntry& entry, const QCString& path);
- bool isValidLink(const QString& parentDir, const QString& linkDest);
-// bool isAbsoluteLink(const QString& path);
+ void completeAbsoluteLinkUDSEntry(KIO::UDSEntry& entry, const TQCString& path);
+ bool isValidLink(const TQString& parentDir, const TQString& linkDest);
+// bool isAbsoluteLink(const TQString& path);
- NFSFileHandle getFileHandle(QString path);
+ NFSFileHandle getFileHandle(TQString path);
NFSFileHandleMap m_handleCache;
- QIntDict<QString> m_usercache; // maps long ==> QString *
- QIntDict<QString> m_groupcache;
+ TQIntDict<TQString> m_usercache; // maps long ==> TQString *
+ TQIntDict<TQString> m_groupcache;
- QStringList m_exportedDirs;
- QString m_currentHost;
+ TQStringList m_exportedDirs;
+ TQString m_currentHost;
CLIENT *m_client;
CLIENT *m_nfsClient;
timeval total_timeout;
diff --git a/kioslave/nntp/nntp.cpp b/kioslave/nntp/nntp.cpp
index 40b162868..b109bb58a 100644
--- a/kioslave/nntp/nntp.cpp
+++ b/kioslave/nntp/nntp.cpp
@@ -12,8 +12,8 @@
#include <stdlib.h>
#include <stdio.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqregexp.h>
#include <kinstance.h>
#include <kdebug.h>
@@ -62,7 +62,7 @@ int kdemain(int argc, char **argv) {
/****************** NNTPProtocol ************************/
-NNTPProtocol::NNTPProtocol ( const QCString & pool, const QCString & app, bool isSSL )
+NNTPProtocol::NNTPProtocol ( const TQCString & pool, const TQCString & app, bool isSSL )
: TCPSlaveBase( (isSSL ? NNTPS_PORT : NNTP_PORT), (isSSL ? "nntps" : "nntp"), pool,
app, isSSL )
{
@@ -81,10 +81,10 @@ NNTPProtocol::~NNTPProtocol() {
nntp_close();
}
-void NNTPProtocol::setHost ( const QString & host, int port, const QString & user,
- const QString & pass )
+void NNTPProtocol::setHost ( const TQString & host, int port, const TQString & user,
+ const TQString & pass )
{
- DBG << "setHost: " << ( ! user.isEmpty() ? (user+"@") : QString(""))
+ DBG << "setHost: " << ( ! user.isEmpty() ? (user+"@") : TQString(""))
<< host << ":" << ( ( port == 0 ) ? m_iDefaultPort : port ) << endl;
if ( isConnectionValid() && (mHost != host || m_iPort != port ||
@@ -99,11 +99,11 @@ void NNTPProtocol::setHost ( const QString & host, int port, const QString & use
void NNTPProtocol::get(const KURL& url) {
DBG << "get " << url.prettyURL() << endl;
- QString path = QDir::cleanDirPath(url.path());
- QRegExp regMsgId = QRegExp("^\\/?[a-z0-9\\.\\-_]+\\/<\\S+>$", false);
+ TQString path = TQDir::cleanDirPath(url.path());
+ TQRegExp regMsgId = TQRegExp("^\\/?[a-z0-9\\.\\-_]+\\/<\\S+>$", false);
int pos;
- QString group;
- QString msg_id;
+ TQString group;
+ TQString msg_id;
// path should be like: /group/<msg_id>
if (regMsgId.search(path) != 0) {
@@ -142,8 +142,8 @@ void NNTPProtocol::get(const KURL& url) {
}
// read and send data
- QCString line;
- QByteArray buffer;
+ TQCString line;
+ TQByteArray buffer;
char tmp[MAX_PACKET_LEN];
int len = 0;
while ( true ) {
@@ -160,7 +160,7 @@ void NNTPProtocol::get(const KURL& url) {
break;
if ( line.left(2) == ".." )
line.remove( 0, 1 );
- // cannot use QCString, it would send the 0-terminator too
+ // cannot use TQCString, it would send the 0-terminator too
buffer.setRawData( line.data(), line.length() );
data( buffer );
buffer.resetRawData( line.data(), line.length() );
@@ -181,10 +181,10 @@ void NNTPProtocol::put( const KURL &/*url*/, int /*permissions*/, bool /*overwri
finished();
}
-void NNTPProtocol::special(const QByteArray& data) {
+void NNTPProtocol::special(const TQByteArray& data) {
// 1 = post article
int cmd;
- QDataStream stream(data, IO_ReadOnly);
+ TQDataStream stream(data, IO_ReadOnly);
if ( !nntp_open() )
return;
@@ -214,13 +214,13 @@ bool NNTPProtocol::post_article() {
int result;
bool last_chunk_had_line_ending = true;
do {
- QByteArray buffer;
- QCString data;
+ TQByteArray buffer;
+ TQCString data;
dataReq();
result = readData(buffer);
// treat the buffer data
if (result>0) {
- data = QCString(buffer.data(),buffer.size()+1);
+ data = TQCString(buffer.data(),buffer.size()+1);
// translate "\r\n." to "\r\n.."
int pos=0;
if (last_chunk_had_line_ending && data[0] == '.') {
@@ -265,17 +265,17 @@ bool NNTPProtocol::post_article() {
void NNTPProtocol::stat( const KURL& url ) {
DBG << "stat " << url.prettyURL() << endl;
UDSEntry entry;
- QString path = QDir::cleanDirPath(url.path());
- QRegExp regGroup = QRegExp("^\\/?[a-z0-9\\.\\-_]+\\/?$",false);
- QRegExp regMsgId = QRegExp("^\\/?[a-z0-9\\.\\-_]+\\/<\\S+>$", false);
+ TQString path = TQDir::cleanDirPath(url.path());
+ TQRegExp regGroup = TQRegExp("^\\/?[a-z0-9\\.\\-_]+\\/?$",false);
+ TQRegExp regMsgId = TQRegExp("^\\/?[a-z0-9\\.\\-_]+\\/<\\S+>$", false);
int pos;
- QString group;
- QString msg_id;
+ TQString group;
+ TQString msg_id;
// / = group list
if (path.isEmpty() || path == "/") {
DBG << "stat root" << endl;
- fillUDSEntry(entry, QString::null, 0, postingAllowed, false);
+ fillUDSEntry(entry, TQString::null, 0, postingAllowed, false);
// /group = message list
} else if (regGroup.search(path) == 0) {
@@ -312,7 +312,7 @@ void NNTPProtocol::listDir( const KURL& url ) {
if ( !nntp_open() )
return;
- QString path = QDir::cleanDirPath(url.path());
+ TQString path = TQDir::cleanDirPath(url.path());
if (path.isEmpty())
{
@@ -329,20 +329,20 @@ void NNTPProtocol::listDir( const KURL& url ) {
} else {
// if path = /group
int pos;
- QString group;
+ TQString group;
if (path.left(1) == "/")
path.remove(0,1);
if ((pos = path.find('/')) > 0)
group = path.left(pos);
else
group = path;
- QString first = url.queryItem( "first" );
+ TQString first = url.queryItem( "first" );
if ( fetchGroup( group, first.toULong() ) )
finished();
}
}
-void NNTPProtocol::fetchGroups( const QString &since )
+void NNTPProtocol::fetchGroups( const TQString &since )
{
int expected;
int res;
@@ -361,7 +361,7 @@ void NNTPProtocol::fetchGroups( const QString &since )
}
// read newsgroups line by line
- QCString line, group;
+ TQCString line, group;
int pos, pos2;
long msg_cnt;
bool moderated;
@@ -407,7 +407,7 @@ void NNTPProtocol::fetchGroups( const QString &since )
// incremental article listing
UDSAtom atom;
atom.m_uds = UDS_EXTRA;
- atom.m_str = QString::number( last );
+ atom.m_str = TQString::number( last );
entry.append( atom );
entryList.append(entry);
@@ -422,9 +422,9 @@ void NNTPProtocol::fetchGroups( const QString &since )
if (entryList.count() > 0) listEntries(entryList);
}
-bool NNTPProtocol::fetchGroup( QString &group, unsigned long first ) {
+bool NNTPProtocol::fetchGroup( TQString &group, unsigned long first ) {
int res_code;
- QString resp_line;
+ TQString resp_line;
// select group
res_code = sendCommand( "GROUP " + group );
@@ -471,15 +471,15 @@ bool NNTPProtocol::fetchGroupRFC977( unsigned long first )
UDSEntryList entryList;
// set article pointer to first article and get msg-id of it
- int res_code = sendCommand( "STAT " + QString::number( first ) );
- QString resp_line = readBuffer;
+ int res_code = sendCommand( "STAT " + TQString::number( first ) );
+ TQString resp_line = readBuffer;
if (res_code != 223) {
unexpected_response(res_code,"STAT");
return false;
}
//STAT res_line: 223 nnn <msg_id> ...
- QString msg_id;
+ TQString msg_id;
int pos, pos2;
if ((pos = resp_line.find('<')) > 0 && (pos2 = resp_line.find('>',pos+1))) {
msg_id = resp_line.mid(pos,pos2-pos+1);
@@ -528,8 +528,8 @@ bool NNTPProtocol::fetchGroupXOVER( unsigned long first, bool &notSupported )
{
notSupported = false;
- QString line;
- QStringList headers;
+ TQString line;
+ TQStringList headers;
int res = sendCommand( "LIST OVERVIEW.FMT" );
if ( res == 215 ) {
@@ -552,7 +552,7 @@ bool NNTPProtocol::fetchGroupXOVER( unsigned long first, bool &notSupported )
<< "References:" << "Bytes:" << "Lines:";
}
- res = sendCommand( "XOVER " + QString::number( first ) + "-" );
+ res = sendCommand( "XOVER " + TQString::number( first ) + "-" );
if ( res == 420 )
return true; // no articles selected
if ( res == 500 )
@@ -561,12 +561,12 @@ bool NNTPProtocol::fetchGroupXOVER( unsigned long first, bool &notSupported )
return false;
long msgSize;
- QString msgId;
+ TQString msgId;
UDSAtom atom;
UDSEntry entry;
UDSEntryList entryList;
- QStringList fields;
+ TQStringList fields;
while ( true ) {
if ( ! waitForResponse( readTimeout() ) ) {
error( ERR_SERVER_TIMEOUT, mHost );
@@ -582,11 +582,11 @@ bool NNTPProtocol::fetchGroupXOVER( unsigned long first, bool &notSupported )
return true;
}
- fields = QStringList::split( "\t", line, true );
- msgId = QString::null;
+ fields = TQStringList::split( "\t", line, true );
+ msgId = TQString::null;
msgSize = 0;
- QStringList::ConstIterator it = headers.constBegin();
- QStringList::ConstIterator it2 = fields.constBegin();
+ TQStringList::ConstIterator it = headers.constBegin();
+ TQStringList::ConstIterator it2 = fields.constBegin();
++it2; // first entry is the serial number
for ( ; it != headers.constEnd() && it2 != fields.constEnd(); ++it, ++it2 ) {
if ( (*it).contains( "Message-ID:", false ) ) {
@@ -617,7 +617,7 @@ bool NNTPProtocol::fetchGroupXOVER( unsigned long first, bool &notSupported )
}
-void NNTPProtocol::fillUDSEntry(UDSEntry& entry, const QString& name, long size,
+void NNTPProtocol::fillUDSEntry(UDSEntry& entry, const TQString& name, long size,
bool posting_allowed, bool is_article) {
long posting=0;
@@ -633,14 +633,14 @@ void NNTPProtocol::fillUDSEntry(UDSEntry& entry, const QString& name, long size,
// entry size
atom.m_uds = UDS_SIZE;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
atom.m_long = size;
entry.append(atom);
// file type
atom.m_uds = UDS_FILE_TYPE;
atom.m_long = is_article? S_IFREG : S_IFDIR;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
entry.append(atom);
// access permissions
@@ -648,11 +648,11 @@ void NNTPProtocol::fillUDSEntry(UDSEntry& entry, const QString& name, long size,
posting = posting_allowed? (S_IWUSR | S_IWGRP | S_IWOTH) : 0;
atom.m_long = (is_article)? (S_IRUSR | S_IRGRP | S_IROTH) :
(S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH | posting);
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
entry.append(atom);
atom.m_uds = UDS_USER;
- atom.m_str = mUser.isEmpty() ? QString("root") : mUser;
+ atom.m_str = mUser.isEmpty() ? TQString("root") : mUser;
atom.m_long= 0;
entry.append(atom);
@@ -746,7 +746,7 @@ bool NNTPProtocol::nntp_open()
}
}
-int NNTPProtocol::sendCommand( const QString &cmd )
+int NNTPProtocol::sendCommand( const TQString &cmd )
{
int res_code = 0;
@@ -811,7 +811,7 @@ int NNTPProtocol::sendCommand( const QString &cmd )
return res_code;
}
-void NNTPProtocol::unexpected_response( int res_code, const QString & command) {
+void NNTPProtocol::unexpected_response( int res_code, const TQString & command) {
ERR << "Unexpected response to " << command << " command: (" << res_code << ") "
<< readBuffer << endl;
error(ERR_INTERNAL,i18n("Unexpected server response to %1 command:\n%2").
@@ -845,8 +845,8 @@ int NNTPProtocol::evalResponse ( char *data, ssize_t &len )
use the KIO::Error's instead, but let this here for
documentation of the NNTP response codes and may
by later use.
-QString& NNTPProtocol::errorStr(int resp_code) {
- QString ret;
+TQString& NNTPProtocol::errorStr(int resp_code) {
+ TQString ret;
switch (resp_code) {
case 100: ret = "help text follows"; break;
@@ -888,7 +888,7 @@ QString& NNTPProtocol::errorStr(int resp_code) {
case 501: ret = "command syntax error"; break;
case 502: ret = "access restriction or permission denied"; break;
case 503: ret = "program fault - command not performed"; break;
- default: ret = QString("unknown NNTP response code %1").arg(resp_code);
+ default: ret = TQString("unknown NNTP response code %1").arg(resp_code);
}
return ret;
diff --git a/kioslave/nntp/nntp.h b/kioslave/nntp/nntp.h
index 7efe597a8..30368eee1 100644
--- a/kioslave/nntp/nntp.h
+++ b/kioslave/nntp/nntp.h
@@ -11,7 +11,7 @@
#ifndef _NNTP_H
#define _NNTP_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kio/global.h>
#include <kio/tcpslavebase.h>
@@ -30,15 +30,15 @@ class NNTPProtocol:public KIO::TCPSlaveBase
/** Default Constructor
* @param isSSL is a true or false to indicate whether ssl is to be used
*/
- NNTPProtocol ( const QCString & pool, const QCString & app, bool isSSL );
+ NNTPProtocol ( const TQCString & pool, const TQCString & app, bool isSSL );
virtual ~NNTPProtocol();
virtual void get(const KURL& url );
virtual void put( const KURL& url, int permissions, bool overwrite, bool resume );
virtual void stat(const KURL& url );
virtual void listDir(const KURL& url );
- 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);
/**
* Special command: 1 = post article
@@ -47,7 +47,7 @@ class NNTPProtocol:public KIO::TCPSlaveBase
* as in RFC850. It's not checked for correctness here.
* @deprecated use put() for posting
*/
- virtual void special(const QByteArray& data);
+ virtual void special(const TQByteArray& data);
protected:
@@ -55,7 +55,7 @@ class NNTPProtocol:public KIO::TCPSlaveBase
* Send a command to the server. Returns the response code and
* the response line
*/
- int sendCommand( const QString &cmd );
+ int sendCommand( const TQString &cmd );
/**
* Attempt to properly shut down the NNTP connection by sending
@@ -76,7 +76,7 @@ class NNTPProtocol:public KIO::TCPSlaveBase
private:
- QString mHost, mUser, mPass;
+ TQString mHost, mUser, mPass;
bool postingAllowed, opened;
char readBuffer[MAX_PACKET_LEN];
ssize_t readBufferLen;
@@ -86,7 +86,7 @@ class NNTPProtocol:public KIO::TCPSlaveBase
* all available groups.
* @param since Date as specified in RFC 977 for the NEWGROUPS command
*/
- void fetchGroups( const QString &since );
+ void fetchGroups( const TQString &since );
/**
* Fetch message listing from the given newsgroup.
* This will use RFC2980 XOVER if available, plain RFC977 STAT/NEXT
@@ -95,7 +95,7 @@ class NNTPProtocol:public KIO::TCPSlaveBase
* @param first Serial number of the first message, 0 lists all messages.
* @return true on sucess, false otherwise.
*/
- bool fetchGroup ( QString &group, unsigned long first = 0 );
+ bool fetchGroup ( TQString &group, unsigned long first = 0 );
/**
* Fetch message listing from the current group using RFC977 STAT/NEXT
* commands.
@@ -115,10 +115,10 @@ class NNTPProtocol:public KIO::TCPSlaveBase
*/
bool fetchGroupXOVER( unsigned long first, bool &notSupported );
/// creates an UDSEntry with file information used in stat and listDir
- void fillUDSEntry ( KIO::UDSEntry & entry, const QString & name, long size,
+ void fillUDSEntry ( KIO::UDSEntry & entry, const TQString & name, long size,
bool postingAllowed, bool is_article );
/// error handling for unexpected responses
- void unexpected_response ( int res_code, const QString & command );
+ void unexpected_response ( int res_code, const TQString & command );
/**
* grabs the response line from the server. used after most send_cmd calls. max
* length for the returned string ( char *data ) is 4096 characters including
diff --git a/kioslave/pop3/pop3.cc b/kioslave/pop3/pop3.cc
index 06266d7a4..0ab27f63b 100644
--- a/kioslave/pop3/pop3.cc
+++ b/kioslave/pop3/pop3.cc
@@ -47,9 +47,9 @@ extern "C" {
}
#endif
-#include <qcstring.h>
-#include <qglobal.h>
-#include <qregexp.h>
+#include <tqcstring.h>
+#include <tqglobal.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kinstance.h>
@@ -124,7 +124,7 @@ int kdemain(int argc, char **argv)
return 0;
}
-POP3Protocol::POP3Protocol(const QCString & pool, const QCString & app,
+POP3Protocol::POP3Protocol(const TQCString & pool, const TQCString & app,
bool isSSL)
: TCPSlaveBase((isSSL ? 995 : 110), (isSSL ? "pop3s" : "pop3"), pool, app,
isSSL)
@@ -148,8 +148,8 @@ POP3Protocol::~POP3Protocol()
closeConnection();
}
-void POP3Protocol::setHost(const QString & _host, int _port,
- const QString & _user, const QString & _pass)
+void POP3Protocol::setHost(const TQString & _host, int _port,
+ const TQString & _user, const TQString & _pass)
{
m_sServer = _host;
m_iPort = _port;
@@ -242,8 +242,8 @@ POP3Protocol::Resp POP3Protocol::getResponse(char *r_buf, unsigned int r_len,
QMIN(r_len, (buf[4] == ' ' ? recv_len - 5 : recv_len - 4)));
}
- QString command = QString::fromLatin1(cmd);
- QString serverMsg = QString::fromLatin1(buf).mid(5).stripWhiteSpace();
+ TQString command = TQString::fromLatin1(cmd);
+ TQString serverMsg = TQString::fromLatin1(buf).mid(5).stripWhiteSpace();
if (command.left(4) == "PASS") {
command = i18n("PASS <your password>");
@@ -353,7 +353,7 @@ int POP3Protocol::loginAPOP( char *challenge, KIO::AuthInfo &ai )
{
char buf[512];
- QString apop_string = QString::fromLatin1("APOP ");
+ TQString apop_string = TQString::fromLatin1("APOP ");
if (m_sUser.isEmpty() || m_sPass.isEmpty()) {
// Prompt for usernames
if (!openPassDlg(ai)) {
@@ -455,13 +455,13 @@ bool POP3Protocol::saslInteract( void *in, AuthInfo &ai )
#define SASLERROR closeConnection(); \
error(ERR_COULD_NOT_AUTHENTICATE, i18n("An error occured during authentication: %1").arg \
-( QString::fromUtf8( sasl_errdetail( conn ) ))); \
+( TQString::fromUtf8( sasl_errdetail( conn ) ))); \
int POP3Protocol::loginSASL( KIO::AuthInfo &ai )
{
#ifdef HAVE_LIBSASL2
char buf[512];
- QString sasl_buffer = QString::fromLatin1("AUTH");
+ TQString sasl_buffer = TQString::fromLatin1("AUTH");
int result;
sasl_conn_t *conn = NULL;
@@ -485,7 +485,7 @@ int POP3Protocol::loginSASL( KIO::AuthInfo &ai )
// This is based on RFC 1734's wisdom
if ( hasMetaData("sasl") || command(sasl_buffer.local8Bit()) == Ok ) {
- QStringList sasl_list;
+ TQStringList sasl_list;
if (hasMetaData("sasl")) {
sasl_list.append(metaData("sasl").latin1());
} else
@@ -523,22 +523,22 @@ int POP3Protocol::loginSASL( KIO::AuthInfo &ai )
POP3_DEBUG << "Preferred authentication method is " << mechusing << "." << endl;
- QByteArray challenge, tmp;
+ TQByteArray challenge, tmp;
- QString firstCommand = "AUTH " + QString::fromLatin1( mechusing );
+ TQString firstCommand = "AUTH " + TQString::fromLatin1( mechusing );
challenge.setRawData( out, outlen );
KCodecs::base64Encode( challenge, tmp );
challenge.resetRawData( out, outlen );
if ( !tmp.isEmpty() ) {
firstCommand += " ";
- firstCommand += QString::fromLatin1( tmp.data(), tmp.size() );
+ firstCommand += TQString::fromLatin1( tmp.data(), tmp.size() );
}
challenge.resize( 2049 );
resp = command( firstCommand.latin1(), challenge.data(), 2049 );
while( resp == Cont ) {
challenge.resize(challenge.find(0));
-// POP3_DEBUG << "S: " << QCString(challenge.data(),challenge.size()+1) << endl;
+// POP3_DEBUG << "S: " << TQCString(challenge.data(),challenge.size()+1) << endl;
KCodecs::base64Decode( challenge, tmp );
do {
result = sasl_client_step(conn, tmp.isEmpty() ? 0 : tmp.data(),
@@ -563,7 +563,7 @@ int POP3Protocol::loginSASL( KIO::AuthInfo &ai )
challenge.setRawData( out, outlen );
KCodecs::base64Encode( challenge, tmp );
challenge.resetRawData( out, outlen );
-// POP3_DEBUG << "C: " << QCString(tmp.data(),tmp.size()+1) << endl;
+// POP3_DEBUG << "C: " << TQCString(tmp.data(),tmp.size()+1) << endl;
tmp.resize(tmp.size()+1);
tmp[tmp.size()-1] = '\0';
challenge.resize(2049);
@@ -624,7 +624,7 @@ bool POP3Protocol::loginPASS( KIO::AuthInfo &ai )
m_sOldUser = m_sUser;
m_sOldPass = m_sPass;
- QString one_string = QString::fromLatin1("USER ");
+ TQString one_string = TQString::fromLatin1("USER ");
one_string.append( m_sUser );
if ( command(one_string.local8Bit(), buf, sizeof(buf)) != Ok ) {
@@ -638,7 +638,7 @@ bool POP3Protocol::loginPASS( KIO::AuthInfo &ai )
return false;
}
- one_string = QString::fromLatin1("PASS ");
+ one_string = TQString::fromLatin1("PASS ");
one_string.append(m_sPass);
if ( command(one_string.local8Bit(), buf, sizeof(buf)) != Ok ) {
@@ -692,7 +692,7 @@ bool POP3Protocol::pop3_open()
return false; // we've got major problems, and possibly the
// wrong port
}
- QCString greeting(greeting_buf);
+ TQCString greeting(greeting_buf);
delete[]greeting_buf;
if (greeting.length() > 0) {
@@ -700,8 +700,8 @@ bool POP3Protocol::pop3_open()
}
// Does the server support APOP?
- QString apop_cmd;
- QRegExp re("<[A-Za-z0-9\\.\\-_]+@[A-Za-z0-9\\.\\-_]+>$", false);
+ TQString apop_cmd;
+ TQRegExp re("<[A-Za-z0-9\\.\\-_]+@[A-Za-z0-9\\.\\-_]+>$", false);
POP3_DEBUG << "greeting: " << greeting << endl;
int apop_pos = greeting.find(re);
@@ -783,7 +783,7 @@ bool POP3Protocol::pop3_open()
size_t POP3Protocol::realGetSize(unsigned int msg_num)
{
char *buf;
- QCString cmd;
+ TQCString cmd;
size_t ret = 0;
buf = new char[MAX_RESPONSE_LEN];
@@ -801,11 +801,11 @@ size_t POP3Protocol::realGetSize(unsigned int msg_num)
return ret;
}
-void POP3Protocol::special(const QByteArray & aData)
+void POP3Protocol::special(const TQByteArray & aData)
{
- QString result;
+ TQString result;
char buf[MAX_PACKET_LEN];
- QDataStream stream(aData, IO_ReadOnly);
+ TQDataStream stream(aData, IO_ReadOnly);
int tmp;
stream >> tmp;
@@ -813,14 +813,14 @@ void POP3Protocol::special(const QByteArray & aData)
return;
for (int i = 0; i < 2; i++) {
- QCString cmd = (i) ? "AUTH" : "CAPA";
+ TQCString cmd = (i) ? "AUTH" : "CAPA";
if ( command(cmd) != Ok )
continue;
while (true) {
myReadLine(buf, MAX_PACKET_LEN - 1);
if (qstrcmp(buf, ".\r\n") == 0)
break;
- result += " " + QString(buf).left(strlen(buf) - 2)
+ result += " " + TQString(buf).left(strlen(buf) - 2)
.replace(" ", "-");
}
}
@@ -853,8 +853,8 @@ void POP3Protocol::get(const KURL & url)
bool ok = true;
char buf[MAX_PACKET_LEN];
char destbuf[MAX_PACKET_LEN];
- QByteArray array;
- QString cmd, path = url.path();
+ TQByteArray array;
+ TQString cmd, path = url.path();
int maxCommands = (metaData("pipelining") == "on") ? MAX_COMMANDS : 1;
if (path.at(0) == '/')
@@ -919,12 +919,12 @@ void POP3Protocol::get(const KURL & url)
}
}
POP3_DEBUG << "Finishing up list" << endl;
- data(QByteArray());
+ data(TQByteArray());
finished();
} else if (cmd == "remove") {
- QStringList waitingCommands = QStringList::split(',', path);
+ TQStringList waitingCommands = TQStringList::split(',', path);
int activeCommands = 0;
- QStringList::Iterator it = waitingCommands.begin();
+ TQStringList::Iterator it = waitingCommands.begin();
while (it != waitingCommands.end() || activeCommands > 0) {
while (activeCommands < maxCommands && it != waitingCommands.end()) {
sendCommand(("DELE " + *it).latin1());
@@ -937,12 +937,12 @@ void POP3Protocol::get(const KURL & url)
finished();
m_cmd = CMD_NONE;
} else if (cmd == "download" || cmd == "headers") {
- QStringList waitingCommands = QStringList::split(',', path);
+ TQStringList waitingCommands = TQStringList::split(',', path);
bool noProgress = (metaData("progress") == "off"
|| waitingCommands.count() > 1);
int p_size = 0;
unsigned int msg_len = 0;
- QString list_cmd("LIST ");
+ TQString list_cmd("LIST ");
list_cmd += path;
memset(buf, 0, sizeof(buf));
if ( !noProgress ) {
@@ -972,7 +972,7 @@ void POP3Protocol::get(const KURL & url)
}
int activeCommands = 0;
- QStringList::Iterator it = waitingCommands.begin();
+ TQStringList::Iterator it = waitingCommands.begin();
while (it != waitingCommands.end() || activeCommands > 0) {
while (activeCommands < maxCommands && it != waitingCommands.end()) {
sendCommand(((cmd ==
@@ -1069,10 +1069,10 @@ void POP3Protocol::get(const KURL & url)
}
}
POP3_DEBUG << "Finishing up" << endl;
- data(QByteArray());
+ data(TQByteArray());
finished();
} else if ((cmd == "uid") || (cmd == "list")) {
- QString qbuf;
+ TQString qbuf;
(void) path.toInt(&ok);
if (!ok) {
@@ -1096,7 +1096,7 @@ void POP3Protocol::get(const KURL & url)
processedSize(len);
POP3_DEBUG << buf << endl;
POP3_DEBUG << "Finishing up uid" << endl;
- data(QByteArray());
+ data(TQByteArray());
finished();
} else {
closeConnection();
@@ -1117,7 +1117,7 @@ void POP3Protocol::listDir(const KURL &)
bool isINT;
int num_messages = 0;
char buf[MAX_RESPONSE_LEN];
- QCString q_buf;
+ TQCString q_buf;
// Try and open a connection
if (!pop3_open()) {
@@ -1150,7 +1150,7 @@ void POP3Protocol::listDir(const KURL &)
}
UDSEntry entry;
UDSAtom atom;
- QString fname;
+ TQString fname;
for (int i = 0; i < num_messages; i++) {
fname = "Message %1";
@@ -1176,7 +1176,7 @@ void POP3Protocol::listDir(const KURL &)
uds_url.setUser(m_sUser);
uds_url.setPass(m_sPass);
uds_url.setHost(m_sServer);
- uds_url.setPath(QString::fromLatin1("/download/%1").arg(i + 1));
+ uds_url.setPath(TQString::fromLatin1("/download/%1").arg(i + 1));
atom.m_str = uds_url.url();
atom.m_long = 0;
entry.append(atom);
@@ -1205,7 +1205,7 @@ void POP3Protocol::listDir(const KURL &)
void POP3Protocol::stat(const KURL & url)
{
- QString _path = url.path();
+ TQString _path = url.path();
if (_path.at(0) == '/')
_path.remove(0, 1);
@@ -1234,7 +1234,7 @@ void POP3Protocol::stat(const KURL & url)
void POP3Protocol::del(const KURL & url, bool /*isfile */ )
{
- QString invalidURI = QString::null;
+ TQString invalidURI = TQString::null;
bool isInt;
if (!pop3_open()) {
@@ -1243,7 +1243,7 @@ void POP3Protocol::del(const KURL & url, bool /*isfile */ )
return;
}
- QString _path = url.path();
+ TQString _path = url.path();
if (_path.at(0) == '/') {
_path.remove(0, 1);
}
diff --git a/kioslave/pop3/pop3.h b/kioslave/pop3/pop3.h
index 94114f675..9c6ca9185 100644
--- a/kioslave/pop3/pop3.h
+++ b/kioslave/pop3/pop3.h
@@ -33,7 +33,7 @@
#include <stdio.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kio/tcpslavebase.h>
@@ -41,13 +41,13 @@
class POP3Protocol:public KIO::TCPSlaveBase {
public:
- POP3Protocol(const QCString & pool, const QCString & app, bool SSL);
+ POP3Protocol(const TQCString & pool, const TQCString & app, bool SSL);
virtual ~ POP3Protocol();
- 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 special(const QByteArray & aData);
+ virtual void special(const TQByteArray & aData);
virtual void get(const KURL & url);
virtual void stat(const KURL & url);
virtual void del(const KURL & url, bool isfile);
@@ -122,10 +122,10 @@ protected:
int m_cmd;
unsigned short int m_iOldPort;
struct timeval m_tTimeout;
- QString m_sOldServer, m_sOldPass, m_sOldUser;
- QString m_sServer, m_sPass, m_sUser;
+ TQString m_sOldServer, m_sOldPass, m_sOldUser;
+ TQString m_sServer, m_sPass, m_sUser;
bool m_try_apop, m_try_sasl, opened, supports_apop;
- QString m_sError;
+ TQString m_sError;
char readBuffer[MAX_PACKET_LEN];
ssize_t readBufferLen;
};
diff --git a/kioslave/remote/kdedmodule/remotedirnotify.cpp b/kioslave/remote/kdedmodule/remotedirnotify.cpp
index 88933e29a..e6e2359a6 100644
--- a/kioslave/remote/kdedmodule/remotedirnotify.cpp
+++ b/kioslave/remote/kdedmodule/remotedirnotify.cpp
@@ -26,14 +26,14 @@
#include <kdirnotify_stub.h>
-#include <qdir.h>
+#include <tqdir.h>
RemoteDirNotify::RemoteDirNotify()
{
KGlobal::dirs()->addResourceType("remote_entries",
KStandardDirs::kde_default("data") + "remoteview");
- QString path = KGlobal::dirs()->saveLocation("remote_entries");
+ TQString path = KGlobal::dirs()->saveLocation("remote_entries");
m_baseURL.setPath(path);
}
@@ -42,7 +42,7 @@ KURL RemoteDirNotify::toRemoteURL(const KURL &url)
kdDebug(1220) << "RemoteDirNotify::toRemoteURL(" << url << ")" << endl;
if ( m_baseURL.isParentOf(url) )
{
- QString path = KURL::relativePath(m_baseURL.path(),
+ TQString path = KURL::relativePath(m_baseURL.path(),
url.path());
KURL result("remote:/"+path);
result.cleanPath();
diff --git a/kioslave/remote/kdedmodule/remotedirnotifymodule.cpp b/kioslave/remote/kdedmodule/remotedirnotifymodule.cpp
index 5877ac299..894400ce2 100644
--- a/kioslave/remote/kdedmodule/remotedirnotifymodule.cpp
+++ b/kioslave/remote/kdedmodule/remotedirnotifymodule.cpp
@@ -22,13 +22,13 @@
#include <klocale.h>
#include <kglobal.h>
-RemoteDirNotifyModule::RemoteDirNotifyModule(const QCString &obj)
+RemoteDirNotifyModule::RemoteDirNotifyModule(const TQCString &obj)
: KDEDModule(obj)
{
}
extern "C" {
- KDE_EXPORT KDEDModule *create_remotedirnotify(const QCString &obj)
+ KDE_EXPORT KDEDModule *create_remotedirnotify(const TQCString &obj)
{
KGlobal::locale()->insertCatalogue("kio_remote");
return new RemoteDirNotifyModule(obj);
diff --git a/kioslave/remote/kdedmodule/remotedirnotifymodule.h b/kioslave/remote/kdedmodule/remotedirnotifymodule.h
index 4ce8c2c7d..e6cf0d720 100644
--- a/kioslave/remote/kdedmodule/remotedirnotifymodule.h
+++ b/kioslave/remote/kdedmodule/remotedirnotifymodule.h
@@ -28,7 +28,7 @@ class RemoteDirNotifyModule : public KDEDModule
K_DCOP
public:
- RemoteDirNotifyModule(const QCString &obj);
+ RemoteDirNotifyModule(const TQCString &obj);
private:
RemoteDirNotify notifier;
};
diff --git a/kioslave/remote/kio_remote.cpp b/kioslave/remote/kio_remote.cpp
index 1200f943c..646a99d30 100644
--- a/kioslave/remote/kio_remote.cpp
+++ b/kioslave/remote/kio_remote.cpp
@@ -56,8 +56,8 @@ extern "C" {
}
-RemoteProtocol::RemoteProtocol(const QCString &protocol,
- const QCString &pool, const QCString &app)
+RemoteProtocol::RemoteProtocol(const TQCString &protocol,
+ const TQCString &pool, const TQCString &app)
: SlaveBase(protocol, pool, app)
{
}
@@ -77,7 +77,7 @@ void RemoteProtocol::listDir(const KURL &url)
}
int second_slash_idx = url.path().find( '/', 1 );
- QString root_dirname = url.path().mid( 1, second_slash_idx-1 );
+ TQString root_dirname = url.path().mid( 1, second_slash_idx-1 );
KURL target = m_impl.findBaseURL( root_dirname );
kdDebug(1220) << "possible redirection target : " << target << endl;
@@ -125,7 +125,7 @@ void RemoteProtocol::stat(const KURL &url)
{
kdDebug(1220) << "RemoteProtocol::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
@@ -152,7 +152,7 @@ void RemoteProtocol::stat(const KURL &url)
}
int second_slash_idx = url.path().find( '/', 1 );
- QString root_dirname = url.path().mid( 1, second_slash_idx-1 );
+ TQString root_dirname = url.path().mid( 1, second_slash_idx-1 );
if ( second_slash_idx==-1 || ( (int)url.path().length() )==second_slash_idx+1 )
{
@@ -198,7 +198,7 @@ void RemoteProtocol::get(const KURL &url)
{
kdDebug(1220) << "RemoteProtocol::get: " << url << endl;
- QString file = m_impl.findDesktopFile( url.fileName() );
+ TQString file = m_impl.findDesktopFile( url.fileName() );
kdDebug(1220) << "desktop file : " << file << endl;
if (!file.isEmpty())
diff --git a/kioslave/remote/kio_remote.h b/kioslave/remote/kio_remote.h
index 7d3b0366e..f2c06296a 100644
--- a/kioslave/remote/kio_remote.h
+++ b/kioslave/remote/kio_remote.h
@@ -26,8 +26,8 @@
class RemoteProtocol : public KIO::SlaveBase
{
public:
- RemoteProtocol(const QCString &protocol, const QCString &pool,
- const QCString &app);
+ RemoteProtocol(const TQCString &protocol, const TQCString &pool,
+ const TQCString &app);
virtual ~RemoteProtocol();
virtual void listDir(const KURL &url);
diff --git a/kioslave/remote/remoteimpl.cpp b/kioslave/remote/remoteimpl.cpp
index 139cbfd2a..47e41b821 100644
--- a/kioslave/remote/remoteimpl.cpp
+++ b/kioslave/remote/remoteimpl.cpp
@@ -26,8 +26,8 @@
#include <kservice.h>
#include <klocale.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <sys/stat.h>
@@ -39,9 +39,9 @@ RemoteImpl::RemoteImpl()
KGlobal::dirs()->addResourceType("remote_entries",
KStandardDirs::kde_default("data") + "remoteview");
- QString path = KGlobal::dirs()->saveLocation("remote_entries");
+ TQString path = KGlobal::dirs()->saveLocation("remote_entries");
- QDir dir = path;
+ TQDir dir = path;
if (!dir.exists())
{
dir.cdUp();
@@ -49,28 +49,28 @@ RemoteImpl::RemoteImpl()
}
}
-void RemoteImpl::listRoot(QValueList<KIO::UDSEntry> &list) const
+void RemoteImpl::listRoot(TQValueList<KIO::UDSEntry> &list) const
{
kdDebug(1220) << "RemoteImpl::listRoot" << endl;
- QStringList names_found;
- QStringList dirList = KGlobal::dirs()->resourceDirs("remote_entries");
+ TQStringList names_found;
+ TQStringList dirList = KGlobal::dirs()->resourceDirs("remote_entries");
- QStringList::ConstIterator dirpath = dirList.begin();
- QStringList::ConstIterator end = dirList.end();
+ TQStringList::ConstIterator dirpath = dirList.begin();
+ TQStringList::ConstIterator end = dirList.end();
for(; dirpath!=end; ++dirpath)
{
- QDir dir = *dirpath;
+ TQDir dir = *dirpath;
if (!dir.exists()) continue;
- QStringList filenames
- = dir.entryList( QDir::Files | QDir::Readable );
+ TQStringList filenames
+ = dir.entryList( TQDir::Files | TQDir::Readable );
KIO::UDSEntry entry;
- QStringList::ConstIterator name = filenames.begin();
- QStringList::ConstIterator endf = filenames.end();
+ TQStringList::ConstIterator name = filenames.begin();
+ TQStringList::ConstIterator endf = filenames.end();
for(; name!=endf; ++name)
{
@@ -85,27 +85,27 @@ void RemoteImpl::listRoot(QValueList<KIO::UDSEntry> &list) const
}
}
-bool RemoteImpl::findDirectory(const QString &filename, QString &directory) const
+bool RemoteImpl::findDirectory(const TQString &filename, TQString &directory) const
{
kdDebug(1220) << "RemoteImpl::findDirectory" << endl;
- QStringList dirList = KGlobal::dirs()->resourceDirs("remote_entries");
+ TQStringList dirList = KGlobal::dirs()->resourceDirs("remote_entries");
- QStringList::ConstIterator dirpath = dirList.begin();
- QStringList::ConstIterator end = dirList.end();
+ TQStringList::ConstIterator dirpath = dirList.begin();
+ TQStringList::ConstIterator end = dirList.end();
for(; dirpath!=end; ++dirpath)
{
- QDir dir = *dirpath;
+ TQDir dir = *dirpath;
if (!dir.exists()) continue;
- QStringList filenames
- = dir.entryList( QDir::Files | QDir::Readable );
+ TQStringList filenames
+ = dir.entryList( TQDir::Files | TQDir::Readable );
KIO::UDSEntry entry;
- QStringList::ConstIterator name = filenames.begin();
- QStringList::ConstIterator endf = filenames.end();
+ TQStringList::ConstIterator name = filenames.begin();
+ TQStringList::ConstIterator endf = filenames.end();
for(; name!=endf; ++name)
{
@@ -120,24 +120,24 @@ bool RemoteImpl::findDirectory(const QString &filename, QString &directory) cons
return false;
}
-QString RemoteImpl::findDesktopFile(const QString &filename) const
+TQString RemoteImpl::findDesktopFile(const TQString &filename) const
{
kdDebug(1220) << "RemoteImpl::findDesktopFile" << endl;
- QString directory;
+ TQString directory;
if (findDirectory(filename+".desktop", directory))
{
return directory+filename+".desktop";
}
- return QString::null;
+ return TQString::null;
}
-KURL RemoteImpl::findBaseURL(const QString &filename) const
+KURL RemoteImpl::findBaseURL(const TQString &filename) const
{
kdDebug(1220) << "RemoteImpl::findBaseURL" << endl;
- QString file = findDesktopFile(filename);
+ TQString file = findDesktopFile(filename);
if (!file.isEmpty())
{
KDesktopFile desktop(file, true);
@@ -149,7 +149,7 @@ KURL RemoteImpl::findBaseURL(const QString &filename) const
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;
@@ -213,8 +213,8 @@ bool RemoteImpl::isWizardURL(const KURL &url) const
void RemoteImpl::createEntry(KIO::UDSEntry &entry,
- const QString &directory,
- const QString &file) const
+ const TQString &directory,
+ const TQString &file) const
{
kdDebug(1220) << "RemoteImpl::createEntry" << endl;
@@ -224,7 +224,7 @@ void RemoteImpl::createEntry(KIO::UDSEntry &entry,
entry.clear();
- QString new_filename = file;
+ TQString new_filename = file;
new_filename.truncate( file.length()-8);
addAtom(entry, KIO::UDS_NAME, 0, desktop.readName());
@@ -233,17 +233,17 @@ void RemoteImpl::createEntry(KIO::UDSEntry &entry,
addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory");
- QString icon = desktop.readIcon();
+ TQString icon = desktop.readIcon();
addAtom(entry, KIO::UDS_ICON_NAME, 0, icon);
addAtom(entry, KIO::UDS_LINK_DEST, 0, desktop.readURL());
}
-bool RemoteImpl::statNetworkFolder(KIO::UDSEntry &entry, const QString &filename) const
+bool RemoteImpl::statNetworkFolder(KIO::UDSEntry &entry, const TQString &filename) const
{
kdDebug(1220) << "RemoteImpl::statNetworkFolder: " << filename << endl;
- QString directory;
+ TQString directory;
if (findDirectory(filename+".desktop", directory))
{
createEntry(entry, directory, filename+".desktop");
@@ -253,36 +253,36 @@ bool RemoteImpl::statNetworkFolder(KIO::UDSEntry &entry, const QString &filename
return false;
}
-bool RemoteImpl::deleteNetworkFolder(const QString &filename) const
+bool RemoteImpl::deleteNetworkFolder(const TQString &filename) const
{
kdDebug(1220) << "RemoteImpl::deleteNetworkFolder: " << filename << endl;
- QString directory;
+ TQString directory;
if (findDirectory(filename+".desktop", directory))
{
kdDebug(1220) << "Removing " << directory << filename << ".desktop" << endl;
- return QFile::remove(directory+filename+".desktop");
+ return TQFile::remove(directory+filename+".desktop");
}
return false;
}
-bool RemoteImpl::renameFolders(const QString &src, const QString &dest,
+bool RemoteImpl::renameFolders(const TQString &src, const TQString &dest,
bool overwrite) const
{
kdDebug(1220) << "RemoteImpl::renameFolders: "
<< src << ", " << dest << endl;
- QString directory;
+ TQString directory;
if (findDirectory(src+".desktop", directory))
{
- if (!overwrite && QFile::exists(directory+dest+".desktop"))
+ if (!overwrite && TQFile::exists(directory+dest+".desktop"))
{
return false;
}
kdDebug(1220) << "Renaming " << directory << src << ".desktop"<< endl;
- QDir dir(directory);
+ TQDir dir(directory);
bool res = dir.rename(src+".desktop", dest+".desktop");
if (res)
{
diff --git a/kioslave/remote/remoteimpl.h b/kioslave/remote/remoteimpl.h
index ba7390bf4..b9bb6ac2d 100644
--- a/kioslave/remote/remoteimpl.h
+++ b/kioslave/remote/remoteimpl.h
@@ -24,7 +24,7 @@
#include <kio/job.h>
#include <kurl.h>
-#include <qstring.h>
+#include <tqstring.h>
class RemoteImpl
{
@@ -34,21 +34,21 @@ public:
void createTopLevelEntry(KIO::UDSEntry &entry) const;
bool createWizardEntry(KIO::UDSEntry &entry) const;
bool isWizardURL(const KURL &url) const;
- bool statNetworkFolder(KIO::UDSEntry &entry, const QString &filename) const;
+ bool statNetworkFolder(KIO::UDSEntry &entry, const TQString &filename) const;
- void listRoot(QValueList<KIO::UDSEntry> &list) const;
+ void listRoot(TQValueList<KIO::UDSEntry> &list) const;
- KURL findBaseURL(const QString &filename) const;
- QString findDesktopFile(const QString &filename) const;
+ KURL findBaseURL(const TQString &filename) const;
+ TQString findDesktopFile(const TQString &filename) const;
- bool deleteNetworkFolder(const QString &filename) const;
- bool renameFolders(const QString &src, const QString &dest,
+ bool deleteNetworkFolder(const TQString &filename) const;
+ bool renameFolders(const TQString &src, const TQString &dest,
bool overwrite) const;
private:
- bool findDirectory(const QString &filename, QString &directory) const;
- void createEntry(KIO::UDSEntry& entry, const QString &directory,
- const QString &file) const;
+ bool findDirectory(const TQString &filename, TQString &directory) const;
+ void createEntry(KIO::UDSEntry& entry, const TQString &directory,
+ const TQString &file) const;
};
#endif
diff --git a/kioslave/remote/testremote.cpp b/kioslave/remote/testremote.cpp
index a3e979023..3c76b6f22 100644
--- a/kioslave/remote/testremote.cpp
+++ b/kioslave/remote/testremote.cpp
@@ -28,12 +28,12 @@
#include <stdlib.h>
-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/settings/kio_settings.cc b/kioslave/settings/kio_settings.cc
index 4d5bbe873..28aaba846 100644
--- a/kioslave/settings/kio_settings.cc
+++ b/kioslave/settings/kio_settings.cc
@@ -20,11 +20,11 @@
#include <kio/slavebase.h>
#include <kinstance.h>
#include <kdebug.h>
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <klocale.h>
#include <sys/stat.h>
#include <dcopclient.h>
-#include <qdatastream.h>
+#include <tqdatastream.h>
#include <time.h>
#include <kprocess.h>
#include <kservice.h>
@@ -35,13 +35,13 @@ class SettingsProtocol : public KIO::SlaveBase
{
public:
enum RunMode { SettingsMode, ProgramsMode, ApplicationsMode };
- SettingsProtocol(const QCString &protocol, const QCString &pool, const QCString &app);
+ SettingsProtocol(const TQCString &protocol, const TQCString &pool, const TQCString &app);
virtual ~SettingsProtocol();
virtual void get( const KURL& url );
virtual void stat(const KURL& url);
virtual void listDir(const KURL& url);
void listRoot();
- KServiceGroup::Ptr findGroup(const QString &relPath);
+ KServiceGroup::Ptr findGroup(const TQString &relPath);
private:
DCOPClient *m_dcopClient;
@@ -60,7 +60,7 @@ extern "C" {
}
-static void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const QString& s = QString::null)
+static void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const TQString& s = TQString::null)
{
KIO::UDSAtom atom;
atom.m_uds = ID;
@@ -69,7 +69,7 @@ static void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const QString
entry.append(atom);
}
-static void createFileEntry(KIO::UDSEntry& entry, const QString& name, const QString& url, const QString& mime, const QString& iconName, const QString& localPath)
+static void createFileEntry(KIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime, const TQString& iconName, const TQString& localPath)
{
entry.clear();
addAtom(entry, KIO::UDS_NAME, 0, KIO::encodeFileName(name));
@@ -84,7 +84,7 @@ static void createFileEntry(KIO::UDSEntry& entry, const QString& name, const QSt
addAtom(entry, KIO::UDS_ICON_NAME, 0, iconName);
}
-static void createDirEntry(KIO::UDSEntry& entry, const QString& name, const QString& url, const QString& mime,const QString& iconName)
+static void createDirEntry(KIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime,const TQString& iconName)
{
entry.clear();
addAtom(entry, KIO::UDS_NAME, 0, name);
@@ -96,7 +96,7 @@ static void createDirEntry(KIO::UDSEntry& entry, const QString& name, const QStr
addAtom(entry, KIO::UDS_ICON_NAME, 0, iconName);
}
-SettingsProtocol::SettingsProtocol( const QCString &protocol, const QCString &pool, const QCString &app): SlaveBase( protocol, pool, app )
+SettingsProtocol::SettingsProtocol( const TQCString &protocol, const TQCString &pool, const TQCString &app): SlaveBase( protocol, pool, app )
{
// Adjusts which part of the K Menu to virtualize.
if ( protocol == "programs" )
@@ -119,11 +119,11 @@ SettingsProtocol::~SettingsProtocol()
delete m_dcopClient;
}
-KServiceGroup::Ptr SettingsProtocol::findGroup(const QString &relPath)
+KServiceGroup::Ptr SettingsProtocol::findGroup(const TQString &relPath)
{
- QString nextPart;
- QString alreadyFound("Settings/");
- QStringList rest = QStringList::split('/', relPath);
+ TQString nextPart;
+ TQString alreadyFound("Settings/");
+ TQStringList rest = TQStringList::split('/', relPath);
kdDebug() << "Trying harder to find group " << relPath << endl;
for (unsigned int i=0; i<rest.count(); i++)
@@ -182,7 +182,7 @@ void SettingsProtocol::stat(const KURL& url)
{
KIO::UDSEntry entry;
- QString servicePath( url.path(1) );
+ TQString servicePath( url.path(1) );
servicePath.remove(0, 1); // remove starting '/'
if ( m_runMode == SettingsMode)
@@ -216,7 +216,7 @@ void SettingsProtocol::stat(const KURL& url)
void SettingsProtocol::listDir(const KURL& url)
{
- QString groupPath = url.path(1);
+ TQString groupPath = url.path(1);
groupPath.remove(0, 1); // remove starting '/'
if ( m_runMode == SettingsMode)
@@ -243,7 +243,7 @@ void SettingsProtocol::listDir(const KURL& url)
if (e->isType(KST_KServiceGroup)) {
KServiceGroup::Ptr g(static_cast<KServiceGroup *>(e));
- QString groupCaption = g->caption();
+ TQString groupCaption = g->caption();
// Avoid adding empty groups.
KServiceGroup::Ptr subMenuRoot = KServiceGroup::group(g->relPath());
@@ -254,7 +254,7 @@ void SettingsProtocol::listDir(const KURL& url)
if ((g->name().at(0) == '.'))
continue;
- QString relPath = g->relPath();
+ TQString relPath = g->relPath();
// Do not display the "Settings" menu group in Programs Mode.
if( (m_runMode == ProgramsMode) && relPath.startsWith( "Settings" ) )
diff --git a/kioslave/sftp/kio_sftp.cpp b/kioslave/sftp/kio_sftp.cpp
index e6aaaf532..456d47084 100644
--- a/kioslave/sftp/kio_sftp.cpp
+++ b/kioslave/sftp/kio_sftp.cpp
@@ -29,12 +29,12 @@ So we can't connect.
#include <fcntl.h>
-#include <qcstring.h>
-#include <qstring.h>
-#include <qobject.h>
-#include <qstrlist.h>
-#include <qfile.h>
-#include <qbuffer.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqstrlist.h>
+#include <tqfile.h>
+#include <tqbuffer.h>
#include <stdlib.h>
#include <unistd.h>
@@ -131,7 +131,7 @@ static int writeToFile (int fd, const char *buf, size_t len)
return 0;
}
-sftpProtocol::sftpProtocol(const QCString &pool_socket, const QCString &app_socket)
+sftpProtocol::sftpProtocol(const TQCString &pool_socket, const TQCString &app_socket)
: SlaveBase("kio_sftp", pool_socket, app_socket),
mConnected(false), mPort(-1), mMsgId(0) {
kdDebug(KIO_SFTP_DB) << "sftpProtocol(): pid = " << getpid() << endl;
@@ -203,7 +203,7 @@ void sftpProtocol::copy(const KURL &src, const KURL &dest, int permissions, bool
else if ( destLocal && !srcLocal ) // Copy sftp -> file
sftpCopyGet(dest, src, permissions, overwrite);
else
- error(ERR_UNSUPPORTED_ACTION, QString::null);
+ error(ERR_UNSUPPORTED_ACTION, TQString::null);
}
void sftpProtocol::sftpCopyGet(const KURL& dest, const KURL& src, int mode, bool overwrite)
@@ -216,7 +216,7 @@ void sftpProtocol::sftpCopyGet(const KURL& dest, const KURL& src, int mode, bool
return;
KDE_struct_stat buff_orig;
- QCString dest_orig ( QFile::encodeName(dest.path()) );
+ TQCString dest_orig ( TQFile::encodeName(dest.path()) );
bool origExists = (KDE_lstat( dest_orig.data(), &buff_orig ) != -1);
if (origExists)
@@ -235,7 +235,7 @@ void sftpProtocol::sftpCopyGet(const KURL& dest, const KURL& src, int mode, bool
}
KIO::filesize_t offset = 0;
- QCString dest_part ( dest_orig + ".part" );
+ TQCString dest_part ( dest_orig + ".part" );
int fd = -1;
bool partExists = false;
@@ -319,7 +319,7 @@ void sftpProtocol::sftpCopyGet(const KURL& dest, const KURL& src, int mode, bool
}
}
- data(QByteArray());
+ data(TQByteArray());
kdDebug(KIO_SFTP_DB) << "sftpCopyGet(): emit finished()" << endl;
finished();
}
@@ -351,7 +351,7 @@ sftpProtocol::Status sftpProtocol::sftpGet( const KURL& src, KIO::filesize_t off
Q_UINT32 pflags = SSH2_FXF_READ;
attr.clear();
- QByteArray handle;
+ TQByteArray handle;
if( (code = sftpOpen(src, pflags, attr, handle)) != SSH2_FX_OK ) {
res.text = src.prettyURL();
res.code = ERR_CANNOT_OPEN_FOR_READING;
@@ -360,8 +360,8 @@ sftpProtocol::Status sftpProtocol::sftpGet( const KURL& src, KIO::filesize_t off
// needed for determining mimetype
// note: have to emit mimetype before emitting totalsize.
- QByteArray buff;
- QByteArray mimeBuffer;
+ TQByteArray buff;
+ TQByteArray mimeBuffer;
unsigned int oldSize;
bool foundMimetype = false;
@@ -463,13 +463,13 @@ void sftpProtocol::get(const KURL& url) {
return;
}
- data(QByteArray());
+ data(TQByteArray());
kdDebug(KIO_SFTP_DB) << "get(): emit finished()" << endl;
finished();
}
-void sftpProtocol::setHost (const QString& h, int port, const QString& user, const QString& pass)
+void sftpProtocol::setHost (const TQString& h, int port, const TQString& user, const TQString& pass)
{
kdDebug(KIO_SFTP_DB) << "setHost(): " << user << "@" << h << ":" << port << endl;
@@ -524,7 +524,7 @@ void sftpProtocol::openConnection() {
info.url.setPort(mPort);
info.url.setUser(mUsername);
info.caption = i18n("SFTP Login");
- info.comment = "sftp://" + mHost + ":" + QString::number(mPort);
+ info.comment = "sftp://" + mHost + ":" + TQString::number(mPort);
info.commentLabel = i18n("site:");
info.username = mUsername;
info.keepPassword = true;
@@ -608,8 +608,8 @@ void sftpProtocol::openConnection() {
//
int err; // error code from KSshProcess
- QString msg; // msg for dialog box
- QString caption; // dialog box caption
+ TQString msg; // msg for dialog box
+ TQString caption; // dialog box caption
bool firstTime = true;
bool dlgResult;
@@ -647,7 +647,7 @@ void sftpProtocol::openConnection() {
}
else {
// user canceled or dialog failed to open
- error(ERR_USER_CANCELED, QString::null);
+ error(ERR_USER_CANCELED, TQString::null);
kdDebug(KIO_SFTP_DB) << "openConnection(): user canceled, dlgResult = " << dlgResult << endl;
closeConnection();
return;
@@ -704,7 +704,7 @@ void sftpProtocol::openConnection() {
msg = ssh.errorMsg();
if( KMessageBox::Yes != messageBox(WarningYesNo, msg, caption) ) {
closeConnection();
- error(ERR_USER_CANCELED, QString::null);
+ error(ERR_USER_CANCELED, TQString::null);
return;
}
ssh.acceptHostKey(true);
@@ -715,7 +715,7 @@ void sftpProtocol::openConnection() {
msg = ssh.errorMsg();
if( KMessageBox::Yes != messageBox(WarningYesNo, msg, caption) ) {
closeConnection();
- error(ERR_USER_CANCELED, QString::null);
+ error(ERR_USER_CANCELED, TQString::null);
return;
}
ssh.acceptHostKey(true);
@@ -764,14 +764,14 @@ void sftpProtocol::openConnection() {
// catch all in case we did something wrong above
if( !mConnected ) {
- error(ERR_INTERNAL, QString::null);
+ error(ERR_INTERNAL, TQString::null);
return;
}
// Now send init packet.
kdDebug(KIO_SFTP_DB) << "openConnection(): Sending SSH2_FXP_INIT packet." << endl;
- QByteArray p;
- QDataStream packet(p, IO_WriteOnly);
+ TQByteArray p;
+ TQDataStream packet(p, IO_WriteOnly);
packet << (Q_UINT32)5; // packet length
packet << (Q_UINT8) SSH2_FXP_INIT; // packet type
packet << (Q_UINT32)SSH2_FILEXFER_VERSION; // client version
@@ -779,7 +779,7 @@ void sftpProtocol::openConnection() {
putPacket(p);
getPacket(p);
- QDataStream s(p, IO_ReadOnly);
+ TQDataStream s(p, IO_ReadOnly);
Q_UINT32 version;
Q_UINT8 type;
s >> type;
@@ -837,7 +837,7 @@ void sftpProtocol::closeConnection() {
void sftpProtocol::sftpCopyPut(const KURL& src, const KURL& dest, int permissions, bool overwrite) {
KDE_struct_stat buff;
- QCString file (QFile::encodeName(src.path()));
+ TQCString file (TQFile::encodeName(src.path()));
if (KDE_lstat(file.data(), &buff) == -1) {
error (ERR_DOES_NOT_EXIST, src.prettyURL());
@@ -985,7 +985,7 @@ void sftpProtocol::sftpPut( const KURL& dest, int permissions, bool resume, bool
pflags = SSH2_FXF_WRITE | SSH2_FXF_CREAT | SSH2_FXF_APPEND;
sftpFileAttr attr(remoteEncoding());
- QByteArray handle;
+ TQByteArray handle;
// Set the permissions of the file we write to if it didn't already exist
// and the permission info is supplied, i.e it is not -1
@@ -1013,7 +1013,7 @@ void sftpProtocol::sftpPut( const KURL& dest, int permissions, bool resume, bool
}
long nbytes;
- QByteArray buff;
+ TQByteArray buff;
do {
@@ -1108,7 +1108,7 @@ void sftpProtocol::stat ( const KURL& url ){
UDSAtom atom;
atom.m_uds = KIO::UDS_NAME;
- atom.m_str = QString::null;
+ atom.m_str = TQString::null;
entry.append( atom );
atom.m_uds = KIO::UDS_FILE_TYPE;
@@ -1158,7 +1158,7 @@ void sftpProtocol::mimetype ( const KURL& url ){
return;
Q_UINT32 pflags = SSH2_FXF_READ;
- QByteArray handle, mydata;
+ TQByteArray handle, mydata;
sftpFileAttr attr(remoteEncoding());
int code;
if( (code = sftpOpen(url, pflags, attr, handle)) != SSH2_FX_OK ) {
@@ -1180,7 +1180,7 @@ void sftpProtocol::mimetype ( const KURL& url ){
}
- data(QByteArray());
+ data(TQByteArray());
processedSize(offset);
sftpClose(handle);
finished();
@@ -1206,7 +1206,7 @@ void sftpProtocol::listDir(const KURL& url) {
}
int code;
- QByteArray handle;
+ TQByteArray handle;
if( (code = sftpOpenDirectory(url, handle)) != SSH2_FX_OK ) {
kdError(KIO_SFTP_DB) << "listDir(): open directory failed" << endl;
@@ -1248,7 +1248,7 @@ void sftpProtocol::mkdir(const KURL&url, int permissions){
if( !mConnected )
return;
- QCString path = remoteEncoding()->encode(url.path());
+ TQCString path = remoteEncoding()->encode(url.path());
uint len = path.length();
sftpFileAttr attr(remoteEncoding());
@@ -1259,8 +1259,8 @@ void sftpProtocol::mkdir(const KURL&url, int permissions){
Q_UINT32 id, expectedId;
id = expectedId = mMsgId++;
- QByteArray p;
- QDataStream s(p, IO_WriteOnly);
+ TQByteArray p;
+ TQDataStream s(p, IO_WriteOnly);
s << Q_UINT32(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len + attr.size());
s << (Q_UINT8)SSH2_FXP_MKDIR;
s << id;
@@ -1273,7 +1273,7 @@ void sftpProtocol::mkdir(const KURL&url, int permissions){
getPacket(p);
Q_UINT8 type;
- QDataStream r(p, IO_ReadOnly);
+ TQDataStream r(p, IO_ReadOnly);
r >> type >> id;
if( id != expectedId ) {
@@ -1359,7 +1359,7 @@ void sftpProtocol::rename(const KURL& src, const KURL& dest, bool overwrite){
kdDebug(KIO_SFTP_DB) << "rename(): END" << endl;
}
-void sftpProtocol::symlink(const QString& target, const KURL& dest, bool overwrite){
+void sftpProtocol::symlink(const TQString& target, const KURL& dest, bool overwrite){
kdDebug(KIO_SFTP_DB) << "symlink()" << endl;
if (!isSupportedOperation(SSH2_FXP_SYMLINK)) {
@@ -1410,7 +1410,7 @@ void sftpProtocol::symlink(const QString& target, const KURL& dest, bool overwri
}
void sftpProtocol::chmod(const KURL& url, int permissions){
- QString perms;
+ TQString perms;
perms.setNum(permissions, 8);
kdDebug(KIO_SFTP_DB) << "chmod(" << url << ", " << perms << ")" << endl;
@@ -1427,7 +1427,7 @@ void sftpProtocol::chmod(const KURL& url, int permissions){
if( (code = sftpSetStat(url, attr)) != SSH2_FX_OK ) {
kdError(KIO_SFTP_DB) << "chmod(): sftpSetStat failed with error " << code << endl;
if( code == SSH2_FX_FAILURE )
- error(ERR_CANNOT_CHMOD, QString::null);
+ error(ERR_CANNOT_CHMOD, TQString::null);
else
processStatus(code, url.prettyURL());
}
@@ -1454,11 +1454,11 @@ void sftpProtocol::slave_status() {
kdDebug(KIO_SFTP_DB) << "slave_status(): connected to "
<< mHost << "? " << mConnected << endl;
- slaveStatus ((mConnected ? mHost : QString::null), mConnected);
+ slaveStatus ((mConnected ? mHost : TQString::null), mConnected);
}
-bool sftpProtocol::getPacket(QByteArray& msg) {
- QByteArray buf(4096);
+bool sftpProtocol::getPacket(TQByteArray& msg) {
+ TQByteArray buf(4096);
// Get the message length...
ssize_t len = atomicio(ssh.stdioFd(), buf.data(), 4, true /*read*/);
@@ -1473,21 +1473,21 @@ bool sftpProtocol::getPacket(QByteArray& msg) {
}
uint msgLen;
- QDataStream s(buf, IO_ReadOnly);
+ TQDataStream s(buf, IO_ReadOnly);
s >> msgLen;
//kdDebug(KIO_SFTP_DB) << "getPacket(): Message size = " << msgLen << endl;
msg.resize(0);
- QBuffer b( msg );
+ TQBuffer b( msg );
b.open( IO_WriteOnly );
while( msgLen ) {
len = atomicio(ssh.stdioFd(), buf.data(), kMin(buf.size(), msgLen), true /*read*/);
if( len == 0 || len == -1) {
- QString errmsg;
+ TQString errmsg;
if (len == 0)
errmsg = i18n("Connection closed");
else
@@ -1514,7 +1514,7 @@ bool sftpProtocol::getPacket(QByteArray& msg) {
}
/** Send an sftp packet to stdin of the ssh process. */
-bool sftpProtocol::putPacket(QByteArray& p){
+bool sftpProtocol::putPacket(TQByteArray& p){
// kdDebug(KIO_SFTP_DB) << "putPacket(): size == " << p.size() << endl;
int ret;
ret = atomicio(ssh.stdioFd(), p.data(), p.size(), false /*write*/);
@@ -1535,14 +1535,14 @@ int sftpProtocol::sftpRealPath(const KURL& url, KURL& newUrl){
kdDebug(KIO_SFTP_DB) << "sftpRealPath(" << url << ", newUrl)" << endl;
- QCString path = remoteEncoding()->encode(url.path());
+ TQCString path = remoteEncoding()->encode(url.path());
uint len = path.length();
Q_UINT32 id, expectedId;
id = expectedId = mMsgId++;
- QByteArray p;
- QDataStream s(p, IO_WriteOnly);
+ TQByteArray p;
+ TQDataStream s(p, IO_WriteOnly);
s << Q_UINT32(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len);
s << (Q_UINT8)SSH2_FXP_REALPATH;
s << id;
@@ -1552,7 +1552,7 @@ int sftpProtocol::sftpRealPath(const KURL& url, KURL& newUrl){
getPacket(p);
Q_UINT8 type;
- QDataStream r(p, IO_ReadOnly);
+ TQDataStream r(p, IO_ReadOnly);
r >> type >> id;
if( id != expectedId ) {
@@ -1578,7 +1578,7 @@ int sftpProtocol::sftpRealPath(const KURL& url, KURL& newUrl){
return -1;
}
- QCString newPath;
+ TQCString newPath;
r >> newPath;
newPath.truncate(newPath.size());
@@ -1589,7 +1589,7 @@ int sftpProtocol::sftpRealPath(const KURL& url, KURL& newUrl){
return SSH2_FX_OK;
}
-sftpProtocol::Status sftpProtocol::doProcessStatus(Q_UINT8 code, const QString& message)
+sftpProtocol::Status sftpProtocol::doProcessStatus(Q_UINT8 code, const TQString& message)
{
Status res;
res.code = 0;
@@ -1628,25 +1628,25 @@ sftpProtocol::Status sftpProtocol::doProcessStatus(Q_UINT8 code, const QString&
}
/** Process SSH_FXP_STATUS packets. */
-void sftpProtocol::processStatus(Q_UINT8 code, const QString& message){
+void sftpProtocol::processStatus(Q_UINT8 code, const TQString& message){
Status st = doProcessStatus( code, message );
if( st.code != 0 )
error( st.code, st.text );
}
/** Opens a directory handle for url.path. Returns true if succeeds. */
-int sftpProtocol::sftpOpenDirectory(const KURL& url, QByteArray& handle){
+int sftpProtocol::sftpOpenDirectory(const KURL& url, TQByteArray& handle){
kdDebug(KIO_SFTP_DB) << "sftpOpenDirectory(" << url << ", handle)" << endl;
- QCString path = remoteEncoding()->encode(url.path());
+ TQCString path = remoteEncoding()->encode(url.path());
uint len = path.length();
Q_UINT32 id, expectedId;
id = expectedId = mMsgId++;
- QByteArray p;
- QDataStream s(p, IO_WriteOnly);
+ TQByteArray p;
+ TQDataStream s(p, IO_WriteOnly);
s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len);
s << (Q_UINT8)SSH2_FXP_OPENDIR;
s << (Q_UINT32)id;
@@ -1655,7 +1655,7 @@ int sftpProtocol::sftpOpenDirectory(const KURL& url, QByteArray& handle){
putPacket(p);
getPacket(p);
- QDataStream r(p, IO_ReadOnly);
+ TQDataStream r(p, IO_ReadOnly);
Q_UINT8 type;
r >> type >> id;
@@ -1687,15 +1687,15 @@ int sftpProtocol::sftpOpenDirectory(const KURL& url, QByteArray& handle){
}
/** Closes a directory or file handle. */
-int sftpProtocol::sftpClose(const QByteArray& handle){
+int sftpProtocol::sftpClose(const TQByteArray& handle){
kdDebug(KIO_SFTP_DB) << "sftpClose()" << endl;
Q_UINT32 id, expectedId;
id = expectedId = mMsgId++;
- QByteArray p;
- QDataStream s(p, IO_WriteOnly);
+ TQByteArray p;
+ TQDataStream s(p, IO_WriteOnly);
s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + handle.size());
s << (Q_UINT8)SSH2_FXP_CLOSE;
s << (Q_UINT32)id;
@@ -1704,7 +1704,7 @@ int sftpProtocol::sftpClose(const QByteArray& handle){
putPacket(p);
getPacket(p);
- QDataStream r(p, IO_ReadOnly);
+ TQDataStream r(p, IO_ReadOnly);
Q_UINT8 type;
r >> type >> id;
@@ -1732,14 +1732,14 @@ int sftpProtocol::sftpSetStat(const KURL& url, const sftpFileAttr& attr){
kdDebug(KIO_SFTP_DB) << "sftpSetStat(" << url << ", attr)" << endl;
- QCString path = remoteEncoding()->encode(url.path());
+ TQCString path = remoteEncoding()->encode(url.path());
uint len = path.length();
Q_UINT32 id, expectedId;
id = expectedId = mMsgId++;
- QByteArray p;
- QDataStream s(p, IO_WriteOnly);
+ TQByteArray p;
+ TQDataStream s(p, IO_WriteOnly);
s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len + attr.size());
s << (Q_UINT8)SSH2_FXP_SETSTAT;
s << (Q_UINT32)id;
@@ -1749,7 +1749,7 @@ int sftpProtocol::sftpSetStat(const KURL& url, const sftpFileAttr& attr){
putPacket(p);
getPacket(p);
- QDataStream r(p, IO_ReadOnly);
+ TQDataStream r(p, IO_ReadOnly);
Q_UINT8 type;
r >> type >> id;
@@ -1778,14 +1778,14 @@ int sftpProtocol::sftpRemove(const KURL& url, bool isfile){
kdDebug(KIO_SFTP_DB) << "sftpRemove(): " << url << ", isFile ? " << isfile << endl;
- QCString path = remoteEncoding()->encode(url.path());
+ TQCString path = remoteEncoding()->encode(url.path());
uint len = path.length();
Q_UINT32 id, expectedId;
id = expectedId = mMsgId++;
- QByteArray p;
- QDataStream s(p, IO_WriteOnly);
+ TQByteArray p;
+ TQDataStream s(p, IO_WriteOnly);
s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len);
s << (Q_UINT8)(isfile ? SSH2_FXP_REMOVE : SSH2_FXP_RMDIR);
s << (Q_UINT32)id;
@@ -1794,7 +1794,7 @@ int sftpProtocol::sftpRemove(const KURL& url, bool isfile){
putPacket(p);
getPacket(p);
- QDataStream r(p, IO_ReadOnly);
+ TQDataStream r(p, IO_ReadOnly);
Q_UINT8 type;
r >> type >> id;
@@ -1822,8 +1822,8 @@ int sftpProtocol::sftpRename(const KURL& src, const KURL& dest){
kdDebug(KIO_SFTP_DB) << "sftpRename(" << src << " -> " << dest << ")" << endl;
- QCString srcPath = remoteEncoding()->encode(src.path());
- QCString destPath = remoteEncoding()->encode(dest.path());
+ TQCString srcPath = remoteEncoding()->encode(src.path());
+ TQCString destPath = remoteEncoding()->encode(dest.path());
uint slen = srcPath.length();
uint dlen = destPath.length();
@@ -1831,8 +1831,8 @@ int sftpProtocol::sftpRename(const KURL& src, const KURL& dest){
Q_UINT32 id, expectedId;
id = expectedId = mMsgId++;
- QByteArray p;
- QDataStream s(p, IO_WriteOnly);
+ TQByteArray p;
+ TQDataStream s(p, IO_WriteOnly);
s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ +
4 /*str length*/ + slen +
4 /*str length*/ + dlen);
@@ -1844,7 +1844,7 @@ int sftpProtocol::sftpRename(const KURL& src, const KURL& dest){
putPacket(p);
getPacket(p);
- QDataStream r(p, IO_ReadOnly);
+ TQDataStream r(p, IO_ReadOnly);
Q_UINT8 type;
r >> type >> id;
@@ -1867,7 +1867,7 @@ int sftpProtocol::sftpRename(const KURL& src, const KURL& dest){
return code;
}
/** Get directory listings. */
-int sftpProtocol::sftpReadDir(const QByteArray& handle, const KURL& url){
+int sftpProtocol::sftpReadDir(const TQByteArray& handle, const KURL& url){
// url is needed so we can lookup the link destination
kdDebug(KIO_SFTP_DB) << "sftpReadDir(): " << url << endl;
@@ -1877,8 +1877,8 @@ int sftpProtocol::sftpReadDir(const QByteArray& handle, const KURL& url){
sftpFileAttr attr (remoteEncoding());
attr.setDirAttrsFlag(true);
- QByteArray p;
- QDataStream s(p, IO_WriteOnly);
+ TQByteArray p;
+ TQDataStream s(p, IO_WriteOnly);
id = expectedId = mMsgId++;
s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + handle.size());
s << (Q_UINT8)SSH2_FXP_READDIR;
@@ -1888,7 +1888,7 @@ int sftpProtocol::sftpReadDir(const QByteArray& handle, const KURL& url){
putPacket(p);
getPacket(p);
- QDataStream r(p, IO_ReadOnly);
+ TQDataStream r(p, IO_ReadOnly);
r >> type >> id;
if( id != expectedId ) {
@@ -1933,11 +1933,11 @@ int sftpProtocol::sftpReadDir(const QByteArray& handle, const KURL& url){
return SSH2_FX_OK;
}
-int sftpProtocol::sftpReadLink(const KURL& url, QString& target){
+int sftpProtocol::sftpReadLink(const KURL& url, TQString& target){
kdDebug(KIO_SFTP_DB) << "sftpReadLink(): " << url << endl;
- QCString path = remoteEncoding()->encode(url.path());
+ TQCString path = remoteEncoding()->encode(url.path());
uint len = path.length();
//kdDebug(KIO_SFTP_DB) << "sftpReadLink(): Encoded Path: " << path << endl;
@@ -1946,8 +1946,8 @@ int sftpProtocol::sftpReadLink(const KURL& url, QString& target){
Q_UINT32 id, expectedId;
id = expectedId = mMsgId++;
- QByteArray p;
- QDataStream s(p, IO_WriteOnly);
+ TQByteArray p;
+ TQDataStream s(p, IO_WriteOnly);
s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len);
s << (Q_UINT8)SSH2_FXP_READLINK;
s << id;
@@ -1958,7 +1958,7 @@ int sftpProtocol::sftpReadLink(const KURL& url, QString& target){
getPacket(p);
Q_UINT8 type;
- QDataStream r(p, IO_ReadOnly);
+ TQDataStream r(p, IO_ReadOnly);
r >> type >> id;
if( id != expectedId ) {
@@ -1985,7 +1985,7 @@ int sftpProtocol::sftpReadLink(const KURL& url, QString& target){
return -1;
}
- QCString linkAddress;
+ TQCString linkAddress;
r >> linkAddress;
linkAddress.truncate(linkAddress.size());
@@ -1996,10 +1996,10 @@ int sftpProtocol::sftpReadLink(const KURL& url, QString& target){
return SSH2_FX_OK;
}
-int sftpProtocol::sftpSymLink(const QString& _target, const KURL& dest){
+int sftpProtocol::sftpSymLink(const TQString& _target, const KURL& dest){
- QCString destPath = remoteEncoding()->encode(dest.path());
- QCString target = remoteEncoding()->encode(_target);
+ TQCString destPath = remoteEncoding()->encode(dest.path());
+ TQCString target = remoteEncoding()->encode(_target);
uint dlen = destPath.length();
uint tlen = target.length();
@@ -2008,8 +2008,8 @@ int sftpProtocol::sftpSymLink(const QString& _target, const KURL& dest){
Q_UINT32 id, expectedId;
id = expectedId = mMsgId++;
- QByteArray p;
- QDataStream s(p, IO_WriteOnly);
+ TQByteArray p;
+ TQDataStream s(p, IO_WriteOnly);
s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ +
4 /*str length*/ + tlen +
4 /*str length*/ + dlen);
@@ -2021,7 +2021,7 @@ int sftpProtocol::sftpSymLink(const QString& _target, const KURL& dest){
putPacket(p);
getPacket(p);
- QDataStream r(p, IO_ReadOnly);
+ TQDataStream r(p, IO_ReadOnly);
Q_UINT8 type;
r >> type >> id;
@@ -2049,14 +2049,14 @@ int sftpProtocol::sftpStat(const KURL& url, sftpFileAttr& attr) {
kdDebug(KIO_SFTP_DB) << "sftpStat(): " << url << endl;
- QCString path = remoteEncoding()->encode(url.path());
+ TQCString path = remoteEncoding()->encode(url.path());
uint len = path.length();
Q_UINT32 id, expectedId;
id = expectedId = mMsgId++;
- QByteArray p;
- QDataStream s(p, IO_WriteOnly);
+ TQByteArray p;
+ TQDataStream s(p, IO_WriteOnly);
s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len);
s << (Q_UINT8)SSH2_FXP_LSTAT;
s << (Q_UINT32)id;
@@ -2065,7 +2065,7 @@ int sftpProtocol::sftpStat(const KURL& url, sftpFileAttr& attr) {
putPacket(p);
getPacket(p);
- QDataStream r(p, IO_ReadOnly);
+ TQDataStream r(p, IO_ReadOnly);
Q_UINT8 type;
r >> type >> id;
@@ -2094,7 +2094,7 @@ int sftpProtocol::sftpStat(const KURL& url, sftpFileAttr& attr) {
// to determine the actual destination's type (file/dir).
if( S_ISLNK(attr.permissions()) && isSupportedOperation(SSH2_FXP_READLINK) ) {
- QString target;
+ TQString target;
int code = sftpReadLink( url, target );
if ( code != SSH2_FX_OK ) {
@@ -2134,17 +2134,17 @@ int sftpProtocol::sftpStat(const KURL& url, sftpFileAttr& attr) {
int sftpProtocol::sftpOpen(const KURL& url, const Q_UINT32 pflags,
- const sftpFileAttr& attr, QByteArray& handle) {
+ const sftpFileAttr& attr, TQByteArray& handle) {
kdDebug(KIO_SFTP_DB) << "sftpOpen(" << url << ", handle" << endl;
- QCString path = remoteEncoding()->encode(url.path());
+ TQCString path = remoteEncoding()->encode(url.path());
uint len = path.length();
Q_UINT32 id, expectedId;
id = expectedId = mMsgId++;
- QByteArray p;
- QDataStream s(p, IO_WriteOnly);
+ TQByteArray p;
+ TQDataStream s(p, IO_WriteOnly);
s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ +
4 /*str length*/ + len +
4 /*pflags*/ + attr.size());
@@ -2157,7 +2157,7 @@ int sftpProtocol::sftpOpen(const KURL& url, const Q_UINT32 pflags,
putPacket(p);
getPacket(p);
- QDataStream r(p, IO_ReadOnly);
+ TQDataStream r(p, IO_ReadOnly);
Q_UINT8 type;
r >> type >> id;
@@ -2188,11 +2188,11 @@ int sftpProtocol::sftpOpen(const KURL& url, const Q_UINT32 pflags,
}
-int sftpProtocol::sftpRead(const QByteArray& handle, KIO::filesize_t offset, Q_UINT32 len, QByteArray& data)
+int sftpProtocol::sftpRead(const TQByteArray& handle, KIO::filesize_t offset, Q_UINT32 len, TQByteArray& data)
{
// kdDebug(KIO_SFTP_DB) << "sftpRead( offset = " << offset << ", len = " << len << ")" << endl;
- QByteArray p;
- QDataStream s(p, IO_WriteOnly);
+ TQByteArray p;
+ TQDataStream s(p, IO_WriteOnly);
Q_UINT32 id, expectedId;
id = expectedId = mMsgId++;
@@ -2208,7 +2208,7 @@ int sftpProtocol::sftpRead(const QByteArray& handle, KIO::filesize_t offset, Q_U
putPacket(p);
getPacket(p);
- QDataStream r(p, IO_ReadOnly);
+ TQDataStream r(p, IO_ReadOnly);
Q_UINT8 type;
r >> type >> id;
@@ -2235,11 +2235,11 @@ int sftpProtocol::sftpRead(const QByteArray& handle, KIO::filesize_t offset, Q_U
}
-int sftpProtocol::sftpWrite(const QByteArray& handle, KIO::filesize_t offset, const QByteArray& data){
+int sftpProtocol::sftpWrite(const TQByteArray& handle, KIO::filesize_t offset, const TQByteArray& data){
// kdDebug(KIO_SFTP_DB) << "sftpWrite( offset = " << offset <<
// ", data sz = " << data.size() << ")" << endl;
- QByteArray p;
- QDataStream s(p, IO_WriteOnly);
+ TQByteArray p;
+ TQDataStream s(p, IO_WriteOnly);
Q_UINT32 id, expectedId;
id = expectedId = mMsgId++;
@@ -2263,7 +2263,7 @@ int sftpProtocol::sftpWrite(const QByteArray& handle, KIO::filesize_t offset, co
// kdDebug(KIO_SFTP_DB) << "sftpWrite(): received packet [" << p << "]" << endl;
- QDataStream r(p, IO_ReadOnly);
+ TQDataStream r(p, IO_ReadOnly);
Q_UINT8 type;
r >> type >> id;
diff --git a/kioslave/sftp/kio_sftp.h b/kioslave/sftp/kio_sftp.h
index ff99b4760..22cd4764a 100644
--- a/kioslave/sftp/kio_sftp.h
+++ b/kioslave/sftp/kio_sftp.h
@@ -17,9 +17,9 @@
#ifndef __kio_sftp_h__
#define __kio_sftp_h__
-#include <qstring.h>
-#include <qcstring.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqobject.h>
#include <kurl.h>
#include <kio/global.h>
@@ -37,9 +37,9 @@ class sftpProtocol : public KIO::SlaveBase
{
public:
- sftpProtocol(const QCString &pool_socket, const QCString &app_socket);
+ sftpProtocol(const TQCString &pool_socket, const TQCString &app_socket);
virtual ~sftpProtocol();
- virtual void setHost(const QString& h, int port, const QString& user, const QString& pass);
+ virtual void setHost(const TQString& h, int port, const TQString& user, const TQString& pass);
virtual void get(const KURL& url);
virtual void listDir(const KURL& url) ;
virtual void mimetype(const KURL& url);
@@ -50,7 +50,7 @@ public:
virtual void slave_status();
virtual void del(const KURL &url, bool isfile);
virtual void chmod(const KURL& url, int permissions);
- virtual void symlink(const QString& target, const KURL& dest, bool overwrite);
+ virtual void symlink(const TQString& target, const KURL& dest, bool overwrite);
virtual void rename(const KURL& src, const KURL& dest, bool overwrite);
virtual void mkdir(const KURL&url, int permissions);
virtual void openConnection();
@@ -60,7 +60,7 @@ private: // Private variables
bool mConnected;
/** Host we are connected to. */
- QString mHost;
+ TQString mHost;
/** Port we are connected to. */
int mPort;
@@ -69,10 +69,10 @@ private: // Private variables
KSshProcess ssh;
/** Username to use when connecting */
- QString mUsername;
+ TQString mUsername;
/** User's password */
- QString mPassword;
+ TQString mPassword;
/** Message id of the last sftp packet we sent. */
unsigned int mMsgId;
@@ -87,11 +87,11 @@ private: // Private variables
{
int code;
KIO::filesize_t size;
- QString text;
+ TQString text;
};
private: // private methods
- bool getPacket(QByteArray& msg);
+ bool getPacket(TQByteArray& msg);
/* Type is a sftp packet type found in .sftp.h'.
* Example: SSH2_FXP_READLINK, SSH2_FXP_RENAME, etc.
@@ -107,15 +107,15 @@ private: // private methods
int sftpRealPath(const KURL& url, KURL& newUrl);
/** Send an sftp packet to stdin of the ssh process. */
- bool putPacket(QByteArray& p);
+ bool putPacket(TQByteArray& p);
/** Process SSH_FXP_STATUS packets. */
- void processStatus(Q_UINT8, const QString& message = QString::null);
+ void processStatus(Q_UINT8, const TQString& message = TQString::null);
/** Process SSH_FXP_STATUS packes and return the result. */
- Status doProcessStatus(Q_UINT8, const QString& message = QString::null);
+ Status doProcessStatus(Q_UINT8, const TQString& message = TQString::null);
/** Opens a directory handle for url.path. Returns true if succeeds. */
- int sftpOpenDirectory(const KURL& url, QByteArray& handle);
+ int sftpOpenDirectory(const KURL& url, TQByteArray& handle);
/** Closes a directory or file handle. */
- int sftpClose(const QByteArray& handle);
+ int sftpClose(const TQByteArray& handle);
/** Send a sftp command to rename a file or directoy. */
int sftpRename(const KURL& src, const KURL& dest);
/** Set a files attributes. */
@@ -123,19 +123,19 @@ private: // private methods
/** Sends a sftp command to remove a file or directory. */
int sftpRemove(const KURL& url, bool isfile);
/** Creates a symlink named dest to target. */
- int sftpSymLink(const QString& target, const KURL& dest);
+ int sftpSymLink(const TQString& target, const KURL& dest);
/** Get directory listings. */
- int sftpReadDir(const QByteArray& handle, const KURL& url);
+ int sftpReadDir(const TQByteArray& handle, const KURL& url);
/** Retrieves the destination of a link. */
- int sftpReadLink(const KURL& url, QString& target);
+ int sftpReadLink(const KURL& url, TQString& target);
/** Stats a file. */
int sftpStat(const KURL& url, sftpFileAttr& attr);
/** No descriptions */
- int sftpOpen(const KURL& url, const Q_UINT32 pflags, const sftpFileAttr& attr, QByteArray& handle);
+ int sftpOpen(const KURL& url, const Q_UINT32 pflags, const sftpFileAttr& attr, TQByteArray& handle);
/** No descriptions */
- int sftpRead(const QByteArray& handle, KIO::filesize_t offset, Q_UINT32 len, QByteArray& data);
+ int sftpRead(const TQByteArray& handle, KIO::filesize_t offset, Q_UINT32 len, TQByteArray& data);
/** No descriptions */
- int sftpWrite(const QByteArray& handle, KIO::filesize_t offset, const QByteArray& data);
+ int sftpWrite(const TQByteArray& handle, KIO::filesize_t offset, const TQByteArray& data);
/** Performs faster upload when the source is a local file... */
void sftpCopyPut(const KURL& src, const KURL& dest, int mode, bool overwrite);
diff --git a/kioslave/sftp/ksshprocess.cpp b/kioslave/sftp/ksshprocess.cpp
index c0393445d..9b2323bd6 100644
--- a/kioslave/sftp/ksshprocess.cpp
+++ b/kioslave/sftp/ksshprocess.cpp
@@ -67,7 +67,7 @@
#include <kstandarddirs.h>
#include <klocale.h>
-#include <qregexp.h>
+#include <tqregexp.h>
/*
* The following are tables of string and regexps we match
@@ -82,10 +82,10 @@
* so that is matched last. We use these generic version strings
* so we can do a best effor to support unknown ssh versions.
*/
-QRegExp KSshProcess::versionStrs[] = {
- QRegExp("OpenSSH_3\\.[6-9]|OpenSSH_[1-9]*[4-9]\\.[0-9]"),
- QRegExp("OpenSSH"),
- QRegExp("SSH Secure Shell")
+TQRegExp KSshProcess::versionStrs[] = {
+ TQRegExp("OpenSSH_3\\.[6-9]|OpenSSH_[1-9]*[4-9]\\.[0-9]"),
+ TQRegExp("OpenSSH"),
+ TQRegExp("SSH Secure Shell")
};
const char * const KSshProcess::passwordPrompt[] = {
@@ -118,10 +118,10 @@ const char* const KSshProcess::tryAgainMsg[] = {
"adjfhjsdhfdsjfsjdfhuefeufeuefe"
};
-QRegExp KSshProcess::hostKeyMissingMsg[] = {
- QRegExp("The authenticity of host|No (DSA|RSA) host key is known for"),
- QRegExp("The authenticity of host|No (DSA|RSA) host key is known for"),
- QRegExp("Host key not found from database")
+TQRegExp KSshProcess::hostKeyMissingMsg[] = {
+ TQRegExp("The authenticity of host|No (DSA|RSA) host key is known for"),
+ TQRegExp("The authenticity of host|No (DSA|RSA) host key is known for"),
+ TQRegExp("Host key not found from database")
};
const char* const KSshProcess::continuePrompt[] = {
@@ -136,16 +136,16 @@ const char* const KSshProcess::hostKeyChangedMsg[] = {
"WARNING: HOST IDENTIFICATION HAS CHANGED!"
};
-QRegExp KSshProcess::keyFingerprintMsg[] = {
- QRegExp("..(:..){15}"),
- QRegExp("..(:..){15}"),
- QRegExp(".....(-.....){10}")
+TQRegExp KSshProcess::keyFingerprintMsg[] = {
+ TQRegExp("..(:..){15}"),
+ TQRegExp("..(:..){15}"),
+ TQRegExp(".....(-.....){10}")
};
-QRegExp KSshProcess::knownHostsFileMsg[] = {
- QRegExp("Add correct host key in (.*) to get rid of this message."),
- QRegExp("Add correct host key in (.*) to get rid of this message."),
- QRegExp("Add correct host key to \"(.*)\"")
+TQRegExp KSshProcess::knownHostsFileMsg[] = {
+ TQRegExp("Add correct host key in (.*) to get rid of this message."),
+ TQRegExp("Add correct host key in (.*) to get rid of this message."),
+ TQRegExp("Add correct host key to \"(.*)\"")
};
@@ -164,10 +164,10 @@ const char* const KSshProcess::changeHostKeyOnDiskPrompt[] = {
// quit. The later if StrictHostKeyChecking is "no".
// The former if StrictHostKeyChecking is
// "yes" or explicitly set to "ask".
-QRegExp KSshProcess::hostKeyVerifyFailedMsg[] = {
- QRegExp("Host key verification failed\\."),
- QRegExp("Host key verification failed\\."),
- QRegExp("Disconnected; key exchange or algorithm? negotiation failed \\(Key exchange failed\\.\\)\\.")
+TQRegExp KSshProcess::hostKeyVerifyFailedMsg[] = {
+ TQRegExp("Host key verification failed\\."),
+ TQRegExp("Host key verification failed\\."),
+ TQRegExp("Disconnected; key exchange or algorithm? negotiation failed \\(Key exchange failed\\.\\)\\.")
};
const char * const KSshProcess::connectionClosedMsg[] = {
@@ -206,14 +206,14 @@ void KSshProcess::removeSignalHandlers() {
KSshProcess::KSshProcess()
: mVersion(UNKNOWN_VER), mConnected(false),
mRunning(false), mConnectState(0) {
- mSshPath = KStandardDirs::findExe(QString::fromLatin1("ssh"));
+ mSshPath = KStandardDirs::findExe(TQString::fromLatin1("ssh"));
kdDebug(KSSHPROC) << "KSshProcess::KSshProcess(): ssh path [" <<
mSshPath << "]" << endl;
installSignalHandlers();
}
-KSshProcess::KSshProcess(QString pathToSsh)
+KSshProcess::KSshProcess(TQString pathToSsh)
: mSshPath(pathToSsh), mVersion(UNKNOWN_VER), mConnected(false),
mRunning(false), mConnectState(0) {
installSignalHandlers();
@@ -225,7 +225,7 @@ KSshProcess::~KSshProcess(){
while(waitpid(-1, NULL, WNOHANG) > 0);
}
-bool KSshProcess::setSshPath(QString pathToSsh) {
+bool KSshProcess::setSshPath(TQString pathToSsh) {
mSshPath = pathToSsh;
version();
if( mVersion == UNKNOWN_VER )
@@ -235,7 +235,7 @@ bool KSshProcess::setSshPath(QString pathToSsh) {
}
KSshProcess::SshVersion KSshProcess::version() {
- QString cmd;
+ TQString cmd;
cmd = mSshPath+" -V 2>&1";
// Get version string from ssh client.
@@ -259,7 +259,7 @@ KSshProcess::SshVersion KSshProcess::version() {
kdError(KSSHPROC) << "KSshProcess::version(): pclose failed." << endl;
}
buf[len] = '\0';
- QString ver;
+ TQString ver;
ver = buf;
kdDebug(KSSHPROC) << "KSshProcess::version(): "
"got version string [" << ver << "]" << endl;
@@ -285,14 +285,14 @@ KSshProcess::SshVersion KSshProcess::version() {
return mVersion;
}
/*
-QString KSshProcess::versionStr() {
+TQString KSshProcess::versionStr() {
if( mVersion == UNKNOWN_VER ) {
version();
if( mVersion == UNKNOWN_VER )
- return QString::null;
+ return TQString::null;
}
- return QString::fromLatin1(versionStrs[mVersion]);
+ return TQString::fromLatin1(versionStrs[mVersion]);
}
*/
@@ -300,9 +300,9 @@ bool KSshProcess::setOptions(const SshOptList& opts) {
kdDebug(KSSHPROC) << "KSshProcess::setOptions()" << endl;
mArgs.clear();
SshOptListConstIterator it;
- QString cmd, subsystem;
- mPassword = mUsername = mHost = QString::null;
- QCString tmp;
+ TQString cmd, subsystem;
+ mPassword = mUsername = mHost = TQString::null;
+ TQCString tmp;
for(it = opts.begin(); it != opts.end(); ++it) {
//kdDebug(KSSHPROC) << "opt.opt = " << (*it).opt << endl;
//kdDebug(KSSHPROC) << "opt.str = " << (*it).str << endl;
@@ -340,7 +340,7 @@ bool KSshProcess::setOptions(const SshOptList& opts) {
case SSH_PROTOCOL:
if( mVersion <= OPENSSH ) {
tmp = "Protocol=";
- tmp += QString::number((*it).num).latin1();
+ tmp += TQString::number((*it).num).latin1();
mArgs.append("-o");
mArgs.append(tmp);
}
@@ -445,14 +445,14 @@ bool KSshProcess::setOptions(const SshOptList& opts) {
}
void KSshProcess::printArgs() {
- QValueListIterator<QCString> it;
+ TQValueListIterator<TQCString> it;
for( it = mArgs.begin(); it != mArgs.end(); ++it) {
kdDebug(KSSHPROC) << "arg: " << *it << endl;
}
}
-int KSshProcess::error(QString& msg) {
+int KSshProcess::error(TQString& msg) {
kdDebug(KSSHPROC) << "KSshProcess::error()" << endl;
kdDebug() << mErrorMsg << endl;
msg = mErrorMsg;
@@ -539,15 +539,15 @@ void KSshProcess::acceptHostKey(bool accept) {
mAcceptHostKey = accept;
}
-void KSshProcess::setPassword(QString password) {
+void KSshProcess::setPassword(TQString password) {
kdDebug(KSSHPROC) << "KSshProcess::setPassword(password:xxxxxxxx)" << endl;
mPassword = password;
}
-QString KSshProcess::getLine() {
- static QStringList buffer;
- QString line = QString::null;
- QCString ptyLine, errLine;
+TQString KSshProcess::getLine() {
+ static TQStringList buffer;
+ TQString line = TQString::null;
+ TQCString ptyLine, errLine;
if( buffer.empty() ) {
// PtyProcess buffers lines. First check that there
@@ -559,11 +559,11 @@ QString KSshProcess::getLine() {
// If PtyProcess did have something for us, get it and
// place it in our line buffer.
if( ! ptyLine.isEmpty() ) {
- buffer.prepend(QString(ptyLine));
+ buffer.prepend(TQString(ptyLine));
}
if( ! errLine.isEmpty() ) {
- buffer.prepend(QString(errLine));
+ buffer.prepend(TQString(errLine));
}
// If we still don't have anything in our buffer so there must
@@ -602,13 +602,13 @@ QString KSshProcess::getLine() {
kdDebug(KSSHPROC) << "KSshProcess::connect(): " <<
"timed out waiting for a response" << endl;
mError = ERR_TIMED_OUT;
- return QString::null;
+ return TQString::null;
}
else if( ret == -1 ) {
kdDebug(KSSHPROC) << "KSshProcess::connect(): "
<< "select error: " << strerror(errno) << endl;
mError = ERR_INTERNAL;
- return QString::null;
+ return TQString::null;
}
// We are not respecting any type of order in which the
@@ -616,14 +616,14 @@ QString KSshProcess::getLine() {
// had data on it first.
if( FD_ISSET(ptyfd, &rfds) ) {
ptyLine = ssh.readLineFromPty(false);
- buffer.prepend(QString(ptyLine));
+ buffer.prepend(TQString(ptyLine));
//kdDebug(KSSHPROC) << "KSshProcess::getLine(): "
// "line from pty -" << ptyLine << endl;
}
if( FD_ISSET(errfd, &rfds) ) {
errLine = ssh.readLineFromStderr(false);
- buffer.prepend(QString(errLine));
+ buffer.prepend(TQString(errLine));
//kdDebug(KSSHPROC) << "KSshProcess::getLine(): "
// "line from err -" << errLine << endl;
}
@@ -720,8 +720,8 @@ bool KSshProcess::connect() {
kdDebug(KSSHPROC) << "KSshProcess::connect(): "
<< "Connect state " << stateStr(mConnectState) << endl;
- QString line; // a line from ssh
- QString msgBuf; // buffer for important messages from ssh
+ TQString line; // a line from ssh
+ TQString msgBuf; // buffer for important messages from ssh
// which are to be returned to the user
switch(mConnectState) {
@@ -733,8 +733,8 @@ bool KSshProcess::connect() {
case STATE_START:
// reset some key values to safe values
mAcceptHostKey = false;
- mKeyFingerprint = QString::null;
- mKnownHostsFile = QString::null;
+ mKeyFingerprint = TQString::null;
+ mKnownHostsFile = TQString::null;
if( mArgs.isEmpty() ) {
kdDebug(KSSHPROC) << "KSshProcess::connect(): ssh options "
@@ -776,7 +776,7 @@ bool KSshProcess::connect() {
i18n("Error encountered while talking to ssh.");
mConnectState = STATE_FATAL;
}
- else if( line.find(QString::fromLatin1(passwordPrompt[mVersion]), 0, false) != -1 ) {
+ else if( line.find(TQString::fromLatin1(passwordPrompt[mVersion]), 0, false) != -1 ) {
mConnectState = STATE_TRY_PASSWD;
}
else if( line.find(passphrasePrompt[mVersion]) != -1 ) {
@@ -824,7 +824,7 @@ bool KSshProcess::connect() {
// STATE_TRY_PASSWD:
// If we have password send it to the ssh process, else
// set error ERR_NEED_PASSWD and return false to the caller.
- // The caller then must then call KSshProcess::setPassword(QString)
+ // The caller then must then call KSshProcess::setPassword(TQString)
// before calling KSshProcess::connect() again.
//
// Almost exactly liek STATE_TRY_PASSPHRASE. Check there if you
@@ -839,11 +839,11 @@ bool KSshProcess::connect() {
ssh.writeLine(mPassword.latin1());
// Overwrite the password so it isn't in memory.
- mPassword.fill(QChar('X'));
+ mPassword.fill(TQChar('X'));
// Set the password to null so we will request another
// password if this one fails.
- mPassword = QString::null;
+ mPassword = TQString::null;
mConnectState = STATE_WAIT_PROMPT;
}
@@ -862,7 +862,7 @@ bool KSshProcess::connect() {
// STATE_TRY_KEY_PASSPHRASE:
// If we have passphrase send it to the ssh process, else
// set error ERR_NEED_PASSPHRASE and return false to the caller.
- // The caller then must then call KSshProcess::setPassword(QString)
+ // The caller then must then call KSshProcess::setPassword(TQString)
// before calling KSshProcess::connect() again.
//
// Almost exactly like STATE_TRY_PASSWD. The only difference is
@@ -878,11 +878,11 @@ bool KSshProcess::connect() {
ssh.writeLine(mPassword.latin1());
// Overwrite the password so it isn't in memory.
- mPassword.fill(QChar('X'));
+ mPassword.fill(TQChar('X'));
// Set the password to null so we will request another
// password if this one fails.
- mPassword = QString::null;
+ mPassword = TQString::null;
mConnectState = STATE_WAIT_PROMPT;
}
diff --git a/kioslave/sftp/ksshprocess.h b/kioslave/sftp/ksshprocess.h
index 2ec1abfd6..7fe8dd814 100644
--- a/kioslave/sftp/ksshprocess.h
+++ b/kioslave/sftp/ksshprocess.h
@@ -23,7 +23,7 @@
#include <signal.h>
#include <unistd.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
@@ -69,7 +69,7 @@
* }
*
* int err;
- * QString errMsg;
+ * TQString errMsg;
* while( !ssh.connect() ) {
* err = ssh.error(errMsg);
*
@@ -117,7 +117,7 @@ public:
class SshOpt {
public:
Q_UINT32 opt;
- QString str;
+ TQString str;
Q_INT32 num;
bool boolean;
};
@@ -125,9 +125,9 @@ public:
/**
* List of SshOptions and associated iterators
*/
- typedef QValueList<SshOpt> SshOptList;
- typedef QValueListIterator<SshOpt> SshOptListIterator;
- typedef QValueListConstIterator<SshOpt> SshOptListConstIterator;
+ typedef TQValueList<SshOpt> SshOptList;
+ typedef TQValueListIterator<SshOpt> SshOptListIterator;
+ typedef TQValueListConstIterator<SshOpt> SshOptListConstIterator;
/**
* Ssh versions supported by KSshProcess. Subject to change
@@ -320,7 +320,7 @@ public:
* @param pathToSsh The fully qualified path name of the ssh binary
* KSshProcess should use to setup a SSH connection.
*/
- KSshProcess(QString pathToSsh);
+ KSshProcess(TQString pathToSsh);
~KSshProcess();
/**
@@ -333,7 +333,7 @@ public:
* recognizes the version.
*
*/
- bool setSshPath(QString pathToSsh);
+ bool setSshPath(TQString pathToSsh);
/**
* Get the ssh version.
@@ -349,7 +349,7 @@ public:
*
* @return A string describing the ssh version recognized by KSshProcess
*/
- //QString versionStr();
+ //TQString versionStr();
/**
* Get the last error encountered by KSshProcess.
@@ -358,7 +358,7 @@ public:
*
* @return The error number. See SshError for descriptions.
*/
- int error(QString& msg);
+ int error(TQString& msg);
/**
* Get the last error encountered by KSshProcess.
@@ -366,7 +366,7 @@ public:
*/
int error() { return mError; }
- QString errorMsg() { return mErrorMsg; }
+ TQString errorMsg() { return mErrorMsg; }
/**
* Send a signal to the ssh process. Do not use this to end the
@@ -482,7 +482,7 @@ public:
*
* @param password The user password to give ssh.
*/
- void setPassword(QString password);
+ void setPassword(TQString password);
/**
* Access to standard in and out of the ssh process.
@@ -508,7 +508,7 @@ private:
/**
* Path the the ssh binary.
*/
- QString mSshPath;
+ TQString mSshPath;
/**
* SSH version. This is an index into the supported SSH
@@ -519,17 +519,17 @@ private:
/**
* User's password. Zero this out when it is no longer needed.
*/
- QString mPassword;
+ TQString mPassword;
/**
* User's username.
*/
- QString mUsername;
+ TQString mUsername;
/**
* Name of host we are connecting to.
*/
- QString mHost;
+ TQString mHost;
/**
* Accept new or changed host keys if true.
@@ -552,13 +552,13 @@ private:
* Save any key fingerprint msg from ssh so we can present
* it to the caller.
*/
- QString mKeyFingerprint;
+ TQString mKeyFingerprint;
/**
* The location of the known host key file. We grab this from
* any error messages ssh prints out.
*/
- QString mKnownHostsFile;
+ TQString mKnownHostsFile;
/**
* The state of our connect state machine.
@@ -580,7 +580,7 @@ private:
* An error message that corresponds to the error number set in
* mError. Optional.
*/
- QString mErrorMsg;
+ TQString mErrorMsg;
/**
* Interface to the SSH process we ceate. Handles communication
@@ -602,22 +602,22 @@ private:
void installSignalHandlers();
void removeSignalHandlers();
- QString getLine();
+ TQString getLine();
- static QRegExp versionStrs[];
+ static TQRegExp versionStrs[];
static const char * const passwordPrompt[];
static const char * const passphrasePrompt[];
static const char * const authSuccessMsg[];
static const char * const authFailedMsg[];
- static QRegExp hostKeyMissingMsg[];
+ static TQRegExp hostKeyMissingMsg[];
static const char * const hostKeyChangedMsg[];
static const char * const continuePrompt[];
static const char * const hostKeyAcceptedMsg[];
static const char * const tryAgainMsg[];
- static QRegExp hostKeyVerifyFailedMsg[];
+ static TQRegExp hostKeyVerifyFailedMsg[];
static const char * const connectionClosedMsg[];
static const char * const changeHostKeyOnDiskPrompt[];
- static QRegExp keyFingerprintMsg[];
- static QRegExp knownHostsFileMsg[];
+ static TQRegExp keyFingerprintMsg[];
+ static TQRegExp knownHostsFileMsg[];
};
#endif
diff --git a/kioslave/sftp/ksshprocesstest.cpp b/kioslave/sftp/ksshprocesstest.cpp
index 3a37be02c..59dbf58c7 100644
--- a/kioslave/sftp/ksshprocesstest.cpp
+++ b/kioslave/sftp/ksshprocesstest.cpp
@@ -22,15 +22,15 @@ int main(int argc, char *argv[]) {
opts.append(opt);
opt.opt = KSshProcess::SSH_HOST;
- opt.str = QString(argv[2]);
+ opt.str = TQString(argv[2]);
opts.append(opt);
opt.opt = KSshProcess::SSH_USERNAME;
- opt.str = QString(argv[3]);
+ opt.str = TQString(argv[3]);
opts.append(opt);
// opt.opt = KSshProcess::SSH_PASSWD;
-// opt.str = QString(argv[4]);
+// opt.str = TQString(argv[4]);
// opts.append(opt);
if( !ssh.setOptions(opts) ) {
@@ -53,7 +53,7 @@ int main(int argc, char *argv[]) {
cout << "Password: ";
cin >> buf;
cout << "password is " << buf << endl;
- ssh.setPassword(QString(buf));
+ ssh.setPassword(TQString(buf));
break;
case KSshProcess::ERR_NEW_HOST_KEY:
case KSshProcess::ERR_DIFF_HOST_KEY:
diff --git a/kioslave/sftp/process.cpp b/kioslave/sftp/process.cpp
index fcf012514..ca99b36bb 100644
--- a/kioslave/sftp/process.cpp
+++ b/kioslave/sftp/process.cpp
@@ -43,9 +43,9 @@
#include <sys/select.h> // Needed on some systems.
#endif
-#include <qglobal.h>
-#include <qcstring.h>
-#include <qfile.h>
+#include <tqglobal.h>
+#include <tqcstring.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kstandarddirs.h>
@@ -99,10 +99,10 @@ MyPtyProcess::~MyPtyProcess()
*/
-QCString MyPtyProcess::readLineFrom(int fd, QCString& inbuf, bool block)
+TQCString MyPtyProcess::readLineFrom(int fd, TQCString& inbuf, bool block)
{
int pos;
- QCString ret;
+ TQCString ret;
if (!inbuf.isEmpty())
{
@@ -172,7 +172,7 @@ QCString MyPtyProcess::readLineFrom(int fd, QCString& inbuf, bool block)
return ret;
}
-void MyPtyProcess::writeLine(QCString line, bool addnl)
+void MyPtyProcess::writeLine(TQCString line, bool addnl)
{
if (!line.isEmpty())
write(m_Fd, line, line.length());
@@ -180,7 +180,7 @@ void MyPtyProcess::writeLine(QCString line, bool addnl)
write(m_Fd, "\n", 1);
}
-void MyPtyProcess::unreadLineFrom(QCString inbuf, QCString line, bool addnl)
+void MyPtyProcess::unreadLineFrom(TQCString inbuf, TQCString line, bool addnl)
{
if (addnl)
line += '\n';
@@ -193,7 +193,7 @@ void MyPtyProcess::unreadLineFrom(QCString inbuf, QCString line, bool addnl)
* Fork and execute the command. This returns in the parent.
*/
-int MyPtyProcess::exec(QCString command, QCStringList args)
+int MyPtyProcess::exec(TQCString command, QCStringList args)
{
kdDebug(PTYPROC) << "MyPtyProcess::exec(): " << command << endl;// << ", args = " << args << endl;
@@ -259,18 +259,18 @@ int MyPtyProcess::exec(QCString command, QCStringList args)
_exit(1);
// From now on, terminal output goes through the tty.
- QCString path;
+ TQCString path;
if (command.contains('/'))
path = command;
else
{
- QString file = KStandardDirs::findExe(command);
+ TQString file = KStandardDirs::findExe(command);
if (file.isEmpty())
{
kdError(PTYPROC) << k_lineinfo << command << " not found\n";
_exit(1);
}
- path = QFile::encodeName(file);
+ path = TQFile::encodeName(file);
}
int i;
@@ -393,7 +393,7 @@ int MyPtyProcess::waitForChild()
if (ret)
{
- QCString line = readLine(false);
+ TQCString line = readLine(false);
while (!line.isNull())
{
if (!m_Exit.isEmpty() && !qstrnicmp(line, m_Exit, m_Exit.length()))
diff --git a/kioslave/sftp/process.h b/kioslave/sftp/process.h
index 64dcfb973..b0f20f77b 100644
--- a/kioslave/sftp/process.h
+++ b/kioslave/sftp/process.h
@@ -12,15 +12,15 @@
#ifndef __Process_h_Included__
#define __Process_h_Included__
-#include <qcstring.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#define PTYPROC 7120
class PTY;
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
/**
* Synchronous communication with tty programs.
@@ -43,7 +43,7 @@ public:
* @param command The command to execute.
* @param args The arguments to the command.
*/
- int exec(QCString command, QCStringList args);
+ int exec(TQCString command, QCStringList args);
/**
* Read a line from the program's standard out. Depending on the @em block
@@ -51,16 +51,16 @@ public:
* @param block Block until a full line is read?
* @return The output string.
*/
- QCString readLine(bool block = true)
+ TQCString readLine(bool block = true)
{ return readLineFrom(m_Fd, m_ptyBuf, block); }
- QCString readLineFromPty(bool block = true)
+ TQCString readLineFromPty(bool block = true)
{ return readLineFrom(m_Fd, m_ptyBuf, block); }
- QCString readLineFromStdout(bool block = true)
+ TQCString readLineFromStdout(bool block = true)
{ return readLineFrom(m_stdinout, m_stdoutBuf, block); }
- QCString readLineFromStderr(bool block = true)
+ TQCString readLineFromStderr(bool block = true)
{ return readLineFrom(m_err, m_stderrBuf, block); }
/**
@@ -68,7 +68,7 @@ public:
* @param line The text to write.
* @param addNewline Adds a '\n' to the line.
*/
- void writeLine(QCString line, bool addNewline=true);
+ void writeLine(TQCString line, bool addNewline=true);
/**
* Put back a line of input.
@@ -76,23 +76,23 @@ public:
* @param addNewline Adds a '\n' to the line.
*/
- void unreadLine(QCString line, bool addNewline = true)
+ void unreadLine(TQCString line, bool addNewline = true)
{ unreadLineFrom(m_ptyBuf, line, addNewline); }
- void unreadLineFromPty(QCString line, bool addNewline = true)
+ void unreadLineFromPty(TQCString line, bool addNewline = true)
{ unreadLineFrom(m_ptyBuf, line, addNewline); }
- void unreadLineFromStderr(QCString line, bool addNewline = true)
+ void unreadLineFromStderr(TQCString line, bool addNewline = true)
{ unreadLineFrom(m_stderrBuf, line, addNewline); }
- void unreadLineFromStdout(QCString line, bool addNewline = true)
+ void unreadLineFromStdout(TQCString line, bool addNewline = true)
{ unreadLineFrom(m_stdoutBuf, line, addNewline); }
/**
* Set exit string. If a line of program output matches this,
* @ref #waitForChild() will terminate the program and return.
*/
- void setExitString(QCString exit) { m_Exit = exit; }
+ void setExitString(TQCString exit) { m_Exit = exit; }
/**
* Wait for the child to exit. See also @ref #setExitString.
@@ -129,18 +129,18 @@ public:
protected:
bool m_bErase, m_bTerminal;
int m_Pid, m_Fd, m_stdinout, m_err;
- QCString m_Command, m_Exit;
+ TQCString m_Command, m_Exit;
private:
int init();
int SetupTTY(int fd);
PTY *m_pPTY;
- QCString m_TTY;
- QCString m_ptyBuf, m_stderrBuf, m_stdoutBuf;
+ TQCString m_TTY;
+ TQCString m_ptyBuf, m_stderrBuf, m_stdoutBuf;
- QCString readLineFrom(int fd, QCString& inbuf, bool block);
- void unreadLineFrom(QCString inbuf, QCString line, bool addnl);
+ TQCString readLineFrom(int fd, TQCString& inbuf, bool block);
+ void unreadLineFrom(TQCString inbuf, TQCString line, bool addnl);
class PtyProcessPrivate;
PtyProcessPrivate *d;
};
diff --git a/kioslave/sftp/sftpfileattr.cpp b/kioslave/sftp/sftpfileattr.cpp
index 07aada36d..42148ac28 100644
--- a/kioslave/sftp/sftpfileattr.cpp
+++ b/kioslave/sftp/sftpfileattr.cpp
@@ -21,8 +21,8 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <qstring.h>
-#include <qdatastream.h>
+#include <tqstring.h>
+#include <tqdatastream.h>
#include <kio/global.h>
#include <kremoteencoding.h>
@@ -123,7 +123,7 @@ UDSEntry sftpFileAttr::entry() {
}
/** Use to output the file attributes to a sftp packet */
-QDataStream& operator<< (QDataStream& s, const sftpFileAttr& fa) {
+TQDataStream& operator<< (TQDataStream& s, const sftpFileAttr& fa) {
s << (Q_UINT32)fa.mFlags;
if( fa.mFlags & SSH2_FILEXFER_ATTR_SIZE )
@@ -148,7 +148,7 @@ QDataStream& operator<< (QDataStream& s, const sftpFileAttr& fa) {
/** Use to read a file attribute from a sftp packet */
-QDataStream& operator>> (QDataStream& s, sftpFileAttr& fa) {
+TQDataStream& operator>> (TQDataStream& s, sftpFileAttr& fa) {
// XXX Add some error checking in here in case
// we get a bad sftp packet.
@@ -156,7 +156,7 @@ QDataStream& operator>> (QDataStream& s, sftpFileAttr& fa) {
fa.clear();
if( fa.mDirAttrs ) {
- QCString fn;
+ TQCString fn;
s >> fn;
fn.truncate( fn.size() );
@@ -203,7 +203,7 @@ QDataStream& operator>> (QDataStream& s, sftpFileAttr& fa) {
/** Parse longname for the owner and group names. */
void sftpFileAttr::getUserGroupNames(){
// Get the name of the owner and group of the file from longname.
- QString user, group;
+ TQString user, group;
if( mLongname.isEmpty() ) {
// do not have the user name so use the user id instead
user.setNum(mUid);
@@ -214,7 +214,7 @@ void sftpFileAttr::getUserGroupNames(){
int i = 0;
int l = mLongname.length();
- QString longName = mEncoding->decode( mLongname );
+ TQString longName = mEncoding->decode( mLongname );
kdDebug(7120) << "Decoded: " << longName << endl;
@@ -285,10 +285,10 @@ void sftpFileAttr::clear(){
clearFileSize();
clearPermissions();
clearExtensions();
- mFilename = QString::null;
- mGroupName = QString::null;
- mUserName = QString::null;
- mLinkDestination = QString::null;
+ mFilename = TQString::null;
+ mGroupName = TQString::null;
+ mUserName = TQString::null;
+ mLinkDestination = TQString::null;
mFlags = 0;
mLongname = "\0";
mLinkType = 0;
diff --git a/kioslave/sftp/sftpfileattr.h b/kioslave/sftp/sftpfileattr.h
index 28743504b..a2a9cf87e 100644
--- a/kioslave/sftp/sftpfileattr.h
+++ b/kioslave/sftp/sftpfileattr.h
@@ -20,9 +20,9 @@
#include <sys/types.h>
-#include <qglobal.h>
-#include <qstring.h>
-#include <qdatastream.h>
+#include <tqglobal.h>
+#include <tqstring.h>
+#include <tqdatastream.h>
#include <kio/global.h>
#include <kdebug.h>
@@ -39,7 +39,7 @@ class sftpFileAttr {
private: // Private attributes
/** Name of file. */
- QString mFilename;
+ TQString mFilename;
/** Specifies which fields of the file attribute are available. */
Q_UINT32 mFlags;
@@ -69,13 +69,13 @@ private: // Private attributes
/** Longname of the file as found in a SSH_FXP_NAME sftp packet.
These contents are parse to return the file's owner name and
gr oup name. */
- QCString mLongname;
+ TQCString mLongname;
- QString mUserName;
- QString mGroupName;
+ TQString mUserName;
+ TQString mGroupName;
/** If file is a link, contains the destination of the link */
- QString mLinkDestination;
+ TQString mLinkDestination;
/** If resource is a link, contains the type the link,e.g. file,dir... */
mode_t mLinkType;
@@ -195,17 +195,17 @@ public:
unsigned int flags() const { return mFlags; }
/** Sets file's longname. See sftpFileAttr::longname. */
- void setLongname(QString l) { mLongname = l.latin1(); }
+ void setLongname(TQString l) { mLongname = l.latin1(); }
/** Returns a string describing the file attributes. The format is specific
to the implementation of the sftp server. In most cases (ie OpenSSH)
this is similar to the long output of 'ls'. */
- QString longname() const { return mLongname; }
+ TQString longname() const { return mLongname; }
- void setLinkDestination(const QString& target)
+ void setLinkDestination(const TQString& target)
{ mLinkDestination = target; }
- QString linkDestination()
+ TQString linkDestination()
{ return mLinkDestination; }
/** Sets the actual type a symbolic link points to. */
@@ -214,10 +214,10 @@ public:
mode_t linkType() const { return mLinkType; }
/** No descriptions */
- void setFilename(const QString& fn)
+ void setFilename(const TQString& fn)
{ mFilename = fn; }
- QString filename() const
+ TQString filename() const
{ return mFilename; }
/** Returns a UDSEntry describing the file.
@@ -228,7 +228,7 @@ public:
This will only write the sftp ATTR structure to the stream.
It will never write the filename and longname because the client
never sends those to the server. */
- friend QDataStream& operator<< (QDataStream&, const sftpFileAttr&);
+ friend TQDataStream& operator<< (TQDataStream&, const sftpFileAttr&);
/** Use to read a file attribute from a sftp packet.
Read this carefully! If the DirAttrs flag is true, this will
@@ -237,7 +237,7 @@ public:
If the DirAttrs flag is false, this will only read file attributes
from the stream.
BY DEFAULT, A NEW INSTANCE HAS DirAttrs == false */
- friend QDataStream& operator>> (QDataStream&, sftpFileAttr&);
+ friend TQDataStream& operator>> (TQDataStream&, sftpFileAttr&);
/** Parse longname for the owner and group names. */
void getUserGroupNames();
diff --git a/kioslave/smb/kio_smb.cpp b/kioslave/smb/kio_smb.cpp
index 05db789ee..fd86ebadb 100644
--- a/kioslave/smb/kio_smb.cpp
+++ b/kioslave/smb/kio_smb.cpp
@@ -32,7 +32,7 @@
#include "kio_smb_internal.h"
//===========================================================================
-SMBSlave::SMBSlave(const QCString& pool, const QCString& app)
+SMBSlave::SMBSlave(const TQCString& pool, const TQCString& app)
: SlaveBase( "smb", pool, app )
{
m_initialized_smbc = false;
diff --git a/kioslave/smb/kio_smb.h b/kioslave/smb/kio_smb.h
index a04d7b3fa..da40bda13 100644
--- a/kioslave/smb/kio_smb.h
+++ b/kioslave/smb/kio_smb.h
@@ -39,11 +39,11 @@
//-------------
// QT includes
//-------------
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
-#include <qstrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
+#include <tqstrlist.h>
//--------------
// KDE includes
@@ -68,7 +68,7 @@
#include <stdio.h>
#include <errno.h>
#include <time.h>
-#include <qobject.h>
+#include <tqobject.h>
//-------------------------------
// Samba client library includes
@@ -92,7 +92,7 @@ class KProcess;
//===========================================================================
-class SMBSlave : public QObject, public KIO::SlaveBase
+class SMBSlave : public TQObject, public KIO::SlaveBase
{
Q_OBJECT
@@ -105,10 +105,10 @@ private:
/**
* From Controlcenter
*/
- QString m_default_user;
-// QString m_default_workgroup; //currently unused, Alex <neundorf@kde.org>
- QString m_default_password;
- QString m_default_encoding;
+ TQString m_default_user;
+// TQString m_default_workgroup; //currently unused, Alex <neundorf@kde.org>
+ TQString m_default_password;
+ TQString m_default_encoding;
/**
* we store the current url, it's needed for
@@ -234,7 +234,7 @@ public:
//-----------------------------------------------------------------------
// Functions overwritten in kio_smb.cpp
- SMBSlave(const QCString& pool, const QCString& app);
+ SMBSlave(const TQCString& pool, const TQCString& app);
virtual ~SMBSlave();
// Functions overwritten in kio_smb_browse.cpp
@@ -255,18 +255,18 @@ public:
virtual void put( const KURL& kurl, int permissions, bool overwrite, bool resume );
// Functions not implemented (yet)
- //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();
//virtual void slave_status();
- virtual void special( const QByteArray & );
+ virtual void special( const TQByteArray & );
private slots:
void readOutput(KProcess *proc, char *buffer, int buflen);
void readStdErr(KProcess *proc, char *buffer, int buflen);
private:
- QString mybuf, mystderr;
+ TQString mybuf, mystderr;
};
diff --git a/kioslave/smb/kio_smb_auth.cpp b/kioslave/smb/kio_smb_auth.cpp
index 60d9ac285..d216e1e5b 100644
--- a/kioslave/smb/kio_smb_auth.cpp
+++ b/kioslave/smb/kio_smb_auth.cpp
@@ -33,7 +33,7 @@
#include "kio_smb_internal.h"
#include <ksimpleconfig.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <stdlib.h>
// call for libsmbclient
@@ -67,14 +67,14 @@ void SMBSlave::auth_smbc_get_data(const char *server,const char *share,
kdDebug(KIO_SMB) << "AAAAAAAAAAAAAA auth_smbc_get_dat: set user=" << username << ", workgroup=" << workgroup
<< " server=" << server << ", share=" << share << endl;
- QString s_server = QString::fromUtf8(server);
- QString s_share = QString::fromUtf8(share);
+ TQString s_server = TQString::fromUtf8(server);
+ TQString s_share = TQString::fromUtf8(share);
workgroup[wgmaxlen - 1] = 0;
- QString s_workgroup = QString::fromUtf8(workgroup);
+ TQString s_workgroup = TQString::fromUtf8(workgroup);
username[unmaxlen - 1] = 0;
- QString s_username = QString::fromUtf8(username);
+ TQString s_username = TQString::fromUtf8(username);
password[pwmaxlen - 1] = 0;
- QString s_password = QString::fromUtf8(password);
+ TQString s_password = TQString::fromUtf8(password);
KIO::AuthInfo info;
info.url = KURL("smb:///");
@@ -93,7 +93,7 @@ void SMBSlave::auth_smbc_get_data(const char *server,const char *share,
{
// ok, we do not know the password. Let's try anonymous before we try for real
info.username = "anonymous";
- info.password = QString::null;
+ info.password = TQString::null;
}
else
{
@@ -117,7 +117,7 @@ bool SMBSlave::checkPassword(SMBUrl &url)
info.url = KURL("smb:///");
info.url.setHost(url.host());
- QString share = url.path();
+ TQString share = url.path();
int index = share.find('/', 1);
if (index > 1)
share = share.left(index);
diff --git a/kioslave/smb/kio_smb_browse.cpp b/kioslave/smb/kio_smb_browse.cpp
index de6bf4ed2..e9a216fd3 100644
--- a/kioslave/smb/kio_smb_browse.cpp
+++ b/kioslave/smb/kio_smb_browse.cpp
@@ -34,7 +34,7 @@
#include <pwd.h>
#include <grp.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <kglobal.h>
@@ -83,7 +83,7 @@ bool SMBSlave::browse_stat_path(const SMBUrl& _url, UDSEntry& udsentry, bool ign
if ( user )
udsatom.m_str = user->pw_name;
else
- udsatom.m_str = QString::number( uid );
+ udsatom.m_str = TQString::number( uid );
udsentry.append(udsatom);
udsatom.m_uds = KIO::UDS_GROUP;
@@ -92,7 +92,7 @@ bool SMBSlave::browse_stat_path(const SMBUrl& _url, UDSEntry& udsentry, bool ign
if ( grp )
udsatom.m_str = grp->gr_name;
else
- udsatom.m_str = QString::number( gid );
+ udsatom.m_str = TQString::number( gid );
udsentry.append(udsatom);
udsatom.m_uds = KIO::UDS_ACCESS;
@@ -194,7 +194,7 @@ void SMBSlave::stat( const KURL& kurl )
KURL SMBSlave::checkURL(const KURL& kurl) const
{
kdDebug(KIO_SMB) << "checkURL " << kurl << endl;
- QString surl = kurl.url();
+ TQString surl = kurl.url();
if (surl.startsWith("smb:/")) {
if (surl.length() == 5) // just the above
return kurl; // unchanged
@@ -211,7 +211,7 @@ KURL SMBSlave::checkURL(const KURL& kurl) const
if (surl.contains('@') && !surl.contains("smb://")) {
KURL url(kurl);
url.setPath("/"+kurl.url().right( kurl.url().length()-kurl.url().find('@') -1));
- QString userinfo = kurl.url().mid(5, kurl.url().find('@')-5);
+ TQString userinfo = kurl.url().mid(5, kurl.url().find('@')-5);
if(userinfo.contains(':')) {
url.setUser(userinfo.left(userinfo.find(':')));
url.setPass(userinfo.right(userinfo.length()-userinfo.find(':')-1));
@@ -305,7 +305,7 @@ void SMBSlave::reportError(const SMBUrl &url)
"if they ask for it)") );
break;
default:
- error( ERR_INTERNAL, i18n("Unknown error condition in stat: %1").arg(QString::fromLocal8Bit( strerror(errno))) );
+ error( ERR_INTERNAL, i18n("Unknown error condition in stat: %1").arg(TQString::fromLocal8Bit( strerror(errno))) );
}
}
@@ -343,10 +343,10 @@ void SMBSlave::listDir( const KURL& kurl )
// Set name
atom.m_uds = KIO::UDS_NAME;
- QString dirpName = QString::fromUtf8( dirp->name );
+ TQString dirpName = TQString::fromUtf8( dirp->name );
// We cannot trust dirp->commentlen has it might be with or without the NUL character
// See KDE bug #111430 and Samba bug #3030
- QString comment = QString::fromUtf8( dirp->comment );
+ TQString comment = TQString::fromUtf8( dirp->comment );
if ( dirp->smbc_type == SMBC_SERVER || dirp->smbc_type == SMBC_WORKGROUP ) {
atom.m_str = dirpName.lower();
atom.m_str.at( 0 ) = dirpName.at( 0 ).upper();
@@ -398,18 +398,18 @@ void SMBSlave::listDir( const KURL& kurl )
if (dirp->smbc_type == SMBC_SERVER) {
atom.m_uds = KIO::UDS_URL;
- // QString workgroup = m_current_url.host().upper();
+ // TQString workgroup = m_current_url.host().upper();
KURL u("smb:/");
u.setHost(dirpName);
atom.m_str = u.url();
// when libsmbclient knows
- // atom.m_str = QString("smb://%1?WORKGROUP=%2").arg(dirpName).arg(workgroup.upper());
+ // atom.m_str = TQString("smb://%1?WORKGROUP=%2").arg(dirpName).arg(workgroup.upper());
kdDebug(KIO_SMB) << "list item " << atom.m_str << endl;
udsentry.append(atom);
atom.m_uds = KIO::UDS_MIME_TYPE;
- atom.m_str = QString::fromLatin1("application/x-smb-server");
+ atom.m_str = TQString::fromLatin1("application/x-smb-server");
udsentry.append(atom);
}
@@ -429,11 +429,11 @@ void SMBSlave::listDir( const KURL& kurl )
udsentry.append(atom);
atom.m_uds = KIO::UDS_MIME_TYPE;
- atom.m_str = QString::fromLatin1("application/x-smb-workgroup");
+ atom.m_str = TQString::fromLatin1("application/x-smb-workgroup");
udsentry.append(atom);
atom.m_uds = KIO::UDS_URL;
- // QString workgroup = m_current_url.host().upper();
+ // TQString workgroup = m_current_url.host().upper();
KURL u("smb:/");
u.setHost(dirpName);
atom.m_str = u.url();
diff --git a/kioslave/smb/kio_smb_config.cpp b/kioslave/smb/kio_smb_config.cpp
index c772f8b94..101ba160d 100644
--- a/kioslave/smb/kio_smb_config.cpp
+++ b/kioslave/smb/kio_smb_config.cpp
@@ -33,7 +33,7 @@
#include "kio_smb_internal.h"
#include <kconfig.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
//===========================================================================
void SMBSlave::reparseConfiguration()
{
@@ -43,23 +43,23 @@ void SMBSlave::reparseConfiguration()
// m_default_workgroup=cfg->readEntry("Workgroup");
// m_showHiddenShares=cfg->readBoolEntry("ShowHiddenShares",false);
- QString m_encoding = QTextCodec::codecForLocale()->name();
+ TQString m_encoding = TQTextCodec::codecForLocale()->name();
m_default_encoding = cfg->readEntry( "Encoding", m_encoding.lower() );
// unscramble, taken from Nicola Brodu's smb ioslave
//not really secure, but better than storing the plain password
- QString scrambled = cfg->readEntry( "Password" );
+ TQString scrambled = cfg->readEntry( "Password" );
m_default_password = "";
for (uint i=0; i<scrambled.length()/3; i++)
{
- QChar qc1 = scrambled[i*3];
- QChar qc2 = scrambled[i*3+1];
- QChar qc3 = scrambled[i*3+2];
+ TQChar qc1 = scrambled[i*3];
+ TQChar qc2 = scrambled[i*3+1];
+ TQChar qc3 = scrambled[i*3+2];
unsigned int a1 = qc1.latin1() - '0';
unsigned int a2 = qc2.latin1() - 'A';
unsigned int a3 = qc3.latin1() - '0';
unsigned int num = ((a1 & 0x3F) << 10) | ((a2& 0x1F) << 5) | (a3 & 0x1F);
- m_default_password[i] = QChar((uchar)((num - 17) ^ 173)); // restore
+ m_default_password[i] = TQChar((uchar)((num - 17) ^ 173)); // restore
}
delete cfg;
diff --git a/kioslave/smb/kio_smb_file.cpp b/kioslave/smb/kio_smb_file.cpp
index 67fe0d213..8c7867722 100644
--- a/kioslave/smb/kio_smb_file.cpp
+++ b/kioslave/smb/kio_smb_file.cpp
@@ -45,7 +45,7 @@ void SMBSlave::get( const KURL& kurl )
time_t lasttime = 0;
time_t starttime = 0;
KIO::filesize_t totalbytesread = 0;
- QByteArray filedata;
+ TQByteArray filedata;
SMBUrl url;
kdDebug(KIO_SMB) << "SMBSlave::get on " << kurl << endl;
@@ -132,7 +132,7 @@ void SMBSlave::get( const KURL& kurl )
}
smbc_close(filefd);
- data( QByteArray() );
+ data( TQByteArray() );
processedSize(static_cast<KIO::filesize_t>(st.st_size));
}
@@ -161,7 +161,7 @@ void SMBSlave::put( const KURL& kurl,
int filefd;
bool exists;
mode_t mode;
- QByteArray filedata;
+ TQByteArray filedata;
kdDebug(KIO_SMB) << "SMBSlave::put on " << kurl << endl;
diff --git a/kioslave/smb/kio_smb_internal.cpp b/kioslave/smb/kio_smb_internal.cpp
index 27cdfb8d3..3660e3e8a 100644
--- a/kioslave/smb/kio_smb_internal.cpp
+++ b/kioslave/smb/kio_smb_internal.cpp
@@ -31,7 +31,7 @@
#include "kio_smb.h"
#include "kio_smb_internal.h"
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <kconfig.h>
#include <kglobal.h>
@@ -57,14 +57,14 @@ SMBUrl::SMBUrl(const KURL& kurl)
//-----------------------------------------------------------------------
-void SMBUrl::addPath(const QString &filedir)
+void SMBUrl::addPath(const TQString &filedir)
{
KURL::addPath(filedir);
updateCache();
}
//-----------------------------------------------------------------------
-bool SMBUrl::cd(const QString &filedir)
+bool SMBUrl::cd(const TQString &filedir)
{
if (!KURL::cd(filedir))
return false;
@@ -83,7 +83,7 @@ void SMBUrl::updateCache()
if (KURL::url() == "smb:/")
m_surl = "smb://";
else {
- QString surl = "smb://";
+ TQString surl = "smb://";
if (KURL::hasUser()) {
surl += KURL::encode_string(KURL::user(), 106);
if (KURL::hasPass()) {
diff --git a/kioslave/smb/kio_smb_internal.h b/kioslave/smb/kio_smb_internal.h
index aabfc7ab7..b6da04e58 100644
--- a/kioslave/smb/kio_smb_internal.h
+++ b/kioslave/smb/kio_smb_internal.h
@@ -65,9 +65,9 @@ public:
* Appends the specified file and dir to this SMBUrl
* "smb://server/share" --> "smb://server/share/filedir"
*/
- void addPath(const QString &filedir);
+ void addPath(const TQString &filedir);
- bool cd(const QString &dir);
+ bool cd(const TQString &dir);
/**
* Returns the type of this SMBUrl:
@@ -78,33 +78,33 @@ public:
*/
SMBUrlType getType() const;
- void setPass( const QString& _txt ) { KURL::setPass(_txt); updateCache(); }
- void setUser( const QString& _txt ) { KURL::setUser(_txt); updateCache(); }
- void setHost( const QString& _txt ) { KURL::setHost(_txt); updateCache(); }
+ void setPass( const TQString& _txt ) { KURL::setPass(_txt); updateCache(); }
+ void setUser( const TQString& _txt ) { KURL::setUser(_txt); updateCache(); }
+ void setHost( const TQString& _txt ) { KURL::setHost(_txt); updateCache(); }
/**
* Returns the workgroup if it given in url
*/
-// QString getWorkgroup() const;
+// TQString getWorkgroup() const;
/**
* Returns path after workgroup
*/
-// QString getServerShareDir() const;
+// TQString getServerShareDir() const;
/**
* Return a URL that is suitable for libsmbclient
*/
- QCString toSmbcUrl() const { return m_surl; }
+ TQCString toSmbcUrl() const { return m_surl; }
private:
/**
- * Change from QString to QCString (MS Windows's character encoding)
+ * Change from TQString to TQCString (MS Windows's character encoding)
*/
- QCString fromUnicode( const QString &_str ) const;
+ TQCString fromUnicode( const TQString &_str ) const;
void updateCache();
- QCString m_surl;
+ TQCString m_surl;
/**
* Type of URL
diff --git a/kioslave/smb/kio_smb_mount.cpp b/kioslave/smb/kio_smb_mount.cpp
index 08d62ed39..f9c366235 100644
--- a/kioslave/smb/kio_smb_mount.cpp
+++ b/kioslave/smb/kio_smb_mount.cpp
@@ -20,26 +20,26 @@
#include "kio_smb.h"
#include <kstandarddirs.h>
-#include <qcstring.h>
+#include <tqcstring.h>
#include <unistd.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kprocess.h>
void SMBSlave::readOutput(KProcess *, char *buffer, int buflen)
{
- mybuf += QString::fromLocal8Bit(buffer, buflen);
+ mybuf += TQString::fromLocal8Bit(buffer, buflen);
}
void SMBSlave::readStdErr(KProcess *, char *buffer, int buflen)
{
- mystderr += QString::fromLocal8Bit(buffer, buflen);
+ mystderr += TQString::fromLocal8Bit(buffer, buflen);
}
-void SMBSlave::special( const QByteArray & data)
+void SMBSlave::special( const TQByteArray & data)
{
kdDebug(KIO_SMB)<<"Smb::special()"<<endl;
int tmp;
- QDataStream stream(data, IO_ReadOnly);
+ TQDataStream stream(data, IO_ReadOnly);
stream >> tmp;
//mounting and umounting are both blocking, "guarded" by a SIGALARM in the future
switch (tmp)
@@ -47,11 +47,11 @@ void SMBSlave::special( const QByteArray & data)
case 1:
case 3:
{
- QString remotePath, mountPoint, user;
+ TQString remotePath, mountPoint, user;
stream >> remotePath >> mountPoint;
- QStringList sl=QStringList::split("/",remotePath);
- QString share,host;
+ TQStringList sl=TQStringList::split("/",remotePath);
+ TQString share,host;
if (sl.count()>=2)
{
host=(*sl.at(0)).mid(2);
@@ -89,7 +89,7 @@ void SMBSlave::special( const QByteArray & data)
proc.setUseShell(true); // to have the path to smbmnt (which is used by smbmount); see man smbmount
proc << "smbmount";
- QString options;
+ TQString options;
if ( smburl.user().isEmpty() )
{
@@ -113,11 +113,11 @@ void SMBSlave::special( const QByteArray & data)
proc << KProcess::quote(mountPoint.local8Bit());
proc << options;
- connect(&proc, SIGNAL( receivedStdout(KProcess *, char *, int )),
- SLOT(readOutput(KProcess *, char *, int)));
+ connect(&proc, TQT_SIGNAL( receivedStdout(KProcess *, char *, int )),
+ TQT_SLOT(readOutput(KProcess *, char *, int)));
- connect(&proc, SIGNAL( receivedStderr(KProcess *, char *, int )),
- SLOT(readStdErr(KProcess *, char *, int)));
+ connect(&proc, TQT_SIGNAL( receivedStderr(KProcess *, char *, int )),
+ TQT_SLOT(readStdErr(KProcess *, char *, int)));
if (!proc.start( KProcess::Block, KProcess::AllOutput ))
{
@@ -143,7 +143,7 @@ void SMBSlave::special( const QByteArray & data)
case 2:
case 4:
{
- QString mountPoint;
+ TQString mountPoint;
stream >> mountPoint;
KProcess proc;
@@ -154,11 +154,11 @@ void SMBSlave::special( const QByteArray & data)
mybuf.truncate(0);
mystderr.truncate(0);
- connect(&proc, SIGNAL( receivedStdout(KProcess *, char *, int )),
- SLOT(readOutput(KProcess *, char *, int)));
+ connect(&proc, TQT_SIGNAL( receivedStdout(KProcess *, char *, int )),
+ TQT_SLOT(readOutput(KProcess *, char *, int)));
- connect(&proc, SIGNAL( receivedStderr(KProcess *, char *, int )),
- SLOT(readStdErr(KProcess *, char *, int)));
+ connect(&proc, TQT_SIGNAL( receivedStderr(KProcess *, char *, int )),
+ TQT_SLOT(readStdErr(KProcess *, char *, int)));
if ( !proc.start( KProcess::Block, KProcess::AllOutput ) )
{
@@ -182,12 +182,12 @@ void SMBSlave::special( const QByteArray & data)
{
bool ok;
- QDir dir(mountPoint);
+ TQDir dir(mountPoint);
dir.cdUp();
ok = dir.rmdir(mountPoint);
if ( ok )
{
- QString p=dir.path();
+ TQString p=dir.path();
dir.cdUp();
ok = dir.rmdir(p);
}
diff --git a/kioslave/smtp/capabilities.cc b/kioslave/smtp/capabilities.cc
index a26626ce1..5b2856837 100644
--- a/kioslave/smtp/capabilities.cc
+++ b/kioslave/smtp/capabilities.cc
@@ -35,7 +35,7 @@
#include "response.h"
-#include <qstrlist.h>
+#include <tqstrlist.h>
namespace KioSMTP {
@@ -56,24 +56,24 @@ namespace KioSMTP {
return c;
}
- void Capabilities::add( const QString & cap, bool replace ) {
- QStringList tokens = QStringList::split( ' ', cap.upper() );
+ void Capabilities::add( const TQString & cap, bool replace ) {
+ TQStringList tokens = TQStringList::split( ' ', cap.upper() );
if ( tokens.empty() )
return;
- QString name = tokens.front(); tokens.pop_front();
+ TQString name = tokens.front(); tokens.pop_front();
add( name, tokens, replace );
}
- void Capabilities::add( const QString & name, const QStringList & args, bool replace ) {
+ void Capabilities::add( const TQString & name, const TQStringList & args, bool replace ) {
if ( replace )
mCapabilities[name] = args;
else
mCapabilities[name] += args;
}
- QString Capabilities::asMetaDataString() const {
- QString result;
- for ( QMap<QString,QStringList>::const_iterator it = mCapabilities.begin() ; it != mCapabilities.end() ; ++it ) {
+ TQString Capabilities::asMetaDataString() const {
+ TQString result;
+ for ( TQMap<TQString,TQStringList>::const_iterator it = mCapabilities.begin() ; it != mCapabilities.end() ; ++it ) {
result += it.key();
if ( !it.data().empty() )
result += ' ' + it.data().join( " " );
@@ -82,24 +82,24 @@ namespace KioSMTP {
return result;
}
- QString Capabilities::authMethodMetaData() const {
- QStringList sl = saslMethodsQSL();
- QString result;
- for ( QStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it )
+ TQString Capabilities::authMethodMetaData() const {
+ TQStringList sl = saslMethodsQSL();
+ TQString result;
+ for ( TQStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it )
result += "SASL/" + *it + '\n';
return result;
}
- QStrIList Capabilities::saslMethods() const {
- QStrIList result( true ); // deep copies to be safe
- QStringList sl = saslMethodsQSL();
- for ( QStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it )
+ TQStrIList Capabilities::saslMethods() const {
+ TQStrIList result( true ); // deep copies to be safe
+ TQStringList sl = saslMethodsQSL();
+ for ( TQStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it )
result.append( (*it).latin1() );
return result;
}
- QString Capabilities::createSpecialResponse( bool tls ) const {
- QStringList result;
+ TQString Capabilities::createSpecialResponse( bool tls ) const {
+ TQStringList result;
if ( tls )
result.push_back( "STARTTLS" );
result += saslMethodsQSL();
@@ -113,16 +113,16 @@ namespace KioSMTP {
if ( ok && !size )
result.push_back( "SIZE=*" ); // any size
else if ( ok )
- result.push_back( "SIZE=" + QString::number( size ) ); // fixed max
+ result.push_back( "SIZE=" + TQString::number( size ) ); // fixed max
else
result.push_back( "SIZE" ); // indetermined
}
return result.join( " " );
}
- QStringList Capabilities::saslMethodsQSL() const {
- QStringList result;
- for ( QMap<QString,QStringList>::const_iterator it = mCapabilities.begin() ; it != mCapabilities.end() ; ++it ) {
+ TQStringList Capabilities::saslMethodsQSL() const {
+ TQStringList result;
+ for ( TQMap<TQString,TQStringList>::const_iterator it = mCapabilities.begin() ; it != mCapabilities.end() ; ++it ) {
if ( it.key() == "AUTH" )
result += it.data();
else if ( it.key().startsWith( "AUTH=" ) ) {
@@ -131,8 +131,8 @@ namespace KioSMTP {
}
}
result.sort();
- QStringList::iterator it = result.begin();
- for (QStringList::iterator ot = it++; it != result.end(); ot = it++)
+ TQStringList::iterator it = result.begin();
+ for (TQStringList::iterator ot = it++; it != result.end(); ot = it++)
if (*ot == *it) result.remove(ot);
return result;
}
diff --git a/kioslave/smtp/capabilities.h b/kioslave/smtp/capabilities.h
index 1ae5972aa..d9a9de39a 100644
--- a/kioslave/smtp/capabilities.h
+++ b/kioslave/smtp/capabilities.h
@@ -32,10 +32,10 @@
#ifndef __KIOSMTP_CAPABILITIES_H__
#define __KIOSMTP_CAPABILITIES_H__
-#include <qmap.h>
-#include <qcstring.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class QStrIList;
@@ -49,27 +49,27 @@ namespace KioSMTP {
static Capabilities fromResponse( const Response & response );
- void add( const QString & cap, bool replace=false );
- void add( const QString & name, const QStringList & args, bool replace=false );
+ void add( const TQString & cap, bool replace=false );
+ void add( const TQString & name, const TQStringList & args, bool replace=false );
void clear() { mCapabilities.clear(); }
- bool have( const QString & cap ) const {
+ bool have( const TQString & cap ) const {
return mCapabilities.find( cap.upper() ) != mCapabilities.end();
}
- bool have( const QCString & cap ) const { return have( QString( cap.data() ) ); }
- bool have( const char * cap ) const { return have( QString::fromLatin1( cap ) ); }
+ bool have( const TQCString & cap ) const { return have( TQString( cap.data() ) ); }
+ bool have( const char * cap ) const { return have( TQString::fromLatin1( cap ) ); }
- QString asMetaDataString() const;
+ TQString asMetaDataString() const;
- QString authMethodMetaData() const;
- QStrIList saslMethods() const;
+ TQString authMethodMetaData() const;
+ TQStrIList saslMethods() const;
- QString createSpecialResponse( bool tls ) const;
+ TQString createSpecialResponse( bool tls ) const;
- QStringList saslMethodsQSL() const;
+ TQStringList saslMethodsQSL() const;
private:
- QMap<QString,QStringList> mCapabilities;
+ TQMap<TQString,TQStringList> mCapabilities;
};
} // namespace KioSMTP
diff --git a/kioslave/smtp/command.cc b/kioslave/smtp/command.cc
index 9fb7281c9..2771baf82 100644
--- a/kioslave/smtp/command.cc
+++ b/kioslave/smtp/command.cc
@@ -79,7 +79,7 @@ static sasl_callback_t callbacks[] = {
return r.isOk();
}
- void Command::ungetCommandLine( const QCString &, TransactionState * ) {
+ void Command::ungetCommandLine( const TQCString &, TransactionState * ) {
mComplete = false;
}
@@ -122,7 +122,7 @@ static sasl_callback_t callbacks[] = {
// EHLO / HELO
//
- QCString EHLOCommand::nextCommandLine( TransactionState * ) {
+ TQCString EHLOCommand::nextCommandLine( TransactionState * ) {
mNeedResponse = true;
mComplete = mEHLONotSupported;
const char * cmd = mEHLONotSupported ? "HELO " : "EHLO " ;
@@ -159,7 +159,7 @@ static sasl_callback_t callbacks[] = {
// STARTTLS - rfc 3207
//
- QCString StartTLSCommand::nextCommandLine( TransactionState * ) {
+ TQCString StartTLSCommand::nextCommandLine( TransactionState * ) {
mComplete = true;
mNeedResponse = true;
return "STARTTLS\r\n";
@@ -195,14 +195,14 @@ static sasl_callback_t callbacks[] = {
#define SASLERROR mSMTP->error(KIO::ERR_COULD_NOT_AUTHENTICATE, \
i18n("An error occured during authentication: %1").arg \
- ( QString::fromUtf8( sasl_errdetail( conn ) )));
+ ( TQString::fromUtf8( sasl_errdetail( conn ) )));
//
// AUTH - rfc 2554
//
AuthCommand::AuthCommand( SMTPProtocol * smtp,
const char *mechanisms,
- const QString &aFQDN,
+ const TQString &aFQDN,
KIO::AuthInfo &ai )
: Command( smtp, CloseConnectionOnError|OnlyLastInPipeline ),
mAi( &ai ),
@@ -306,29 +306,29 @@ static sasl_callback_t callbacks[] = {
return !mMechusing;
}
- void AuthCommand::ungetCommandLine( const QCString & s, TransactionState * ) {
+ void AuthCommand::ungetCommandLine( const TQCString & s, TransactionState * ) {
mUngetSASLResponse = s;
mComplete = false;
}
- QCString AuthCommand::nextCommandLine( TransactionState * ) {
+ TQCString AuthCommand::nextCommandLine( TransactionState * ) {
mNeedResponse = true;
- QCString cmd;
+ TQCString cmd;
#ifdef HAVE_LIBSASL2
- QByteArray tmp, challenge;
+ TQByteArray tmp, challenge;
if ( !mUngetSASLResponse.isNull() ) {
// implement un-ungetCommandLine
cmd = mUngetSASLResponse;
mUngetSASLResponse = 0;
} else if ( mFirstTime ) {
- QString firstCommand = "AUTH " + QString::fromLatin1( mMechusing );
+ TQString firstCommand = "AUTH " + TQString::fromLatin1( mMechusing );
tmp.setRawData( mOut, mOutlen );
KCodecs::base64Encode( tmp, challenge );
tmp.resetRawData( mOut, mOutlen );
if ( !challenge.isEmpty() ) {
firstCommand += " ";
- firstCommand += QString::fromLatin1( challenge.data(), challenge.size() );
+ firstCommand += TQString::fromLatin1( challenge.data(), challenge.size() );
}
cmd = firstCommand.latin1();
@@ -394,14 +394,14 @@ static sasl_callback_t callbacks[] = {
// MAIL FROM:
//
- QCString MailFromCommand::nextCommandLine( TransactionState * ) {
+ TQCString MailFromCommand::nextCommandLine( TransactionState * ) {
mComplete = true;
mNeedResponse = true;
- QCString cmdLine = "MAIL FROM:<" + mAddr + '>';
+ TQCString cmdLine = "MAIL FROM:<" + mAddr + '>';
if ( m8Bit && haveCapability("8BITMIME") )
cmdLine += " BODY=8BITMIME";
if ( mSize && haveCapability("SIZE") )
- cmdLine += " SIZE=" + QCString().setNum( mSize );
+ cmdLine += " SIZE=" + TQCString().setNum( mSize );
return cmdLine + "\r\n";
}
@@ -420,7 +420,7 @@ static sasl_callback_t callbacks[] = {
// RCPT TO:
//
- QCString RcptToCommand::nextCommandLine( TransactionState * ) {
+ TQCString RcptToCommand::nextCommandLine( TransactionState * ) {
mComplete = true;
mNeedResponse = true;
return "RCPT TO:<" + mAddr + ">\r\n";
@@ -443,7 +443,7 @@ static sasl_callback_t callbacks[] = {
// DATA (only initial processing!)
//
- QCString DataCommand::nextCommandLine( TransactionState * ts ) {
+ TQCString DataCommand::nextCommandLine( TransactionState * ts ) {
assert( ts );
mComplete = true;
mNeedResponse = true;
@@ -451,7 +451,7 @@ static sasl_callback_t callbacks[] = {
return "DATA\r\n";
}
- void DataCommand::ungetCommandLine( const QCString &, TransactionState * ts ) {
+ void DataCommand::ungetCommandLine( const TQCString &, TransactionState * ts ) {
assert( ts );
mComplete = false;
ts->setDataCommandIssued( false );
@@ -473,7 +473,7 @@ static sasl_callback_t callbacks[] = {
//
// DATA (data transfer)
//
- void TransferCommand::ungetCommandLine( const QCString & cmd, TransactionState * ) {
+ void TransferCommand::ungetCommandLine( const TQCString & cmd, TransactionState * ) {
if ( cmd.isEmpty() )
return; // don't change state when we can't detect the unget in
// the next nextCommandLine !!
@@ -488,16 +488,16 @@ static sasl_callback_t callbacks[] = {
return ts->failed();
}
- QCString TransferCommand::nextCommandLine( TransactionState * ts ) {
+ TQCString TransferCommand::nextCommandLine( TransactionState * ts ) {
assert( ts ); // let's rely on it ( at least for the moment )
assert( !isComplete() );
assert( !ts->failed() );
- static const QCString dotCRLF = ".\r\n";
- static const QCString CRLFdotCRLF = "\r\n.\r\n";
+ static const TQCString dotCRLF = ".\r\n";
+ static const TQCString CRLFdotCRLF = "\r\n.\r\n";
if ( !mUngetBuffer.isEmpty() ) {
- const QCString ret = mUngetBuffer;
+ const TQCString ret = mUngetBuffer;
mUngetBuffer = 0;
if ( mWasComplete ) {
mComplete = true;
@@ -510,7 +510,7 @@ static sasl_callback_t callbacks[] = {
kdDebug(7112) << "requesting data" << endl;
mSMTP->dataReq();
- QByteArray ba;
+ TQByteArray ba;
int result = mSMTP->readData( ba );
kdDebug(7112) << "got " << result << " bytes" << endl;
if ( result > 0 )
@@ -541,8 +541,8 @@ static sasl_callback_t callbacks[] = {
return true;
}
- static QCString dotstuff_lf2crlf( const QByteArray & ba, char & last ) {
- QCString result( ba.size() * 2 + 1 ); // worst case: repeated "[.]\n"
+ static TQCString dotstuff_lf2crlf( const TQByteArray & ba, char & last ) {
+ TQCString result( ba.size() * 2 + 1 ); // worst case: repeated "[.]\n"
const char * s = ba.data();
const char * const send = ba.data() + ba.size();
char * d = result.data();
@@ -560,7 +560,7 @@ static sasl_callback_t callbacks[] = {
return result;
}
- QCString TransferCommand::prepare( const QByteArray & ba ) {
+ TQCString TransferCommand::prepare( const TQByteArray & ba ) {
if ( ba.isEmpty() )
return 0;
if ( mSMTP->metaData("lf2crlf+dotstuff") == "slave" ) {
@@ -568,7 +568,7 @@ static sasl_callback_t callbacks[] = {
return dotstuff_lf2crlf( ba, mLastChar );
} else {
mLastChar = ba[ ba.size() - 1 ];
- return QCString( ba.data(), ba.size() + 1 );
+ return TQCString( ba.data(), ba.size() + 1 );
}
}
@@ -576,7 +576,7 @@ static sasl_callback_t callbacks[] = {
// NOOP
//
- QCString NoopCommand::nextCommandLine( TransactionState * ) {
+ TQCString NoopCommand::nextCommandLine( TransactionState * ) {
mComplete = true;
mNeedResponse = true;
return "NOOP\r\n";
@@ -586,7 +586,7 @@ static sasl_callback_t callbacks[] = {
// RSET
//
- QCString RsetCommand::nextCommandLine( TransactionState * ) {
+ TQCString RsetCommand::nextCommandLine( TransactionState * ) {
mComplete = true;
mNeedResponse = true;
return "RSET\r\n";
@@ -596,7 +596,7 @@ static sasl_callback_t callbacks[] = {
// QUIT
//
- QCString QuitCommand::nextCommandLine( TransactionState * ) {
+ TQCString QuitCommand::nextCommandLine( TransactionState * ) {
mComplete = true;
mNeedResponse = true;
return "QUIT\r\n";
diff --git a/kioslave/smtp/command.h b/kioslave/smtp/command.h
index e67f02556..bd6b6aa85 100644
--- a/kioslave/smtp/command.h
+++ b/kioslave/smtp/command.h
@@ -33,8 +33,8 @@
#define __KIOSMTP_COMMAND_H__
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#ifdef HAVE_LIBSASL2
extern "C" {
@@ -101,11 +101,11 @@ namespace KioSMTP {
static Command * createSimpleCommand( int which, SMTPProtocol * smtp );
- virtual QCString nextCommandLine( TransactionState * ts=0 ) = 0;
+ virtual TQCString nextCommandLine( TransactionState * ts=0 ) = 0;
/* Reimplement this if your @ref #nextCommandLine() implementation
changes state other than @ref mComplete. The default
implementation just resets @ref mComplete to false. */
- virtual void ungetCommandLine( const QCString & cmdLine, TransactionState * ts=0 );
+ virtual void ungetCommandLine( const TQCString & cmdLine, TransactionState * ts=0 );
/* Reimplement this if your command need more sophisicated
response processing than just checking for @ref
Response::isOk(). The default implementation sets @ref
@@ -152,16 +152,16 @@ namespace KioSMTP {
class EHLOCommand : public Command {
public:
- EHLOCommand( SMTPProtocol * smtp, const QString & hostname )
+ EHLOCommand( SMTPProtocol * smtp, const TQString & hostname )
: Command( smtp, CloseConnectionOnError|OnlyLastInPipeline ),
mEHLONotSupported( false ),
mHostname( hostname.stripWhiteSpace() ) {}
- QCString nextCommandLine( TransactionState * );
+ TQCString nextCommandLine( TransactionState * );
bool processResponse( const Response & response, TransactionState * );
private:
bool mEHLONotSupported;
- QString mHostname;
+ TQString mHostname;
};
class StartTLSCommand : public Command {
@@ -169,18 +169,18 @@ namespace KioSMTP {
StartTLSCommand( SMTPProtocol * smtp )
: Command( smtp, CloseConnectionOnError|OnlyLastInPipeline ) {}
- QCString nextCommandLine( TransactionState * );
+ TQCString nextCommandLine( TransactionState * );
bool processResponse( const Response & response, TransactionState * );
};
class AuthCommand : public Command {
public:
AuthCommand( SMTPProtocol * smtp, const char *mechanisms,
- const QString &aFQDN, KIO::AuthInfo &ai );
+ const TQString &aFQDN, KIO::AuthInfo &ai );
~AuthCommand();
bool doNotExecute( const TransactionState * ts ) const;
- QCString nextCommandLine( TransactionState * );
- void ungetCommandLine( const QCString & cmdLine, TransactionState * );
+ TQCString nextCommandLine( TransactionState * );
+ void ungetCommandLine( const TQCString & cmdLine, TransactionState * );
bool processResponse( const Response & response, TransactionState * );
private:
bool saslInteract( void *in );
@@ -194,34 +194,34 @@ namespace KioSMTP {
bool mOneStep;
KIO::AuthInfo *mAi;
- QCString mLastChallenge;
- QCString mUngetSASLResponse;
+ TQCString mLastChallenge;
+ TQCString mUngetSASLResponse;
bool mFirstTime;
};
class MailFromCommand : public Command {
public:
- MailFromCommand( SMTPProtocol * smtp, const QCString & addr,
+ MailFromCommand( SMTPProtocol * smtp, const TQCString & addr,
bool eightBit=false, unsigned int size=0 )
: Command( smtp ), mAddr( addr ), m8Bit( eightBit ), mSize( size ) {}
- QCString nextCommandLine( TransactionState * );
+ TQCString nextCommandLine( TransactionState * );
bool processResponse( const Response & response, TransactionState * );
private:
- QCString mAddr;
+ TQCString mAddr;
bool m8Bit;
unsigned int mSize;
};
class RcptToCommand : public Command {
public:
- RcptToCommand( SMTPProtocol * smtp, const QCString & addr )
+ RcptToCommand( SMTPProtocol * smtp, const TQCString & addr )
: Command( smtp ), mAddr( addr ) {}
- QCString nextCommandLine( TransactionState * );
+ TQCString nextCommandLine( TransactionState * );
bool processResponse( const Response & response, TransactionState * );
private:
- QCString mAddr;
+ TQCString mAddr;
};
/** Handles only the initial intermediate response and compltetes at
@@ -231,25 +231,25 @@ namespace KioSMTP {
DataCommand( SMTPProtocol * smtp )
: Command( smtp, OnlyLastInPipeline ) {}
- QCString nextCommandLine( TransactionState * );
- void ungetCommandLine( const QCString & cmd, TransactionState * ts );
+ TQCString nextCommandLine( TransactionState * );
+ void ungetCommandLine( const TQCString & cmd, TransactionState * ts );
bool processResponse( const Response & response, TransactionState * );
};
/** Handles the data transfer following a successful DATA command */
class TransferCommand : public Command {
public:
- TransferCommand( SMTPProtocol * smtp, const QCString & initialBuffer )
+ TransferCommand( SMTPProtocol * smtp, const TQCString & initialBuffer )
: Command( smtp, OnlyFirstInPipeline ),
mUngetBuffer( initialBuffer ), mLastChar( '\n' ), mWasComplete( false ) {}
bool doNotExecute( const TransactionState * ts ) const;
- QCString nextCommandLine( TransactionState * );
- void ungetCommandLine( const QCString & cmd, TransactionState * ts );
+ TQCString nextCommandLine( TransactionState * );
+ void ungetCommandLine( const TQCString & cmd, TransactionState * ts );
bool processResponse( const Response & response, TransactionState * );
private:
- QCString prepare( const QByteArray & ba );
- QCString mUngetBuffer;
+ TQCString prepare( const TQByteArray & ba );
+ TQCString mUngetBuffer;
char mLastChar;
bool mWasComplete; // ... before ungetting
};
@@ -259,7 +259,7 @@ namespace KioSMTP {
NoopCommand( SMTPProtocol * smtp )
: Command( smtp, OnlyLastInPipeline ) {}
- QCString nextCommandLine( TransactionState * );
+ TQCString nextCommandLine( TransactionState * );
};
class RsetCommand : public Command {
@@ -267,7 +267,7 @@ namespace KioSMTP {
RsetCommand( SMTPProtocol * smtp )
: Command( smtp, CloseConnectionOnError ) {}
- QCString nextCommandLine( TransactionState * );
+ TQCString nextCommandLine( TransactionState * );
};
class QuitCommand : public Command {
@@ -275,7 +275,7 @@ namespace KioSMTP {
QuitCommand( SMTPProtocol * smtp )
: Command( smtp, CloseConnectionOnError|OnlyLastInPipeline ) {}
- QCString nextCommandLine( TransactionState * );
+ TQCString nextCommandLine( TransactionState * );
};
} // namespace KioSMTP
diff --git a/kioslave/smtp/interactivesmtpserver.cc b/kioslave/smtp/interactivesmtpserver.cc
index 4deddd3ca..50cd6f036 100644
--- a/kioslave/smtp/interactivesmtpserver.cc
+++ b/kioslave/smtp/interactivesmtpserver.cc
@@ -33,30 +33,30 @@
#include <config.h>
-#include <qserversocket.h>
-#include <qsocket.h>
-#include <qwidget.h>
-#include <qapplication.h>
-#include <qhostaddress.h>
-#include <qtextedit.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qstring.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqserversocket.h>
+#include <tqsocket.h>
+#include <tqwidget.h>
+#include <tqapplication.h>
+#include <tqhostaddress.h>
+#include <tqtextedit.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqstring.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <cassert>
#include "interactivesmtpserver.h"
-static const QHostAddress localhost( 0x7f000001 ); // 127.0.0.1
+static const TQHostAddress localhost( 0x7f000001 ); // 127.0.0.1
InteractiveSMTPServerWindow::~InteractiveSMTPServerWindow() {
if ( mSocket ) {
mSocket->close();
- if ( mSocket->state() == QSocket::Closing )
- connect( mSocket, SIGNAL(delayedCloseFinished()),
- mSocket, SLOT(deleteLater()) );
+ if ( mSocket->state() == TQSocket::Closing )
+ connect( mSocket, TQT_SIGNAL(delayedCloseFinished()),
+ mSocket, TQT_SLOT(deleteLater()) );
else
mSocket->deleteLater();
mSocket = 0;
@@ -65,20 +65,20 @@ InteractiveSMTPServerWindow::~InteractiveSMTPServerWindow() {
void InteractiveSMTPServerWindow::slotSendResponse()
{
- const QString line = mLineEdit->text();
+ const TQString line = mLineEdit->text();
mLineEdit->clear();
- QTextStream s( mSocket );
+ TQTextStream s( mSocket );
s << line + "\r\n";
slotDisplayServer( line );
}
-InteractiveSMTPServer::InteractiveSMTPServer( QObject* parent )
- : QServerSocket( localhost, 2525, 1, parent )
+InteractiveSMTPServer::InteractiveSMTPServer( TQObject* parent )
+ : TQServerSocket( localhost, 2525, 1, parent )
{
}
int main( int argc, char * argv[] ) {
- QApplication app( argc, argv );
+ TQApplication app( argc, argv );
InteractiveSMTPServer server;
@@ -88,37 +88,37 @@ int main( int argc, char * argv[] ) {
};
-InteractiveSMTPServerWindow::InteractiveSMTPServerWindow( QSocket * socket, QWidget * parent, const char * name, WFlags f )
- : QWidget( parent, name, f ), mSocket( socket )
+InteractiveSMTPServerWindow::InteractiveSMTPServerWindow( TQSocket * socket, TQWidget * parent, const char * name, WFlags f )
+ : TQWidget( parent, name, f ), mSocket( socket )
{
- QPushButton * but;
+ TQPushButton * but;
assert( socket );
- QVBoxLayout * vlay = new QVBoxLayout( this, 6 );
+ TQVBoxLayout * vlay = new TQVBoxLayout( this, 6 );
- mTextEdit = new QTextEdit( this );
- mTextEdit->setTextFormat( QTextEdit::LogText );
+ mTextEdit = new TQTextEdit( this );
+ mTextEdit->setTextFormat( TQTextEdit::LogText );
vlay->addWidget( mTextEdit, 1 );
- QHBoxLayout * hlay = new QHBoxLayout( vlay );
+ TQHBoxLayout * hlay = new TQHBoxLayout( vlay );
- mLineEdit = new QLineEdit( this );
- but = new QPushButton( "&Send", this );
- hlay->addWidget( new QLabel( mLineEdit, "&Response:", this ) );
+ mLineEdit = new TQLineEdit( this );
+ but = new TQPushButton( "&Send", this );
+ hlay->addWidget( new TQLabel( mLineEdit, "&Response:", this ) );
hlay->addWidget( mLineEdit, 1 );
hlay->addWidget( but );
- connect( mLineEdit, SIGNAL(returnPressed()), SLOT(slotSendResponse()) );
- connect( but, SIGNAL(clicked()), SLOT(slotSendResponse()) );
+ connect( mLineEdit, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotSendResponse()) );
+ connect( but, TQT_SIGNAL(clicked()), TQT_SLOT(slotSendResponse()) );
- but = new QPushButton( "&Close Connection", this );
+ but = new TQPushButton( "&Close Connection", this );
vlay->addWidget( but );
- connect( but, SIGNAL(clicked()), SLOT(slotConnectionClosed()) );
+ connect( but, TQT_SIGNAL(clicked()), TQT_SLOT(slotConnectionClosed()) );
- connect( socket, SIGNAL(connectionClosed()), SLOT(slotConnectionClosed()) );
- connect( socket, SIGNAL(error(int)), SLOT(slotError(int)) );
- connect( socket, SIGNAL(readyRead()), SLOT(slotReadyRead()) );
+ connect( socket, TQT_SIGNAL(connectionClosed()), TQT_SLOT(slotConnectionClosed()) );
+ connect( socket, TQT_SIGNAL(error(int)), TQT_SLOT(slotError(int)) );
+ connect( socket, TQT_SIGNAL(readyRead()), TQT_SLOT(slotReadyRead()) );
mLineEdit->setText( "220 hi there" );
mLineEdit->setFocus();
diff --git a/kioslave/smtp/interactivesmtpserver.h b/kioslave/smtp/interactivesmtpserver.h
index 3ae210a74..39a07f6a9 100644
--- a/kioslave/smtp/interactivesmtpserver.h
+++ b/kioslave/smtp/interactivesmtpserver.h
@@ -34,20 +34,20 @@
your version.
*/
-#include <qwidget.h>
+#include <tqwidget.h>
-static QString err2str( int err ) {
+static TQString err2str( int err ) {
switch ( err ) {
- case QSocket::ErrConnectionRefused: return "Connection refused";
- case QSocket::ErrHostNotFound: return "Host not found";
- case QSocket::ErrSocketRead: return "Failed to read from socket";
+ case TQSocket::ErrConnectionRefused: return "Connection refused";
+ case TQSocket::ErrHostNotFound: return "Host not found";
+ case TQSocket::ErrSocketRead: return "Failed to read from socket";
default: return "Unknown error";
}
}
-static QString escape( QString s ) {
+static TQString escape( TQString s ) {
return s
.replace( '&', "&amp;" )
.replace( '>', "&gt;" )
@@ -57,7 +57,7 @@ static QString escape( QString s ) {
}
-static QString trim( const QString & s ) {
+static TQString trim( const TQString & s ) {
if ( s.endsWith( "\r\n" ) )
return s.left( s.length() - 2 );
if ( s.endsWith( "\r" ) || s.endsWith( "\n" ) )
@@ -66,21 +66,21 @@ static QString trim( const QString & s ) {
}
-class InteractiveSMTPServerWindow : public QWidget {
+class InteractiveSMTPServerWindow : public TQWidget {
Q_OBJECT
public:
- InteractiveSMTPServerWindow( QSocket * socket, QWidget * parent=0, const char * name=0, WFlags f=0 );
+ InteractiveSMTPServerWindow( TQSocket * socket, TQWidget * parent=0, const char * name=0, WFlags f=0 );
~InteractiveSMTPServerWindow();
public slots:
void slotSendResponse();
- void slotDisplayClient( const QString & s ) {
+ void slotDisplayClient( const TQString & s ) {
mTextEdit->append( "C:" + escape(s) );
}
- void slotDisplayServer( const QString & s ) {
+ void slotDisplayServer( const TQString & s ) {
mTextEdit->append( "S:" + escape(s) );
}
- void slotDisplayMeta( const QString & s ) {
+ void slotDisplayMeta( const TQString & s ) {
mTextEdit->append( "<font color=\"red\">" + escape(s) + "</font>" );
}
void slotReadyRead() {
@@ -88,7 +88,7 @@ public slots:
slotDisplayClient( trim( mSocket->readLine() ) );
}
void slotError( int err ) {
- slotDisplayMeta( QString( "E: %1 (%2)" ).arg( err2str( err ) ).arg( err ) );
+ slotDisplayMeta( TQString( "E: %1 (%2)" ).arg( err2str( err ) ).arg( err ) );
}
void slotConnectionClosed() {
slotDisplayMeta( "Connection closed by peer" );
@@ -97,20 +97,20 @@ public slots:
mSocket->close();
}
private:
- QSocket * mSocket;
- QTextEdit * mTextEdit;
- QLineEdit * mLineEdit;
+ TQSocket * mSocket;
+ TQTextEdit * mTextEdit;
+ TQLineEdit * mLineEdit;
};
-class InteractiveSMTPServer : public QServerSocket {
+class InteractiveSMTPServer : public TQServerSocket {
Q_OBJECT
public:
- InteractiveSMTPServer( QObject * parent=0 );
+ InteractiveSMTPServer( TQObject * parent=0 );
~InteractiveSMTPServer() {}
/*! \reimp */
void newConnection( int fd ) {
- QSocket * socket = new QSocket();
+ TQSocket * socket = new TQSocket();
socket->setSocket( fd );
InteractiveSMTPServerWindow * w = new InteractiveSMTPServerWindow( socket );
w->show();
diff --git a/kioslave/smtp/request.cc b/kioslave/smtp/request.cc
index 566d2c758..ab02abc1c 100644
--- a/kioslave/smtp/request.cc
+++ b/kioslave/smtp/request.cc
@@ -45,17 +45,17 @@ namespace KioSMTP {
Request Request::fromURL( const KURL & url ) {
Request request;
- const QStringList query = QStringList::split( '&', url.query().mid(1) );
+ const TQStringList query = TQStringList::split( '&', url.query().mid(1) );
#ifndef NDEBUG
kdDebug(7112) << "Parsing request from query:\n" + query.join("\n" ) << endl;
#endif
- for ( QStringList::const_iterator it = query.begin() ; it != query.end() ; ++it ) {
+ for ( TQStringList::const_iterator it = query.begin() ; it != query.end() ; ++it ) {
int equalsPos = (*it).find( '=' );
if ( equalsPos <= 0 )
continue;
- const QString key = (*it).left( equalsPos ).lower();
- const QString value = KURL::decode_string( (*it).mid( equalsPos + 1 ) );
+ const TQString key = (*it).left( equalsPos ).lower();
+ const TQString value = KURL::decode_string( (*it).mid( equalsPos + 1 ) );
if ( key == "to" )
request.addTo( value );
@@ -87,11 +87,11 @@ namespace KioSMTP {
return request;
}
- QCString Request::heloHostnameCString() const {
+ TQCString Request::heloHostnameCString() const {
return KIDNA::toAsciiCString( heloHostname() );
}
- static bool isUsAscii( const QString & s ) {
+ static bool isUsAscii( const TQString & s ) {
for ( uint i = 0 ; i < s.length() ; ++i )
if ( s[i].unicode() > 127 ) return false;
return true;
@@ -100,7 +100,7 @@ namespace KioSMTP {
static inline bool isSpecial( char ch ) {
- static const QCString specials = "()<>[]:;@\\,.\"";
+ static const TQCString specials = "()<>[]:;@\\,.\"";
return specials.find( ch ) >= 0;
}
@@ -112,17 +112,17 @@ namespace KioSMTP {
- static inline QCString rfc2047Encode( const QString & s ) {
- QCString r = KCodecs::base64Encode( s.stripWhiteSpace().utf8(), false );
+ static inline TQCString rfc2047Encode( const TQString & s ) {
+ TQCString r = KCodecs::base64Encode( s.stripWhiteSpace().utf8(), false );
return "=?utf-8?b?" + r + "?=" ; // use base64 since that always gives a valid encoded-word
}
- static QCString quote( const QString & s ) {
+ static TQCString quote( const TQString & s ) {
assert( isUsAscii( s ) );
- QCString r( s.length() * 2 );
+ TQCString r( s.length() * 2 );
bool needsQuotes = false;
unsigned int j = 0;
@@ -145,19 +145,19 @@ namespace KioSMTP {
- static QCString formatFromAddress( const QString & fromRealName, const QString & fromAddress ) {
+ static TQCString formatFromAddress( const TQString & fromRealName, const TQString & fromAddress ) {
if ( fromRealName.isEmpty() )
return fromAddress.latin1(); // no real name: return "joe@user.org"
// return "Joe User <joe@user.org>", "\"User, Joe\" <joe@user.org>"
// or "=?utf-8?q?Joe_User?= <joe@user.org>", depending on real name's nature.
- QCString r = isUsAscii( fromRealName ) ? quote( fromRealName ) : rfc2047Encode( fromRealName );
+ TQCString r = isUsAscii( fromRealName ) ? quote( fromRealName ) : rfc2047Encode( fromRealName );
return r + " <" + fromAddress.latin1() + '>';
}
- static QCString formatSubject( QString s ) {
+ static TQCString formatSubject( TQString s ) {
if ( isUsAscii( s ) )
return s.remove( '\n' ).latin1(); // don't break header folding,
// so remove any line break
@@ -168,21 +168,21 @@ namespace KioSMTP {
- QCString Request::headerFields( const QString & fromRealName ) const {
+ TQCString Request::headerFields( const TQString & fromRealName ) const {
if ( !emitHeaders() )
return 0;
assert( hasFromAddress() ); // should have been checked for by
// caller (MAIL FROM comes before DATA)
- QCString result = "From: " + formatFromAddress( fromRealName, fromAddress() ) + "\r\n";
+ TQCString result = "From: " + formatFromAddress( fromRealName, fromAddress() ) + "\r\n";
if ( !subject().isEmpty() )
result += "Subject: " + formatSubject( subject() ) + "\r\n";
if ( !to().empty() )
- result += QCString( "To: " ) + to().join( ",\r\n\t" /* line folding */ ).latin1() + "\r\n";
+ result += TQCString( "To: " ) + to().join( ",\r\n\t" /* line folding */ ).latin1() + "\r\n";
if ( !cc().empty() )
- result += QCString( "Cc: " ) + cc().join( ",\r\n\t" /* line folding */ ).latin1() + "\r\n";
+ result += TQCString( "Cc: " ) + cc().join( ",\r\n\t" /* line folding */ ).latin1() + "\r\n";
return result;
}
diff --git a/kioslave/smtp/request.h b/kioslave/smtp/request.h
index 15bbd76b9..e1b3acda8 100644
--- a/kioslave/smtp/request.h
+++ b/kioslave/smtp/request.h
@@ -32,8 +32,8 @@
#ifndef __KIOSMTP_REQUEST_H__
#define __KIOSMTP_REQUEST_H__
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class KURL;
@@ -47,30 +47,30 @@ namespace KioSMTP {
static Request fromURL( const KURL & url );
- QString profileName() const { return mProfileName; }
- void setProfileName( const QString & profileName ) { mProfileName = profileName; }
+ TQString profileName() const { return mProfileName; }
+ void setProfileName( const TQString & profileName ) { mProfileName = profileName; }
bool hasProfile() const { return !profileName().isNull(); }
- QString subject() const { return mSubject; }
- void setSubject( const QString & subject ) { mSubject = subject; }
+ TQString subject() const { return mSubject; }
+ void setSubject( const TQString & subject ) { mSubject = subject; }
- QString fromAddress() const { return mFromAddress; }
- void setFromAddress( const QString & fromAddress ) { mFromAddress = fromAddress; }
+ TQString fromAddress() const { return mFromAddress; }
+ void setFromAddress( const TQString & fromAddress ) { mFromAddress = fromAddress; }
bool hasFromAddress() const { return !mFromAddress.isEmpty(); }
- QStringList recipients() const { return to() + cc() + bcc() ; }
+ TQStringList recipients() const { return to() + cc() + bcc() ; }
bool hasRecipients() const { return !to().empty() || !cc().empty() || !bcc().empty() ; }
- QStringList to() const { return mTo; }
- QStringList cc() const { return mCc; }
- QStringList bcc() const { return mBcc; }
- void addTo( const QString & to ) { mTo.push_back( to ); }
- void addCc( const QString & cc ) { mCc.push_back( cc ); }
- void addBcc( const QString & bcc ) { mBcc.push_back( bcc ); }
+ TQStringList to() const { return mTo; }
+ TQStringList cc() const { return mCc; }
+ TQStringList bcc() const { return mBcc; }
+ void addTo( const TQString & to ) { mTo.push_back( to ); }
+ void addCc( const TQString & cc ) { mCc.push_back( cc ); }
+ void addBcc( const TQString & bcc ) { mBcc.push_back( bcc ); }
- QString heloHostname() const { return mHeloHostname; }
- QCString heloHostnameCString() const;
- void setHeloHostname( const QString & hostname ) { mHeloHostname = hostname; }
+ TQString heloHostname() const { return mHeloHostname; }
+ TQCString heloHostnameCString() const;
+ void setHeloHostname( const TQString & hostname ) { mHeloHostname = hostname; }
bool emitHeaders() const { return mEmitHeaders; }
void setEmitHeaders( bool emitHeaders ) { mEmitHeaders = emitHeaders; }
@@ -85,11 +85,11 @@ namespace KioSMTP {
serialization of the header fields "To", "Cc", "Subject" and
"From", as determined by the respective settings. If @ref
#emitHeaders() is false, returns a null string. */
- QCString headerFields( const QString & fromRealName=QString::null ) const;
+ TQCString headerFields( const TQString & fromRealName=TQString::null ) const;
private:
- QStringList mTo, mCc, mBcc;
- QString mProfileName, mSubject, mFromAddress, mHeloHostname;
+ TQStringList mTo, mCc, mBcc;
+ TQString mProfileName, mSubject, mFromAddress, mHeloHostname;
bool mEmitHeaders;
bool m8Bit;
unsigned int mSize;
diff --git a/kioslave/smtp/response.cc b/kioslave/smtp/response.cc
index b1745865a..ec5067871 100644
--- a/kioslave/smtp/response.cc
+++ b/kioslave/smtp/response.cc
@@ -36,7 +36,7 @@
#include <klocale.h>
#include <kio/global.h>
-#include <qstring.h>
+#include <tqstring.h>
namespace KioSMTP {
@@ -59,7 +59,7 @@ namespace KioSMTP {
}
bool ok = false;
- unsigned int code = QCString( line, 3+1 ).toUInt( &ok );
+ unsigned int code = TQCString( line, 3+1 ).toUInt( &ok );
if ( !ok || code < 100 || code > 559 ) {
// not a number or number out of range
mValid = false;
@@ -85,22 +85,22 @@ namespace KioSMTP {
return;
}
- mLines.push_back( len > 4 ? QCString( line+4, len-4+1 ).stripWhiteSpace() : QCString() );
+ mLines.push_back( len > 4 ? TQCString( line+4, len-4+1 ).stripWhiteSpace() : TQCString() );
}
// hackishly fixing QCStringList flaws...
- static QCString join( char sep, const QCStringList & list ) {
+ static TQCString join( char sep, const QCStringList & list ) {
if ( list.empty() )
- return QCString();
- QCString result = list.front();
+ return TQCString();
+ TQCString result = list.front();
for ( QCStringList::const_iterator it = ++list.begin() ; it != list.end() ; ++it )
result += sep + *it;
return result;
}
- QString Response::errorMessage() const {
- QString msg;
+ TQString Response::errorMessage() const {
+ TQString msg;
if ( lines().count() > 1 )
msg = i18n("The server responded:\n%1")
.arg( join( '\n', lines() ) );
diff --git a/kioslave/smtp/response.h b/kioslave/smtp/response.h
index 22835690a..1e5f722ab 100644
--- a/kioslave/smtp/response.h
+++ b/kioslave/smtp/response.h
@@ -32,9 +32,9 @@
#ifndef __KIOSMTP_RESPONSE_H__
#define __KIOSMTP_RESPONSE_H__
-#include <qcstring.h>
-#include <qvaluelist.h>
-typedef QValueList<QCString> QCStringList;
+#include <tqcstring.h>
+#include <tqvaluelist.h>
+typedef TQValueList<TQCString> QCStringList;
class QString;
@@ -55,7 +55,7 @@ namespace KioSMTP {
/** Return an internationalized error message according to the
response's code. */
- QString errorMessage() const;
+ TQString errorMessage() const;
/** Translate the SMTP error code into a KIO one */
int errorCode() const;
diff --git a/kioslave/smtp/smtp.cc b/kioslave/smtp/smtp.cc
index dc621f533..e493f5132 100644
--- a/kioslave/smtp/smtp.cc
+++ b/kioslave/smtp/smtp.cc
@@ -61,9 +61,9 @@ using KioSMTP::TransactionState;
#include <kio/slaveinterface.h>
#include <klocale.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
#include <memory>
using std::auto_ptr;
@@ -117,7 +117,7 @@ int kdemain(int argc, char **argv)
return 0;
}
-SMTPProtocol::SMTPProtocol(const QCString & pool, const QCString & app,
+SMTPProtocol::SMTPProtocol(const TQCString & pool, const TQCString & app,
bool useSSL)
: TCPSlaveBase(useSSL ? 465 : 25,
useSSL ? "smtps" : "smtp",
@@ -157,8 +157,8 @@ void SMTPProtocol::closeConnection() {
smtp_close();
}
-void SMTPProtocol::special( const QByteArray & aData ) {
- QDataStream s( aData, IO_ReadOnly );
+void SMTPProtocol::special( const TQByteArray & aData ) {
+ TQDataStream s( aData, IO_ReadOnly );
int what;
s >> what;
if ( what == 'c' ) {
@@ -208,9 +208,9 @@ void SMTPProtocol::put(const KURL & url, int /*permissions */ ,
m_sPass = mset.getSetting(KEMailSettings::OutServerPass);
if (m_sUser.isEmpty())
- m_sUser = QString::null;
+ m_sUser = TQString::null;
if (m_sPass.isEmpty())
- m_sPass = QString::null;
+ m_sPass = TQString::null;
open_url.setUser(m_sUser);
open_url.setPass(m_sPass);
m_sServer = open_url.host();
@@ -229,7 +229,7 @@ void SMTPProtocol::put(const KURL & url, int /*permissions */ ,
// and then format accordingly (either: emailaddress@host.com or
// Real Name <emailaddress@host.com>)
if ( !request.hasFromAddress() ) {
- const QString from = mset.getSetting( KEMailSettings::EmailAddress );
+ const TQString from = mset.getSetting( KEMailSettings::EmailAddress );
if ( !from.isNull() )
request.setFromAddress( from );
else if ( request.emitHeaders() ) {
@@ -259,8 +259,8 @@ void SMTPProtocol::put(const KURL & url, int /*permissions */ ,
// Loop through our To and CC recipients, and send the proper
// SMTP commands, for the benefit of the server.
- QStringList recipients = request.recipients();
- for ( QStringList::const_iterator it = recipients.begin() ; it != recipients.end() ; ++it )
+ TQStringList recipients = request.recipients();
+ for ( TQStringList::const_iterator it = recipients.begin() ; it != recipients.end() ; ++it )
queueCommand( new RcptToCommand( this, (*it).latin1() ) );
queueCommand( Command::DATA );
@@ -275,8 +275,8 @@ void SMTPProtocol::put(const KURL & url, int /*permissions */ ,
}
-void SMTPProtocol::setHost(const QString & host, int port,
- const QString & user, const QString & pass)
+void SMTPProtocol::setHost(const TQString & host, int port,
+ const TQString & user, const TQString & pass)
{
m_sServer = host;
m_iPort = port;
@@ -284,7 +284,7 @@ void SMTPProtocol::setHost(const QString & host, int port,
m_sPass = pass;
}
-bool SMTPProtocol::sendCommandLine( const QCString & cmdline ) {
+bool SMTPProtocol::sendCommandLine( const TQCString & cmdline ) {
//kdDebug( cmdline.length() < 4096, 7112) << "C: " << cmdline.data();
//kdDebug( cmdline.length() >= 4096, 7112) << "C: <" << cmdline.length() << " bytes>" << endl;
kdDebug( 7112) << "C: <" << cmdline.length() << " bytes>" << endl;
@@ -319,7 +319,7 @@ Response SMTPProtocol::getResponse( bool * ok ) {
return response;
}
- kdDebug(7112) << "S: " << QCString( buf, recv_len + 1 ).data();
+ kdDebug(7112) << "S: " << TQCString( buf, recv_len + 1 ).data();
// ...and parse lines...
response.parseLine( buf, recv_len );
@@ -344,7 +344,7 @@ bool SMTPProtocol::executeQueuedCommands( TransactionState * ts ) {
kdDebug( canPipelineCommands(), 7112 ) << "using pipelining" << endl;
while( !mPendingCommandQueue.isEmpty() ) {
- QCString cmdline = collectPipelineCommands( ts );
+ TQCString cmdline = collectPipelineCommands( ts );
if ( ts->failedFatally() ) {
smtp_close( false ); // _hard_ shutdown
return false;
@@ -369,10 +369,10 @@ bool SMTPProtocol::executeQueuedCommands( TransactionState * ts ) {
return true;
}
-QCString SMTPProtocol::collectPipelineCommands( TransactionState * ts ) {
+TQCString SMTPProtocol::collectPipelineCommands( TransactionState * ts ) {
assert( ts );
- QCString cmdLine;
+ TQCString cmdLine;
unsigned int cmdLine_len = 0;
while ( mPendingCommandQueue.head() ) {
@@ -394,7 +394,7 @@ QCString SMTPProtocol::collectPipelineCommands( TransactionState * ts ) {
break;
while ( !cmd->isComplete() && !cmd->needsResponse() ) {
- const QCString currentCmdLine = cmd->nextCommandLine( ts );
+ const TQCString currentCmdLine = cmd->nextCommandLine( ts );
if ( ts->failedFatally() )
return cmdLine;
const unsigned int currentCmdLine_len = currentCmdLine.length();
@@ -464,7 +464,7 @@ bool SMTPProtocol::execute( Command * cmd, TransactionState * ts )
do {
while ( !cmd->isComplete() && !cmd->needsResponse() ) {
- const QCString cmdLine = cmd->nextCommandLine( ts );
+ const TQCString cmdLine = cmd->nextCommandLine( ts );
if ( ts && ts->failedFatally() ) {
smtp_close( false );
return false;
@@ -495,7 +495,7 @@ bool SMTPProtocol::execute( Command * cmd, TransactionState * ts )
return true;
}
-bool SMTPProtocol::smtp_open(const QString& fakeHostname)
+bool SMTPProtocol::smtp_open(const TQString& fakeHostname)
{
if (m_opened &&
m_iOldPort == port(m_iPort) &&
@@ -527,7 +527,7 @@ bool SMTPProtocol::smtp_open(const QString& fakeHostname)
}
else
{
- QString tmpPort;
+ TQString tmpPort;
KSocketAddress* addr = KExtendedSocket::localAddress(m_iSock);
// perform name lookup. NI_NAMEREQD means: don't return a numeric
// value (we need to know when we get have the IP address, so we
@@ -592,7 +592,7 @@ bool SMTPProtocol::authenticate()
authInfo.password = m_sPass;
authInfo.prompt = i18n("Username and password for your SMTP account:");
- QStringList strList;
+ TQStringList strList;
if (!metaData("sasl").isEmpty())
strList.append(metaData("sasl").latin1());
@@ -609,7 +609,7 @@ bool SMTPProtocol::authenticate()
void SMTPProtocol::parseFeatures( const Response & ehloResponse ) {
mCapabilities = Capabilities::fromResponse( ehloResponse );
- QString category = usingTLS() ? "TLS" : usingSSL() ? "SSL" : "PLAIN" ;
+ TQString category = usingTLS() ? "TLS" : usingSSL() ? "SSL" : "PLAIN" ;
setMetaData( category + " AUTH METHODS", mCapabilities.authMethodMetaData() );
setMetaData( category + " CAPABILITIES", mCapabilities.asMetaDataString() );
#ifndef NDEBUG
@@ -628,9 +628,9 @@ void SMTPProtocol::smtp_close( bool nice ) {
execute( Command::QUIT );
kdDebug( 7112 ) << "closing connection" << endl;
closeDescriptor();
- m_sOldServer = QString::null;
- m_sOldUser = QString::null;
- m_sOldPass = QString::null;
+ m_sOldServer = TQString::null;
+ m_sOldUser = TQString::null;
+ m_sOldPass = TQString::null;
mCapabilities.clear();
mPendingCommandQueue.clear();
@@ -641,7 +641,7 @@ void SMTPProtocol::smtp_close( bool nice ) {
void SMTPProtocol::stat(const KURL & url)
{
- QString path = url.path();
+ TQString path = url.path();
error(KIO::ERR_DOES_NOT_EXIST, url.path());
}
diff --git a/kioslave/smtp/smtp.h b/kioslave/smtp/smtp.h
index 571375bd4..435fea8b1 100644
--- a/kioslave/smtp/smtp.h
+++ b/kioslave/smtp/smtp.h
@@ -33,13 +33,13 @@
#include "capabilities.h"
-#include <qstring.h>
-#include <qptrqueue.h>
+#include <tqstring.h>
+#include <tqptrqueue.h>
class KURL;
class QCString;
template <typename T> class QMemArray;
-typedef QMemArray<char> QByteArray;
+typedef TQMemArray<char> QByteArray;
namespace KioSMTP {
class Response;
@@ -50,13 +50,13 @@ namespace KioSMTP {
class SMTPProtocol : public KIO::TCPSlaveBase {
friend class KioSMTP::Command;
public:
- SMTPProtocol(const QCString & pool, const QCString & app, bool useSSL);
+ SMTPProtocol(const TQCString & pool, const TQCString & app, bool useSSL);
virtual ~ SMTPProtocol();
- 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 special(const QByteArray & aData);
+ virtual void special(const TQByteArray & aData);
virtual void put(const KURL & url, int permissions, bool overwrite,
bool resume);
virtual void stat(const KURL & url);
@@ -65,7 +65,7 @@ public:
protected:
- bool smtp_open(const QString& fakeHostname = QString::null);
+ bool smtp_open(const TQString& fakeHostname = TQString::null);
/** Closes the connection. If @p nice is true (default), then QUIT
is sent and it's reponse waited for. */
@@ -100,8 +100,8 @@ protected:
bool authenticate();
void parseFeatures( const KioSMTP::Response & ehloResponse );
- bool sendCommandLine( const QCString & cmd );
- QCString collectPipelineCommands( KioSMTP::TransactionState * ts );
+ bool sendCommandLine( const TQCString & cmd );
+ TQCString collectPipelineCommands( KioSMTP::TransactionState * ts );
bool batchProcessResponses( KioSMTP::TransactionState * ts );
/** This is a pure convenience wrapper around
@@ -120,7 +120,7 @@ protected:
/** This is a pure convenience wrapper around
@ref KioSMTP::Capabilities::createSpecialResponse */
- QString createSpecialResponse() const {
+ TQString createSpecialResponse() const {
return mCapabilities.createSpecialResponse( usingTLS() || haveCapability( "STARTTLS" ) );
}
@@ -131,14 +131,14 @@ protected:
unsigned short m_iOldPort;
bool m_opened;
- QString m_sServer, m_sOldServer;
- QString m_sUser, m_sOldUser;
- QString m_sPass, m_sOldPass;
- QString m_hostname;
+ TQString m_sServer, m_sOldServer;
+ TQString m_sUser, m_sOldUser;
+ TQString m_sPass, m_sOldPass;
+ TQString m_hostname;
KioSMTP::Capabilities mCapabilities;
- typedef QPtrQueue<KioSMTP::Command> CommandQueue;
+ typedef TQPtrQueue<KioSMTP::Command> CommandQueue;
CommandQueue mPendingCommandQueue;
CommandQueue mSentCommandQueue;
};
diff --git a/kioslave/smtp/test_commands.cc b/kioslave/smtp/test_commands.cc
index a6969490f..680514b10 100644
--- a/kioslave/smtp/test_commands.cc
+++ b/kioslave/smtp/test_commands.cc
@@ -1,9 +1,9 @@
#include <kio/global.h>
#include <kdebug.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
//#include <iostream>
//using std::cout;
@@ -25,19 +25,19 @@ public:
bool usesSSL;
bool usesTLS;
int lastErrorCode;
- QString lastErrorMessage;
+ TQString lastErrorMessage;
int lastMessageBoxCode;
- QString lastMessageBoxText;
- QByteArray nextData;
+ TQString lastMessageBoxText;
+ TQByteArray nextData;
int nextDataReturnCode;
- QStringList caps;
+ TQStringList caps;
KIO::MetaData metadata;
void clear() {
startTLSReturnCode = 1;
usesSSL = usesTLS = false;
lastErrorCode = lastMessageBoxCode = 0;
- lastErrorMessage = lastMessageBoxText = QString::null;
+ lastErrorMessage = lastMessageBoxText = TQString::null;
nextData.resize( 0 );
nextDataReturnCode = -1;
caps.clear();
@@ -56,17 +56,17 @@ public:
bool usingSSL() const { return usesSSL; }
bool usingTLS() const { return usesTLS; }
bool haveCapability( const char * cap ) const { return caps.contains( cap ); }
- void error( int id, const QString & msg ) {
+ void error( int id, const TQString & msg ) {
lastErrorCode = id;
lastErrorMessage = msg;
}
- void messageBox( int id, const QString & msg, const QString & ) {
+ void messageBox( int id, const TQString & msg, const TQString & ) {
lastMessageBoxCode = id;
lastMessageBoxText = msg;
}
void dataReq() { /* noop */ }
- int readData( QByteArray & ba ) { ba = nextData; return nextDataReturnCode; }
- QString metaData( const QString & key ) const { return metadata[key]; }
+ int readData( TQByteArray & ba ) { ba = nextData; return nextDataReturnCode; }
+ TQString metaData( const TQString & key ) const { return metadata[key]; }
};
@@ -236,7 +236,7 @@ int main( int, char** ) {
//
smtp.clear();
- QStrIList mechs;
+ TQStrIList mechs;
mechs.append( "PLAIN" );
smtp.metadata["sasl"] = "PLAIN";
AuthCommand auth( &smtp, mechs, "user", "pass" );
diff --git a/kioslave/smtp/test_headergeneration.cc b/kioslave/smtp/test_headergeneration.cc
index bdf8b251f..83d999c4a 100644
--- a/kioslave/smtp/test_headergeneration.cc
+++ b/kioslave/smtp/test_headergeneration.cc
@@ -6,7 +6,7 @@
//using std::endl;
int main( int , char ** ) {
- static QCString expected =
+ static TQCString expected =
"From: mutz@kde.org\r\n"
"Subject: missing subject\r\n"
"To: joe@user.org,\r\n"
@@ -57,7 +57,7 @@ int main( int , char ** ) {
"\n";
KioSMTP::Request request;
- QCString result;
+ TQCString result;
request.setEmitHeaders( true );
request.setFromAddress( "mutz@kde.org" );
diff --git a/kioslave/smtp/test_responseparser.cc b/kioslave/smtp/test_responseparser.cc
index 5daa2fb3b..e251aa291 100644
--- a/kioslave/smtp/test_responseparser.cc
+++ b/kioslave/smtp/test_responseparser.cc
@@ -1,10 +1,10 @@
#include "response.h"
#include <assert.h>
-static const QCString singleLineResponseCRLF = "250 OK\r\n";
-static const QCString singleLineResponse = "250 OK";
+static const TQCString singleLineResponseCRLF = "250 OK\r\n";
+static const TQCString singleLineResponse = "250 OK";
-static const QCString multiLineResponse[] = {
+static const TQCString multiLineResponse[] = {
"250-ktown.kde.org\r\n",
"250-STARTTLS\r\n",
"250-AUTH PLAIN DIGEST-MD5\r\n",
diff --git a/kioslave/smtp/transactionstate.cc b/kioslave/smtp/transactionstate.cc
index 3bf3c7614..67d61486a 100644
--- a/kioslave/smtp/transactionstate.cc
+++ b/kioslave/smtp/transactionstate.cc
@@ -36,17 +36,17 @@
#include <kio/global.h>
#include <klocale.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace KioSMTP {
- void TransactionState::setFailedFatally( int code, const QString & msg ) {
+ void TransactionState::setFailedFatally( int code, const TQString & msg ) {
mFailed = mFailedFatally = true;
mErrorCode = code;
mErrorMessage = msg;
}
- void TransactionState::setMailFromFailed( const QString & addr, const Response & r ) {
+ void TransactionState::setMailFromFailed( const TQString & addr, const Response & r ) {
setFailed();
mErrorCode = KIO::ERR_NO_CONTENT;
if ( addr.isEmpty() )
@@ -86,17 +86,17 @@ namespace KioSMTP {
return KIO::ERR_INTERNAL;
}
- QString TransactionState::errorMessage() const {
+ TQString TransactionState::errorMessage() const {
if ( !failed() )
- return QString::null;
+ return TQString::null;
if ( !mErrorMessage.isEmpty() )
return mErrorMessage;
if ( haveRejectedRecipients() ) {
- QString msg = i18n("Message sending failed since the following recipients were rejected by the server:\n"
+ TQString msg = i18n("Message sending failed since the following recipients were rejected by the server:\n"
"%1");
- QStringList recip;
+ TQStringList recip;
for ( RejectedRecipientList::const_iterator it = mRejectedRecipients.begin() ;
it != mRejectedRecipients.end() ; ++it )
recip.push_back( (*it).recipient + " (" + (*it).reason + ')' );
diff --git a/kioslave/smtp/transactionstate.h b/kioslave/smtp/transactionstate.h
index 96376718e..d2f9ef797 100644
--- a/kioslave/smtp/transactionstate.h
+++ b/kioslave/smtp/transactionstate.h
@@ -34,8 +34,8 @@
#include "response.h"
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
namespace KioSMTP {
@@ -63,18 +63,18 @@ namespace KioSMTP {
class TransactionState {
public:
struct RecipientRejection {
- RecipientRejection( const QString & who=QString::null,
- const QString & why=QString::null )
+ RecipientRejection( const TQString & who=TQString::null,
+ const TQString & why=TQString::null )
: recipient( who ), reason( why ) {}
- QString recipient;
- QString reason;
+ TQString recipient;
+ TQString reason;
#ifdef KIOSMTP_COMPARATORS
bool operator==( const RecipientRejection & other ) const {
return recipient == other.recipient && reason == other.reason;
}
#endif
};
- typedef QValueList<RecipientRejection> RejectedRecipientList;
+ typedef TQValueList<RecipientRejection> RejectedRecipientList;
TransactionState( bool rcptToDenyIsFailure=true )
: mErrorCode( 0 ),
@@ -96,7 +96,7 @@ namespace KioSMTP {
untidy connection shutdown is in order (ie. @ref
smtp_close(false)). Fatal failure is handled immediately */
bool failedFatally() const { return mFailedFatally; }
- void setFailedFatally( int code=0, const QString & msg=QString::null );
+ void setFailedFatally( int code=0, const TQString & msg=TQString::null );
/** @return whether the transaction was completed successfully */
bool complete() const { return mComplete; }
@@ -106,10 +106,10 @@ namespace KioSMTP {
failed, or 0 otherwise */
int errorCode() const;
/** @return an appropriate error message in case the transaction
- failed or QString::null otherwise */
- QString errorMessage() const;
+ failed or TQString::null otherwise */
+ TQString errorMessage() const;
- void setMailFromFailed( const QString & addr, const Response & r );
+ void setMailFromFailed( const TQString & addr, const Response & r );
bool dataCommandIssued() const { return mDataCommandIssued; }
void setDataCommandIssued( bool issued ) { mDataCommandIssued = issued; }
@@ -137,7 +137,7 @@ namespace KioSMTP {
return mRejectedRecipients;
}
void addRejectedRecipient( const RecipientRejection & r );
- void addRejectedRecipient( const QString & who, const QString & why ) {
+ void addRejectedRecipient( const TQString & who, const TQString & why ) {
addRejectedRecipient( RecipientRejection( who, why ) );
}
@@ -169,7 +169,7 @@ namespace KioSMTP {
private:
RejectedRecipientList mRejectedRecipients;
Response mDataResponse;
- QString mErrorMessage;
+ TQString mErrorMessage;
int mErrorCode;
bool mRcptToDenyIsFailure;
bool mAtLeastOneRecipientWasAccepted;
diff --git a/kioslave/system/kdedmodule/systemdirnotify.cpp b/kioslave/system/kdedmodule/systemdirnotify.cpp
index e0ec57992..162d96621 100644
--- a/kioslave/system/kdedmodule/systemdirnotify.cpp
+++ b/kioslave/system/kdedmodule/systemdirnotify.cpp
@@ -26,7 +26,7 @@
#include <kdirnotify_stub.h>
-#include <qdir.h>
+#include <tqdir.h>
SystemDirNotify::SystemDirNotify()
: mInited( false )
@@ -41,21 +41,21 @@ void SystemDirNotify::init()
KGlobal::dirs()->addResourceType("system_entries",
KStandardDirs::kde_default("data") + "systemview");
- QStringList names_found;
- QStringList dirList = KGlobal::dirs()->resourceDirs("system_entries");
+ TQStringList names_found;
+ TQStringList dirList = KGlobal::dirs()->resourceDirs("system_entries");
- QStringList::ConstIterator dirpath = dirList.begin();
- QStringList::ConstIterator end = dirList.end();
+ TQStringList::ConstIterator dirpath = dirList.begin();
+ TQStringList::ConstIterator end = dirList.end();
for(; dirpath!=end; ++dirpath)
{
- QDir dir = *dirpath;
+ TQDir dir = *dirpath;
if (!dir.exists()) continue;
- QStringList filenames
- = dir.entryList( QDir::Files | QDir::Readable );
+ TQStringList filenames
+ = dir.entryList( TQDir::Files | TQDir::Readable );
- QStringList::ConstIterator name = filenames.begin();
- QStringList::ConstIterator endf = filenames.end();
+ TQStringList::ConstIterator name = filenames.begin();
+ TQStringList::ConstIterator endf = filenames.end();
for(; name!=endf; ++name)
{
@@ -63,7 +63,7 @@ void SystemDirNotify::init()
{
KDesktopFile desktop(*dirpath+*name, true);
- QString system_name = *name;
+ TQString system_name = *name;
system_name.truncate(system_name.length()-8);
KURL system_url("system:/"+system_name);
@@ -90,8 +90,8 @@ KURL SystemDirNotify::toSystemURL(const KURL &url)
kdDebug() << "SystemDirNotify::toSystemURL(" << url << ")" << endl;
init();
- QMap<KURL,KURL>::const_iterator it = m_urlMap.begin();
- QMap<KURL,KURL>::const_iterator end = m_urlMap.end();
+ TQMap<KURL,KURL>::const_iterator it = m_urlMap.begin();
+ TQMap<KURL,KURL>::const_iterator end = m_urlMap.end();
for (; it!=end; ++it)
{
@@ -99,7 +99,7 @@ KURL SystemDirNotify::toSystemURL(const KURL &url)
if ( base.isParentOf(url) )
{
- QString path = KURL::relativePath(base.path(),
+ TQString path = KURL::relativePath(base.path(),
url.path());
KURL result = it.data();
result.addPath(path);
diff --git a/kioslave/system/kdedmodule/systemdirnotify.h b/kioslave/system/kdedmodule/systemdirnotify.h
index 34da65b82..b743ddb42 100644
--- a/kioslave/system/kdedmodule/systemdirnotify.h
+++ b/kioslave/system/kdedmodule/systemdirnotify.h
@@ -21,7 +21,7 @@
#include <kurl.h>
#include <kdirnotify.h>
-#include <qmap.h>
+#include <tqmap.h>
class SystemDirNotify : public KDirNotify
{
@@ -40,7 +40,7 @@ private:
KURL toSystemURL(const KURL &url);
KURL::List toSystemURLList(const KURL::List &list);
- QMap<KURL,KURL> m_urlMap;
+ TQMap<KURL,KURL> m_urlMap;
bool mInited;
};
diff --git a/kioslave/system/kdedmodule/systemdirnotifymodule.cpp b/kioslave/system/kdedmodule/systemdirnotifymodule.cpp
index 36c46fcd0..b89daf129 100644
--- a/kioslave/system/kdedmodule/systemdirnotifymodule.cpp
+++ b/kioslave/system/kdedmodule/systemdirnotifymodule.cpp
@@ -22,13 +22,13 @@
#include <klocale.h>
#include <kglobal.h>
-SystemDirNotifyModule::SystemDirNotifyModule(const QCString &obj)
+SystemDirNotifyModule::SystemDirNotifyModule(const TQCString &obj)
: KDEDModule(obj)
{
}
extern "C" {
- KDE_EXPORT KDEDModule *create_systemdirnotify(const QCString &obj)
+ KDE_EXPORT KDEDModule *create_systemdirnotify(const TQCString &obj)
{
KGlobal::locale()->insertCatalogue("kio_system");
return new SystemDirNotifyModule(obj);
diff --git a/kioslave/system/kdedmodule/systemdirnotifymodule.h b/kioslave/system/kdedmodule/systemdirnotifymodule.h
index c75cd1a9e..e979ba098 100644
--- a/kioslave/system/kdedmodule/systemdirnotifymodule.h
+++ b/kioslave/system/kdedmodule/systemdirnotifymodule.h
@@ -28,7 +28,7 @@ class SystemDirNotifyModule : public KDEDModule
K_DCOP
public:
- SystemDirNotifyModule(const QCString &obj);
+ SystemDirNotifyModule(const TQCString &obj);
private:
SystemDirNotify notifier;
};
diff --git a/kioslave/system/kio_system.cpp b/kioslave/system/kio_system.cpp
index c2683add8..1f86a90d1 100644
--- a/kioslave/system/kio_system.cpp
+++ b/kioslave/system/kio_system.cpp
@@ -25,7 +25,7 @@
#include <kcmdlineargs.h>
#include <dcopclient.h>
-#include <qeventloop.h>
+#include <tqeventloop.h>
#include "kio_system.h"
@@ -57,8 +57,8 @@ extern "C" {
}
-SystemProtocol::SystemProtocol(const QCString &protocol,
- const QCString &pool, const QCString &app)
+SystemProtocol::SystemProtocol(const TQCString &protocol,
+ const TQCString &pool, const TQCString &app)
: ForwardingSlaveBase(protocol, pool, app)
{
}
@@ -69,7 +69,7 @@ SystemProtocol::~SystemProtocol()
bool SystemProtocol::rewriteURL(const KURL &url, KURL &newUrl)
{
- QString name, path;
+ TQString name, path;
if ( !m_impl.parseURL(url, name, path) )
{
@@ -91,7 +91,7 @@ void SystemProtocol::stat(const KURL &url)
{
kdDebug() << "SystemProtocol::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
@@ -102,7 +102,7 @@ void SystemProtocol::stat(const KURL &url)
return;
}
- QString name;
+ TQString name;
bool ok = m_impl.parseURL(url, name, path);
if ( !ok )
@@ -141,7 +141,7 @@ void SystemProtocol::listDir(const KURL &url)
return;
}
- QString name, path;
+ TQString name, path;
bool ok = m_impl.parseURL(url, name, path);
if ( !ok )
diff --git a/kioslave/system/kio_system.h b/kioslave/system/kio_system.h
index 8c7c4664c..916c495e5 100644
--- a/kioslave/system/kio_system.h
+++ b/kioslave/system/kio_system.h
@@ -27,8 +27,8 @@
class SystemProtocol : public KIO::ForwardingSlaveBase
{
public:
- SystemProtocol(const QCString &protocol, const QCString &pool,
- const QCString &app);
+ SystemProtocol(const TQCString &protocol, const TQCString &pool,
+ const TQCString &app);
virtual ~SystemProtocol();
virtual bool rewriteURL(const KURL &url, KURL &newUrl);
diff --git a/kioslave/system/systemimpl.cpp b/kioslave/system/systemimpl.cpp
index 46214ce20..a53c85045 100644
--- a/kioslave/system/systemimpl.cpp
+++ b/kioslave/system/systemimpl.cpp
@@ -24,40 +24,40 @@
#include <kstandarddirs.h>
#include <kdesktopfile.h>
-#include <qapplication.h>
-#include <qeventloop.h>
-#include <qdir.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
+#include <tqdir.h>
#include <sys/stat.h>
-SystemImpl::SystemImpl() : QObject()
+SystemImpl::SystemImpl() : TQObject()
{
KGlobal::dirs()->addResourceType("system_entries",
KStandardDirs::kde_default("data") + "systemview");
}
-bool SystemImpl::listRoot(QValueList<KIO::UDSEntry> &list)
+bool SystemImpl::listRoot(TQValueList<KIO::UDSEntry> &list)
{
kdDebug() << "SystemImpl::listRoot" << endl;
- QStringList names_found;
- QStringList dirList = KGlobal::dirs()->resourceDirs("system_entries");
+ TQStringList names_found;
+ TQStringList dirList = KGlobal::dirs()->resourceDirs("system_entries");
- QStringList::ConstIterator dirpath = dirList.begin();
- QStringList::ConstIterator end = dirList.end();
+ TQStringList::ConstIterator dirpath = dirList.begin();
+ TQStringList::ConstIterator end = dirList.end();
for(; dirpath!=end; ++dirpath)
{
- QDir dir = *dirpath;
+ TQDir dir = *dirpath;
if (!dir.exists()) continue;
- QStringList filenames
- = dir.entryList( QDir::Files | QDir::Readable );
+ TQStringList filenames
+ = dir.entryList( TQDir::Files | TQDir::Readable );
KIO::UDSEntry entry;
- QStringList::ConstIterator filename = filenames.begin();
- QStringList::ConstIterator endf = filenames.end();
+ TQStringList::ConstIterator filename = filenames.begin();
+ TQStringList::ConstIterator endf = filenames.end();
for(; filename!=endf; ++filename)
{
@@ -77,9 +77,9 @@ bool SystemImpl::listRoot(QValueList<KIO::UDSEntry> &list)
return true;
}
-bool SystemImpl::parseURL(const KURL &url, QString &name, QString &path) const
+bool SystemImpl::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)
@@ -90,13 +90,13 @@ bool SystemImpl::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 SystemImpl::realURL(const QString &name, const QString &path,
+bool SystemImpl::realURL(const TQString &name, const TQString &path,
KURL &url) const
{
url = findBaseURL(name);
@@ -109,25 +109,25 @@ bool SystemImpl::realURL(const QString &name, const QString &path,
return true;
}
-bool SystemImpl::statByName(const QString &filename, KIO::UDSEntry& entry)
+bool SystemImpl::statByName(const TQString &filename, KIO::UDSEntry& entry)
{
kdDebug() << "SystemImpl::statByName" << endl;
- QStringList dirList = KGlobal::dirs()->resourceDirs("system_entries");
+ TQStringList dirList = KGlobal::dirs()->resourceDirs("system_entries");
- QStringList::ConstIterator dirpath = dirList.begin();
- QStringList::ConstIterator end = dirList.end();
+ TQStringList::ConstIterator dirpath = dirList.begin();
+ TQStringList::ConstIterator end = dirList.end();
for(; dirpath!=end; ++dirpath)
{
- QDir dir = *dirpath;
+ TQDir dir = *dirpath;
if (!dir.exists()) continue;
- QStringList filenames
- = dir.entryList( QDir::Files | QDir::Readable );
+ TQStringList filenames
+ = dir.entryList( TQDir::Files | TQDir::Readable );
- QStringList::ConstIterator name = filenames.begin();
- QStringList::ConstIterator endf = filenames.end();
+ TQStringList::ConstIterator name = filenames.begin();
+ TQStringList::ConstIterator endf = filenames.end();
for(; name!=endf; ++name)
{
@@ -142,27 +142,27 @@ bool SystemImpl::statByName(const QString &filename, KIO::UDSEntry& entry)
return false;
}
-KURL SystemImpl::findBaseURL(const QString &filename) const
+KURL SystemImpl::findBaseURL(const TQString &filename) const
{
kdDebug() << "SystemImpl::findBaseURL" << endl;
- QStringList dirList = KGlobal::dirs()->resourceDirs("system_entries");
+ TQStringList dirList = KGlobal::dirs()->resourceDirs("system_entries");
- QStringList::ConstIterator dirpath = dirList.begin();
- QStringList::ConstIterator end = dirList.end();
+ TQStringList::ConstIterator dirpath = dirList.begin();
+ TQStringList::ConstIterator end = dirList.end();
for(; dirpath!=end; ++dirpath)
{
- QDir dir = *dirpath;
+ TQDir dir = *dirpath;
if (!dir.exists()) continue;
- QStringList filenames
- = dir.entryList( QDir::Files | QDir::Readable );
+ TQStringList filenames
+ = dir.entryList( TQDir::Files | TQDir::Readable );
KIO::UDSEntry entry;
- QStringList::ConstIterator name = filenames.begin();
- QStringList::ConstIterator endf = filenames.end();
+ TQStringList::ConstIterator name = filenames.begin();
+ TQStringList::ConstIterator endf = filenames.end();
for(; name!=endf; ++name)
{
@@ -186,7 +186,7 @@ KURL SystemImpl::findBaseURL(const QString &filename) const
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;
@@ -207,8 +207,8 @@ void SystemImpl::createTopLevelEntry(KIO::UDSEntry &entry) const
}
void SystemImpl::createEntry(KIO::UDSEntry &entry,
- const QString &directory,
- const QString &file)
+ const TQString &directory,
+ const TQString &file)
{
kdDebug() << "SystemImpl::createEntry" << endl;
@@ -226,7 +226,7 @@ void SystemImpl::createEntry(KIO::UDSEntry &entry,
addAtom(entry, KIO::UDS_NAME, 0, desktop.readName());
- QString new_filename = file;
+ TQString new_filename = file;
new_filename.truncate(file.length()-8);
if ( desktop.readURL().isEmpty() )
@@ -241,8 +241,8 @@ void SystemImpl::createEntry(KIO::UDSEntry &entry,
addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR);
addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory");
- QString icon = desktop.readIcon();
- QString empty_icon = desktop.readEntry("EmptyIcon");
+ TQString icon = desktop.readIcon();
+ TQString empty_icon = desktop.readEntry("EmptyIcon");
if (!empty_icon.isEmpty())
{
@@ -251,12 +251,12 @@ void SystemImpl::createEntry(KIO::UDSEntry &entry,
m_lastListingEmpty = true;
KIO::ListJob *job = KIO::listDir(url, false, false);
- connect( job, SIGNAL( entries(KIO::Job *,
+ connect( job, TQT_SIGNAL( entries(KIO::Job *,
const KIO::UDSEntryList &) ),
- this, SLOT( slotEntries(KIO::Job *,
+ this, TQT_SLOT( slotEntries(KIO::Job *,
const KIO::UDSEntryList &) ) );
- connect( job, SIGNAL( result(KIO::Job *) ),
- this, SLOT( slotResult(KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result(KIO::Job *) ),
+ this, TQT_SLOT( slotResult(KIO::Job *) ) );
qApp->eventLoop()->enterLoop();
if (m_lastListingEmpty) icon = empty_icon;
diff --git a/kioslave/system/systemimpl.h b/kioslave/system/systemimpl.h
index a06874465..2cddeb120 100644
--- a/kioslave/system/systemimpl.h
+++ b/kioslave/system/systemimpl.h
@@ -25,8 +25,8 @@
#include <kurl.h>
#include <dcopobject.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
class SystemImpl : public QObject
{
@@ -35,31 +35,31 @@ public:
SystemImpl();
void createTopLevelEntry(KIO::UDSEntry& entry) const;
- bool statByName(const QString &filename, KIO::UDSEntry& entry);
+ bool statByName(const TQString &filename, KIO::UDSEntry& entry);
- bool listRoot(QValueList<KIO::UDSEntry> &list);
+ bool listRoot(TQValueList<KIO::UDSEntry> &list);
- bool parseURL(const KURL &url, QString &name, QString &path) const;
- bool realURL(const QString &name, const QString &path, KURL &url) const;
+ bool parseURL(const KURL &url, TQString &name, TQString &path) const;
+ bool realURL(const TQString &name, const TQString &path, KURL &url) const;
int lastErrorCode() const { return m_lastErrorCode; }
- QString lastErrorMessage() const { return m_lastErrorMessage; }
+ TQString lastErrorMessage() const { return m_lastErrorMessage; }
private slots:
- KURL findBaseURL(const QString &filename) const;
+ KURL findBaseURL(const TQString &filename) const;
void slotEntries(KIO::Job *job, const KIO::UDSEntryList &list);
void slotResult(KIO::Job *job);
private:
- void createEntry(KIO::UDSEntry& entry, const QString &directory,
- const QString &file);
+ void createEntry(KIO::UDSEntry& entry, const TQString &directory,
+ const TQString &file);
bool m_lastListingEmpty;
/// Last error code stored in class to simplify API.
/// Note that this means almost no method can be const.
int m_lastErrorCode;
- QString m_lastErrorMessage;
+ TQString m_lastErrorMessage;
};
#endif
diff --git a/kioslave/system/testsystem.cpp b/kioslave/system/testsystem.cpp
index 95107680f..d9ad43e50 100644
--- a/kioslave/system/testsystem.cpp
+++ b/kioslave/system/testsystem.cpp
@@ -28,12 +28,12 @@
#include <stdlib.h>
-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/tar/ktartest.cpp b/kioslave/tar/ktartest.cpp
index a82e6dbcd..bfbb216d4 100644
--- a/kioslave/tar/ktartest.cpp
+++ b/kioslave/tar/ktartest.cpp
@@ -1,13 +1,13 @@
#include "ktar.h"
#include <stdio.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kinstance.h>
#include <kdebug.h>
-void recursive_print( const KTarDirectory * dir, const QString & path )
+void recursive_print( const KTarDirectory * dir, const TQString & path )
{
- QStringList l = dir->entries();
- QStringList::Iterator it = l.begin();
+ TQStringList l = dir->entries();
+ TQStringList::Iterator it = l.begin();
for( ; it != l.end(); ++it )
{
const KTarEntry* entry = dir->entry( (*it) );
@@ -37,7 +37,7 @@ int main( int argc, char** argv )
}
KInstance instance("ktartest");
- QString command = argv[1];
+ TQString command = argv[1];
kdDebug() << "main: command=" << command << endl;
if ( command == "list" )
{
@@ -81,19 +81,19 @@ int main( int argc, char** argv )
Q_ASSERT( e && e->isFile() );
const KTarFile* f = (KTarFile*)e;
- QByteArray arr( f->data() );
+ TQByteArray arr( f->data() );
printf("SIZE=%i\n",arr.size() );
- QString str( arr );
+ TQString str( arr );
printf("DATA=%s\n", str.latin1());
/*
- // This is what KGzipDev::readAll could do, if QIODevice::readAll was virtual....
- QByteArray array(1024);
+ // This is what KGzipDev::readAll could do, if TQIODevice::readAll was virtual....
+ TQByteArray array(1024);
int n;
while ( ( n = dev.readBlock( array.data(), array.size() ) ) )
{
kdDebug() << "readBlock returned " << n << endl << endl;
- QCString s(array,n+1); // Terminate with 0 before printing
+ TQCString s(array,n+1); // Terminate with 0 before printing
printf("%s", s.data());
}
dev.close();
@@ -151,9 +151,9 @@ int main( int argc, char** argv )
Q_ASSERT( e && e->isFile() );
const KTarFile* f = (KTarFile*)e;
- QByteArray arr( f->data() );
+ TQByteArray arr( f->data() );
printf("SIZE=%i\n",arr.size() );
- QString str( arr );
+ TQString str( arr );
printf("DATA=%s\n", str.latin1());
tar.close();
@@ -172,7 +172,7 @@ int main( int argc, char** argv )
// Generate long filenames of each possible length bigger than 98...
for (int i = 98; i < 500 ; i++ )
{
- QString str, num;
+ TQString str, num;
str.fill( 'a', i-10 );
num.setNum( i );
num = num.rightJustify( 10, '0' );
@@ -186,7 +186,7 @@ int main( int argc, char** argv )
}
else if ( command == "bytearray" )
{
- QFile file( argv[2] );
+ TQFile file( argv[2] );
if ( !file.open( IO_ReadOnly ) )
return 1;
KTarGz tar( &file );
diff --git a/kioslave/tar/tar.cc b/kioslave/tar/tar.cc
index bfe909367..8afc1d0e8 100644
--- a/kioslave/tar/tar.cc
+++ b/kioslave/tar/tar.cc
@@ -7,7 +7,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kglobal.h>
#include <kurl.h>
@@ -49,7 +49,7 @@ int kdemain( int argc, char **argv )
return 0;
}
-ArchiveProtocol::ArchiveProtocol( const QCString &pool, const QCString &app ) : SlaveBase( "tar", pool, app )
+ArchiveProtocol::ArchiveProtocol( const TQCString &pool, const TQCString &app ) : SlaveBase( "tar", pool, app )
{
kdDebug( 7109 ) << "ArchiveProtocol::ArchiveProtocol" << endl;
m_archiveFile = 0L;
@@ -60,9 +60,9 @@ ArchiveProtocol::~ArchiveProtocol()
delete m_archiveFile;
}
-bool ArchiveProtocol::checkNewFile( const KURL & url, QString & path, KIO::Error& errorNum )
+bool ArchiveProtocol::checkNewFile( const KURL & url, TQString & path, KIO::Error& errorNum )
{
- QString fullPath = url.path();
+ TQString fullPath = url.path();
kdDebug(7109) << "ArchiveProtocol::checkNewFile " << fullPath << endl;
@@ -71,7 +71,7 @@ bool ArchiveProtocol::checkNewFile( const KURL & url, QString & path, KIO::Error
{
// Has it changed ?
KDE_struct_stat statbuf;
- if ( KDE_stat( QFile::encodeName( m_archiveName ), &statbuf ) == 0 )
+ if ( KDE_stat( TQFile::encodeName( m_archiveName ), &statbuf ) == 0 )
{
if ( m_mtime == statbuf.st_mtime )
{
@@ -93,8 +93,8 @@ bool ArchiveProtocol::checkNewFile( const KURL & url, QString & path, KIO::Error
// Find where the tar file is in the full path
int pos = 0;
- QString archiveFile;
- path = QString::null;
+ TQString archiveFile;
+ path = TQString::null;
int len = fullPath.length();
if ( len != 0 && fullPath[ len - 1 ] != '/' )
@@ -105,9 +105,9 @@ bool ArchiveProtocol::checkNewFile( const KURL & url, QString & path, KIO::Error
statbuf.st_mode = 0; // be sure to clear the directory bit
while ( (pos=fullPath.find( '/', pos+1 )) != -1 )
{
- QString tryPath = fullPath.left( pos );
+ TQString tryPath = fullPath.left( pos );
kdDebug(7109) << fullPath << " trying " << tryPath << endl;
- if ( KDE_stat( QFile::encodeName(tryPath), &statbuf ) == -1 )
+ if ( KDE_stat( TQFile::encodeName(tryPath), &statbuf ) == -1 )
{
// We are not in the file system anymore, either we have already enough data or we will never get any useful data anymore
break;
@@ -125,7 +125,7 @@ bool ArchiveProtocol::checkNewFile( const KURL & url, QString & path, KIO::Error
path.truncate( len - 1 );
}
else
- path = QString::fromLatin1("/");
+ path = TQString::fromLatin1("/");
kdDebug(7109) << "Found. archiveFile=" << archiveFile << " path=" << path << endl;
break;
}
@@ -215,7 +215,7 @@ void ArchiveProtocol::listDir( const KURL & url )
{
kdDebug( 7109 ) << "ArchiveProtocol::listDir " << url << endl;
- QString path;
+ TQString path;
KIO::Error errorNum;
if ( !checkNewFile( url, path, errorNum ) )
{
@@ -248,23 +248,23 @@ void ArchiveProtocol::listDir( const KURL & url )
if ( path.isEmpty() )
{
- KURL redir( url.protocol() + QString::fromLatin1( ":/") );
+ KURL redir( url.protocol() + TQString::fromLatin1( ":/") );
kdDebug( 7109 ) << "url.path()==" << url.path() << endl;
- redir.setPath( url.path() + QString::fromLatin1("/") );
+ redir.setPath( url.path() + TQString::fromLatin1("/") );
kdDebug( 7109 ) << "ArchiveProtocol::listDir: redirection " << redir.url() << endl;
redirection( redir );
finished();
return;
}
- path = QString::fromLocal8Bit(remoteEncoding()->encode(path));
+ path = TQString::fromLocal8Bit(remoteEncoding()->encode(path));
kdDebug( 7109 ) << "checkNewFile done" << endl;
const KArchiveDirectory* root = m_archiveFile->directory();
const KArchiveDirectory* dir;
if (!path.isEmpty() && path != "/")
{
- kdDebug(7109) << QString("Looking for entry %1").arg(path) << endl;
+ kdDebug(7109) << TQString("Looking for entry %1").arg(path) << endl;
const KArchiveEntry* e = root->entry( path );
if ( !e )
{
@@ -281,11 +281,11 @@ void ArchiveProtocol::listDir( const KURL & url )
dir = root;
}
- QStringList l = dir->entries();
+ TQStringList l = dir->entries();
totalSize( l.count() );
UDSEntry entry;
- QStringList::Iterator it = l.begin();
+ TQStringList::Iterator it = l.begin();
for( ; it != l.end(); ++it )
{
kdDebug(7109) << (*it) << endl;
@@ -305,7 +305,7 @@ void ArchiveProtocol::listDir( const KURL & url )
void ArchiveProtocol::stat( const KURL & url )
{
- QString path;
+ TQString path;
UDSEntry entry;
KIO::Error errorNum;
if ( !checkNewFile( url, path, errorNum ) )
@@ -335,7 +335,7 @@ void ArchiveProtocol::stat( const KURL & url )
kdDebug( 7109 ) << "ArchiveProtocol::stat returning name=" << url.fileName() << endl;
KDE_struct_stat buff;
- if ( KDE_stat( QFile::encodeName( url.path() ), &buff ) == -1 )
+ if ( KDE_stat( TQFile::encodeName( url.path() ), &buff ) == -1 )
{
// Should not happen, as the file was already stated by checkNewFile
error( KIO::ERR_COULD_NOT_STAT, url.prettyURL() );
@@ -360,10 +360,10 @@ void ArchiveProtocol::stat( const KURL & url )
const KArchiveEntry* archiveEntry;
if ( path.isEmpty() )
{
- path = QString::fromLatin1( "/" );
+ path = TQString::fromLatin1( "/" );
archiveEntry = root;
} else {
- path = QString::fromLocal8Bit(remoteEncoding()->encode(path));
+ path = TQString::fromLocal8Bit(remoteEncoding()->encode(path));
archiveEntry = root->entry( path );
}
if ( !archiveEntry )
@@ -382,7 +382,7 @@ void ArchiveProtocol::get( const KURL & url )
{
kdDebug( 7109 ) << "ArchiveProtocol::get " << url << endl;
- QString path;
+ TQString path;
KIO::Error errorNum;
if ( !checkNewFile( url, path, errorNum ) )
{
@@ -403,7 +403,7 @@ void ArchiveProtocol::get( const KURL & url )
}
}
- path = QString::fromLocal8Bit(remoteEncoding()->encode(path));
+ path = TQString::fromLocal8Bit(remoteEncoding()->encode(path));
const KArchiveDirectory* root = m_archiveFile->directory();
const KArchiveEntry* archiveEntry = root->entry( path );
@@ -443,7 +443,7 @@ void ArchiveProtocol::get( const KURL & url )
* - errors are skipped, resulting in an empty file
*/
- QIODevice* io = 0;
+ TQIODevice* io = 0;
// Getting the device is hard, as archiveFileEntry->device() is not virtual!
if ( url.protocol() == "tar" )
{
@@ -481,11 +481,11 @@ void ArchiveProtocol::get( const KURL & url )
totalSize( archiveFileEntry->size() );
- // Size of a QIODevice read. It must be large enough so that the mime type check will not fail
+ // Size of a TQIODevice read. It must be large enough so that the mime type check will not fail
const int maxSize = 0x100000; // 1MB
int bufferSize = kMin( maxSize, archiveFileEntry->size() );
- QByteArray buffer ( bufferSize );
+ TQByteArray buffer ( bufferSize );
if ( buffer.isEmpty() && bufferSize > 0 )
{
// Something went wrong
@@ -504,7 +504,7 @@ void ArchiveProtocol::get( const KURL & url )
if ( !firstRead )
{
bufferSize = kMin( maxSize, fileSize );
- buffer.resize( bufferSize, QGArray::SpeedOptim );
+ buffer.resize( bufferSize, TQGArray::SpeedOptim );
}
const Q_LONG read = io->readBlock( buffer.data(), buffer.size() ); // Avoid to use bufferSize here, in case something went wrong.
if ( read != bufferSize )
@@ -530,7 +530,7 @@ void ArchiveProtocol::get( const KURL & url )
io->close();
delete io;
- data( QByteArray() );
+ data( TQByteArray() );
finished();
}
diff --git a/kioslave/tar/tar.h b/kioslave/tar/tar.h
index 644a8b100..1cde2deae 100644
--- a/kioslave/tar/tar.h
+++ b/kioslave/tar/tar.h
@@ -28,7 +28,7 @@
class ArchiveProtocol : public KIO::SlaveBase
{
public:
- ArchiveProtocol( const QCString &pool, const QCString &app );
+ ArchiveProtocol( const TQCString &pool, const TQCString &app );
virtual ~ArchiveProtocol();
virtual void listDir( const KURL & url );
@@ -45,10 +45,10 @@ protected:
* \param errNum KIO error number (undefined if the function returns true)
* \return true if file was found, false if there was an error
*/
- bool checkNewFile( const KURL & url, QString & path, KIO::Error& errorNum );
+ bool checkNewFile( const KURL & url, TQString & path, KIO::Error& errorNum );
KArchive * m_archiveFile;
- QString m_archiveName;
+ TQString m_archiveName;
time_t m_mtime;
};
diff --git a/kioslave/thumbnail/cursorcreator.cpp b/kioslave/thumbnail/cursorcreator.cpp
index 0b1470bd6..d77629acf 100644
--- a/kioslave/thumbnail/cursorcreator.cpp
+++ b/kioslave/thumbnail/cursorcreator.cpp
@@ -17,8 +17,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qimage.h>
-#include <qfile.h>
+#include <tqimage.h>
+#include <tqfile.h>
#include <kdemacros.h>
@@ -35,16 +35,16 @@ extern "C"
}
}
-bool CursorCreator::create( const QString &path, int width, int height, QImage &img )
+bool CursorCreator::create( const TQString &path, int width, int height, TQImage &img )
{
XcursorImage *cursor = XcursorFilenameLoadImage(
- QFile::encodeName( path ).data(),
+ TQFile::encodeName( path ).data(),
width > height ? height : width );
if ( cursor ) {
- img = QImage( reinterpret_cast<uchar *>( cursor->pixels ),
+ img = TQImage( reinterpret_cast<uchar *>( cursor->pixels ),
cursor->width, cursor->height, 32,
- NULL, 0, QImage::BigEndian );
+ NULL, 0, TQImage::BigEndian );
img.setAlphaBuffer( true );
// Convert the image to non-premultiplied alpha
diff --git a/kioslave/thumbnail/cursorcreator.h b/kioslave/thumbnail/cursorcreator.h
index 7ef8ac2fd..9fd7c7fa4 100644
--- a/kioslave/thumbnail/cursorcreator.h
+++ b/kioslave/thumbnail/cursorcreator.h
@@ -26,7 +26,7 @@ class CursorCreator : public ThumbCreator
{
public:
CursorCreator() {}
- bool create( const QString &path, int, int, QImage &img );
+ bool create( const TQString &path, int, int, TQImage &img );
};
#endif
diff --git a/kioslave/thumbnail/djvucreator.cpp b/kioslave/thumbnail/djvucreator.cpp
index 653fc4163..20a32fb26 100644
--- a/kioslave/thumbnail/djvucreator.cpp
+++ b/kioslave/thumbnail/djvucreator.cpp
@@ -36,8 +36,8 @@
#include <fcntl.h>
#include <errno.h>
-#include <qfile.h>
-#include <qimage.h>
+#include <tqfile.h>
+#include <tqimage.h>
#include <kdemacros.h>
@@ -53,19 +53,19 @@ extern "C"
}
}
-bool DjVuCreator::create(const QString &path, int width, int height, QImage &img)
+bool DjVuCreator::create(const TQString &path, int width, int height, TQImage &img)
{
int output[2];
- QByteArray data(1024);
+ TQByteArray data(1024);
bool ok = false;
if (pipe(output) == -1)
return false;
const char* argv[8];
- QCString sizearg, fnamearg;
+ TQCString sizearg, fnamearg;
sizearg.sprintf("%dx%d", width, height);
- fnamearg = QFile::encodeName( path );
+ fnamearg = TQFile::encodeName( path );
argv[0] = "ddjvu";
argv[1] = "-page";
argv[2] = "1";
diff --git a/kioslave/thumbnail/djvucreator.h b/kioslave/thumbnail/djvucreator.h
index f6724c163..f5df3650b 100644
--- a/kioslave/thumbnail/djvucreator.h
+++ b/kioslave/thumbnail/djvucreator.h
@@ -27,7 +27,7 @@ class DjVuCreator : public ThumbCreator
{
public:
DjVuCreator() {}
- virtual bool create(const QString &path, int, int, QImage &img);
+ virtual bool create(const TQString &path, int, int, TQImage &img);
virtual Flags flags() const;
};
diff --git a/kioslave/thumbnail/exrcreator.cpp b/kioslave/thumbnail/exrcreator.cpp
index ac2bc3a71..633ad5095 100644
--- a/kioslave/thumbnail/exrcreator.cpp
+++ b/kioslave/thumbnail/exrcreator.cpp
@@ -17,13 +17,13 @@
Boston, MA 02110-1301, USA.
*/
-#include <qimage.h>
+#include <tqimage.h>
#include <kimageio.h>
#include <kdebug.h>
#include <kconfig.h>
#include <kglobal.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <ImfInputFile.h>
#include <ImfPreviewImage.h>
@@ -38,7 +38,7 @@ extern "C"
}
}
-bool EXRCreator::create(const QString &path, int, int, QImage &img)
+bool EXRCreator::create(const TQString &path, int, int, TQImage &img)
{
Imf::InputFile in ( path.ascii() );
const Imf::Header &h = in.header();
@@ -46,7 +46,7 @@ bool EXRCreator::create(const QString &path, int, int, QImage &img)
if ( h.hasPreviewImage() ) {
kdDebug() << "EXRcreator - using preview" << endl;
const Imf::PreviewImage &preview = in.header().previewImage();
- QImage qpreview(preview.width(), preview.height(), 32, 0, QImage::BigEndian);
+ TQImage qpreview(preview.width(), preview.height(), 32, 0, TQImage::BigEndian);
for ( unsigned int y=0; y < preview.height(); y++ ) {
for ( unsigned int x=0; x < preview.width(); x++ ) {
const Imf::PreviewRgba &q = preview.pixels()[x+(y*preview.width())];
@@ -65,7 +65,7 @@ bool EXRCreator::create(const QString &path, int, int, QImage &img)
KConfig * config = KGlobal::config();
KConfigGroupSaver cgs( config, "PreviewSettings" );
unsigned long long maxSize = config->readNumEntry( "MaximumSize", 1024*1024 /* 1MB */ );
- unsigned long long fileSize = QFile( path ).size();
+ unsigned long long fileSize = TQFile( path ).size();
if ( (fileSize > 0) && (fileSize < maxSize) ) {
if (!img.load( path )) {
return false;
diff --git a/kioslave/thumbnail/exrcreator.h b/kioslave/thumbnail/exrcreator.h
index 498bcfb1b..75e11d455 100644
--- a/kioslave/thumbnail/exrcreator.h
+++ b/kioslave/thumbnail/exrcreator.h
@@ -26,7 +26,7 @@ class EXRCreator : public ThumbCreator
{
public:
EXRCreator() {};
- virtual bool create(const QString &path, int, int, QImage &img);
+ virtual bool create(const TQString &path, int, int, TQImage &img);
virtual Flags flags() const;
};
diff --git a/kioslave/thumbnail/htmlcreator.cpp b/kioslave/thumbnail/htmlcreator.cpp
index 0431bcf6e..c9ddf0204 100644
--- a/kioslave/thumbnail/htmlcreator.cpp
+++ b/kioslave/thumbnail/htmlcreator.cpp
@@ -19,9 +19,9 @@
*/
#include <time.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qpainter.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqpainter.h>
#include <kapplication.h>
#include <khtml_part.h>
@@ -45,12 +45,12 @@ HTMLCreator::~HTMLCreator()
delete m_html;
}
-bool HTMLCreator::create(const QString &path, int width, int height, QImage &img)
+bool HTMLCreator::create(const TQString &path, int width, int height, TQImage &img)
{
if (!m_html)
{
m_html = new KHTMLPart;
- connect(m_html, SIGNAL(completed()), SLOT(slotCompleted()));
+ connect(m_html, TQT_SIGNAL(completed()), TQT_SLOT(slotCompleted()));
m_html->setJScriptEnabled(false);
m_html->setJavaEnabled(false);
m_html->setPluginsEnabled(false);
@@ -68,8 +68,8 @@ bool HTMLCreator::create(const QString &path, int width, int height, QImage &img
killTimer(t);
// render the HTML page on a bigger pixmap and use smoothScale,
- // looks better than directly scaling with the QPainter (malte)
- QPixmap pix;
+ // looks better than directly scaling with the TQPainter (malte)
+ TQPixmap pix;
if (width > 400 || height > 600)
{
if (height * 3 > width * 4)
@@ -81,13 +81,13 @@ bool HTMLCreator::create(const QString &path, int width, int height, QImage &img
pix.resize(400, 600);
// light-grey background, in case loadind the page failed
- pix.fill( QColor( 245, 245, 245 ) );
+ pix.fill( TQColor( 245, 245, 245 ) );
int borderX = pix.width() / width, borderY = pix.height() / height;
- QRect rc(borderX, borderY, pix.width() - borderX * 2,
+ TQRect rc(borderX, borderY, pix.width() - borderX * 2,
pix.height() - borderY * 2);
- QPainter p;
+ TQPainter p;
p.begin(&pix);
m_html->paint(&p, rc);
p.end();
@@ -99,7 +99,7 @@ bool HTMLCreator::create(const QString &path, int width, int height, QImage &img
return true;
}
-void HTMLCreator::timerEvent(QTimerEvent *)
+void HTMLCreator::timerEvent(TQTimerEvent *)
{
qApp->exit_loop();
}
diff --git a/kioslave/thumbnail/htmlcreator.h b/kioslave/thumbnail/htmlcreator.h
index 6cb58b18f..f131ed1ad 100644
--- a/kioslave/thumbnail/htmlcreator.h
+++ b/kioslave/thumbnail/htmlcreator.h
@@ -25,17 +25,17 @@
class KHTMLPart;
-class HTMLCreator : public QObject, public ThumbCreator
+class HTMLCreator : public TQObject, public ThumbCreator
{
Q_OBJECT
public:
HTMLCreator();
virtual ~HTMLCreator();
- virtual bool create(const QString &path, int width, int height, QImage &img);
+ virtual bool create(const TQString &path, int width, int height, TQImage &img);
virtual Flags flags() const;
protected:
- virtual void timerEvent(QTimerEvent *);
+ virtual void timerEvent(TQTimerEvent *);
private slots:
void slotCompleted();
diff --git a/kioslave/thumbnail/imagecreator.cpp b/kioslave/thumbnail/imagecreator.cpp
index 24a75a51a..259a8928f 100644
--- a/kioslave/thumbnail/imagecreator.cpp
+++ b/kioslave/thumbnail/imagecreator.cpp
@@ -20,7 +20,7 @@
#include <assert.h>
-#include <qimage.h>
+#include <tqimage.h>
#include <kimageio.h>
@@ -35,7 +35,7 @@ extern "C"
}
}
-bool ImageCreator::create(const QString &path, int, int, QImage &img)
+bool ImageCreator::create(const TQString &path, int, int, TQImage &img)
{
// create image preview
if (!img.load( path ))
diff --git a/kioslave/thumbnail/imagecreator.h b/kioslave/thumbnail/imagecreator.h
index d06c9fa7d..cc527438d 100644
--- a/kioslave/thumbnail/imagecreator.h
+++ b/kioslave/thumbnail/imagecreator.h
@@ -26,7 +26,7 @@ class ImageCreator : public ThumbCreator
{
public:
ImageCreator() {}
- virtual bool create(const QString &path, int, int, QImage &img);
+ virtual bool create(const TQString &path, int, int, TQImage &img);
virtual Flags flags() const;
};
diff --git a/kioslave/thumbnail/textcreator.cpp b/kioslave/thumbnail/textcreator.cpp
index b0424e228..31f4c4254 100644
--- a/kioslave/thumbnail/textcreator.cpp
+++ b/kioslave/thumbnail/textcreator.cpp
@@ -18,9 +18,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qpixmap.h>
-#include <qimage.h>
+#include <tqfile.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
#include <kstandarddirs.h>
#include <kpixmapsplitter.h>
@@ -49,7 +49,7 @@ TextCreator::~TextCreator()
delete [] m_data;
}
-bool TextCreator::create(const QString &path, int width, int height, QImage &img)
+bool TextCreator::create(const TQString &path, int width, int height, TQImage &img)
{
// Filter out unwanted mimetypes
KMimeType::Ptr mimeType = KMimeType::findByPath( path );
@@ -59,12 +59,12 @@ bool TextCreator::create(const QString &path, int width, int height, QImage &img
if ( !m_splitter )
{
m_splitter = new KPixmapSplitter;
- QString pixmap = locate( "data", "konqueror/pics/thumbnailfont_7x4.png" );
+ TQString pixmap = locate( "data", "konqueror/pics/thumbnailfont_7x4.png" );
if ( !pixmap.isEmpty() )
{
// FIXME: make font/glyphsize configurable...
- m_splitter->setPixmap( QPixmap( pixmap ));
- m_splitter->setItemSize( QSize( 4, 7 ));
+ m_splitter->setPixmap( TQPixmap( pixmap ));
+ m_splitter->setItemSize( TQSize( 4, 7 ));
}
}
@@ -72,7 +72,7 @@ bool TextCreator::create(const QString &path, int width, int height, QImage &img
// determine some sizes...
// example: width: 60, height: 64
- QSize pixmapSize( width, height );
+ TQSize pixmapSize( width, height );
if (height * 3 > width * 4)
pixmapSize.setHeight( width * 4 / 3 );
else
@@ -85,7 +85,7 @@ bool TextCreator::create(const QString &path, int width, int height, QImage &img
int xborder = 1 + pixmapSize.width()/16; // minimum x-border
int yborder = 1 + pixmapSize.height()/16; // minimum y-border
- QSize chSize = m_splitter->itemSize(); // the size of one char
+ TQSize chSize = m_splitter->itemSize(); // the size of one char
int xOffset = chSize.width();
int yOffset = chSize.height();
@@ -99,7 +99,7 @@ bool TextCreator::create(const QString &path, int width, int height, QImage &img
const int bytesToRead = 120 * numLines;
// create text-preview
- QFile file( path );
+ TQFile file( path );
if ( file.open( IO_ReadOnly ))
{
if ( !m_data || m_dataSize < bytesToRead + 1 )
@@ -114,12 +114,12 @@ bool TextCreator::create(const QString &path, int width, int height, QImage &img
{
ok = true;
m_data[read] = '\0';
- QString text = QString::fromLocal8Bit( m_data );
+ TQString text = TQString::fromLocal8Bit( m_data );
// FIXME: maybe strip whitespace and read more?
- m_pixmap.fill( QColor( 245, 245, 245 ) ); // light-grey background
+ m_pixmap.fill( TQColor( 245, 245, 245 ) ); // light-grey background
- QRect rect;
+ TQRect rect;
int rest = m_pixmap.width() - (numCharsPerLine * chSize.width());
xborder = QMAX( xborder, rest/2); // center horizontally
@@ -132,7 +132,7 @@ bool TextCreator::create(const QString &path, int width, int height, QImage &img
int posLastLine = m_pixmap.height() - (chSize.height() + yborder);
bool newLine = false;
Q_ASSERT( posNewLine > 0 );
- const QPixmap *fontPixmap = &(m_splitter->pixmap());
+ const TQPixmap *fontPixmap = &(m_splitter->pixmap());
for ( uint i = 0; i < text.length(); i++ )
{
@@ -158,7 +158,7 @@ bool TextCreator::create(const QString &path, int width, int height, QImage &img
}
// check for newlines in the text (unix,dos)
- QChar ch = text.at( i );
+ TQChar ch = text.at( i );
if ( ch == '\n' )
{
newLine = true;
@@ -174,7 +174,7 @@ bool TextCreator::create(const QString &path, int width, int height, QImage &img
rect = m_splitter->coordinates( ch );
if ( !rect.isEmpty() )
{
- bitBlt( &m_pixmap, QPoint(x,y), fontPixmap, rect, Qt::CopyROP );
+ bitBlt( &m_pixmap, TQPoint(x,y), fontPixmap, rect, Qt::CopyROP );
}
x += xOffset; // next character
diff --git a/kioslave/thumbnail/textcreator.h b/kioslave/thumbnail/textcreator.h
index 92461d0cd..02b14aec9 100644
--- a/kioslave/thumbnail/textcreator.h
+++ b/kioslave/thumbnail/textcreator.h
@@ -20,7 +20,7 @@
#ifndef _TEXTCREATOR_H_
#define _TEXTCREATOR_H_
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kio/thumbcreator.h>
class KPixmapSplitter;
@@ -30,14 +30,14 @@ class TextCreator : public ThumbCreator
public:
TextCreator();
virtual ~TextCreator();
- virtual bool create(const QString &path, int width, int height, QImage &img);
+ virtual bool create(const TQString &path, int width, int height, TQImage &img);
virtual Flags flags() const;
private:
KPixmapSplitter *m_splitter;
char *m_data;
int m_dataSize;
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
};
#endif
diff --git a/kioslave/thumbnail/thumbnail.cpp b/kioslave/thumbnail/thumbnail.cpp
index 99cb3a89d..272e34eed 100644
--- a/kioslave/thumbnail/thumbnail.cpp
+++ b/kioslave/thumbnail/thumbnail.cpp
@@ -27,12 +27,12 @@
#include <sys/ipc.h>
#include <sys/shm.h>
-#include <qfile.h>
-#include <qbitmap.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qbuffer.h>
+#include <tqfile.h>
+#include <tqbitmap.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqbuffer.h>
#include <kdatastream.h> // Do not remove, needed for correct bool serialization
#include <kurl.h>
@@ -53,13 +53,13 @@
#include "thumbnail.h"
#include <kio/thumbcreator.h>
-// Use correctly KInstance instead of KApplication (but then no QPixmap)
+// Use correctly KInstance instead of KApplication (but then no TQPixmap)
#undef USE_KINSTANCE
// Fix thumbnail: protocol
#define THUMBNAIL_HACK (1)
#ifdef THUMBNAIL_HACK
-# include <qfileinfo.h>
+# include <tqfileinfo.h>
# include <ktrader.h>
#endif
@@ -122,7 +122,7 @@ int kdemain(int argc, char **argv)
return 0;
}
-ThumbnailProtocol::ThumbnailProtocol(const QCString &pool, const QCString &app)
+ThumbnailProtocol::ThumbnailProtocol(const TQCString &pool, const TQCString &app)
: SlaveBase("thumbnail", pool, app)
{
m_creators.setAutoDelete(true);
@@ -144,7 +144,7 @@ void ThumbnailProtocol::get(const KURL &url)
if (m_mimeType.isEmpty())
{
kdDebug(7115) << "PATH: " << url.path() << endl;
- QFileInfo info(url.path());
+ TQFileInfo info(url.path());
if (info.isDir())
{
// We cannot process a directory
@@ -204,7 +204,7 @@ void ThumbnailProtocol::get(const KURL &url)
if (m_iconAlpha)
m_iconAlpha = (m_iconAlpha << 24) | 0xffffff;
- QImage img;
+ TQImage img;
KConfigGroup group( KGlobal::config(), "PreviewSettings" );
@@ -222,7 +222,7 @@ void ThumbnailProtocol::get(const KURL &url)
if (info.isValid())
{
KFileMetaInfoItem item = info.item(KFileMimeTypeInfo::Thumbnail);
- if (item.isValid() && item.value().type() == QVariant::Image)
+ if (item.isValid() && item.value().type() == TQVariant::Image)
{
img = item.value().toImage();
kdDebug(7115) << "using KFMI for the thumbnail\n";
@@ -236,17 +236,17 @@ void ThumbnailProtocol::get(const KURL &url)
if (!kfmiThumb)
{
kdDebug(7115) << "using thumb creator for the thumbnail\n";
- QString plugin = metaData("plugin");
+ TQString plugin = metaData("plugin");
#ifdef THUMBNAIL_HACK
if (plugin.isEmpty())
{
KTrader::OfferList plugins = KTrader::self()->query("ThumbCreator");
- QMap<QString, KService::Ptr> mimeMap;
+ TQMap<TQString, KService::Ptr> mimeMap;
for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
{
- QStringList mimeTypes = (*it)->property("MimeTypes").toStringList();
- for (QStringList::ConstIterator mt = mimeTypes.begin(); mt != mimeTypes.end(); ++mt)
+ TQStringList mimeTypes = (*it)->property("MimeTypes").toStringList();
+ for (TQStringList::ConstIterator mt = mimeTypes.begin(); mt != mimeTypes.end(); ++mt)
{
if ((*mt)==m_mimeType)
{
@@ -269,9 +269,9 @@ void ThumbnailProtocol::get(const KURL &url)
ThumbCreator *creator = m_creators[plugin];
if (!creator)
{
- // Don't use KLibFactory here, this is not a QObject and
+ // Don't use KLibFactory here, this is not a TQObject and
// neither is ThumbCreator
- KLibrary *library = KLibLoader::self()->library(QFile::encodeName(plugin));
+ KLibrary *library = KLibLoader::self()->library(TQFile::encodeName(plugin));
if (library)
{
newCreator create = (newCreator)library->symbol("new_creator");
@@ -307,26 +307,26 @@ void ThumbnailProtocol::get(const KURL &url)
#ifndef USE_KINSTANCE
if (flags & ThumbCreator::DrawFrame)
{
- QPixmap pix;
+ TQPixmap pix;
pix.convertFromImage(img);
int x2 = pix.width() - 1;
int y2 = pix.height() - 1;
// paint a black rectangle around the "page"
- QPainter p;
+ TQPainter p;
p.begin( &pix );
- p.setPen( QColor( 48, 48, 48 ));
+ p.setPen( TQColor( 48, 48, 48 ));
p.drawLine( x2, 0, x2, y2 );
p.drawLine( 0, y2, x2, y2 );
- p.setPen( QColor( 215, 215, 215 ));
+ p.setPen( TQColor( 215, 215, 215 ));
p.drawLine( 0, 0, x2, 0 );
p.drawLine( 0, 0, 0, y2 );
p.end();
- const QBitmap *mask = pix.mask();
+ const TQBitmap *mask = pix.mask();
if ( mask ) // need to update it so we can see the frame
{
- QBitmap bitmap( *mask );
- QPainter painter;
+ TQBitmap bitmap( *mask );
+ TQPainter painter;
painter.begin( &bitmap );
painter.drawLine( x2, 0, x2, y2 );
painter.drawLine( 0, y2, x2, y2 );
@@ -344,7 +344,7 @@ void ThumbnailProtocol::get(const KURL &url)
if ((flags & ThumbCreator::BlendIcon) && KGlobal::iconLoader()->alphaBlending(KIcon::Desktop))
{
// blending the mimetype icon in
- QImage icon = getIcon();
+ TQImage icon = getIcon();
int x = img.width() - icon.width() - 4;
x = QMAX( x, 0 );
@@ -359,7 +359,7 @@ void ThumbnailProtocol::get(const KURL &url)
return;
}
- const QString shmid = metaData("shmid");
+ const TQString shmid = metaData("shmid");
if (shmid.isEmpty())
{
#ifdef THUMBNAIL_HACK
@@ -367,7 +367,7 @@ void ThumbnailProtocol::get(const KURL &url)
{
// If thumbnail was called directly from Konqueror, then the image needs to be raw
//kdDebug(7115) << "RAW IMAGE TO STREAM" << endl;
- QBuffer buf;
+ TQBuffer buf;
if (!buf.open(IO_WriteOnly))
{
error(KIO::ERR_INTERNAL, i18n("Could not write image."));
@@ -380,8 +380,8 @@ void ThumbnailProtocol::get(const KURL &url)
else
#endif
{
- QByteArray imgData;
- QDataStream stream( imgData, IO_WriteOnly );
+ TQByteArray imgData;
+ TQDataStream stream( imgData, IO_WriteOnly );
//kdDebug(7115) << "IMAGE TO STREAM" << endl;
stream << img;
data(imgData);
@@ -389,8 +389,8 @@ void ThumbnailProtocol::get(const KURL &url)
}
else
{
- QByteArray imgData;
- QDataStream stream( imgData, IO_WriteOnly );
+ TQByteArray imgData;
+ TQDataStream stream( imgData, IO_WriteOnly );
//kdDebug(7115) << "IMAGE TO SHMID" << endl;
void *shmaddr = shmat(shmid.toInt(), 0, 0);
if (shmaddr == (void *)-1)
@@ -415,12 +415,12 @@ void ThumbnailProtocol::get(const KURL &url)
finished();
}
-const QImage& ThumbnailProtocol::getIcon()
+const TQImage& ThumbnailProtocol::getIcon()
{
- QImage* icon = m_iconDict.find(m_mimeType);
+ TQImage* icon = m_iconDict.find(m_mimeType);
if ( !icon ) // generate it!
{
- icon = new QImage( KMimeType::mimeType(m_mimeType)->pixmap( KIcon::Desktop, m_iconSize ).convertToImage() );
+ icon = new TQImage( KMimeType::mimeType(m_mimeType)->pixmap( KIcon::Desktop, m_iconSize ).convertToImage() );
icon->setAlphaBuffer( true );
int w = icon->width();
diff --git a/kioslave/thumbnail/thumbnail.h b/kioslave/thumbnail/thumbnail.h
index 23118e21c..0bd4c1412 100644
--- a/kioslave/thumbnail/thumbnail.h
+++ b/kioslave/thumbnail/thumbnail.h
@@ -20,7 +20,7 @@
#ifndef _THUMBNAIL_H_
#define _THUMBNAIL_H_
-#include <qdict.h>
+#include <tqdict.h>
#include <kio/slavebase.h>
@@ -30,25 +30,25 @@ class QImage;
class ThumbnailProtocol : public KIO::SlaveBase
{
public:
- ThumbnailProtocol(const QCString &pool, const QCString &app);
+ ThumbnailProtocol(const TQCString &pool, const TQCString &app);
virtual ~ThumbnailProtocol();
virtual void get(const KURL &url);
protected:
- const QImage& getIcon();
+ const TQImage& getIcon();
private:
- QString m_mimeType;
+ TQString m_mimeType;
int m_width;
int m_height;
bool m_keepAspectRatio;
int m_iconSize;
int m_iconAlpha;
// Thumbnail creators
- QDict<ThumbCreator> m_creators;
+ TQDict<ThumbCreator> m_creators;
// transparent icon cache
- QDict<QImage> m_iconDict;
+ TQDict<TQImage> m_iconDict;
};
#endif
diff --git a/kioslave/trash/kfile-plugin/kfile_trash.cpp b/kioslave/trash/kfile-plugin/kfile_trash.cpp
index baa27143c..edd57014d 100644
--- a/kioslave/trash/kfile-plugin/kfile_trash.cpp
+++ b/kioslave/trash/kfile-plugin/kfile_trash.cpp
@@ -23,16 +23,16 @@
#include <kgenericfactory.h>
#include <kdebug.h>
-#include <qfile.h>
-#include <qstringlist.h>
-#include <qdatetime.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
+#include <tqdatetime.h>
typedef KGenericFactory<KTrashPlugin> TrashFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_trash, TrashFactory("kfile_trash"))
-KTrashPlugin::KTrashPlugin(QObject *parent, const char *name,
- const QStringList &args) : KFilePlugin(parent, name, args)
+KTrashPlugin::KTrashPlugin(TQObject *parent, const char *name,
+ const TQStringList &args) : KFilePlugin(parent, name, args)
{
KGlobal::locale()->insertCatalogue( "kio_trash" );
@@ -44,7 +44,7 @@ KTrashPlugin::KTrashPlugin(QObject *parent, const char *name,
(void)impl.init();
}
-void KTrashPlugin::makeMimeTypeInfo(const QString& mimeType)
+void KTrashPlugin::makeMimeTypeInfo(const TQString& mimeType)
{
KFileMimeTypeInfo* info = addMimeTypeInfo( mimeType );
@@ -52,8 +52,8 @@ void KTrashPlugin::makeMimeTypeInfo(const QString& mimeType)
addGroupInfo(info, "General", i18n("General"));
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "OriginalPath", i18n("Original Path"), QVariant::String);
- item = addItemInfo(group, "DateOfDeletion", i18n("Date of Deletion"), QVariant::DateTime);
+ item = addItemInfo(group, "OriginalPath", i18n("Original Path"), TQVariant::String);
+ item = addItemInfo(group, "DateOfDeletion", i18n("Date of Deletion"), TQVariant::DateTime);
}
bool KTrashPlugin::readInfo(KFileMetaInfo& info, uint)
@@ -63,7 +63,7 @@ bool KTrashPlugin::readInfo(KFileMetaInfo& info, uint)
if ( url.protocol()=="system"
&& url.path().startsWith("/trash") )
{
- QString path = url.path();
+ TQString path = url.path();
path.remove(0, 6);
url.setProtocol("trash");
url.setPath(path);
@@ -74,8 +74,8 @@ bool KTrashPlugin::readInfo(KFileMetaInfo& info, uint)
return false;
int trashId;
- QString fileId;
- QString relativePath;
+ TQString fileId;
+ TQString relativePath;
if ( !TrashImpl::parseURL( url, trashId, fileId, relativePath ) )
return false;
diff --git a/kioslave/trash/kfile-plugin/kfile_trash.h b/kioslave/trash/kfile-plugin/kfile_trash.h
index 8316f7402..a041999a4 100644
--- a/kioslave/trash/kfile-plugin/kfile_trash.h
+++ b/kioslave/trash/kfile-plugin/kfile_trash.h
@@ -31,11 +31,11 @@ class KTrashPlugin: public KFilePlugin
Q_OBJECT
public:
- KTrashPlugin(QObject *parent, const char *name, const QStringList& args);
+ KTrashPlugin(TQObject *parent, const char *name, const TQStringList& args);
virtual bool readInfo(KFileMetaInfo& info, uint what);
private:
- void makeMimeTypeInfo(const QString& mimeType);
+ void makeMimeTypeInfo(const TQString& mimeType);
TrashImpl impl;
};
diff --git a/kioslave/trash/kio_trash.cpp b/kioslave/trash/kio_trash.cpp
index 7912cbb7c..1210bb59a 100644
--- a/kioslave/trash/kio_trash.cpp
+++ b/kioslave/trash/kio_trash.cpp
@@ -29,10 +29,10 @@
#include <kprocess.h>
#include <dcopclient.h>
-#include <qdatastream.h>
-#include <qtextstream.h>
-#include <qfile.h>
-#include <qeventloop.h>
+#include <tqdatastream.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
+#include <tqeventloop.h>
#include <time.h>
#include <pwd.h>
@@ -73,15 +73,15 @@ extern "C" {
return; \
}
-TrashProtocol::TrashProtocol( const QCString& protocol, const QCString &pool, const QCString &app)
+TrashProtocol::TrashProtocol( const TQCString& protocol, const TQCString &pool, const TQCString &app)
: SlaveBase(protocol, pool, app )
{
struct passwd *user = getpwuid( getuid() );
if ( user )
- m_userName = QString::fromLatin1(user->pw_name);
+ m_userName = TQString::fromLatin1(user->pw_name);
struct group *grp = getgrgid( getgid() );
if ( grp )
- m_groupName = QString::fromLatin1(grp->gr_name);
+ m_groupName = TQString::fromLatin1(grp->gr_name);
}
TrashProtocol::~TrashProtocol()
@@ -91,7 +91,7 @@ TrashProtocol::~TrashProtocol()
void TrashProtocol::restore( const KURL& trashURL )
{
int trashId;
- QString fileId, relativePath;
+ TQString fileId, relativePath;
bool ok = TrashImpl::parseURL( trashURL, trashId, fileId, relativePath );
if ( !ok ) {
error( KIO::ERR_SLAVE_DEFINED, i18n( "Malformed URL %1" ).arg( trashURL.prettyURL() ) );
@@ -109,9 +109,9 @@ void TrashProtocol::restore( const KURL& trashURL )
dest.addPath( relativePath );
// Check that the destination directory exists, to improve the error code in case it doesn't.
- const QString destDir = dest.directory();
+ const TQString destDir = dest.directory();
KDE_struct_stat buff;
- if ( KDE_lstat( QFile::encodeName( destDir ), &buff ) == -1 ) {
+ if ( KDE_lstat( TQFile::encodeName( destDir ), &buff ) == -1 ) {
error( KIO::ERR_SLAVE_DEFINED,
i18n( "The directory %1 does not exist anymore, so it is not possible to restore this item to its original location. "
"You can either recreate that directory and use the restore operation again, or drag the item anywhere else to restore it." ).arg( destDir ) );
@@ -154,16 +154,16 @@ void TrashProtocol::copyOrMove( const KURL &src, const KURL &dest, bool overwrit
if ( src.protocol() == "trash" && dest.isLocalFile() ) {
// Extracting (e.g. via dnd). Ignore original location stored in info file.
int trashId;
- QString fileId, relativePath;
+ TQString fileId, relativePath;
bool ok = TrashImpl::parseURL( src, trashId, fileId, relativePath );
if ( !ok ) {
error( KIO::ERR_SLAVE_DEFINED, i18n( "Malformed URL %1" ).arg( src.prettyURL() ) );
return;
}
- const QString destPath = dest.path();
- if ( QFile::exists( destPath ) ) {
+ const TQString destPath = dest.path();
+ if ( TQFile::exists( destPath ) ) {
if ( overwrite ) {
- ok = QFile::remove( destPath );
+ ok = TQFile::remove( destPath );
Q_ASSERT( ok ); // ### TODO
} else {
error( KIO::ERR_FILE_ALREADY_EXIST, destPath );
@@ -187,20 +187,20 @@ void TrashProtocol::copyOrMove( const KURL &src, const KURL &dest, bool overwrit
}
return;
} else if ( src.isLocalFile() && dest.protocol() == "trash" ) {
- QString dir = dest.directory();
+ TQString dir = dest.directory();
//kdDebug() << "trashing a file to " << dir << endl;
// Trashing a file
// We detect the case where this isn't normal trashing, but
// e.g. if kwrite tries to save (moving tempfile over destination)
if ( dir.length() <= 1 && src.fileName() == dest.fileName() ) // new toplevel entry
{
- const QString srcPath = src.path();
+ const TQString srcPath = src.path();
// In theory we should use TrashImpl::parseURL to give the right filename to createInfo,
// in case the trash URL didn't contain the same filename as srcPath.
// But this can only happen with copyAs/moveAs, not available in the GUI
// for the trash (New/... or Rename from iconview/listview).
int trashId;
- QString fileId;
+ TQString fileId;
if ( !impl.createInfo( srcPath, trashId, fileId ) ) {
error( impl.lastErrorCode(), impl.lastErrorMessage() );
} else {
@@ -217,7 +217,7 @@ void TrashProtocol::copyOrMove( const KURL &src, const KURL &dest, bool overwrit
error( impl.lastErrorCode(), impl.lastErrorMessage() );
} else {
// Inform caller of the final URL. Used by konq_undo.
- const KURL url = impl.makeURL( trashId, fileId, QString::null );
+ const KURL url = impl.makeURL( trashId, fileId, TQString::null );
setMetaData( "trashURL-" + srcPath, url.url() );
finished();
}
@@ -233,7 +233,7 @@ void TrashProtocol::copyOrMove( const KURL &src, const KURL &dest, bool overwrit
error( KIO::ERR_UNSUPPORTED_ACTION, "should never happen" );
}
-static void addAtom(KIO::UDSEntry& entry, unsigned int ID, long long l, const QString& s = QString::null)
+static void addAtom(KIO::UDSEntry& entry, unsigned int ID, long long l, const TQString& s = TQString::null)
{
KIO::UDSAtom atom;
atom.m_uds = ID;
@@ -256,7 +256,7 @@ void TrashProtocol::createTopLevelDirEntry(KIO::UDSEntry& entry)
void TrashProtocol::stat(const KURL& url)
{
INIT_IMPL;
- const QString path = url.path();
+ const TQString path = url.path();
if( path.isEmpty() || path == "/" ) {
// The root is "virtual" - it's not a single physical directory
KIO::UDSEntry entry;
@@ -265,7 +265,7 @@ void TrashProtocol::stat(const KURL& url)
finished();
} else {
int trashId;
- QString fileId, relativePath;
+ TQString fileId, relativePath;
bool ok = TrashImpl::parseURL( url, trashId, fileId, relativePath );
@@ -279,15 +279,15 @@ void TrashProtocol::stat(const KURL& url)
return;
}
- const QString filePath = impl.physicalPath( trashId, fileId, relativePath );
+ const TQString filePath = impl.physicalPath( trashId, fileId, relativePath );
if ( filePath.isEmpty() ) {
error( impl.lastErrorCode(), impl.lastErrorMessage() );
return;
}
- QString fileName = filePath.section('/', -1, -1, QString::SectionSkipEmpty);
+ TQString fileName = filePath.section('/', -1, -1, TQString::SectionSkipEmpty);
- QString fileURL = QString::null;
+ TQString fileURL = TQString::null;
if ( url.path().length() > 1 ) {
fileURL = url.url();
}
@@ -310,7 +310,7 @@ void TrashProtocol::stat(const KURL& url)
void TrashProtocol::del( const KURL &url, bool /*isfile*/ )
{
int trashId;
- QString fileId, relativePath;
+ TQString fileId, relativePath;
bool ok = TrashImpl::parseURL( url, trashId, fileId, relativePath );
if ( !ok ) {
@@ -342,14 +342,14 @@ void TrashProtocol::listDir(const KURL& url)
return;
}
int trashId;
- QString fileId;
- QString relativePath;
+ TQString fileId;
+ TQString relativePath;
bool ok = TrashImpl::parseURL( url, trashId, fileId, relativePath );
if ( !ok ) {
error( KIO::ERR_SLAVE_DEFINED, i18n( "Malformed URL %1" ).arg( url.prettyURL() ) );
return;
}
- //was: const QString physicalPath = impl.physicalPath( trashId, fileId, relativePath );
+ //was: const TQString physicalPath = impl.physicalPath( trashId, fileId, relativePath );
// Get info for deleted directory - the date of deletion and orig path will be used
// for all the items in it, and we need the physicalPath.
@@ -366,22 +366,22 @@ void TrashProtocol::listDir(const KURL& url)
// List subdir. Can't use kio_file here since we provide our own info...
kdDebug() << k_funcinfo << "listing " << info.physicalPath << endl;
- QStrList entryNames = impl.listDir( info.physicalPath );
+ TQStrList entryNames = impl.listDir( info.physicalPath );
totalSize( entryNames.count() );
KIO::UDSEntry entry;
- QStrListIterator entryIt( entryNames );
+ TQStrListIterator entryIt( entryNames );
for (; entryIt.current(); ++entryIt) {
- QString fileName = QFile::decodeName( entryIt.current() );
+ TQString fileName = TQFile::decodeName( entryIt.current() );
if ( fileName == ".." )
continue;
- const QString filePath = info.physicalPath + "/" + fileName;
+ const TQString filePath = info.physicalPath + "/" + fileName;
// shouldn't be necessary
- //const QString url = TrashImpl::makeURL( trashId, fileId, relativePath + "/" + fileName );
+ //const TQString url = TrashImpl::makeURL( trashId, fileId, relativePath + "/" + fileName );
entry.clear();
TrashedFileInfo infoForItem( info );
infoForItem.origPath += '/';
infoForItem.origPath += fileName;
- if ( ok && createUDSEntry( filePath, fileName, QString::null /*url*/, entry, infoForItem ) ) {
+ if ( ok && createUDSEntry( filePath, fileName, TQString::null /*url*/, entry, infoForItem ) ) {
listEntry( entry, false );
}
}
@@ -390,9 +390,9 @@ void TrashProtocol::listDir(const KURL& url)
finished();
}
-bool TrashProtocol::createUDSEntry( const QString& physicalPath, const QString& fileName, const QString& url, KIO::UDSEntry& entry, const TrashedFileInfo& info )
+bool TrashProtocol::createUDSEntry( const TQString& physicalPath, const TQString& fileName, const TQString& url, KIO::UDSEntry& entry, const TrashedFileInfo& info )
{
- QCString physicalPath_c = QFile::encodeName( physicalPath );
+ TQCString physicalPath_c = TQFile::encodeName( physicalPath );
KDE_struct_stat buff;
if ( KDE_lstat( physicalPath_c, &buff ) == -1 ) {
kdWarning() << "couldn't stat " << physicalPath << endl;
@@ -405,7 +405,7 @@ bool TrashProtocol::createUDSEntry( const QString& physicalPath, const QString&
buffer2[ n ] = 0;
}
- addAtom( entry, KIO::UDS_LINK_DEST, 0, QFile::decodeName( buffer2 ) );
+ addAtom( entry, KIO::UDS_LINK_DEST, 0, TQFile::decodeName( buffer2 ) );
// Follow symlink
// That makes sense in kio_file, but not in the trash, especially for the size
// #136876
@@ -449,7 +449,7 @@ void TrashProtocol::listRoot()
createTopLevelDirEntry( entry );
listEntry( entry, false );
for ( TrashedFileInfoList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
- const KURL url = TrashImpl::makeURL( (*it).trashId, (*it).fileId, QString::null );
+ const KURL url = TrashImpl::makeURL( (*it).trashId, (*it).fileId, TQString::null );
KURL origURL;
origURL.setPath( (*it).origPath );
entry.clear();
@@ -461,10 +461,10 @@ void TrashProtocol::listRoot()
finished();
}
-void TrashProtocol::special( const QByteArray & data )
+void TrashProtocol::special( const TQByteArray & data )
{
INIT_IMPL;
- QDataStream stream( data, IO_ReadOnly );
+ TQDataStream stream( data, IO_ReadOnly );
int cmd;
stream >> cmd;
@@ -488,7 +488,7 @@ void TrashProtocol::special( const QByteArray & data )
}
default:
kdWarning(7116) << "Unknown command in special(): " << cmd << endl;
- error( KIO::ERR_UNSUPPORTED_ACTION, QString::number(cmd) );
+ error( KIO::ERR_UNSUPPORTED_ACTION, TQString::number(cmd) );
break;
}
}
@@ -516,14 +516,14 @@ void TrashProtocol::get( const KURL& url )
return;
}
int trashId;
- QString fileId;
- QString relativePath;
+ TQString fileId;
+ TQString relativePath;
bool ok = TrashImpl::parseURL( url, trashId, fileId, relativePath );
if ( !ok ) {
error( KIO::ERR_SLAVE_DEFINED, i18n( "Malformed URL %1" ).arg( url.prettyURL() ) );
return;
}
- const QString physicalPath = impl.physicalPath( trashId, fileId, relativePath );
+ const TQString physicalPath = impl.physicalPath( trashId, fileId, relativePath );
if ( physicalPath.isEmpty() ) {
error( impl.lastErrorCode(), impl.lastErrorMessage() );
return;
@@ -534,21 +534,21 @@ void TrashProtocol::get( const KURL& url )
KURL fileURL;
fileURL.setPath( physicalPath );
KIO::Job* job = KIO::get( fileURL );
- connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) );
- connect( job, SIGNAL( mimetype( KIO::Job*, const QString& ) ),
- this, SLOT( slotMimetype( KIO::Job*, const QString& ) ) );
- connect( job, SIGNAL( result(KIO::Job *) ),
- this, SLOT( jobFinished(KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) );
+ connect( job, TQT_SIGNAL( mimetype( KIO::Job*, const TQString& ) ),
+ this, TQT_SLOT( slotMimetype( KIO::Job*, const TQString& ) ) );
+ connect( job, TQT_SIGNAL( result(KIO::Job *) ),
+ this, TQT_SLOT( jobFinished(KIO::Job *) ) );
qApp->eventLoop()->enterLoop();
}
-void TrashProtocol::slotData( KIO::Job*, const QByteArray&arr )
+void TrashProtocol::slotData( KIO::Job*, const TQByteArray&arr )
{
data( arr );
}
-void TrashProtocol::slotMimetype( KIO::Job*, const QString& mt )
+void TrashProtocol::slotMimetype( KIO::Job*, const TQString& mt )
{
mimeType( mt );
}
@@ -570,13 +570,13 @@ void TrashProtocol::mkdir( const KURL& url, int /*permissions*/ )
// ############ Problem: we don't know the original path.
// Let's try to avoid this case (we should get to copy() instead, for local files)
kdDebug() << "mkdir: " << url << endl;
- QString dir = url.directory();
+ TQString dir = url.directory();
if ( dir.length() <= 1 ) // new toplevel entry
{
// ## we should use TrashImpl::parseURL to give the right filename to createInfo
int trashId;
- QString fileId;
+ TQString fileId;
if ( !impl.createInfo( url.path(), trashId, fileId ) ) {
error( impl.lastErrorCode(), impl.lastErrorMessage() );
} else {
diff --git a/kioslave/trash/kio_trash.h b/kioslave/trash/kio_trash.h
index 726db431e..37ea1944f 100644
--- a/kioslave/trash/kio_trash.h
+++ b/kioslave/trash/kio_trash.h
@@ -27,11 +27,11 @@ namespace KIO { class Job; }
typedef TrashImpl::TrashedFileInfo TrashedFileInfo;
typedef TrashImpl::TrashedFileInfoList TrashedFileInfoList;
-class TrashProtocol : public QObject, public KIO::SlaveBase
+class TrashProtocol : public TQObject, public KIO::SlaveBase
{
Q_OBJECT
public:
- TrashProtocol( const QCString& protocol, const QCString &pool, const QCString &app);
+ TrashProtocol( const TQCString& protocol, const TQCString &pool, const TQCString &app);
virtual ~TrashProtocol();
virtual void stat(const KURL& url);
virtual void listDir(const KURL& url);
@@ -47,25 +47,25 @@ public:
* 2 : migrate old (pre-kde-3.4) trash contents
* 3 : restore a file to its original location. Args: KURL trashURL.
*/
- virtual void special( const QByteArray & data );
+ virtual void special( const TQByteArray & data );
private slots:
- void slotData( KIO::Job*, const QByteArray& );
- void slotMimetype( KIO::Job*, const QString& );
+ void slotData( KIO::Job*, const TQByteArray& );
+ void slotMimetype( KIO::Job*, const TQString& );
void jobFinished( KIO::Job* job );
private:
typedef enum CopyOrMove { Copy, Move };
void copyOrMove( const KURL& src, const KURL& dest, bool overwrite, CopyOrMove action );
void createTopLevelDirEntry(KIO::UDSEntry& entry);
- bool createUDSEntry( const QString& physicalPath, const QString& fileName, const QString& url,
+ bool createUDSEntry( const TQString& physicalPath, const TQString& fileName, const TQString& url,
KIO::UDSEntry& entry, const TrashedFileInfo& info );
void listRoot();
void restore( const KURL& trashURL );
TrashImpl impl;
- QString m_userName;
- QString m_groupName;
+ TQString m_userName;
+ TQString m_groupName;
};
#endif
diff --git a/kioslave/trash/ktrash.cpp b/kioslave/trash/ktrash.cpp
index 4fa5ccd27..0c9710367 100644
--- a/kioslave/trash/ktrash.cpp
+++ b/kioslave/trash/ktrash.cpp
@@ -50,8 +50,8 @@ int main(int argc, char *argv[])
if ( args->isSet( "empty" ) ) {
// We use a kio job instead of linking to TrashImpl, for a smaller binary
// (and the possibility of a central service at some point)
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)1;
KIO::Job* job = KIO::special( "trash:/", packedArgs );
(void)KIO::NetAccess::synchronousRun( job, 0 );
@@ -65,8 +65,8 @@ int main(int argc, char *argv[])
#if 0
// This is only for testing. KDesktop handles it automatically.
if ( args->isSet( "migrate" ) ) {
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)2;
KIO::Job* job = KIO::special( "trash:/", packedArgs );
(void)KIO::NetAccess::synchronousRun( job, 0 );
@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
}
#endif
- QCString restoreArg = args->getOption( "restore" );
+ TQCString restoreArg = args->getOption( "restore" );
if ( !restoreArg.isEmpty() ) {
if (restoreArg.find("system:/trash")==0) {
@@ -88,8 +88,8 @@ int main(int argc, char *argv[])
return 1;
}
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)3 << trashURL;
KIO::Job* job = KIO::special( trashURL, packedArgs );
bool ok = KIO::NetAccess::synchronousRun( job, 0 );
diff --git a/kioslave/trash/testtrash.cpp b/kioslave/trash/testtrash.cpp
index 4557c5031..fb6927d3e 100644
--- a/kioslave/trash/testtrash.cpp
+++ b/kioslave/trash/testtrash.cpp
@@ -34,9 +34,9 @@
#include <kdebug.h>
#include <kcmdlineargs.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qvaluevector.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqvaluevector.h>
#include <stdio.h>
#include <stdlib.h>
@@ -45,12 +45,12 @@
#include <kfileitem.h>
#include <kstandarddirs.h>
-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;
}
@@ -69,7 +69,7 @@ static bool check(const QString& txt, QString a, QString b)
int main(int argc, char *argv[])
{
- // Ensure a known QFile::encodeName behavior for trashUtf8FileFromHome
+ // Ensure a known TQFile::encodeName behavior for trashUtf8FileFromHome
// However this assume your $HOME doesn't use characters from other locales...
setenv( "LC_ALL", "en_GB.ISO-8859-1", 1 );
#ifdef UTF8TEST
@@ -79,7 +79,7 @@ int main(int argc, char *argv[])
#endif
// Use another directory than the real one, just to keep things clean
- setenv( "XDG_DATA_HOME", QFile::encodeName( QDir::homeDirPath() + "/.local-testtrash" ), true );
+ setenv( "XDG_DATA_HOME", TQFile::encodeName( TQDir::homeDirPath() + "/.local-testtrash" ), true );
setenv( "KDE_FORK_SLAVES", "yes", true );
KApplication::disableAutoDcopRegistration();
@@ -93,44 +93,44 @@ int main(int argc, char *argv[])
return 0; // success. The exit(1) in check() is what happens in case of failure.
}
-QString TestTrash::homeTmpDir() const
+TQString TestTrash::homeTmpDir() const
{
- return QDir::homeDirPath() + "/.kde/testtrash/";
+ return TQDir::homeDirPath() + "/.kde/testtrash/";
}
-QString TestTrash::readOnlyDirPath() const
+TQString TestTrash::readOnlyDirPath() const
{
- return homeTmpDir() + QString( "readonly" );
+ return homeTmpDir() + TQString( "readonly" );
}
-QString TestTrash::otherTmpDir() const
+TQString TestTrash::otherTmpDir() const
{
// This one needs to be on another partition
return "/tmp/testtrash/";
}
-QString TestTrash::utf8FileName() const
+TQString TestTrash::utf8FileName() const
{
- return QString( "test" ) + QChar( 0x2153 ); // "1/3" character, not part of latin1
+ return TQString( "test" ) + TQChar( 0x2153 ); // "1/3" character, not part of latin1
}
-QString TestTrash::umlautFileName() const
+TQString TestTrash::umlautFileName() const
{
- return QString( "umlaut" ) + QChar( 0xEB );
+ return TQString( "umlaut" ) + TQChar( 0xEB );
}
-static void removeFile( const QString& trashDir, const QString& fileName )
+static void removeFile( const TQString& trashDir, const TQString& fileName )
{
- QDir dir;
+ TQDir dir;
dir.remove( trashDir + fileName );
- assert( !QDir( trashDir + fileName ).exists() );
+ assert( !TQDir( trashDir + fileName ).exists() );
}
-static void removeDir( const QString& trashDir, const QString& dirName )
+static void removeDir( const TQString& trashDir, const TQString& dirName )
{
- QDir dir;
+ TQDir dir;
dir.rmdir( trashDir + dirName );
- assert( !QDir( trashDir + dirName ).exists() );
+ assert( !TQDir( trashDir + dirName ).exists() );
}
void TestTrash::setup()
@@ -148,7 +148,7 @@ void TestTrash::setup()
m_otherPartitionId = 0;
m_tmpIsWritablePartition = false;
m_tmpTrashId = -1;
- QValueVector<int> writableTopDirs;
+ TQValueVector<int> writableTopDirs;
for ( TrashImpl::TrashDirMap::ConstIterator it = trashDirs.begin(); it != trashDirs.end() ; ++it ) {
if ( it.key() == 0 ) {
assert( it.data() == m_trashDir );
@@ -156,8 +156,8 @@ void TestTrash::setup()
foundTrashDir = true;
} else {
assert( topDirs.find( it.key() ) != topDirs.end() );
- const QString topdir = topDirs[it.key()];
- if ( QFileInfo( topdir ).isWritable() ) {
+ const TQString topdir = topDirs[it.key()];
+ if ( TQFileInfo( topdir ).isWritable() ) {
writableTopDirs.append( it.key() );
if ( topdir == "/tmp/" ) {
m_tmpIsWritablePartition = true;
@@ -174,9 +174,9 @@ void TestTrash::setup()
}
}
}
- for ( QValueVector<int>::const_iterator it = writableTopDirs.begin(); it != writableTopDirs.end(); ++it ) {
- const QString topdir = topDirs[ *it ];
- const QString trashdir = trashDirs[ *it ];
+ for ( TQValueVector<int>::const_iterator it = writableTopDirs.begin(); it != writableTopDirs.end(); ++it ) {
+ const TQString topdir = topDirs[ *it ];
+ const TQString trashdir = trashDirs[ *it ];
assert( !topdir.isEmpty() );
assert( !trashDirs.isEmpty() );
if ( topdir != "/tmp/" || // we'd prefer not to use /tmp here, to separate the tests
@@ -196,17 +196,17 @@ void TestTrash::setup()
kdWarning() << "No writable partition other than $HOME found, some tests will be skipped" << endl;
// Start with a clean base dir
- if ( QFileInfo( homeTmpDir() ).exists() ) {
+ if ( TQFileInfo( homeTmpDir() ).exists() ) {
bool ok = KIO::NetAccess::del( homeTmpDir(), 0 );
if ( !ok )
kdFatal() << "Couldn't delete " << homeTmpDir() << endl;
}
- if ( QFileInfo( otherTmpDir() ).exists() ) {
+ if ( TQFileInfo( otherTmpDir() ).exists() ) {
bool ok = KIO::NetAccess::del( otherTmpDir(), 0 );
if ( !ok )
kdFatal() << "Couldn't delete " << otherTmpDir() << endl;
}
- QDir dir; // TT: why not a static method?
+ TQDir dir; // TT: why not a static method?
bool ok = dir.mkdir( homeTmpDir() );
if ( !ok )
kdFatal() << "Couldn't create " << homeTmpDir() << endl;
@@ -325,17 +325,17 @@ void TestTrash::runAll()
void TestTrash::urlTestFile()
{
- const KURL url = TrashImpl::makeURL( 1, "fileId", QString::null );
+ const KURL url = TrashImpl::makeURL( 1, "fileId", TQString::null );
check( "makeURL for a file", url.url(), "trash:/1-fileId" );
int trashId;
- QString fileId;
- QString relativePath;
+ TQString fileId;
+ TQString relativePath;
bool ok = TrashImpl::parseURL( url, trashId, fileId, relativePath );
assert( ok );
- check( "parseURL: trashId", QString::number( trashId ), "1" );
+ check( "parseURL: trashId", TQString::number( trashId ), "1" );
check( "parseURL: fileId", fileId, "fileId" );
- check( "parseURL: relativePath", relativePath, QString::null );
+ check( "parseURL: relativePath", relativePath, TQString::null );
}
void TestTrash::urlTestDirectory()
@@ -344,11 +344,11 @@ void TestTrash::urlTestDirectory()
check( "makeURL", url.url(), "trash:/1-fileId/subfile" );
int trashId;
- QString fileId;
- QString relativePath;
+ TQString fileId;
+ TQString relativePath;
bool ok = TrashImpl::parseURL( url, trashId, fileId, relativePath );
assert( ok );
- check( "parseURL: trashId", QString::number( trashId ), "1" );
+ check( "parseURL: trashId", TQString::number( trashId ), "1" );
check( "parseURL: fileId", fileId, "fileId" );
check( "parseURL: relativePath", relativePath, "subfile" );
}
@@ -359,54 +359,54 @@ void TestTrash::urlTestSubDirectory()
check( "makeURL", url.url(), "trash:/1-fileId/subfile/foobar" );
int trashId;
- QString fileId;
- QString relativePath;
+ TQString fileId;
+ TQString relativePath;
bool ok = TrashImpl::parseURL( url, trashId, fileId, relativePath );
assert( ok );
- check( "parseURL: trashId", QString::number( trashId ), "1" );
+ check( "parseURL: trashId", TQString::number( trashId ), "1" );
check( "parseURL: fileId", fileId, "fileId" );
check( "parseURL: relativePath", relativePath, "subfile/foobar" );
}
-static void checkInfoFile( const QString& infoPath, const QString& origFilePath )
+static void checkInfoFile( const TQString& infoPath, const TQString& origFilePath )
{
kdDebug() << k_funcinfo << infoPath << endl;
- QFileInfo info( infoPath );
+ TQFileInfo info( infoPath );
assert( info.exists() );
assert( info.isFile() );
KSimpleConfig infoFile( info.absFilePath(), true );
if ( !infoFile.hasGroup( "Trash Info" ) )
kdFatal() << "no Trash Info group in " << info.absFilePath() << endl;
infoFile.setGroup( "Trash Info" );
- const QString origPath = infoFile.readEntry( "Path" );
+ const TQString origPath = infoFile.readEntry( "Path" );
assert( !origPath.isEmpty() );
assert( origPath == KURL::encode_string( origFilePath, KGlobal::locale()->fileEncodingMib() ) );
- const QString date = infoFile.readEntry( "DeletionDate" );
+ const TQString date = infoFile.readEntry( "DeletionDate" );
assert( !date.isEmpty() );
assert( date.contains( "T" ) );
}
-static void createTestFile( const QString& path )
+static void createTestFile( const TQString& path )
{
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_WriteOnly ) )
kdFatal() << "Can't create " << path << endl;
f.writeBlock( "Hello world\n", 12 );
f.close();
- assert( QFile::exists( path ) );
+ assert( TQFile::exists( path ) );
}
-void TestTrash::trashFile( const QString& origFilePath, const QString& fileId )
+void TestTrash::trashFile( const TQString& origFilePath, const TQString& fileId )
{
// setup
- if ( !QFile::exists( origFilePath ) )
+ if ( !TQFile::exists( origFilePath ) )
createTestFile( origFilePath );
KURL u;
u.setPath( origFilePath );
// test
KIO::Job* job = KIO::move( u, "trash:/" );
- QMap<QString, QString> metaData;
+ TQMap<TQString, TQString> metaData;
//bool ok = KIO::NetAccess::move( u, "trash:/" );
bool ok = KIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
if ( !ok )
@@ -417,20 +417,20 @@ void TestTrash::trashFile( const QString& origFilePath, const QString& fileId )
} else {
checkInfoFile( m_trashDir + "/info/" + fileId + ".trashinfo", origFilePath );
- QFileInfo files( m_trashDir + "/files/" + fileId );
+ TQFileInfo files( m_trashDir + "/files/" + fileId );
assert( files.isFile() );
assert( files.size() == 12 );
}
// coolo suggests testing that the original file is actually gone, too :)
- assert( !QFile::exists( origFilePath ) );
+ assert( !TQFile::exists( origFilePath ) );
assert( !metaData.isEmpty() );
bool found = false;
- QMap<QString, QString>::ConstIterator it = metaData.begin();
+ TQMap<TQString, TQString>::ConstIterator it = metaData.begin();
for ( ; it != metaData.end() ; ++it ) {
if ( it.key().startsWith( "trashURL" ) ) {
- const QString origPath = it.key().mid( 9 );
+ const TQString origPath = it.key().mid( 9 );
KURL trashURL( it.data() );
kdDebug() << trashURL << endl;
assert( !trashURL.isEmpty() );
@@ -438,7 +438,7 @@ void TestTrash::trashFile( const QString& origFilePath, const QString& fileId )
int trashId = 0;
if ( origFilePath.startsWith( "/tmp" ) && m_tmpIsWritablePartition )
trashId = m_tmpTrashId;
- assert( trashURL.path() == "/" + QString::number( trashId ) + "-" + fileId );
+ assert( trashURL.path() == "/" + TQString::number( trashId ) + "-" + fileId );
found = true;
}
}
@@ -448,7 +448,7 @@ void TestTrash::trashFile( const QString& origFilePath, const QString& fileId )
void TestTrash::trashFileFromHome()
{
kdDebug() << k_funcinfo << endl;
- const QString fileName = "fileFromHome";
+ const TQString fileName = "fileFromHome";
trashFile( homeTmpDir() + fileName, fileName );
// Do it again, check that we got a different id
@@ -458,21 +458,21 @@ void TestTrash::trashFileFromHome()
void TestTrash::trashPercentFileFromHome()
{
kdDebug() << k_funcinfo << endl;
- const QString fileName = "file%2f";
+ const TQString fileName = "file%2f";
trashFile( homeTmpDir() + fileName, fileName );
}
void TestTrash::trashUtf8FileFromHome()
{
kdDebug() << k_funcinfo << endl;
- const QString fileName = utf8FileName();
+ const TQString fileName = utf8FileName();
trashFile( homeTmpDir() + fileName, fileName );
}
void TestTrash::trashUmlautFileFromHome()
{
kdDebug() << k_funcinfo << endl;
- const QString fileName = umlautFileName();
+ const TQString fileName = umlautFileName();
trashFile( homeTmpDir() + fileName, fileName );
}
@@ -487,7 +487,7 @@ void TestTrash::testTrashNotEmpty()
void TestTrash::trashFileFromOther()
{
kdDebug() << k_funcinfo << endl;
- const QString fileName = "fileFromOther";
+ const TQString fileName = "fileFromOther";
trashFile( otherTmpDir() + fileName, fileName );
}
@@ -498,45 +498,45 @@ void TestTrash::trashFileIntoOtherPartition()
return;
}
kdDebug() << k_funcinfo << endl;
- const QString fileName = "testtrash-file";
- const QString origFilePath = m_otherPartitionTopDir + fileName;
- const QString fileId = fileName;
+ const TQString fileName = "testtrash-file";
+ const TQString origFilePath = m_otherPartitionTopDir + fileName;
+ const TQString fileId = fileName;
// cleanup
- QFile::remove( m_otherPartitionTrashDir + "/info/" + fileId + ".trashinfo" );
- QFile::remove( m_otherPartitionTrashDir + "/files/" + fileId );
+ TQFile::remove( m_otherPartitionTrashDir + "/info/" + fileId + ".trashinfo" );
+ TQFile::remove( m_otherPartitionTrashDir + "/files/" + fileId );
// setup
- if ( !QFile::exists( origFilePath ) )
+ if ( !TQFile::exists( origFilePath ) )
createTestFile( origFilePath );
KURL u;
u.setPath( origFilePath );
// test
KIO::Job* job = KIO::move( u, "trash:/" );
- QMap<QString, QString> metaData;
+ TQMap<TQString, TQString> metaData;
bool ok = KIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
assert( ok );
// Note that the Path stored in the info file is relative, on other partitions (#95652)
checkInfoFile( m_otherPartitionTrashDir + "/info/" + fileId + ".trashinfo", fileName );
- QFileInfo files( m_otherPartitionTrashDir + "/files/" + fileId );
+ TQFileInfo files( m_otherPartitionTrashDir + "/files/" + fileId );
assert( files.isFile() );
assert( files.size() == 12 );
// coolo suggests testing that the original file is actually gone, too :)
- assert( !QFile::exists( origFilePath ) );
+ assert( !TQFile::exists( origFilePath ) );
assert( !metaData.isEmpty() );
bool found = false;
- QMap<QString, QString>::ConstIterator it = metaData.begin();
+ TQMap<TQString, TQString>::ConstIterator it = metaData.begin();
for ( ; it != metaData.end() ; ++it ) {
if ( it.key().startsWith( "trashURL" ) ) {
- const QString origPath = it.key().mid( 9 );
+ const TQString origPath = it.key().mid( 9 );
KURL trashURL( it.data() );
kdDebug() << trashURL << endl;
assert( !trashURL.isEmpty() );
assert( trashURL.protocol() == "trash" );
- assert( trashURL.path() == QString( "/%1-%2" ).arg( m_otherPartitionId ).arg( fileId ) );
+ assert( trashURL.path() == TQString( "/%1-%2" ).arg( m_otherPartitionId ).arg( fileId ) );
found = true;
}
}
@@ -548,30 +548,30 @@ void TestTrash::trashFileOwnedByRoot()
kdDebug() << k_funcinfo << endl;
KURL u;
u.setPath( "/etc/passwd" );
- const QString fileId = "passwd";
+ const TQString fileId = "passwd";
KIO::CopyJob* job = KIO::move( u, "trash:/" );
job->setInteractive( false ); // no skip dialog, thanks
- QMap<QString, QString> metaData;
+ TQMap<TQString, TQString> metaData;
//bool ok = KIO::NetAccess::move( u, "trash:/" );
bool ok = KIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
assert( !ok );
assert( KIO::NetAccess::lastError() == KIO::ERR_ACCESS_DENIED );
- const QString infoPath( m_trashDir + "/info/" + fileId + ".trashinfo" );
- assert( !QFile::exists( infoPath ) );
+ const TQString infoPath( m_trashDir + "/info/" + fileId + ".trashinfo" );
+ assert( !TQFile::exists( infoPath ) );
- QFileInfo files( m_trashDir + "/files/" + fileId );
+ TQFileInfo files( m_trashDir + "/files/" + fileId );
assert( !files.exists() );
- assert( QFile::exists( u.path() ) );
+ assert( TQFile::exists( u.path() ) );
}
-void TestTrash::trashSymlink( const QString& origFilePath, const QString& fileId, bool broken )
+void TestTrash::trashSymlink( const TQString& origFilePath, const TQString& fileId, bool broken )
{
kdDebug() << k_funcinfo << endl;
// setup
const char* target = broken ? "/nonexistent" : "/tmp";
- bool ok = ::symlink( target, QFile::encodeName( origFilePath ) ) == 0;
+ bool ok = ::symlink( target, TQFile::encodeName( origFilePath ) ) == 0;
assert( ok );
KURL u;
u.setPath( origFilePath );
@@ -585,39 +585,39 @@ void TestTrash::trashSymlink( const QString& origFilePath, const QString& fileId
}
checkInfoFile( m_trashDir + "/info/" + fileId + ".trashinfo", origFilePath );
- QFileInfo files( m_trashDir + "/files/" + fileId );
+ TQFileInfo files( m_trashDir + "/files/" + fileId );
assert( files.isSymLink() );
- assert( files.readLink() == QFile::decodeName( target ) );
- assert( !QFile::exists( origFilePath ) );
+ assert( files.readLink() == TQFile::decodeName( target ) );
+ assert( !TQFile::exists( origFilePath ) );
}
void TestTrash::trashSymlinkFromHome()
{
kdDebug() << k_funcinfo << endl;
- const QString fileName = "symlinkFromHome";
+ const TQString fileName = "symlinkFromHome";
trashSymlink( homeTmpDir() + fileName, fileName, false );
}
void TestTrash::trashSymlinkFromOther()
{
kdDebug() << k_funcinfo << endl;
- const QString fileName = "symlinkFromOther";
+ const TQString fileName = "symlinkFromOther";
trashSymlink( otherTmpDir() + fileName, fileName, false );
}
void TestTrash::trashBrokenSymlinkFromHome()
{
kdDebug() << k_funcinfo << endl;
- const QString fileName = "brokenSymlinkFromHome";
+ const TQString fileName = "brokenSymlinkFromHome";
trashSymlink( homeTmpDir() + fileName, fileName, true );
}
-void TestTrash::trashDirectory( const QString& origPath, const QString& fileId )
+void TestTrash::trashDirectory( const TQString& origPath, const TQString& fileId )
{
kdDebug() << k_funcinfo << fileId << endl;
// setup
- if ( !QFileInfo( origPath ).exists() ) {
- QDir dir;
+ if ( !TQFileInfo( origPath ).exists() ) {
+ TQDir dir;
bool ok = dir.mkdir( origPath );
Q_ASSERT( ok );
}
@@ -633,19 +633,19 @@ void TestTrash::trashDirectory( const QString& origPath, const QString& fileId )
}
checkInfoFile( m_trashDir + "/info/" + fileId + ".trashinfo", origPath );
- QFileInfo filesDir( m_trashDir + "/files/" + fileId );
+ TQFileInfo filesDir( m_trashDir + "/files/" + fileId );
assert( filesDir.isDir() );
- QFileInfo files( m_trashDir + "/files/" + fileId + "/testfile" );
+ TQFileInfo files( m_trashDir + "/files/" + fileId + "/testfile" );
assert( files.exists() );
assert( files.isFile() );
assert( files.size() == 12 );
- assert( !QFile::exists( origPath ) );
+ assert( !TQFile::exists( origPath ) );
}
void TestTrash::trashDirectoryFromHome()
{
kdDebug() << k_funcinfo << endl;
- QString dirName = "trashDirFromHome";
+ TQString dirName = "trashDirFromHome";
trashDirectory( homeTmpDir() + dirName, dirName );
// Do it again, check that we got a different id
trashDirectory( homeTmpDir() + dirName, dirName + "_1" );
@@ -654,16 +654,16 @@ void TestTrash::trashDirectoryFromHome()
void TestTrash::trashReadOnlyDirFromHome()
{
kdDebug() << k_funcinfo << endl;
- const QString dirName = readOnlyDirPath();
- QDir dir;
+ const TQString dirName = readOnlyDirPath();
+ TQDir dir;
bool ok = dir.mkdir( dirName );
Q_ASSERT( ok );
// #130780
- const QString subDirPath = dirName + "/readonly_subdir";
+ const TQString subDirPath = dirName + "/readonly_subdir";
ok = dir.mkdir( subDirPath );
Q_ASSERT( ok );
createTestFile( subDirPath + "/testfile_in_subdir" );
- ::chmod( QFile::encodeName( subDirPath ), 0500 );
+ ::chmod( TQFile::encodeName( subDirPath ), 0500 );
trashDirectory( dirName, "readonly" );
}
@@ -671,7 +671,7 @@ void TestTrash::trashReadOnlyDirFromHome()
void TestTrash::trashDirectoryFromOther()
{
kdDebug() << k_funcinfo << endl;
- QString dirName = "trashDirFromOther";
+ TQString dirName = "trashDirFromOther";
trashDirectory( otherTmpDir() + dirName, dirName );
}
@@ -696,13 +696,13 @@ void TestTrash::delRootFile()
bool ok = KIO::NetAccess::del( "trash:/0-fileFromHome", 0L );
assert( ok );
- QFileInfo file( m_trashDir + "/files/fileFromHome" );
+ TQFileInfo file( m_trashDir + "/files/fileFromHome" );
assert( !file.exists() );
- QFileInfo info( m_trashDir + "/info/fileFromHome.trashinfo" );
+ TQFileInfo info( m_trashDir + "/info/fileFromHome.trashinfo" );
assert( !info.exists() );
// trash it again, we might need it later
- const QString fileName = "fileFromHome";
+ const TQString fileName = "fileFromHome";
trashFile( homeTmpDir() + fileName, fileName );
}
@@ -715,11 +715,11 @@ void TestTrash::delFileInDirectory()
assert( !ok );
assert( KIO::NetAccess::lastError() == KIO::ERR_ACCESS_DENIED );
- QFileInfo dir( m_trashDir + "/files/trashDirFromHome" );
+ TQFileInfo dir( m_trashDir + "/files/trashDirFromHome" );
assert( dir.exists() );
- QFileInfo file( m_trashDir + "/files/trashDirFromHome/testfile" );
+ TQFileInfo file( m_trashDir + "/files/trashDirFromHome/testfile" );
assert( file.exists() );
- QFileInfo info( m_trashDir + "/info/trashDirFromHome.trashinfo" );
+ TQFileInfo info( m_trashDir + "/info/trashDirFromHome.trashinfo" );
assert( info.exists() );
}
@@ -731,15 +731,15 @@ void TestTrash::delDirectory()
bool ok = KIO::NetAccess::del( "trash:/0-trashDirFromHome", 0L );
assert( ok );
- QFileInfo dir( m_trashDir + "/files/trashDirFromHome" );
+ TQFileInfo dir( m_trashDir + "/files/trashDirFromHome" );
assert( !dir.exists() );
- QFileInfo file( m_trashDir + "/files/trashDirFromHome/testfile" );
+ TQFileInfo file( m_trashDir + "/files/trashDirFromHome/testfile" );
assert( !file.exists() );
- QFileInfo info( m_trashDir + "/info/trashDirFromHome.trashinfo" );
+ TQFileInfo info( m_trashDir + "/info/trashDirFromHome.trashinfo" );
assert( !info.exists() );
// trash it again, we'll need it later
- QString dirName = "trashDirFromHome";
+ TQString dirName = "trashDirFromHome";
trashDirectory( homeTmpDir() + dirName, dirName );
}
@@ -829,7 +829,7 @@ void TestTrash::statFileInDirectory()
assert( !item.acceptsDrops() );
}
-void TestTrash::copyFromTrash( const QString& fileId, const QString& destPath, const QString& relativePath )
+void TestTrash::copyFromTrash( const TQString& fileId, const TQString& destPath, const TQString& relativePath )
{
KURL src( "trash:/0-" + fileId );
if ( !relativePath.isEmpty() )
@@ -837,57 +837,57 @@ void TestTrash::copyFromTrash( const QString& fileId, const QString& destPath, c
KURL dest;
dest.setPath( destPath );
- assert( KIO::NetAccess::exists( src, true, (QWidget*)0 ) );
+ assert( KIO::NetAccess::exists( src, true, (TQWidget*)0 ) );
// A dnd would use copy(), but we use copyAs to ensure the final filename
//kdDebug() << k_funcinfo << "copyAs:" << src << " -> " << dest << endl;
KIO::Job* job = KIO::copyAs( src, dest );
bool ok = KIO::NetAccess::synchronousRun( job, 0 );
assert( ok );
- QString infoFile( m_trashDir + "/info/" + fileId + ".trashinfo" );
- assert( QFile::exists( infoFile ) );
+ TQString infoFile( m_trashDir + "/info/" + fileId + ".trashinfo" );
+ assert( TQFile::exists( infoFile ) );
- QFileInfo filesItem( m_trashDir + "/files/" + fileId );
+ TQFileInfo filesItem( m_trashDir + "/files/" + fileId );
assert( filesItem.exists() );
- assert( QFile::exists( destPath ) );
+ assert( TQFile::exists( destPath ) );
}
void TestTrash::copyFileFromTrash()
{
kdDebug() << k_funcinfo << endl;
- const QString destPath = otherTmpDir() + "fileFromHome_copied";
+ const TQString destPath = otherTmpDir() + "fileFromHome_copied";
copyFromTrash( "fileFromHome", destPath );
- assert( QFileInfo( destPath ).isFile() );
- assert( QFileInfo( destPath ).size() == 12 );
+ assert( TQFileInfo( destPath ).isFile() );
+ assert( TQFileInfo( destPath ).size() == 12 );
}
void TestTrash::copyFileInDirectoryFromTrash()
{
kdDebug() << k_funcinfo << endl;
- const QString destPath = otherTmpDir() + "testfile_copied";
+ const TQString destPath = otherTmpDir() + "testfile_copied";
copyFromTrash( "trashDirFromHome", destPath, "testfile" );
- assert( QFileInfo( destPath ).isFile() );
- assert( QFileInfo( destPath ).size() == 12 );
+ assert( TQFileInfo( destPath ).isFile() );
+ assert( TQFileInfo( destPath ).size() == 12 );
}
void TestTrash::copyDirectoryFromTrash()
{
kdDebug() << k_funcinfo << endl;
- const QString destPath = otherTmpDir() + "trashDirFromHome_copied";
+ const TQString destPath = otherTmpDir() + "trashDirFromHome_copied";
copyFromTrash( "trashDirFromHome", destPath );
- assert( QFileInfo( destPath ).isDir() );
+ assert( TQFileInfo( destPath ).isDir() );
}
void TestTrash::copySymlinkFromTrash()
{
kdDebug() << k_funcinfo << endl;
- const QString destPath = otherTmpDir() + "symlinkFromHome_copied";
+ const TQString destPath = otherTmpDir() + "symlinkFromHome_copied";
copyFromTrash( "symlinkFromHome", destPath );
- assert( QFileInfo( destPath ).isSymLink() );
+ assert( TQFileInfo( destPath ).isSymLink() );
}
-void TestTrash::moveFromTrash( const QString& fileId, const QString& destPath, const QString& relativePath )
+void TestTrash::moveFromTrash( const TQString& fileId, const TQString& destPath, const TQString& relativePath )
{
KURL src( "trash:/0-" + fileId );
if ( !relativePath.isEmpty() )
@@ -895,106 +895,106 @@ void TestTrash::moveFromTrash( const QString& fileId, const QString& destPath, c
KURL dest;
dest.setPath( destPath );
- assert( KIO::NetAccess::exists( src, true, (QWidget*)0 ) );
+ assert( KIO::NetAccess::exists( src, true, (TQWidget*)0 ) );
// A dnd would use move(), but we use moveAs to ensure the final filename
KIO::Job* job = KIO::moveAs( src, dest );
bool ok = KIO::NetAccess::synchronousRun( job, 0 );
assert( ok );
- QString infoFile( m_trashDir + "/info/" + fileId + ".trashinfo" );
- assert( !QFile::exists( infoFile ) );
+ TQString infoFile( m_trashDir + "/info/" + fileId + ".trashinfo" );
+ assert( !TQFile::exists( infoFile ) );
- QFileInfo filesItem( m_trashDir + "/files/" + fileId );
+ TQFileInfo filesItem( m_trashDir + "/files/" + fileId );
assert( !filesItem.exists() );
- assert( QFile::exists( destPath ) );
+ assert( TQFile::exists( destPath ) );
}
void TestTrash::moveFileFromTrash()
{
kdDebug() << k_funcinfo << endl;
- const QString destPath = otherTmpDir() + "fileFromHome_restored";
+ const TQString destPath = otherTmpDir() + "fileFromHome_restored";
moveFromTrash( "fileFromHome", destPath );
- assert( QFileInfo( destPath ).isFile() );
- assert( QFileInfo( destPath ).size() == 12 );
+ assert( TQFileInfo( destPath ).isFile() );
+ assert( TQFileInfo( destPath ).size() == 12 );
// trash it again for later
- const QString fileName = "fileFromHome";
+ const TQString fileName = "fileFromHome";
trashFile( homeTmpDir() + fileName, fileName );
}
void TestTrash::moveFileInDirectoryFromTrash()
{
kdDebug() << k_funcinfo << endl;
- const QString destPath = otherTmpDir() + "testfile_restored";
+ const TQString destPath = otherTmpDir() + "testfile_restored";
copyFromTrash( "trashDirFromHome", destPath, "testfile" );
- assert( QFileInfo( destPath ).isFile() );
- assert( QFileInfo( destPath ).size() == 12 );
+ assert( TQFileInfo( destPath ).isFile() );
+ assert( TQFileInfo( destPath ).size() == 12 );
}
void TestTrash::moveDirectoryFromTrash()
{
kdDebug() << k_funcinfo << endl;
- const QString destPath = otherTmpDir() + "trashDirFromHome_restored";
+ const TQString destPath = otherTmpDir() + "trashDirFromHome_restored";
moveFromTrash( "trashDirFromHome", destPath );
- assert( QFileInfo( destPath ).isDir() );
+ assert( TQFileInfo( destPath ).isDir() );
// trash it again, we'll need it later
- QString dirName = "trashDirFromHome";
+ TQString dirName = "trashDirFromHome";
trashDirectory( homeTmpDir() + dirName, dirName );
}
void TestTrash::trashDirectoryOwnedByRoot()
{
KURL u;
- if ( QFile::exists( "/etc/cups" ) )
+ if ( TQFile::exists( "/etc/cups" ) )
u.setPath( "/etc/cups" );
- else if ( QFile::exists( "/boot" ) )
+ else if ( TQFile::exists( "/boot" ) )
u.setPath( "/boot" );
else
u.setPath( "/etc" );
- const QString fileId = u.path();
+ const TQString fileId = u.path();
kdDebug() << k_funcinfo << "fileId=" << fileId << endl;
KIO::CopyJob* job = KIO::move( u, "trash:/" );
job->setInteractive( false ); // no skip dialog, thanks
- QMap<QString, QString> metaData;
+ TQMap<TQString, TQString> metaData;
bool ok = KIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
assert( !ok );
const int err = KIO::NetAccess::lastError();
assert( err == KIO::ERR_ACCESS_DENIED
|| err == KIO::ERR_CANNOT_OPEN_FOR_READING );
- const QString infoPath( m_trashDir + "/info/" + fileId + ".trashinfo" );
- assert( !QFile::exists( infoPath ) );
+ const TQString infoPath( m_trashDir + "/info/" + fileId + ".trashinfo" );
+ assert( !TQFile::exists( infoPath ) );
- QFileInfo files( m_trashDir + "/files/" + fileId );
+ TQFileInfo files( m_trashDir + "/files/" + fileId );
assert( !files.exists() );
- assert( QFile::exists( u.path() ) );
+ assert( TQFile::exists( u.path() ) );
}
void TestTrash::moveSymlinkFromTrash()
{
kdDebug() << k_funcinfo << endl;
- const QString destPath = otherTmpDir() + "symlinkFromHome_restored";
+ const TQString destPath = otherTmpDir() + "symlinkFromHome_restored";
moveFromTrash( "symlinkFromHome", destPath );
- assert( QFileInfo( destPath ).isSymLink() );
+ assert( TQFileInfo( destPath ).isSymLink() );
}
void TestTrash::getFile()
{
kdDebug() << k_funcinfo << endl;
- const QString fileId = "fileFromHome_1";
- const KURL url = TrashImpl::makeURL( 0, fileId, QString::null );
- QString tmpFile;
+ const TQString fileId = "fileFromHome_1";
+ const KURL url = TrashImpl::makeURL( 0, fileId, TQString::null );
+ TQString tmpFile;
bool ok = KIO::NetAccess::download( url, tmpFile, 0 );
assert( ok );
- QFile file( tmpFile );
+ TQFile file( tmpFile );
ok = file.open( IO_ReadOnly );
assert( ok );
- QByteArray str = file.readAll();
- QCString cstr( str.data(), str.size() + 1 );
+ TQByteArray str = file.readAll();
+ TQCString cstr( str.data(), str.size() + 1 );
if ( cstr != "Hello world\n" )
kdFatal() << "get() returned the following data:" << cstr << endl;
file.close();
@@ -1004,43 +1004,43 @@ void TestTrash::getFile()
void TestTrash::restoreFile()
{
kdDebug() << k_funcinfo << endl;
- const QString fileId = "fileFromHome_1";
- const KURL url = TrashImpl::makeURL( 0, fileId, QString::null );
- const QString infoFile( m_trashDir + "/info/" + fileId + ".trashinfo" );
- const QString filesItem( m_trashDir + "/files/" + fileId );
+ const TQString fileId = "fileFromHome_1";
+ const KURL url = TrashImpl::makeURL( 0, fileId, TQString::null );
+ const TQString infoFile( m_trashDir + "/info/" + fileId + ".trashinfo" );
+ const TQString filesItem( m_trashDir + "/files/" + fileId );
- assert( QFile::exists( infoFile ) );
- assert( QFile::exists( filesItem ) );
+ assert( TQFile::exists( infoFile ) );
+ assert( TQFile::exists( filesItem ) );
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)3 << url;
KIO::Job* job = KIO::special( url, packedArgs );
bool ok = KIO::NetAccess::synchronousRun( job, 0 );
assert( ok );
- assert( !QFile::exists( infoFile ) );
- assert( !QFile::exists( filesItem ) );
+ assert( !TQFile::exists( infoFile ) );
+ assert( !TQFile::exists( filesItem ) );
- const QString destPath = homeTmpDir() + "fileFromHome";
- assert( QFile::exists( destPath ) );
+ const TQString destPath = homeTmpDir() + "fileFromHome";
+ assert( TQFile::exists( destPath ) );
}
void TestTrash::restoreFileFromSubDir()
{
kdDebug() << k_funcinfo << endl;
- const QString fileId = "trashDirFromHome_1/testfile";
- assert( !QFile::exists( homeTmpDir() + "trashDirFromHome_1" ) );
+ const TQString fileId = "trashDirFromHome_1/testfile";
+ assert( !TQFile::exists( homeTmpDir() + "trashDirFromHome_1" ) );
- const KURL url = TrashImpl::makeURL( 0, fileId, QString::null );
- const QString infoFile( m_trashDir + "/info/trashDirFromHome_1.trashinfo" );
- const QString filesItem( m_trashDir + "/files/trashDirFromHome_1/testfile" );
+ const KURL url = TrashImpl::makeURL( 0, fileId, TQString::null );
+ const TQString infoFile( m_trashDir + "/info/trashDirFromHome_1.trashinfo" );
+ const TQString filesItem( m_trashDir + "/files/trashDirFromHome_1/testfile" );
- assert( QFile::exists( infoFile ) );
- assert( QFile::exists( filesItem ) );
+ assert( TQFile::exists( infoFile ) );
+ assert( TQFile::exists( filesItem ) );
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)3 << url;
KIO::Job* job = KIO::special( url, packedArgs );
bool ok = KIO::NetAccess::synchronousRun( job, 0 );
@@ -1049,9 +1049,9 @@ void TestTrash::restoreFileFromSubDir()
assert( KIO::NetAccess::lastError() == KIO::ERR_SLAVE_DEFINED );
// check that nothing happened
- assert( QFile::exists( infoFile ) );
- assert( QFile::exists( filesItem ) );
- assert( !QFile::exists( homeTmpDir() + "trashDirFromHome_1" ) );
+ assert( TQFile::exists( infoFile ) );
+ assert( TQFile::exists( filesItem ) );
+ assert( !TQFile::exists( homeTmpDir() + "trashDirFromHome_1" ) );
}
void TestTrash::restoreFileToDeletedDirectory()
@@ -1065,16 +1065,16 @@ void TestTrash::restoreFileToDeletedDirectory()
bool delOK = KIO::NetAccess::del( homeTmpDir(), 0 );
assert( delOK );
- const QString fileId = "fileFromHome";
- const KURL url = TrashImpl::makeURL( 0, fileId, QString::null );
- const QString infoFile( m_trashDir + "/info/" + fileId + ".trashinfo" );
- const QString filesItem( m_trashDir + "/files/" + fileId );
+ const TQString fileId = "fileFromHome";
+ const KURL url = TrashImpl::makeURL( 0, fileId, TQString::null );
+ const TQString infoFile( m_trashDir + "/info/" + fileId + ".trashinfo" );
+ const TQString filesItem( m_trashDir + "/files/" + fileId );
- assert( QFile::exists( infoFile ) );
- assert( QFile::exists( filesItem ) );
+ assert( TQFile::exists( infoFile ) );
+ assert( TQFile::exists( filesItem ) );
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)3 << url;
KIO::Job* job = KIO::special( url, packedArgs );
bool ok = KIO::NetAccess::synchronousRun( job, 0 );
@@ -1083,11 +1083,11 @@ void TestTrash::restoreFileToDeletedDirectory()
assert( KIO::NetAccess::lastError() == KIO::ERR_SLAVE_DEFINED );
// check that nothing happened
- assert( QFile::exists( infoFile ) );
- assert( QFile::exists( filesItem ) );
+ assert( TQFile::exists( infoFile ) );
+ assert( TQFile::exists( filesItem ) );
- const QString destPath = homeTmpDir() + "fileFromHome";
- assert( !QFile::exists( destPath ) );
+ const TQString destPath = homeTmpDir() + "fileFromHome";
+ assert( !TQFile::exists( destPath ) );
}
void TestTrash::listRootDir()
@@ -1096,8 +1096,8 @@ void TestTrash::listRootDir()
m_entryCount = 0;
m_listResult.clear();
KIO::ListJob* job = KIO::listDir( "trash:/" );
- connect( job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
- SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) );
+ connect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
+ TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) );
bool ok = KIO::NetAccess::synchronousRun( job, 0 );
assert( ok );
kdDebug() << "listDir done - m_entryCount=" << m_entryCount << endl;
@@ -1113,8 +1113,8 @@ void TestTrash::listRecursiveRootDir()
m_entryCount = 0;
m_listResult.clear();
KIO::ListJob* job = KIO::listRecursive( "trash:/" );
- connect( job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
- SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) );
+ connect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
+ TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) );
bool ok = KIO::NetAccess::synchronousRun( job, 0 );
assert( ok );
kdDebug() << "listDir done - m_entryCount=" << m_entryCount << endl;
@@ -1130,8 +1130,8 @@ void TestTrash::listSubDir()
m_entryCount = 0;
m_listResult.clear();
KIO::ListJob* job = KIO::listDir( "trash:/0-trashDirFromHome" );
- connect( job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
- SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) );
+ connect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ),
+ TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) );
bool ok = KIO::NetAccess::synchronousRun( job, 0 );
assert( ok );
kdDebug() << "listDir done - m_entryCount=" << m_entryCount << endl;
@@ -1146,7 +1146,7 @@ void TestTrash::slotEntries( KIO::Job*, const KIO::UDSEntryList& lst )
{
for( KIO::UDSEntryList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
KIO::UDSEntry::ConstIterator it2 = (*it).begin();
- QString displayName;
+ TQString displayName;
KURL url;
for( ; it2 != (*it).end(); it2++ ) {
switch ((*it2).m_uds) {
@@ -1174,8 +1174,8 @@ void TestTrash::emptyTrash()
// So we can't activate this test by default.
#if 0
kdDebug() << k_funcinfo << endl;
- QByteArray packedArgs;
- QDataStream stream( packedArgs, IO_WriteOnly );
+ TQByteArray packedArgs;
+ TQDataStream stream( packedArgs, IO_WriteOnly );
stream << (int)1;
KIO::Job* job = KIO::special( "trash:/", packedArgs );
bool ok = KIO::NetAccess::synchronousRun( job, 0 );
@@ -1186,9 +1186,9 @@ void TestTrash::emptyTrash()
cfg.setGroup( "Status" );
assert( cfg.readBoolEntry( "Empty", false ) == true );
- assert( !QFile::exists( m_trashDir + "/files/fileFromHome" ) );
- assert( !QFile::exists( m_trashDir + "/files/readonly" ) );
- assert( !QFile::exists( m_trashDir + "/info/readonly.trashinfo" ) );
+ assert( !TQFile::exists( m_trashDir + "/files/fileFromHome" ) );
+ assert( !TQFile::exists( m_trashDir + "/files/readonly" ) );
+ assert( !TQFile::exists( m_trashDir + "/info/readonly.trashinfo" ) );
#else
kdDebug() << k_funcinfo << " : SKIPPED" << endl;
diff --git a/kioslave/trash/testtrash.h b/kioslave/trash/testtrash.h
index 70d06dc8b..fd286c945 100644
--- a/kioslave/trash/testtrash.h
+++ b/kioslave/trash/testtrash.h
@@ -20,7 +20,7 @@
#ifndef TESTTRASH_H
#define TESTTRASH_H
-#include <qobject.h>
+#include <tqobject.h>
class TestTrash : public QObject
{
@@ -91,28 +91,28 @@ private slots:
void slotEntries( KIO::Job*, const KIO::UDSEntryList& );
private:
- void trashFile( const QString& origFilePath, const QString& fileId );
- void trashSymlink( const QString& origFilePath, const QString& fileName, bool broken );
- void trashDirectory( const QString& origPath, const QString& fileName );
- void copyFromTrash( const QString& fileId, const QString& destPath, const QString& relativePath = QString::null );
- void moveFromTrash( const QString& fileId, const QString& destPath, const QString& relativePath = QString::null );
-
- QString homeTmpDir() const;
- QString otherTmpDir() const;
- QString utf8FileName() const;
- QString umlautFileName() const;
- QString readOnlyDirPath() const;
-
- QString m_trashDir;
-
- QString m_otherPartitionTopDir;
- QString m_otherPartitionTrashDir;
+ void trashFile( const TQString& origFilePath, const TQString& fileId );
+ void trashSymlink( const TQString& origFilePath, const TQString& fileName, bool broken );
+ void trashDirectory( const TQString& origPath, const TQString& fileName );
+ void copyFromTrash( const TQString& fileId, const TQString& destPath, const TQString& relativePath = TQString::null );
+ void moveFromTrash( const TQString& fileId, const TQString& destPath, const TQString& relativePath = TQString::null );
+
+ TQString homeTmpDir() const;
+ TQString otherTmpDir() const;
+ TQString utf8FileName() const;
+ TQString umlautFileName() const;
+ TQString readOnlyDirPath() const;
+
+ TQString m_trashDir;
+
+ TQString m_otherPartitionTopDir;
+ TQString m_otherPartitionTrashDir;
bool m_tmpIsWritablePartition;
int m_tmpTrashId;
int m_otherPartitionId;
int m_entryCount;
- QStringList m_listResult;
+ TQStringList m_listResult;
};
#endif
diff --git a/kioslave/trash/trashimpl.cpp b/kioslave/trash/trashimpl.cpp
index 9507c77ab..f43e7929f 100644
--- a/kioslave/trash/trashimpl.cpp
+++ b/kioslave/trash/trashimpl.cpp
@@ -35,10 +35,10 @@
#include <dcopref.h>
-#include <qapplication.h>
-#include <qeventloop.h>
-#include <qfile.h>
-#include <qdir.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
+#include <tqfile.h>
+#include <tqdir.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -50,7 +50,7 @@
#include <errno.h>
TrashImpl::TrashImpl() :
- QObject(),
+ TQObject(),
m_lastErrorCode( 0 ),
m_initStatus( InitToBeDone ),
m_lastId( 0 ),
@@ -62,7 +62,7 @@ TrashImpl::TrashImpl() :
m_config( "trashrc" )
{
KDE_struct_stat buff;
- if ( KDE_lstat( QFile::encodeName( QDir::homeDirPath() ), &buff ) == 0 ) {
+ if ( KDE_lstat( TQFile::encodeName( TQDir::homeDirPath() ), &buff ) == 0 ) {
m_homeDevice = buff.st_dev;
} else {
kdError() << "Should never happen: couldn't stat $HOME " << strerror( errno ) << endl;
@@ -75,15 +75,15 @@ TrashImpl::TrashImpl() :
* @return errorcode, or 0 if the dir was created or existed already
* Warning, don't use return value like a bool
*/
-int TrashImpl::testDir( const QString &_name ) const
+int TrashImpl::testDir( const TQString &_name ) const
{
- DIR *dp = opendir( QFile::encodeName(_name) );
+ DIR *dp = opendir( TQFile::encodeName(_name) );
if ( dp == NULL )
{
- QString name = _name;
+ TQString name = _name;
if ( name.endsWith( "/" ) )
name.truncate( name.length() - 1 );
- QCString path = QFile::encodeName(name);
+ TQCString path = TQFile::encodeName(name);
bool ok = ::mkdir( path, S_IRWXU ) == 0;
if ( !ok && errno == EEXIST ) {
@@ -132,13 +132,13 @@ bool TrashImpl::init()
// see also kdesktop/init.cc for first time initialization
m_initStatus = InitError;
// $XDG_DATA_HOME/Trash, i.e. ~/.local/share/Trash by default.
- const QString xdgDataDir = KGlobal::dirs()->localxdgdatadir();
+ const TQString xdgDataDir = KGlobal::dirs()->localxdgdatadir();
if ( !KStandardDirs::makeDir( xdgDataDir, 0700 ) ) {
kdWarning() << "failed to create " << xdgDataDir << endl;
return false;
}
- const QString trashDir = xdgDataDir + "Trash";
+ const TQString trashDir = xdgDataDir + "Trash";
int err;
if ( ( err = testDir( trashDir ) ) ) {
error( err, trashDir );
@@ -161,17 +161,17 @@ bool TrashImpl::init()
void TrashImpl::migrateOldTrash()
{
kdDebug() << k_funcinfo << endl;
- const QString oldTrashDir = KGlobalSettings::trashPath();
- const QStrList entries = listDir( oldTrashDir );
+ const TQString oldTrashDir = KGlobalSettings::trashPath();
+ const TQStrList entries = listDir( oldTrashDir );
bool allOK = true;
- QStrListIterator entryIt( entries );
+ TQStrListIterator entryIt( entries );
for (; entryIt.current(); ++entryIt) {
- QString srcPath = QFile::decodeName( *entryIt );
+ TQString srcPath = TQFile::decodeName( *entryIt );
if ( srcPath == "." || srcPath == ".." || srcPath == ".directory" )
continue;
srcPath.prepend( oldTrashDir ); // make absolute
int trashId;
- QString fileId;
+ TQString fileId;
if ( !createInfo( srcPath, trashId, fileId ) ) {
kdWarning() << "Trash migration: failed to create info for " << srcPath << endl;
allOK = false;
@@ -193,11 +193,11 @@ void TrashImpl::migrateOldTrash()
}
}
-bool TrashImpl::createInfo( const QString& origPath, int& trashId, QString& fileId )
+bool TrashImpl::createInfo( const TQString& origPath, int& trashId, TQString& fileId )
{
kdDebug() << k_funcinfo << origPath << endl;
// Check source
- const QCString origPath_c( QFile::encodeName( origPath ) );
+ const TQCString origPath_c( TQFile::encodeName( origPath ) );
KDE_struct_stat buff_src;
if ( KDE_lstat( origPath_c.data(), &buff_src ) == -1 ) {
if ( errno == EACCES )
@@ -218,7 +218,7 @@ bool TrashImpl::createInfo( const QString& origPath, int& trashId, QString& file
// Grab original filename
KURL url;
url.setPath( origPath );
- const QString origFileName = url.fileName();
+ const TQString origFileName = url.fileName();
// Make destination file in info/
url.setPath( infoPath( trashId, origFileName ) ); // we first try with origFileName
@@ -228,7 +228,7 @@ bool TrashImpl::createInfo( const QString& origPath, int& trashId, QString& file
int fd = 0;
do {
kdDebug() << k_funcinfo << "trying to create " << url.path() << endl;
- fd = ::open( QFile::encodeName( url.path() ), O_WRONLY | O_CREAT | O_EXCL, 0600 );
+ fd = ::open( TQFile::encodeName( url.path() ), O_WRONLY | O_CREAT | O_EXCL, 0600 );
if ( fd < 0 ) {
if ( errno == EEXIST ) {
url.setFileName( KIO::RenameDlg::suggestName( baseDirectory, url.fileName() ) );
@@ -239,7 +239,7 @@ bool TrashImpl::createInfo( const QString& origPath, int& trashId, QString& file
}
}
} while ( fd < 0 );
- const QString infoPath = url.path();
+ const TQString infoPath = url.path();
fileId = url.fileName();
Q_ASSERT( fileId.endsWith( ".trashinfo" ) );
fileId.truncate( fileId.length() - 10 ); // remove .trashinfo from fileId
@@ -252,7 +252,7 @@ bool TrashImpl::createInfo( const QString& origPath, int& trashId, QString& file
// Contents of the info file. We could use KSimpleConfig, but that would
// mean closing and reopening fd, i.e. opening a race condition...
- QCString info = "[Trash Info]\n";
+ TQCString info = "[Trash Info]\n";
info += "Path=";
// Escape filenames according to the way they are encoded on the filesystem
// All this to basically get back to the raw 8-bit representation of the filename...
@@ -262,14 +262,14 @@ bool TrashImpl::createInfo( const QString& origPath, int& trashId, QString& file
info += KURL::encode_string( makeRelativePath( topDirectoryPath( trashId ), origPath ), m_mibEnum ).latin1();
info += "\n";
info += "DeletionDate=";
- info += QDateTime::currentDateTime().toString( Qt::ISODate ).latin1();
+ info += TQDateTime::currentDateTime().toString( Qt::ISODate ).latin1();
info += "\n";
size_t sz = info.size() - 1; // avoid trailing 0 from QCString
size_t written = ::fwrite(info.data(), 1, sz, file);
if ( written != sz ) {
::fclose( file );
- QFile::remove( infoPath );
+ TQFile::remove( infoPath );
error( KIO::ERR_DISK_FULL, infoPath );
return false;
}
@@ -280,12 +280,12 @@ bool TrashImpl::createInfo( const QString& origPath, int& trashId, QString& file
return true;
}
-QString TrashImpl::makeRelativePath( const QString& topdir, const QString& path )
+TQString TrashImpl::makeRelativePath( const TQString& topdir, const TQString& path )
{
- const QString realPath = KStandardDirs::realFilePath( path );
+ const TQString realPath = KStandardDirs::realFilePath( path );
// topdir ends with '/'
if ( realPath.startsWith( topdir ) ) {
- const QString rel = realPath.mid( topdir.length() );
+ const TQString rel = realPath.mid( topdir.length() );
Q_ASSERT( rel[0] != '/' );
return rel;
} else { // shouldn't happen...
@@ -294,40 +294,40 @@ QString TrashImpl::makeRelativePath( const QString& topdir, const QString& path
}
}
-QString TrashImpl::infoPath( int trashId, const QString& fileId ) const
+TQString TrashImpl::infoPath( int trashId, const TQString& fileId ) const
{
- QString trashPath = trashDirectoryPath( trashId );
+ TQString trashPath = trashDirectoryPath( trashId );
trashPath += "/info/";
trashPath += fileId;
trashPath += ".trashinfo";
return trashPath;
}
-QString TrashImpl::filesPath( int trashId, const QString& fileId ) const
+TQString TrashImpl::filesPath( int trashId, const TQString& fileId ) const
{
- QString trashPath = trashDirectoryPath( trashId );
+ TQString trashPath = trashDirectoryPath( trashId );
trashPath += "/files/";
trashPath += fileId;
return trashPath;
}
-bool TrashImpl::deleteInfo( int trashId, const QString& fileId )
+bool TrashImpl::deleteInfo( int trashId, const TQString& fileId )
{
- bool ok = QFile::remove( infoPath( trashId, fileId ) );
+ bool ok = TQFile::remove( infoPath( trashId, fileId ) );
if ( ok )
fileRemoved();
return ok;
}
-bool TrashImpl::moveToTrash( const QString& origPath, int trashId, const QString& fileId )
+bool TrashImpl::moveToTrash( const TQString& origPath, int trashId, const TQString& fileId )
{
kdDebug() << k_funcinfo << endl;
- const QString dest = filesPath( trashId, fileId );
+ const TQString dest = filesPath( trashId, fileId );
if ( !move( origPath, dest ) ) {
// Maybe the move failed due to no permissions to delete source.
// In that case, delete dest to keep things consistent, since KIO doesn't do it.
- if ( QFileInfo( dest ).isFile() )
- QFile::remove( dest );
+ if ( TQFileInfo( dest ).isFile() )
+ TQFile::remove( dest );
else
synchronousDel( dest, false, true );
return false;
@@ -336,9 +336,9 @@ bool TrashImpl::moveToTrash( const QString& origPath, int trashId, const QString
return true;
}
-bool TrashImpl::moveFromTrash( const QString& dest, int trashId, const QString& fileId, const QString& relativePath )
+bool TrashImpl::moveFromTrash( const TQString& dest, int trashId, const TQString& fileId, const TQString& relativePath )
{
- QString src = filesPath( trashId, fileId );
+ TQString src = filesPath( trashId, fileId );
if ( !relativePath.isEmpty() ) {
src += '/';
src += relativePath;
@@ -348,7 +348,7 @@ bool TrashImpl::moveFromTrash( const QString& dest, int trashId, const QString&
return true;
}
-bool TrashImpl::move( const QString& src, const QString& dest )
+bool TrashImpl::move( const TQString& src, const TQString& dest )
{
if ( directRename( src, dest ) ) {
// This notification is done by KIO::moveAs when using the code below
@@ -370,8 +370,8 @@ bool TrashImpl::move( const QString& src, const QString& dest )
#ifdef KIO_COPYJOB_HAS_SETINTERACTIVE
job->setInteractive( false );
#endif
- connect( job, SIGNAL( result(KIO::Job *) ),
- this, SLOT( jobFinished(KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result(KIO::Job *) ),
+ this, TQT_SLOT( jobFinished(KIO::Job *) ) );
qApp->eventLoop()->enterLoop();
return m_lastErrorCode == 0;
@@ -384,19 +384,19 @@ void TrashImpl::jobFinished(KIO::Job* job)
qApp->eventLoop()->exitLoop();
}
-bool TrashImpl::copyToTrash( const QString& origPath, int trashId, const QString& fileId )
+bool TrashImpl::copyToTrash( const TQString& origPath, int trashId, const TQString& fileId )
{
kdDebug() << k_funcinfo << endl;
- const QString dest = filesPath( trashId, fileId );
+ const TQString dest = filesPath( trashId, fileId );
if ( !copy( origPath, dest ) )
return false;
fileAdded();
return true;
}
-bool TrashImpl::copyFromTrash( const QString& dest, int trashId, const QString& fileId, const QString& relativePath )
+bool TrashImpl::copyFromTrash( const TQString& dest, int trashId, const TQString& fileId, const TQString& relativePath )
{
- QString src = filesPath( trashId, fileId );
+ TQString src = filesPath( trashId, fileId );
if ( !relativePath.isEmpty() ) {
src += '/';
src += relativePath;
@@ -404,7 +404,7 @@ bool TrashImpl::copyFromTrash( const QString& dest, int trashId, const QString&
return copy( src, dest );
}
-bool TrashImpl::copy( const QString& src, const QString& dest )
+bool TrashImpl::copy( const TQString& src, const TQString& dest )
{
// kio_file's copy() method is quite complex (in order to be fast), let's just call it...
m_lastErrorCode = 0;
@@ -417,19 +417,19 @@ bool TrashImpl::copy( const QString& src, const QString& dest )
#ifdef KIO_COPYJOB_HAS_SETINTERACTIVE
job->setInteractive( false );
#endif
- connect( job, SIGNAL( result( KIO::Job* ) ),
- this, SLOT( jobFinished( KIO::Job* ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ this, TQT_SLOT( jobFinished( KIO::Job* ) ) );
qApp->eventLoop()->enterLoop();
return m_lastErrorCode == 0;
}
-bool TrashImpl::directRename( const QString& src, const QString& dest )
+bool TrashImpl::directRename( const TQString& src, const TQString& dest )
{
kdDebug() << k_funcinfo << src << " -> " << dest << endl;
- if ( ::rename( QFile::encodeName( src ), QFile::encodeName( dest ) ) != 0 ) {
+ if ( ::rename( TQFile::encodeName( src ), TQFile::encodeName( dest ) ) != 0 ) {
if (errno == EXDEV) {
- error( KIO::ERR_UNSUPPORTED_ACTION, QString::fromLatin1("rename") );
+ error( KIO::ERR_UNSUPPORTED_ACTION, TQString::fromLatin1("rename") );
} else {
if (( errno == EACCES ) || (errno == EPERM)) {
error( KIO::ERR_ACCESS_DENIED, dest );
@@ -445,10 +445,10 @@ bool TrashImpl::directRename( const QString& src, const QString& dest )
}
#if 0
-bool TrashImpl::mkdir( int trashId, const QString& fileId, int permissions )
+bool TrashImpl::mkdir( int trashId, const TQString& fileId, int permissions )
{
- const QString path = filesPath( trashId, fileId );
- if ( ::mkdir( QFile::encodeName( path ), permissions ) != 0 ) {
+ const TQString path = filesPath( trashId, fileId );
+ if ( ::mkdir( TQFile::encodeName( path ), permissions ) != 0 ) {
if ( errno == EACCES ) {
error( KIO::ERR_ACCESS_DENIED, path );
return false;
@@ -461,18 +461,18 @@ bool TrashImpl::mkdir( int trashId, const QString& fileId, int permissions )
}
} else {
if ( permissions != -1 )
- ::chmod( QFile::encodeName( path ), permissions );
+ ::chmod( TQFile::encodeName( path ), permissions );
}
return true;
}
#endif
-bool TrashImpl::del( int trashId, const QString& fileId )
+bool TrashImpl::del( int trashId, const TQString& fileId )
{
- QString info = infoPath(trashId, fileId);
- QString file = filesPath(trashId, fileId);
+ TQString info = infoPath(trashId, fileId);
+ TQString file = filesPath(trashId, fileId);
- QCString info_c = QFile::encodeName(info);
+ TQCString info_c = TQFile::encodeName(info);
KDE_struct_stat buff;
if ( KDE_lstat( info_c.data(), &buff ) == -1 ) {
@@ -483,18 +483,18 @@ bool TrashImpl::del( int trashId, const QString& fileId )
return false;
}
- if ( !synchronousDel( file, true, QFileInfo(file).isDir() ) )
+ if ( !synchronousDel( file, true, TQFileInfo(file).isDir() ) )
return false;
- QFile::remove( info );
+ TQFile::remove( info );
fileRemoved();
return true;
}
-bool TrashImpl::synchronousDel( const QString& path, bool setLastErrorCode, bool isDir )
+bool TrashImpl::synchronousDel( const TQString& path, bool setLastErrorCode, bool isDir )
{
const int oldErrorCode = m_lastErrorCode;
- const QString oldErrorMsg = m_lastErrorMessage;
+ const TQString oldErrorMsg = m_lastErrorMessage;
KURL url;
url.setPath( path );
@@ -505,16 +505,16 @@ bool TrashImpl::synchronousDel( const QString& path, bool setLastErrorCode, bool
KFileItem fileItem( url, "inode/directory", KFileItem::Unknown );
KFileItemList fileItemList;
fileItemList.append( &fileItem );
- KIO::ChmodJob* chmodJob = KIO::chmod( fileItemList, 0200, 0200, QString::null, QString::null, true /*recursive*/, false /*showProgressInfo*/ );
- connect( chmodJob, SIGNAL( result(KIO::Job *) ),
- this, SLOT( jobFinished(KIO::Job *) ) );
+ KIO::ChmodJob* chmodJob = KIO::chmod( fileItemList, 0200, 0200, TQString::null, TQString::null, true /*recursive*/, false /*showProgressInfo*/ );
+ connect( chmodJob, TQT_SIGNAL( result(KIO::Job *) ),
+ this, TQT_SLOT( jobFinished(KIO::Job *) ) );
qApp->eventLoop()->enterLoop();
}
kdDebug() << k_funcinfo << "deleting " << url << endl;
KIO::DeleteJob *job = KIO::del( url, false, false );
- connect( job, SIGNAL( result(KIO::Job *) ),
- this, SLOT( jobFinished(KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result(KIO::Job *) ),
+ this, TQT_SLOT( jobFinished(KIO::Job *) ) );
qApp->eventLoop()->enterLoop();
bool ok = m_lastErrorCode == 0;
if ( !setLastErrorCode ) {
@@ -538,9 +538,9 @@ bool TrashImpl::emptyTrash()
const TrashedFileInfoList::const_iterator end = fileInfoList.end();
for ( ; it != end ; ++it ) {
const TrashedFileInfo& info = *it;
- const QString filesPath = info.physicalPath;
+ const TQString filesPath = info.physicalPath;
if ( synchronousDel( filesPath, true, true ) ) {
- QFile::remove( infoPath( info.trashId, info.fileId ) );
+ TQFile::remove( infoPath( info.trashId, info.fileId ) );
} // else error code is set
}
fileRemoved();
@@ -559,17 +559,17 @@ TrashImpl::TrashedFileInfoList TrashImpl::list()
TrashDirMap::const_iterator it = m_trashDirectories.begin();
for ( ; it != m_trashDirectories.end() ; ++it ) {
const int trashId = it.key();
- QString infoPath = it.data();
+ TQString infoPath = it.data();
infoPath += "/info";
// Code taken from kio_file
- QStrList entryNames = listDir( infoPath );
+ TQStrList entryNames = listDir( infoPath );
//char path_buffer[PATH_MAX];
//getcwd(path_buffer, PATH_MAX - 1);
//if ( chdir( infoPathEnc ) )
// continue;
- QStrListIterator entryIt( entryNames );
+ TQStrListIterator entryIt( entryNames );
for (; entryIt.current(); ++entryIt) {
- QString fileName = QFile::decodeName( *entryIt );
+ TQString fileName = TQFile::decodeName( *entryIt );
if ( fileName == "." || fileName == ".." )
continue;
if ( !fileName.endsWith( ".trashinfo" ) ) {
@@ -587,11 +587,11 @@ TrashImpl::TrashedFileInfoList TrashImpl::list()
}
// Returns the entries in a given directory - including "." and ".."
-QStrList TrashImpl::listDir( const QString& physicalPath )
+TQStrList TrashImpl::listDir( const TQString& physicalPath )
{
- const QCString physicalPathEnc = QFile::encodeName( physicalPath );
+ const TQCString physicalPathEnc = TQFile::encodeName( physicalPath );
kdDebug() << k_funcinfo << "listing " << physicalPath << endl;
- QStrList entryNames;
+ TQStrList entryNames;
DIR *dp = opendir( physicalPathEnc );
if ( dp == 0 )
return entryNames;
@@ -602,7 +602,7 @@ QStrList TrashImpl::listDir( const QString& physicalPath )
return entryNames;
}
-bool TrashImpl::infoForFile( int trashId, const QString& fileId, TrashedFileInfo& info )
+bool TrashImpl::infoForFile( int trashId, const TQString& fileId, TrashedFileInfo& info )
{
kdDebug() << k_funcinfo << trashId << " " << fileId << endl;
info.trashId = trashId; // easy :)
@@ -611,7 +611,7 @@ bool TrashImpl::infoForFile( int trashId, const QString& fileId, TrashedFileInfo
return readInfoFile( infoPath( trashId, fileId ), info, trashId );
}
-bool TrashImpl::readInfoFile( const QString& infoPath, TrashedFileInfo& info, int trashId )
+bool TrashImpl::readInfoFile( const TQString& infoPath, TrashedFileInfo& info, int trashId )
{
KSimpleConfig cfg( infoPath, true );
if ( !cfg.hasGroup( "Trash Info" ) ) {
@@ -625,19 +625,19 @@ bool TrashImpl::readInfoFile( const QString& infoPath, TrashedFileInfo& info, in
if ( trashId == 0 )
Q_ASSERT( info.origPath[0] == '/' );
else {
- const QString topdir = topDirectoryPath( trashId ); // includes trailing slash
+ const TQString topdir = topDirectoryPath( trashId ); // includes trailing slash
info.origPath.prepend( topdir );
}
- QString line = cfg.readEntry( "DeletionDate" );
+ TQString line = cfg.readEntry( "DeletionDate" );
if ( !line.isEmpty() ) {
- info.deletionDate = QDateTime::fromString( line, Qt::ISODate );
+ info.deletionDate = TQDateTime::fromString( line, Qt::ISODate );
}
return true;
}
-QString TrashImpl::physicalPath( int trashId, const QString& fileId, const QString& relativePath )
+TQString TrashImpl::physicalPath( int trashId, const TQString& fileId, const TQString& relativePath )
{
- QString filePath = filesPath( trashId, fileId );
+ TQString filePath = filesPath( trashId, fileId );
if ( !relativePath.isEmpty() ) {
filePath += "/";
filePath += relativePath;
@@ -645,7 +645,7 @@ QString TrashImpl::physicalPath( int trashId, const QString& fileId, const QStri
return filePath;
}
-void TrashImpl::error( int e, const QString& s )
+void TrashImpl::error( int e, const TQString& s )
{
if ( e )
kdDebug() << k_funcinfo << e << " " << s << endl;
@@ -660,10 +660,10 @@ bool TrashImpl::isEmpty() const
scanTrashDirectories();
TrashDirMap::const_iterator it = m_trashDirectories.begin();
for ( ; it != m_trashDirectories.end() ; ++it ) {
- QString infoPath = it.data();
+ TQString infoPath = it.data();
infoPath += "/info";
- DIR *dp = opendir( QFile::encodeName( infoPath ) );
+ DIR *dp = opendir( TQFile::encodeName( infoPath ) );
if ( dp )
{
struct dirent *ep;
@@ -704,17 +704,17 @@ void TrashImpl::fileRemoved()
// which will be done by the job soon after this.
}
-int TrashImpl::findTrashDirectory( const QString& origPath )
+int TrashImpl::findTrashDirectory( const TQString& origPath )
{
kdDebug() << k_funcinfo << origPath << endl;
// First check if same device as $HOME, then we use the home trash right away.
KDE_struct_stat buff;
- if ( KDE_lstat( QFile::encodeName( origPath ), &buff ) == 0
+ if ( KDE_lstat( TQFile::encodeName( origPath ), &buff ) == 0
&& buff.st_dev == m_homeDevice )
return 0;
- QString mountPoint = KIO::findPathMountPoint( origPath );
- const QString trashDir = trashForMountPoint( mountPoint, true );
+ TQString mountPoint = KIO::findPathMountPoint( origPath );
+ const TQString trashDir = trashForMountPoint( mountPoint, true );
kdDebug() << "mountPoint=" << mountPoint << " trashDir=" << trashDir << endl;
if ( trashDir.isEmpty() )
return 0; // no trash available on partition
@@ -742,14 +742,14 @@ void TrashImpl::scanTrashDirectories() const
{
const KMountPoint::List lst = KMountPoint::currentMountPoints();
for ( KMountPoint::List::ConstIterator it = lst.begin() ; it != lst.end() ; ++it ) {
- const QCString str = (*it)->mountType().latin1();
+ const TQCString str = (*it)->mountType().latin1();
// Skip pseudo-filesystems, there's no chance we'll find a .Trash on them :)
// ## Maybe we should also skip readonly filesystems
if ( str != "proc" && str != "devfs" && str != "usbdevfs" &&
str != "sysfs" && str != "devpts" && str != "subfs" /* #96259 */ &&
str != "autofs" /* #101116 */ ) {
- QString topdir = (*it)->mountPoint();
- QString trashDir = trashForMountPoint( topdir, false );
+ TQString topdir = (*it)->mountPoint();
+ TQString trashDir = trashForMountPoint( topdir, false );
if ( !trashDir.isEmpty() ) {
// OK, trashDir is a valid trash directory. Ensure it's registered.
int trashId = idForTrashDirectory( trashDir );
@@ -781,13 +781,13 @@ TrashImpl::TrashDirMap TrashImpl::topDirectories() const
return m_topDirectories;
}
-QString TrashImpl::trashForMountPoint( const QString& topdir, bool createIfNeeded ) const
+TQString TrashImpl::trashForMountPoint( const TQString& topdir, bool createIfNeeded ) const
{
// (1) Administrator-created $topdir/.Trash directory
- const QString rootTrashDir = topdir + "/.Trash";
- const QCString rootTrashDir_c = QFile::encodeName( rootTrashDir );
- // Can't use QFileInfo here since we need to test for the sticky bit
+ const TQString rootTrashDir = topdir + "/.Trash";
+ const TQCString rootTrashDir_c = TQFile::encodeName( rootTrashDir );
+ // Can't use TQFileInfo here since we need to test for the sticky bit
uid_t uid = getuid();
KDE_struct_stat buff;
const uint requiredBits = S_ISVTX; // Sticky bit required
@@ -797,8 +797,8 @@ QString TrashImpl::trashForMountPoint( const QString& topdir, bool createIfNeede
&& ((buff.st_mode & requiredBits) == requiredBits)
&& (::access(rootTrashDir_c, W_OK))
) {
- const QString trashDir = rootTrashDir + "/" + QString::number( uid );
- const QCString trashDir_c = QFile::encodeName( trashDir );
+ const TQString trashDir = rootTrashDir + "/" + TQString::number( uid );
+ const TQCString trashDir_c = TQFile::encodeName( trashDir );
if ( KDE_lstat( trashDir_c, &buff ) == 0 ) {
if ( (buff.st_uid == uid) // must be owned by user
&& (S_ISDIR(buff.st_mode)) // must be a dir
@@ -817,8 +817,8 @@ QString TrashImpl::trashForMountPoint( const QString& topdir, bool createIfNeede
}
// (2) $topdir/.Trash-$uid
- const QString trashDir = topdir + "/.Trash-" + QString::number( uid );
- const QCString trashDir_c = QFile::encodeName( trashDir );
+ const TQString trashDir = topdir + "/.Trash-" + TQString::number( uid );
+ const TQCString trashDir_c = TQFile::encodeName( trashDir );
if ( KDE_lstat( trashDir_c, &buff ) == 0 )
{
if ( (buff.st_uid == uid) // must be owned by user
@@ -831,15 +831,15 @@ QString TrashImpl::trashForMountPoint( const QString& topdir, bool createIfNeede
}
kdDebug() << "Directory " << trashDir << " exists but didn't pass the security checks, can't use it" << endl;
// Exists, but not useable
- return QString::null;
+ return TQString::null;
}
if ( createIfNeeded && initTrashDirectory( trashDir_c ) ) {
return trashDir;
}
- return QString::null;
+ return TQString::null;
}
-int TrashImpl::idForTrashDirectory( const QString& trashDir ) const
+int TrashImpl::idForTrashDirectory( const TQString& trashDir ) const
{
// If this is too slow we can always use a reverse map...
TrashDirMap::ConstIterator it = m_trashDirectories.begin();
@@ -851,7 +851,7 @@ int TrashImpl::idForTrashDirectory( const QString& trashDir ) const
return -1;
}
-bool TrashImpl::initTrashDirectory( const QCString& trashDir_c ) const
+bool TrashImpl::initTrashDirectory( const TQCString& trashDir_c ) const
{
if ( ::mkdir( trashDir_c, 0700 ) != 0 )
return false;
@@ -879,20 +879,20 @@ bool TrashImpl::initTrashDirectory( const QCString& trashDir_c ) const
return true;
}
-bool TrashImpl::checkTrashSubdirs( const QCString& trashDir_c ) const
+bool TrashImpl::checkTrashSubdirs( const TQCString& trashDir_c ) const
{
- // testDir currently works with a QString - ## optimize
- QString trashDir = QFile::decodeName( trashDir_c );
- const QString info = trashDir + "/info";
+ // testDir currently works with a TQString - ## optimize
+ TQString trashDir = TQFile::decodeName( trashDir_c );
+ const TQString info = trashDir + "/info";
if ( testDir( info ) != 0 )
return false;
- const QString files = trashDir + "/files";
+ const TQString files = trashDir + "/files";
if ( testDir( files ) != 0 )
return false;
return true;
}
-QString TrashImpl::trashDirectoryPath( int trashId ) const
+TQString TrashImpl::trashDirectoryPath( int trashId ) const
{
// Never scanned for trash dirs? (This can happen after killing kio_trash
// and reusing a directory listing from the earlier instance.)
@@ -902,7 +902,7 @@ QString TrashImpl::trashDirectoryPath( int trashId ) const
return m_trashDirectories[trashId];
}
-QString TrashImpl::topDirectoryPath( int trashId ) const
+TQString TrashImpl::topDirectoryPath( int trashId ) const
{
if ( !m_trashDirectoriesScanned )
scanTrashDirectories();
@@ -913,12 +913,12 @@ QString TrashImpl::topDirectoryPath( int trashId ) const
// Helper method. Creates a URL with the format trash:/trashid-fileid or
// trash:/trashid-fileid/relativePath/To/File for a file inside a trashed directory.
-KURL TrashImpl::makeURL( int trashId, const QString& fileId, const QString& relativePath )
+KURL TrashImpl::makeURL( int trashId, const TQString& fileId, const TQString& relativePath )
{
KURL url;
url.setProtocol( "trash" );
- QString path = "/";
- path += QString::number( trashId );
+ TQString path = "/";
+ path += TQString::number( trashId );
path += '-';
path += fileId;
if ( !relativePath.isEmpty() ) {
@@ -931,11 +931,11 @@ KURL TrashImpl::makeURL( int trashId, const QString& fileId, const QString& rela
// Helper method. Parses a trash URL with the URL scheme defined in makeURL.
// The trash:/ URL itself isn't parsed here, must be caught by the caller before hand.
-bool TrashImpl::parseURL( const KURL& url, int& trashId, QString& fileId, QString& relativePath )
+bool TrashImpl::parseURL( const KURL& url, int& trashId, TQString& fileId, TQString& relativePath )
{
if ( url.protocol() != "trash" )
return false;
- const QString path = url.path();
+ const TQString path = url.path();
int start = 0;
if ( path[0] == '/' ) // always true I hope
start = 1;
@@ -951,7 +951,7 @@ bool TrashImpl::parseURL( const KURL& url, int& trashId, QString& fileId, QStrin
slashPos = path.find( '/', start );
if ( slashPos <= 0 ) {
fileId = path.mid( start );
- relativePath = QString::null;
+ relativePath = TQString::null;
return true;
}
fileId = path.mid( start, slashPos - start );
diff --git a/kioslave/trash/trashimpl.h b/kioslave/trash/trashimpl.h
index 2b16ec67e..027864456 100644
--- a/kioslave/trash/trashimpl.h
+++ b/kioslave/trash/trashimpl.h
@@ -23,11 +23,11 @@
#include <kio/jobclasses.h>
#include <ksimpleconfig.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qmap.h>
-#include <qvaluelist.h>
-#include <qstrlist.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
+#include <tqstrlist.h>
#include <assert.h>
/**
@@ -47,29 +47,29 @@ public:
/// Create info for a file to be trashed
/// Returns trashId and fileId
/// The caller is then responsible for actually trashing the file
- bool createInfo( const QString& origPath, int& trashId, QString& fileId );
+ bool createInfo( const TQString& origPath, int& trashId, TQString& fileId );
/// Delete info file for a file to be trashed
/// Usually used for undoing what createInfo did if trashing failed
- bool deleteInfo( int trashId, const QString& fileId );
+ bool deleteInfo( int trashId, const TQString& fileId );
/// Moving a file or directory into the trash. The ids come from createInfo.
- bool moveToTrash( const QString& origPath, int trashId, const QString& fileId );
+ bool moveToTrash( const TQString& origPath, int trashId, const TQString& fileId );
/// Moving a file or directory out of the trash. The ids come from createInfo.
- bool moveFromTrash( const QString& origPath, int trashId, const QString& fileId, const QString& relativePath );
+ bool moveFromTrash( const TQString& origPath, int trashId, const TQString& fileId, const TQString& relativePath );
/// Copying a file or directory into the trash. The ids come from createInfo.
- bool copyToTrash( const QString& origPath, int trashId, const QString& fileId );
+ bool copyToTrash( const TQString& origPath, int trashId, const TQString& fileId );
/// Copying a file or directory out of the trash. The ids come from createInfo.
- bool copyFromTrash( const QString& origPath, int trashId, const QString& fileId, const QString& relativePath );
+ bool copyFromTrash( const TQString& origPath, int trashId, const TQString& fileId, const TQString& relativePath );
/// Create a top-level trashed directory
- //bool mkdir( int trashId, const QString& fileId, int permissions );
+ //bool mkdir( int trashId, const TQString& fileId, int permissions );
/// Get rid of a trashed file
- bool del( int trashId, const QString& fileId );
+ bool del( int trashId, const TQString& fileId );
/// Empty trash, i.e. delete all trashed files
bool emptyTrash();
@@ -79,35 +79,35 @@ public:
struct TrashedFileInfo {
int trashId; // for the url
- QString fileId; // for the url
- QString physicalPath; // for stat'ing etc.
- QString origPath; // from info file
- QDateTime deletionDate; // from info file
+ TQString fileId; // for the url
+ TQString physicalPath; // for stat'ing etc.
+ TQString origPath; // from info file
+ TQDateTime deletionDate; // from info file
};
/// List trashed files
- typedef QValueList<TrashedFileInfo> TrashedFileInfoList;
+ typedef TQValueList<TrashedFileInfo> TrashedFileInfoList;
TrashedFileInfoList list();
/// Return the info for a given trashed file
- bool infoForFile( int trashId, const QString& fileId, TrashedFileInfo& info );
+ bool infoForFile( int trashId, const TQString& fileId, TrashedFileInfo& info );
/// Return the physicalPath for a given trashed file - helper method which
/// encapsulates the call to infoForFile. Don't use if you need more info from TrashedFileInfo.
- QString physicalPath( int trashId, const QString& fileId, const QString& relativePath );
+ TQString physicalPath( int trashId, const TQString& fileId, const TQString& relativePath );
/// Move data from the old trash system to the new one
void migrateOldTrash();
/// KIO error code
int lastErrorCode() const { return m_lastErrorCode; }
- QString lastErrorMessage() const { return m_lastErrorMessage; }
+ TQString lastErrorMessage() const { return m_lastErrorMessage; }
- QStrList listDir( const QString& physicalPath );
+ TQStrList listDir( const TQString& physicalPath );
- static KURL makeURL( int trashId, const QString& fileId, const QString& relativePath );
- static bool parseURL( const KURL& url, int& trashId, QString& fileId, QString& relativePath );
+ static KURL makeURL( int trashId, const TQString& fileId, const TQString& relativePath );
+ static bool parseURL( const KURL& url, int& trashId, TQString& fileId, TQString& relativePath );
- typedef QMap<int, QString> TrashDirMap;
+ typedef TQMap<int, TQString> TrashDirMap;
/// @internal This method is for TestTrash only. Home trash is included (id 0).
TrashDirMap trashDirectories() const;
/// @internal This method is for TestTrash only. No entry with id 0.
@@ -115,38 +115,38 @@ public:
private:
/// Helper method. Moves a file or directory using the appropriate method.
- bool move( const QString& src, const QString& dest );
- bool copy( const QString& src, const QString& dest );
+ bool move( const TQString& src, const TQString& dest );
+ bool copy( const TQString& src, const TQString& dest );
/// Helper method. Tries to call ::rename(src,dest) and does error handling.
- bool directRename( const QString& src, const QString& dest );
+ bool directRename( const TQString& src, const TQString& dest );
void fileAdded();
void fileRemoved();
// Warning, returns error code, not a bool
- int testDir( const QString& name ) const;
- void error( int e, const QString& s );
+ int testDir( const TQString& name ) const;
+ void error( int e, const TQString& s );
- bool readInfoFile( const QString& infoPath, TrashedFileInfo& info, int trashId );
+ bool readInfoFile( const TQString& infoPath, TrashedFileInfo& info, int trashId );
- QString infoPath( int trashId, const QString& fileId ) const;
- QString filesPath( int trashId, const QString& fileId ) const;
+ TQString infoPath( int trashId, const TQString& fileId ) const;
+ TQString filesPath( int trashId, const TQString& fileId ) const;
/// Find the trash dir to use for a given file to delete, based on original path
- int findTrashDirectory( const QString& origPath );
+ int findTrashDirectory( const TQString& origPath );
- QString trashDirectoryPath( int trashId ) const;
- QString topDirectoryPath( int trashId ) const;
+ TQString trashDirectoryPath( int trashId ) const;
+ TQString topDirectoryPath( int trashId ) const;
- bool synchronousDel( const QString& path, bool setLastErrorCode, bool isDir );
+ bool synchronousDel( const TQString& path, bool setLastErrorCode, bool isDir );
void scanTrashDirectories() const;
- int idForTrashDirectory( const QString& trashDir ) const;
- bool initTrashDirectory( const QCString& trashDir_c ) const;
- bool checkTrashSubdirs( const QCString& trashDir_c ) const;
- QString trashForMountPoint( const QString& topdir, bool createIfNeeded ) const;
- static QString makeRelativePath( const QString& topdir, const QString& path );
+ int idForTrashDirectory( const TQString& trashDir ) const;
+ bool initTrashDirectory( const TQCString& trashDir_c ) const;
+ bool checkTrashSubdirs( const TQCString& trashDir_c ) const;
+ TQString trashForMountPoint( const TQString& topdir, bool createIfNeeded ) const;
+ static TQString makeRelativePath( const TQString& topdir, const TQString& path );
private slots:
void jobFinished(KIO::Job *job);
@@ -155,7 +155,7 @@ private:
/// Last error code stored in class to simplify API.
/// Note that this means almost no method can be const.
int m_lastErrorCode;
- QString m_lastErrorMessage;
+ TQString m_lastErrorMessage;
enum { InitToBeDone, InitOK, InitError } m_initStatus;