summaryrefslogtreecommitdiffstats
path: root/certmanager/lib/kleo/dn.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'certmanager/lib/kleo/dn.cpp')
-rw-r--r--certmanager/lib/kleo/dn.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/certmanager/lib/kleo/dn.cpp b/certmanager/lib/kleo/dn.cpp
index 9ba2209fb..61693aff2 100644
--- a/certmanager/lib/kleo/dn.cpp
+++ b/certmanager/lib/kleo/dn.cpp
@@ -43,8 +43,8 @@
#include <kconfig.h>
#include <klocale.h>
-#include <qstringlist.h>
-#include <qvaluevector.h>
+#include <tqstringlist.h>
+#include <tqvaluevector.h>
#include <iostream>
#include <iterator>
@@ -230,9 +230,9 @@ parse_dn_part (DnPair *array, const unsigned char *string)
static Kleo::DN::Attribute::List
parse_dn( const unsigned char * string ) {
if ( !string )
- return QValueVector<Kleo::DN::Attribute>();
+ return TQValueVector<Kleo::DN::Attribute>();
- QValueVector<Kleo::DN::Attribute> result;
+ TQValueVector<Kleo::DN::Attribute> result;
while (*string)
{
while (*string == ' ')
@@ -245,8 +245,8 @@ parse_dn( const unsigned char * string ) {
if (!string)
goto failure;
if ( pair.key && pair.value )
- result.push_back( Kleo::DN::Attribute( QString::fromUtf8( pair.key ),
- QString::fromUtf8( pair.value ) ) );
+ result.push_back( Kleo::DN::Attribute( TQString::fromUtf8( pair.key ),
+ TQString::fromUtf8( pair.value ) ) );
free( pair.key );
free( pair.value );
@@ -260,18 +260,18 @@ parse_dn( const unsigned char * string ) {
return result;
failure:
- return QValueVector<Kleo::DN::Attribute>();
+ return TQValueVector<Kleo::DN::Attribute>();
}
-static QValueVector<Kleo::DN::Attribute>
-parse_dn( const QString & dn ) {
+static TQValueVector<Kleo::DN::Attribute>
+parse_dn( const TQString & dn ) {
return parse_dn( (const unsigned char*)dn.utf8().data() );
}
-static QString dn_escape( const QString & s ) {
- QString result;
+static TQString dn_escape( const TQString & s ) {
+ TQString result;
for ( unsigned int i = 0, end = s.length() ; i != end ; ++i ) {
- const QChar ch = s[i];
+ const TQChar ch = s[i];
switch ( ch.unicode() ) {
case ',':
case '+':
@@ -290,9 +290,9 @@ static QString dn_escape( const QString & s ) {
}
static QString
-serialise( const QValueVector<Kleo::DN::Attribute> & dn ) {
- QStringList result;
- for ( QValueVector<Kleo::DN::Attribute>::const_iterator it = dn.begin() ; it != dn.end() ; ++it )
+serialise( const TQValueVector<Kleo::DN::Attribute> & dn ) {
+ TQStringList result;
+ for ( TQValueVector<Kleo::DN::Attribute>::const_iterator it = dn.begin() ; it != dn.end() ; ++it )
if ( !(*it).name().isEmpty() && !(*it).value().isEmpty() )
result.push_back( (*it).name().stripWhiteSpace() + '=' + dn_escape( (*it).value().stripWhiteSpace() ) );
return result.join( "," );
@@ -300,7 +300,7 @@ serialise( const QValueVector<Kleo::DN::Attribute> & dn ) {
static Kleo::DN::Attribute::List
reorder_dn( const Kleo::DN::Attribute::List & dn ) {
- const QStringList & attrOrder = Kleo::DNAttributeMapper::instance()->attributeOrder();
+ const TQStringList & attrOrder = Kleo::DNAttributeMapper::instance()->attributeOrder();
Kleo::DN::Attribute::List unknownEntries;
Kleo::DN::Attribute::List result;
@@ -313,7 +313,7 @@ reorder_dn( const Kleo::DN::Attribute::List & dn ) {
unknownEntries.push_back( *it );
// process the known attrs in the desired order
- for ( QStringList::const_iterator oit = attrOrder.begin() ; oit != attrOrder.end() ; ++oit )
+ for ( TQStringList::const_iterator oit = attrOrder.begin() ; oit != attrOrder.end() ; ++oit )
if ( *oit == "_X_" ) {
// insert the unknown attrs
std::copy( unknownEntries.begin(), unknownEntries.end(),
@@ -339,7 +339,7 @@ Kleo::DN::DN() {
d->ref();
}
-Kleo::DN::DN( const QString & dn ) {
+Kleo::DN::DN( const TQString & dn ) {
d = new Private();
d->ref();
d->attributes = parse_dn( dn );
@@ -376,20 +376,20 @@ const Kleo::DN & Kleo::DN::operator=( const DN & that ) {
return *this;
}
-QString Kleo::DN::prettyDN() const {
+TQString Kleo::DN::prettyDN() const {
if ( !d )
- return QString::null;
+ return TQString::null;
if ( d->reorderedAttributes.empty() )
d->reorderedAttributes = reorder_dn( d->attributes );
return serialise( d->reorderedAttributes );
}
-QString Kleo::DN::dn() const {
- return d ? serialise( d->attributes ) : QString::null ;
+TQString Kleo::DN::dn() const {
+ return d ? serialise( d->attributes ) : TQString::null ;
}
// static
-QString Kleo::DN::escape( const QString & value ) {
+TQString Kleo::DN::escape( const TQString & value ) {
return dn_escape( value );
}
@@ -411,18 +411,18 @@ void Kleo::DN::append( const Attribute & attr ) {
d->reorderedAttributes.clear();
}
-QString Kleo::DN::operator[]( const QString & attr ) const {
+TQString Kleo::DN::operator[]( const TQString & attr ) const {
if ( !d )
- return QString::null;
- const QString attrUpper = attr.upper();
- for ( QValueVector<Attribute>::const_iterator it = d->attributes.begin() ;
+ return TQString::null;
+ const TQString attrUpper = attr.upper();
+ for ( TQValueVector<Attribute>::const_iterator it = d->attributes.begin() ;
it != d->attributes.end() ; ++it )
if ( (*it).name() == attrUpper )
return (*it).value();
- return QString::null;
+ return TQString::null;
}
-static QValueVector<Kleo::DN::Attribute> empty;
+static TQValueVector<Kleo::DN::Attribute> empty;
Kleo::DN::const_iterator Kleo::DN::begin() const {
return d ? d->attributes.begin() : empty.begin() ;
@@ -476,7 +476,7 @@ class Kleo::DNAttributeMapper::Private {
public:
Private();
std::map<const char*,const char*,ltstr> map;
- QStringList attributeOrder;
+ TQStringList attributeOrder;
};
Kleo::DNAttributeMapper::Private::Private()
@@ -505,26 +505,26 @@ const Kleo::DNAttributeMapper * Kleo::DNAttributeMapper::instance() {
return mSelf;
}
-QString Kleo::DNAttributeMapper::name2label( const QString & s ) const {
+TQString Kleo::DNAttributeMapper::name2label( const TQString & s ) const {
const std::map<const char*,const char*,ltstr>::const_iterator it
= d->map.find( s.stripWhiteSpace().upper().latin1() );
if ( it == d->map.end() )
- return QString::null;
+ return TQString::null;
return i18n( it->second );
}
-QStringList Kleo::DNAttributeMapper::names() const {
- QStringList result;
+TQStringList Kleo::DNAttributeMapper::names() const {
+ TQStringList result;
for ( std::map<const char*,const char*,ltstr>::const_iterator it = d->map.begin() ; it != d->map.end() ; ++it )
result.push_back( it->first );
return result;
}
-const QStringList & Kleo::DNAttributeMapper::attributeOrder() const {
+const TQStringList & Kleo::DNAttributeMapper::attributeOrder() const {
return d->attributeOrder;
}
-void Kleo::DNAttributeMapper::setAttributeOrder( const QStringList & order ) {
+void Kleo::DNAttributeMapper::setAttributeOrder( const TQStringList & order ) {
d->attributeOrder = order;
if ( order.empty() )
std::copy( defaultOrder, defaultOrder + sizeof defaultOrder / sizeof *defaultOrder,
@@ -533,6 +533,6 @@ void Kleo::DNAttributeMapper::setAttributeOrder( const QStringList & order ) {
config.writeEntry( "AttributeOrder", order );
}
-Kleo::DNAttributeOrderConfigWidget * Kleo::DNAttributeMapper::configWidget( QWidget * parent, const char * name ) const {
+Kleo::DNAttributeOrderConfigWidget * Kleo::DNAttributeMapper::configWidget( TQWidget * parent, const char * name ) const {
return new DNAttributeOrderConfigWidget( mSelf, parent, name );
}