diff options
Diffstat (limited to 'certmanager/lib/backends')
58 files changed, 570 insertions, 570 deletions
diff --git a/certmanager/lib/backends/chiasmus/chiasmusbackend.cpp b/certmanager/lib/backends/chiasmus/chiasmusbackend.cpp index 15a63de53..aad0701ae 100644 --- a/certmanager/lib/backends/chiasmus/chiasmusbackend.cpp +++ b/certmanager/lib/backends/chiasmus/chiasmusbackend.cpp @@ -47,9 +47,9 @@ #include <kshell.h> #include <kdebug.h> -#include <qstringlist.h> -#include <qvariant.h> -#include <qfileinfo.h> +#include <tqstringlist.h> +#include <tqvariant.h> +#include <tqfileinfo.h> #include <map> #include <memory> @@ -59,12 +59,12 @@ namespace { // - // The usual QVariant template helpers: + // The usual TQVariant template helpers: // // to<> is a demarshaller. It's a class b/c you can't partially // specialise function templates yet. However, to<> can be used as if - // it was a function: QString s = to<QString>( myVariant ); + // it was a function: TQString s = to<TQString>( myVariant ); template <typename T> class to {}; #define MAKE_TO( type, func ) \ @@ -72,7 +72,7 @@ namespace { class to< type > { \ type m; \ public: \ - to( const QVariant & v ) : m( v.func() ) {} \ + to( const TQVariant & v ) : m( v.func() ) {} \ operator type() const { return m; } \ } @@ -83,31 +83,31 @@ namespace { class to<KURL> { KURL m; public: - to( const QVariant & v ) { + to( const TQVariant & v ) { m.setPath( v.toString() ); } operator KURL() const { return m; } }; template <typename T> - class to< QValueList<T> > { - QValueList<T> m; + class to< TQValueList<T> > { + TQValueList<T> m; public: - to( const QVariant & v ) { - const QValueList<QVariant> vl = v.toList(); - for ( QValueList<QVariant>::const_iterator it = vl.begin(), end = vl.end() ; it != end ; ++it ) + to( const TQVariant & v ) { + const TQValueList<TQVariant> vl = v.toList(); + for ( TQValueList<TQVariant>::const_iterator it = vl.begin(), end = vl.end() ; it != end ; ++it ) m.push_back( to<T>( *it ) ); } - operator QValueList<T> () const { return m; } + operator TQValueList<T> () const { return m; } }; template <> class to<KURL::List> { KURL::List m; public: - to( const QVariant & v ) { + to( const TQVariant & v ) { // wow, KURL::List is broken... it lacks conversion from and to QVL<KURL>... - m += to< QValueList<KURL> >( v ); + m += to< TQValueList<KURL> >( v ); } operator KURL::List() const { return m; } }; @@ -116,37 +116,37 @@ namespace { // from<> is the demarshaller. See to<> for why this is a class... template <typename T> - struct from_helper : public QVariant { - from_helper( const T & t ) : QVariant( t ) {} + struct from_helper : public TQVariant { + from_helper( const T & t ) : TQVariant( t ) {} }; template <typename T> - QVariant from( const T & t ) { + TQVariant from( const T & t ) { return from_helper<T>( t ); } // some special types: - template <> struct from_helper<bool> : public QVariant { - from_helper( bool b ) : QVariant( b, int() ) {} + template <> struct from_helper<bool> : public TQVariant { + from_helper( bool b ) : TQVariant( b, int() ) {} }; - template <> struct from_helper<KURL> : public QVariant { - from_helper( const KURL & url ) : QVariant( url.path() ) {} + template <> struct from_helper<KURL> : public TQVariant { + from_helper( const KURL & url ) : TQVariant( url.path() ) {} }; - template <typename T> struct from_helper< QValueList<T> > : public QVariant { - from_helper( const QValueList<T> & l ) { - QValueList<QVariant> result; - for ( typename QValueList<T>::const_iterator it = l.begin(), end = l.end() ; it != end ; ++it ) + template <typename T> struct from_helper< TQValueList<T> > : public TQVariant { + from_helper( const TQValueList<T> & l ) { + TQValueList<TQVariant> result; + for ( typename TQValueList<T>::const_iterator it = l.begin(), end = l.end() ; it != end ; ++it ) result.push_back( from( *it ) ); - QVariant::operator=( result ); + TQVariant::operator=( result ); } }; - template <> struct from_helper<KURL::List> : public from_helper< QValueList<KURL> > { - from_helper( const KURL::List & l ) : from_helper< QValueList<KURL> >( l ) {} + template <> struct from_helper<KURL::List> : public from_helper< TQValueList<KURL> > { + from_helper( const KURL::List & l ) : from_helper< TQValueList<KURL> >( l ) {} }; class ChiasmusConfigEntry : public Kleo::CryptoConfigEntry { unsigned int mIdx; - QVariant mValue; + TQVariant mValue; bool mDirty; public: ChiasmusConfigEntry( unsigned int i ) @@ -155,8 +155,8 @@ namespace { { assert( i < kleo_chiasmus_config_entries_dim ); } - QString name() const { return kleo_chiasmus_config_entries[mIdx].name; } - QString description() const { return i18n( kleo_chiasmus_config_entries[mIdx].description ); } + TQString name() const { return kleo_chiasmus_config_entries[mIdx].name; } + TQString description() const { return i18n( kleo_chiasmus_config_entries[mIdx].description ); } bool isOptional() const { return kleo_chiasmus_config_entries[mIdx].is_optional; } bool isReadOnly() const { return false; } bool isList() const { return kleo_chiasmus_config_entries[mIdx].is_list; } @@ -165,7 +165,7 @@ namespace { ArgType argType() const { return static_cast<ArgType>( kleo_chiasmus_config_entries[mIdx].type ); } bool isSet() const { return mValue != defaultValue(); } bool boolValue() const { return mValue.toBool(); } - QString stringValue() const { return mValue.toString(); } + TQString stringValue() const { return mValue.toString(); } int intValue() const { return mValue.toInt(); } unsigned int uintValue() const { return mValue.toUInt(); } KURL urlValue() const { @@ -173,15 +173,15 @@ namespace { KURL u; u.setPath( mValue.toString() ); return u; } unsigned int numberOfTimesSet() const { return 0; } - QStringList stringValueList() const { return mValue.toStringList(); } - QValueList<int> intValueList() const { return to< QValueList<int> >( mValue ); } - QValueList<unsigned int> uintValueList() const { return to< QValueList<unsigned int> >( mValue ); } + TQStringList stringValueList() const { return mValue.toStringList(); } + TQValueList<int> intValueList() const { return to< TQValueList<int> >( mValue ); } + TQValueList<unsigned int> uintValueList() const { return to< TQValueList<unsigned int> >( mValue ); } KURL::List urlValueList() const { if ( argType() != ArgType_Path && argType()!= ArgType_DirPath ) return mValue.toStringList(); else return to<KURL::List>( mValue ); } void resetToDefault() { mValue = defaultValue(); mDirty = false; } - void setBoolValue( bool value ) { setValue( QVariant( value, int() ) ); } - void setStringValue( const QString & value ) { setValue( value ); } + void setBoolValue( bool value ) { setValue( TQVariant( value, int() ) ); } + void setStringValue( const TQString & value ) { setValue( value ); } void setIntValue( int value ) { setValue( value ); } void setUIntValue( unsigned int value ) { setValue( value ); } void setURLValue( const KURL & value ) { @@ -189,13 +189,13 @@ namespace { else setValue( value.path() ); } void setNumberOfTimesSet( unsigned int ) {} - void setStringValueList( const QStringList & value ) { setValue( value ); } - void setIntValueList( const QValueList<int> & l ) { setValue( from( l ) ); } - void setUIntValueList( const QValueList<unsigned int> & l ) { setValue( from( l ) ); } + void setStringValueList( const TQStringList & value ) { setValue( value ); } + void setIntValueList( const TQValueList<int> & l ) { setValue( from( l ) ); } + void setUIntValueList( const TQValueList<unsigned int> & l ) { setValue( from( l ) ); } void setURLValueList( const KURL::List & l ) { setValue( from( l ) ); } bool isDirty() const { return mDirty; } - QVariant value() const { return mValue; } + TQVariant value() const { return mValue; } void sync( KConfigBase * config ) { if ( !mDirty ) @@ -208,67 +208,67 @@ namespace { mValue = config->readPropertyEntry( kleo_chiasmus_config_entries[mIdx].name, defaultValue() ); } private: - QVariant defaultValue() const; - void setValue( const QVariant & value ) { mValue = value; mDirty = true; } + TQVariant defaultValue() const; + void setValue( const TQVariant & value ) { mValue = value; mDirty = true; } }; - QVariant ChiasmusConfigEntry::defaultValue() const { + TQVariant ChiasmusConfigEntry::defaultValue() const { const kleo_chiasmus_config_data & data = kleo_chiasmus_config_entries[mIdx]; switch ( data.type ) { default: - return QVariant(); + return TQVariant(); case ArgType_None: if ( isList() ) - return QValueList<QVariant>() << QVariant( data.defaults.boolean.value, int() ); + return TQValueList<TQVariant>() << TQVariant( data.defaults.boolean.value, int() ); else - return QVariant( data.defaults.boolean.value, int() ); + return TQVariant( data.defaults.boolean.value, int() ); case ArgType_String: if ( isList() ) - return QStringList( QString::fromLatin1( data.defaults.string ) ); + return TQStringList( TQString::fromLatin1( data.defaults.string ) ); else - return QString::fromLatin1( data.defaults.string ); + return TQString::fromLatin1( data.defaults.string ); case ArgType_Int: if ( isList() ) - return QValueList<QVariant>() << data.defaults.integer; + return TQValueList<TQVariant>() << data.defaults.integer; else return data.defaults.integer; case ArgType_UInt: if ( isList() ) - return QValueList<QVariant>() << data.defaults.unsigned_integer; + return TQValueList<TQVariant>() << data.defaults.unsigned_integer; else return data.defaults.unsigned_integer; case ArgType_Path: case ArgType_DirPath: if ( isList() ) - return QValueList<QVariant>() << QString::fromLatin1( data.defaults.path ); + return TQValueList<TQVariant>() << TQString::fromLatin1( data.defaults.path ); else - return QString::fromLatin1( data.defaults.path ); + return TQString::fromLatin1( data.defaults.path ); case ArgType_URL: case ArgType_LDAPURL: if ( isList() ) - return QValueList<QVariant>() << QString::fromLatin1( data.defaults.url ); + return TQValueList<TQVariant>() << TQString::fromLatin1( data.defaults.url ); else - return QString::fromLatin1( data.defaults.url ); + return TQString::fromLatin1( data.defaults.url ); } } class ChiasmusGeneralGroup : public Kleo::CryptoConfigGroup { - mutable std::map<QString,ChiasmusConfigEntry*> mCache; + mutable std::map<TQString,ChiasmusConfigEntry*> mCache; mutable KConfig * mConfigObject; public: ChiasmusGeneralGroup() : Kleo::CryptoConfigGroup(), mConfigObject( 0 ) {} ~ChiasmusGeneralGroup() { clear(); delete mConfigObject; } - QString name() const { return "General"; } - QString iconName() const { return "chiasmus_chi"; } - QString description() const { return i18n( "General" ); } + TQString name() const { return "General"; } + TQString iconName() const { return "chiasmus_chi"; } + TQString description() const { return i18n( "General" ); } Kleo::CryptoConfigEntry::Level level() const { return Kleo::CryptoConfigEntry::Level_Basic; } - QStringList entryList() const { - QStringList result; + TQStringList entryList() const { + TQStringList result; for ( unsigned int i = 0 ; i < kleo_chiasmus_config_entries_dim ; ++i ) result.push_back( kleo_chiasmus_config_entries[i].name ); return result; } - Kleo::CryptoConfigEntry * entry( const QString & name ) const { + Kleo::CryptoConfigEntry * entry( const TQString & name ) const { if ( ChiasmusConfigEntry * entry = mCache[name] ) return entry; const KConfigGroup group( configObject(), "Chiasmus" ); @@ -283,7 +283,7 @@ namespace { void sync() { KConfigGroup group( configObject(), "Chiasmus" ); - for ( std::map<QString,ChiasmusConfigEntry*>::const_iterator it = mCache.begin(), end = mCache.end() ; it != end ; ++it ) + for ( std::map<TQString,ChiasmusConfigEntry*>::const_iterator it = mCache.begin(), end = mCache.end() ; it != end ; ++it ) it->second->sync( &group ); group.sync(); clear(); @@ -296,7 +296,7 @@ namespace { return mConfigObject; } void clear() { - for ( std::map<QString,ChiasmusConfigEntry*>::const_iterator it = mCache.begin(), end = mCache.end() ; it != end ; ++it ) + for ( std::map<TQString,ChiasmusConfigEntry*>::const_iterator it = mCache.begin(), end = mCache.end() ; it != end ; ++it ) delete it->second; mCache.clear(); } @@ -313,11 +313,11 @@ namespace { mGeneralGroup->sync(); } - QString name() const { return "Chiasmus"; } - QString iconName() const { return "chiasmus_chi"; } - QString description() const { return i18n( "Chiasmus" ); } - QStringList groupList() const { return QStringList() << "General"; } - Kleo::CryptoConfigGroup * group( const QString & name ) const { + TQString name() const { return "Chiasmus"; } + TQString iconName() const { return "chiasmus_chi"; } + TQString description() const { return i18n( "Chiasmus" ); } + TQStringList groupList() const { return TQStringList() << "General"; } + Kleo::CryptoConfigGroup * group( const TQString & name ) const { if ( name != "General" ) return 0; if ( !mGeneralGroup ) @@ -334,8 +334,8 @@ public: CryptoConfig() : Kleo::CryptoConfig(), mComponent( 0 ) {} ~CryptoConfig() { delete mComponent; } - QStringList componentList() const { return QStringList() << "Chiasmus" ; } - ChiasmusComponent * component( const QString & name ) const { + TQStringList componentList() const { return TQStringList() << "Chiasmus" ; } + ChiasmusComponent * component( const TQString & name ) const { if ( name != "Chiasmus" ) return 0; if ( !mComponent ) @@ -359,8 +359,8 @@ public: } ~Protocol() {} - QString name() const { return "Chiasmus"; } - QString displayName() const { return i18n( "Chiasmus command line tool" ); } + TQString name() const { return "Chiasmus"; } + TQString displayName() const { return i18n( "Chiasmus command line tool" ); } KeyListJob * keyListJob( bool, bool, bool ) const { return 0; } EncryptJob * encryptJob( bool, bool ) const { return 0; } DecryptJob * decryptJob() const { return 0; } @@ -370,14 +370,14 @@ public: KeyGenerationJob * keyGenerationJob() const { return 0; } ImportJob * importJob() const { return 0; } ExportJob * publicKeyExportJob( bool ) const { return 0; } - ExportJob * secretKeyExportJob( bool, const QString& ) const { return 0; } + ExportJob * secretKeyExportJob( bool, const TQString& ) const { return 0; } DownloadJob * downloadJob( bool ) const { return 0; } DeleteJob * deleteJob() const { return 0; } SignEncryptJob * signEncryptJob( bool, bool ) const { return 0; } DecryptVerifyJob * decryptVerifyJob( bool ) const { return 0; } RefreshKeysJob * refreshKeysJob() const { return 0; } - SpecialJob * specialJob( const char * type, const QMap<QString,QVariant> & args ) const { + SpecialJob * specialJob( const char * type, const TQMap<TQString,TQVariant> & args ) const { if ( qstricmp( type, "x-obtain-keys" ) == 0 && args.size() == 0 ) return new ObtainKeysJob(); if ( qstricmp( type, "x-encrypt" ) == 0 && args.size() == 0 ) @@ -407,11 +407,11 @@ Kleo::ChiasmusBackend::~ChiasmusBackend() { delete mProtocol; } -QString Kleo::ChiasmusBackend::name() const { +TQString Kleo::ChiasmusBackend::name() const { return "Chiasmus"; } -QString Kleo::ChiasmusBackend::displayName() const { +TQString Kleo::ChiasmusBackend::displayName() const { return i18n( "Chiasmus" ); } @@ -430,19 +430,19 @@ Kleo::CryptoBackend::Protocol * Kleo::ChiasmusBackend::protocol( const char * na return mProtocol; } -bool Kleo::ChiasmusBackend::checkForOpenPGP( QString * reason ) const { +bool Kleo::ChiasmusBackend::checkForOpenPGP( TQString * reason ) const { if ( reason ) *reason = i18n( "Unsupported protocol \"%1\"" ).arg( "OpenPGP" ); return false; } -bool Kleo::ChiasmusBackend::checkForSMIME( QString * reason ) const { +bool Kleo::ChiasmusBackend::checkForSMIME( TQString * reason ) const { if ( reason ) *reason = i18n( "Unsupported protocol \"%1\"" ).arg( "SMIME" ); return false; } -bool Kleo::ChiasmusBackend::checkForChiasmus( QString * reason ) const { +bool Kleo::ChiasmusBackend::checkForChiasmus( TQString * reason ) const { // kills the protocol instance when we return false: std::auto_ptr<Protocol> tmp( mProtocol ); @@ -450,8 +450,8 @@ bool Kleo::ChiasmusBackend::checkForChiasmus( QString * reason ) const { const CryptoConfigEntry * path = config()->entry( "Chiasmus", "General", "path" ); assert( path ); assert( path->argType() == CryptoConfigEntry::ArgType_Path ); - const QString chiasmus = path->urlValue().path(); - const QFileInfo fi( KShell::tildeExpand( chiasmus ) ); + const TQString chiasmus = path->urlValue().path(); + const TQFileInfo fi( KShell::tildeExpand( chiasmus ) ); if ( !fi.isExecutable() ) { if ( reason ) *reason = i18n( "File \"%1\" does not exist or is not executable." ).arg( chiasmus ); @@ -463,7 +463,7 @@ bool Kleo::ChiasmusBackend::checkForChiasmus( QString * reason ) const { return true; } -bool Kleo::ChiasmusBackend::checkForProtocol( const char * name, QString * reason ) const { +bool Kleo::ChiasmusBackend::checkForProtocol( const char * name, TQString * reason ) const { if ( qstricmp( name, "Chiasmus" ) == 0 ) return checkForChiasmus( reason ); if ( reason ) diff --git a/certmanager/lib/backends/chiasmus/chiasmusbackend.h b/certmanager/lib/backends/chiasmus/chiasmusbackend.h index 6d51cad77..9b97723d4 100644 --- a/certmanager/lib/backends/chiasmus/chiasmusbackend.h +++ b/certmanager/lib/backends/chiasmus/chiasmusbackend.h @@ -52,8 +52,8 @@ namespace Kleo { static const ChiasmusBackend * instance() { return self; } - QString name() const; - QString displayName() const; + TQString name() const; + TQString displayName() const; Kleo::CryptoConfig * config() const; @@ -61,10 +61,10 @@ namespace Kleo { Kleo::CryptoBackend::Protocol * smime() const { return 0; } Kleo::CryptoBackend::Protocol * protocol( const char * name ) const; - bool checkForOpenPGP( QString * reason=0 ) const; - bool checkForSMIME( QString * reason=0 ) const; - bool checkForChiasmus( QString * reason=0 ) const; - bool checkForProtocol( const char * name, QString * reason=0 ) const; + bool checkForOpenPGP( TQString * reason=0 ) const; + bool checkForSMIME( TQString * reason=0 ) const; + bool checkForChiasmus( TQString * reason=0 ) const; + bool checkForProtocol( const char * name, TQString * reason=0 ) const; bool supportsOpenPGP() const { return false; } bool supportsSMIME() const { return false; } diff --git a/certmanager/lib/backends/chiasmus/chiasmusjob.cpp b/certmanager/lib/backends/chiasmus/chiasmusjob.cpp index 3ac7513df..99fdda015 100644 --- a/certmanager/lib/backends/chiasmus/chiasmusjob.cpp +++ b/certmanager/lib/backends/chiasmus/chiasmusjob.cpp @@ -48,9 +48,9 @@ #include <kdebug.h> #include <kmessagebox.h> -#include <qtimer.h> -#include <qfileinfo.h> -#include <qvariant.h> +#include <tqtimer.h> +#include <tqfileinfo.h> +#include <tqvariant.h> #include <memory> @@ -89,15 +89,15 @@ GpgME::Error Kleo::ChiasmusJob::setup() { ? SymCryptRunProcessBase::Encrypt : SymCryptRunProcessBase::Decrypt, this, "symcryptrun" ); - QTimer::singleShot( timeoutEntry->uintValue() * 1000, this, - SLOT( slotTimeout() ) ); + TQTimer::singleShot( timeoutEntry->uintValue() * 1000, this, + TQT_SLOT( slotTimeout() ) ); return 0; } namespace { struct LaterDeleter { - QObject * _this; - LaterDeleter( QObject * o ) : _this( o ) {} + TQObject * _this; + LaterDeleter( TQObject * o ) : _this( o ) {} ~LaterDeleter() { if ( _this ) _this->deleteLater(); } void disable() { _this = 0; } }; @@ -110,8 +110,8 @@ GpgME::Error Kleo::ChiasmusJob::start() { if ( const GpgME::Error err = setup() ) return mError = err; - connect( mSymCryptRun, SIGNAL(processExited(KProcess*)), - this, SLOT(slotProcessExited(KProcess*)) ); + connect( mSymCryptRun, TQT_SIGNAL(processExited(KProcess*)), + this, TQT_SLOT(slotProcessExited(KProcess*)) ); if ( !mSymCryptRun->launch( mInput ) ) return mError = gpg_error( GPG_ERR_ENOENT ); // what else? @@ -155,7 +155,7 @@ GpgME::Error Kleo::ChiasmusJob::slotProcessExited( KProcess * proc ) { } emit done(); - emit SpecialJob::result( mError, QVariant( mOutput ) ); + emit SpecialJob::result( mError, TQVariant( mOutput ) ); return mError; } @@ -200,17 +200,17 @@ void Kleo::ChiasmusJob::slotTimeout() { } -void Kleo::ChiasmusJob::showErrorDialog( QWidget * parent, const QString & caption ) const { +void Kleo::ChiasmusJob::showErrorDialog( TQWidget * parent, const TQString & caption ) const { if ( !mError ) return; if ( mError.isCanceled() ) return; - const QString msg = ( mMode == Encrypt + const TQString msg = ( mMode == Encrypt ? i18n( "Encryption failed: %1" ) : i18n( "Decryption failed: %1" ) ) - .arg( QString::fromLocal8Bit( mError.asString() ) ); + .arg( TQString::fromLocal8Bit( mError.asString() ) ); if ( !mStderr.isEmpty() ) { - const QString details = i18n( "The following was received on stderr:\n%1" ).arg( mStderr ); + const TQString details = i18n( "The following was received on stderr:\n%1" ).arg( mStderr ); KMessageBox::detailedError( parent, msg, details, caption ); } else { KMessageBox::error( parent, msg, caption ); diff --git a/certmanager/lib/backends/chiasmus/chiasmusjob.h b/certmanager/lib/backends/chiasmus/chiasmusjob.h index 6393a0905..54b3763c2 100644 --- a/certmanager/lib/backends/chiasmus/chiasmusjob.h +++ b/certmanager/lib/backends/chiasmus/chiasmusjob.h @@ -36,7 +36,7 @@ #include "kleo/specialjob.h" -#include <qstringlist.h> +#include <tqstringlist.h> #include <gpgmepp/context.h> @@ -53,10 +53,10 @@ namespace Kleo { Q_OBJECT Q_ENUMS( Mode ) Q_PROPERTY( Mode mode READ mode ) - Q_PROPERTY( QString key READ key WRITE setKey ) - Q_PROPERTY( QString options READ options WRITE setOptions ) - Q_PROPERTY( QByteArray input READ input WRITE setInput ) - Q_PROPERTY( QByteArray result READ result ) + Q_PROPERTY( TQString key READ key WRITE setKey ) + Q_PROPERTY( TQString options READ options WRITE setOptions ) + Q_PROPERTY( TQByteArray input READ input WRITE setInput ) + Q_PROPERTY( TQByteArray result READ result ) public: enum Mode { Encrypt, Decrypt @@ -70,21 +70,21 @@ namespace Kleo { GpgME::Error exec(); /*!\reimp Kleo::Job */ - void showErrorDialog( QWidget *, const QString & ) const; + void showErrorDialog( TQWidget *, const TQString & ) const; Mode mode() const { return mMode; } - QString key() const { return mKey; } - void setKey( const QString & key ) { mKey = key; } + TQString key() const { return mKey; } + void setKey( const TQString & key ) { mKey = key; } - QString options() const { return mOptions; } - void setOptions( const QString & options ) { mOptions = options; } + TQString options() const { return mOptions; } + void setOptions( const TQString & options ) { mOptions = options; } - QByteArray input() const { return mInput; } - void setInput( const QByteArray & input ) { mInput = input; } + TQByteArray input() const { return mInput; } + void setInput( const TQByteArray & input ) { mInput = input; } //using SpecialJob::result; - QByteArray result() const { return mOutput; } + TQByteArray result() const { return mOutput; } public slots: void slotCancel(); @@ -100,11 +100,11 @@ namespace Kleo { private: SymCryptRunProcessBase * mSymCryptRun; - QString mKey; - QString mOptions; - QByteArray mInput, mOutput; + TQString mKey; + TQString mOptions; + TQByteArray mInput, mOutput; GpgME::Error mError; - QString mStderr; + TQString mStderr; bool mCanceled; bool mTimeout; const Mode mMode; diff --git a/certmanager/lib/backends/chiasmus/chiasmuslibrary.cpp b/certmanager/lib/backends/chiasmus/chiasmuslibrary.cpp index 2e3225492..de1a01e10 100644 --- a/certmanager/lib/backends/chiasmus/chiasmuslibrary.cpp +++ b/certmanager/lib/backends/chiasmus/chiasmuslibrary.cpp @@ -41,7 +41,7 @@ #include <kdebug.h> #include <klocale.h> -#include <qfile.h> +#include <tqfile.h> #include <vector> #include <algorithm> @@ -60,14 +60,14 @@ Kleo::ChiasmusLibrary::~ChiasmusLibrary() { //delete mXiaLibrary; // hmm, how to get rid of it, then? } -Kleo::ChiasmusLibrary::main_func Kleo::ChiasmusLibrary::chiasmus( QString * reason ) const { +Kleo::ChiasmusLibrary::main_func Kleo::ChiasmusLibrary::chiasmus( TQString * reason ) const { assert( ChiasmusBackend::instance() ); assert( ChiasmusBackend::instance()->config() ); const CryptoConfigEntry * lib = ChiasmusBackend::instance()->config()->entry( "Chiasmus", "General", "lib" ); assert( lib ); - const QString libfile = lib->urlValue().path(); + const TQString libfile = lib->urlValue().path(); if ( !mXiaLibrary ) - mXiaLibrary = KLibLoader::self()->library( QFile::encodeName( libfile ) ); + mXiaLibrary = KLibLoader::self()->library( TQFile::encodeName( libfile ) ); if ( !mXiaLibrary ) { if ( reason ) *reason = i18n( "Failed to load %1: %2" ) @@ -94,7 +94,7 @@ namespace { char ** mArgv; int mArgc; public: - ArgvProvider( const QValueVector<QCString> & args ) { + ArgvProvider( const TQValueVector<TQCString> & args ) { mArgv = new char * [args.size()]; for ( unsigned int i = 0 ; i < args.size() ; ++i ) mArgv[i] = strdup( args[i].data() ); @@ -107,7 +107,7 @@ namespace { }; } -int Kleo::ChiasmusLibrary::perform( const QValueVector<QCString> & args ) const { +int Kleo::ChiasmusLibrary::perform( const TQValueVector<TQCString> & args ) const { if ( main_func func = chiasmus() ) return func( args.size(), ArgvProvider( args ).argv() ); else diff --git a/certmanager/lib/backends/chiasmus/chiasmuslibrary.h b/certmanager/lib/backends/chiasmus/chiasmuslibrary.h index b04e162b4..1b15e86e1 100644 --- a/certmanager/lib/backends/chiasmus/chiasmuslibrary.h +++ b/certmanager/lib/backends/chiasmus/chiasmuslibrary.h @@ -34,8 +34,8 @@ #ifndef __KLEO_CHIASMUSLIBRARY_H__ #define __KLEO_CHIASMUSLIBRARY_H__ -#include <qvaluevector.h> -#include <qcstring.h> +#include <tqvaluevector.h> +#include <tqcstring.h> class KLibrary; @@ -52,10 +52,10 @@ namespace Kleo { static const ChiasmusLibrary * instance(); static void deleteInstance(); - int perform( const QValueVector<QCString> & args ) const; + int perform( const TQValueVector<TQCString> & args ) const; private: typedef int ( *main_func )( int, char** ); - main_func chiasmus( QString * reason=0 ) const; + main_func chiasmus( TQString * reason=0 ) const; private: static ChiasmusLibrary * self; diff --git a/certmanager/lib/backends/chiasmus/obtainkeysjob.cpp b/certmanager/lib/backends/chiasmus/obtainkeysjob.cpp index a9de8d658..4a79a1956 100644 --- a/certmanager/lib/backends/chiasmus/obtainkeysjob.cpp +++ b/certmanager/lib/backends/chiasmus/obtainkeysjob.cpp @@ -44,11 +44,11 @@ #include <kmessagebox.h> #include <kshell.h> -#include <qdir.h> -#include <qstringlist.h> -#include <qvariant.h> -#include <qtimer.h> -#include <qfileinfo.h> +#include <tqdir.h> +#include <tqstringlist.h> +#include <tqvariant.h> +#include <tqtimer.h> +#include <tqfileinfo.h> #include <gpg-error.h> @@ -64,13 +64,13 @@ Kleo::ObtainKeysJob::ObtainKeysJob() const CryptoConfigEntry * keypaths = ChiasmusBackend::instance()->config()->entry( "Chiasmus", "General", "keydir" ); assert( keypaths ); - mKeyPaths = QStringList( keypaths->urlValue().path() ); + mKeyPaths = TQStringList( keypaths->urlValue().path() ); } Kleo::ObtainKeysJob::~ObtainKeysJob() {} GpgME::Error Kleo::ObtainKeysJob::start() { - QTimer::singleShot( 0, this, SLOT(slotPerform()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotPerform()) ); return mError = 0; } @@ -92,16 +92,16 @@ void Kleo::ObtainKeysJob::slotPerform( bool async ) { mError = gpg_error( GPG_ERR_CANCELED ); if ( mIndex >= mKeyPaths.size() || mError ) { emit done(); - emit SpecialJob::result( mError, QVariant( mResult ) ); + emit SpecialJob::result( mError, TQVariant( mResult ) ); return; } emit progress( i18n( "Scanning directory %1..." ).arg( mKeyPaths[mIndex] ), mIndex, mKeyPaths.size() ); - const QDir dir( KShell::tildeExpand( mKeyPaths[mIndex] ) ); + const TQDir dir( KShell::tildeExpand( mKeyPaths[mIndex] ) ); - if ( const QFileInfoList * xisFiles = dir.entryInfoList( "*.xis;*.XIS", QDir::Files ) ) + if ( const QFileInfoList * xisFiles = dir.entryInfoList( "*.xis;*.XIS", TQDir::Files ) ) for ( QFileInfoList::const_iterator it = xisFiles->begin(), end = xisFiles->end() ; it != end ; ++it ) if ( (*it)->isReadable() ) mResult.push_back( (*it)->absFilePath() ); @@ -109,17 +109,17 @@ void Kleo::ObtainKeysJob::slotPerform( bool async ) { ++mIndex; if ( async ) - QTimer::singleShot( 0, this, SLOT(slotPerform()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotPerform()) ); else slotPerform( false ); } -void Kleo::ObtainKeysJob::showErrorDialog( QWidget * parent, const QString & caption ) const { +void Kleo::ObtainKeysJob::showErrorDialog( TQWidget * parent, const TQString & caption ) const { if ( !mError ) return; if ( mError.isCanceled() ) return; - const QString msg = QString::fromUtf8( mError.asString() ); + const TQString msg = TQString::fromUtf8( mError.asString() ); KMessageBox::error( parent, msg, caption ); } diff --git a/certmanager/lib/backends/chiasmus/obtainkeysjob.h b/certmanager/lib/backends/chiasmus/obtainkeysjob.h index 4b8392d46..4e3f8f7e2 100644 --- a/certmanager/lib/backends/chiasmus/obtainkeysjob.h +++ b/certmanager/lib/backends/chiasmus/obtainkeysjob.h @@ -36,7 +36,7 @@ #include "kleo/specialjob.h" -#include <qstringlist.h> +#include <tqstringlist.h> #include <gpgmepp/context.h> @@ -56,15 +56,15 @@ namespace Kleo { To use, create an ObtainKeysJob instance like this: <code> Kleo::SpecialJob * job = - protocol->specialJob("x-obtain-keys", QMap<QString,QVariant>()); + protocol->specialJob("x-obtain-keys", TQMap<TQString,TQVariant>()); </code> - The resulting QVariant will contain a QStringList containing the + The resulting TQVariant will contain a TQStringList containing the absolute filenames of the keys found in the configured key files. */ class ObtainKeysJob : public Kleo::SpecialJob { Q_OBJECT - Q_PROPERTY( QStringList result READ result ) + Q_PROPERTY( TQStringList result READ result ) public: ObtainKeysJob(); ~ObtainKeysJob(); @@ -75,10 +75,10 @@ namespace Kleo { GpgME::Error exec(); /*!\reimp Kleo::Job */ - void showErrorDialog( QWidget *, const QString & ) const; + void showErrorDialog( TQWidget *, const TQString & ) const; //using SpecialJob::result; - QStringList result() const { return mResult; } + TQStringList result() const { return mResult; } public slots: void slotCancel(); @@ -89,9 +89,9 @@ namespace Kleo { private: GpgME::Error mError; - QStringList mKeyPaths; + TQStringList mKeyPaths; unsigned int mIndex; - QStringList mResult; + TQStringList mResult; bool mCanceled; }; diff --git a/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.cpp b/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.cpp index 1b8627252..3dc3b9370 100644 --- a/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.cpp +++ b/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.cpp @@ -36,15 +36,15 @@ #include <kdebug.h> #include <kshell.h> -#include <qtimer.h> -#include <qfile.h> +#include <tqtimer.h> +#include <tqfile.h> #include <cstring> -Kleo::SymCryptRunProcessBase::SymCryptRunProcessBase( const QString & class_, const QString & program, - const QString & keyFile, const QString & options, +Kleo::SymCryptRunProcessBase::SymCryptRunProcessBase( const TQString & class_, const TQString & program, + const TQString & keyFile, const TQString & options, Operation mode, - QObject * parent, const char * name ) + TQObject * parent, const char * name ) : KProcess( parent, name ), mOperation( mode ), mOptions( options ) { @@ -57,15 +57,15 @@ Kleo::SymCryptRunProcessBase::SymCryptRunProcessBase( const QString & class_, co Kleo::SymCryptRunProcessBase::~SymCryptRunProcessBase() {} -bool Kleo::SymCryptRunProcessBase::launch( const QByteArray & input, RunMode rm ) { - connect( this, SIGNAL(receivedStdout(KProcess*,char*,int)), - this, SLOT(slotReceivedStdout(KProcess*,char*,int)) ); - connect( this, SIGNAL(receivedStderr(KProcess*,char*,int)), - this, SLOT(slotReceivedStderr(KProcess*,char*,int)) ); +bool Kleo::SymCryptRunProcessBase::launch( const TQByteArray & input, RunMode rm ) { + connect( this, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), + this, TQT_SLOT(slotReceivedStdout(KProcess*,char*,int)) ); + connect( this, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), + this, TQT_SLOT(slotReceivedStderr(KProcess*,char*,int)) ); if ( rm == Block ) { KTempFile tempfile; tempfile.setAutoDelete( true ); - if ( QFile * file = tempfile.file() ) + if ( TQFile * file = tempfile.file() ) file->writeBlock( input ); else return false; @@ -80,7 +80,7 @@ bool Kleo::SymCryptRunProcessBase::launch( const QByteArray & input, RunMode rm return ok; mInput = input.copy(); writeStdin( mInput.begin(), mInput.size() ); - connect( this, SIGNAL(wroteStdin(KProcess*)), this, SLOT(closeStdin()) ); + connect( this, TQT_SIGNAL(wroteStdin(KProcess*)), this, TQT_SLOT(closeStdin()) ); return true; } } @@ -88,7 +88,7 @@ bool Kleo::SymCryptRunProcessBase::launch( const QByteArray & input, RunMode rm void Kleo::SymCryptRunProcessBase::addOptions() { if ( !mOptions.isEmpty() ) { - const QStringList args = KShell::splitArgs( mOptions ); + const TQStringList args = KShell::splitArgs( mOptions ); *this << "--" << args; } } @@ -103,7 +103,7 @@ void Kleo::SymCryptRunProcessBase::slotReceivedStdout( KProcess * proc, char * b void Kleo::SymCryptRunProcessBase::slotReceivedStderr( KProcess * proc, char * buf, int len ) { Q_ASSERT( proc == this ); if ( len > 0 ) - mStderr += QString::fromLocal8Bit( buf, len ); + mStderr += TQString::fromLocal8Bit( buf, len ); } #include "symcryptrunprocessbase.moc" diff --git a/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h b/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h index d74db60cc..e28cf90fd 100644 --- a/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h +++ b/certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h @@ -35,7 +35,7 @@ #include <kprocess.h> -#include <qcstring.h> +#include <tqcstring.h> class QString; @@ -47,16 +47,16 @@ public: enum Operation { Encrypt, Decrypt }; - SymCryptRunProcessBase( const QString & class_, const QString & program, - const QString & keyFile, const QString& options, + SymCryptRunProcessBase( const TQString & class_, const TQString & program, + const TQString & keyFile, const TQString& options, Operation op, - QObject * parent=0, const char * name=0 ); + TQObject * parent=0, const char * name=0 ); ~SymCryptRunProcessBase(); - bool launch( const QByteArray & input, RunMode rm=NotifyOnExit ); + bool launch( const TQByteArray & input, RunMode rm=NotifyOnExit ); - const QByteArray & output() const { return mOutput; } - const QString & stdErr() const { return mStderr; } + const TQByteArray & output() const { return mOutput; } + const TQString & stdErr() const { return mStderr; } public slots: /*! upgraded to slot */ @@ -69,11 +69,11 @@ private slots: private: void addOptions(); - QByteArray mInput; - QByteArray mOutput; - QString mStderr; + TQByteArray mInput; + TQByteArray mOutput; + TQString mStderr; const Operation mOperation; - QString mOptions; + TQString mOptions; }; } diff --git a/certmanager/lib/backends/kpgp/gpg1backend.h b/certmanager/lib/backends/kpgp/gpg1backend.h index f9413accf..c95df1a51 100644 --- a/certmanager/lib/backends/kpgp/gpg1backend.h +++ b/certmanager/lib/backends/kpgp/gpg1backend.h @@ -42,8 +42,8 @@ namespace Kleo { class GPG1Backend : public KpgpBackendBase { public: - QString name() const; - QString displayName() const; + TQString name() const; + TQString displayName() const; }; } diff --git a/certmanager/lib/backends/kpgp/kpgpbackendbase.cpp b/certmanager/lib/backends/kpgp/kpgpbackendbase.cpp index 2d4d17ab2..2dbc3868f 100644 --- a/certmanager/lib/backends/kpgp/kpgpbackendbase.cpp +++ b/certmanager/lib/backends/kpgp/kpgpbackendbase.cpp @@ -43,7 +43,7 @@ #include <klocale.h> -#include <qstring.h> +#include <tqstring.h> #include "kpgpwrapper.h" @@ -58,47 +58,47 @@ Kleo::KpgpBackendBase::~KpgpBackendBase() delete mOpenPGPProtocol; mOpenPGPProtocol = 0; } -QString Kleo::GPG1Backend::name() const { +TQString Kleo::GPG1Backend::name() const { return GPG1_BACKEND_NAME; } -QString Kleo::GPG1Backend::displayName() const { +TQString Kleo::GPG1Backend::displayName() const { return i18n("Kpgp/gpg"); } -QString Kleo::PGP2Backend::name() const { +TQString Kleo::PGP2Backend::name() const { return PGP2_BACKEND_NAME; } -QString Kleo::PGP2Backend::displayName() const { +TQString Kleo::PGP2Backend::displayName() const { return i18n("Kpgp/pgp v2"); } -QString Kleo::PGP5Backend::name() const { +TQString Kleo::PGP5Backend::name() const { return PGP5_BACKEND_NAME; } -QString Kleo::PGP5Backend::displayName() const { +TQString Kleo::PGP5Backend::displayName() const { return i18n("Kpgp/pgp v5"); } -QString Kleo::PGP6Backend::name() const { +TQString Kleo::PGP6Backend::name() const { return PGP6_BACKEND_NAME; } -QString Kleo::PGP6Backend::displayName() const { +TQString Kleo::PGP6Backend::displayName() const { return i18n("Kpgp/pgp v6"); } -static const QString notSupported() { +static const TQString notSupported() { return i18n("This backend does not support S/MIME"); } -bool Kleo::KpgpBackendBase::checkForOpenPGP( QString * /*reason*/ ) const { +bool Kleo::KpgpBackendBase::checkForOpenPGP( TQString * /*reason*/ ) const { return true; } -bool Kleo::KpgpBackendBase::checkForSMIME( QString * reason ) const { +bool Kleo::KpgpBackendBase::checkForSMIME( TQString * reason ) const { if ( reason ) *reason = notSupported(); return false; } diff --git a/certmanager/lib/backends/kpgp/kpgpbackendbase.h b/certmanager/lib/backends/kpgp/kpgpbackendbase.h index 854e800c3..9c21c12bd 100644 --- a/certmanager/lib/backends/kpgp/kpgpbackendbase.h +++ b/certmanager/lib/backends/kpgp/kpgpbackendbase.h @@ -61,8 +61,8 @@ namespace Kleo { bool supportsOpenPGP() const { return true; } bool supportsSMIME() const { return false; } - bool checkForOpenPGP( QString * reason=0 ) const; - bool checkForSMIME( QString * reason=0 ) const; + bool checkForOpenPGP( TQString * reason=0 ) const; + bool checkForSMIME( TQString * reason=0 ) const; private: mutable KpgpWrapper * mOpenPGPProtocol; }; diff --git a/certmanager/lib/backends/kpgp/kpgpkeylistjob.cpp b/certmanager/lib/backends/kpgp/kpgpkeylistjob.cpp index 4c328adee..2e69f9392 100644 --- a/certmanager/lib/backends/kpgp/kpgpkeylistjob.cpp +++ b/certmanager/lib/backends/kpgp/kpgpkeylistjob.cpp @@ -44,7 +44,7 @@ #include <gpgme.h> -#include <qtimer.h> +#include <tqtimer.h> #include <stdlib.h> #include <string.h> @@ -169,7 +169,7 @@ gpgme_user_id_t KpgpUserID2GPGMEUserID( const Kpgp::UserID * kUserId ) { // inspired by _gpgme_key_append_name - const QCString text = kUserId->text().utf8(); + const TQCString text = kUserId->text().utf8(); const int src_len = text.length(); gpgme_user_id_t uid; @@ -196,9 +196,9 @@ gpgme_subkey_t KpgpSubkey2GPGMESubKey( const Kpgp::Subkey * kSubkey ) { gpgme_subkey_t subkey; - const QCString fpr = kSubkey->fingerprint(); + const TQCString fpr = kSubkey->fingerprint(); const unsigned int fpr_len = fpr.length(); - const QCString keyId = kSubkey->longKeyID(); + const TQCString keyId = kSubkey->longKeyID(); subkey = (gpgme_subkey_t) calloc( 1, sizeof( *subkey ) + fpr_len + 1 ); subkey->revoked = kSubkey->revoked(); @@ -260,11 +260,11 @@ gpgme_key_t KpgpKey2gpgme_key( const Kpgp::Key * kKey ) return key; } -GpgME::Error Kleo::KpgpKeyListJob::start( const QStringList & patterns, +GpgME::Error Kleo::KpgpKeyListJob::start( const TQStringList & patterns, bool secretOnly ) { mPatterns = patterns; mSecretOnly = secretOnly; - QTimer::singleShot( 0, this, SLOT( slotDoIt() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoIt() ) ); return GpgME::Error( 0 ); } @@ -279,7 +279,7 @@ void Kleo::KpgpKeyListJob::slotDoIt() { deleteLater(); } -GpgME::KeyListResult Kleo::KpgpKeyListJob::exec( const QStringList & patterns, +GpgME::KeyListResult Kleo::KpgpKeyListJob::exec( const TQStringList & patterns, bool secretOnly, std::vector<GpgME::Key> & keys ) { Kpgp::KeyList kKeys; diff --git a/certmanager/lib/backends/kpgp/kpgpkeylistjob.h b/certmanager/lib/backends/kpgp/kpgpkeylistjob.h index 779680c2d..4cfb3d047 100644 --- a/certmanager/lib/backends/kpgp/kpgpkeylistjob.h +++ b/certmanager/lib/backends/kpgp/kpgpkeylistjob.h @@ -35,7 +35,7 @@ #include <kleo/keylistjob.h> -#include <qstringlist.h> +#include <tqstringlist.h> namespace GpgME { class Error; @@ -56,10 +56,10 @@ namespace Kleo { ~KpgpKeyListJob(); /*! \reimp from KeyListJob */ - GpgME::Error start( const QStringList & patterns, bool secretOnly ); + GpgME::Error start( const TQStringList & patterns, bool secretOnly ); /*! \reimp from KeyListJob */ - GpgME::KeyListResult exec( const QStringList & patterns, bool secretOnly, + GpgME::KeyListResult exec( const TQStringList & patterns, bool secretOnly, std::vector<GpgME::Key> & keys ); /*! \reimp from Job */ @@ -70,7 +70,7 @@ namespace Kleo { private: Kpgp::Base * mPgpBase; - QStringList mPatterns; + TQStringList mPatterns; bool mSecretOnly; }; diff --git a/certmanager/lib/backends/kpgp/kpgpwrapper.cpp b/certmanager/lib/backends/kpgp/kpgpwrapper.cpp index 20d885dd5..a2ff064f1 100644 --- a/certmanager/lib/backends/kpgp/kpgpwrapper.cpp +++ b/certmanager/lib/backends/kpgp/kpgpwrapper.cpp @@ -56,7 +56,7 @@ //#include <backends/kpgp/kpgpdecryptverifyjob.h> //#include <backends/kpgp/kpgpcryptoconfig.h> -KpgpWrapper::KpgpWrapper( const QString & name ) +KpgpWrapper::KpgpWrapper( const TQString & name ) : mName( name ), mPgpBase( 0 ) { @@ -68,12 +68,12 @@ KpgpWrapper::~KpgpWrapper() } -QString KpgpWrapper::name() const +TQString KpgpWrapper::name() const { return mName; } -QString KpgpWrapper::displayName() const +TQString KpgpWrapper::displayName() const { return mName; } diff --git a/certmanager/lib/backends/kpgp/kpgpwrapper.h b/certmanager/lib/backends/kpgp/kpgpwrapper.h index 182661ec4..40c6e9250 100644 --- a/certmanager/lib/backends/kpgp/kpgpwrapper.h +++ b/certmanager/lib/backends/kpgp/kpgpwrapper.h @@ -35,7 +35,7 @@ #include <kleo/cryptobackend.h> -#include <qstring.h> +#include <tqstring.h> namespace Kleo { class KeyListJob; @@ -61,12 +61,12 @@ namespace Kpgp { class KpgpWrapper : public Kleo::CryptoBackend::Protocol { public: - KpgpWrapper( const QString & name ); + KpgpWrapper( const TQString & name ); ~KpgpWrapper(); - QString name() const; + TQString name() const; - QString displayName() const; + TQString displayName() const; Kleo::KeyListJob * keyListJob( bool remote=false, bool includeSigs=false, bool validate=false ) const; @@ -90,7 +90,7 @@ private: Kpgp::Base * pgpBase() const; private: - QString mName; + TQString mName; mutable Kpgp::Base * mPgpBase; }; diff --git a/certmanager/lib/backends/kpgp/pgp2backend.h b/certmanager/lib/backends/kpgp/pgp2backend.h index fc053a20c..afb8a87c2 100644 --- a/certmanager/lib/backends/kpgp/pgp2backend.h +++ b/certmanager/lib/backends/kpgp/pgp2backend.h @@ -42,8 +42,8 @@ namespace Kleo { class PGP2Backend : public KpgpBackendBase { public: - QString name() const; - QString displayName() const; + TQString name() const; + TQString displayName() const; }; } diff --git a/certmanager/lib/backends/kpgp/pgp5backend.h b/certmanager/lib/backends/kpgp/pgp5backend.h index bf323b6fb..2cf995741 100644 --- a/certmanager/lib/backends/kpgp/pgp5backend.h +++ b/certmanager/lib/backends/kpgp/pgp5backend.h @@ -42,8 +42,8 @@ namespace Kleo { class PGP5Backend : public KpgpBackendBase { public: - QString name() const; - QString displayName() const; + TQString name() const; + TQString displayName() const; }; } diff --git a/certmanager/lib/backends/kpgp/pgp6backend.h b/certmanager/lib/backends/kpgp/pgp6backend.h index 827cf239b..d0babccd1 100644 --- a/certmanager/lib/backends/kpgp/pgp6backend.h +++ b/certmanager/lib/backends/kpgp/pgp6backend.h @@ -42,8 +42,8 @@ namespace Kleo { class PGP6Backend : public KpgpBackendBase { public: - QString name() const; - QString displayName() const; + TQString name() const; + TQString displayName() const; }; } diff --git a/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp b/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp index 2d3ca7409..9e7461791 100644 --- a/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp +++ b/certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp @@ -35,9 +35,9 @@ #include <kdebug.h> #include <kurl.h> -#include <qsocketnotifier.h> -#include <qtextcodec.h> -#include <qstringlist.h> +#include <tqsocketnotifier.h> +#include <tqtextcodec.h> +#include <tqstringlist.h> #include <unistd.h> #include <fcntl.h> @@ -51,12 +51,12 @@ struct Kleo::GnuPGProcessBase::Private { bool useStatusFD; int statusFD[2]; - QSocketNotifier * statnot; - QCString statusBuffer; + TQSocketNotifier * statnot; + TQCString statusBuffer; }; -Kleo::GnuPGProcessBase::GnuPGProcessBase( QObject * parent, const char * name ) +Kleo::GnuPGProcessBase::GnuPGProcessBase( TQObject * parent, const char * name ) : KProcess( parent, name ) { d = new Private(); @@ -84,7 +84,7 @@ bool Kleo::GnuPGProcessBase::start( RunMode runmode, Communication comm ) { ::fcntl( d->statusFD[0], F_SETFD, FD_CLOEXEC ); ::fcntl( d->statusFD[1], F_SETFD, FD_CLOEXEC ); if ( !arguments.empty() ) { - QValueList<QCString>::iterator it = arguments.begin(); + TQValueList<TQCString>::iterator it = arguments.begin(); ++it; arguments.insert( it, "--status-fd" ); char buf[25]; @@ -112,8 +112,8 @@ int Kleo::GnuPGProcessBase::setupCommunication( Communication comm ) { int Kleo::GnuPGProcessBase::commSetupDoneP() { if ( d->useStatusFD ) { ::close( d->statusFD[1] ); // close the input end of the pipe, we're the reader - d->statnot = new QSocketNotifier( d->statusFD[0], QSocketNotifier::Read, this ); - connect( d->statnot, SIGNAL(activated(int)), SLOT(slotChildStatus(int)) ); + d->statnot = new TQSocketNotifier( d->statusFD[0], TQSocketNotifier::Read, this ); + connect( d->statnot, TQT_SIGNAL(activated(int)), TQT_SLOT(slotChildStatus(int)) ); } return KProcess::commSetupDoneP(); } @@ -149,7 +149,7 @@ int Kleo::GnuPGProcessBase::childStatus( int fd ) { return len; } -static QString fromHexEscapedUtf8( const QCString & str ) { +static TQString fromHexEscapedUtf8( const TQCString & str ) { return KURL::decode_string( str.data(), 106 /* utf-8 */ ); } @@ -160,7 +160,7 @@ void Kleo::GnuPGProcessBase::parseStatusOutput() { int lineStart = 0; for ( int lineEnd = d->statusBuffer.find( '\n' ) ; lineEnd >= 0 ; lineEnd = d->statusBuffer.find( '\n', lineStart = lineEnd+1 ) ) { // get next line: - const QCString line = d->statusBuffer.mid( lineStart, lineEnd - lineStart ).stripWhiteSpace(); + const TQCString line = d->statusBuffer.mid( lineStart, lineEnd - lineStart ).stripWhiteSpace(); if ( line.isEmpty() ) continue; // check status token @@ -170,17 +170,17 @@ void Kleo::GnuPGProcessBase::parseStatusOutput() { continue; } // remove status token: - const QCString command = line.mid( startTokenLen ).simplifyWhiteSpace() + ' '; + const TQCString command = line.mid( startTokenLen ).simplifyWhiteSpace() + ' '; if ( command == " " ) { kdDebug( 5150 ) << "Kleo::GnuPGProcessBase::childStatus: status-fd protocol error: line without content." << endl; continue; } // split into base and args - QString cmd; - QStringList args; + TQString cmd; + TQStringList args; int tagStart = 0; for ( int tagEnd = command.find( ' ' ) ; tagEnd >= 0 ; tagEnd = command.find( ' ', tagStart = tagEnd+1 ) ) { - const QCString tag = command.mid( tagStart, tagEnd - tagStart ); + const TQCString tag = command.mid( tagStart, tagEnd - tagStart ); if ( cmd.isNull() ) cmd = fromHexEscapedUtf8( tag ); else diff --git a/certmanager/lib/backends/qgpgme/gnupgprocessbase.h b/certmanager/lib/backends/qgpgme/gnupgprocessbase.h index 73e31e295..9abe5b88d 100644 --- a/certmanager/lib/backends/qgpgme/gnupgprocessbase.h +++ b/certmanager/lib/backends/qgpgme/gnupgprocessbase.h @@ -48,7 +48,7 @@ namespace Kleo { class GnuPGProcessBase : public KProcess { Q_OBJECT public: - GnuPGProcessBase( QObject * parent=0, const char * name=0 ); + GnuPGProcessBase( TQObject * parent=0, const char * name=0 ); ~GnuPGProcessBase(); void setUseStatusFD( bool use ); @@ -59,7 +59,7 @@ namespace Kleo { bool closeStatus(); signals: - void status( Kleo::GnuPGProcessBase * proc, const QString & type, const QStringList & args ); + void status( Kleo::GnuPGProcessBase * proc, const TQString & type, const TQStringList & args ); protected: /*! reimplementation */ diff --git a/certmanager/lib/backends/qgpgme/qgpgmebackend.cpp b/certmanager/lib/backends/qgpgme/qgpgmebackend.cpp index 8256522ae..5905bc5ee 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmebackend.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmebackend.cpp @@ -45,8 +45,8 @@ #include <klocale.h> #include <kstandarddirs.h> -#include <qfile.h> -#include <qstring.h> +#include <tqfile.h> +#include <tqstring.h> Kleo::QGpgMEBackend::QGpgMEBackend() : Kleo::CryptoBackend(), @@ -63,11 +63,11 @@ Kleo::QGpgMEBackend::~QGpgMEBackend() { delete mSMIMEProtocol; mSMIMEProtocol = 0; } -QString Kleo::QGpgMEBackend::name() const { +TQString Kleo::QGpgMEBackend::name() const { return "gpgme"; } -QString Kleo::QGpgMEBackend::displayName() const { +TQString Kleo::QGpgMEBackend::displayName() const { return i18n( "GpgME" ); } @@ -80,7 +80,7 @@ Kleo::CryptoConfig * Kleo::QGpgMEBackend::config() const { return mCryptoConfig; } -static bool check( GpgME::Context::Protocol proto, QString * reason ) { +static bool check( GpgME::Context::Protocol proto, TQString * reason ) { if ( !GpgME::checkEngine( proto ) ) return true; if ( !reason ) @@ -90,25 +90,25 @@ static bool check( GpgME::Context::Protocol proto, QString * reason ) { if ( ei.isNull() ) *reason = i18n("GPGME was compiled without support for %1.").arg( proto == GpgME::Context::CMS ? "S/MIME" : "OpenPGP" ); else if ( ei.fileName() && !ei.version() ) - *reason = i18n("Engine %1 is not installed properly.").arg( QFile::decodeName( ei.fileName() ) ); + *reason = i18n("Engine %1 is not installed properly.").arg( TQFile::decodeName( ei.fileName() ) ); else if ( ei.fileName() && ei.version() && ei.requiredVersion() ) *reason = i18n("Engine %1 version %2 installed, " "but at least version %3 is required.") - .arg( QFile::decodeName( ei.fileName() ), ei.version(), ei.requiredVersion() ); + .arg( TQFile::decodeName( ei.fileName() ), ei.version(), ei.requiredVersion() ); else *reason = i18n("Unknown problem with engine for protocol %1.").arg( proto == GpgME::Context::CMS ? "S/MIME" : "OpenPGP" ); return false; } -bool Kleo::QGpgMEBackend::checkForOpenPGP( QString * reason ) const { +bool Kleo::QGpgMEBackend::checkForOpenPGP( TQString * reason ) const { return check( GpgME::Context::OpenPGP, reason ); } -bool Kleo::QGpgMEBackend::checkForSMIME( QString * reason ) const { +bool Kleo::QGpgMEBackend::checkForSMIME( TQString * reason ) const { return check( GpgME::Context::CMS, reason ); } -bool Kleo::QGpgMEBackend::checkForProtocol( const char * name, QString * reason ) const { +bool Kleo::QGpgMEBackend::checkForProtocol( const char * name, TQString * reason ) const { if ( qstricmp( name, OpenPGP ) == 0 ) return check( GpgME::Context::OpenPGP, reason ); if ( qstricmp( name, SMIME ) == 0 ) diff --git a/certmanager/lib/backends/qgpgme/qgpgmebackend.h b/certmanager/lib/backends/qgpgme/qgpgmebackend.h index fae2dd68e..d5309032f 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmebackend.h +++ b/certmanager/lib/backends/qgpgme/qgpgmebackend.h @@ -51,8 +51,8 @@ namespace Kleo { QGpgMEBackend(); ~QGpgMEBackend(); - QString name() const; - QString displayName() const; + TQString name() const; + TQString displayName() const; CryptoConfig * config() const; @@ -60,9 +60,9 @@ namespace Kleo { Protocol * smime() const; Protocol * protocol( const char * name ) const; - bool checkForOpenPGP( QString * reason=0 ) const; - bool checkForSMIME( QString * reason=0 ) const; - bool checkForProtocol( const char * name, QString * reason ) const; + bool checkForOpenPGP( TQString * reason=0 ) const; + bool checkForSMIME( TQString * reason=0 ) const; + bool checkForProtocol( const char * name, TQString * reason ) const; bool supportsOpenPGP() const { return true; } bool supportsSMIME() const { return true; } diff --git a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp index 86eab99b4..c67800502 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp @@ -39,9 +39,9 @@ #include <assert.h> #include <ktempfile.h> -#include <qfile.h> +#include <tqfile.h> #include <stdlib.h> -#include <qtextcodec.h> +#include <tqtextcodec.h> // Just for the Q_ASSERT in the dtor. Not thread-safe, but who would // have 2 threads talking to gpgconf anyway? :) @@ -71,12 +71,12 @@ void QGpgMECryptoConfig::runGpgConf( bool showErrors ) { // Run gpgconf --list-components to make the list of components - KProcIO proc( QTextCodec::codecForName( "utf8" ) ); + KProcIO proc( TQTextCodec::codecForName( "utf8" ) ); proc << "gpgconf"; // must be in the PATH proc << "--list-components"; - QObject::connect( &proc, SIGNAL( readReady(KProcIO*) ), - this, SLOT( slotCollectStdOut(KProcIO*) ) ); + TQObject::connect( &proc, TQT_SIGNAL( readReady(KProcIO*) ), + this, TQT_SLOT( slotCollectStdOut(KProcIO*) ) ); // run the process: int rc = 0; @@ -87,7 +87,7 @@ void QGpgMECryptoConfig::runGpgConf( bool showErrors ) // handle errors, if any (and if requested) if ( showErrors && rc != 0 ) { - QString wmsg = i18n("<qt>Failed to execute gpgconf:<br>%1</qt>"); + TQString wmsg = i18n("<qt>Failed to execute gpgconf:<br>%1</qt>"); if ( rc == -1 ) wmsg = wmsg.arg( i18n( "program not found" ) ); else if ( rc == -2 ) @@ -102,12 +102,12 @@ void QGpgMECryptoConfig::runGpgConf( bool showErrors ) void QGpgMECryptoConfig::slotCollectStdOut( KProcIO* proc ) { - QString line; + TQString line; int result; while( ( result = proc->readln(line) ) != -1 ) { //kdDebug(5150) << "GOT LINE:" << line << endl; // Format: NAME:DESCRIPTION - QStringList lst = QStringList::split( ':', line, true ); + TQStringList lst = TQStringList::split( ':', line, true ); if ( lst.count() >= 2 ) { mComponents.insert( lst[0], new QGpgMECryptoConfigComponent( this, lst[0], lst[1] ) ); } else { @@ -116,18 +116,18 @@ void QGpgMECryptoConfig::slotCollectStdOut( KProcIO* proc ) } } -QStringList QGpgMECryptoConfig::componentList() const +TQStringList QGpgMECryptoConfig::componentList() const { if ( !mParsed ) const_cast<QGpgMECryptoConfig*>( this )->runGpgConf( true ); - QDictIterator<QGpgMECryptoConfigComponent> it( mComponents ); - QStringList names; + TQDictIterator<QGpgMECryptoConfigComponent> it( mComponents ); + TQStringList names; for( ; it.current(); ++it ) names.push_back( it.currentKey() ); return names; } -Kleo::CryptoConfigComponent* QGpgMECryptoConfig::component( const QString& name ) const +Kleo::CryptoConfigComponent* QGpgMECryptoConfig::component( const TQString& name ) const { if ( !mParsed ) const_cast<QGpgMECryptoConfig*>( this )->runGpgConf( false ); @@ -136,7 +136,7 @@ Kleo::CryptoConfigComponent* QGpgMECryptoConfig::component( const QString& name void QGpgMECryptoConfig::sync( bool runtime ) { - QDictIterator<QGpgMECryptoConfigComponent> it( mComponents ); + TQDictIterator<QGpgMECryptoConfigComponent> it( mComponents ); for( ; it.current(); ++it ) it.current()->sync( runtime ); } @@ -151,7 +151,7 @@ void QGpgMECryptoConfig::clear() //// -QGpgMECryptoConfigComponent::QGpgMECryptoConfigComponent( QGpgMECryptoConfig*, const QString& name, const QString& description ) +QGpgMECryptoConfigComponent::QGpgMECryptoConfigComponent( QGpgMECryptoConfig*, const TQString& name, const TQString& description ) : mGroups( 7 ), mName( name ), mDescription( description ) { mGroups.setAutoDelete( true ); @@ -166,15 +166,15 @@ void QGpgMECryptoConfigComponent::runGpgConf() { // Run gpgconf --list-options <component>, and create all groups and entries for that component - KProcIO proc( QTextCodec::codecForName( "utf8" ) ); + KProcIO proc( TQTextCodec::codecForName( "utf8" ) ); proc << "gpgconf"; // must be in the PATH proc << "--list-options"; proc << mName; //kdDebug(5150) << "Running gpgconf --list-options " << mName << endl; - QObject::connect( &proc, SIGNAL( readReady(KProcIO*) ), - this, SLOT( slotCollectStdOut(KProcIO*) ) ); + TQObject::connect( &proc, TQT_SIGNAL( readReady(KProcIO*) ), + this, TQT_SLOT( slotCollectStdOut(KProcIO*) ) ); mCurrentGroup = 0; // run the process: @@ -194,12 +194,12 @@ void QGpgMECryptoConfigComponent::runGpgConf() void QGpgMECryptoConfigComponent::slotCollectStdOut( KProcIO* proc ) { - QString line; + TQString line; int result; while( ( result = proc->readln(line) ) != -1 ) { //kdDebug(5150) << "GOT LINE:" << line << endl; // Format: NAME:FLAGS:LEVEL:DESCRIPTION:TYPE:ALT-TYPE:ARGNAME:DEFAULT:ARGDEF:VALUE - const QStringList lst = QStringList::split( ':', line, true ); + const TQStringList lst = TQStringList::split( ':', line, true ); if ( lst.count() >= 10 ) { const int flags = lst[1].toInt(); const int level = lst[2].toInt(); @@ -215,7 +215,7 @@ void QGpgMECryptoConfigComponent::slotCollectStdOut( KProcIO* proc ) } else { // normal entry if ( !mCurrentGroup ) { // first toplevel entry -> create toplevel group - mCurrentGroup = new QGpgMECryptoConfigGroup( "<nogroup>", QString::null, 0 ); + mCurrentGroup = new QGpgMECryptoConfigGroup( "<nogroup>", TQString::null, 0 ); mCurrentGroupName = "<nogroup>"; } mCurrentGroup->mEntries.insert( lst[0], new QGpgMECryptoConfigEntry( lst ) ); @@ -229,16 +229,16 @@ void QGpgMECryptoConfigComponent::slotCollectStdOut( KProcIO* proc ) } } -QStringList QGpgMECryptoConfigComponent::groupList() const +TQStringList QGpgMECryptoConfigComponent::groupList() const { - QDictIterator<QGpgMECryptoConfigGroup> it( mGroups ); - QStringList names; + TQDictIterator<QGpgMECryptoConfigGroup> it( mGroups ); + TQStringList names; for( ; it.current(); ++it ) names.push_back( it.currentKey() ); return names; } -Kleo::CryptoConfigGroup* QGpgMECryptoConfigComponent::group(const QString& name ) const +Kleo::CryptoConfigGroup* QGpgMECryptoConfigComponent::group(const TQString& name ) const { return mGroups.find( name ); } @@ -248,16 +248,16 @@ void QGpgMECryptoConfigComponent::sync( bool runtime ) KTempFile tmpFile; tmpFile.setAutoDelete( true ); - QValueList<QGpgMECryptoConfigEntry *> dirtyEntries; + TQValueList<QGpgMECryptoConfigEntry *> dirtyEntries; // Collect all dirty entries - QDictIterator<QGpgMECryptoConfigGroup> groupit( mGroups ); + TQDictIterator<QGpgMECryptoConfigGroup> groupit( mGroups ); for( ; groupit.current(); ++groupit ) { - QDictIterator<QGpgMECryptoConfigEntry> it( groupit.current()->mEntries ); + TQDictIterator<QGpgMECryptoConfigEntry> it( groupit.current()->mEntries ); for( ; it.current(); ++it ) { if ( it.current()->isDirty() ) { // OK, we can set it.currentKey() to it.current()->outputString() - QString line = it.currentKey(); + TQString line = it.currentKey(); if ( it.current()->isSet() ) { // set option line += ":0:"; line += it.current()->outputString(); @@ -265,7 +265,7 @@ void QGpgMECryptoConfigComponent::sync( bool runtime ) line += ":16:"; } line += '\n'; - QCString line8bit = line.utf8(); // encode with utf8, and KProcIO uses utf8 when reading. + TQCString line8bit = line.utf8(); // encode with utf8, and KProcIO uses utf8 when reading. tmpFile.file()->writeBlock( line8bit.data(), line8bit.size()-1 /*no 0*/ ); dirtyEntries.append( it.current() ); } @@ -276,7 +276,7 @@ void QGpgMECryptoConfigComponent::sync( bool runtime ) return; // Call gpgconf --change-options <component> - QString commandLine = "gpgconf"; + TQString commandLine = "gpgconf"; if ( runtime ) commandLine += " --runtime"; commandLine += " --change-options "; @@ -285,7 +285,7 @@ void QGpgMECryptoConfigComponent::sync( bool runtime ) commandLine += KProcess::quote( tmpFile.name() ); //kdDebug(5150) << commandLine << endl; - //system( QCString( "cat " ) + tmpFile.name().latin1() ); // DEBUG + //system( TQCString( "cat " ) + tmpFile.name().latin1() ); // DEBUG KProcess proc; proc.setUseShell( true ); @@ -300,19 +300,19 @@ void QGpgMECryptoConfigComponent::sync( bool runtime ) if ( rc == -1 ) { - QString wmsg = i18n( "Could not start gpgconf\nCheck that gpgconf is in the PATH and that it can be started" ); + TQString wmsg = i18n( "Could not start gpgconf\nCheck that gpgconf is in the PATH and that it can be started" ); kdWarning(5150) << wmsg << endl; KMessageBox::error(0, wmsg); } else if( rc != 0 ) // Happens due to bugs in gpgconf (e.g. issues 104/115) { - QString wmsg = i18n( "Error from gpgconf while saving configuration: %1" ).arg( QString::fromLocal8Bit( strerror( rc ) ) ); + TQString wmsg = i18n( "Error from gpgconf while saving configuration: %1" ).arg( TQString::fromLocal8Bit( strerror( rc ) ) ); kdWarning(5150) << k_funcinfo << ":" << strerror( rc ) << endl; KMessageBox::error(0, wmsg); } else { - QValueList<QGpgMECryptoConfigEntry *>::Iterator it = dirtyEntries.begin(); + TQValueList<QGpgMECryptoConfigEntry *>::Iterator it = dirtyEntries.begin(); for( ; it != dirtyEntries.end(); ++it ) { (*it)->setDirty( false ); } @@ -321,7 +321,7 @@ void QGpgMECryptoConfigComponent::sync( bool runtime ) //// -QGpgMECryptoConfigGroup::QGpgMECryptoConfigGroup( const QString & name, const QString& description, int level ) +QGpgMECryptoConfigGroup::QGpgMECryptoConfigGroup( const TQString & name, const TQString& description, int level ) : mEntries( 29 ), mName( name ), mDescription( description ), @@ -330,47 +330,47 @@ QGpgMECryptoConfigGroup::QGpgMECryptoConfigGroup( const QString & name, const QS mEntries.setAutoDelete( true ); } -QStringList QGpgMECryptoConfigGroup::entryList() const +TQStringList QGpgMECryptoConfigGroup::entryList() const { - QDictIterator<QGpgMECryptoConfigEntry> it( mEntries ); - QStringList names; + TQDictIterator<QGpgMECryptoConfigEntry> it( mEntries ); + TQStringList names; for( ; it.current(); ++it ) names.push_back( it.currentKey() ); return names; } -Kleo::CryptoConfigEntry* QGpgMECryptoConfigGroup::entry( const QString& name ) const +Kleo::CryptoConfigEntry* QGpgMECryptoConfigGroup::entry( const TQString& name ) const { return mEntries.find( name ); } //// -static QString gpgconf_unescape( const QString& str ) +static TQString gpgconf_unescape( const TQString& str ) { // Looks like it's the same rules as KURL. return KURL::decode_string( str, 106 ); } -static QString gpgconf_escape( const QString& str ) +static TQString gpgconf_escape( const TQString& str ) { // Escape special chars (including ':' and '%') - QString enc = KURL::encode_string( str, 106 ); // and convert to utf8 first (to get %12%34 for one special char) + TQString enc = KURL::encode_string( str, 106 ); // and convert to utf8 first (to get %12%34 for one special char) // Also encode commas, for lists. enc.replace( ',', "%2c" ); return enc; } -static QString urlpart_encode( const QString& str ) +static TQString urlpart_encode( const TQString& str ) { - QString enc( str ); + TQString enc( str ); enc.replace( '%', "%25" ); // first! enc.replace( ':', "%3a" ); //kdDebug() << " urlpart_encode: " << str << " -> " << enc << endl; return enc; } -static QString urlpart_decode( const QString& str ) +static TQString urlpart_decode( const TQString& str ) { return KURL::decode_string( str ); } @@ -397,11 +397,11 @@ static Kleo::CryptoConfigEntry::ArgType knownArgType( int argType, bool& ok ) { } } -QGpgMECryptoConfigEntry::QGpgMECryptoConfigEntry( const QStringList& parsedLine ) +QGpgMECryptoConfigEntry::QGpgMECryptoConfigEntry( const TQStringList& parsedLine ) { // Format: NAME:FLAGS:LEVEL:DESCRIPTION:TYPE:ALT-TYPE:ARGNAME:DEFAULT:ARGDEF:VALUE assert( parsedLine.count() >= 10 ); // called checked for it already - QStringList::const_iterator it = parsedLine.begin(); + TQStringList::const_iterator it = parsedLine.begin(); mName = *it++; mFlags = (*it++).toInt(); mLevel = (*it++).toInt(); @@ -421,7 +421,7 @@ QGpgMECryptoConfigEntry::QGpgMECryptoConfigEntry( const QStringList& parsedLine ++it; // skip argname (not useful in GUIs) mSet = false; - QString value; + TQString value; if ( mFlags & GPGCONF_FLAG_DEFAULT ) { value = *it; // get default value mDefaultValue = stringToValue( value, true ); @@ -442,18 +442,18 @@ QGpgMECryptoConfigEntry::QGpgMECryptoConfigEntry( const QStringList& parsedLine mDirty = false; } -QVariant QGpgMECryptoConfigEntry::stringToValue( const QString& str, bool unescape ) const +TQVariant QGpgMECryptoConfigEntry::stringToValue( const TQString& str, bool unescape ) const { bool isString = isStringType(); if ( isList() ) { - QValueList<QVariant> lst; - QStringList items = QStringList::split( ',', str ); - for( QStringList::const_iterator valit = items.begin(); valit != items.end(); ++valit ) { - QString val = *valit; + TQValueList<TQVariant> lst; + TQStringList items = TQStringList::split( ',', str ); + for( TQStringList::const_iterator valit = items.begin(); valit != items.end(); ++valit ) { + TQString val = *valit; if ( isString ) { if ( val.isEmpty() ) { - lst << QString::null; + lst << TQString::null; continue; } else if ( unescape ) { @@ -462,20 +462,20 @@ QVariant QGpgMECryptoConfigEntry::stringToValue( const QString& str, bool unesca val = val.mid( 1 ); } } - lst << QVariant( unescape ? gpgconf_unescape( val ) : val ); + lst << TQVariant( unescape ? gpgconf_unescape( val ) : val ); } return lst; } else { // not a list - QString val( str ); + TQString val( str ); if ( isString ) { if ( val.isEmpty() ) - return QVariant( QString::null ); // not set [ok with lists too?] + return TQVariant( TQString::null ); // not set [ok with lists too?] else if ( unescape ) { Q_ASSERT( val[0] == '"' ); // see README.gpgconf val = val.mid( 1 ); } } - return QVariant( unescape ? gpgconf_unescape( val ) : val ); + return TQVariant( unescape ? gpgconf_unescape( val ) : val ); } } @@ -520,7 +520,7 @@ bool QGpgMECryptoConfigEntry::boolValue() const return mValue.toBool(); } -QString QGpgMECryptoConfigEntry::stringValue() const +TQString QGpgMECryptoConfigEntry::stringValue() const { return toString( false ); } @@ -539,13 +539,13 @@ unsigned int QGpgMECryptoConfigEntry::uintValue() const return mValue.toUInt(); } -static KURL parseURL( int mRealArgType, const QString& str ) +static KURL parseURL( int mRealArgType, const TQString& str ) { if ( mRealArgType == 33 ) { // LDAP server // The format is HOSTNAME:PORT:USERNAME:PASSWORD:BASE_DN - QStringList items = QStringList::split( ':', str, true ); + TQStringList items = TQStringList::split( ':', str, true ); if ( items.count() == 5 ) { - QStringList::const_iterator it = items.begin(); + TQStringList::const_iterator it = items.begin(); KURL url; url.setProtocol( "ldap" ); url.setHost( urlpart_decode( *it++ ) ); @@ -563,13 +563,13 @@ static KURL parseURL( int mRealArgType, const QString& str ) } // The opposite of parseURL -static QString splitURL( int mRealArgType, const KURL& url ) +static TQString splitURL( int mRealArgType, const KURL& url ) { if ( mRealArgType == 33 ) { // LDAP server // The format is HOSTNAME:PORT:USERNAME:PASSWORD:BASE_DN Q_ASSERT( url.protocol() == "ldap" ); return urlpart_encode( url.host() ) + ":" + - QString::number( url.port() ) + ":" + + TQString::number( url.port() ) + ":" + urlpart_encode( url.user() ) + ":" + urlpart_encode( url.pass() ) + ":" + // KURL automatically encoded the query (e.g. for spaces inside it), @@ -583,7 +583,7 @@ KURL QGpgMECryptoConfigEntry::urlValue() const { Q_ASSERT( mArgType == ArgType_Path || mArgType == ArgType_URL || mArgType == ArgType_LDAPURL ); Q_ASSERT( !isList() ); - QString str = mValue.toString(); + TQString str = mValue.toString(); if ( mArgType == ArgType_Path ) { KURL url; @@ -600,32 +600,32 @@ unsigned int QGpgMECryptoConfigEntry::numberOfTimesSet() const return mValue.toUInt(); } -QStringList QGpgMECryptoConfigEntry::stringValueList() const +TQStringList QGpgMECryptoConfigEntry::stringValueList() const { Q_ASSERT( isStringType() ); Q_ASSERT( isList() ); return mValue.toStringList(); } -QValueList<int> QGpgMECryptoConfigEntry::intValueList() const +TQValueList<int> QGpgMECryptoConfigEntry::intValueList() const { Q_ASSERT( mArgType == ArgType_Int ); Q_ASSERT( isList() ); - QValueList<int> ret; - QValueList<QVariant> lst = mValue.toList(); - for( QValueList<QVariant>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { + TQValueList<int> ret; + TQValueList<TQVariant> lst = mValue.toList(); + for( TQValueList<TQVariant>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { ret.append( (*it).toInt() ); } return ret; } -QValueList<unsigned int> QGpgMECryptoConfigEntry::uintValueList() const +TQValueList<unsigned int> QGpgMECryptoConfigEntry::uintValueList() const { Q_ASSERT( mArgType == ArgType_UInt ); Q_ASSERT( isList() ); - QValueList<unsigned int> ret; - QValueList<QVariant> lst = mValue.toList(); - for( QValueList<QVariant>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { + TQValueList<unsigned int> ret; + TQValueList<TQVariant> lst = mValue.toList(); + for( TQValueList<TQVariant>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { ret.append( (*it).toUInt() ); } return ret; @@ -635,10 +635,10 @@ KURL::List QGpgMECryptoConfigEntry::urlValueList() const { Q_ASSERT( mArgType == ArgType_Path || mArgType == ArgType_URL || mArgType == ArgType_LDAPURL ); Q_ASSERT( isList() ); - QStringList lst = mValue.toStringList(); + TQStringList lst = mValue.toStringList(); KURL::List ret; - for( QStringList::const_iterator it = lst.begin(); it != lst.end(); ++it ) { + for( TQStringList::const_iterator it = lst.begin(); it != lst.end(); ++it ) { if ( mArgType == ArgType_Path ) { KURL url; url.setPath( *it ); @@ -671,7 +671,7 @@ void QGpgMECryptoConfigEntry::setBoolValue( bool b ) mDirty = true; } -void QGpgMECryptoConfigEntry::setStringValue( const QString& str ) +void QGpgMECryptoConfigEntry::setStringValue( const TQString& str ) { mValue = stringToValue( str, false ); // When setting a string to empty (and there's no default), we need to act like resetToDefault @@ -702,7 +702,7 @@ void QGpgMECryptoConfigEntry::setUIntValue( unsigned int i ) void QGpgMECryptoConfigEntry::setURLValue( const KURL& url ) { - QString str = splitURL( mRealArgType, url ); + TQString str = splitURL( mRealArgType, url ); if ( str.isEmpty() && !isOptional() ) mSet = false; else @@ -718,7 +718,7 @@ void QGpgMECryptoConfigEntry::setNumberOfTimesSet( unsigned int i ) setUIntValue( i ); } -void QGpgMECryptoConfigEntry::setStringValueList( const QStringList& lst ) +void QGpgMECryptoConfigEntry::setStringValueList( const TQStringList& lst ) { mValue = lst; if ( lst.isEmpty() && !isOptional() ) @@ -728,11 +728,11 @@ void QGpgMECryptoConfigEntry::setStringValueList( const QStringList& lst ) mDirty = true; } -void QGpgMECryptoConfigEntry::setIntValueList( const QValueList<int>& lst ) +void QGpgMECryptoConfigEntry::setIntValueList( const TQValueList<int>& lst ) { - QValueList<QVariant> ret; - for( QValueList<int>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { - ret << QVariant( *it ); + TQValueList<TQVariant> ret; + for( TQValueList<int>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { + ret << TQVariant( *it ); } mValue = ret; if ( ret.isEmpty() && !isOptional() ) @@ -742,11 +742,11 @@ void QGpgMECryptoConfigEntry::setIntValueList( const QValueList<int>& lst ) mDirty = true; } -void QGpgMECryptoConfigEntry::setUIntValueList( const QValueList<unsigned int>& lst ) +void QGpgMECryptoConfigEntry::setUIntValueList( const TQValueList<unsigned int>& lst ) { - QValueList<QVariant> ret; - for( QValueList<unsigned int>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { - ret << QVariant( *it ); + TQValueList<TQVariant> ret; + for( TQValueList<unsigned int>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { + ret << TQVariant( *it ); } if ( ret.isEmpty() && !isOptional() ) mSet = false; @@ -758,7 +758,7 @@ void QGpgMECryptoConfigEntry::setUIntValueList( const QValueList<unsigned int>& void QGpgMECryptoConfigEntry::setURLValueList( const KURL::List& urls ) { - QStringList lst; + TQStringList lst; for( KURL::List::const_iterator it = urls.begin(); it != urls.end(); ++it ) { lst << splitURL( mRealArgType, *it ); } @@ -770,25 +770,25 @@ void QGpgMECryptoConfigEntry::setURLValueList( const KURL::List& urls ) mDirty = true; } -QString QGpgMECryptoConfigEntry::toString( bool escape ) const +TQString QGpgMECryptoConfigEntry::toString( bool escape ) const { // Basically the opposite of stringToValue if ( isStringType() ) { if ( mValue.isNull() ) - return QString::null; + return TQString::null; else if ( isList() ) { // string list - QStringList lst = mValue.toStringList(); + TQStringList lst = mValue.toStringList(); if ( escape ) { - for( QStringList::iterator it = lst.begin(); it != lst.end(); ++it ) { + for( TQStringList::iterator it = lst.begin(); it != lst.end(); ++it ) { if ( !(*it).isNull() ) *it = gpgconf_escape( *it ).prepend( "\"" ); } } - QString res = lst.join( "," ); + TQString res = lst.join( "," ); kdDebug(5150) << "toString: " << res << endl; return res; } else { // normal string - QString res = mValue.toString(); + TQString res = mValue.toString(); if ( escape ) res = gpgconf_escape( res ).prepend( "\"" ); return res; @@ -797,7 +797,7 @@ QString QGpgMECryptoConfigEntry::toString( bool escape ) const if ( !isList() ) // non-list non-string { if ( mArgType == ArgType_None ) { - return mValue.toBool() ? QString::fromLatin1( "1" ) : QString::null; + return mValue.toBool() ? TQString::fromLatin1( "1" ) : TQString::null; } else { // some int Q_ASSERT( mArgType == ArgType_Int || mArgType == ArgType_UInt ); return mValue.toString(); // int to string conversion @@ -806,16 +806,16 @@ QString QGpgMECryptoConfigEntry::toString( bool escape ) const // Lists (of other types than strings) if ( mArgType == ArgType_None ) - return QString::number( numberOfTimesSet() ); - QStringList ret; - QValueList<QVariant> lst = mValue.toList(); - for( QValueList<QVariant>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { - ret << (*it).toString(); // QVariant does the conversion + return TQString::number( numberOfTimesSet() ); + TQStringList ret; + TQValueList<TQVariant> lst = mValue.toList(); + for( TQValueList<TQVariant>::const_iterator it = lst.begin(); it != lst.end(); ++it ) { + ret << (*it).toString(); // TQVariant does the conversion } return ret.join( "," ); } -QString QGpgMECryptoConfigEntry::outputString() const +TQString QGpgMECryptoConfigEntry::outputString() const { Q_ASSERT( mSet ); return toString( true ); diff --git a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.h b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.h index bfcb8e5ca..20a01d315 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.h +++ b/certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.h @@ -34,10 +34,10 @@ #define KLEO_QGPGMECRYPTOCONFIG_H #include <kleo/cryptoconfig.h> -#include <qdict.h> -#include <qstringlist.h> -#include <qobject.h> -#include <qvariant.h> +#include <tqdict.h> +#include <tqstringlist.h> +#include <tqobject.h> +#include <tqvariant.h> class KProcIO; class QGpgMECryptoConfigComponent; @@ -46,7 +46,7 @@ class QGpgMECryptoConfigEntry; * CryptoConfig implementation around the gpgconf command-line tool * For method docu, see kleo/cryptoconfig.h */ -class QGpgMECryptoConfig : public QObject, public Kleo::CryptoConfig { +class QGpgMECryptoConfig : public TQObject, public Kleo::CryptoConfig { Q_OBJECT public: @@ -56,9 +56,9 @@ public: QGpgMECryptoConfig(); virtual ~QGpgMECryptoConfig(); - virtual QStringList componentList() const; + virtual TQStringList componentList() const; - virtual Kleo::CryptoConfigComponent* component( const QString& name ) const; + virtual Kleo::CryptoConfigComponent* component( const TQString& name ) const; virtual void clear(); virtual void sync( bool runtime ); @@ -70,25 +70,25 @@ private: void runGpgConf( bool showErrors ); private: - QDict<QGpgMECryptoConfigComponent> mComponents; + TQDict<QGpgMECryptoConfigComponent> mComponents; bool mParsed; }; class QGpgMECryptoConfigGroup; /// For docu, see kleo/cryptoconfig.h -class QGpgMECryptoConfigComponent : public QObject, public Kleo::CryptoConfigComponent { +class QGpgMECryptoConfigComponent : public TQObject, public Kleo::CryptoConfigComponent { Q_OBJECT public: - QGpgMECryptoConfigComponent( QGpgMECryptoConfig*, const QString& name, const QString& description ); + QGpgMECryptoConfigComponent( QGpgMECryptoConfig*, const TQString& name, const TQString& description ); ~QGpgMECryptoConfigComponent(); - QString name() const { return mName; } - QString iconName() const { return mName; } - QString description() const { return mDescription; } - QStringList groupList() const; - Kleo::CryptoConfigGroup* group( const QString& name ) const; + TQString name() const { return mName; } + TQString iconName() const { return mName; } + TQString description() const { return mDescription; } + TQStringList groupList() const; + Kleo::CryptoConfigGroup* group( const TQString& name ) const; void sync( bool runtime ); @@ -98,41 +98,41 @@ private: void runGpgConf(); private: - QDict<QGpgMECryptoConfigGroup> mGroups; - QString mName; - QString mDescription; + TQDict<QGpgMECryptoConfigGroup> mGroups; + TQString mName; + TQString mDescription; QGpgMECryptoConfigGroup* mCurrentGroup; // during parsing - QString mCurrentGroupName; // during parsing + TQString mCurrentGroupName; // during parsing }; class QGpgMECryptoConfigGroup : public Kleo::CryptoConfigGroup { public: - QGpgMECryptoConfigGroup( const QString & name, const QString& description, int level ); + QGpgMECryptoConfigGroup( const TQString & name, const TQString& description, int level ); ~QGpgMECryptoConfigGroup() {} - QString name() const { return mName; } - QString iconName() const { return QString::null; } - QString description() const { return mDescription; } + TQString name() const { return mName; } + TQString iconName() const { return TQString::null; } + TQString description() const { return mDescription; } Kleo::CryptoConfigEntry::Level level() const { return mLevel; } - QStringList entryList() const; - Kleo::CryptoConfigEntry* entry( const QString& name ) const; + TQStringList entryList() const; + Kleo::CryptoConfigEntry* entry( const TQString& name ) const; private: friend class QGpgMECryptoConfigComponent; // it adds the entries - QDict<QGpgMECryptoConfigEntry> mEntries; - QString mName; - QString mDescription; + TQDict<QGpgMECryptoConfigEntry> mEntries; + TQString mName; + TQString mDescription; Kleo::CryptoConfigEntry::Level mLevel; }; class QGpgMECryptoConfigEntry : public Kleo::CryptoConfigEntry { public: - QGpgMECryptoConfigEntry( const QStringList& parsedLine ); + QGpgMECryptoConfigEntry( const TQStringList& parsedLine ); ~QGpgMECryptoConfigEntry(); - QString name() const { return mName; } - QString description() const { return mDescription; } + TQString name() const { return mName; } + TQString description() const { return mDescription; } bool isOptional() const; bool isReadOnly() const; bool isList() const; @@ -141,40 +141,40 @@ public: ArgType argType() const { return static_cast<ArgType>( mArgType ); } bool isSet() const; bool boolValue() const; - QString stringValue() const; + TQString stringValue() const; int intValue() const; unsigned int uintValue() const; KURL urlValue() const; unsigned int numberOfTimesSet() const; - QStringList stringValueList() const; - QValueList<int> intValueList() const; - QValueList<unsigned int> uintValueList() const; + TQStringList stringValueList() const; + TQValueList<int> intValueList() const; + TQValueList<unsigned int> uintValueList() const; KURL::List urlValueList() const; void resetToDefault(); void setBoolValue( bool ); - void setStringValue( const QString& ); + void setStringValue( const TQString& ); void setIntValue( int ); void setUIntValue( unsigned int ); void setURLValue( const KURL& ); void setNumberOfTimesSet( unsigned int ); - void setStringValueList( const QStringList& ); - void setIntValueList( const QValueList<int>& ); - void setUIntValueList( const QValueList<unsigned int>& ); + void setStringValueList( const TQStringList& ); + void setIntValueList( const TQValueList<int>& ); + void setUIntValueList( const TQValueList<unsigned int>& ); void setURLValueList( const KURL::List& ); bool isDirty() const { return mDirty; } void setDirty( bool b ); - QString outputString() const; + TQString outputString() const; protected: bool isStringType() const; - QVariant stringToValue( const QString& value, bool unescape ) const; - QString toString( bool escape ) const; + TQVariant stringToValue( const TQString& value, bool unescape ) const; + TQString toString( bool escape ) const; private: - QString mName; - QString mDescription; - QVariant mDefaultValue; - QVariant mValue; + TQString mName; + TQString mDescription; + TQVariant mDefaultValue; + TQVariant mValue; uint mFlags : 8; // bitfield with 8 bits uint mLevel : 3; // max is 4 (2, in fact) -> 3 bits uint mRealArgType : 6; // max is 33 -> 6 bits diff --git a/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.cpp index 17905555e..692efa322 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.cpp @@ -55,7 +55,7 @@ Kleo::QGpgMEDecryptJob::QGpgMEDecryptJob( GpgME::Context * context ) Kleo::QGpgMEDecryptJob::~QGpgMEDecryptJob() { } -void Kleo::QGpgMEDecryptJob::setup( const QByteArray & cipherText ) { +void Kleo::QGpgMEDecryptJob::setup( const TQByteArray & cipherText ) { assert( !mInData ); assert( !mOutData ); @@ -63,7 +63,7 @@ void Kleo::QGpgMEDecryptJob::setup( const QByteArray & cipherText ) { createOutData(); } -GpgME::Error Kleo::QGpgMEDecryptJob::start( const QByteArray & cipherText ) { +GpgME::Error Kleo::QGpgMEDecryptJob::start( const TQByteArray & cipherText ) { setup( cipherText ); hookupContextToEventLoopInteractor(); @@ -75,8 +75,8 @@ GpgME::Error Kleo::QGpgMEDecryptJob::start( const QByteArray & cipherText ) { return err; } -GpgME::DecryptionResult Kleo::QGpgMEDecryptJob::exec( const QByteArray & cipherText, - QByteArray & plainText ) { +GpgME::DecryptionResult Kleo::QGpgMEDecryptJob::exec( const TQByteArray & cipherText, + TQByteArray & plainText ) { setup( cipherText ); const GpgME::DecryptionResult result = mCtx->decrypt( *mInData, *mOutData ); plainText = mOutDataDataProvider->data(); diff --git a/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.h b/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.h index 7fc89dff2..133806694 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmedecryptjob.h @@ -37,7 +37,7 @@ #include "qgpgmejob.h" -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -53,11 +53,11 @@ namespace Kleo { ~QGpgMEDecryptJob(); /*! \reimp from DecryptJob */ - GpgME::Error start( const QByteArray & cipherText ); + GpgME::Error start( const TQByteArray & cipherText ); /*! \reimp from DecryptJob */ - GpgME::DecryptionResult exec( const QByteArray & cipherText, - QByteArray & plainText ); + GpgME::DecryptionResult exec( const TQByteArray & cipherText, + TQByteArray & plainText ); private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { @@ -66,7 +66,7 @@ namespace Kleo { private: void doOperationDoneEvent( const GpgME::Error & e ); - void setup( const QByteArray & cipherText ); + void setup( const TQByteArray & cipherText ); }; } diff --git a/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.cpp index 02cf1ef28..68f67d0fd 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.cpp @@ -56,7 +56,7 @@ Kleo::QGpgMEDecryptVerifyJob::QGpgMEDecryptVerifyJob( GpgME::Context * context ) Kleo::QGpgMEDecryptVerifyJob::~QGpgMEDecryptVerifyJob() { } -void Kleo::QGpgMEDecryptVerifyJob::setup( const QByteArray & cipherText ) { +void Kleo::QGpgMEDecryptVerifyJob::setup( const TQByteArray & cipherText ) { assert( !mInData ); assert( !mOutData ); @@ -64,7 +64,7 @@ void Kleo::QGpgMEDecryptVerifyJob::setup( const QByteArray & cipherText ) { createOutData(); } -GpgME::Error Kleo::QGpgMEDecryptVerifyJob::start( const QByteArray & cipherText ) { +GpgME::Error Kleo::QGpgMEDecryptVerifyJob::start( const TQByteArray & cipherText ) { setup( cipherText ); hookupContextToEventLoopInteractor(); @@ -77,7 +77,7 @@ GpgME::Error Kleo::QGpgMEDecryptVerifyJob::start( const QByteArray & cipherText } std::pair<GpgME::DecryptionResult,GpgME::VerificationResult> -Kleo::QGpgMEDecryptVerifyJob::exec( const QByteArray & cipherText, QByteArray & plainText ) { +Kleo::QGpgMEDecryptVerifyJob::exec( const TQByteArray & cipherText, TQByteArray & plainText ) { setup( cipherText ); const std::pair<GpgME::DecryptionResult,GpgME::VerificationResult> result = mCtx->decryptAndVerify( *mInData, *mOutData ); diff --git a/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.h b/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.h index a39188746..58da84d07 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmedecryptverifyjob.h @@ -37,7 +37,7 @@ #include "qgpgmejob.h" -#include <qcstring.h> +#include <tqcstring.h> #include <kdepimmacros.h> namespace GpgME { @@ -54,11 +54,11 @@ namespace Kleo { ~QGpgMEDecryptVerifyJob(); /*! \reimp from DecryptVerifyJob */ - GpgME::Error start( const QByteArray & cipherText ); + GpgME::Error start( const TQByteArray & cipherText ); /*! \reimp from DecryptVerifyJob */ std::pair<GpgME::DecryptionResult,GpgME::VerificationResult> - exec( const QByteArray & cipherText, QByteArray & plainText ); + exec( const TQByteArray & cipherText, TQByteArray & plainText ); private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { @@ -67,7 +67,7 @@ namespace Kleo { private: void doOperationDoneEvent( const GpgME::Error & e ); - void setup( const QByteArray & ); + void setup( const TQByteArray & ); }; } diff --git a/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.cpp index 6ee771a04..364e8f9f7 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.cpp @@ -42,7 +42,7 @@ #include <gpgmepp/context.h> #include <gpgmepp/data.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <assert.h> @@ -56,7 +56,7 @@ Kleo::QGpgMEDownloadJob::QGpgMEDownloadJob( GpgME::Context * context ) Kleo::QGpgMEDownloadJob::~QGpgMEDownloadJob() { } -GpgME::Error Kleo::QGpgMEDownloadJob::start( const QStringList & pats ) { +GpgME::Error Kleo::QGpgMEDownloadJob::start( const TQStringList & pats ) { assert( !patterns() ); assert( !mOutData ); diff --git a/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.h b/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.h index 1402b127c..6dc7b209e 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmedownloadjob.h @@ -51,7 +51,7 @@ namespace Kleo { ~QGpgMEDownloadJob(); /*! \reimp from DownloadJob */ - GpgME::Error start( const QStringList & fingerprints ); + GpgME::Error start( const TQStringList & fingerprints ); private: void doOperationDoneEvent( const GpgME::Error & e ); diff --git a/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.cpp index 3f223fc56..ddd51717f 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.cpp @@ -59,7 +59,7 @@ Kleo::QGpgMEEncryptJob::QGpgMEEncryptJob( GpgME::Context * context ) Kleo::QGpgMEEncryptJob::~QGpgMEEncryptJob() { } -void Kleo::QGpgMEEncryptJob::setup( const QByteArray & plainText ) { +void Kleo::QGpgMEEncryptJob::setup( const TQByteArray & plainText ) { assert( !mInData ); assert( !mOutData ); @@ -68,7 +68,7 @@ void Kleo::QGpgMEEncryptJob::setup( const QByteArray & plainText ) { } GpgME::Error Kleo::QGpgMEEncryptJob::start( const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, bool alwaysTrust ) { + const TQByteArray & plainText, bool alwaysTrust ) { setup( plainText ); hookupContextToEventLoopInteractor(); @@ -84,9 +84,9 @@ GpgME::Error Kleo::QGpgMEEncryptJob::start( const std::vector<GpgME::Key> & reci } GpgME::EncryptionResult Kleo::QGpgMEEncryptJob::exec( const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, + const TQByteArray & plainText, bool alwaysTrust, - QByteArray & ciphertext ) { + TQByteArray & ciphertext ) { setup( plainText ); const GpgME::Context::EncryptionFlags flags = alwaysTrust ? GpgME::Context::AlwaysTrust : GpgME::Context::None; @@ -100,7 +100,7 @@ void Kleo::QGpgMEEncryptJob::doOperationDoneEvent( const GpgME::Error & ) { emit result( mResult = mCtx->encryptionResult(), mOutDataDataProvider->data() ); } -void Kleo::QGpgMEEncryptJob::showErrorDialog( QWidget * parent, const QString & caption ) const { +void Kleo::QGpgMEEncryptJob::showErrorDialog( TQWidget * parent, const TQString & caption ) const { if ( mResult.error() && !mResult.error().isCanceled() ) Kleo::MessageBox::error( parent, mResult, this, caption ); } diff --git a/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.h b/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.h index 362fb4e06..ecc7afd87 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmeencryptjob.h @@ -39,7 +39,7 @@ #include <gpgmepp/encryptionresult.h> -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -57,15 +57,15 @@ namespace Kleo { /*! \reimp from EncryptJob */ GpgME::Error start( const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, bool alwaysTrust ); + const TQByteArray & plainText, bool alwaysTrust ); /*! \reimp from EncryptJob */ GpgME::EncryptionResult exec( const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, bool alwaysTrust, - QByteArray & cipherText ); + const TQByteArray & plainText, bool alwaysTrust, + TQByteArray & cipherText ); /*! \reimp from Job */ - void showErrorDialog( QWidget * parent, const QString & caption ) const; + void showErrorDialog( TQWidget * parent, const TQString & caption ) const; private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { @@ -75,7 +75,7 @@ namespace Kleo { private: void doOperationDoneEvent( const GpgME::Error & e ); - void setup( const QByteArray & ); + void setup( const TQByteArray & ); private: GpgME::EncryptionResult mResult; diff --git a/certmanager/lib/backends/qgpgme/qgpgmeexportjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmeexportjob.cpp index c9274f3b7..c31074aff 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeexportjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmeexportjob.cpp @@ -42,7 +42,7 @@ #include <gpgmepp/context.h> #include <gpgmepp/data.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <assert.h> @@ -56,7 +56,7 @@ Kleo::QGpgMEExportJob::QGpgMEExportJob( GpgME::Context * context ) Kleo::QGpgMEExportJob::~QGpgMEExportJob() { } -GpgME::Error Kleo::QGpgMEExportJob::start( const QStringList & pats ) { +GpgME::Error Kleo::QGpgMEExportJob::start( const TQStringList & pats ) { assert( !patterns() ); assert( !mOutData ); diff --git a/certmanager/lib/backends/qgpgme/qgpgmeexportjob.h b/certmanager/lib/backends/qgpgme/qgpgmeexportjob.h index 8b799b583..2c13f4090 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeexportjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmeexportjob.h @@ -37,7 +37,7 @@ #include "qgpgmejob.h" -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -53,7 +53,7 @@ namespace Kleo { ~QGpgMEExportJob(); /*! \reimp from ExportJob */ - GpgME::Error start( const QStringList & patterns ); + GpgME::Error start( const TQStringList & patterns ); private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { diff --git a/certmanager/lib/backends/qgpgme/qgpgmeimportjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmeimportjob.cpp index fd1251b65..7c698e7e7 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeimportjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmeimportjob.cpp @@ -55,13 +55,13 @@ Kleo::QGpgMEImportJob::QGpgMEImportJob( GpgME::Context * context ) Kleo::QGpgMEImportJob::~QGpgMEImportJob() { } -void Kleo::QGpgMEImportJob::setup( const QByteArray & keyData ) { +void Kleo::QGpgMEImportJob::setup( const TQByteArray & keyData ) { assert( !mInData ); createInData( keyData ); } -GpgME::Error Kleo::QGpgMEImportJob::start( const QByteArray & keyData ) { +GpgME::Error Kleo::QGpgMEImportJob::start( const TQByteArray & keyData ) { setup( keyData ); hookupContextToEventLoopInteractor(); @@ -73,7 +73,7 @@ GpgME::Error Kleo::QGpgMEImportJob::start( const QByteArray & keyData ) { return err; } -GpgME::ImportResult Kleo::QGpgMEImportJob::exec( const QByteArray & keyData ) { +GpgME::ImportResult Kleo::QGpgMEImportJob::exec( const TQByteArray & keyData ) { setup( keyData ); return mCtx->importKeys( *mInData ); } diff --git a/certmanager/lib/backends/qgpgme/qgpgmeimportjob.h b/certmanager/lib/backends/qgpgme/qgpgmeimportjob.h index 8c2ee1ad4..f9b208398 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeimportjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmeimportjob.h @@ -37,7 +37,7 @@ #include "qgpgmejob.h" -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -53,10 +53,10 @@ namespace Kleo { ~QGpgMEImportJob(); /*! \reimp from ImportJob */ - GpgME::Error start( const QByteArray & keyData ); + GpgME::Error start( const TQByteArray & keyData ); /*! \reimp from ImportJob */ - GpgME::ImportResult exec( const QByteArray & keyData ); + GpgME::ImportResult exec( const TQByteArray & keyData ); private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { @@ -65,7 +65,7 @@ namespace Kleo { private: void doOperationDoneEvent( const GpgME::Error & e ); - void setup( const QByteArray & ); + void setup( const TQByteArray & ); }; } diff --git a/certmanager/lib/backends/qgpgme/qgpgmejob.cpp b/certmanager/lib/backends/qgpgme/qgpgmejob.cpp index 897e5ff7c..72f9f77ff 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmejob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmejob.cpp @@ -49,8 +49,8 @@ #include <klocale.h> #include <kstandarddirs.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <algorithm> @@ -95,8 +95,8 @@ Kleo::QGpgMEJob::QGpgMEJob( Kleo::Job * _this, GpgME::Context * context ) { InvarianceChecker check( this ); assert( context ); - QObject::connect( QGpgME::EventLoopInteractor::instance(), SIGNAL(aboutToDestroy()), - _this, SLOT(slotCancel()) ); + TQObject::connect( QGpgME::EventLoopInteractor::instance(), TQT_SIGNAL(aboutToDestroy()), + _this, TQT_SLOT(slotCancel()) ); context->setProgressProvider( this ); // (mmutz) work around a gpgme bug in versions at least <= 0.9.0. // These versions will return GPG_ERR_NOT_IMPLEMENTED from @@ -151,19 +151,19 @@ void Kleo::QGpgMEJob::deleteAllPatterns() { void Kleo::QGpgMEJob::hookupContextToEventLoopInteractor() { mCtx->setManagedByEventLoopInteractor( true ); - QObject::connect( QGpgME::EventLoopInteractor::instance(), - SIGNAL(operationDoneEventSignal(GpgME::Context*,const GpgME::Error&)), - mThis, SLOT(slotOperationDoneEvent(GpgME::Context*,const GpgME::Error&)) ); + TQObject::connect( QGpgME::EventLoopInteractor::instance(), + TQT_SIGNAL(operationDoneEventSignal(GpgME::Context*,const GpgME::Error&)), + mThis, TQT_SLOT(slotOperationDoneEvent(GpgME::Context*,const GpgME::Error&)) ); } -void Kleo::QGpgMEJob::setPatterns( const QStringList & sl, bool allowEmpty ) { +void Kleo::QGpgMEJob::setPatterns( const TQStringList & sl, bool allowEmpty ) { InvarianceChecker check( this ); deleteAllPatterns(); // create a new null-terminated C array of char* from patterns: mPatterns = new const char*[ sl.size() + 1 ]; const char* * pat_it = mPatterns; mNumPatterns = 0; - for ( QStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it ) { + for ( TQStringList::const_iterator it = sl.begin() ; it != sl.end() ; ++it ) { if ( (*it).isNull() ) continue; if ( (*it).isEmpty() && !allowEmpty ) @@ -222,7 +222,7 @@ GpgME::Error Kleo::QGpgMEJob::setSigningKeys( const std::vector<GpgME::Key> & si return 0; } -void Kleo::QGpgMEJob::createInData( const QByteArray & in ) { +void Kleo::QGpgMEJob::createInData( const TQByteArray & in ) { mInDataDataProvider = new QGpgME::QByteArrayDataProvider( in ); mInData = new GpgME::Data( mInDataDataProvider ); assert( !mInData->isNull() ); @@ -236,16 +236,16 @@ void Kleo::QGpgMEJob::createOutData() { static const unsigned int GetAuditLogFlags = GpgME::Context::AuditLogWithHelp|GpgME::Context::HtmlAuditLog; -static QString audit_log_as_html( GpgME::Context * ctx ) { +static TQString audit_log_as_html( GpgME::Context * ctx ) { if ( !ctx ) - return QString(); + return TQString(); QGpgME::QByteArrayDataProvider dp; GpgME::Data data( &dp ); assert( !data.isNull() ); if ( const GpgME::Error err = ctx->getAuditLog( data, GetAuditLogFlags ) ) - return QString(); + return TQString(); else - return QString::fromUtf8( dp.data().data() ); + return TQString::fromUtf8( dp.data().data() ); } void Kleo::QGpgMEJob::doSlotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { @@ -272,14 +272,14 @@ void Kleo::QGpgMEJob::showProgress( const char * what, int type, int current, in char * Kleo::QGpgMEJob::getPassphrase( const char * useridHint, const char * /*description*/, bool previousWasBad, bool & canceled ) { // DF: here, description is the key fingerprint, twice, then "17 0". Not really descriptive. - // So I'm ignoring QString::fromLocal8Bit( description ) ) - QString msg = previousWasBad ? + // So I'm ignoring TQString::fromLocal8Bit( description ) ) + TQString msg = previousWasBad ? i18n( "You need a passphrase to unlock the secret key for user:<br/> %1 (retry)" ) : i18n( "You need a passphrase to unlock the secret key for user:<br/> %1" ); - msg = msg.arg( QString::fromUtf8( useridHint ) ) + "<br/><br/>"; + msg = msg.arg( TQString::fromUtf8( useridHint ) ) + "<br/><br/>"; msg.prepend( "<qt>" ); msg += i18n( "This dialog will reappear every time the passphrase is needed. For a more secure solution that also allows caching the passphrase, use gpg-agent." ) + "<br/>"; - const QString gpgAgent = KStandardDirs::findExe( "gpg-agent" ); + const TQString gpgAgent = KStandardDirs::findExe( "gpg-agent" ); if ( !gpgAgent.isEmpty() ) { msg += i18n( "gpg-agent was found in %1, but does not appear to be running." ) .arg( gpgAgent ); @@ -294,7 +294,7 @@ char * Kleo::QGpgMEJob::getPassphrase( const char * useridHint, const char * /*d msg += "<br/><br/>"; msg += i18n( "Enter passphrase:" ); Kleo::PassphraseDialog dlg( msg, i18n("Passphrase Dialog") ); - if ( dlg.exec() != QDialog::Accepted ) { + if ( dlg.exec() != TQDialog::Accepted ) { canceled = true; return 0; } diff --git a/certmanager/lib/backends/qgpgme/qgpgmejob.h b/certmanager/lib/backends/qgpgme/qgpgmejob.h index da7acf1c9..d35080a72 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmejob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmejob.h @@ -38,8 +38,8 @@ #include <gpgmepp/key.h> -#include <qcstring.h> -#include <qstring.h> +#include <tqcstring.h> +#include <tqstring.h> #include <vector> #include <kdepimmacros.h> @@ -88,7 +88,7 @@ namespace Kleo { /*! Hooks up mCtx to be managed by the event loop interactor */ void hookupContextToEventLoopInteractor(); /*! Fills mPatterns from the stringlist, resets chunking to the full list */ - void setPatterns( const QStringList & sl, bool allowEmpty=false ); + void setPatterns( const TQStringList & sl, bool allowEmpty=false ); /*! Returnes the number of patterns set */ unsigned int numPatterns() const { return mNumPatterns; } /*! Skips to the next chunk of patterns. @return patterns() */ @@ -103,7 +103,7 @@ namespace Kleo { void createOutData(); /*! Creates a GpgME::Data/QGpgME::QByteArrayDataProvider pair, filled with the contents of \a in */ - void createInData( const QByteArray & in ); + void createInData( const TQByteArray & in ); /*! Sets the list of signing keys */ GpgME::Error setSigningKeys( const std::vector<GpgME::Key> & signers ); /*! Call this to implement a slotOperationDoneEvent() */ @@ -116,10 +116,10 @@ namespace Kleo { // protected: - virtual void doEmitProgressSignal( const QString & what, int current, int total ) = 0; + virtual void doEmitProgressSignal( const TQString & what, int current, int total ) = 0; virtual void doEmitDoneSignal() = 0; void doSlotCancel(); - QString auditLogAsHtml() const { return mAuditLogAsHtml; } + TQString auditLogAsHtml() const { return mAuditLogAsHtml; } private: /*! \reimp from GpgME::ProgressProvider */ @@ -146,15 +146,15 @@ namespace Kleo { unsigned int mNumPatterns; unsigned int mChunkSize; unsigned int mPatternStartIndex, mPatternEndIndex; - QString mAuditLogAsHtml; + TQString mAuditLogAsHtml; }; } #define make_slot_cancel private: void slotCancel() { QGpgMEJob::doSlotCancel(); } -#define make_progress_emitter private: void doEmitProgressSignal( const QString & what, int cur, int tot ) { emit progress( what, cur, tot ); } +#define make_progress_emitter private: void doEmitProgressSignal( const TQString & what, int cur, int tot ) { emit progress( what, cur, tot ); } #define make_done_emitter private: void doEmitDoneSignal() { emit done(); } -#define make_auditLogAsHtml private: QString auditLogAsHtml() const { return QGpgMEJob::auditLogAsHtml(); } +#define make_auditLogAsHtml private: TQString auditLogAsHtml() const { return QGpgMEJob::auditLogAsHtml(); } #define QGPGME_JOB make_slot_cancel make_progress_emitter make_done_emitter make_auditLogAsHtml #endif // __KLEO_QGPGMEJOB_H__ diff --git a/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.cpp index a0ab78f23..b226d6498 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.cpp @@ -59,7 +59,7 @@ Kleo::QGpgMEKeyGenerationJob::~QGpgMEKeyGenerationJob() { delete mPubKeyDataProvider; mPubKeyDataProvider = 0; } -GpgME::Error Kleo::QGpgMEKeyGenerationJob::start( const QString & parameters ) { +GpgME::Error Kleo::QGpgMEKeyGenerationJob::start( const TQString & parameters ) { assert( !mPubKey ); // set up empty data object for the public key data @@ -80,7 +80,7 @@ GpgME::Error Kleo::QGpgMEKeyGenerationJob::start( const QString & parameters ) { } void Kleo::QGpgMEKeyGenerationJob::doOperationDoneEvent( const GpgME::Error & ) { - emit result( mCtx->keyGenerationResult(), mPubKeyDataProvider ? mPubKeyDataProvider->data() : QByteArray() ); + emit result( mCtx->keyGenerationResult(), mPubKeyDataProvider ? mPubKeyDataProvider->data() : TQByteArray() ); } #include "qgpgmekeygenerationjob.moc" diff --git a/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.h b/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.h index 973aeb12d..bf99007fc 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmekeygenerationjob.h @@ -58,7 +58,7 @@ namespace Kleo { ~QGpgMEKeyGenerationJob(); /*! \reimp from KeygenerationJob */ - GpgME::Error start( const QString & parameters ); + GpgME::Error start( const TQString & parameters ); private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & error ) { diff --git a/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.cpp index 9c87e3ef6..9e663e92d 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.cpp @@ -47,7 +47,7 @@ #include <klocale.h> #include <kdebug.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <algorithm> @@ -66,20 +66,20 @@ Kleo::QGpgMEKeyListJob::QGpgMEKeyListJob( GpgME::Context * context ) Kleo::QGpgMEKeyListJob::~QGpgMEKeyListJob() { } -void Kleo::QGpgMEKeyListJob::setup( const QStringList & pats, bool secretOnly ) { +void Kleo::QGpgMEKeyListJob::setup( const TQStringList & pats, bool secretOnly ) { assert( !patterns() ); mSecretOnly = secretOnly; setPatterns( pats ); } -GpgME::Error Kleo::QGpgMEKeyListJob::start( const QStringList & pats, bool secretOnly ) { +GpgME::Error Kleo::QGpgMEKeyListJob::start( const TQStringList & pats, bool secretOnly ) { setup( pats, secretOnly ); hookupContextToEventLoopInteractor(); connect( QGpgME::EventLoopInteractor::instance(), - SIGNAL(nextKeyEventSignal(GpgME::Context*,const GpgME::Key&)), - SLOT(slotNextKeyEvent(GpgME::Context*,const GpgME::Key&)) ); + TQT_SIGNAL(nextKeyEventSignal(GpgME::Context*,const GpgME::Key&)), + TQT_SLOT(slotNextKeyEvent(GpgME::Context*,const GpgME::Key&)) ); // The communication channel between gpgme and gpgsm is limited in // the number of patterns that can be transported, but they won't @@ -106,7 +106,7 @@ GpgME::Error Kleo::QGpgMEKeyListJob::start( const QStringList & pats, bool secre return 0; } -GpgME::KeyListResult Kleo::QGpgMEKeyListJob::exec( const QStringList & pats, bool secretOnly, std::vector<GpgME::Key> & keys ) { +GpgME::KeyListResult Kleo::QGpgMEKeyListJob::exec( const TQStringList & pats, bool secretOnly, std::vector<GpgME::Key> & keys ) { setup( pats, secretOnly ); // The communication channel between gpgme and gpgsm is limited in @@ -174,13 +174,13 @@ void Kleo::QGpgMEKeyListJob::slotOperationDoneEvent( GpgME::Context * context, c deleteLater(); } -void Kleo::QGpgMEKeyListJob::showErrorDialog( QWidget * parent, const QString & caption ) const { +void Kleo::QGpgMEKeyListJob::showErrorDialog( TQWidget * parent, const TQString & caption ) const { if ( !mResult.error() || mResult.error().isCanceled() ) return; - const QString msg = i18n( "<qt><p>An error occurred while fetching " + const TQString msg = i18n( "<qt><p>An error occurred while fetching " "the keys from the backend:</p>" "<p><b>%1</b></p></qt>" ) - .arg( QString::fromLocal8Bit( mResult.error().asString() ) ); + .arg( TQString::fromLocal8Bit( mResult.error().asString() ) ); KMessageBox::error( parent, msg, caption ); } diff --git a/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.h b/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.h index 8320e0134..0bc84c08c 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmekeylistjob.h @@ -54,13 +54,13 @@ namespace Kleo { ~QGpgMEKeyListJob(); /*! \reimp from KeyListJob */ - GpgME::Error start( const QStringList & patterns, bool secretOnly ); + GpgME::Error start( const TQStringList & patterns, bool secretOnly ); /*! \reimp from KeyListJob */ - GpgME::KeyListResult exec( const QStringList & patterns, bool secretOnly, std::vector<GpgME::Key> & keys ); + GpgME::KeyListResult exec( const TQStringList & patterns, bool secretOnly, std::vector<GpgME::Key> & keys ); /*! \reimp from Job */ - void showErrorDialog( QWidget * parent, const QString & caption ) const; + void showErrorDialog( TQWidget * parent, const TQString & caption ) const; private slots: void slotNextKeyEvent( GpgME::Context * context, const GpgME::Key & key ); @@ -68,7 +68,7 @@ namespace Kleo { private: void doOperationDoneEvent( const GpgME::Error &) {} // unused, we implement slotOperationDoneEvent ourselves. - void setup( const QStringList &, bool ); + void setup( const TQStringList &, bool ); GpgME::KeyListResult attemptSyncKeyListing( std::vector<GpgME::Key> & ); private: diff --git a/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.cpp b/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.cpp index 3b6ae35eb..6cb71dbad 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.cpp @@ -38,7 +38,7 @@ #include <klocale.h> -#include <qstring.h> +#include <tqstring.h> #include <assert.h> #include <map> @@ -108,13 +108,13 @@ Kleo::QGpgMEProgressTokenMapper::~QGpgMEProgressTokenMapper() { mSelf = 0; } -typedef std::map< QString, std::map<int,Desc> > Map; +typedef std::map< TQString, std::map<int,Desc> > Map; static const Map & makeMap() { // return a reference to a static to avoid copying static Map map; for ( unsigned int i = 0 ; i < sizeof tokens / sizeof *tokens ; ++i ) { assert( tokens[i].token ); - const QString token = QString::fromLatin1( tokens[i].token ).lower(); + const TQString token = TQString::fromLatin1( tokens[i].token ).lower(); for ( unsigned int j = 0 ; j < tokens[i].numDesc ; ++j ) { const Desc & desc = tokens[i].desc[j]; assert( desc.display ); @@ -124,19 +124,19 @@ static const Map & makeMap() { // return a reference to a static to avoid copyin return map; } -QString Kleo::QGpgMEProgressTokenMapper::map( const char * tokenUtf8, int subtoken, int cur, int tot ) const { +TQString Kleo::QGpgMEProgressTokenMapper::map( const char * tokenUtf8, int subtoken, int cur, int tot ) const { if ( !tokenUtf8 || !*tokenUtf8 ) - return QString::null; + return TQString::null; if ( qstrcmp( tokenUtf8, "file:" ) == 0 ) - return QString::null; // gpgme's job + return TQString::null; // gpgme's job - return map( QString::fromUtf8( tokenUtf8 ), subtoken, cur, tot ); + return map( TQString::fromUtf8( tokenUtf8 ), subtoken, cur, tot ); } -QString Kleo::QGpgMEProgressTokenMapper::map( const QString & token, int subtoken, int cur, int tot ) const { +TQString Kleo::QGpgMEProgressTokenMapper::map( const TQString & token, int subtoken, int cur, int tot ) const { if ( token.startsWith( "file:" ) ) - return QString::null; // gpgme's job + return TQString::null; // gpgme's job static const Map & tokenMap = makeMap(); @@ -149,7 +149,7 @@ QString Kleo::QGpgMEProgressTokenMapper::map( const QString & token, int subtoke if ( it2 == it1->second.end() ) return token; const Desc & desc = it2->second; - QString result = i18n( desc.display ); + TQString result = i18n( desc.display ); if ( desc.useCur ) result = result.arg( cur ); if ( desc.useTot ) diff --git a/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.h b/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.h index d0a8da6c3..2d62f0ca5 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.h +++ b/certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.h @@ -45,8 +45,8 @@ namespace Kleo { public: static const QGpgMEProgressTokenMapper * instance(); - QString map( const char * token, int subtoken, int current, int total ) const; - QString map( const QString & token, int subtoken, int current, int total ) const; + TQString map( const char * token, int subtoken, int current, int total ) const; + TQString map( const TQString & token, int subtoken, int current, int total ) const; private: static QGpgMEProgressTokenMapper * mSelf; diff --git a/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp index 325306e8c..911afcd63 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp @@ -45,7 +45,7 @@ #include <qgpgme/eventloopinteractor.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <gpg-error.h> @@ -63,7 +63,7 @@ Kleo::QGpgMERefreshKeysJob::~QGpgMERefreshKeysJob() { } -GpgME::Error Kleo::QGpgMERefreshKeysJob::start( const QStringList & patterns ) { +GpgME::Error Kleo::QGpgMERefreshKeysJob::start( const TQStringList & patterns ) { assert( mPatternsToDo.empty() ); mPatternsToDo = patterns; @@ -94,7 +94,7 @@ GpgME::Error Kleo::QGpgMERefreshKeysJob::startAProcess() { strlen("--with-validation") + 1 + strlen("--force-crl-refresh") + 1 + strlen("--enable-crl-checks") + 1; while ( !mPatternsToDo.empty() ) { - const QCString pat = mPatternsToDo.front().utf8().stripWhiteSpace(); + const TQCString pat = mPatternsToDo.front().utf8().stripWhiteSpace(); const unsigned int patLength = pat.length(); if ( patLength >= commandLineLength ) break; @@ -107,12 +107,12 @@ GpgME::Error Kleo::QGpgMERefreshKeysJob::startAProcess() { mProcess->setUseStatusFD( true ); - connect( mProcess, SIGNAL(processExited(KProcess*)), - SLOT(slotProcessExited(KProcess*)) ); - connect( mProcess, SIGNAL(receivedStderr(KProcess*,char*,int)), - SLOT(slotStderr(KProcess*,char*,int)) ); - connect( mProcess, SIGNAL(status(Kleo::GnuPGProcessBase*,const QString&,const QStringList&)), - SLOT(slotStatus(Kleo::GnuPGProcessBase*,const QString&,const QStringList&)) ); + connect( mProcess, TQT_SIGNAL(processExited(KProcess*)), + TQT_SLOT(slotProcessExited(KProcess*)) ); + connect( mProcess, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), + TQT_SLOT(slotStderr(KProcess*,char*,int)) ); + connect( mProcess, TQT_SIGNAL(status(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)), + TQT_SLOT(slotStatus(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)) ); if ( !mProcess->start( KProcess::NotifyOnExit, KProcess::Stderr ) ) { mError = gpg_err_make( GPG_ERR_SOURCE_GPGSM, GPG_ERR_ENOENT ); // what else? @@ -129,10 +129,10 @@ void Kleo::QGpgMERefreshKeysJob::slotCancel() { mError = gpg_err_make( GPG_ERR_SOURCE_GPGSM, GPG_ERR_CANCELED ); } -void Kleo::QGpgMERefreshKeysJob::slotStatus( GnuPGProcessBase * proc, const QString & type, const QStringList & args ) { +void Kleo::QGpgMERefreshKeysJob::slotStatus( GnuPGProcessBase * proc, const TQString & type, const TQStringList & args ) { if ( proc != mProcess ) return; - QStringList::const_iterator it = args.begin(); + TQStringList::const_iterator it = args.begin(); bool ok = false; if ( type == "ERROR" ) { @@ -163,7 +163,7 @@ void Kleo::QGpgMERefreshKeysJob::slotStatus( GnuPGProcessBase * proc, const QStr kdDebug( 5150 ) << "Kleo::QGpgMERefreshKeysJob::slotStatus() not recognising PROGRESS with < 4 args!" << endl; return; } - const QString what = *++it; + const TQString what = *++it; ++it; // don't use "type"... const int cur = (*++it).toInt( &ok ); if ( !ok ) { diff --git a/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.h b/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.h index a0132f223..7ed476866 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.h @@ -35,7 +35,7 @@ #include <kleo/refreshkeysjob.h> -#include <qstringlist.h> +#include <tqstringlist.h> namespace Kleo { class GnuPGProcessBase; @@ -56,13 +56,13 @@ namespace Kleo { ~QGpgMERefreshKeysJob(); /*! \reimp from RefreshKeysJob */ - GpgME::Error start( const QStringList & patterns ); + GpgME::Error start( const TQStringList & patterns ); private slots: /*! \reimp from Job */ void slotCancel(); - void slotStatus( Kleo::GnuPGProcessBase *, const QString &, const QStringList & ); + void slotStatus( Kleo::GnuPGProcessBase *, const TQString &, const TQStringList & ); void slotStderr( KProcess *, char *, int ); void slotProcessExited( KProcess * ); @@ -72,7 +72,7 @@ namespace Kleo { private: GnuPGProcessBase * mProcess; int mError; - QStringList mPatternsToDo; + TQStringList mPatternsToDo; }; } diff --git a/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp index 0ce543cf9..aeb7b010e 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp @@ -46,14 +46,14 @@ #include <qgpgme/eventloopinteractor.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <gpg-error.h> #include <string.h> #include <assert.h> -Kleo::QGpgMESecretKeyExportJob::QGpgMESecretKeyExportJob( bool armour, const QString& charset ) +Kleo::QGpgMESecretKeyExportJob::QGpgMESecretKeyExportJob( bool armour, const TQString& charset ) : ExportJob( QGpgME::EventLoopInteractor::instance(), "Kleo::QGpgMESecretKeyExportJob" ), mProcess( 0 ), mError( 0 ), @@ -67,7 +67,7 @@ Kleo::QGpgMESecretKeyExportJob::~QGpgMESecretKeyExportJob() { } -GpgME::Error Kleo::QGpgMESecretKeyExportJob::start( const QStringList & patterns ) { +GpgME::Error Kleo::QGpgMESecretKeyExportJob::start( const TQStringList & patterns ) { assert( mKeyData.isEmpty() ); if ( patterns.size() != 1 || patterns.front().isEmpty() ) { @@ -88,14 +88,14 @@ GpgME::Error Kleo::QGpgMESecretKeyExportJob::start( const QStringList & patterns mProcess->setUseStatusFD( true ); - connect( mProcess, SIGNAL(processExited(KProcess*)), - SLOT(slotProcessExited(KProcess*)) ); - connect( mProcess, SIGNAL(receivedStdout(KProcess*,char*,int)), - SLOT(slotStdout(KProcess*,char*,int)) ); - connect( mProcess, SIGNAL(receivedStderr(KProcess*,char*,int)), - SLOT(slotStderr(KProcess*,char*,int)) ); - connect( mProcess, SIGNAL(status(Kleo::GnuPGProcessBase*,const QString&,const QStringList&)), - SLOT(slotStatus(Kleo::GnuPGProcessBase*,const QString&,const QStringList&)) ); + connect( mProcess, TQT_SIGNAL(processExited(KProcess*)), + TQT_SLOT(slotProcessExited(KProcess*)) ); + connect( mProcess, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), + TQT_SLOT(slotStdout(KProcess*,char*,int)) ); + connect( mProcess, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)), + TQT_SLOT(slotStderr(KProcess*,char*,int)) ); + connect( mProcess, TQT_SIGNAL(status(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)), + TQT_SLOT(slotStatus(Kleo::GnuPGProcessBase*,const TQString&,const TQStringList&)) ); if ( !mProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { mError = gpg_err_make( GPG_ERR_SOURCE_GPGSM, GPG_ERR_ENOENT ); // what else? @@ -112,10 +112,10 @@ void Kleo::QGpgMESecretKeyExportJob::slotCancel() { mError = gpg_err_make( GPG_ERR_SOURCE_GPGSM, GPG_ERR_CANCELED ); } -void Kleo::QGpgMESecretKeyExportJob::slotStatus( GnuPGProcessBase * proc, const QString & type, const QStringList & args ) { +void Kleo::QGpgMESecretKeyExportJob::slotStatus( GnuPGProcessBase * proc, const TQString & type, const TQStringList & args ) { if ( proc != mProcess ) return; - QStringList::const_iterator it = args.begin(); + TQStringList::const_iterator it = args.begin(); bool ok = false; if ( type == "ERROR" ) { @@ -146,7 +146,7 @@ void Kleo::QGpgMESecretKeyExportJob::slotStatus( GnuPGProcessBase * proc, const kdDebug( 5150 ) << "Kleo::QGpgMESecretKeyExportJob::slotStatus() not recognising PROGRESS with < 4 args!" << endl; return; } - const QString what = *++it; + const TQString what = *++it; ++it; // don't use "type"... const int cur = (*++it).toInt( &ok ); if ( !ok ) { diff --git a/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.h b/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.h index 5f5e3b69c..50d42c3ce 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.h @@ -35,7 +35,7 @@ #include <kleo/exportjob.h> -#include <qcstring.h> +#include <tqcstring.h> namespace Kleo { class GnuPGProcessBase; @@ -57,27 +57,27 @@ namespace Kleo { class QGpgMESecretKeyExportJob : public ExportJob { Q_OBJECT public: - QGpgMESecretKeyExportJob( bool armour, const QString& charset ); + QGpgMESecretKeyExportJob( bool armour, const TQString& charset ); ~QGpgMESecretKeyExportJob(); /*! \reimp from ExportJob */ - GpgME::Error start( const QStringList & patterns ); + GpgME::Error start( const TQStringList & patterns ); private slots: /*! \reimp from Job */ void slotCancel(); - void slotStatus( Kleo::GnuPGProcessBase *, const QString &, const QStringList & ); + void slotStatus( Kleo::GnuPGProcessBase *, const TQString &, const TQStringList & ); void slotStdout( KProcess *, char *, int ); void slotStderr( KProcess *, char *, int ); void slotProcessExited( KProcess * ); private: GnuPGProcessBase * mProcess; - QByteArray mKeyData; + TQByteArray mKeyData; int mError; bool mArmour; - QString mCharset; + TQString mCharset; }; } diff --git a/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.cpp index fae748478..bc05eb86c 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.cpp @@ -60,7 +60,7 @@ Kleo::QGpgMESignEncryptJob::~QGpgMESignEncryptJob() { } GpgME::Error Kleo::QGpgMESignEncryptJob::setup( const std::vector<GpgME::Key> & signers, - const QByteArray & plainText ) { + const TQByteArray & plainText ) { assert( !mInData ); assert( !mOutData ); @@ -72,7 +72,7 @@ GpgME::Error Kleo::QGpgMESignEncryptJob::setup( const std::vector<GpgME::Key> & GpgME::Error Kleo::QGpgMESignEncryptJob::start( const std::vector<GpgME::Key> & signers, const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, bool alwaysTrust ) { + const TQByteArray & plainText, bool alwaysTrust ) { if ( const GpgME::Error error = setup( signers, plainText ) ) { deleteLater(); return error; @@ -94,8 +94,8 @@ GpgME::Error Kleo::QGpgMESignEncryptJob::start( const std::vector<GpgME::Key> & std::pair<GpgME::SigningResult,GpgME::EncryptionResult> Kleo::QGpgMESignEncryptJob::exec( const std::vector<GpgME::Key> & signers, const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, bool alwaysTrust, - QByteArray & cipherText ) { + const TQByteArray & plainText, bool alwaysTrust, + TQByteArray & cipherText ) { if ( GpgME::Error err = setup( signers, plainText ) ) return std::make_pair( GpgME::SigningResult( 0, err ), GpgME::EncryptionResult() ); const GpgME::Context::EncryptionFlags flags = @@ -112,7 +112,7 @@ void Kleo::QGpgMESignEncryptJob::doOperationDoneEvent( const GpgME::Error & ) { emit result( mResult.first, mResult.second, mOutDataDataProvider->data() ); } -void Kleo::QGpgMESignEncryptJob::showErrorDialog( QWidget * parent, const QString & caption ) const { +void Kleo::QGpgMESignEncryptJob::showErrorDialog( TQWidget * parent, const TQString & caption ) const { if ( mResult.first.error() && !mResult.first.error().isCanceled() || mResult.second.error() && !mResult.second.error().isCanceled() ) Kleo::MessageBox::error( parent, mResult.first, mResult.second, this, caption ); diff --git a/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.h b/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.h index a826edcbf..003377cfe 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmesignencryptjob.h @@ -40,7 +40,7 @@ #include <gpgmepp/signingresult.h> #include <gpgmepp/encryptionresult.h> -#include <qcstring.h> +#include <tqcstring.h> #include <utility> @@ -62,16 +62,16 @@ namespace Kleo { /*! \reimp from SignEncryptJob */ GpgME::Error start( const std::vector<GpgME::Key> & signers, const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, bool alwaysTrust ); + const TQByteArray & plainText, bool alwaysTrust ); std::pair<GpgME::SigningResult,GpgME::EncryptionResult> exec( const std::vector<GpgME::Key> & signers, const std::vector<GpgME::Key> & recipients, - const QByteArray & plainText, bool alwaysTrust, - QByteArray & cipherText ); + const TQByteArray & plainText, bool alwaysTrust, + TQByteArray & cipherText ); /*! \reimp from Job */ - void showErrorDialog( QWidget * parent, const QString & caption ) const; + void showErrorDialog( TQWidget * parent, const TQString & caption ) const; private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { @@ -81,7 +81,7 @@ namespace Kleo { private: void doOperationDoneEvent( const GpgME::Error & e ); GpgME::Error setup( const std::vector<GpgME::Key> &, - const QByteArray & ); + const TQByteArray & ); private: std::pair<GpgME::SigningResult,GpgME::EncryptionResult> mResult; }; diff --git a/certmanager/lib/backends/qgpgme/qgpgmesignjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmesignjob.cpp index 84485ad5b..0042d6a38 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmesignjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmesignjob.cpp @@ -61,7 +61,7 @@ Kleo::QGpgMESignJob::~QGpgMESignJob() { } GpgME::Error Kleo::QGpgMESignJob::setup( const std::vector<GpgME::Key> & signers, - const QByteArray & plainText ) { + const TQByteArray & plainText ) { assert( !mInData ); assert( !mOutData ); @@ -72,7 +72,7 @@ GpgME::Error Kleo::QGpgMESignJob::setup( const std::vector<GpgME::Key> & signers } GpgME::Error Kleo::QGpgMESignJob::start( const std::vector<GpgME::Key> & signers, - const QByteArray & plainText, + const TQByteArray & plainText, GpgME::Context::SignatureMode mode ) { if ( const GpgME::Error error = setup( signers, plainText ) ) { deleteLater(); @@ -90,9 +90,9 @@ GpgME::Error Kleo::QGpgMESignJob::start( const std::vector<GpgME::Key> & signers } GpgME::SigningResult Kleo::QGpgMESignJob::exec( const std::vector<GpgME::Key> & signers, - const QByteArray & plainText, + const TQByteArray & plainText, GpgME::Context::SignatureMode mode, - QByteArray & signature ) { + TQByteArray & signature ) { if ( const GpgME::Error err = setup( signers, plainText ) ) return mResult = GpgME::SigningResult( 0, err ); mResult = mCtx->sign( *mInData, *mOutData, mode ); @@ -105,7 +105,7 @@ void Kleo::QGpgMESignJob::doOperationDoneEvent( const GpgME::Error & ) { emit result( mResult = mCtx->signingResult(), mOutDataDataProvider->data() ); } -void Kleo::QGpgMESignJob::showErrorDialog( QWidget * parent, const QString & caption ) const { +void Kleo::QGpgMESignJob::showErrorDialog( TQWidget * parent, const TQString & caption ) const { if ( mResult.error() && !mResult.error().isCanceled() ) Kleo::MessageBox::error( parent, mResult, this, caption ); } diff --git a/certmanager/lib/backends/qgpgme/qgpgmesignjob.h b/certmanager/lib/backends/qgpgme/qgpgmesignjob.h index c2589b477..6034b542b 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmesignjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmesignjob.h @@ -39,7 +39,7 @@ #include <gpgmepp/signingresult.h> -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -57,17 +57,17 @@ namespace Kleo { /*! \reimp from SignJob */ GpgME::Error start( const std::vector<GpgME::Key> & signers, - const QByteArray & plainText, + const TQByteArray & plainText, GpgME::Context::SignatureMode mode ); /*! \reimp from SignJob */ GpgME::SigningResult exec( const std::vector<GpgME::Key> & signers, - const QByteArray & plainText, + const TQByteArray & plainText, GpgME::Context::SignatureMode mode, - QByteArray & signature ); + TQByteArray & signature ); /*! \reimp from Job */ - void showErrorDialog( QWidget * parent, const QString & caption ) const; + void showErrorDialog( TQWidget * parent, const TQString & caption ) const; private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { @@ -76,7 +76,7 @@ namespace Kleo { private: void doOperationDoneEvent( const GpgME::Error & e ); - GpgME::Error setup( const std::vector<GpgME::Key> &, const QByteArray & ); + GpgME::Error setup( const std::vector<GpgME::Key> &, const TQByteArray & ); private: GpgME::SigningResult mResult; diff --git a/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.cpp b/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.cpp index cc1186373..b1022f61b 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.cpp @@ -55,7 +55,7 @@ Kleo::QGpgMEVerifyDetachedJob::QGpgMEVerifyDetachedJob( GpgME::Context * context Kleo::QGpgMEVerifyDetachedJob::~QGpgMEVerifyDetachedJob() { } -void Kleo::QGpgMEVerifyDetachedJob::setup( const QByteArray & signature, const QByteArray & signedData ) { +void Kleo::QGpgMEVerifyDetachedJob::setup( const TQByteArray & signature, const TQByteArray & signedData ) { assert( !mInData ); assert( !mOutData ); @@ -67,8 +67,8 @@ void Kleo::QGpgMEVerifyDetachedJob::setup( const QByteArray & signature, const Q assert( !mOutData->isNull() ); } -GpgME::Error Kleo::QGpgMEVerifyDetachedJob::start( const QByteArray & signature, - const QByteArray & signedData ) { +GpgME::Error Kleo::QGpgMEVerifyDetachedJob::start( const TQByteArray & signature, + const TQByteArray & signedData ) { setup( signature, signedData ); hookupContextToEventLoopInteractor(); @@ -80,8 +80,8 @@ GpgME::Error Kleo::QGpgMEVerifyDetachedJob::start( const QByteArray & signature, return err; } -GpgME::VerificationResult Kleo::QGpgMEVerifyDetachedJob::exec( const QByteArray & signature, - const QByteArray & signedData ) { +GpgME::VerificationResult Kleo::QGpgMEVerifyDetachedJob::exec( const TQByteArray & signature, + const TQByteArray & signedData ) { setup( signature, signedData ); const GpgME::VerificationResult r = mCtx->verifyDetachedSignature( *mInData, *mOutData ); getAuditLog(); diff --git a/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.h b/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.h index 76141fb80..4e353fe22 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmeverifydetachedjob.h @@ -37,7 +37,7 @@ #include "qgpgmejob.h" -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -53,12 +53,12 @@ namespace Kleo { ~QGpgMEVerifyDetachedJob(); /*! \reimp from VerifyDetachedJob */ - GpgME::Error start( const QByteArray & signature, - const QByteArray & signedData ); + GpgME::Error start( const TQByteArray & signature, + const TQByteArray & signedData ); /*! \reimp from VerifyDetachedJob */ - GpgME::VerificationResult exec( const QByteArray & signature, - const QByteArray & signedData ); + GpgME::VerificationResult exec( const TQByteArray & signature, + const TQByteArray & signedData ); private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { @@ -67,7 +67,7 @@ namespace Kleo { private: void doOperationDoneEvent( const GpgME::Error & e ); - void setup( const QByteArray &, const QByteArray & ); + void setup( const TQByteArray &, const TQByteArray & ); }; } diff --git a/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.cpp b/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.cpp index 15f075963..92e1917b7 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.cpp +++ b/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.cpp @@ -55,7 +55,7 @@ Kleo::QGpgMEVerifyOpaqueJob::QGpgMEVerifyOpaqueJob( GpgME::Context * context ) Kleo::QGpgMEVerifyOpaqueJob::~QGpgMEVerifyOpaqueJob() { } -void Kleo::QGpgMEVerifyOpaqueJob::setup( const QByteArray & signedData ) { +void Kleo::QGpgMEVerifyOpaqueJob::setup( const TQByteArray & signedData ) { assert( !mInData ); assert( !mOutData ); @@ -63,7 +63,7 @@ void Kleo::QGpgMEVerifyOpaqueJob::setup( const QByteArray & signedData ) { createOutData(); } -GpgME::Error Kleo::QGpgMEVerifyOpaqueJob::start( const QByteArray & signedData ) { +GpgME::Error Kleo::QGpgMEVerifyOpaqueJob::start( const TQByteArray & signedData ) { setup( signedData ); hookupContextToEventLoopInteractor(); @@ -75,7 +75,7 @@ GpgME::Error Kleo::QGpgMEVerifyOpaqueJob::start( const QByteArray & signedData ) return err; } -GpgME::VerificationResult Kleo::QGpgMEVerifyOpaqueJob::exec( const QByteArray & signedData, QByteArray & plainText ) { +GpgME::VerificationResult Kleo::QGpgMEVerifyOpaqueJob::exec( const TQByteArray & signedData, TQByteArray & plainText ) { setup( signedData ); const GpgME::VerificationResult res = mCtx->verifyOpaqueSignature( *mInData, *mOutData ); plainText = mOutDataDataProvider->data(); diff --git a/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.h b/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.h index 2c167fb1d..869024f2c 100644 --- a/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.h +++ b/certmanager/lib/backends/qgpgme/qgpgmeverifyopaquejob.h @@ -37,7 +37,7 @@ #include "qgpgmejob.h" -#include <qcstring.h> +#include <tqcstring.h> namespace GpgME { class Error; @@ -53,10 +53,10 @@ namespace Kleo { ~QGpgMEVerifyOpaqueJob(); /*! \reimp from VerifyOpaqueJob */ - GpgME::Error start( const QByteArray & signedData ); + GpgME::Error start( const TQByteArray & signedData ); /*! \reimp form VerifyOpaqueJob */ - GpgME::VerificationResult exec( const QByteArray & signedData, QByteArray & plainData ); + GpgME::VerificationResult exec( const TQByteArray & signedData, TQByteArray & plainData ); private slots: void slotOperationDoneEvent( GpgME::Context * context, const GpgME::Error & e ) { @@ -65,7 +65,7 @@ namespace Kleo { private: void doOperationDoneEvent( const GpgME::Error & e ); - void setup( const QByteArray & ); + void setup( const TQByteArray & ); }; } |