diff options
Diffstat (limited to 'kfile-plugins/cert')
-rw-r--r-- | kfile-plugins/cert/kfile_cert.cpp | 68 | ||||
-rw-r--r-- | kfile-plugins/cert/kfile_cert.h | 4 |
2 files changed, 36 insertions, 36 deletions
diff --git a/kfile-plugins/cert/kfile_cert.cpp b/kfile-plugins/cert/kfile_cert.cpp index 78c20f5..8a711ba 100644 --- a/kfile-plugins/cert/kfile_cert.cpp +++ b/kfile-plugins/cert/kfile_cert.cpp @@ -29,17 +29,17 @@ //#include <kdebug.h> //#include <kio/global.h> -#include <qdatetime.h> -#include <qfile.h> -#include <qcstring.h> -//#include <qfileinfo.h> -//#include <qdir.h> +#include <tqdatetime.h> +#include <tqfile.h> +#include <tqcstring.h> +//#include <tqfileinfo.h> +//#include <tqdir.h> typedef KGenericFactory<CertPlugin> CertFactory; K_EXPORT_COMPONENT_FACTORY(kfile_cert, CertFactory("kfile-cert")) -CertPlugin::CertPlugin(QObject *parent, const char *name, const QStringList &args) +CertPlugin::CertPlugin(TQObject *parent, const char *name, const TQStringList &args) : KFilePlugin(parent, name, args) { //add the mimetype here - example: @@ -51,41 +51,41 @@ CertPlugin::CertPlugin(QObject *parent, const char *name, const QStringList &arg KFileMimeTypeInfo::ItemInfo* item; group = addGroupInfo(info, "certInfo", i18n("Certificate Information")); - item = addItemInfo(group, "ValidFrom", i18n("Valid From"), QVariant::DateTime); - item = addItemInfo(group, "ValidUntil", i18n("Valid Until"), QVariant::DateTime); - item = addItemInfo(group, "State", i18n("State"), QVariant::String); - item = addItemInfo(group, "SerialNo", i18n("Serial Number"), QVariant::String); + item = addItemInfo(group, "ValidFrom", i18n("Valid From"), TQVariant::DateTime); + item = addItemInfo(group, "ValidUntil", i18n("Valid Until"), TQVariant::DateTime); + item = addItemInfo(group, "State", i18n("State"), TQVariant::String); + item = addItemInfo(group, "SerialNo", i18n("Serial Number"), TQVariant::String); group = addGroupInfo(info, "certSubjectInfo", i18n("Subject")); - item = addItemInfo(group, "O", i18n("Organization"), QVariant::String); - item = addItemInfo(group, "OU", i18n("Organizational Unit"), QVariant::String); - item = addItemInfo(group, "L", i18n("Locality"), QVariant::String); - item = addItemInfo(group, "C", i18n("Country"), QVariant::String); - item = addItemInfo(group, "CN", i18n("Common Name"), QVariant::String); - item = addItemInfo(group, "E", i18n("Email"), QVariant::String); + item = addItemInfo(group, "O", i18n("Organization"), TQVariant::String); + item = addItemInfo(group, "OU", i18n("Organizational Unit"), TQVariant::String); + item = addItemInfo(group, "L", i18n("Locality"), TQVariant::String); + item = addItemInfo(group, "C", i18n("Country"), TQVariant::String); + item = addItemInfo(group, "CN", i18n("Common Name"), TQVariant::String); + item = addItemInfo(group, "E", i18n("Email"), TQVariant::String); group = addGroupInfo(info, "certIssuerInfo", i18n("Issuer")); - item = addItemInfo(group, "O", i18n("Organization"), QVariant::String); - item = addItemInfo(group, "OU", i18n("Organizational Unit"), QVariant::String); - item = addItemInfo(group, "L", i18n("Locality"), QVariant::String); - item = addItemInfo(group, "C", i18n("Country"), QVariant::String); - item = addItemInfo(group, "CN", i18n("Common Name"), QVariant::String); - item = addItemInfo(group, "E", i18n("Email"), QVariant::String); + item = addItemInfo(group, "O", i18n("Organization"), TQVariant::String); + item = addItemInfo(group, "OU", i18n("Organizational Unit"), TQVariant::String); + item = addItemInfo(group, "L", i18n("Locality"), TQVariant::String); + item = addItemInfo(group, "C", i18n("Country"), TQVariant::String); + item = addItemInfo(group, "CN", i18n("Common Name"), TQVariant::String); + item = addItemInfo(group, "E", i18n("Email"), TQVariant::String); //setUnit(item, KFileMimeTypeInfo::KiloBytes); // strings are possible, too: - //addItemInfo(group, "Text", i18n("Document Type"), QVariant::String); + //addItemInfo(group, "Text", i18n("Document Type"), TQVariant::String); } -void CertPlugin::appendDNItems(KFileMetaInfoGroup &group, const QString &DN) +void CertPlugin::appendDNItems(KFileMetaInfoGroup &group, const TQString &DN) { KSSLX509Map map(DN); - QString value; - //QString dbg; - QStringList keys = group.supportedKeys(); - QStringList::ConstIterator end = keys.end(); - for (QStringList::ConstIterator it = keys.begin(); it != end; ++it) { + TQString value; + //TQString dbg; + TQStringList keys = group.supportedKeys(); + TQStringList::ConstIterator end = keys.end(); + for (TQStringList::ConstIterator it = keys.begin(); it != end; ++it) { value = map.getValue(*it); //dbg += *it + " = " + value + "; "; if (!value.isNull()) appendItem(group, *it, value); @@ -93,16 +93,16 @@ void CertPlugin::appendDNItems(KFileMetaInfoGroup &group, const QString &DN) } } -static KSSLCertificate *readCertFromFile(const QString &path) +static KSSLCertificate *readCertFromFile(const TQString &path) { KSSLCertificate *ret = NULL; - QFile file(path); + TQFile file(path); if (!file.open(IO_ReadOnly)) return NULL; - QByteArray file_data = file.readAll(); + TQByteArray file_data = file.readAll(); file.close(); - QCString file_string = QCString(file_data.data(), file_data.size()); + TQCString file_string = TQCString(file_data.data(), file_data.size()); // try as is: ret = KSSLCertificate::fromString(file_string); if (ret) return ret; @@ -116,7 +116,7 @@ static KSSLCertificate *readCertFromFile(const QString &path) int end_pos = file_string.find(end_line, begin_pos); if (end_pos >= 0) { // read the data between begin and end lines - QCString body = file_string.mid(begin_pos, end_pos - begin_pos); + TQCString body = file_string.mid(begin_pos, end_pos - begin_pos); ret = KSSLCertificate::fromString(body); return ret; // even if it's NULL, we can't help it } diff --git a/kfile-plugins/cert/kfile_cert.h b/kfile-plugins/cert/kfile_cert.h index 544ef39..4ecb7a2 100644 --- a/kfile-plugins/cert/kfile_cert.h +++ b/kfile-plugins/cert/kfile_cert.h @@ -32,9 +32,9 @@ class QString; class CertPlugin: public KFilePlugin { Q_OBJECT private: - void appendDNItems(KFileMetaInfoGroup &group, const QString &DN); + void appendDNItems(KFileMetaInfoGroup &group, const TQString &DN); public: - CertPlugin(QObject *parent, const char *name, const QStringList& args); + CertPlugin(TQObject *parent, const char *name, const TQStringList& args); virtual bool readInfo(KFileMetaInfo& info, uint what); }; |