summaryrefslogtreecommitdiffstats
path: root/certmanager/lib/backends/chiasmus
diff options
context:
space:
mode:
Diffstat (limited to 'certmanager/lib/backends/chiasmus')
-rw-r--r--certmanager/lib/backends/chiasmus/chiasmusbackend.cpp168
-rw-r--r--certmanager/lib/backends/chiasmus/chiasmusbackend.h12
-rw-r--r--certmanager/lib/backends/chiasmus/chiasmusjob.cpp28
-rw-r--r--certmanager/lib/backends/chiasmus/chiasmusjob.h34
-rw-r--r--certmanager/lib/backends/chiasmus/chiasmuslibrary.cpp12
-rw-r--r--certmanager/lib/backends/chiasmus/chiasmuslibrary.h8
-rw-r--r--certmanager/lib/backends/chiasmus/obtainkeysjob.cpp26
-rw-r--r--certmanager/lib/backends/chiasmus/obtainkeysjob.h16
-rw-r--r--certmanager/lib/backends/chiasmus/symcryptrunprocessbase.cpp28
-rw-r--r--certmanager/lib/backends/chiasmus/symcryptrunprocessbase.h22
10 files changed, 177 insertions, 177 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;
};
}