diff options
Diffstat (limited to 'kio/misc')
31 files changed, 930 insertions, 930 deletions
diff --git a/kio/misc/kdesasl/kdesasl.cpp b/kio/misc/kdesasl/kdesasl.cpp index c59d157b8..b547f7e6b 100644 --- a/kio/misc/kdesasl/kdesasl.cpp +++ b/kio/misc/kdesasl/kdesasl.cpp @@ -22,7 +22,7 @@ #include <kmdcodec.h> #include <kurl.h> -#include <qstrlist.h> +#include <tqstrlist.h> #include <stdlib.h> #include <string.h> @@ -35,8 +35,8 @@ KDESasl::KDESasl(const KURL &aUrl) mFirst = true; } -KDESasl::KDESasl(const QString &aUser, const QString &aPass, - const QString &aProtocol) +KDESasl::KDESasl(const TQString &aUser, const TQString &aPass, + const TQString &aProtocol) { mProtocol = aProtocol; mUser = aUser; @@ -47,29 +47,29 @@ KDESasl::KDESasl(const QString &aUser, const QString &aPass, KDESasl::~KDESasl() { } -QCString KDESasl::chooseMethod(const QStrIList aMethods) +TQCString KDESasl::chooseMethod(const TQStrIList aMethods) { if (aMethods.contains("DIGEST-MD5")) mMethod = "DIGEST-MD5"; else if (aMethods.contains("CRAM-MD5")) mMethod = "CRAM-MD5"; else if (aMethods.contains("PLAIN")) mMethod = "PLAIN"; else if (aMethods.contains("LOGIN")) mMethod = "LOGIN"; - else mMethod = QCString(); + else mMethod = TQCString(); return mMethod; } -void KDESasl::setMethod(const QCString &aMethod) +void KDESasl::setMethod(const TQCString &aMethod) { mMethod = aMethod.upper(); } -QByteArray KDESasl::getPlainResponse() +TQByteArray KDESasl::getPlainResponse() { - QCString user = mUser.utf8(); - QCString pass = mPass.utf8(); + TQCString user = mUser.utf8(); + TQCString pass = mPass.utf8(); int userlen = user.length(); int passlen = pass.length(); // result = $user\0$user\0$pass (no trailing \0) - QByteArray result(2 * userlen + passlen + 2); + TQByteArray result(2 * userlen + passlen + 2); if ( userlen ) { memcpy( result.data(), user.data(), userlen ); memcpy( result.data() + userlen + 1, user.data(), userlen ); @@ -80,18 +80,18 @@ QByteArray KDESasl::getPlainResponse() return result; } -QByteArray KDESasl::getLoginResponse() +TQByteArray KDESasl::getLoginResponse() { - QByteArray result = (mFirst) ? mUser.utf8() : mPass.utf8(); + TQByteArray result = (mFirst) ? mUser.utf8() : mPass.utf8(); mFirst = !mFirst; if (result.size()) result.resize(result.size() - 1); return result; } -QByteArray KDESasl::getCramMd5Response(const QByteArray &aChallenge) +TQByteArray KDESasl::getCramMd5Response(const TQByteArray &aChallenge) { uint i; - QByteArray secret = mPass.utf8(); + TQByteArray secret = mPass.utf8(); int len = mPass.utf8().length(); secret.resize(len); if (secret.size() > 64) @@ -102,9 +102,9 @@ QByteArray KDESasl::getCramMd5Response(const QByteArray &aChallenge) } secret.resize(64); for (i = len; i < 64; i++) secret[i] = 0; - QByteArray XorOpad(64); + TQByteArray XorOpad(64); for (i = 0; i < 64; i++) XorOpad[i] = secret[i] ^ 0x5C; - QByteArray XorIpad(64); + TQByteArray XorIpad(64); for (i = 0; i < 64; i++) XorIpad[i] = secret[i] ^ 0x36; KMD5 md5; md5.update(XorIpad); @@ -112,21 +112,21 @@ QByteArray KDESasl::getCramMd5Response(const QByteArray &aChallenge) KMD5 md5a; md5a.update(XorOpad); md5a.update(md5.rawDigest(), 16); - QByteArray result = mUser.utf8(); + TQByteArray result = mUser.utf8(); len = mUser.utf8().length(); result.resize(len + 33); result[len] = ' '; - QCString ch = md5a.hexDigest(); + TQCString ch = md5a.hexDigest(); for (i = 0; i < 32; i++) result[i+len+1] = *(ch.data() + i); return result; } -QByteArray KDESasl::getDigestMd5Response(const QByteArray &aChallenge) +TQByteArray KDESasl::getDigestMd5Response(const TQByteArray &aChallenge) { mFirst = !mFirst; - if (mFirst) return QByteArray(); - QCString str, realm, nonce, qop, algorithm, charset; - QCString nc = "00000001"; + if (mFirst) return TQByteArray(); + TQCString str, realm, nonce, qop, algorithm, charset; + TQCString nc = "00000001"; unsigned int a, b, c, d; a = 0; while (a < aChallenge.size()) @@ -143,7 +143,7 @@ QByteArray KDESasl::getDigestMd5Response(const QByteArray &aChallenge) d = c; while (d < aChallenge.size() && aChallenge[d] != ',') d++; } - str = QCString(aChallenge.data() + c, d - c + 1); + str = TQCString(aChallenge.data() + c, d - c + 1); if (qstrnicmp(aChallenge.data() + a, "realm=", 6) == 0) realm = str; else if (qstrnicmp(aChallenge.data() + a, "nonce=", 6) == 0) nonce = str; else if (qstrnicmp(aChallenge.data() + a, "qop=", 4) == 0) qop = str; @@ -156,7 +156,7 @@ QByteArray KDESasl::getDigestMd5Response(const QByteArray &aChallenge) if (qop.isEmpty()) qop = "auth"; qop = "auth"; bool utf8 = qstricmp(charset, "utf-8") == 0; - QCString digestUri = QCString(mProtocol.latin1()) + "/" + realm; + TQCString digestUri = TQCString(mProtocol.latin1()) + "/" + realm; /* Calculate the response */ /* Code based on code from the http io-slave @@ -164,17 +164,17 @@ QByteArray KDESasl::getDigestMd5Response(const QByteArray &aChallenge) Copyright (C) 2000,2001 Waldo Bastian <bastian@kde.org> Copyright (C) 2000,2001 George Staikos <staikos@kde.org> */ KMD5 md, md2; - QCString HA1, HA2; - QCString cnonce; + TQCString HA1, HA2; + TQCString cnonce; cnonce.setNum((1 + static_cast<int>(100000.0*rand()/(RAND_MAX+1.0)))); cnonce = KCodecs::base64Encode( cnonce ); // Calculate H(A1) - QCString authStr = (utf8) ? mUser.utf8() : QCString(mUser.latin1()); + TQCString authStr = (utf8) ? mUser.utf8() : TQCString(mUser.latin1()); authStr += ':'; authStr += realm; authStr += ':'; - authStr += (utf8) ? mPass.utf8() : QCString(mPass.latin1()); + authStr += (utf8) ? mPass.utf8() : TQCString(mPass.latin1()); md.update( authStr ); authStr = ""; @@ -220,30 +220,30 @@ QByteArray KDESasl::getDigestMd5Response(const QByteArray &aChallenge) authStr += HA2; md.reset(); md.update( authStr ); - QCString response = md.hexDigest(); + TQCString response = md.hexDigest(); /* End of response calculation */ - QCString result; + TQCString result; if (utf8) { result = "charset=utf-8,username=\"" + mUser.utf8(); } else { - result = "charset=iso-8859-1,username=\"" + QCString(mUser.latin1()); + result = "charset=iso-8859-1,username=\"" + TQCString(mUser.latin1()); } result += "\",realm=\"" + realm + "\",nonce=\"" + nonce; result += "\",nc=" + nc + ",cnonce=\"" + cnonce; result += "\",digest-uri=\"" + digestUri; result += "\",response=" + response + ",qop=" + qop; - QByteArray ba; + TQByteArray ba; ba.duplicate(result.data(), result.length()); return ba; } -QByteArray KDESasl::getBinaryResponse(const QByteArray &aChallenge, bool aBase64) +TQByteArray KDESasl::getBinaryResponse(const TQByteArray &aChallenge, bool aBase64) { if (aBase64) { - QByteArray ba; + TQByteArray ba; KCodecs::base64Decode(aChallenge, ba); KCodecs::base64Encode(getBinaryResponse(ba, false), ba); return ba; @@ -254,17 +254,17 @@ QByteArray KDESasl::getBinaryResponse(const QByteArray &aChallenge, bool aBase64 return getCramMd5Response(aChallenge); if (qstricmp(mMethod, "DIGEST-MD5") == 0) return getDigestMd5Response(aChallenge); -// return getDigestMd5Response(QCString("realm=\"elwood.innosoft.com\",nonce=\"OA6MG9tEQGm2hh\",qop=\"auth\",algorithm=md5-sess,charset=utf-8")); - return QByteArray(); +// return getDigestMd5Response(TQCString("realm=\"elwood.innosoft.com\",nonce=\"OA6MG9tEQGm2hh\",qop=\"auth\",algorithm=md5-sess,charset=utf-8")); + return TQByteArray(); } -QCString KDESasl::getResponse(const QByteArray &aChallenge, bool aBase64) +TQCString KDESasl::getResponse(const TQByteArray &aChallenge, bool aBase64) { - QByteArray ba = getBinaryResponse(aChallenge, aBase64); - return QCString(ba.data(), ba.size() + 1); + TQByteArray ba = getBinaryResponse(aChallenge, aBase64); + return TQCString(ba.data(), ba.size() + 1); } -QCString KDESasl::method() const { +TQCString KDESasl::method() const { return mMethod; } diff --git a/kio/misc/kdesasl/kdesasl.h b/kio/misc/kdesasl/kdesasl.h index 834c83913..4049b96eb 100644 --- a/kio/misc/kdesasl/kdesasl.h +++ b/kio/misc/kdesasl/kdesasl.h @@ -20,7 +20,7 @@ #ifndef KDESASL_H #define KDESASL_H -#include <qstring.h> +#include <tqstring.h> #include <kdelibs_export.h> @@ -59,7 +59,7 @@ class QStrIList; * mySendAuthCommand( sasl.method() ); * } * for ( ; !sasl.dialogComplete( numResponses ) ; ++numResponses ) { - * QByteArray challenge = myRecvChallenge(); + * TQByteArray challenge = myRecvChallenge(); * mySendResponse( sasl.getResponse( challenge ) ); * } * return myCheckSuccess(); @@ -82,7 +82,7 @@ public: * This is a conveniece function and differs from the above function only by * what arguments it accepts. */ - KDESasl(const QString &aUser, const QString &aPass, const QString &aProtocol); + KDESasl(const TQString &aUser, const TQString &aPass, const TQString &aProtocol); /* * You need to have a virtual destructor! */ @@ -91,16 +91,16 @@ public: * @returns the most secure method from the given methods and use it for * further operations. */ - virtual QCString chooseMethod(const QStrIList aMethods); + virtual TQCString chooseMethod(const TQStrIList aMethods); /** * Explicitely set the SASL method used. */ - virtual void setMethod(const QCString &aMethod); + virtual void setMethod(const TQCString &aMethod); /** * @return the SASL method used. * @since 3.2 */ - QCString method() const; + TQCString method() const; /** * @param numCalls number of times getResponse() has been called. * @return whether the challenge/response dialog has completed @@ -126,11 +126,11 @@ public: * encoding. The challenge is decoded from base64 and the response is * encoded base64 if set to true. */ - QCString getResponse(const QByteArray &aChallenge=QByteArray(), bool aBase64 = true); + TQCString getResponse(const TQByteArray &aChallenge=TQByteArray(), bool aBase64 = true); /** * Create a response as above but place it in a QByteArray */ - QByteArray getBinaryResponse(const QByteArray &aChallenge=QByteArray(), bool aBase64=true); + TQByteArray getBinaryResponse(const TQByteArray &aChallenge=TQByteArray(), bool aBase64=true); /** * Returns true if the client is supposed to initiate the * challenge-respinse dialog with an initial response (which most @@ -146,23 +146,23 @@ protected: /** * PLAIN authentication as described in RFC 2595 */ - virtual QByteArray getPlainResponse(); + virtual TQByteArray getPlainResponse(); /** * LOGIN authentication */ - virtual QByteArray getLoginResponse(); + virtual TQByteArray getLoginResponse(); /** * CRAM-MD5 authentication as described in RFC 2195 */ - virtual QByteArray getCramMd5Response(const QByteArray &aChallenge); + virtual TQByteArray getCramMd5Response(const TQByteArray &aChallenge); /** * DIGEST-MD5 authentication as described in RFC 2831 */ - virtual QByteArray getDigestMd5Response(const QByteArray &aChallenge); + virtual TQByteArray getDigestMd5Response(const TQByteArray &aChallenge); private: - QString mProtocol, mUser, mPass; - QCString mMethod; + TQString mProtocol, mUser, mPass; + TQCString mMethod; bool mFirst; }; diff --git a/kio/misc/kfile/fileprops.cpp b/kio/misc/kfile/fileprops.cpp index 9b7f75380..096fc1f03 100644 --- a/kio/misc/kfile/fileprops.cpp +++ b/kio/misc/kfile/fileprops.cpp @@ -18,8 +18,8 @@ #include <iostream> -#include <qfile.h> -#include <qptrlist.h> +#include <tqfile.h> +#include <tqptrlist.h> #include <kaboutdata.h> #include <kapplication.h> @@ -35,20 +35,20 @@ using namespace std; -static QString beatifyValue( const QString& value ) +static TQString beatifyValue( const TQString& value ) { if ( value.isNull() ) - return QString("(no value for key available)"); + return TQString("(no value for key available)"); else if ( value.isEmpty() ) - return QString("(empty)"); + return TQString("(empty)"); return value; } -FileProps::FileProps( const QString& path, const QStringList& suppliedGroups ) +FileProps::FileProps( const TQString& path, const TQStringList& suppliedGroups ) : m_dirty( false ) { - m_info = new KFileMetaInfo(path, QString::null, KFileMetaInfo::Everything); + m_info = new KFileMetaInfo(path, TQString::null, KFileMetaInfo::Everything); m_userSuppliedGroups = !suppliedGroups.isEmpty(); m_groupsToUse = m_userSuppliedGroups ? suppliedGroups : m_info->groups(); } @@ -72,28 +72,28 @@ bool FileProps::isValid() const return m_info->isValid(); } -QStringList FileProps::supportedGroups() const +TQStringList FileProps::supportedGroups() const { return m_info->supportedGroups(); } -QStringList FileProps::availableGroups() const +TQStringList FileProps::availableGroups() const { return m_info->groups(); } -QStringList FileProps::supportedKeys( const QString& group ) const +TQStringList FileProps::supportedKeys( const TQString& group ) const { KFileMetaInfoGroup g = m_info->group( group ); return g.supportedKeys(); } -QStringList FileProps::availableKeys( const QString& group ) const +TQStringList FileProps::availableKeys( const TQString& group ) const { KFileMetaInfoGroup g = m_info->group( group ); - QStringList allKeys = g.keys(); - QStringList ret; - QStringList::ConstIterator it = allKeys.begin(); + TQStringList allKeys = g.keys(); + TQStringList ret; + TQStringList::ConstIterator it = allKeys.begin(); for ( ; it != allKeys.end(); ++it ) { if ( g.item( *it ).isValid() ) @@ -103,21 +103,21 @@ QStringList FileProps::availableKeys( const QString& group ) const return ret; } -QStringList FileProps::preferredKeys( const QString& group ) const +TQStringList FileProps::preferredKeys( const TQString& group ) const { KFileMetaInfoGroup g = m_info->group( group ); return g.preferredKeys(); } -QString FileProps::getValue( const QString& group, - const QString& key ) const +TQString FileProps::getValue( const TQString& group, + const TQString& key ) const { KFileMetaInfoGroup g = m_info->group( group ); return FileProps::createKeyValue( g, key ); } -bool FileProps::setValue( const QString& group, - const QString& key, const QString &value ) +bool FileProps::setValue( const TQString& group, + const TQString& key, const TQString &value ) { KFileMetaInfoGroup g = m_info->group( group ); bool wasAdded = false; @@ -141,13 +141,13 @@ bool FileProps::setValue( const QString& group, return ok; } -QStringList FileProps::allValues( const QString& group ) const +TQStringList FileProps::allValues( const TQString& group ) const { KFileMetaInfoGroup g = m_info->group( group ); return FileProps::createKeyValueList( g, g.keys() ); } -QStringList FileProps::preferredValues( const QString& group ) const +TQStringList FileProps::preferredValues( const TQString& group ) const { KFileMetaInfoGroup g = m_info->group( group ); return FileProps::createKeyValueList( g, g.preferredKeys() ); @@ -156,18 +156,18 @@ QStringList FileProps::preferredValues( const QString& group ) const // static helper: // creates strings like // "group: translatedKey: value" -QString FileProps::createKeyValue( const KFileMetaInfoGroup& g, - const QString& key ) +TQString FileProps::createKeyValue( const KFileMetaInfoGroup& g, + const TQString& key ) { static const int MAX_SPACE = 25; KFileMetaInfoItem item = g.item( key ); - QString result("%1"); + TQString result("%1"); result = result.arg( (item.isValid() ? item.translatedKey() : key) + ":", -MAX_SPACE ); result.append( beatifyValue( item.string() ) ); - QString group("%1"); + TQString group("%1"); group = group.arg( g.translatedName() + ":", -MAX_SPACE ); result.prepend( group ); @@ -175,11 +175,11 @@ QString FileProps::createKeyValue( const KFileMetaInfoGroup& g, } // static -QStringList FileProps::createKeyValueList( const KFileMetaInfoGroup& g, - const QStringList& keys ) +TQStringList FileProps::createKeyValueList( const KFileMetaInfoGroup& g, + const TQStringList& keys ) { - QStringList result; - QStringList::ConstIterator it = keys.begin(); + TQStringList result; + TQStringList::ConstIterator it = keys.begin(); for ( ; it != keys.end(); ++it ) result.append( FileProps::createKeyValue( g, *it ) ); @@ -263,7 +263,7 @@ static KCmdLineOptions options[] = static void printSupportedMimeTypes() { - QStringList allMimeTypes = KFileMetaInfoProvider::self()->supportedMimeTypes(); + TQStringList allMimeTypes = KFileMetaInfoProvider::self()->supportedMimeTypes(); if ( allMimeTypes.isEmpty() ) { cout << @@ -274,7 +274,7 @@ static void printSupportedMimeTypes() cout << i18n("Supported MimeTypes:").local8Bit() << endl; - QStringList::ConstIterator it = allMimeTypes.begin(); + TQStringList::ConstIterator it = allMimeTypes.begin(); for ( ; it != allMimeTypes.end(); it++ ) cout << (*it).local8Bit() << endl; } @@ -309,28 +309,28 @@ static void printMimeTypes( const KCmdLineArgs *args ) } } -static void printList( const QStringList& list ) +static void printList( const TQStringList& list ) { - QStringList::ConstIterator it = list.begin(); + TQStringList::ConstIterator it = list.begin(); for ( ; it != list.end(); ++it ) cout << (*it).local8Bit() << endl; cout << endl; } -static void processMetaDataOptions( const QPtrList<FileProps> propList, +static void processMetaDataOptions( const TQPtrList<FileProps> propList, KCmdLineArgs *args ) { // kfile --mimetype --supportedMimetypes --listsupported --listavailable --listpreferred --listwritable --getValue "key" --setValue "key=value" --allValues --preferredValues --dialog --quiet file [file...] // "key" may be a list of keys, separated by commas - QString line("-- -------------------------------------------------------"); + TQString line("-- -------------------------------------------------------"); FileProps *props; - QPtrListIterator<FileProps> it( propList ); + TQPtrListIterator<FileProps> it( propList ); for ( ; (props = it.current()); ++it ) { - QString file = props->fileName() + " "; - QString fileString = line.replace( 3, file.length(), file ); - cout << QFile::encodeName( fileString ) << endl; + TQString file = props->fileName() + " "; + TQString fileString = line.replace( 3, file.length(), file ); + cout << TQFile::encodeName( fileString ) << endl; if ( args->isSet( "listsupported" ) ) { @@ -345,8 +345,8 @@ static void processMetaDataOptions( const QPtrList<FileProps> propList, if ( args->isSet( "listavailable" ) ) { cout << "=Available Keys=" << endl; - QStringList groups = props->availableGroups(); - QStringList::ConstIterator git = groups.begin(); + TQStringList groups = props->availableGroups(); + TQStringList::ConstIterator git = groups.begin(); for ( ; git != groups.end(); ++git ) { cout << "Group: " << (*git).local8Bit() << endl; @@ -360,8 +360,8 @@ static void processMetaDataOptions( const QPtrList<FileProps> propList, if ( args->isSet( "getValue" ) ) { cout << "=Value=" << endl; - QString key = QString::fromLocal8Bit( args->getOption("getValue")); - QStringList::ConstIterator git = props->groupsToUse().begin(); + TQString key = TQString::fromLocal8Bit( args->getOption("getValue")); + TQStringList::ConstIterator git = props->groupsToUse().begin(); for ( ; git != props->groupsToUse().end(); ++git ) cout << props->getValue( *git, key ).local8Bit() << endl; } @@ -369,17 +369,17 @@ static void processMetaDataOptions( const QPtrList<FileProps> propList, if ( args->isSet( "setValue" ) ) { // separate key and value from the line "key=value" - QString cmd = QString::fromLocal8Bit( args->getOption("setValue")); - QString key = cmd.section( '=', 0, 0 ); - QString value = cmd.section( '=', 1 ); + TQString cmd = TQString::fromLocal8Bit( args->getOption("setValue")); + TQString key = cmd.section( '=', 0, 0 ); + TQString value = cmd.section( '=', 1 ); // either use supplied groups or all supported groups // (not only the available!) - QStringList groups = props->userSuppliedGroups() ? + TQStringList groups = props->userSuppliedGroups() ? props->groupsToUse() : props->supportedGroups(); - QStringList::ConstIterator git = groups.begin(); + TQStringList::ConstIterator git = groups.begin(); for ( ; git != groups.end(); ++git ) props->setValue( *git, key, value ); } @@ -387,16 +387,16 @@ static void processMetaDataOptions( const QPtrList<FileProps> propList, if ( args->isSet( "allValues" ) ) { cout << "=All Values=" << endl; - QStringList groups = props->availableGroups(); - QStringList::ConstIterator group = groups.begin(); + TQStringList groups = props->availableGroups(); + TQStringList::ConstIterator group = groups.begin(); for ( ; group != groups.end(); ++group ) printList( props->allValues( *group ) ); } if ( args->isSet( "preferredValues" ) && !args->isSet("allValues") ) { cout << "=Preferred Values=" << endl; - QStringList groups = props->availableGroups(); - QStringList::ConstIterator group = groups.begin(); + TQStringList groups = props->availableGroups(); + TQStringList::ConstIterator group = groups.begin(); for ( ; group != groups.end(); ++group ) printList( props->preferredValues( *group ) ); } @@ -425,7 +425,7 @@ int main( int argc, char **argv ) KApplication app( useGUI, useGUI ); - QPtrList<FileProps> m_props; + TQPtrList<FileProps> m_props; m_props.setAutoDelete( true ); bool quiet = args->isSet( "quiet" ); @@ -443,13 +443,13 @@ int main( int argc, char **argv ) return true; } - QStringList groupsToUse; + TQStringList groupsToUse; QCStringList suppliedGroups = args->getOptionList( "groups" ); QCStringList::ConstIterator it = suppliedGroups.begin(); for ( ; it != suppliedGroups.end(); ++it ) - groupsToUse.append( QString::fromLocal8Bit( (*it) ) ); + groupsToUse.append( TQString::fromLocal8Bit( (*it) ) ); - QString mimeType; + TQString mimeType; for ( int i = 0; i < files; i++ ) { diff --git a/kio/misc/kfile/fileprops.h b/kio/misc/kfile/fileprops.h index a26c1d3bb..41d4f7c86 100644 --- a/kio/misc/kfile/fileprops.h +++ b/kio/misc/kfile/fileprops.h @@ -19,55 +19,55 @@ #ifndef KFILEPROPS_H #define KFILEPROPS_H -#include <qstring.h> +#include <tqstring.h> #include <kfilemetainfo.h> class FileProps { public: - FileProps( const QString& path, const QStringList& suppliedGroups ); + FileProps( const TQString& path, const TQStringList& suppliedGroups ); virtual ~FileProps(); bool isValid() const; - QString fileName() const { return m_info->path(); } + TQString fileName() const { return m_info->path(); } - QStringList supportedGroups() const; - QStringList availableGroups() const; - QStringList translatedGroups(); + TQStringList supportedGroups() const; + TQStringList availableGroups() const; + TQStringList translatedGroups(); - const QStringList& groupsToUse() const { return m_groupsToUse; } + const TQStringList& groupsToUse() const { return m_groupsToUse; } bool userSuppliedGroups() const { return m_userSuppliedGroups; } - QStringList supportedKeys( const QString& group ) const; - QStringList availableKeys( const QString& group ) const; - QStringList preferredKeys( const QString& group ) const; + TQStringList supportedKeys( const TQString& group ) const; + TQStringList availableKeys( const TQString& group ) const; + TQStringList preferredKeys( const TQString& group ) const; - QStringList supportedKeys() const { return m_info->supportedKeys(); } - QStringList preferredKeys() const { return m_info->preferredKeys(); } + TQStringList supportedKeys() const { return m_info->supportedKeys(); } + TQStringList preferredKeys() const { return m_info->preferredKeys(); } - QString getValue( const QString& group, const QString& key ) const; - bool setValue( const QString& group, - const QString& key, const QString &value ); + TQString getValue( const TQString& group, const TQString& key ) const; + bool setValue( const TQString& group, + const TQString& key, const TQString &value ); - QStringList allValues( const QString& group ) const; - QStringList preferredValues( const QString& group ) const; + TQStringList allValues( const TQString& group ) const; + TQStringList preferredValues( const TQString& group ) const; - bool isReadOnly( const QString& group, const QString& key ); + bool isReadOnly( const TQString& group, const TQString& key ); private: - static QString createKeyValue( const KFileMetaInfoGroup& g, - const QString& key ); - static QStringList createKeyValueList( const KFileMetaInfoGroup&, - const QStringList& ); + static TQString createKeyValue( const KFileMetaInfoGroup& g, + const TQString& key ); + static TQStringList createKeyValueList( const KFileMetaInfoGroup&, + const TQStringList& ); bool sync(); KFileMetaInfo *m_info; bool m_dirty; bool m_userSuppliedGroups; - QStringList m_groupsToUse; + TQStringList m_groupsToUse; }; diff --git a/kio/misc/kntlm/des.h b/kio/misc/kntlm/des.h index 4125791b3..1cb2f27e5 100644 --- a/kio/misc/kntlm/des.h +++ b/kio/misc/kntlm/des.h @@ -1,7 +1,7 @@ #ifndef KNTLM_DES_H #define KNTLM_DES_H -#include <qglobal.h> +#include <tqglobal.h> typedef struct des_key { diff --git a/kio/misc/kntlm/kntlm.cpp b/kio/misc/kntlm/kntlm.cpp index 20c9f2a0c..a3eca3bdd 100644 --- a/kio/misc/kntlm/kntlm.cpp +++ b/kio/misc/kntlm/kntlm.cpp @@ -23,7 +23,7 @@ #include <string.h> -#include <qdatetime.h> +#include <tqdatetime.h> #include <kapplication.h> #include <kswap.h> #include <kmdcodec.h> @@ -32,7 +32,7 @@ #include "des.h" #include "kntlm.h" -QString KNTLM::getString( const QByteArray &buf, const SecBuf &secbuf, bool unicode ) +TQString KNTLM::getString( const TQByteArray &buf, const SecBuf &secbuf, bool unicode ) { //watch for buffer overflows Q_UINT32 offset; @@ -40,22 +40,22 @@ QString KNTLM::getString( const QByteArray &buf, const SecBuf &secbuf, bool unic offset = KFromToLittleEndian((Q_UINT32)secbuf.offset); len = KFromToLittleEndian(secbuf.len); if ( offset > buf.size() || - offset + len > buf.size() ) return QString::null; + offset + len > buf.size() ) return TQString::null; - QString str; + TQString str; const char *c = buf.data() + offset; if ( unicode ) { - str = UnicodeLE2QString( (QChar*) c, len >> 1 ); + str = UnicodeLE2TQString( (TQChar*) c, len >> 1 ); } else { - str = QString::fromLatin1( c, len ); + str = TQString::fromLatin1( c, len ); } return str; } -QByteArray KNTLM::getBuf( const QByteArray &buf, const SecBuf &secbuf ) +TQByteArray KNTLM::getBuf( const TQByteArray &buf, const SecBuf &secbuf ) { - QByteArray ret; + TQByteArray ret; Q_UINT32 offset; Q_UINT16 len; offset = KFromToLittleEndian((Q_UINT32)secbuf.offset); @@ -67,9 +67,9 @@ QByteArray KNTLM::getBuf( const QByteArray &buf, const SecBuf &secbuf ) return ret; } -void KNTLM::addString( QByteArray &buf, SecBuf &secbuf, const QString &str, bool unicode ) +void KNTLM::addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool unicode ) { - QByteArray tmp; + TQByteArray tmp; if ( unicode ) { tmp = QString2UnicodeLE( str ); @@ -83,7 +83,7 @@ void KNTLM::addString( QByteArray &buf, SecBuf &secbuf, const QString &str, bool } } -void KNTLM::addBuf( QByteArray &buf, SecBuf &secbuf, QByteArray &data ) +void KNTLM::addBuf( TQByteArray &buf, SecBuf &secbuf, TQByteArray &data ) { Q_UINT32 offset; Q_UINT16 len, maxlen; @@ -98,9 +98,9 @@ void KNTLM::addBuf( QByteArray &buf, SecBuf &secbuf, QByteArray &data ) memcpy( buf.data() + offset, data.data(), data.size() ); } -bool KNTLM::getNegotiate( QByteArray &negotiate, const QString &domain, const QString &workstation, Q_UINT32 flags ) +bool KNTLM::getNegotiate( TQByteArray &negotiate, const TQString &domain, const TQString &workstation, Q_UINT32 flags ) { - QByteArray rbuf( sizeof(Negotiate) ); + TQByteArray rbuf( sizeof(Negotiate) ); rbuf.fill( 0 ); memcpy( rbuf.data(), "NTLMSSP", 8 ); @@ -118,16 +118,16 @@ bool KNTLM::getNegotiate( QByteArray &negotiate, const QString &domain, const QS return true; } -bool KNTLM::getAuth( QByteArray &auth, const QByteArray &challenge, const QString &user, - const QString &password, const QString &domain, const QString &workstation, +bool KNTLM::getAuth( TQByteArray &auth, const TQByteArray &challenge, const TQString &user, + const TQString &password, const TQString &domain, const TQString &workstation, bool forceNTLM, bool forceNTLMv2 ) { - QByteArray rbuf( sizeof(Auth) ); + TQByteArray rbuf( sizeof(Auth) ); Challenge *ch = (Challenge *) challenge.data(); - QByteArray response; + TQByteArray response; uint chsize = challenge.size(); bool unicode = false; - QString dom; + TQString dom; //challenge structure too small if ( chsize < 32 ) return false; @@ -142,7 +142,7 @@ bool KNTLM::getAuth( QByteArray &auth, const QByteArray &challenge, const QStrin memcpy( rbuf.data(), "NTLMSSP", 8 ); ((Auth*) rbuf.data())->msgType = KFromToLittleEndian( (Q_UINT32)3 ); ((Auth*) rbuf.data())->flags = ch->flags; - QByteArray targetInfo = getBuf( challenge, ch->targetInfo ); + TQByteArray targetInfo = getBuf( challenge, ch->targetInfo ); // if ( forceNTLMv2 || (!targetInfo.isEmpty() && (KFromToLittleEndian(ch->flags) & Negotiate_Target_Info)) /* may support NTLMv2 */ ) { // if ( KFromToLittleEndian(ch->flags) & Negotiate_NTLM ) { @@ -174,9 +174,9 @@ bool KNTLM::getAuth( QByteArray &auth, const QByteArray &challenge, const QStrin return true; } -QByteArray KNTLM::getLMResponse( const QString &password, const unsigned char *challenge ) +TQByteArray KNTLM::getLMResponse( const TQString &password, const unsigned char *challenge ) { - QByteArray hash, answer; + TQByteArray hash, answer; hash = lmHash( password ); hash.resize( 21 ); @@ -186,10 +186,10 @@ QByteArray KNTLM::getLMResponse( const QString &password, const unsigned char *c return answer; } -QByteArray KNTLM::lmHash( const QString &password ) +TQByteArray KNTLM::lmHash( const TQString &password ) { - QByteArray keyBytes( 14 ); - QByteArray hash( 16 ); + TQByteArray keyBytes( 14 ); + TQByteArray hash( 16 ); DES_KEY ks; const char *magic = "KGS!@#$%"; @@ -208,10 +208,10 @@ QByteArray KNTLM::lmHash( const QString &password ) return hash; } -QByteArray KNTLM::lmResponse( const QByteArray &hash, const unsigned char *challenge ) +TQByteArray KNTLM::lmResponse( const TQByteArray &hash, const unsigned char *challenge ) { DES_KEY ks; - QByteArray answer( 24 ); + TQByteArray answer( 24 ); convertKey( (unsigned char*) hash.data(), &ks ); ntlm_des_ecb_encrypt( challenge, 8, &ks, (unsigned char*) answer.data() ); @@ -226,9 +226,9 @@ QByteArray KNTLM::lmResponse( const QByteArray &hash, const unsigned char *chall return answer; } -QByteArray KNTLM::getNTLMResponse( const QString &password, const unsigned char *challenge ) +TQByteArray KNTLM::getNTLMResponse( const TQString &password, const unsigned char *challenge ) { - QByteArray hash, answer; + TQByteArray hash, answer; hash = ntlmHash( password ); hash.resize( 21 ); @@ -238,10 +238,10 @@ QByteArray KNTLM::getNTLMResponse( const QString &password, const unsigned char return answer; } -QByteArray KNTLM::ntlmHash( const QString &password ) +TQByteArray KNTLM::ntlmHash( const TQString &password ) { KMD4::Digest digest; - QByteArray ret, unicode; + TQByteArray ret, unicode; unicode = QString2UnicodeLE( password ); KMD4 md4( unicode ); @@ -250,56 +250,56 @@ QByteArray KNTLM::ntlmHash( const QString &password ) return ret; } -QByteArray KNTLM::getNTLMv2Response( const QString &target, const QString &user, - const QString &password, const QByteArray &targetInformation, +TQByteArray KNTLM::getNTLMv2Response( const TQString &target, const TQString &user, + const TQString &password, const TQByteArray &targetInformation, const unsigned char *challenge ) { - QByteArray hash = ntlmv2Hash( target, user, password ); - QByteArray blob = createBlob( targetInformation ); + TQByteArray hash = ntlmv2Hash( target, user, password ); + TQByteArray blob = createBlob( targetInformation ); return lmv2Response( hash, blob, challenge ); } -QByteArray KNTLM::getLMv2Response( const QString &target, const QString &user, - const QString &password, const unsigned char *challenge ) +TQByteArray KNTLM::getLMv2Response( const TQString &target, const TQString &user, + const TQString &password, const unsigned char *challenge ) { - QByteArray hash = ntlmv2Hash( target, user, password ); - QByteArray clientChallenge( 8 ); + TQByteArray hash = ntlmv2Hash( target, user, password ); + TQByteArray clientChallenge( 8 ); for ( uint i = 0; i<8; i++ ) { clientChallenge.data()[i] = KApplication::random() % 0xff; } return lmv2Response( hash, clientChallenge, challenge ); } -QByteArray KNTLM::ntlmv2Hash( const QString &target, const QString &user, const QString &password ) +TQByteArray KNTLM::ntlmv2Hash( const TQString &target, const TQString &user, const TQString &password ) { - QByteArray hash1 = ntlmHash( password ); - QByteArray key, ret; - QString id = user.upper() + target.upper(); + TQByteArray hash1 = ntlmHash( password ); + TQByteArray key, ret; + TQString id = user.upper() + target.upper(); key = QString2UnicodeLE( id ); ret = hmacMD5( key, hash1 ); return ret; } -QByteArray KNTLM::lmv2Response( const QByteArray &hash, - const QByteArray &clientData, const unsigned char *challenge ) +TQByteArray KNTLM::lmv2Response( const TQByteArray &hash, + const TQByteArray &clientData, const unsigned char *challenge ) { - QByteArray data( 8 + clientData.size() ); + TQByteArray data( 8 + clientData.size() ); memcpy( data.data(), challenge, 8 ); memcpy( data.data() + 8, clientData.data(), clientData.size() ); - QByteArray mac = hmacMD5( data, hash ); + TQByteArray mac = hmacMD5( data, hash ); mac.resize( 16 + clientData.size() ); memcpy( mac.data() + 16, clientData.data(), clientData.size() ); return mac; } -QByteArray KNTLM::createBlob( const QByteArray &targetinfo ) +TQByteArray KNTLM::createBlob( const TQByteArray &targetinfo ) { - QByteArray blob( sizeof(Blob) + 4 + targetinfo.size() ); + TQByteArray blob( sizeof(Blob) + 4 + targetinfo.size() ); blob.fill( 0 ); Blob *bl = (Blob *) blob.data(); bl->signature = KFromToBigEndian( (Q_UINT32) 0x01010000 ); - Q_UINT64 now = QDateTime::currentDateTime().toTime_t(); + Q_UINT64 now = TQDateTime::currentDateTime().toTime_t(); now += (Q_UINT64)3600*(Q_UINT64)24*(Q_UINT64)134774; now *= (Q_UINT64)10000000; bl->timestamp = KFromToLittleEndian( now ); @@ -310,11 +310,11 @@ QByteArray KNTLM::createBlob( const QByteArray &targetinfo ) return blob; } -QByteArray KNTLM::hmacMD5( const QByteArray &data, const QByteArray &key ) +TQByteArray KNTLM::hmacMD5( const TQByteArray &data, const TQByteArray &key ) { Q_UINT8 ipad[64], opad[64]; KMD5::Digest digest; - QByteArray ret; + TQByteArray ret; memset( ipad, 0x36, sizeof(ipad) ); memset( opad, 0x5c, sizeof(opad) ); @@ -323,7 +323,7 @@ QByteArray KNTLM::hmacMD5( const QByteArray &data, const QByteArray &key ) opad[i] ^= key[i]; } - QByteArray content( data.size()+64 ); + TQByteArray content( data.size()+64 ); memcpy( content.data(), ipad, 64 ); memcpy( content.data() + 64, data.data(), data.size() ); KMD5 md5( content ); @@ -370,18 +370,18 @@ void KNTLM::convertKey( unsigned char *key_56, void* ks ) memset (&key, 0, sizeof (key)); } -QByteArray KNTLM::QString2UnicodeLE( const QString &target ) +TQByteArray KNTLM::QString2UnicodeLE( const TQString &target ) { - QByteArray unicode( target.length() * 2 ); + TQByteArray unicode( target.length() * 2 ); for ( uint i = 0; i < target.length(); i++ ) { ((Q_UINT16*)unicode.data())[ i ] = KFromToLittleEndian( target[i].unicode() ); } return unicode; } -QString KNTLM::UnicodeLE2QString( const QChar* data, uint len ) +TQString KNTLM::UnicodeLE2TQString( const TQChar* data, uint len ) { - QString ret; + TQString ret; for ( uint i = 0; i < len; i++ ) { ret += KFromToLittleEndian( data[ i ].unicode() ); } diff --git a/kio/misc/kntlm/kntlm.h b/kio/misc/kntlm/kntlm.h index 6dbb62139..9be4ea357 100644 --- a/kio/misc/kntlm/kntlm.h +++ b/kio/misc/kntlm/kntlm.h @@ -20,9 +20,9 @@ #ifndef KNTLM_H #define KNTLM_H -#include <qglobal.h> -#include <qcstring.h> -#include <qstring.h> +#include <tqglobal.h> +#include <tqcstring.h> +#include <tqstring.h> #include <kdelibs_export.h> @@ -137,8 +137,8 @@ public: * * @return true if creating the structure succeeds, false otherwise. */ - static bool getNegotiate( QByteArray &negotiate, const QString &domain = QString::null, - const QString &workstation = QString::null, + static bool getNegotiate( TQByteArray &negotiate, const TQString &domain = TQString::null, + const TQString &workstation = TQString::null, Q_UINT32 flags = Negotiate_Unicode | Request_Target | Negotiate_NTLM ); /** * Creates the type 3 message which should be sent to the server after @@ -159,74 +159,74 @@ public: * (challenge data invalid, or NTLM authentication forced, but the challenge data says * no NTLM supported). */ - static bool getAuth( QByteArray &auth, const QByteArray &challenge, const QString &user, - const QString &password, const QString &domain = QString::null, - const QString &workstation = QString::null, bool forceNTLM = false, bool forceNTLMv2 = false ); + static bool getAuth( TQByteArray &auth, const TQByteArray &challenge, const TQString &user, + const TQString &password, const TQString &domain = TQString::null, + const TQString &workstation = TQString::null, bool forceNTLM = false, bool forceNTLMv2 = false ); /** * Returns the LanManager response from the password and the server challenge. */ - static QByteArray getLMResponse( const QString &password, const unsigned char *challenge ); + static TQByteArray getLMResponse( const TQString &password, const unsigned char *challenge ); /** * Calculates the LanManager hash of the specified password. */ - static QByteArray lmHash( const QString &password ); + static TQByteArray lmHash( const TQString &password ); /** * Calculates the LanManager response from the LanManager hash and the server challenge. */ - static QByteArray lmResponse( const QByteArray &hash, const unsigned char *challenge ); + static TQByteArray lmResponse( const TQByteArray &hash, const unsigned char *challenge ); /** * Returns the NTLM response from the password and the server challenge. */ - static QByteArray getNTLMResponse( const QString &password, const unsigned char *challenge ); + static TQByteArray getNTLMResponse( const TQString &password, const unsigned char *challenge ); /** * Returns the NTLM hash (MD4) from the password. */ - static QByteArray ntlmHash( const QString &password ); + static TQByteArray ntlmHash( const TQString &password ); /** * Calculates the NTLMv2 response. */ - static QByteArray getNTLMv2Response( const QString &target, const QString &user, - const QString &password, const QByteArray &targetInformation, + static TQByteArray getNTLMv2Response( const TQString &target, const TQString &user, + const TQString &password, const TQByteArray &targetInformation, const unsigned char *challenge ); /** * Calculates the LMv2 response. */ - static QByteArray getLMv2Response( const QString &target, const QString &user, - const QString &password, const unsigned char *challenge ); + static TQByteArray getLMv2Response( const TQString &target, const TQString &user, + const TQString &password, const unsigned char *challenge ); /** * Returns the NTLMv2 hash. */ - static QByteArray ntlmv2Hash( const QString &target, const QString &user, const QString &password ); + static TQByteArray ntlmv2Hash( const TQString &target, const TQString &user, const TQString &password ); /** * Calculates the LMv2 response. */ - static QByteArray lmv2Response( const QByteArray &hash, - const QByteArray &clientData, const unsigned char *challenge ); + static TQByteArray lmv2Response( const TQByteArray &hash, + const TQByteArray &clientData, const unsigned char *challenge ); /** * Extracts a string field from an NTLM structure. */ - static QString getString( const QByteArray &buf, const SecBuf &secbuf, bool unicode ); + static TQString getString( const TQByteArray &buf, const SecBuf &secbuf, bool unicode ); /** * Extracts a byte array from an NTLM structure. */ - static QByteArray getBuf( const QByteArray &buf, const SecBuf &secbuf ); + static TQByteArray getBuf( const TQByteArray &buf, const SecBuf &secbuf ); - static QByteArray createBlob( const QByteArray &targetinfo ); + static TQByteArray createBlob( const TQByteArray &targetinfo ); - static QByteArray hmacMD5( const QByteArray &data, const QByteArray &key ); + static TQByteArray hmacMD5( const TQByteArray &data, const TQByteArray &key ); private: - static QByteArray QString2UnicodeLE( const QString &target ); - static QString UnicodeLE2QString( const QChar* data, uint len ); + static TQByteArray QString2UnicodeLE( const TQString &target ); + static TQString UnicodeLE2TQString( const TQChar* data, uint len ); - static void addBuf( QByteArray &buf, SecBuf &secbuf, QByteArray &data ); - static void addString( QByteArray &buf, SecBuf &secbuf, const QString &str, bool unicode = false ); + static void addBuf( TQByteArray &buf, SecBuf &secbuf, TQByteArray &data ); + static void addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool unicode = false ); static void convertKey( unsigned char *key_56, void* ks ); }; diff --git a/kio/misc/kntlm/kswap.h b/kio/misc/kntlm/kswap.h index e9db968ed..336321fd4 100644 --- a/kio/misc/kntlm/kswap.h +++ b/kio/misc/kntlm/kswap.h @@ -24,7 +24,7 @@ #include <config.h> #endif -#include <qglobal.h> +#include <tqglobal.h> /** * \defgroup KSWAP Byte-swapping functions diff --git a/kio/misc/kpac/discovery.cpp b/kio/misc/kpac/discovery.cpp index 06709241b..7a84958f7 100644 --- a/kio/misc/kpac/discovery.cpp +++ b/kio/misc/kpac/discovery.cpp @@ -39,7 +39,7 @@ #include <resolv.h> #include <sys/utsname.h> -#include <qtimer.h> +#include <tqtimer.h> #include <klocale.h> #include <kprocio.h> @@ -49,16 +49,16 @@ namespace KPAC { - Discovery::Discovery( QObject* parent ) + Discovery::Discovery( TQObject* parent ) : Downloader( parent ), m_helper( new KProcIO ) { - connect( m_helper, SIGNAL( readReady( KProcIO* ) ), SLOT( helperOutput() ) ); - connect( m_helper, SIGNAL( processExited( KProcess* ) ), SLOT( failed() ) ); + connect( m_helper, TQT_SIGNAL( readReady( KProcIO* ) ), TQT_SLOT( helperOutput() ) ); + connect( m_helper, TQT_SIGNAL( processExited( KProcess* ) ), TQT_SLOT( failed() ) ); *m_helper << "kpac_dhcp_helper"; if ( !m_helper->start() ) - QTimer::singleShot( 0, this, SLOT( failed() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( failed() ) ); } bool Discovery::initHostName() @@ -69,7 +69,7 @@ namespace KPAC { struct hostent *hent = gethostbyname (uts.nodename); if (hent != 0) - m_hostname = QString::fromLocal8Bit( hent->h_name ); + m_hostname = TQString::fromLocal8Bit( hent->h_name ); } // If no hostname, try gethostname as a last resort. @@ -79,7 +79,7 @@ namespace KPAC if (gethostname (buf, sizeof(buf)) == 0) { buf[255] = '\0'; - m_hostname = QString::fromLocal8Bit( buf ); + m_hostname = TQString::fromLocal8Bit( buf ); } } return !m_hostname.isEmpty(); @@ -138,7 +138,7 @@ namespace KPAC void Discovery::helperOutput() { m_helper->disconnect( this ); - QString line; + TQString line; m_helper->readln( line ); download( KURL( line.stripWhiteSpace() ) ); } diff --git a/kio/misc/kpac/discovery.h b/kio/misc/kpac/discovery.h index b9c657924..a1443ad8c 100644 --- a/kio/misc/kpac/discovery.h +++ b/kio/misc/kpac/discovery.h @@ -21,7 +21,7 @@ #ifndef KPAC_DISCOVERY_H #define KPAC_DISCOVERY_H -#include <qobject.h> +#include <tqobject.h> #include "downloader.h" @@ -33,7 +33,7 @@ namespace KPAC { Q_OBJECT public: - Discovery( QObject* ); + Discovery( TQObject* ); protected slots: virtual void failed(); @@ -46,7 +46,7 @@ namespace KPAC bool checkDomain() const; KProcIO* m_helper; - QString m_hostname; + TQString m_hostname; }; } diff --git a/kio/misc/kpac/downloader.cpp b/kio/misc/kpac/downloader.cpp index 6d4e62409..6f419f5f5 100644 --- a/kio/misc/kpac/downloader.cpp +++ b/kio/misc/kpac/downloader.cpp @@ -21,7 +21,7 @@ #include <cstdlib> #include <cstring> -#include <qtextcodec.h> +#include <tqtextcodec.h> #include <kcharsets.h> #include <kglobal.h> @@ -32,21 +32,21 @@ namespace KPAC { - Downloader::Downloader( QObject* parent ) - : QObject( parent ) + Downloader::Downloader( TQObject* parent ) + : TQObject( parent ) { } void Downloader::download( const KURL& url ) { m_data.resize( 0 ); - m_script = QString::null; + m_script = TQString::null; m_scriptURL = url; KIO::TransferJob* job = KIO::get( url, false, false ); - connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ), - SLOT( data( KIO::Job*, const QByteArray& ) ) ); - connect( job, SIGNAL( result( KIO::Job* ) ), SLOT( result( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), + TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( result( KIO::Job* ) ) ); } void Downloader::failed() @@ -54,12 +54,12 @@ namespace KPAC emit result( false ); } - void Downloader::setError( const QString& error ) + void Downloader::setError( const TQString& error ) { m_error = error; } - void Downloader::data( KIO::Job*, const QByteArray& data ) + void Downloader::data( KIO::Job*, const TQByteArray& data ) { unsigned offset = m_data.size(); m_data.resize( offset + data.size() ); diff --git a/kio/misc/kpac/downloader.h b/kio/misc/kpac/downloader.h index 7869d7102..05d8569cc 100644 --- a/kio/misc/kpac/downloader.h +++ b/kio/misc/kpac/downloader.h @@ -21,7 +21,7 @@ #ifndef KPAC_DOWNLOADER_H #define KPAC_DOWNLOADER_H -#include <qobject.h> +#include <tqobject.h> #include <kurl.h> @@ -33,29 +33,29 @@ namespace KPAC { Q_OBJECT public: - Downloader( QObject* ); + Downloader( TQObject* ); void download( const KURL& ); const KURL& scriptURL() { return m_scriptURL; } - const QString& script() { return m_script; } - const QString& error() { return m_error; } + const TQString& script() { return m_script; } + const TQString& error() { return m_error; } signals: void result( bool ); protected: virtual void failed(); - void setError( const QString& ); + void setError( const TQString& ); private slots: - void data( KIO::Job*, const QByteArray& ); + void data( KIO::Job*, const TQByteArray& ); void result( KIO::Job* ); private: - QByteArray m_data; + TQByteArray m_data; KURL m_scriptURL; - QString m_script; - QString m_error; + TQString m_script; + TQString m_error; }; } diff --git a/kio/misc/kpac/proxyscout.cpp b/kio/misc/kpac/proxyscout.cpp index 06d860615..6cba79db6 100644 --- a/kio/misc/kpac/proxyscout.cpp +++ b/kio/misc/kpac/proxyscout.cpp @@ -39,7 +39,7 @@ namespace KPAC { } - ProxyScout::ProxyScout( const QCString& name ) + ProxyScout::ProxyScout( const TQCString& name ) : KDEDModule( name ), m_instance( new KInstance( "proxyscout" ) ), m_downloader( 0 ), @@ -54,7 +54,7 @@ namespace KPAC delete m_instance; } - QString ProxyScout::proxyForURL( const KURL& url ) + TQString ProxyScout::proxyForURL( const KURL& url ) { if ( m_suspendTime ) { @@ -70,12 +70,12 @@ namespace KPAC if ( m_downloader || startDownload() ) { m_requestQueue.append( url ); - return QString::null; + return TQString::null; } else return "DIRECT"; } - ASYNC ProxyScout::blackListProxy( const QString& proxy ) + ASYNC ProxyScout::blackListProxy( const TQString& proxy ) { m_blackList[ proxy ] = std::time( 0 ); } @@ -105,8 +105,8 @@ namespace KPAC default: return false; } - connect( m_downloader, SIGNAL( result( bool ) ), - SLOT( downloadResult( bool ) ) ); + connect( m_downloader, TQT_SIGNAL( result( bool ) ), + TQT_SLOT( downloadResult( bool ) ) ); return true; } @@ -130,11 +130,11 @@ namespace KPAC for ( RequestQueue::ConstIterator it = m_requestQueue.begin(); it != m_requestQueue.end(); ++it ) { - QCString type = "QString"; - QByteArray data; - QDataStream ds( data, IO_WriteOnly ); + TQCString type = "TQString"; + TQByteArray data; + TQDataStream ds( data, IO_WriteOnly ); if ( success ) ds << handleRequest( ( *it ).url ); - else ds << QString( "DIRECT" ); + else ds << TQString( "DIRECT" ); kapp->dcopClient()->endTransaction( ( *it ).transaction, type, data ); } m_requestQueue.clear(); @@ -144,16 +144,16 @@ namespace KPAC if ( !success ) m_suspendTime = std::time( 0 ); } - QString ProxyScout::handleRequest( const KURL& url ) + TQString ProxyScout::handleRequest( const KURL& url ) { try { - QString result = m_script->evaluate( url ); - QStringList proxies = QStringList::split( ';', result ); - for ( QStringList::ConstIterator it = proxies.begin(); + TQString result = m_script->evaluate( url ); + TQStringList proxies = TQStringList::split( ';', result ); + for ( TQStringList::ConstIterator it = proxies.begin(); it != proxies.end(); ++it ) { - QString proxy = ( *it ).stripWhiteSpace(); + TQString proxy = ( *it ).stripWhiteSpace(); if ( proxy.left( 5 ) == "PROXY" ) { KURL proxyURL( proxy = proxy.mid( 5 ).stripWhiteSpace() ); @@ -187,7 +187,7 @@ namespace KPAC return "DIRECT"; } - extern "C" KDE_EXPORT KDEDModule* create_proxyscout( const QCString& name ) + extern "C" KDE_EXPORT KDEDModule* create_proxyscout( const TQCString& name ) { return new ProxyScout( name ); } diff --git a/kio/misc/kpac/proxyscout.h b/kio/misc/kpac/proxyscout.h index afd7968ab..c18e5173d 100644 --- a/kio/misc/kpac/proxyscout.h +++ b/kio/misc/kpac/proxyscout.h @@ -21,7 +21,7 @@ #ifndef KPAC_PROXYSCOUT_H #define KPAC_PROXYSCOUT_H -#include <qmap.h> +#include <tqmap.h> #include <kdedmodule.h> #include <kurl.h> @@ -41,12 +41,12 @@ namespace KPAC Q_OBJECT K_DCOP public: - ProxyScout( const QCString& ); + ProxyScout( const TQCString& ); virtual ~ProxyScout(); k_dcop: - QString proxyForURL( const KURL& url ); - ASYNC blackListProxy( const QString& proxy ); + TQString proxyForURL( const KURL& url ); + ASYNC blackListProxy( const TQString& proxy ); ASYNC reset(); private slots: @@ -54,7 +54,7 @@ namespace KPAC private: bool startDownload(); - QString handleRequest( const KURL& url ); + TQString handleRequest( const KURL& url ); KInstance* m_instance; Downloader* m_downloader; @@ -68,10 +68,10 @@ namespace KPAC DCOPClientTransaction* transaction; KURL url; }; - typedef QValueList< QueuedRequest > RequestQueue; + typedef TQValueList< QueuedRequest > RequestQueue; RequestQueue m_requestQueue; - typedef QMap< QString, time_t > BlackList; + typedef TQMap< TQString, time_t > BlackList; BlackList m_blackList; time_t m_suspendTime; }; diff --git a/kio/misc/kpac/script.cpp b/kio/misc/kpac/script.cpp index 39d6d3f8e..55faef8a1 100644 --- a/kio/misc/kpac/script.cpp +++ b/kio/misc/kpac/script.cpp @@ -30,8 +30,8 @@ #include <arpa/inet.h> #include <unistd.h> -#include <qregexp.h> -#include <qstring.h> +#include <tqregexp.h> +#include <tqstring.h> #include <kurl.h> #include <kjs/object.h> @@ -41,12 +41,12 @@ using namespace KJS; -QString UString::qstring() const +TQString UString::qstring() const { - return QString( reinterpret_cast< const QChar* >( data() ), size() ); + return TQString( reinterpret_cast< const TQChar* >( data() ), size() ); } -UString::UString( const QString &s ) +UString::UString( const TQString &s ) { UChar* data = new UChar[ s.length() ]; std::memcpy( data, s.unicode(), s.length() * sizeof( UChar ) ); @@ -72,7 +72,7 @@ namespace operator String() const { return String( m_address.ipAddress().toString() ); } private: - Address( const QString& host, bool numeric ) + Address( const TQString& host, bool numeric ) { int flags = 0; @@ -80,7 +80,7 @@ namespace flags = KNetwork::KResolver::NoResolve; KNetwork::KResolverResults addresses = - KNetwork::KResolver::resolve( host, QString::null, flags, + KNetwork::KResolver::resolve( host, TQString::null, flags, KNetwork::KResolver::IPv4Family ); if ( addresses.isEmpty() ) @@ -140,8 +140,8 @@ namespace virtual Value call( ExecState* exec, Object&, const List& args ) { if ( args.size() != 2 ) return Undefined(); - QString host = args[ 0 ].toString( exec ).qstring().lower(); - QString domain = args[ 1 ].toString( exec ).qstring().lower(); + TQString host = args[ 0 ].toString( exec ).qstring().lower(); + TQString domain = args[ 1 ].toString( exec ).qstring().lower(); return Boolean( host.endsWith( domain ) ); } }; @@ -243,7 +243,7 @@ namespace virtual Value call( ExecState* exec, Object&, const List& args ) { if ( args.size() != 2 ) return Undefined(); - QRegExp pattern( args[ 1 ].toString( exec ).qstring(), true, true ); + TQRegExp pattern( args[ 1 ].toString( exec ).qstring(), true, true ); return Boolean( pattern.exactMatch(args[ 0 ].toString( exec ).qstring()) ); } }; @@ -427,7 +427,7 @@ namespace namespace KPAC { - Script::Script( const QString& code ) + Script::Script( const TQString& code ) { ExecState* exec = m_interpreter.globalExec(); Object global = m_interpreter.globalObject(); @@ -438,7 +438,7 @@ namespace KPAC throw Error( result.value().toString( exec ).qstring() ); } - QString Script::evaluate( const KURL& url ) + TQString Script::evaluate( const KURL& url ) { ExecState *exec = m_interpreter.globalExec(); Value findFunc = m_interpreter.globalObject().get( exec, "FindProxyForURL" ); diff --git a/kio/misc/kpac/script.h b/kio/misc/kpac/script.h index 2f5314e9a..49ba0b6a3 100644 --- a/kio/misc/kpac/script.h +++ b/kio/misc/kpac/script.h @@ -21,7 +21,7 @@ #ifndef KPAC_SCRIPT_H #define KPAC_SCRIPT_H -#include <qstring.h> +#include <tqstring.h> #include <kjs/interpreter.h> @@ -35,16 +35,16 @@ namespace KPAC class Error { public: - Error( const QString& message ) + Error( const TQString& message ) : m_message( message ) {} - const QString& message() const { return m_message; } + const TQString& message() const { return m_message; } private: - QString m_message; + TQString m_message; }; - Script( const QString& code ); - QString evaluate( const KURL& ); + Script( const TQString& code ); + TQString evaluate( const KURL& ); private: KJS::Interpreter m_interpreter; diff --git a/kio/misc/ksendbugmail/main.cpp b/kio/misc/ksendbugmail/main.cpp index 0d12f9e93..d84e4c297 100644 --- a/kio/misc/ksendbugmail/main.cpp +++ b/kio/misc/ksendbugmail/main.cpp @@ -6,7 +6,7 @@ #include <stdlib.h> #include <unistd.h> -#include <qtextstream.h> +#include <tqtextstream.h> #include <kapplication.h> #include <kemailsettings.h> @@ -26,7 +26,7 @@ static KCmdLineOptions options[] = { void BugMailer::slotError(int errornum) { kdDebug() << "slotError\n"; - QString str, lstr; + TQString str, lstr; switch(errornum) { case SMTP::CONNECTERROR: @@ -70,7 +70,7 @@ int main(int argc, char **argv) { KApplication a(false, false); - QCString recipient = args->getOption("recipient"); + TQCString recipient = args->getOption("recipient"); if (recipient.isEmpty()) recipient = "submit@bugs.kde.org"; else { @@ -80,15 +80,15 @@ int main(int argc, char **argv) { } kdDebug() << "recp \"" << recipient << "\"\n"; - QCString subject = args->getOption("subject"); + TQCString subject = args->getOption("subject"); if (subject.isEmpty()) subject = "(no subject)"; else { if (subject.at(0) == '\'') subject = subject.mid(1).left(subject.length() - 2); } - QTextIStream input(stdin); - QString text, line; + TQTextIStream input(stdin); + TQString text, line; while (!input.eof()) { line = input.readLine(); text += line + "\r\n"; @@ -97,15 +97,15 @@ int main(int argc, char **argv) { KEMailSettings emailConfig; emailConfig.setProfile(emailConfig.defaultProfileName()); - QString fromaddr = emailConfig.getSetting(KEMailSettings::EmailAddress); + TQString fromaddr = emailConfig.getSetting(KEMailSettings::EmailAddress); if (!fromaddr.isEmpty()) { - QString name = emailConfig.getSetting(KEMailSettings::RealName); + TQString name = emailConfig.getSetting(KEMailSettings::RealName); if (!name.isEmpty()) - fromaddr = name + QString::fromLatin1(" <") + fromaddr + QString::fromLatin1(">"); + fromaddr = name + TQString::fromLatin1(" <") + fromaddr + TQString::fromLatin1(">"); } else { struct passwd *p; p = getpwuid(getuid()); - fromaddr = QString::fromLatin1(p->pw_name); + fromaddr = TQString::fromLatin1(p->pw_name); fromaddr += "@"; char buffer[256]; buffer[0] = '\0'; @@ -115,21 +115,21 @@ int main(int argc, char **argv) { } kdDebug() << "fromaddr \"" << fromaddr << "\"" << endl; - QString server = emailConfig.getSetting(KEMailSettings::OutServer); + TQString server = emailConfig.getSetting(KEMailSettings::OutServer); if (server.isEmpty()) - server=QString::fromLatin1("bugs.kde.org"); + server=TQString::fromLatin1("bugs.kde.org"); SMTP *sm = new SMTP; BugMailer bm(sm); - QObject::connect(sm, SIGNAL(messageSent()), &bm, SLOT(slotSend())); - QObject::connect(sm, SIGNAL(error(int)), &bm, SLOT(slotError(int))); + TQObject::connect(sm, TQT_SIGNAL(messageSent()), &bm, TQT_SLOT(slotSend())); + TQObject::connect(sm, TQT_SIGNAL(error(int)), &bm, TQT_SLOT(slotError(int))); sm->setServerHost(server); sm->setPort(25); sm->setSenderAddress(fromaddr); sm->setRecipientAddress(recipient); sm->setMessageSubject(subject); - sm->setMessageHeader(QString::fromLatin1("From: %1\r\nTo: %2\r\n").arg(fromaddr).arg(recipient)); + sm->setMessageHeader(TQString::fromLatin1("From: %1\r\nTo: %2\r\n").arg(fromaddr).arg(recipient)); sm->setMessageBody(text); sm->sendMessage(); diff --git a/kio/misc/ksendbugmail/main.h b/kio/misc/ksendbugmail/main.h index cd7de398d..39d424bef 100644 --- a/kio/misc/ksendbugmail/main.h +++ b/kio/misc/ksendbugmail/main.h @@ -1,14 +1,14 @@ #ifndef BUG_MAILER_H #define BUG_MAILER_H "$Id$" -#include <qobject.h> +#include <tqobject.h> class SMTP; -class BugMailer : public QObject { +class BugMailer : public TQObject { Q_OBJECT public: - BugMailer(SMTP* s) : QObject(0, "mailer"), sm(s) {} + BugMailer(SMTP* s) : TQObject(0, "mailer"), sm(s) {} public slots: void slotError(int); diff --git a/kio/misc/ksendbugmail/smtp.cpp b/kio/misc/ksendbugmail/smtp.cpp index fd8211281..36a417b88 100644 --- a/kio/misc/ksendbugmail/smtp.cpp +++ b/kio/misc/ksendbugmail/smtp.cpp @@ -38,12 +38,12 @@ SMTP::SMTP(char *serverhost, unsigned short int port, int timeout) kdDebug() << "SMTP object created" << endl; - connect(&connectTimer, SIGNAL(timeout()), this, SLOT(connectTimerTick())); - connect(&timeOutTimer, SIGNAL(timeout()), this, SLOT(connectTimedOut())); - connect(&interactTimer, SIGNAL(timeout()), this, SLOT(interactTimedOut())); + connect(&connectTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(connectTimerTick())); + connect(&timeOutTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(connectTimedOut())); + connect(&interactTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(interactTimedOut())); // some sendmail will give 'duplicate helo' error, quick fix for now - connect(this, SIGNAL(messageSent()), SLOT(closeConnection())); + connect(this, TQT_SIGNAL(messageSent()), TQT_SLOT(closeConnection())); } SMTP::~SMTP() @@ -56,7 +56,7 @@ SMTP::~SMTP() timeOutTimer.stop(); } -void SMTP::setServerHost(const QString& serverhost) +void SMTP::setServerHost(const TQString& serverhost) { serverHost = serverhost; } @@ -71,7 +71,7 @@ void SMTP::setTimeOut(int timeout) timeOut = timeout; } -void SMTP::setSenderAddress(const QString& sender) +void SMTP::setSenderAddress(const TQString& sender) { senderAddress = sender; int index = senderAddress.find('<'); @@ -95,22 +95,22 @@ void SMTP::setSenderAddress(const QString& sender) } -void SMTP::setRecipientAddress(const QString& recipient) +void SMTP::setRecipientAddress(const TQString& recipient) { recipientAddress = recipient; } -void SMTP::setMessageSubject(const QString& subject) +void SMTP::setMessageSubject(const TQString& subject) { messageSubject = subject; } -void SMTP::setMessageBody(const QString& message) +void SMTP::setMessageBody(const TQString& message) { messageBody = message; } -void SMTP::setMessageHeader(const QString &header) +void SMTP::setMessageHeader(const TQString &header) { messageHeader = header; } @@ -134,7 +134,7 @@ void SMTP::sendMessage(void) kdDebug() << "state was == FINISHED\n" << endl; finished = false; state = IN; - writeString = QString::fromLatin1("helo %1\r\n").arg(domainName); + writeString = TQString::fromLatin1("helo %1\r\n").arg(domainName); write(sock->socket(), writeString.ascii(), writeString.length()); } if(connected){ @@ -173,8 +173,8 @@ void SMTP::connectTimerTick(void) state = INIT; serverState = NONE; - connect(sock, SIGNAL(readEvent(KSocket *)), this, SLOT(socketRead(KSocket *))); - connect(sock, SIGNAL(closeEvent(KSocket *)), this, SLOT(socketClose(KSocket *))); + connect(sock, TQT_SIGNAL(readEvent(KSocket *)), this, TQT_SLOT(socketRead(KSocket *))); + connect(sock, TQT_SIGNAL(closeEvent(KSocket *)), this, TQT_SLOT(socketClose(KSocket *))); // sock->enableRead(true); timeOutTimer.stop(); kdDebug() << "connected" << endl; @@ -231,8 +231,8 @@ void SMTP::socketRead(KSocket *socket) void SMTP::socketClose(KSocket *socket) { timeOutTimer.stop(); - disconnect(sock, SIGNAL(readEvent(KSocket *)), this, SLOT(socketRead(KSocket *))); - disconnect(sock, SIGNAL(closeEvent(KSocket *)), this, SLOT(socketClose(KSocket *))); + disconnect(sock, TQT_SIGNAL(readEvent(KSocket *)), this, TQT_SLOT(socketRead(KSocket *))); + disconnect(sock, TQT_SIGNAL(closeEvent(KSocket *)), this, TQT_SLOT(socketClose(KSocket *))); socket->enableRead(false); kdDebug() << "connection terminated" << endl; connected = false; @@ -244,10 +244,10 @@ void SMTP::socketClose(KSocket *socket) emit connectionClosed(); } -void SMTP::processLine(QString *line) +void SMTP::processLine(TQString *line) { int i, stat; - QString tmpstr; + TQString tmpstr; i = line->find(' '); tmpstr = line->left(i); @@ -262,7 +262,7 @@ void SMTP::processLine(QString *line) switch(stat){ case GREET: //220 state = IN; - writeString = QString::fromLatin1("helo %1\r\n").arg(domainName); + writeString = TQString::fromLatin1("helo %1\r\n").arg(domainName); kdDebug() << "out: " << writeString << endl; write(sock->socket(), writeString.ascii(), writeString.length()); break; @@ -273,19 +273,19 @@ void SMTP::processLine(QString *line) switch(state){ case IN: state = READY; - writeString = QString::fromLatin1("mail from: %1\r\n").arg(senderAddress); + writeString = TQString::fromLatin1("mail from: %1\r\n").arg(senderAddress); kdDebug() << "out: " << writeString << endl; write(sock->socket(), writeString.ascii(), writeString.length()); break; case READY: state = SENTFROM; - writeString = QString::fromLatin1("rcpt to: %1\r\n").arg(recipientAddress); + writeString = TQString::fromLatin1("rcpt to: %1\r\n").arg(recipientAddress); kdDebug() << "out: " << writeString << endl; write(sock->socket(), writeString.ascii(), writeString.length()); break; case SENTFROM: state = SENTTO; - writeString = QString::fromLatin1("data\r\n"); + writeString = TQString::fromLatin1("data\r\n"); kdDebug() << "out: " << writeString << endl; write(sock->socket(), writeString.ascii(), writeString.length()); break; @@ -305,11 +305,11 @@ void SMTP::processLine(QString *line) break; case READYDATA: //354 state = DATA; - writeString = QString::fromLatin1("Subject: %1\r\n").arg(messageSubject); + writeString = TQString::fromLatin1("Subject: %1\r\n").arg(messageSubject); writeString += messageHeader; writeString += "\r\n"; writeString += messageBody; - writeString += QString::fromLatin1(".\r\n"); + writeString += TQString::fromLatin1(".\r\n"); kdDebug() << "out: " << writeString; write(sock->socket(), writeString.ascii(), writeString.length()); break; diff --git a/kio/misc/ksendbugmail/smtp.h b/kio/misc/ksendbugmail/smtp.h index 71a464e98..707d20ae4 100644 --- a/kio/misc/ksendbugmail/smtp.h +++ b/kio/misc/ksendbugmail/smtp.h @@ -3,8 +3,8 @@ #ifndef SMTP_H #define SMTP_H -#include <qobject.h> -#include <qtimer.h> +#include <tqobject.h> +#include <tqtimer.h> #include <ksock.h> /*int SMTPServerStatus[] = { @@ -44,19 +44,19 @@ public: SMTP(char *serverhost = 0, unsigned short int port = 0, int timeout = DEFAULT_SMTP_TIMEOUT); ~SMTP(); - void setServerHost(const QString& serverhost); + void setServerHost(const TQString& serverhost); void setPort(unsigned short int port); void setTimeOut(int timeout); bool isConnected(){return connected;}; bool isFinished(){return finished;}; - QString getLastLine(){return lastLine;}; + TQString getLastLine(){return lastLine;}; - void setSenderAddress(const QString& sender); - void setRecipientAddress(const QString& recipient); - void setMessageSubject(const QString& subject); - void setMessageBody(const QString& message); - void setMessageHeader(const QString &header); + void setSenderAddress(const TQString& sender); + void setRecipientAddress(const TQString& recipient); + void setMessageSubject(const TQString& subject); + void setMessageBody(const TQString& message); + void setMessageHeader(const TQString &header); typedef enum { NONE = 0, // null @@ -93,7 +93,7 @@ public: }SMTPError; protected: - void processLine(QString *line); + void processLine(TQString *line); public slots: void openConnection(); @@ -113,32 +113,32 @@ signals: void error(int); private: - QString serverHost; + TQString serverHost; unsigned short int hostPort; int timeOut; bool connected; bool finished; - QString senderAddress; - QString recipientAddress; - QString messageSubject; - QString messageBody, messageHeader; + TQString senderAddress; + TQString recipientAddress; + TQString messageSubject; + TQString messageBody, messageHeader; SMTPClientStatus state; SMTPClientStatus lastState; SMTPServerStatus serverState; - QString domainName; + TQString domainName; KSocket *sock; - QTimer connectTimer; - QTimer timeOutTimer; - QTimer interactTimer; + TQTimer connectTimer; + TQTimer timeOutTimer; + TQTimer interactTimer; char readBuffer[SMTP_READ_BUFFER_SIZE]; - QString lineBuffer; - QString lastLine; - QString writeString; + TQString lineBuffer; + TQString lastLine; + TQString writeString; }; #endif diff --git a/kio/misc/kssld/kssld.cpp b/kio/misc/kssld/kssld.cpp index ff96681e2..9e8b85574 100644 --- a/kio/misc/kssld/kssld.cpp +++ b/kio/misc/kssld/kssld.cpp @@ -24,7 +24,7 @@ #include <config.h> #endif -#include <qtimer.h> +#include <tqtimer.h> #include "kssld.h" #include <kconfig.h> @@ -34,18 +34,18 @@ #include <ksslcertificatehome.h> #include <ksslpkcs12.h> #include <ksslx509map.h> -#include <qptrlist.h> +#include <tqptrlist.h> #include <sys/types.h> #include <sys/stat.h> #include <stdlib.h> #include <pwd.h> #include <unistd.h> -#include <qfile.h> -#include <qsortedlist.h> +#include <tqfile.h> +#include <tqsortedlist.h> #include <kglobal.h> #include <kstandarddirs.h> #include <kdebug.h> -#include <qdatetime.h> +#include <tqdatetime.h> #include <kmdcodec.h> #include <kopenssl.h> @@ -53,7 +53,7 @@ // See design notes at end extern "C" { - KDE_EXPORT KDEDModule *create_kssld(const QCString &name) { + KDE_EXPORT KDEDModule *create_kssld(const TQCString &name) { return new KSSLD(name); } @@ -62,9 +62,9 @@ extern "C" { static void updatePoliciesConfig(KConfig *cfg) { - QStringList groups = cfg->groupList(); + TQStringList groups = cfg->groupList(); - for (QStringList::Iterator i = groups.begin(); i != groups.end(); ++i) { + for (TQStringList::Iterator i = groups.begin(); i != groups.end(); ++i) { if ((*i).isEmpty() || *i == "General") { continue; } @@ -72,13 +72,13 @@ static void updatePoliciesConfig(KConfig *cfg) { cfg->setGroup(*i); // remove it if it has expired - if (!cfg->readBoolEntry("Permanent") && cfg->readDateTimeEntry("Expires") < QDateTime::currentDateTime()) { + if (!cfg->readBoolEntry("Permanent") && cfg->readDateTimeEntry("Expires") < TQDateTime::currentDateTime()) { cfg->deleteGroup(*i); continue; } - QString encodedCertStr = cfg->readEntry("Certificate"); - QCString encodedCert = encodedCertStr.local8Bit(); + TQString encodedCertStr = cfg->readEntry("Certificate"); + TQCString encodedCert = encodedCertStr.local8Bit(); KSSLCertificate *newCert = KSSLCertificate::fromString(encodedCert); if (!newCert) { cfg->deleteGroup(*i); @@ -87,9 +87,9 @@ static void updatePoliciesConfig(KConfig *cfg) { KSSLCertificateCache::KSSLCertificatePolicy policy = (KSSLCertificateCache::KSSLCertificatePolicy) cfg->readNumEntry("Policy"); bool permanent = cfg->readBoolEntry("Permanent"); - QDateTime expires = cfg->readDateTimeEntry("Expires"); - QStringList hosts = cfg->readListEntry("Hosts"); - QStringList chain = cfg->readListEntry("Chain"); + TQDateTime expires = cfg->readDateTimeEntry("Expires"); + TQStringList hosts = cfg->readListEntry("Hosts"); + TQStringList chain = cfg->readListEntry("Chain"); cfg->deleteGroup(*i); cfg->setGroup(newCert->getMD5Digest()); @@ -109,7 +109,7 @@ static void updatePoliciesConfig(KConfig *cfg) { } -KSSLD::KSSLD(const QCString &name) : KDEDModule(name) +KSSLD::KSSLD(const TQCString &name) : KDEDModule(name) { // ----------------------- FOR THE CACHE ------------------------------------ cfg = new KSimpleConfig("ksslpolicies", false); @@ -145,8 +145,8 @@ class KSSLCNode { KSSLCertificate *cert; KSSLCertificateCache::KSSLCertificatePolicy policy; bool permanent; - QDateTime expires; - QStringList hosts; + TQDateTime expires; + TQStringList hosts; KSSLCNode() { cert = 0L; policy = KSSLCertificateCache::Unknown; permanent = true; @@ -164,7 +164,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (node->permanent || - node->expires > QDateTime::currentDateTime()) { + node->expires > TQDateTime::currentDateTime()) { // First convert to a binary format and then write the // kconfig entry write the (CN, policy, cert) to // KSimpleConfig @@ -176,8 +176,8 @@ KSSLCNode *node; cfg->writeEntry("Hosts", node->hosts); // Also write the chain - QStringList qsl; - QPtrList<KSSLCertificate> cl = + TQStringList qsl; + TQPtrList<KSSLCertificate> cl = node->cert->chain().getChain(); for (KSSLCertificate *c = cl.first(); c != 0; @@ -195,10 +195,10 @@ KSSLCNode *node; cfg->sync(); // insure proper permissions -- contains sensitive data - QString cfgName(KGlobal::dirs()->findResource("config", "ksslpolicies")); + TQString cfgName(KGlobal::dirs()->findResource("config", "ksslpolicies")); if (!cfgName.isEmpty()) { - ::chmod(QFile::encodeName(cfgName), 0600); + ::chmod(TQFile::encodeName(cfgName), 0600); } } @@ -225,9 +225,9 @@ KSSLCNode *node; void KSSLD::cacheLoadDefaultPolicies() { -QStringList groups = cfg->groupList(); +TQStringList groups = cfg->groupList(); - for (QStringList::Iterator i = groups.begin(); + for (TQStringList::Iterator i = groups.begin(); i != groups.end(); ++i) { if ((*i).isEmpty() || *i == "General") { @@ -239,12 +239,12 @@ QStringList groups = cfg->groupList(); // remove it if it has expired if (!cfg->readBoolEntry("Permanent") && cfg->readDateTimeEntry("Expires") < - QDateTime::currentDateTime()) { + TQDateTime::currentDateTime()) { cfg->deleteGroup(*i); continue; } - QCString encodedCert; + TQCString encodedCert; KSSLCertificate *newCert; encodedCert = cfg->readEntry("Certificate").local8Bit(); @@ -278,7 +278,7 @@ KSSLCNode *node; node->permanent = permanent; if (!permanent) { - node->expires = QDateTime::currentDateTime(); + node->expires = TQDateTime::currentDateTime(); // FIXME: make this configurable node->expires = node->expires.addSecs(3600); } @@ -297,7 +297,7 @@ KSSLCNode *node; certList.prepend(n); if (!permanent) { - n->expires = QDateTime::currentDateTime(); + n->expires = TQDateTime::currentDateTime(); n->expires = n->expires.addSecs(3600); } @@ -306,13 +306,13 @@ KSSLCNode *node; } -KSSLCertificateCache::KSSLCertificatePolicy KSSLD::cacheGetPolicyByCN(QString cn) { +KSSLCertificateCache::KSSLCertificatePolicy KSSLD::cacheGetPolicyByCN(TQString cn) { KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (KSSLX509Map(node->cert->getSubject()).getValue("CN") == cn) { if (!node->permanent && - node->expires < QDateTime::currentDateTime()) { + node->expires < TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); delete node; @@ -338,7 +338,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (cert == *(node->cert)) { if (!node->permanent && - node->expires < QDateTime::currentDateTime()) { + node->expires < TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); delete node; @@ -356,13 +356,13 @@ return KSSLCertificateCache::Unknown; } -bool KSSLD::cacheSeenCN(QString cn) { +bool KSSLD::cacheSeenCN(TQString cn) { KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (KSSLX509Map(node->cert->getSubject()).getValue("CN") == cn) { if (!node->permanent && - node->expires < QDateTime::currentDateTime()) { + node->expires < TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); delete node; @@ -386,7 +386,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (cert == *(node->cert)) { if (!node->permanent && - node->expires < QDateTime::currentDateTime()) { + node->expires < TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); delete node; @@ -410,7 +410,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (cert == *(node->cert)) { if (!node->permanent && node->expires < - QDateTime::currentDateTime()) { + TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); delete node; @@ -428,7 +428,7 @@ return false; } -bool KSSLD::cacheRemoveBySubject(QString subject) { +bool KSSLD::cacheRemoveBySubject(TQString subject) { KSSLCNode *node; bool gotOne = false; @@ -448,7 +448,7 @@ return gotOne; } -bool KSSLD::cacheRemoveByCN(QString cn) { +bool KSSLD::cacheRemoveByCN(TQString cn) { KSSLCNode *node; bool gotOne = false; @@ -486,9 +486,9 @@ return false; } -bool KSSLD::cacheModifyByCN(QString cn, +bool KSSLD::cacheModifyByCN(TQString cn, KSSLCertificateCache::KSSLCertificatePolicy policy, bool permanent, - QDateTime expires) { + TQDateTime expires) { KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { @@ -510,7 +510,7 @@ return false; bool KSSLD::cacheModifyByCertificate(KSSLCertificate cert, KSSLCertificateCache::KSSLCertificatePolicy policy, bool permanent, - QDateTime expires) { + TQDateTime expires) { KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { @@ -529,19 +529,19 @@ return false; } -QStringList KSSLD::cacheGetHostList(KSSLCertificate cert) { +TQStringList KSSLD::cacheGetHostList(KSSLCertificate cert) { KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (cert == *(node->cert)) { if (!node->permanent && node->expires < - QDateTime::currentDateTime()) { + TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); searchRemoveCert(node->cert); delete node; cacheSaveToDisk(); - return QStringList(); + return TQStringList(); } certList.remove(node); @@ -550,11 +550,11 @@ KSSLCNode *node; } } -return QStringList(); +return TQStringList(); } -bool KSSLD::cacheAddHost(KSSLCertificate cert, QString host) { +bool KSSLD::cacheAddHost(KSSLCertificate cert, TQString host) { KSSLCNode *node; if (host.isEmpty()) @@ -563,7 +563,7 @@ KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (cert == *(node->cert)) { if (!node->permanent && node->expires < - QDateTime::currentDateTime()) { + TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); searchRemoveCert(node->cert); @@ -587,13 +587,13 @@ return false; } -bool KSSLD::cacheRemoveHost(KSSLCertificate cert, QString host) { +bool KSSLD::cacheRemoveHost(KSSLCertificate cert, TQString host) { KSSLCNode *node; for (node = certList.first(); node; node = certList.next()) { if (cert == *(node->cert)) { if (!node->permanent && node->expires < - QDateTime::currentDateTime()) { + TQDateTime::currentDateTime()) { certList.remove(node); cfg->deleteGroup(node->cert->getMD5Digest()); searchRemoveCert(node->cert); @@ -618,11 +618,11 @@ return false; /////////////////////////////////////////////////////////////////////////// void KSSLD::caVerifyUpdate() { - QString path = KGlobal::dirs()->saveLocation("kssl") + "/ca-bundle.crt"; - if (!QFile::exists(path)) + TQString path = KGlobal::dirs()->saveLocation("kssl") + "/ca-bundle.crt"; + if (!TQFile::exists(path)) return; - cfg->setGroup(QString::null); + cfg->setGroup(TQString::null); Q_UINT32 newStamp = KGlobal::dirs()->calcResourceHash("config", "ksslcalist", true); Q_UINT32 oldStamp = cfg->readUnsignedNumEntry("ksslcalistStamp"); if (oldStamp != newStamp) @@ -634,18 +634,18 @@ void KSSLD::caVerifyUpdate() { } bool KSSLD::caRegenerate() { -QString path = KGlobal::dirs()->saveLocation("kssl") + "/ca-bundle.crt"; +TQString path = KGlobal::dirs()->saveLocation("kssl") + "/ca-bundle.crt"; -QFile out(path); +TQFile out(path); if (!out.open(IO_WriteOnly)) return false; KConfig cfg("ksslcalist", true, false); -QStringList x = cfg.groupList(); +TQStringList x = cfg.groupList(); - for (QStringList::Iterator i = x.begin(); + for (TQStringList::Iterator i = x.begin(); i != x.end(); ++i) { if ((*i).isEmpty() || *i == "<default>") continue; @@ -654,7 +654,7 @@ QStringList x = cfg.groupList(); if (!cfg.readBoolEntry("site", false)) continue; - QString cert = cfg.readEntry("x509", ""); + TQString cert = cfg.readEntry("x509", ""); if (cert.length() <= 0) continue; unsigned int xx = cert.length() - 1; @@ -672,7 +672,7 @@ return true; -bool KSSLD::caAdd(QString certificate, bool ssl, bool email, bool code) { +bool KSSLD::caAdd(TQString certificate, bool ssl, bool email, bool code) { KSSLCertificate *x = KSSLCertificate::fromString(certificate.local8Bit()); if (!x) return false; @@ -696,11 +696,11 @@ return true; * @internal * Returns a list of certificates as QStrings read from the given file */ -static QStringList caReadCerticatesFromFile(QString filename) { +static TQStringList caReadCerticatesFromFile(TQString filename) { - QStringList certificates; - QString certificate, temp; - QFile file(filename); + TQStringList certificates; + TQString certificate, temp; + TQFile file(filename); if (!file.open(IO_ReadOnly)) return certificates; @@ -708,13 +708,13 @@ static QStringList caReadCerticatesFromFile(QString filename) { while (!file.atEnd()) { file.readLine(temp, 999); if (temp.startsWith("-----BEGIN CERTIFICATE-----")) { - certificate = QString::null; + certificate = TQString::null; continue; } if (temp.startsWith("-----END CERTIFICATE-----")) { certificates.append(certificate); - certificate = QString::null; + certificate = TQString::null; continue; } @@ -726,16 +726,16 @@ static QStringList caReadCerticatesFromFile(QString filename) { return certificates; } -bool KSSLD::caAddFromFile(QString filename, bool ssl, bool email, bool code) { +bool KSSLD::caAddFromFile(TQString filename, bool ssl, bool email, bool code) { - QStringList certificates; + TQStringList certificates; certificates = caReadCerticatesFromFile(filename); if (certificates.isEmpty()) return false; bool ok = true; - for (QStringList::Iterator it = certificates.begin(); + for (TQStringList::Iterator it = certificates.begin(); it != certificates.end(); ++it ) { ok &= caAdd(*it, ssl, email, code); } @@ -743,18 +743,18 @@ bool KSSLD::caAddFromFile(QString filename, bool ssl, bool email, bool code) { return ok; } -bool KSSLD::caRemoveFromFile(QString filename) { +bool KSSLD::caRemoveFromFile(TQString filename) { - QStringList certificates; + TQStringList certificates; certificates = caReadCerticatesFromFile(filename); if (certificates.isEmpty()) return false; bool ok = true; - for (QStringList::Iterator it = certificates.begin(); + for (TQStringList::Iterator it = certificates.begin(); it != certificates.end(); ++it ) { - QString certificate = *it; + TQString certificate = *it; KSSLCertificate *x = KSSLCertificate::fromString(certificate.local8Bit()); ok &= x && caRemove(x->getSubject()); delete x; @@ -764,8 +764,8 @@ bool KSSLD::caRemoveFromFile(QString filename) { } -QStringList KSSLD::caList() { -QStringList x; +TQStringList KSSLD::caList() { +TQStringList x; KConfig cfg("ksslcalist", true, false); x = cfg.groupList(); @@ -775,7 +775,7 @@ return x; } -bool KSSLD::caUseForSSL(QString subject) { +bool KSSLD::caUseForSSL(TQString subject) { KConfig cfg("ksslcalist", true, false); if (!cfg.hasGroup(subject)) @@ -787,7 +787,7 @@ return cfg.readBoolEntry("site", false); -bool KSSLD::caUseForEmail(QString subject) { +bool KSSLD::caUseForEmail(TQString subject) { KConfig cfg("ksslcalist", true, false); if (!cfg.hasGroup(subject)) @@ -799,7 +799,7 @@ return cfg.readBoolEntry("email", false); -bool KSSLD::caUseForCode(QString subject) { +bool KSSLD::caUseForCode(TQString subject) { KConfig cfg("ksslcalist", true, false); if (!cfg.hasGroup(subject)) @@ -810,7 +810,7 @@ return cfg.readBoolEntry("code", false); } -bool KSSLD::caRemove(QString subject) { +bool KSSLD::caRemove(TQString subject) { KConfig cfg("ksslcalist", false, false); if (!cfg.hasGroup(subject)) return false; @@ -822,18 +822,18 @@ return true; } -QString KSSLD::caGetCert(QString subject) { +TQString KSSLD::caGetCert(TQString subject) { KConfig cfg("ksslcalist", true, false); if (!cfg.hasGroup(subject)) - return QString::null; + return TQString::null; cfg.setGroup(subject); -return cfg.readEntry("x509", QString::null); +return cfg.readEntry("x509", TQString::null); } -bool KSSLD::caSetUse(QString subject, bool ssl, bool email, bool code) { +bool KSSLD::caSetUse(TQString subject, bool ssl, bool email, bool code) { KConfig cfg("ksslcalist", false, false); if (!cfg.hasGroup(subject)) return false; @@ -853,16 +853,16 @@ return true; void KSSLD::searchAddCert(KSSLCertificate *cert) { skMD5Digest.insert(cert->getMD5Digest(), cert, true); - QStringList mails; + TQStringList mails; cert->getEmails(mails); - for(QStringList::const_iterator iter = mails.begin(); iter != mails.end(); ++iter) { - QString email = static_cast<const QString &>(*iter).lower(); - QMap<QString, QPtrVector<KSSLCertificate> >::iterator it = skEmail.find(email); + for(TQStringList::const_iterator iter = mails.begin(); iter != mails.end(); ++iter) { + TQString email = static_cast<const TQString &>(*iter).lower(); + TQMap<TQString, TQPtrVector<KSSLCertificate> >::iterator it = skEmail.find(email); if (it == skEmail.end()) - it = skEmail.insert(email, QPtrVector<KSSLCertificate>()); + it = skEmail.insert(email, TQPtrVector<KSSLCertificate>()); - QPtrVector<KSSLCertificate> &elem = *it; + TQPtrVector<KSSLCertificate> &elem = *it; if (elem.findRef(cert) == -1) { unsigned int n = 0; @@ -884,15 +884,15 @@ void KSSLD::searchAddCert(KSSLCertificate *cert) { void KSSLD::searchRemoveCert(KSSLCertificate *cert) { skMD5Digest.remove(cert->getMD5Digest()); - QStringList mails; + TQStringList mails; cert->getEmails(mails); - for(QStringList::const_iterator iter = mails.begin(); iter != mails.end(); ++iter) { - QMap<QString, QPtrVector<KSSLCertificate> >::iterator it = skEmail.find(static_cast<const QString &>(*iter).lower()); + for(TQStringList::const_iterator iter = mails.begin(); iter != mails.end(); ++iter) { + TQMap<TQString, TQPtrVector<KSSLCertificate> >::iterator it = skEmail.find(static_cast<const TQString &>(*iter).lower()); if (it == skEmail.end()) break; - QPtrVector<KSSLCertificate> &elem = *it; + TQPtrVector<KSSLCertificate> &elem = *it; int n = elem.findRef(cert); if (n != -1) @@ -901,16 +901,16 @@ void KSSLD::searchRemoveCert(KSSLCertificate *cert) { } -QStringList KSSLD::getKDEKeyByEmail(const QString &email) { - QStringList rc; - QMap<QString, QPtrVector<KSSLCertificate> >::iterator it = skEmail.find(email.lower()); +TQStringList KSSLD::getKDEKeyByEmail(const TQString &email) { + TQStringList rc; + TQMap<TQString, TQPtrVector<KSSLCertificate> >::iterator it = skEmail.find(email.lower()); kdDebug() << "GETKDEKey " << email.latin1() << endl; if (it == skEmail.end()) return rc; - QPtrVector<KSSLCertificate> &elem = *it; + TQPtrVector<KSSLCertificate> &elem = *it; for (unsigned int n = 0; n < elem.size(); n++) { KSSLCertificate *cert = elem.at(n); if (cert) { @@ -923,8 +923,8 @@ QStringList KSSLD::getKDEKeyByEmail(const QString &email) { } -KSSLCertificate KSSLD::getCertByMD5Digest(const QString &key) { - QMap<QString, KSSLCertificate *>::iterator iter = skMD5Digest.find(key); +KSSLCertificate KSSLD::getCertByMD5Digest(const TQString &key) { + TQMap<TQString, KSSLCertificate *>::iterator iter = skMD5Digest.find(key); kdDebug() << "Searching cert for " << key.latin1() << endl; @@ -943,15 +943,15 @@ KSSLCertificate KSSLD::getCertByMD5Digest(const QString &key) { // Certificate Home methods // -QStringList KSSLD::getHomeCertificateList() { +TQStringList KSSLD::getHomeCertificateList() { return KSSLCertificateHome::getCertificateList(); } -bool KSSLD::addHomeCertificateFile(QString filename, QString password, bool storePass) { +bool KSSLD::addHomeCertificateFile(TQString filename, TQString password, bool storePass) { return KSSLCertificateHome::addCertificate(filename, password, storePass); } -bool KSSLD::addHomeCertificatePKCS12(QString base64cert, QString passToStore) { +bool KSSLD::addHomeCertificatePKCS12(TQString base64cert, TQString passToStore) { bool ok; KSSLPKCS12 *pkcs12 = KSSLPKCS12::fromString(base64cert, passToStore); ok = KSSLCertificateHome::addCertificate(pkcs12, passToStore); @@ -959,11 +959,11 @@ bool KSSLD::addHomeCertificatePKCS12(QString base64cert, QString passToStore) { return ok; } -bool KSSLD::deleteHomeCertificateByFile(QString filename, QString password) { +bool KSSLD::deleteHomeCertificateByFile(TQString filename, TQString password) { return KSSLCertificateHome::deleteCertificate(filename, password); } -bool KSSLD::deleteHomeCertificateByPKCS12(QString base64cert, QString password) { +bool KSSLD::deleteHomeCertificateByPKCS12(TQString base64cert, TQString password) { bool ok; KSSLPKCS12 *pkcs12 = KSSLPKCS12::fromString(base64cert, password); ok = KSSLCertificateHome::deleteCertificate(pkcs12); @@ -971,7 +971,7 @@ bool KSSLD::deleteHomeCertificateByPKCS12(QString base64cert, QString password) return ok; } -bool KSSLD::deleteHomeCertificateByName(QString name) { +bool KSSLD::deleteHomeCertificateByName(TQString name) { return KSSLCertificateHome::deleteCertificateByName(name); } @@ -991,7 +991,7 @@ bool KSSLD::deleteHomeCertificateByName(QString name) { experimentation to determine which implementation works best. My current options are: - (1) Store copies of the X509 certificates in a QPtrList using a self + (1) Store copies of the X509 certificates in a TQPtrList using a self organizing heuristic as described by Munro and Suwanda. (2) Store copies of the X509 certificates in a tree structure, perhaps a redblack tree, avl tree, or even just a simple binary tree. diff --git a/kio/misc/kssld/kssld.h b/kio/misc/kssld/kssld.h index 94cbe3972..028a30809 100644 --- a/kio/misc/kssld/kssld.h +++ b/kio/misc/kssld/kssld.h @@ -25,11 +25,11 @@ #include <kded/kdedmodule.h> #include <ksslcertificate.h> #include <ksslcertificatecache.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qvaluelist.h> -#include <qmap.h> -#include <qptrvector.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqvaluelist.h> +#include <tqmap.h> +#include <tqptrvector.h> class KSimpleConfig; @@ -43,7 +43,7 @@ class KSSLD : public KDEDModule public: - KSSLD(const QCString &name); + KSSLD(const TQCString &name); virtual ~KSSLD(); @@ -54,80 +54,80 @@ k_dcop: void cacheAddCertificate(KSSLCertificate cert, KSSLCertificateCache::KSSLCertificatePolicy policy, bool permanent = true); - KSSLCertificateCache::KSSLCertificatePolicy cacheGetPolicyByCN(QString cn); + KSSLCertificateCache::KSSLCertificatePolicy cacheGetPolicyByCN(TQString cn); KSSLCertificateCache::KSSLCertificatePolicy cacheGetPolicyByCertificate(KSSLCertificate cert); - bool cacheSeenCN(QString cn); + bool cacheSeenCN(TQString cn); bool cacheSeenCertificate(KSSLCertificate cert); - bool cacheRemoveByCN(QString cn); - bool cacheRemoveBySubject(QString subject); + bool cacheRemoveByCN(TQString cn); + bool cacheRemoveBySubject(TQString subject); bool cacheRemoveByCertificate(KSSLCertificate cert); bool cacheIsPermanent(KSSLCertificate cert); void cacheReload(); - bool cacheModifyByCN(QString cn, + bool cacheModifyByCN(TQString cn, KSSLCertificateCache::KSSLCertificatePolicy policy, bool permanent, - QDateTime expires); + TQDateTime expires); bool cacheModifyByCertificate(KSSLCertificate cert, KSSLCertificateCache::KSSLCertificatePolicy policy, bool permanent, - QDateTime expires); + TQDateTime expires); - QStringList cacheGetHostList(KSSLCertificate cert); + TQStringList cacheGetHostList(KSSLCertificate cert); - bool cacheAddHost(KSSLCertificate cert, QString host); + bool cacheAddHost(KSSLCertificate cert, TQString host); - bool cacheRemoveHost(KSSLCertificate cert, QString host); + bool cacheRemoveHost(KSSLCertificate cert, TQString host); /* Certificate Authorities */ void caVerifyUpdate(); bool caRegenerate(); - QStringList caList(); + TQStringList caList(); - bool caUseForSSL(QString subject); + bool caUseForSSL(TQString subject); - bool caUseForEmail(QString subject); + bool caUseForEmail(TQString subject); - bool caUseForCode(QString subject); + bool caUseForCode(TQString subject); - bool caAdd(QString certificate, bool ssl, bool email, bool code); + bool caAdd(TQString certificate, bool ssl, bool email, bool code); - bool caAddFromFile(QString filename, bool ssl, bool email, bool code); + bool caAddFromFile(TQString filename, bool ssl, bool email, bool code); - bool caRemove(QString subject); + bool caRemove(TQString subject); - bool caRemoveFromFile(QString filename); + bool caRemoveFromFile(TQString filename); - QString caGetCert(QString subject); + TQString caGetCert(TQString subject); - bool caSetUse(QString subject, bool ssl, bool email, bool code); + bool caSetUse(TQString subject, bool ssl, bool email, bool code); - QStringList getKDEKeyByEmail(const QString &email); + TQStringList getKDEKeyByEmail(const TQString &email); - KSSLCertificate getCertByMD5Digest(const QString &key); + KSSLCertificate getCertByMD5Digest(const TQString &key); // // Certificate Home methods // - QStringList getHomeCertificateList(); + TQStringList getHomeCertificateList(); - bool addHomeCertificateFile(QString filename, QString password, bool storePass /*=false*/); + bool addHomeCertificateFile(TQString filename, TQString password, bool storePass /*=false*/); - bool addHomeCertificatePKCS12(QString base64cert, QString passToStore); + bool addHomeCertificatePKCS12(TQString base64cert, TQString passToStore); - bool deleteHomeCertificateByFile(QString filename, QString password); + bool deleteHomeCertificateByFile(TQString filename, TQString password); - bool deleteHomeCertificateByPKCS12(QString base64cert, QString password); + bool deleteHomeCertificateByPKCS12(TQString base64cert, TQString password); - bool deleteHomeCertificateByName(QString name); + bool deleteHomeCertificateByName(TQString name); private: @@ -137,7 +137,7 @@ private: // for the cache portion: KSimpleConfig *cfg; - QPtrList<KSSLCNode> certList; + TQPtrList<KSSLCNode> certList; // Our pointer to OpenSSL KOpenSSLProxy *kossl; @@ -146,8 +146,8 @@ private: void searchAddCert(KSSLCertificate *cert); void searchRemoveCert(KSSLCertificate *cert); - QMap<QString, QPtrVector<KSSLCertificate> > skEmail; - QMap<QString, KSSLCertificate *> skMD5Digest; + TQMap<TQString, TQPtrVector<KSSLCertificate> > skEmail; + TQMap<TQString, KSSLCertificate *> skMD5Digest; }; diff --git a/kio/misc/ktelnetservice.cpp b/kio/misc/ktelnetservice.cpp index 41635b053..9c8238f74 100644 --- a/kio/misc/ktelnetservice.cpp +++ b/kio/misc/ktelnetservice.cpp @@ -51,10 +51,10 @@ int main(int argc, char **argv) KConfig *config = new KConfig("kdeglobals", true); config->setGroup("General"); - QString terminal = config->readPathEntry("TerminalApplication", "konsole"); + TQString terminal = config->readPathEntry("TerminalApplication", "konsole"); KURL url(args->arg(0)); - QStringList cmd; + TQStringList cmd; if (terminal == "konsole") cmd << "--noclose"; @@ -83,7 +83,7 @@ int main(int argc, char **argv) cmd << url.user(); } - QString host; + TQString host; if (!url.host().isEmpty()) host = url.host(); // telnet://host else if (!url.path().isEmpty()) @@ -99,9 +99,9 @@ int main(int argc, char **argv) if (url.port()){ if ( url.protocol() == "ssh" ) - cmd << "-p" << QString::number(url.port()); + cmd << "-p" << TQString::number(url.port()); else - cmd << QString::number(url.port()); + cmd << TQString::number(url.port()); } app.kdeinitExec(terminal, cmd); diff --git a/kio/misc/kwalletd/kbetterthankdialogbase.ui.h b/kio/misc/kwalletd/kbetterthankdialogbase.ui.h index 565e0880e..2b3e16b0d 100644 --- a/kio/misc/kwalletd/kbetterthankdialogbase.ui.h +++ b/kio/misc/kwalletd/kbetterthankdialogbase.ui.h @@ -25,7 +25,7 @@ void KBetterThanKDialogBase::clicked() } -void KBetterThanKDialogBase::setLabel( const QString & label ) +void KBetterThanKDialogBase::setLabel( const TQString & label ) { _label->setText(label); } @@ -45,6 +45,6 @@ void KBetterThanKDialogBase::accept() void KBetterThanKDialogBase::reject() { - QDialog::reject(); + TQDialog::reject(); setResult(2); } diff --git a/kio/misc/kwalletd/ktimeout.cpp b/kio/misc/kwalletd/ktimeout.cpp index 1827b8bba..e13a32d20 100644 --- a/kio/misc/kwalletd/ktimeout.cpp +++ b/kio/misc/kwalletd/ktimeout.cpp @@ -23,7 +23,7 @@ #include "ktimeout.h" KTimeout::KTimeout(int size) -: QObject(), _timers(size) { +: TQObject(), _timers(size) { _timers.setAutoDelete(true); } @@ -39,7 +39,7 @@ void KTimeout::clear() { void KTimeout::removeTimer(int id) { - QTimer *t = _timers.find(id); + TQTimer *t = _timers.find(id); if (t != 0L) { _timers.remove(id); // autodeletes } @@ -51,15 +51,15 @@ void KTimeout::addTimer(int id, int timeout) { return; } - QTimer *t = new QTimer; - connect(t, SIGNAL(timeout()), this, SLOT(timeout())); + TQTimer *t = new QTimer; + connect(t, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout())); t->start(timeout); _timers.insert(id, t); } void KTimeout::resetTimer(int id, int timeout) { - QTimer *t = _timers.find(id); + TQTimer *t = _timers.find(id); if (t) { t->changeInterval(timeout); } @@ -67,9 +67,9 @@ void KTimeout::resetTimer(int id, int timeout) { void KTimeout::timeout() { - const QTimer *t = static_cast<const QTimer*>(sender()); + const TQTimer *t = static_cast<const TQTimer*>(sender()); if (t) { - QIntDictIterator<QTimer> it(_timers); + TQIntDictIterator<TQTimer> it(_timers); for (; it.current(); ++it) { if (it.current() == t) { emit timedOut(it.currentKey()); diff --git a/kio/misc/kwalletd/ktimeout.h b/kio/misc/kwalletd/ktimeout.h index 287de44cb..441e4ed77 100644 --- a/kio/misc/kwalletd/ktimeout.h +++ b/kio/misc/kwalletd/ktimeout.h @@ -22,12 +22,12 @@ #ifndef _KTIMEOUT_H_ #define _KTIMEOUT_H_ -#include <qintdict.h> -#include <qobject.h> -#include <qtimer.h> +#include <tqintdict.h> +#include <tqobject.h> +#include <tqtimer.h> // @internal -class KTimeout : public QObject { +class KTimeout : public TQObject { Q_OBJECT public: KTimeout(int size = 29); @@ -46,7 +46,7 @@ class KTimeout : public QObject { void timeout(); private: - QIntDict<QTimer> _timers; + TQIntDict<TQTimer> _timers; }; #endif diff --git a/kio/misc/kwalletd/kwalletd.cpp b/kio/misc/kwalletd/kwalletd.cpp index 3fa32ff71..fd39f8487 100644 --- a/kio/misc/kwalletd/kwalletd.cpp +++ b/kio/misc/kwalletd/kwalletd.cpp @@ -40,18 +40,18 @@ #include <kwalletentry.h> #include <kwin.h> -#include <qdir.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qstylesheet.h> -#include <qvbox.h> +#include <tqdir.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqstylesheet.h> +#include <tqvbox.h> #include <assert.h> extern "C" { - KDE_EXPORT KDEDModule *create_kwalletd(const QCString &name) { + KDE_EXPORT KDEDModule *create_kwalletd(const TQCString &name) { return new KWalletD(name); } } @@ -76,15 +76,15 @@ class KWalletTransaction { DCOPClient *client; DCOPClientTransaction *transaction; Type tType; - QCString rawappid, returnObject; - QCString appid; + TQCString rawappid, returnObject; + TQCString appid; uint wId; - QString wallet; + TQString wallet; bool modal; }; -KWalletD::KWalletD(const QCString &name) +KWalletD::KWalletD(const TQCString &name) : KDEDModule(name), _failed(0) { srand(time(0)); _showingFailureNotify = false; @@ -92,17 +92,17 @@ KWalletD::KWalletD(const QCString &name) _timeouts = new KTimeout(17); _closeIdle = false; _idleTime = 0; - connect(_timeouts, SIGNAL(timedOut(int)), this, SLOT(timedOut(int))); + connect(_timeouts, TQT_SIGNAL(timedOut(int)), this, TQT_SLOT(timedOut(int))); reconfigure(); KGlobal::dirs()->addResourceType("kwallet", "share/apps/kwallet"); connect(KApplication::dcopClient(), - SIGNAL(applicationRemoved(const QCString&)), + TQT_SIGNAL(applicationRemoved(const TQCString&)), this, - SLOT(slotAppUnregistered(const QCString&))); + TQT_SLOT(slotAppUnregistered(const TQCString&))); _dw = new KDirWatch(this, "KWallet Directory Watcher"); _dw->addDir(KGlobal::dirs()->saveLocation("kwallet")); _dw->startScan(true); - connect(_dw, SIGNAL(dirty(const QString&)), this, SLOT(emitWalletListDirty())); + connect(_dw, TQT_SIGNAL(dirty(const TQString&)), this, TQT_SLOT(emitWalletListDirty())); } @@ -140,7 +140,7 @@ void KWalletD::processTransactions() { KWalletTransaction *xact; while (!_transactions.isEmpty()) { xact = _transactions.first(); - QCString replyType; + TQCString replyType; int res; assert(xact->tType != KWalletTransaction::Unknown); @@ -157,7 +157,7 @@ void KWalletD::processTransactions() { // should not produce multiple password // dialogs on a failure if (res < 0) { - QPtrListIterator<KWalletTransaction> it(_transactions); + TQPtrListIterator<KWalletTransaction> it(_transactions); KWalletTransaction *x; while ((x = it.current()) && x != xact) { ++it; @@ -189,8 +189,8 @@ void KWalletD::processTransactions() { } if (xact->returnObject.isEmpty() && xact->tType != KWalletTransaction::ChangePassword) { - QByteArray replyData; - QDataStream stream(replyData, IO_WriteOnly); + TQByteArray replyData; + TQDataStream stream(replyData, IO_WriteOnly); stream << res; xact->client->endTransaction(xact->transaction, replyType, replyData); } @@ -201,20 +201,20 @@ void KWalletD::processTransactions() { } -void KWalletD::openAsynchronous(const QString& wallet, const QCString& returnObject, uint wId) { +void KWalletD::openAsynchronous(const TQString& wallet, const TQCString& returnObject, uint wId) { DCOPClient *dc = callingDcopClient(); if (!dc) { return; } - QCString appid = dc->senderId(); + TQCString appid = dc->senderId(); if (!_enabled || - !QRegExp("^[A-Za-z0-9]+[A-Za-z0-9\\s\\-_]*$").exactMatch(wallet)) { + !TQRegExp("^[A-Za-z0-9]+[A-Za-z0-9\\s\\-_]*$").exactMatch(wallet)) { DCOPRef(appid, returnObject).send("walletOpenResult", -1); return; } - QCString peerName = friendlyDCOPPeerName(); + TQCString peerName = friendlyDCOPPeerName(); KWalletTransaction *xact = new KWalletTransaction; @@ -229,12 +229,12 @@ void KWalletD::openAsynchronous(const QString& wallet, const QCString& returnObj DCOPRef(appid, returnObject).send("walletOpenResult", 0); - QTimer::singleShot(0, this, SLOT(processTransactions())); + TQTimer::singleShot(0, this, TQT_SLOT(processTransactions())); checkActiveDialog(); } -int KWalletD::openPath(const QString& path, uint wId) { +int KWalletD::openPath(const TQString& path, uint wId) { if (!_enabled) { // guard return -1; } @@ -245,16 +245,16 @@ int KWalletD::openPath(const QString& path, uint wId) { } -int KWalletD::open(const QString& wallet, uint wId) { +int KWalletD::open(const TQString& wallet, uint wId) { if (!_enabled) { // guard return -1; } - if (!QRegExp("^[A-Za-z0-9]+[A-Za-z0-9\\s\\-_]*$").exactMatch(wallet)) { + if (!TQRegExp("^[A-Za-z0-9]+[A-Za-z0-9\\s\\-_]*$").exactMatch(wallet)) { return -1; } - QCString appid = friendlyDCOPPeerName(); + TQCString appid = friendlyDCOPPeerName(); KWalletTransaction *xact = new KWalletTransaction; _transactions.append(xact); @@ -266,14 +266,14 @@ int KWalletD::open(const QString& wallet, uint wId) { xact->wId = wId; xact->tType = KWalletTransaction::Open; xact->modal = true; // mark dialogs as modal, the app has blocking wait - QTimer::singleShot(0, this, SLOT(processTransactions())); + TQTimer::singleShot(0, this, TQT_SLOT(processTransactions())); checkActiveDialog(); return 0; // process later } // Sets up a dialog that will be shown by kwallet. -void KWalletD::setupDialog( QWidget* dialog, WId wId, const QCString& appid, bool modal ) { +void KWalletD::setupDialog( TQWidget* dialog, WId wId, const TQCString& appid, bool modal ) { if( wId != 0 ) KWin::setMainWindow( dialog, wId ); // correct, set dialog parent else { @@ -307,13 +307,13 @@ void KWalletD::checkActiveDialog() { KWin::forceActiveWindow( activeDialog->winId()); } -int KWalletD::doTransactionOpen(const QCString& appid, const QString& wallet, uint wId, bool modal) { +int KWalletD::doTransactionOpen(const TQCString& appid, const TQString& wallet, uint wId, bool modal) { if (_firstUse && !wallets().contains(KWallet::Wallet::LocalWallet())) { // First use wizard KWalletWizard *wiz = new KWalletWizard(0); setupDialog( wiz, wId, appid, modal ); int rc = wiz->exec(); - if (rc == QDialog::Accepted) { + if (rc == TQDialog::Accepted) { KConfig cfg("kwalletrc"); cfg.setGroup("Wallet"); cfg.writeEntry("First Use", false); @@ -330,7 +330,7 @@ int KWalletD::doTransactionOpen(const QCString& appid, const QString& wallet, ui // Create the wallet KWallet::Backend *b = new KWallet::Backend(KWallet::Wallet::LocalWallet()); - QByteArray p; + TQByteArray p; p.duplicate(wiz->_pass1->text().utf8(), wiz->_pass1->text().length()); b->open(p); b->createFolder(KWallet::Wallet::PasswordFolder()); @@ -356,11 +356,11 @@ int KWalletD::doTransactionOpen(const QCString& appid, const QString& wallet, ui } -int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool isPath, WId w, bool modal) { +int KWalletD::internalOpen(const TQCString& appid, const TQString& wallet, bool isPath, WId w, bool modal) { int rc = -1; bool brandNew = false; - QCString thisApp; + TQCString thisApp; if (appid.isEmpty()) { thisApp = "KDE System"; } else { @@ -371,7 +371,7 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is return -1; } - for (QIntDictIterator<KWallet::Backend> i(_wallets); i.current(); ++i) { + for (TQIntDictIterator<KWallet::Backend> i(_wallets); i.current(); ++i) { if (i.current()->walletName() == wallet) { rc = i.currentKey(); break; @@ -387,8 +387,8 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is KWallet::Backend *b = new KWallet::Backend(wallet, isPath); KPasswordDialog *kpd = 0L; bool emptyPass = false; - if ((isPath && QFile::exists(wallet)) || (!isPath && KWallet::Backend::exists(wallet))) { - int pwless = b->open(QByteArray()); + if ((isPath && TQFile::exists(wallet)) || (!isPath && KWallet::Backend::exists(wallet))) { + int pwless = b->open(TQByteArray()); if (0 != pwless || !b->isOpen()) { if (pwless == 0) { // release, start anew @@ -397,9 +397,9 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is } kpd = new KPasswordDialog(KPasswordDialog::Password, false, 0); if (appid.isEmpty()) { - kpd->setPrompt(i18n("<qt>KDE has requested to open the wallet '<b>%1</b>'. Please enter the password for this wallet below.").arg(QStyleSheet::escape(wallet))); + kpd->setPrompt(i18n("<qt>KDE has requested to open the wallet '<b>%1</b>'. Please enter the password for this wallet below.").arg(TQStyleSheet::escape(wallet))); } else { - kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to open the wallet '<b>%2</b>'. Please enter the password for this wallet below.").arg(QStyleSheet::escape(appid)).arg(QStyleSheet::escape(wallet))); + kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to open the wallet '<b>%2</b>'. Please enter the password for this wallet below.").arg(TQStyleSheet::escape(appid)).arg(TQStyleSheet::escape(wallet))); } brandNew = false; kpd->setButtonOK(KGuiItem(i18n("&Open"),"fileopen")); @@ -413,16 +413,16 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is if (appid.isEmpty()) { kpd->setPrompt(i18n("KDE has requested to open the wallet. This is used to store sensitive data in a secure fashion. Please enter a password to use with this wallet or click cancel to deny the application's request.")); } else { - kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to open the KDE wallet. This is used to store sensitive data in a secure fashion. Please enter a password to use with this wallet or click cancel to deny the application's request.").arg(QStyleSheet::escape(appid))); + kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to open the KDE wallet. This is used to store sensitive data in a secure fashion. Please enter a password to use with this wallet or click cancel to deny the application's request.").arg(TQStyleSheet::escape(appid))); } brandNew = true; kpd->setButtonOK(KGuiItem(i18n("&Open"),"fileopen")); } else { kpd = new KPasswordDialog(KPasswordDialog::NewPassword, false, 0); if (appid.length() == 0) { - kpd->setPrompt(i18n("<qt>KDE has requested to create a new wallet named '<b>%1</b>'. Please choose a password for this wallet, or cancel to deny the application's request.").arg(QStyleSheet::escape(wallet))); + kpd->setPrompt(i18n("<qt>KDE has requested to create a new wallet named '<b>%1</b>'. Please choose a password for this wallet, or cancel to deny the application's request.").arg(TQStyleSheet::escape(wallet))); } else { - kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to create a new wallet named '<b>%2</b>'. Please choose a password for this wallet, or cancel to deny the application's request.").arg(QStyleSheet::escape(appid)).arg(QStyleSheet::escape(wallet))); + kpd->setPrompt(i18n("<qt>The application '<b>%1</b>' has requested to create a new wallet named '<b>%2</b>'. Please choose a password for this wallet, or cancel to deny the application's request.").arg(TQStyleSheet::escape(appid)).arg(TQStyleSheet::escape(wallet))); } brandNew = true; kpd->setButtonOK(KGuiItem(i18n("C&reate"),"filenew")); @@ -439,9 +439,9 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is setupDialog( kpd, w, appid, modal ); if (kpd->exec() == KDialog::Accepted) { p = kpd->password(); - int rc = b->open(QByteArray().duplicate(p, strlen(p))); + int rc = b->open(TQByteArray().duplicate(p, strlen(p))); if (!b->isOpen()) { - kpd->setPrompt(i18n("<qt>Error opening the wallet '<b>%1</b>'. Please try again.<br>(Error code %2: %3)").arg(QStyleSheet::escape(wallet)).arg(rc).arg(KWallet::Backend::openRCToString(rc))); + kpd->setPrompt(i18n("<qt>Error opening the wallet '<b>%1</b>'. Please try again.<br>(Error code %2: %3)").arg(TQStyleSheet::escape(wallet)).arg(rc).arg(KWallet::Backend::openRCToString(rc))); kpd->clearPassword(); } } else { @@ -480,13 +480,13 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is if (_closeIdle && _timeouts) { _timeouts->addTimer(rc, _idleTime); } - QByteArray data; - QDataStream ds(data, IO_WriteOnly); + TQByteArray data; + TQDataStream ds(data, IO_WriteOnly); ds << wallet; if (brandNew) { - emitDCOPSignal("walletCreated(QString)", data); + emitDCOPSignal("walletCreated(TQString)", data); } - emitDCOPSignal("walletOpened(QString)", data); + emitDCOPSignal("walletOpened(TQString)", data); if (_wallets.count() == 1 && _launchManager) { KApplication::startServiceByDesktopName("kwalletmanager-kwalletd"); } @@ -502,10 +502,10 @@ int KWalletD::internalOpen(const QCString& appid, const QString& wallet, bool is } -bool KWalletD::isAuthorizedApp(const QCString& appid, const QString& wallet, WId w) { +bool KWalletD::isAuthorizedApp(const TQCString& appid, const TQString& wallet, WId w) { int response = 0; - QCString thisApp; + TQCString thisApp; if (appid.isEmpty()) { thisApp = "KDE System"; } else { @@ -515,9 +515,9 @@ bool KWalletD::isAuthorizedApp(const QCString& appid, const QString& wallet, WId if (!implicitAllow(wallet, thisApp)) { KBetterThanKDialogBase *dialog = new KBetterThanKDialogBase; if (appid.isEmpty()) { - dialog->setLabel(i18n("<qt>KDE has requested access to the open wallet '<b>%1</b>'.").arg(QStyleSheet::escape(wallet))); + dialog->setLabel(i18n("<qt>KDE has requested access to the open wallet '<b>%1</b>'.").arg(TQStyleSheet::escape(wallet))); } else { - dialog->setLabel(i18n("<qt>The application '<b>%1</b>' has requested access to the open wallet '<b>%2</b>'.").arg(QStyleSheet::escape(QString(appid))).arg(QStyleSheet::escape(wallet))); + dialog->setLabel(i18n("<qt>The application '<b>%1</b>' has requested access to the open wallet '<b>%2</b>'.").arg(TQStyleSheet::escape(TQString(appid))).arg(TQStyleSheet::escape(wallet))); } setupDialog( dialog, w, appid, false ); response = dialog->exec(); @@ -528,7 +528,7 @@ bool KWalletD::isAuthorizedApp(const QCString& appid, const QString& wallet, WId if (response == 1) { KConfig cfg("kwalletrc"); cfg.setGroup("Auto Allow"); - QStringList apps = cfg.readListEntry(wallet); + TQStringList apps = cfg.readListEntry(wallet); if (!apps.contains(thisApp)) { apps += thisApp; _implicitAllowMap[wallet] += thisApp; @@ -539,7 +539,7 @@ bool KWalletD::isAuthorizedApp(const QCString& appid, const QString& wallet, WId } else if (response == 3) { KConfig cfg("kwalletrc"); cfg.setGroup("Auto Deny"); - QStringList apps = cfg.readListEntry(wallet); + TQStringList apps = cfg.readListEntry(wallet); if (!apps.contains(thisApp)) { apps += thisApp; _implicitDenyMap[wallet] += thisApp; @@ -554,16 +554,16 @@ bool KWalletD::isAuthorizedApp(const QCString& appid, const QString& wallet, WId } -int KWalletD::deleteWallet(const QString& wallet) { - QString path = KGlobal::dirs()->saveLocation("kwallet") + QDir::separator() + wallet + ".kwl"; +int KWalletD::deleteWallet(const TQString& wallet) { + TQString path = KGlobal::dirs()->saveLocation("kwallet") + TQDir::separator() + wallet + ".kwl"; - if (QFile::exists(path)) { + if (TQFile::exists(path)) { close(wallet, true); - QFile::remove(path); - QByteArray data; - QDataStream ds(data, IO_WriteOnly); + TQFile::remove(path); + TQByteArray data; + TQDataStream ds(data, IO_WriteOnly); ds << wallet; - emitDCOPSignal("walletDeleted(QString)", data); + emitDCOPSignal("walletDeleted(TQString)", data); return 0; } @@ -571,8 +571,8 @@ int KWalletD::deleteWallet(const QString& wallet) { } -void KWalletD::changePassword(const QString& wallet, uint wId) { - QCString appid = friendlyDCOPPeerName(); +void KWalletD::changePassword(const TQString& wallet, uint wId) { + TQCString appid = friendlyDCOPPeerName(); KWalletTransaction *xact = new KWalletTransaction; @@ -584,13 +584,13 @@ void KWalletD::changePassword(const QString& wallet, uint wId) { _transactions.append(xact); - QTimer::singleShot(0, this, SLOT(processTransactions())); + TQTimer::singleShot(0, this, TQT_SLOT(processTransactions())); checkActiveDialog(); } -void KWalletD::doTransactionChangePassword(const QCString& appid, const QString& wallet, uint wId) { - QIntDictIterator<KWallet::Backend> it(_wallets); +void KWalletD::doTransactionChangePassword(const TQCString& appid, const TQString& wallet, uint wId) { + TQIntDictIterator<KWallet::Backend> it(_wallets); KWallet::Backend *w = 0L; int handle = -1; bool reclose = false; @@ -619,7 +619,7 @@ void KWalletD::doTransactionChangePassword(const QCString& appid, const QString& KPasswordDialog *kpd; kpd = new KPasswordDialog(KPasswordDialog::NewPassword, false, 0); - kpd->setPrompt(i18n("<qt>Please choose a new password for the wallet '<b>%1</b>'.").arg(QStyleSheet::escape(wallet))); + kpd->setPrompt(i18n("<qt>Please choose a new password for the wallet '<b>%1</b>'.").arg(TQStyleSheet::escape(wallet))); kpd->setCaption(i18n("KDE Wallet Service")); kpd->setAllowEmptyPasswords(true); setupDialog( kpd, wId, appid, false ); @@ -627,7 +627,7 @@ void KWalletD::doTransactionChangePassword(const QCString& appid, const QString& const char *p = kpd->password(); if (p) { _passwords[wallet] = p; - QByteArray pa; + TQByteArray pa; pa.duplicate(p, strlen(p)); int rc = w->close(pa); if (rc < 0) { @@ -651,11 +651,11 @@ void KWalletD::doTransactionChangePassword(const QCString& appid, const QString& } -int KWalletD::close(const QString& wallet, bool force) { +int KWalletD::close(const TQString& wallet, bool force) { int handle = -1; KWallet::Backend *w = 0L; - for (QIntDictIterator<KWallet::Backend> it(_wallets); + for (TQIntDictIterator<KWallet::Backend> it(_wallets); it.current(); ++it) { if (it.current()->walletName() == wallet) { @@ -671,7 +671,7 @@ int KWalletD::close(const QString& wallet, bool force) { int KWalletD::closeWallet(KWallet::Backend *w, int handle, bool force) { if (w) { - const QString& wallet = w->walletName(); + const TQString& wallet = w->walletName(); assert(_passwords.contains(wallet)); if (w->refCount() == 0 || force) { invalidateHandle(handle); @@ -680,7 +680,7 @@ int KWalletD::closeWallet(KWallet::Backend *w, int handle, bool force) { } _wallets.remove(handle); if (_passwords.contains(wallet)) { - w->close(QByteArray().duplicate(_passwords[wallet].data(), _passwords[wallet].length())); + w->close(TQByteArray().duplicate(_passwords[wallet].data(), _passwords[wallet].length())); _passwords[wallet].fill(0); _passwords.remove(wallet); } @@ -696,7 +696,7 @@ int KWalletD::closeWallet(KWallet::Backend *w, int handle, bool force) { int KWalletD::close(int handle, bool force) { - QCString appid = friendlyDCOPPeerName(); + TQCString appid = friendlyDCOPPeerName(); KWallet::Backend *w = _wallets.find(handle); bool contains = false; @@ -722,7 +722,7 @@ int KWalletD::close(int handle, bool force) { invalidateHandle(handle); } if (_passwords.contains(w->walletName())) { - w->close(QByteArray().duplicate(_passwords[w->walletName()].data(), _passwords[w->walletName()].length())); + w->close(TQByteArray().duplicate(_passwords[w->walletName()].data(), _passwords[w->walletName()].length())); _passwords[w->walletName()].fill(0); _passwords.remove(w->walletName()); } @@ -737,8 +737,8 @@ int KWalletD::close(int handle, bool force) { } -bool KWalletD::isOpen(const QString& wallet) const { - for (QIntDictIterator<KWallet::Backend> it(_wallets); +bool KWalletD::isOpen(const TQString& wallet) const { + for (TQIntDictIterator<KWallet::Backend> it(_wallets); it.current(); ++it) { if (it.current()->walletName() == wallet) { @@ -758,7 +758,7 @@ bool KWalletD::isOpen(int handle) { if (rc == 0 && ++_failed > 5) { _failed = 0; - QTimer::singleShot(0, this, SLOT(notifyFailures())); + TQTimer::singleShot(0, this, TQT_SLOT(notifyFailures())); } else if (rc != 0) { _failed = 0; } @@ -767,18 +767,18 @@ bool KWalletD::isOpen(int handle) { } -QStringList KWalletD::wallets() const { - QString path = KGlobal::dirs()->saveLocation("kwallet"); - QDir dir(path, "*.kwl"); - QStringList rc; +TQStringList KWalletD::wallets() const { + TQString path = KGlobal::dirs()->saveLocation("kwallet"); + TQDir dir(path, "*.kwl"); + TQStringList rc; - dir.setFilter(QDir::Files | QDir::NoSymLinks); + dir.setFilter(TQDir::Files | TQDir::NoSymLinks); const QFileInfoList *list = dir.entryInfoList(); QFileInfoListIterator it(*list); - QFileInfo *fi; + TQFileInfo *fi; while ((fi = it.current()) != 0L) { - QString fn = fi->fileName(); + TQString fn = fi->fileName(); if (fn.endsWith(".kwl")) { fn.truncate(fn.length()-4); } @@ -793,8 +793,8 @@ void KWalletD::sync(int handle) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { - QByteArray p; - QString wallet = b->walletName(); + TQByteArray p; + TQString wallet = b->walletName(); p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); b->sync(p); p.fill(0); @@ -802,18 +802,18 @@ void KWalletD::sync(int handle) { } -QStringList KWalletD::folderList(int handle) { +TQStringList KWalletD::folderList(int handle) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { return b->folderList(); } - return QStringList(); + return TQStringList(); } -bool KWalletD::hasFolder(int handle, const QString& f) { +bool KWalletD::hasFolder(int handle, const TQString& f) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { @@ -824,21 +824,21 @@ bool KWalletD::hasFolder(int handle, const QString& f) { } -bool KWalletD::removeFolder(int handle, const QString& f) { +bool KWalletD::removeFolder(int handle, const TQString& f) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { bool rc = b->removeFolder(f); // write changes to disk immediately - QByteArray p; - QString wallet = b->walletName(); + TQByteArray p; + TQString wallet = b->walletName(); p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); b->sync(p); p.fill(0); - QByteArray data; - QDataStream ds(data, IO_WriteOnly); + TQByteArray data; + TQDataStream ds(data, IO_WriteOnly); ds << b->walletName(); - emitDCOPSignal("folderListUpdated(QString)", data); + emitDCOPSignal("folderListUpdated(TQString)", data); return rc; } @@ -846,21 +846,21 @@ bool KWalletD::removeFolder(int handle, const QString& f) { } -bool KWalletD::createFolder(int handle, const QString& f) { +bool KWalletD::createFolder(int handle, const TQString& f) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { bool rc = b->createFolder(f); // write changes to disk immediately - QByteArray p; - QString wallet = b->walletName(); + TQByteArray p; + TQString wallet = b->walletName(); p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); b->sync(p); p.fill(0); - QByteArray data; - QDataStream ds(data, IO_WriteOnly); + TQByteArray data; + TQDataStream ds(data, IO_WriteOnly); ds << b->walletName(); - emitDCOPSignal("folderListUpdated(QString)", data); + emitDCOPSignal("folderListUpdated(TQString)", data); return rc; } @@ -868,7 +868,7 @@ bool KWalletD::createFolder(int handle, const QString& f) { } -QByteArray KWalletD::readMap(int handle, const QString& folder, const QString& key) { +TQByteArray KWalletD::readMap(int handle, const TQString& folder, const TQString& key) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { @@ -879,18 +879,18 @@ QByteArray KWalletD::readMap(int handle, const QString& folder, const QString& k } } - return QByteArray(); + return TQByteArray(); } -QMap<QString,QByteArray> KWalletD::readMapList(int handle, const QString& folder, const QString& key) { +TQMap<TQString,TQByteArray> KWalletD::readMapList(int handle, const TQString& folder, const TQString& key) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { b->setFolder(folder); - QPtrList<KWallet::Entry> e = b->readEntryList(key); - QMap<QString, QByteArray> rc; - QPtrListIterator<KWallet::Entry> it(e); + TQPtrList<KWallet::Entry> e = b->readEntryList(key); + TQMap<TQString, TQByteArray> rc; + TQPtrListIterator<KWallet::Entry> it(e); KWallet::Entry *entry; while ((entry = it.current())) { if (entry->type() == KWallet::Wallet::Map) { @@ -901,11 +901,11 @@ QMap<QString,QByteArray> KWalletD::readMapList(int handle, const QString& folder return rc; } - return QMap<QString, QByteArray>(); + return TQMap<TQString, TQByteArray>(); } -QByteArray KWalletD::readEntry(int handle, const QString& folder, const QString& key) { +TQByteArray KWalletD::readEntry(int handle, const TQString& folder, const TQString& key) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { @@ -916,18 +916,18 @@ QByteArray KWalletD::readEntry(int handle, const QString& folder, const QString& } } - return QByteArray(); + return TQByteArray(); } -QMap<QString, QByteArray> KWalletD::readEntryList(int handle, const QString& folder, const QString& key) { +TQMap<TQString, TQByteArray> KWalletD::readEntryList(int handle, const TQString& folder, const TQString& key) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { b->setFolder(folder); - QPtrList<KWallet::Entry> e = b->readEntryList(key); - QMap<QString, QByteArray> rc; - QPtrListIterator<KWallet::Entry> it(e); + TQPtrList<KWallet::Entry> e = b->readEntryList(key); + TQMap<TQString, TQByteArray> rc; + TQPtrListIterator<KWallet::Entry> it(e); KWallet::Entry *entry; while ((entry = it.current())) { rc.insert(entry->key(), entry->value()); @@ -936,11 +936,11 @@ QMap<QString, QByteArray> KWalletD::readEntryList(int handle, const QString& fol return rc; } - return QMap<QString, QByteArray>(); + return TQMap<TQString, TQByteArray>(); } -QStringList KWalletD::entryList(int handle, const QString& folder) { +TQStringList KWalletD::entryList(int handle, const TQString& folder) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { @@ -948,11 +948,11 @@ QStringList KWalletD::entryList(int handle, const QString& folder) { return b->entryList(); } - return QStringList(); + return TQStringList(); } -QString KWalletD::readPassword(int handle, const QString& folder, const QString& key) { +TQString KWalletD::readPassword(int handle, const TQString& folder, const TQString& key) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { @@ -963,18 +963,18 @@ QString KWalletD::readPassword(int handle, const QString& folder, const QString& } } - return QString::null; + return TQString::null; } -QMap<QString, QString> KWalletD::readPasswordList(int handle, const QString& folder, const QString& key) { +TQMap<TQString, TQString> KWalletD::readPasswordList(int handle, const TQString& folder, const TQString& key) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { b->setFolder(folder); - QPtrList<KWallet::Entry> e = b->readEntryList(key); - QMap<QString, QString> rc; - QPtrListIterator<KWallet::Entry> it(e); + TQPtrList<KWallet::Entry> e = b->readEntryList(key); + TQMap<TQString, TQString> rc; + TQPtrListIterator<KWallet::Entry> it(e); KWallet::Entry *entry; while ((entry = it.current())) { if (entry->type() == KWallet::Wallet::Password) { @@ -985,11 +985,11 @@ QMap<QString, QString> KWalletD::readPasswordList(int handle, const QString& fol return rc; } - return QMap<QString, QString>(); + return TQMap<TQString, TQString>(); } -int KWalletD::writeMap(int handle, const QString& folder, const QString& key, const QByteArray& value) { +int KWalletD::writeMap(int handle, const TQString& folder, const TQString& key, const TQByteArray& value) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { @@ -1000,8 +1000,8 @@ int KWalletD::writeMap(int handle, const QString& folder, const QString& key, co e.setType(KWallet::Wallet::Map); b->writeEntry(&e); // write changes to disk immediately - QByteArray p; - QString wallet = b->walletName(); + TQByteArray p; + TQString wallet = b->walletName(); p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); b->sync(p); p.fill(0); @@ -1013,7 +1013,7 @@ int KWalletD::writeMap(int handle, const QString& folder, const QString& key, co } -int KWalletD::writeEntry(int handle, const QString& folder, const QString& key, const QByteArray& value, int entryType) { +int KWalletD::writeEntry(int handle, const TQString& folder, const TQString& key, const TQByteArray& value, int entryType) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { @@ -1024,8 +1024,8 @@ int KWalletD::writeEntry(int handle, const QString& folder, const QString& key, e.setType(KWallet::Wallet::EntryType(entryType)); b->writeEntry(&e); // write changes to disk immediately - QByteArray p; - QString wallet = b->walletName(); + TQByteArray p; + TQString wallet = b->walletName(); p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); b->sync(p); p.fill(0); @@ -1037,7 +1037,7 @@ int KWalletD::writeEntry(int handle, const QString& folder, const QString& key, } -int KWalletD::writeEntry(int handle, const QString& folder, const QString& key, const QByteArray& value) { +int KWalletD::writeEntry(int handle, const TQString& folder, const TQString& key, const TQByteArray& value) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { @@ -1048,8 +1048,8 @@ int KWalletD::writeEntry(int handle, const QString& folder, const QString& key, e.setType(KWallet::Wallet::Stream); b->writeEntry(&e); // write changes to disk immediately - QByteArray p; - QString wallet = b->walletName(); + TQByteArray p; + TQString wallet = b->walletName(); p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); b->sync(p); p.fill(0); @@ -1061,7 +1061,7 @@ int KWalletD::writeEntry(int handle, const QString& folder, const QString& key, } -int KWalletD::writePassword(int handle, const QString& folder, const QString& key, const QString& value) { +int KWalletD::writePassword(int handle, const TQString& folder, const TQString& key, const TQString& value) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { @@ -1072,8 +1072,8 @@ int KWalletD::writePassword(int handle, const QString& folder, const QString& ke e.setType(KWallet::Wallet::Password); b->writeEntry(&e); // write changes to disk immediately - QByteArray p; - QString wallet = b->walletName(); + TQByteArray p; + TQString wallet = b->walletName(); p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); b->sync(p); p.fill(0); @@ -1085,7 +1085,7 @@ int KWalletD::writePassword(int handle, const QString& folder, const QString& ke } -int KWalletD::entryType(int handle, const QString& folder, const QString& key) { +int KWalletD::entryType(int handle, const TQString& folder, const TQString& key) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { @@ -1102,7 +1102,7 @@ int KWalletD::entryType(int handle, const QString& folder, const QString& key) { } -bool KWalletD::hasEntry(int handle, const QString& folder, const QString& key) { +bool KWalletD::hasEntry(int handle, const TQString& folder, const TQString& key) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { @@ -1117,7 +1117,7 @@ bool KWalletD::hasEntry(int handle, const QString& folder, const QString& key) { } -int KWalletD::removeEntry(int handle, const QString& folder, const QString& key) { +int KWalletD::removeEntry(int handle, const TQString& folder, const TQString& key) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { @@ -1127,8 +1127,8 @@ int KWalletD::removeEntry(int handle, const QString& folder, const QString& key) b->setFolder(folder); bool rc = b->removeEntry(key); // write changes to disk immediately - QByteArray p; - QString wallet = b->walletName(); + TQByteArray p; + TQString wallet = b->walletName(); p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); b->sync(p); p.fill(0); @@ -1140,10 +1140,10 @@ int KWalletD::removeEntry(int handle, const QString& folder, const QString& key) } -void KWalletD::slotAppUnregistered(const QCString& app) { +void KWalletD::slotAppUnregistered(const TQCString& app) { if (_handles.contains(app)) { - QValueList<int> l = _handles[app]; - for (QValueList<int>::Iterator i = l.begin(); i != l.end(); ++i) { + TQValueList<int> l = _handles[app]; + for (TQValueList<int>::Iterator i = l.begin(); i != l.end(); ++i) { _handles[app].remove(*i); KWallet::Backend *w = _wallets.find(*i); if (w && !_leaveOpen && 0 == w->deref()) { @@ -1156,7 +1156,7 @@ void KWalletD::slotAppUnregistered(const QCString& app) { void KWalletD::invalidateHandle(int handle) { - for (QMap<QCString,QValueList<int> >::Iterator i = _handles.begin(); + for (TQMap<TQCString,TQValueList<int> >::Iterator i = _handles.begin(); i != _handles.end(); ++i) { i.data().remove(handle); @@ -1164,7 +1164,7 @@ void KWalletD::invalidateHandle(int handle) { } -KWallet::Backend *KWalletD::getWallet(const QCString& appid, int handle) { +KWallet::Backend *KWalletD::getWallet(const TQCString& appid, int handle) { if (handle == 0) { return 0L; } @@ -1186,7 +1186,7 @@ KWallet::Backend *KWalletD::getWallet(const QCString& appid, int handle) { if (++_failed > 5) { _failed = 0; - QTimer::singleShot(0, this, SLOT(notifyFailures())); + TQTimer::singleShot(0, this, TQT_SLOT(notifyFailures())); } return 0L; @@ -1202,32 +1202,32 @@ void KWalletD::notifyFailures() { } -void KWalletD::doCloseSignals(int handle, const QString& wallet) { - QByteArray data; - QDataStream ds(data, IO_WriteOnly); +void KWalletD::doCloseSignals(int handle, const TQString& wallet) { + TQByteArray data; + TQDataStream ds(data, IO_WriteOnly); ds << handle; emitDCOPSignal("walletClosed(int)", data); - QByteArray data2; - QDataStream ds2(data2, IO_WriteOnly); + TQByteArray data2; + TQDataStream ds2(data2, IO_WriteOnly); ds2 << wallet; - emitDCOPSignal("walletClosed(QString)", data2); + emitDCOPSignal("walletClosed(TQString)", data2); if (_wallets.isEmpty()) { - emitDCOPSignal("allWalletsClosed()", QByteArray()); + emitDCOPSignal("allWalletsClosed()", TQByteArray()); } } -int KWalletD::renameEntry(int handle, const QString& folder, const QString& oldName, const QString& newName) { +int KWalletD::renameEntry(int handle, const TQString& folder, const TQString& oldName, const TQString& newName) { KWallet::Backend *b; if ((b = getWallet(friendlyDCOPPeerName(), handle))) { b->setFolder(folder); int rc = b->renameEntry(oldName, newName); // write changes to disk immediately - QByteArray p; - QString wallet = b->walletName(); + TQByteArray p; + TQString wallet = b->walletName(); p.duplicate(_passwords[wallet].data(), _passwords[wallet].length()); b->sync(p); p.fill(0); @@ -1239,14 +1239,14 @@ int KWalletD::renameEntry(int handle, const QString& folder, const QString& oldN } -QStringList KWalletD::users(const QString& wallet) const { - QStringList rc; +TQStringList KWalletD::users(const TQString& wallet) const { + TQStringList rc; - for (QIntDictIterator<KWallet::Backend> it(_wallets); + for (TQIntDictIterator<KWallet::Backend> it(_wallets); it.current(); ++it) { if (it.current()->walletName() == wallet) { - for (QMap<QCString,QValueList<int> >::ConstIterator hit = _handles.begin(); hit != _handles.end(); ++hit) { + for (TQMap<TQCString,TQValueList<int> >::ConstIterator hit = _handles.begin(); hit != _handles.end(); ++hit) { if (hit.data().contains(it.currentKey())) { rc += hit.key(); } @@ -1259,8 +1259,8 @@ QStringList KWalletD::users(const QString& wallet) const { } -bool KWalletD::disconnectApplication(const QString& wallet, const QCString& application) { - for (QIntDictIterator<KWallet::Backend> it(_wallets); +bool KWalletD::disconnectApplication(const TQString& wallet, const TQCString& application) { + for (TQIntDictIterator<KWallet::Backend> it(_wallets); it.current(); ++it) { if (it.current()->walletName() == wallet) { @@ -1275,11 +1275,11 @@ bool KWalletD::disconnectApplication(const QString& wallet, const QCString& appl close(it.current()->walletName(), true); } - QByteArray data; - QDataStream ds(data, IO_WriteOnly); + TQByteArray data; + TQDataStream ds(data, IO_WriteOnly); ds << wallet; ds << application; - emitDCOPSignal("applicationDisconnected(QString,QCString)", data); + emitDCOPSignal("applicationDisconnected(TQString,TQCString)", data); return true; } @@ -1290,17 +1290,17 @@ bool KWalletD::disconnectApplication(const QString& wallet, const QCString& appl } -void KWalletD::emitFolderUpdated(const QString& wallet, const QString& folder) { - QByteArray data; - QDataStream ds(data, IO_WriteOnly); +void KWalletD::emitFolderUpdated(const TQString& wallet, const TQString& folder) { + TQByteArray data; + TQDataStream ds(data, IO_WriteOnly); ds << wallet; ds << folder; - emitDCOPSignal("folderUpdated(QString,QString)", data); + emitDCOPSignal("folderUpdated(TQString,TQString)", data); } void KWalletD::emitWalletListDirty() { - emitDCOPSignal("walletListDirty()", QByteArray()); + emitDCOPSignal("walletListDirty()", TQByteArray()); } @@ -1327,14 +1327,14 @@ void KWalletD::reconfigure() { // Handle idle changes if (_closeIdle) { if (_idleTime != timeSave) { // Timer length changed - QIntDictIterator<KWallet::Backend> it(_wallets); + TQIntDictIterator<KWallet::Backend> it(_wallets); for (; it.current(); ++it) { _timeouts->resetTimer(it.currentKey(), _idleTime); } } if (!idleSave) { // add timers for all the wallets - QIntDictIterator<KWallet::Backend> it(_wallets); + TQIntDictIterator<KWallet::Backend> it(_wallets); for (; it.current(); ++it) { _timeouts->addTimer(it.currentKey(), _idleTime); } @@ -1346,8 +1346,8 @@ void KWalletD::reconfigure() { // Update the implicit allow stuff _implicitAllowMap.clear(); cfg.setGroup("Auto Allow"); - QStringList entries = cfg.entryMap("Auto Allow").keys(); - for (QStringList::Iterator i = entries.begin(); i != entries.end(); ++i) { + TQStringList entries = cfg.entryMap("Auto Allow").keys(); + for (TQStringList::Iterator i = entries.begin(); i != entries.end(); ++i) { _implicitAllowMap[*i] = cfg.readListEntry(*i); } @@ -1355,14 +1355,14 @@ void KWalletD::reconfigure() { _implicitDenyMap.clear(); cfg.setGroup("Auto Deny"); entries = cfg.entryMap("Auto Deny").keys(); - for (QStringList::Iterator i = entries.begin(); i != entries.end(); ++i) { + for (TQStringList::Iterator i = entries.begin(); i != entries.end(); ++i) { _implicitDenyMap[*i] = cfg.readListEntry(*i); } // Update if wallet was enabled/disabled if (!_enabled) { // close all wallets while (!_wallets.isEmpty()) { - QIntDictIterator<KWallet::Backend> it(_wallets); + TQIntDictIterator<KWallet::Backend> it(_wallets); if (!it.current()) { // necessary? break; } @@ -1377,60 +1377,60 @@ bool KWalletD::isEnabled() const { } -bool KWalletD::folderDoesNotExist(const QString& wallet, const QString& folder) { +bool KWalletD::folderDoesNotExist(const TQString& wallet, const TQString& folder) { if (!wallets().contains(wallet)) { return true; } - for (QIntDictIterator<KWallet::Backend> it(_wallets); it.current(); ++it) { + for (TQIntDictIterator<KWallet::Backend> it(_wallets); it.current(); ++it) { if (it.current()->walletName() == wallet) { return it.current()->folderDoesNotExist(folder); } } KWallet::Backend *b = new KWallet::Backend(wallet); - b->open(QByteArray()); + b->open(TQByteArray()); bool rc = b->folderDoesNotExist(folder); delete b; return rc; } -bool KWalletD::keyDoesNotExist(const QString& wallet, const QString& folder, const QString& key) { +bool KWalletD::keyDoesNotExist(const TQString& wallet, const TQString& folder, const TQString& key) { if (!wallets().contains(wallet)) { return true; } - for (QIntDictIterator<KWallet::Backend> it(_wallets); it.current(); ++it) { + for (TQIntDictIterator<KWallet::Backend> it(_wallets); it.current(); ++it) { if (it.current()->walletName() == wallet) { return it.current()->entryDoesNotExist(folder, key); } } KWallet::Backend *b = new KWallet::Backend(wallet); - b->open(QByteArray()); + b->open(TQByteArray()); bool rc = b->entryDoesNotExist(folder, key); delete b; return rc; } -bool KWalletD::implicitAllow(const QString& wallet, const QCString& app) { - return _implicitAllowMap[wallet].contains(QString::fromLocal8Bit(app)); +bool KWalletD::implicitAllow(const TQString& wallet, const TQCString& app) { + return _implicitAllowMap[wallet].contains(TQString::fromLocal8Bit(app)); } -bool KWalletD::implicitDeny(const QString& wallet, const QCString& app) { - return _implicitDenyMap[wallet].contains(QString::fromLocal8Bit(app)); +bool KWalletD::implicitDeny(const TQString& wallet, const TQCString& app) { + return _implicitDenyMap[wallet].contains(TQString::fromLocal8Bit(app)); } -QCString KWalletD::friendlyDCOPPeerName() { +TQCString KWalletD::friendlyDCOPPeerName() { DCOPClient *dc = callingDcopClient(); if (!dc) { return ""; } - return dc->senderId().replace(QRegExp("-[0-9]+$"), ""); + return dc->senderId().replace(TQRegExp("-[0-9]+$"), ""); } @@ -1443,9 +1443,9 @@ void KWalletD::timedOut(int id) { void KWalletD::closeAllWallets() { - QIntDict<KWallet::Backend> tw = _wallets; + TQIntDict<KWallet::Backend> tw = _wallets; - for (QIntDictIterator<KWallet::Backend> it(tw); it.current(); ++it) { + for (TQIntDictIterator<KWallet::Backend> it(tw); it.current(); ++it) { closeWallet(it.current(), it.currentKey(), true); } @@ -1454,7 +1454,7 @@ void KWalletD::closeAllWallets() { // All of this should be basically noop. Let's just be safe. _wallets.clear(); - for (QMap<QString,QCString>::Iterator it = _passwords.begin(); + for (TQMap<TQString,TQCString>::Iterator it = _passwords.begin(); it != _passwords.end(); ++it) { it.data().fill(0); @@ -1463,12 +1463,12 @@ void KWalletD::closeAllWallets() { } -QString KWalletD::networkWallet() { +TQString KWalletD::networkWallet() { return KWallet::Wallet::NetworkWallet(); } -QString KWalletD::localWallet() { +TQString KWalletD::localWallet() { return KWallet::Wallet::LocalWallet(); } diff --git a/kio/misc/kwalletd/kwalletd.h b/kio/misc/kwalletd/kwalletd.h index afa999f24..b426e7d5a 100644 --- a/kio/misc/kwalletd/kwalletd.h +++ b/kio/misc/kwalletd/kwalletd.h @@ -23,10 +23,10 @@ #define _KWALLETD_H_ #include <kded/kdedmodule.h> -#include <qintdict.h> -#include <qstring.h> -#include <qwidget.h> -#include <qguardedptr.h> +#include <tqintdict.h> +#include <tqstring.h> +#include <tqwidget.h> +#include <tqguardedptr.h> #include "kwalletbackend.h" #include <time.h> @@ -42,7 +42,7 @@ class KWalletD : public KDEDModule { Q_OBJECT K_DCOP public: - KWalletD(const QCString &name); + KWalletD(const TQCString &name); virtual ~KWalletD(); k_dcop: @@ -50,145 +50,145 @@ class KWalletD : public KDEDModule { virtual bool isEnabled() const; // Open and unlock the wallet - virtual int open(const QString& wallet, uint wId); + virtual int open(const TQString& wallet, uint wId); // Open and unlock the wallet with this path - virtual int openPath(const QString& path, uint wId); + virtual int openPath(const TQString& path, uint wId); // Asynchronous open - must give the object to return the handle // to. - virtual void openAsynchronous(const QString& wallet, const QCString& returnObject, uint wId); + virtual void openAsynchronous(const TQString& wallet, const TQCString& returnObject, uint wId); // Close and lock the wallet // If force = true, will close it for all users. Behave. This // can break applications, and is generally intended for use by // the wallet manager app only. - virtual int close(const QString& wallet, bool force); + virtual int close(const TQString& wallet, bool force); virtual int close(int handle, bool force); // Save to disk but leave open virtual ASYNC sync(int handle); // Physically deletes the wallet from disk. - virtual int deleteWallet(const QString& wallet); + virtual int deleteWallet(const TQString& wallet); // Returns true if the wallet is open - virtual bool isOpen(const QString& wallet) const; + virtual bool isOpen(const TQString& wallet) const; virtual bool isOpen(int handle); // List the users of this wallet - virtual QStringList users(const QString& wallet) const; + virtual TQStringList users(const TQString& wallet) const; // Change the password of this wallet - virtual void changePassword(const QString& wallet, uint wId); + virtual void changePassword(const TQString& wallet, uint wId); // A list of all wallets - virtual QStringList wallets() const; + virtual TQStringList wallets() const; // A list of all folders in this wallet - virtual QStringList folderList(int handle); + virtual TQStringList folderList(int handle); // Does this wallet have this folder? - virtual bool hasFolder(int handle, const QString& folder); + virtual bool hasFolder(int handle, const TQString& folder); // Create this folder - virtual bool createFolder(int handle, const QString& folder); + virtual bool createFolder(int handle, const TQString& folder); // Remove this folder - virtual bool removeFolder(int handle, const QString& folder); + virtual bool removeFolder(int handle, const TQString& folder); // List of entries in this folder - virtual QStringList entryList(int handle, const QString& folder); + virtual TQStringList entryList(int handle, const TQString& folder); // Read an entry. If the entry does not exist, it just // returns an empty result. It is your responsibility to check // hasEntry() first. - virtual QByteArray readEntry(int handle, const QString& folder, const QString& key); - virtual QByteArray readMap(int handle, const QString& folder, const QString& key); - virtual QString readPassword(int handle, const QString& folder, const QString& key); - virtual QMap<QString, QByteArray> readEntryList(int handle, const QString& folder, const QString& key); - virtual QMap<QString, QByteArray> readMapList(int handle, const QString& folder, const QString& key); - virtual QMap<QString, QString> readPasswordList(int handle, const QString& folder, const QString& key); + virtual TQByteArray readEntry(int handle, const TQString& folder, const TQString& key); + virtual TQByteArray readMap(int handle, const TQString& folder, const TQString& key); + virtual TQString readPassword(int handle, const TQString& folder, const TQString& key); + virtual TQMap<TQString, TQByteArray> readEntryList(int handle, const TQString& folder, const TQString& key); + virtual TQMap<TQString, TQByteArray> readMapList(int handle, const TQString& folder, const TQString& key); + virtual TQMap<TQString, TQString> readPasswordList(int handle, const TQString& folder, const TQString& key); // Rename an entry. rc=0 on success. - virtual int renameEntry(int handle, const QString& folder, const QString& oldName, const QString& newName); + virtual int renameEntry(int handle, const TQString& folder, const TQString& oldName, const TQString& newName); // Write an entry. rc=0 on success. - virtual int writeEntry(int handle, const QString& folder, const QString& key, const QByteArray& value, int entryType); - virtual int writeEntry(int handle, const QString& folder, const QString& key, const QByteArray& value); - virtual int writeMap(int handle, const QString& folder, const QString& key, const QByteArray& value); - virtual int writePassword(int handle, const QString& folder, const QString& key, const QString& value); + virtual int writeEntry(int handle, const TQString& folder, const TQString& key, const TQByteArray& value, int entryType); + virtual int writeEntry(int handle, const TQString& folder, const TQString& key, const TQByteArray& value); + virtual int writeMap(int handle, const TQString& folder, const TQString& key, const TQByteArray& value); + virtual int writePassword(int handle, const TQString& folder, const TQString& key, const TQString& value); // Does the entry exist? - virtual bool hasEntry(int handle, const QString& folder, const QString& key); + virtual bool hasEntry(int handle, const TQString& folder, const TQString& key); // What type is the entry? - virtual int entryType(int handle, const QString& folder, const QString& key); + virtual int entryType(int handle, const TQString& folder, const TQString& key); // Remove an entry. rc=0 on success. - virtual int removeEntry(int handle, const QString& folder, const QString& key); + virtual int removeEntry(int handle, const TQString& folder, const TQString& key); // Disconnect an app from a wallet - virtual bool disconnectApplication(const QString& wallet, const QCString& application); + virtual bool disconnectApplication(const TQString& wallet, const TQCString& application); virtual void reconfigure(); // Determine - virtual bool folderDoesNotExist(const QString& wallet, const QString& folder); - virtual bool keyDoesNotExist(const QString& wallet, const QString& folder, const QString& key); + virtual bool folderDoesNotExist(const TQString& wallet, const TQString& folder); + virtual bool keyDoesNotExist(const TQString& wallet, const TQString& folder, const TQString& key); virtual void closeAllWallets(); - virtual QString networkWallet(); + virtual TQString networkWallet(); - virtual QString localWallet(); + virtual TQString localWallet(); private slots: - void slotAppUnregistered(const QCString& app); + void slotAppUnregistered(const TQCString& app); void emitWalletListDirty(); void timedOut(int); void notifyFailures(); void processTransactions(); private: - int internalOpen(const QCString& appid, const QString& wallet, bool isPath = false, WId w = 0, bool modal = false); - bool isAuthorizedApp(const QCString& appid, const QString& wallet, WId w); + int internalOpen(const TQCString& appid, const TQString& wallet, bool isPath = false, WId w = 0, bool modal = false); + bool isAuthorizedApp(const TQCString& appid, const TQString& wallet, WId w); // This also validates the handle. May return NULL. - KWallet::Backend* getWallet(const QCString& appid, int handle); + KWallet::Backend* getWallet(const TQCString& appid, int handle); // Generate a new unique handle. int generateHandle(); - // Invalidate a handle (remove it from the QMap) + // Invalidate a handle (remove it from the TQMap) void invalidateHandle(int handle); // Emit signals about closing wallets - void doCloseSignals(int,const QString&); - void emitFolderUpdated(const QString&, const QString&); + void doCloseSignals(int,const TQString&); + void emitFolderUpdated(const TQString&, const TQString&); // Internal - close this wallet. int closeWallet(KWallet::Backend *w, int handle, bool force); // Implicitly allow access for this application - bool implicitAllow(const QString& wallet, const QCString& app); - bool implicitDeny(const QString& wallet, const QCString& app); - QCString friendlyDCOPPeerName(); + bool implicitAllow(const TQString& wallet, const TQCString& app); + bool implicitDeny(const TQString& wallet, const TQCString& app); + TQCString friendlyDCOPPeerName(); - void doTransactionChangePassword(const QCString& appid, const QString& wallet, uint wId); - int doTransactionOpen(const QCString& appid, const QString& wallet, uint wId, bool modal); + void doTransactionChangePassword(const TQCString& appid, const TQString& wallet, uint wId); + int doTransactionOpen(const TQCString& appid, const TQString& wallet, uint wId, bool modal); - void setupDialog( QWidget* dialog, WId wId, const QCString& appid, bool modal ); + void setupDialog( TQWidget* dialog, WId wId, const TQCString& appid, bool modal ); void checkActiveDialog(); - QIntDict<KWallet::Backend> _wallets; - QMap<QCString,QValueList<int> > _handles; - QMap<QString,QCString> _passwords; + TQIntDict<KWallet::Backend> _wallets; + TQMap<TQCString,TQValueList<int> > _handles; + TQMap<TQString,TQCString> _passwords; KDirWatch *_dw; int _failed; bool _leaveOpen, _closeIdle, _launchManager, _enabled; bool _openPrompt, _firstUse, _showingFailureNotify; int _idleTime; - QMap<QString,QStringList> _implicitAllowMap, _implicitDenyMap; + TQMap<TQString,TQStringList> _implicitAllowMap, _implicitDenyMap; KTimeout *_timeouts; - QPtrList<KWalletTransaction> _transactions; - QGuardedPtr< QWidget > activeDialog; + TQPtrList<KWalletTransaction> _transactions; + TQGuardedPtr< TQWidget > activeDialog; }; diff --git a/kio/misc/kwalletd/kwalletwizard.ui.h b/kio/misc/kwalletd/kwalletwizard.ui.h index 95346355a..a42635e9b 100644 --- a/kio/misc/kwalletd/kwalletwizard.ui.h +++ b/kio/misc/kwalletd/kwalletwizard.ui.h @@ -28,7 +28,7 @@ void KWalletWizard::passwordPageUpdate() _matchLabel->setText(i18n("Passwords do not match.")); } } else { - _matchLabel->setText(QString::null); + _matchLabel->setText(TQString::null); } } diff --git a/kio/misc/uiserver.cpp b/kio/misc/uiserver.cpp index 1948d57d4..b1d060f21 100644 --- a/kio/misc/uiserver.cpp +++ b/kio/misc/uiserver.cpp @@ -19,11 +19,11 @@ */ // -*- mode: c++; c-basic-offset: 4 -*- -#include <qtimer.h> +#include <tqtimer.h> -#include <qregexp.h> -#include <qheader.h> -#include <qevent.h> +#include <tqregexp.h> +#include <tqheader.h> +#include <tqevent.h> #include <ksqueezedtextlabel.h> #include <kconfig.h> @@ -44,11 +44,11 @@ #include <kpopupmenu.h> #include <kaction.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpopupmenu.h> -#include <qheader.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpopupmenu.h> +#include <tqheader.h> #include "observer_stub.h" #include "observer.h" // for static methods only @@ -95,60 +95,60 @@ class UIServerSystemTray:public KSystemTray :KSystemTray(uis) { KPopupMenu* pop= contextMenu(); - pop->insertItem(i18n("Settings..."), uis, SLOT(slotConfigure())); - pop->insertItem(i18n("Remove"), uis, SLOT(slotRemoveSystemTrayIcon())); + pop->insertItem(i18n("Settings..."), uis, TQT_SLOT(slotConfigure())); + pop->insertItem(i18n("Remove"), uis, TQT_SLOT(slotRemoveSystemTrayIcon())); setPixmap(loadIcon("filesave")); //actionCollection()->action("file_quit")->setEnabled(true); - KStdAction::quit(uis, SLOT(slotQuit()), actionCollection()); + KStdAction::quit(uis, TQT_SLOT(slotQuit()), actionCollection()); } }; class ProgressConfigDialog:public KDialogBase { public: - ProgressConfigDialog(QWidget* parent); + ProgressConfigDialog(TQWidget* parent); ~ProgressConfigDialog() {} void setChecked(int i, bool on); bool isChecked(int i) const; friend class UIServer; private: - QCheckBox *m_showSystemTrayCb; - QCheckBox *m_keepOpenCb; - QCheckBox *m_toolBarCb; - QCheckBox *m_statusBarCb; - QCheckBox *m_headerCb; - QCheckBox *m_fixedWidthCb; + TQCheckBox *m_showSystemTrayCb; + TQCheckBox *m_keepOpenCb; + TQCheckBox *m_toolBarCb; + TQCheckBox *m_statusBarCb; + TQCheckBox *m_headerCb; + TQCheckBox *m_fixedWidthCb; KListView *m_columns; - QCheckListItem *(m_items[ListProgress::TB_MAX]); + TQCheckListItem *(m_items[ListProgress::TB_MAX]); }; -ProgressConfigDialog::ProgressConfigDialog(QWidget *parent) +ProgressConfigDialog::ProgressConfigDialog(TQWidget *parent) :KDialogBase(KDialogBase::Plain,i18n("Configure Network Operation Window"),KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel, KDialogBase::Ok, parent, "configprog", false) { - QVBoxLayout *layout=new QVBoxLayout(plainPage(),spacingHint()); - m_showSystemTrayCb=new QCheckBox(i18n("Show system tray icon"), plainPage()); - m_keepOpenCb=new QCheckBox(i18n("Keep network operation window always open"), plainPage()); - m_headerCb=new QCheckBox(i18n("Show column headers"), plainPage()); - m_toolBarCb=new QCheckBox(i18n("Show toolbar"), plainPage()); - m_statusBarCb=new QCheckBox(i18n("Show statusbar"), plainPage()); - m_fixedWidthCb=new QCheckBox(i18n("Column widths are user adjustable"), plainPage()); - QLabel *label=new QLabel(i18n("Show information:"), plainPage()); + TQVBoxLayout *layout=new TQVBoxLayout(plainPage(),spacingHint()); + m_showSystemTrayCb=new TQCheckBox(i18n("Show system tray icon"), plainPage()); + m_keepOpenCb=new TQCheckBox(i18n("Keep network operation window always open"), plainPage()); + m_headerCb=new TQCheckBox(i18n("Show column headers"), plainPage()); + m_toolBarCb=new TQCheckBox(i18n("Show toolbar"), plainPage()); + m_statusBarCb=new TQCheckBox(i18n("Show statusbar"), plainPage()); + m_fixedWidthCb=new TQCheckBox(i18n("Column widths are user adjustable"), plainPage()); + TQLabel *label=new TQLabel(i18n("Show information:"), plainPage()); m_columns=new KListView(plainPage()); m_columns->addColumn("info"); m_columns->setSorting(-1); m_columns->header()->hide(); - m_items[ListProgress::TB_ADDRESS] =new QCheckListItem(m_columns, i18n("URL"), QCheckListItem::CheckBox); - m_items[ListProgress::TB_REMAINING_TIME] =new QCheckListItem(m_columns, i18n("Remaining Time", "Rem. Time"), QCheckListItem::CheckBox); - m_items[ListProgress::TB_SPEED] =new QCheckListItem(m_columns, i18n("Speed"), QCheckListItem::CheckBox); - m_items[ListProgress::TB_TOTAL] =new QCheckListItem(m_columns, i18n("Size"), QCheckListItem::CheckBox); - m_items[ListProgress::TB_PROGRESS] =new QCheckListItem(m_columns, i18n("%"), QCheckListItem::CheckBox); - m_items[ListProgress::TB_COUNT] =new QCheckListItem(m_columns, i18n("Count"), QCheckListItem::CheckBox); - m_items[ListProgress::TB_RESUME] =new QCheckListItem(m_columns, i18n("Resume", "Res."), QCheckListItem::CheckBox); - m_items[ListProgress::TB_LOCAL_FILENAME] =new QCheckListItem(m_columns, i18n("Local Filename"), QCheckListItem::CheckBox); - m_items[ListProgress::TB_OPERATION] =new QCheckListItem(m_columns, i18n("Operation"), QCheckListItem::CheckBox); + m_items[ListProgress::TB_ADDRESS] =new TQCheckListItem(m_columns, i18n("URL"), TQCheckListItem::CheckBox); + m_items[ListProgress::TB_REMAINING_TIME] =new TQCheckListItem(m_columns, i18n("Remaining Time", "Rem. Time"), TQCheckListItem::CheckBox); + m_items[ListProgress::TB_SPEED] =new TQCheckListItem(m_columns, i18n("Speed"), TQCheckListItem::CheckBox); + m_items[ListProgress::TB_TOTAL] =new TQCheckListItem(m_columns, i18n("Size"), TQCheckListItem::CheckBox); + m_items[ListProgress::TB_PROGRESS] =new TQCheckListItem(m_columns, i18n("%"), TQCheckListItem::CheckBox); + m_items[ListProgress::TB_COUNT] =new TQCheckListItem(m_columns, i18n("Count"), TQCheckListItem::CheckBox); + m_items[ListProgress::TB_RESUME] =new TQCheckListItem(m_columns, i18n("Resume", "Res."), TQCheckListItem::CheckBox); + m_items[ListProgress::TB_LOCAL_FILENAME] =new TQCheckListItem(m_columns, i18n("Local Filename"), TQCheckListItem::CheckBox); + m_items[ListProgress::TB_OPERATION] =new TQCheckListItem(m_columns, i18n("Operation"), TQCheckListItem::CheckBox); layout->addWidget(m_showSystemTrayCb); layout->addWidget(m_keepOpenCb); @@ -174,9 +174,9 @@ bool ProgressConfigDialog::isChecked(int i) const return m_items[i]->isOn(); } -ProgressItem::ProgressItem( ListProgress* view, QListViewItem *after, QCString app_id, int job_id, +ProgressItem::ProgressItem( ListProgress* view, TQListViewItem *after, TQCString app_id, int job_id, bool showDefault ) - : QListViewItem( view, after ) { + : TQListViewItem( view, after ) { listProgress = view; @@ -194,8 +194,8 @@ ProgressItem::ProgressItem( ListProgress* view, QListViewItem *after, QCString a // create dialog, but don't show it defaultProgress = new KIO::DefaultProgress( false ); defaultProgress->setOnlyClean( true ); - connect ( defaultProgress, SIGNAL( stopped() ), this, SLOT( slotCanceled() ) ); - connect ( &m_showTimer, SIGNAL( timeout() ), this, SLOT(slotShowDefaultProgress()) ); + connect ( defaultProgress, TQT_SIGNAL( stopped() ), this, TQT_SLOT( slotCanceled() ) ); + connect ( &m_showTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT(slotShowDefaultProgress()) ); if ( showDefault ) { m_showTimer.start( 500, true ); @@ -251,7 +251,7 @@ void ProgressItem::setProcessedSize( KIO::filesize_t size ) { void ProgressItem::setProcessedFiles( unsigned long files ) { m_iProcessedFiles = files; - QString tmps = i18n("%1 / %2").arg( m_iProcessedFiles ).arg( m_iTotalFiles ); + TQString tmps = i18n("%1 / %2").arg( m_iProcessedFiles ).arg( m_iTotalFiles ); setText( ListProgress::TB_COUNT, tmps ); defaultProgress->slotProcessedFiles( 0, m_iProcessedFiles ); @@ -264,16 +264,16 @@ void ProgressItem::setProcessedDirs( unsigned long dirs ) { void ProgressItem::setPercent( unsigned long percent ) { - const QString tmps = KIO::DefaultProgress::makePercentString( percent, m_iTotalSize, m_iTotalFiles ); + const TQString tmps = KIO::DefaultProgress::makePercentString( percent, m_iTotalSize, m_iTotalFiles ); setText( ListProgress::TB_PROGRESS, tmps ); defaultProgress->slotPercent( 0, percent ); } -void ProgressItem::setInfoMessage( const QString & msg ) { - QString plainTextMsg(msg); - plainTextMsg.replace( QRegExp( "</?b>" ), QString::null ); - plainTextMsg.replace( QRegExp( "<img.*>" ), QString::null ); +void ProgressItem::setInfoMessage( const TQString & msg ) { + TQString plainTextMsg(msg); + plainTextMsg.replace( TQRegExp( "</?b>" ), TQString::null ); + plainTextMsg.replace( TQRegExp( "<img.*>" ), TQString::null ); setText( ListProgress::TB_PROGRESS, plainTextMsg ); defaultProgress->slotInfoMessage( 0, msg ); @@ -283,7 +283,7 @@ void ProgressItem::setSpeed( unsigned long bytes_per_second ) { m_iSpeed = bytes_per_second; m_remainingSeconds = KIO::calculateRemainingSeconds( m_iTotalSize, m_iProcessedSize, m_iSpeed ); - QString tmps, tmps2; + TQString tmps, tmps2; if ( m_iSpeed == 0 ) { tmps = i18n( "Stalled"); tmps2 = tmps; @@ -341,11 +341,11 @@ void ProgressItem::setTransferring( const KURL& url ) { defaultProgress->slotTransferring( 0, url ); } -void ProgressItem::setText(ListProgress::ListProgressFields field, const QString& text) +void ProgressItem::setText(ListProgress::ListProgressFields field, const TQString& text) { if (listProgress->m_lpcc[field].enabled) { - QString t=text; + TQString t=text; if ((field==ListProgress::TB_ADDRESS) && (listProgress->m_fixedColumnWidths)) // if (((field==ListProgress::TB_LOCAL_FILENAME) || (field==ListProgress::TB_ADDRESS)) && (listProgress->m_fixedColumnWidths)) { @@ -354,7 +354,7 @@ void ProgressItem::setText(ListProgress::ListProgressFields field, const QString listProgress->m_squeezer->setText(t); t=listProgress->m_squeezer->text(); } - QListViewItem::setText(listProgress->m_lpcc[field].index,t); + TQListViewItem::setText(listProgress->m_lpcc[field].index,t); } } @@ -366,7 +366,7 @@ void ProgressItem::setStating( const KURL& url ) { defaultProgress->slotStating( 0, url ); } -void ProgressItem::setMounting( const QString& dev, const QString & point ) { +void ProgressItem::setMounting( const TQString& dev, const TQString & point ) { setText( ListProgress::TB_OPERATION, i18n("Mounting") ); setText( ListProgress::TB_ADDRESS, point ); // ? setText( ListProgress::TB_LOCAL_FILENAME, dev ); // ? @@ -374,7 +374,7 @@ void ProgressItem::setMounting( const QString& dev, const QString & point ) { defaultProgress->slotMounting( 0, dev, point ); } -void ProgressItem::setUnmounting( const QString & point ) { +void ProgressItem::setUnmounting( const TQString & point ) { setText( ListProgress::TB_OPERATION, i18n("Unmounting") ); setText( ListProgress::TB_ADDRESS, point ); // ? setText( ListProgress::TB_LOCAL_FILENAME, "" ); // ? @@ -384,7 +384,7 @@ void ProgressItem::setUnmounting( const QString & point ) { void ProgressItem::setCanResume( KIO::filesize_t offset ) { /* - QString tmps; + TQString tmps; // set canResume if ( _resume ) { tmps = i18n("Yes"); @@ -454,7 +454,7 @@ void ProgressItem::updateVisibility() //----------------------------------------------------------------------------- -ListProgress::ListProgress (QWidget *parent, const char *name) +ListProgress::ListProgress (TQWidget *parent, const char *name) : KListView (parent, name) { @@ -479,7 +479,7 @@ ListProgress::ListProgress (QWidget *parent, const char *name) //used for squeezing the text in local file name and url m_squeezer=new KSqueezedTextLabel(this); m_squeezer->hide(); - connect(header(),SIGNAL(sizeChange(int,int,int)),this,SLOT(columnWidthChanged(int))); + connect(header(),TQT_SIGNAL(sizeChange(int,int,int)),this,TQT_SLOT(columnWidthChanged(int))); } @@ -532,11 +532,11 @@ void ListProgress::readSettings() { // read listview geometry properties config.setGroup( "ProgressList" ); for ( int i = 0; i < TB_MAX; i++ ) { - QString tmps="Col"+QString::number(i); + TQString tmps="Col"+TQString::number(i); m_lpcc[i].width=config.readNumEntry( tmps, 0); if (m_lpcc[i].width==0) m_lpcc[i].width=defaultColumnWidth[i]; - tmps="Enabled"+QString::number(i); + tmps="Enabled"+TQString::number(i); m_lpcc[i].enabled=config.readBoolEntry(tmps,true); } m_showHeader=config.readBoolEntry("ShowListHeader",true); @@ -550,7 +550,7 @@ void ListProgress::columnWidthChanged(int column) //resqueeze if necessary if ((m_lpcc[TB_ADDRESS].enabled) && (column==m_lpcc[TB_ADDRESS].index)) { - for (QListViewItem* lvi=firstChild(); lvi!=0; lvi=lvi->nextSibling()) + for (TQListViewItem* lvi=firstChild(); lvi!=0; lvi=lvi->nextSibling()) { ProgressItem *pi=(ProgressItem*)lvi; pi->setText(TB_ADDRESS,pi->fullLengthAddress()); @@ -566,12 +566,12 @@ void ListProgress::writeSettings() { config.setGroup( "ProgressList" ); for ( int i = 0; i < TB_MAX; i++ ) { if (!m_lpcc[i].enabled) { - QString tmps= "Enabled" + QString::number(i); + TQString tmps= "Enabled" + TQString::number(i); config.writeEntry( tmps, false ); continue; } m_lpcc[i].width=columnWidth(m_lpcc[i].index); - QString tmps="Col"+QString::number(i); + TQString tmps="Col"+TQString::number(i); config.writeEntry( tmps, m_lpcc[i].width); } config.writeEntry("ShowListHeader", m_showHeader); @@ -596,11 +596,11 @@ UIServer::UIServer() // setup toolbar toolBar()->insertButton("editdelete", TOOL_CANCEL, - SIGNAL(clicked()), this, - SLOT(slotCancelCurrent()), FALSE, i18n("Cancel")); + TQT_SIGNAL(clicked()), this, + TQT_SLOT(slotCancelCurrent()), FALSE, i18n("Cancel")); toolBar()->insertButton("configure", TOOL_CONFIGURE, - SIGNAL(clicked()), this, - SLOT(slotConfigure()), true, i18n("Settings...")); + TQT_SIGNAL(clicked()), this, + TQT_SLOT(slotConfigure()), true, i18n("Settings...")); toolBar()->setBarPos( KToolBar::Left ); @@ -615,18 +615,18 @@ UIServer::UIServer() setCentralWidget( listProgress ); - connect( listProgress, SIGNAL( selectionChanged() ), - SLOT( slotSelection() ) ); - connect( listProgress, SIGNAL( executed( QListViewItem* ) ), - SLOT( slotToggleDefaultProgress( QListViewItem* ) ) ); - connect( listProgress, SIGNAL( contextMenu( KListView*, QListViewItem *, const QPoint &)), - SLOT(slotShowContextMenu(KListView*, QListViewItem *, const QPoint&))); + connect( listProgress, TQT_SIGNAL( selectionChanged() ), + TQT_SLOT( slotSelection() ) ); + connect( listProgress, TQT_SIGNAL( executed( TQListViewItem* ) ), + TQT_SLOT( slotToggleDefaultProgress( TQListViewItem* ) ) ); + connect( listProgress, TQT_SIGNAL( contextMenu( KListView*, TQListViewItem *, const TQPoint &)), + TQT_SLOT(slotShowContextMenu(KListView*, TQListViewItem *, const TQPoint&))); // setup animation timer - updateTimer = new QTimer( this ); - connect( updateTimer, SIGNAL( timeout() ), - SLOT( slotUpdate() ) ); + updateTimer = new TQTimer( this ); + connect( updateTimer, TQT_SIGNAL( timeout() ), + TQT_SLOT( slotUpdate() ) ); m_bUpdateNewJob=false; setCaption(i18n("Progress Dialog")); @@ -671,20 +671,20 @@ void UIServer::applySettings() toolBar()->show(); } -void UIServer::slotShowContextMenu(KListView*, QListViewItem* item, const QPoint& pos) +void UIServer::slotShowContextMenu(KListView*, TQListViewItem* item, const TQPoint& pos) { if (m_contextMenu==0) { - m_contextMenu=new QPopupMenu(this); - m_idCancelItem = m_contextMenu->insertItem(i18n("Cancel Job"), this, SLOT(slotCancelCurrent())); -// m_contextMenu->insertItem(i18n("Toggle Progress"), this, SLOT(slotToggleDefaultProgress())); + m_contextMenu=new TQPopupMenu(this); + m_idCancelItem = m_contextMenu->insertItem(i18n("Cancel Job"), this, TQT_SLOT(slotCancelCurrent())); +// m_contextMenu->insertItem(i18n("Toggle Progress"), this, TQT_SLOT(slotToggleDefaultProgress())); m_contextMenu->insertSeparator(); - m_contextMenu->insertItem(i18n("Settings..."), this, SLOT(slotConfigure())); + m_contextMenu->insertItem(i18n("Settings..."), this, TQT_SLOT(slotConfigure())); } if ( item ) item->setSelected( true ); bool enabled = false; - QListViewItemIterator it( listProgress ); + TQListViewItemIterator it( listProgress ); for ( ; it.current(); ++it ) { if ( it.current()->isSelected() ) { enabled = true; @@ -708,9 +708,9 @@ void UIServer::slotConfigure() if (m_configDialog==0) { m_configDialog=new ProgressConfigDialog(0); -// connect(m_configDialog,SIGNAL(cancelClicked()), this, SLOT(slotCancelConfig())); - connect(m_configDialog,SIGNAL(okClicked()), this, SLOT(slotApplyConfig())); - connect(m_configDialog,SIGNAL(applyClicked()), this, SLOT(slotApplyConfig())); +// connect(m_configDialog,TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(slotCancelConfig())); + connect(m_configDialog,TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotApplyConfig())); + connect(m_configDialog,TQT_SIGNAL(applyClicked()), this, TQT_SLOT(slotApplyConfig())); } m_configDialog->m_showSystemTrayCb->setChecked(m_showSystemTray); m_configDialog->m_keepOpenCb->setChecked(m_keepListOpen); @@ -743,12 +743,12 @@ void UIServer::slotApplyConfig() listProgress->writeSettings(); } -int UIServer::newJob( QCString observerAppId, bool showProgress ) +int UIServer::newJob( TQCString observerAppId, bool showProgress ) { kdDebug(7024) << "UIServer::newJob observerAppId=" << observerAppId << ". " << "Giving id=" << s_jobId+1 << endl; - QListViewItemIterator it( listProgress ); + TQListViewItemIterator it( listProgress ); for ( ; it.current(); ++it ) { if ( it.current()->itemBelow() == 0L ) { // this will find the end of list break; @@ -761,8 +761,8 @@ int UIServer::newJob( QCString observerAppId, bool showProgress ) bool show = !m_bShowList && showProgress; ProgressItem *item = new ProgressItem( listProgress, it.current(), observerAppId, s_jobId, show ); - connect( item, SIGNAL( jobCanceled( ProgressItem* ) ), - SLOT( slotJobCanceled( ProgressItem* ) ) ); + connect( item, TQT_SIGNAL( jobCanceled( ProgressItem* ) ), + TQT_SLOT( slotJobCanceled( ProgressItem* ) ) ); if ( m_bShowList && !updateTimer->isActive() ) updateTimer->start( 1000 ); @@ -775,7 +775,7 @@ int UIServer::newJob( QCString observerAppId, bool showProgress ) ProgressItem* UIServer::findItem( int id ) { - QListViewItemIterator it( listProgress ); + TQListViewItemIterator it( listProgress ); ProgressItem *item; @@ -913,7 +913,7 @@ void UIServer::speed( int id, unsigned long bytes_per_second ) } } -void UIServer::infoMessage( int id, const QString & msg ) +void UIServer::infoMessage( int id, const TQString & msg ) { //kdDebug(7024) << "UIServer::infoMessage " << id << " " << msg << endl; @@ -996,7 +996,7 @@ void UIServer::stating( int id, KURL url ) } } -void UIServer::mounting( int id, QString dev, QString point ) +void UIServer::mounting( int id, TQString dev, TQString point ) { kdDebug(7024) << "UIServer::mounting " << id << " " << dev << " " << point << endl; @@ -1006,7 +1006,7 @@ void UIServer::mounting( int id, QString dev, QString point ) } } -void UIServer::unmounting( int id, QString point ) +void UIServer::unmounting( int id, TQString point ) { kdDebug(7024) << "UIServer::unmounting " << id << " " << point << endl; @@ -1016,7 +1016,7 @@ void UIServer::unmounting( int id, QString point ) } } -void UIServer::killJob( QCString observerAppId, int progressId ) +void UIServer::killJob( TQCString observerAppId, int progressId ) { // Contact the object "KIO::Observer" in the application <appId> Observer_stub observer( observerAppId, "KIO::Observer" ); @@ -1044,7 +1044,7 @@ void UIServer::slotQuit() void UIServer::slotUpdate() { // don't do anything if we don't have any inserted progress item // or if they're all hidden - QListViewItemIterator lvit( listProgress ); + TQListViewItemIterator lvit( listProgress ); bool visible = false; for ( ; lvit.current(); ++lvit ) if ( ((ProgressItem*)lvit.current())->isVisible() ) { @@ -1078,7 +1078,7 @@ void UIServer::slotUpdate() { ProgressItem *item; // count totals for statusbar - QListViewItemIterator it( listProgress ); + TQListViewItemIterator it( listProgress ); for ( ; it.current(); ++it ) { item = (ProgressItem*) it.current(); @@ -1107,7 +1107,7 @@ void UIServer::slotUpdate() { void UIServer::setListMode( bool list ) { m_bShowList = list; - QListViewItemIterator it( listProgress ); + TQListViewItemIterator it( listProgress ); for ( ; it.current(); ++it ) { // When going to list mode -> hide all progress dialogs // When going back to separate dialogs -> show them all @@ -1126,13 +1126,13 @@ void UIServer::setListMode( bool list ) } } -void UIServer::slotToggleDefaultProgress( QListViewItem *item ) { +void UIServer::slotToggleDefaultProgress( TQListViewItem *item ) { ((ProgressItem*) item )->slotToggleDefaultProgress(); } void UIServer::slotSelection() { - QListViewItemIterator it( listProgress ); + TQListViewItemIterator it( listProgress ); for ( ; it.current(); ++it ) { if ( it.current()->isSelected() ) { @@ -1145,7 +1145,7 @@ void UIServer::slotSelection() { // This code is deprecated, slaves go to Observer::openPassDlg now, // but this is kept for compat (DCOP calls to kio_uiserver). -QByteArray UIServer::openPassDlg( const KIO::AuthInfo &info ) +TQByteArray UIServer::openPassDlg( const KIO::AuthInfo &info ) { kdDebug(7024) << "UIServer::openPassDlg: User= " << info.username << ", Msg= " << info.prompt << endl; @@ -1154,9 +1154,9 @@ QByteArray UIServer::openPassDlg( const KIO::AuthInfo &info ) &inf.keepPassword, inf.prompt, inf.readOnly, inf.caption, inf.comment, inf.commentLabel ); - QByteArray data; - QDataStream stream( data, IO_WriteOnly ); - if ( result == QDialog::Accepted ) + TQByteArray data; + TQDataStream stream( data, IO_WriteOnly ); + if ( result == TQDialog::Accepted ) inf.setModified( true ); else inf.setModified( false ); @@ -1164,28 +1164,28 @@ QByteArray UIServer::openPassDlg( const KIO::AuthInfo &info ) return data; } -int UIServer::messageBox( int progressId, int type, const QString &text, const QString &caption, const QString &buttonYes, const QString &buttonNo ) +int UIServer::messageBox( int progressId, int type, const TQString &text, const TQString &caption, const TQString &buttonYes, const TQString &buttonNo ) { return Observer::messageBox( progressId, type, text, caption, buttonYes, buttonNo ); } -void UIServer::showSSLInfoDialog(const QString &url, const KIO::MetaData &meta) +void UIServer::showSSLInfoDialog(const TQString &url, const KIO::MetaData &meta) { return showSSLInfoDialog(url,meta,0); } -void UIServer::showSSLInfoDialog(const QString &url, const KIO::MetaData &meta, int mainwindow) +void UIServer::showSSLInfoDialog(const TQString &url, const KIO::MetaData &meta, int mainwindow) { KSSLInfoDlg *kid = new KSSLInfoDlg(meta["ssl_in_use"].upper()=="TRUE", 0L /*parent?*/, 0L, true); KSSLCertificate *x = KSSLCertificate::fromString(meta["ssl_peer_certificate"].local8Bit()); if (x) { // Set the chain back onto the certificate - QStringList cl = - QStringList::split(QString("\n"), meta["ssl_peer_chain"]); - QPtrList<KSSLCertificate> ncl; + TQStringList cl = + TQStringList::split(TQString("\n"), meta["ssl_peer_chain"]); + TQPtrList<KSSLCertificate> ncl; ncl.setAutoDelete(true); - for (QStringList::Iterator it = cl.begin(); it != cl.end(); ++it) { + for (TQStringList::Iterator it = cl.begin(); it != cl.end(); ++it) { KSSLCertificate *y = KSSLCertificate::fromString((*it).local8Bit()); if (y) ncl.append(y); } @@ -1195,7 +1195,7 @@ void UIServer::showSSLInfoDialog(const QString &url, const KIO::MetaData &meta, kdDebug(7024) << "ssl_cert_errors=" << meta["ssl_cert_errors"] << endl; kid->setCertState(meta["ssl_cert_errors"]); - QString ip = meta.contains("ssl_proxied") ? "" : meta["ssl_peer_ip"]; + TQString ip = meta.contains("ssl_proxied") ? "" : meta["ssl_peer_ip"]; kid->setup( x, ip, url, // the URL @@ -1220,12 +1220,12 @@ void UIServer::showSSLInfoDialog(const QString &url, const KIO::MetaData &meta, // Don't delete kid!! } -KSSLCertDlgRet UIServer::showSSLCertDialog(const QString& host, const QStringList& certList) +KSSLCertDlgRet UIServer::showSSLCertDialog(const TQString& host, const TQStringList& certList) { return showSSLCertDialog( host, certList, 0 ); } -KSSLCertDlgRet UIServer::showSSLCertDialog(const QString& host, const QStringList& certList, int mainwindow) +KSSLCertDlgRet UIServer::showSSLCertDialog(const TQString& host, const TQStringList& certList, int mainwindow) { KSSLCertDlgRet rc; rc.ok = false; @@ -1250,9 +1250,9 @@ KSSLCertDlgRet UIServer::showSSLCertDialog(const QString& host, const QStringLis } -QByteArray UIServer::open_RenameDlg( int id, - const QString & caption, - const QString& src, const QString & dest, +TQByteArray UIServer::open_RenameDlg( int id, + const TQString & caption, + const TQString& src, const TQString & dest, int mode, unsigned long sizeSrc, unsigned long sizeDest, @@ -1265,9 +1265,9 @@ QByteArray UIServer::open_RenameDlg( int id, ctimeSrc, ctimeDest, mtimeSrc, mtimeDest); } -QByteArray UIServer::open_RenameDlg64( int id, - const QString & caption, - const QString& src, const QString & dest, +TQByteArray UIServer::open_RenameDlg64( int id, + const TQString & caption, + const TQString& src, const TQString & dest, int mode, KIO::filesize_t sizeSrc, KIO::filesize_t sizeDest, @@ -1281,7 +1281,7 @@ QByteArray UIServer::open_RenameDlg64( int id, ProgressItem *item = findItem( id ); if ( item ) setItemVisible( item, false ); - QString newDest; + TQString newDest; kdDebug(7024) << "Calling KIO::open_RenameDlg" << endl; KIO::RenameDlg_Result result = KIO::open_RenameDlg( caption, src, dest, (KIO::RenameDlg_Mode) mode, newDest, @@ -1289,8 +1289,8 @@ QByteArray UIServer::open_RenameDlg64( int id, (time_t)ctimeSrc, (time_t)ctimeDest, (time_t)mtimeSrc, (time_t)mtimeDest ); kdDebug(7024) << "KIO::open_RenameDlg done" << endl; - QByteArray data; - QDataStream stream( data, IO_WriteOnly ); + TQByteArray data; + TQDataStream stream( data, IO_WriteOnly ); stream << Q_UINT8(result) << newDest; if ( item && result != KIO::R_CANCEL ) setItemVisible( item, true ); @@ -1299,7 +1299,7 @@ QByteArray UIServer::open_RenameDlg64( int id, int UIServer::open_SkipDlg( int id, int /*bool*/ multi, - const QString & error_text ) + const TQString & error_text ) { // Hide existing dialog box if any ProgressItem *item = findItem( id ); @@ -1339,7 +1339,7 @@ void UIServer::writeSettings() { void UIServer::slotCancelCurrent() { - QListViewItemIterator it( listProgress ); + TQListViewItemIterator it( listProgress ); ProgressItem *item; // kill selected jobs @@ -1353,7 +1353,7 @@ void UIServer::slotCancelCurrent() { } } -void UIServer::resizeEvent(QResizeEvent* e) +void UIServer::resizeEvent(TQResizeEvent* e) { KMainWindow::resizeEvent(e); writeSettings(); diff --git a/kio/misc/uiserver.h b/kio/misc/uiserver.h index e676bb7a0..73040f186 100644 --- a/kio/misc/uiserver.h +++ b/kio/misc/uiserver.h @@ -19,9 +19,9 @@ #ifndef __kio_uiserver_h__ #define __kio_uiserver_h__ -#include <qintdict.h> -#include <qdatetime.h> -#include <qtimer.h> +#include <tqintdict.h> +#include <tqdatetime.h> +#include <tqtimer.h> #include <dcopobject.h> #include <kio/global.h> @@ -45,7 +45,7 @@ namespace KIO { struct ListProgressColumnConfig { - QString title; + TQString title; int index; int width; bool enabled; @@ -61,7 +61,7 @@ class KIO_EXPORT ListProgress : public KListView { public: - ListProgress (QWidget *parent = 0, const char *name = 0 ); + ListProgress (TQWidget *parent = 0, const char *name = 0 ); virtual ~ListProgress(); @@ -103,16 +103,16 @@ protected: * One item in the ListProgress * @internal */ -class KIO_EXPORT ProgressItem : public QObject, public QListViewItem { +class KIO_EXPORT ProgressItem : public TQObject, public TQListViewItem { Q_OBJECT public: - ProgressItem( ListProgress* view, QListViewItem *after, QCString app_id, int job_id, + ProgressItem( ListProgress* view, TQListViewItem *after, TQCString app_id, int job_id, bool showDefault = true ); ~ProgressItem(); - QCString appId() { return m_sAppId; } + TQCString appId() { return m_sAppId; } int jobId() { return m_iJobId; } bool keepOpen() const; @@ -132,7 +132,7 @@ public: void setPercent( unsigned long percent ); void setSpeed( unsigned long bytes_per_second ); - void setInfoMessage( const QString & msg ); + void setInfoMessage( const TQString & msg ); void setCopying( const KURL& from, const KURL& to ); void setMoving( const KURL& from, const KURL& to ); @@ -140,8 +140,8 @@ public: void setTransferring( const KURL& url ); void setCreatingDir( const KURL& dir ); void setStating( const KURL& url ); - void setMounting( const QString & dev, const QString & point ); - void setUnmounting( const QString & point ); + void setMounting( const TQString & dev, const TQString & point ); + void setUnmounting( const TQString & point ); void setCanResume( KIO::filesize_t offset ); @@ -152,8 +152,8 @@ public: unsigned long speed() { return m_iSpeed; } unsigned int remainingSeconds() { return m_remainingSeconds; } - const QString& fullLengthAddress() const {return m_fullLengthAddress;} - void setText(ListProgress::ListProgressFields field, const QString& text); + const TQString& fullLengthAddress() const {return m_fullLengthAddress;} + void setText(ListProgress::ListProgressFields field, const TQString& text); public slots: void slotShowDefaultProgress(); void slotToggleDefaultProgress(); @@ -168,7 +168,7 @@ protected: void updateVisibility(); // ids that uniquely identify this progress item - QCString m_sAppId; + TQCString m_sAppId; int m_iJobId; // whether shown or not (it is hidden if a rename dialog pops up for the same job) @@ -188,8 +188,8 @@ protected: unsigned long m_iProcessedFiles; unsigned long m_iSpeed; int m_remainingSeconds; - QTimer m_showTimer; - QString m_fullLengthAddress; + TQTimer m_showTimer; + TQString m_fullLengthAddress; }; class QResizeEvent; @@ -236,7 +236,7 @@ k_dcop: * other things, like SSL dialogs. * @return the job id */ - int newJob( QCString appId, bool showProgress ); + int newJob( TQCString appId, bool showProgress ); ASYNC jobFinished( int id ); @@ -252,7 +252,7 @@ k_dcop: ASYNC percent( int id, unsigned long ipercent ); ASYNC speed( int id, unsigned long bytes_per_second ); - ASYNC infoMessage( int id, const QString & msg ); + ASYNC infoMessage( int id, const TQString & msg ); ASYNC copying( int id, KURL from, KURL to ); ASYNC moving( int id, KURL from, KURL to ); @@ -261,8 +261,8 @@ k_dcop: ASYNC creatingDir( int id, KURL dir ); ASYNC stating( int id, KURL url ); - ASYNC mounting( int id, QString dev, QString point ); - ASYNC unmounting( int id, QString point ); + ASYNC mounting( int id, TQString dev, TQString point ); + ASYNC unmounting( int id, TQString point ); ASYNC canResume( int id, unsigned long offset ); ASYNC canResume64( int id, KIO::filesize_t offset ); @@ -272,7 +272,7 @@ k_dcop: * Use KIO::PasswordDialog::getNameAndPassword instead. * To be removed in KDE 4.0. */ - QByteArray openPassDlg( const KIO::AuthInfo &info ); + TQByteArray openPassDlg( const KIO::AuthInfo &info ); /** * Popup a message box. @@ -291,17 +291,17 @@ k_dcop: * and for Information, none is used. * @return a button code, as defined in KMessageBox, or 0 on communication error. */ - int messageBox( int id, int type, const QString &text, const QString &caption, - const QString &buttonYes, const QString &buttonNo ); + int messageBox( int id, int type, const TQString &text, const TQString &caption, + const TQString &buttonYes, const TQString &buttonNo ); /** * @deprecated (it blocks other apps). * Use KIO::open_RenameDlg instead. * To be removed in KDE 4.0. */ - QByteArray open_RenameDlg64( int id, - const QString & caption, - const QString& src, const QString & dest, + TQByteArray open_RenameDlg64( int id, + const TQString & caption, + const TQString& src, const TQString & dest, int /* KIO::RenameDlg_Mode */ mode, KIO::filesize_t sizeSrc, KIO::filesize_t sizeDest, @@ -315,9 +315,9 @@ k_dcop: * Use KIO::open_RenameDlg instead. * To be removed in KDE 4.0. */ - QByteArray open_RenameDlg( int id, - const QString & caption, - const QString& src, const QString & dest, + TQByteArray open_RenameDlg( int id, + const TQString & caption, + const TQString& src, const TQString & dest, int /* KIO::RenameDlg_Mode */ mode, unsigned long sizeSrc, unsigned long sizeDest, @@ -334,7 +334,7 @@ k_dcop: */ int open_SkipDlg( int id, int /*bool*/ multi, - const QString & error_text ); + const TQString & error_text ); /** * Switch to or from list mode - called by the kcontrol module @@ -350,22 +350,22 @@ k_dcop: /** * Show a SSL Information Dialog */ - void showSSLInfoDialog(const QString &url, const KIO::MetaData &data, int mainwindow); + void showSSLInfoDialog(const TQString &url, const KIO::MetaData &data, int mainwindow); /** * @deprecated */ - void showSSLInfoDialog(const QString &url, const KIO::MetaData &data); + void showSSLInfoDialog(const TQString &url, const KIO::MetaData &data); /* * Show an SSL Certificate Selection Dialog */ - KSSLCertDlgRet showSSLCertDialog(const QString& host, const QStringList& certList, int mainwindow); + KSSLCertDlgRet showSSLCertDialog(const TQString& host, const TQStringList& certList, int mainwindow); /* * @deprecated */ - KSSLCertDlgRet showSSLCertDialog(const QString& host, const QStringList& certList); + KSSLCertDlgRet showSSLCertDialog(const TQString& host, const TQStringList& certList); public slots: void slotConfigure(); @@ -377,34 +377,34 @@ protected slots: void slotCancelCurrent(); - void slotToggleDefaultProgress( QListViewItem * ); + void slotToggleDefaultProgress( TQListViewItem * ); void slotSelection(); void slotJobCanceled( ProgressItem * ); void slotApplyConfig(); - void slotShowContextMenu(KListView*, QListViewItem *item, const QPoint& pos); + void slotShowContextMenu(KListView*, TQListViewItem *item, const TQPoint& pos); protected: ProgressItem* findItem( int id ); - virtual void resizeEvent(QResizeEvent* e); + virtual void resizeEvent(TQResizeEvent* e); virtual bool queryClose(); void setItemVisible( ProgressItem * item, bool visible ); - QTimer* updateTimer; + TQTimer* updateTimer; ListProgress* listProgress; KToolBar::BarPosition toolbarPos; - QString properties; + TQString properties; void applySettings(); void readSettings(); void writeSettings(); private: - void killJob( QCString observerAppId, int progressId ); + void killJob( TQCString observerAppId, int progressId ); int m_initWidth; int m_initHeight; @@ -419,7 +419,7 @@ private: // true if there's a new job that hasn't been shown yet. bool m_bUpdateNewJob; ProgressConfigDialog *m_configDialog; - QPopupMenu* m_contextMenu; + TQPopupMenu* m_contextMenu; UIServerSystemTray *m_systemTray; static int s_jobId; |