summaryrefslogtreecommitdiffstats
path: root/kfile-plugins
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:22:56 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:22:56 +0000
commit7346aee26bf190a7e70333c40fab4caca847cd27 (patch)
tree4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /kfile-plugins
parent23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff)
downloadtdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.tar.gz
tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kfile-plugins')
-rw-r--r--kfile-plugins/cert/kfile_cert.cpp68
-rw-r--r--kfile-plugins/cert/kfile_cert.h4
-rw-r--r--kfile-plugins/desktop/kfile_desktop.cpp38
-rw-r--r--kfile-plugins/desktop/kfile_desktop.h4
-rw-r--r--kfile-plugins/folder/kfile_folder.cpp20
-rw-r--r--kfile-plugins/folder/kfile_folder.h2
-rw-r--r--kfile-plugins/html/kfile_html.cpp44
-rw-r--r--kfile-plugins/html/kfile_html.h2
-rw-r--r--kfile-plugins/lnk/kfile_lnk.cpp14
-rw-r--r--kfile-plugins/lnk/kfile_lnk.h2
-rw-r--r--kfile-plugins/lnk/lnkforward.cpp10
-rw-r--r--kfile-plugins/lnk/read_lnk.cpp6
-rw-r--r--kfile-plugins/lnk/read_lnk.h10
-rw-r--r--kfile-plugins/mhtml/kfile_mhtml.cpp80
-rw-r--r--kfile-plugins/mhtml/kfile_mhtml.h6
-rw-r--r--kfile-plugins/txt/kfile_txt.cpp30
-rw-r--r--kfile-plugins/txt/kfile_txt.h4
17 files changed, 172 insertions, 172 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);
};
diff --git a/kfile-plugins/desktop/kfile_desktop.cpp b/kfile-plugins/desktop/kfile_desktop.cpp
index 3a78dbc..5c56d9e 100644
--- a/kfile-plugins/desktop/kfile_desktop.cpp
+++ b/kfile-plugins/desktop/kfile_desktop.cpp
@@ -30,8 +30,8 @@ typedef KGenericFactory<KDotDesktopPlugin> DotDesktopFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_desktop, DotDesktopFactory("kfile_desktop"))
-KDotDesktopPlugin::KDotDesktopPlugin(QObject *parent, const char *name,
- const QStringList &preferredItems)
+KDotDesktopPlugin::KDotDesktopPlugin(TQObject *parent, const char *name,
+ const TQStringList &preferredItems)
: KFilePlugin(parent, name, preferredItems)
{
kdDebug(7034) << ".desktop plugin\n";
@@ -43,22 +43,22 @@ KDotDesktopPlugin::KDotDesktopPlugin(QObject *parent, const char *name,
info = addMimeTypeInfo("application/x-desktop");
group = addGroupInfo(info, "General", i18n("General"));
- item = addItemInfo(group, "Name", i18n("Name"), QVariant::String);
+ item = addItemInfo(group, "Name", i18n("Name"), TQVariant::String);
setHint(item, KFileMimeTypeInfo::Name);
- item = addItemInfo(group, "Comment", i18n("Comment"), QVariant::String);
+ item = addItemInfo(group, "Comment", i18n("Comment"), TQVariant::String);
setHint(item, KFileMimeTypeInfo::Description);
- addItemInfo(group, "Type", i18n("Type"), QVariant::String);
+ addItemInfo(group, "Type", i18n("Type"), TQVariant::String);
- addItemInfo(group, "Device", i18n("Device"), QVariant::String);
- addItemInfo(group, "Mount Point", i18n("Mount Point"), QVariant::String);
- addItemInfo(group, "File System", i18n("File System"), QVariant::String);
- addItemInfo(group, "Writable", i18n("Writable"), QVariant::Bool);
+ addItemInfo(group, "Device", i18n("Device"), TQVariant::String);
+ addItemInfo(group, "Mount Point", i18n("Mount Point"), TQVariant::String);
+ addItemInfo(group, "File System", i18n("File System"), TQVariant::String);
+ addItemInfo(group, "Writable", i18n("Writable"), TQVariant::Bool);
- addItemInfo(group, "File Type", i18n("File Type"), QVariant::String);
- addItemInfo(group, "Service Type", i18n("Service Type"), QVariant::String);
- addItemInfo(group, "Preferred Items", i18n("Preferred Items"), QVariant::String);
- addItemInfo(group, "Link To", i18n("Link To"), QVariant::String);
+ addItemInfo(group, "File Type", i18n("File Type"), TQVariant::String);
+ addItemInfo(group, "Service Type", i18n("Service Type"), TQVariant::String);
+ addItemInfo(group, "Preferred Items", i18n("Preferred Items"), TQVariant::String);
+ addItemInfo(group, "Link To", i18n("Link To"), TQVariant::String);
}
bool KDotDesktopPlugin::readInfo( KFileMetaInfo& info, uint )
@@ -68,7 +68,7 @@ bool KDotDesktopPlugin::readInfo( KFileMetaInfo& info, uint )
KDesktopFile file(info.path(), true);
- QString s;
+ TQString s;
KFileMetaInfoGroup group = appendGroup(info, "General");
@@ -78,7 +78,7 @@ bool KDotDesktopPlugin::readInfo( KFileMetaInfo& info, uint )
s = file.readComment();
if (!s.isEmpty()) appendItem(group, "Comment", s);
- QString type = file.readType();
+ TQString type = file.readType();
if (type == "FSDevice")
{
appendItem(group, "Type", i18n("Device"));
@@ -93,7 +93,7 @@ bool KDotDesktopPlugin::readInfo( KFileMetaInfo& info, uint )
if (!s.isEmpty()) appendItem(group, "File System", s);
appendItem(group, "Writable",
- QVariant(!file.readBoolEntry("ReadOnly", true), 42));
+ TQVariant(!file.readBoolEntry("ReadOnly", true), 42));
}
else if (type == "Service")
@@ -107,18 +107,18 @@ bool KDotDesktopPlugin::readInfo( KFileMetaInfo& info, uint )
appendItem(group, "File Type", mt->comment());
}
- QString sType = file.readEntry("ServiceTypes");
+ TQString sType = file.readEntry("ServiceTypes");
appendItem(group, "Service Type", sType);
if (sType == "KFilePlugin")
{
- QStringList preferred = file.readListEntry("PreferredItems");
+ TQStringList preferred = file.readListEntry("PreferredItems");
appendItem(group, "Preferred Items", preferred);
}
}
else if (type == "Link")
{
- QString url = file.readPathEntry("URL");
+ TQString url = file.readPathEntry("URL");
appendItem(group, "Link To", url);
}
diff --git a/kfile-plugins/desktop/kfile_desktop.h b/kfile-plugins/desktop/kfile_desktop.h
index 1001e22..0ef286e 100644
--- a/kfile-plugins/desktop/kfile_desktop.h
+++ b/kfile-plugins/desktop/kfile_desktop.h
@@ -30,8 +30,8 @@ class KDotDesktopPlugin: public KFilePlugin
Q_OBJECT
public:
- KDotDesktopPlugin( QObject *parent, const char *name,
- const QStringList& args );
+ KDotDesktopPlugin( TQObject *parent, const char *name,
+ const TQStringList& args );
virtual bool readInfo ( KFileMetaInfo& info, uint what );
};
diff --git a/kfile-plugins/folder/kfile_folder.cpp b/kfile-plugins/folder/kfile_folder.cpp
index 911a2e5..fe4ea9a 100644
--- a/kfile-plugins/folder/kfile_folder.cpp
+++ b/kfile-plugins/folder/kfile_folder.cpp
@@ -23,15 +23,15 @@
#include <kgenericfactory.h>
#include <kio/global.h>
-#include <qfileinfo.h>
-#include <qdir.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
typedef KGenericFactory<KFolderPlugin> KFolderFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_folder, KFolderFactory( "kfile_folder" ))
-KFolderPlugin::KFolderPlugin(QObject *parent, const char *name,
- const QStringList &args)
+KFolderPlugin::KFolderPlugin(TQObject *parent, const char *name,
+ const TQStringList &args)
: KFilePlugin(parent, name, args)
{
@@ -43,8 +43,8 @@ KFolderPlugin::KFolderPlugin(QObject *parent, const char *name,
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Items", i18n("Items"), QVariant::Int);
- item = addItemInfo(group, "Size", i18n("Size"), QVariant::Int);
+ item = addItemInfo(group, "Items", i18n("Items"), TQVariant::Int);
+ item = addItemInfo(group, "Size", i18n("Size"), TQVariant::Int);
setUnit(item, KFileMimeTypeInfo::Bytes);
}
@@ -55,17 +55,17 @@ bool KFolderPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
if (info.path().isEmpty())
return false;
- QDir dir;
+ TQDir dir;
if ( !dir.cd(info.path()) )
return false;
- const QPtrList<QFileInfo> *fileList = dir.entryInfoList();
+ const TQPtrList<TQFileInfo> *fileList = dir.entryInfoList();
if (!fileList)
return false;
- QPtrListIterator<QFileInfo> list = QPtrListIterator<QFileInfo>(*fileList);
+ TQPtrListIterator<TQFileInfo> list = TQPtrListIterator<TQFileInfo>(*fileList);
- QFileInfo* file;
+ TQFileInfo* file;
int items = 0;
KIO::filesize_t bytes = 0;
diff --git a/kfile-plugins/folder/kfile_folder.h b/kfile-plugins/folder/kfile_folder.h
index 602c369..96fcd16 100644
--- a/kfile-plugins/folder/kfile_folder.h
+++ b/kfile-plugins/folder/kfile_folder.h
@@ -29,7 +29,7 @@ class KFolderPlugin: public KFilePlugin
Q_OBJECT
public:
- KFolderPlugin( QObject *parent, const char *name, const QStringList& args );
+ KFolderPlugin( TQObject *parent, const char *name, const TQStringList& args );
virtual bool readInfo( KFileMetaInfo& info, uint what);
};
diff --git a/kfile-plugins/html/kfile_html.cpp b/kfile-plugins/html/kfile_html.cpp
index bfe736b..5adddfc 100644
--- a/kfile-plugins/html/kfile_html.cpp
+++ b/kfile-plugins/html/kfile_html.cpp
@@ -25,17 +25,17 @@
#include <kurl.h>
#include <kprocess.h>
#include <kdebug.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
typedef KGenericFactory<KHtmlPlugin> HtmlFactory;
K_EXPORT_COMPONENT_FACTORY( kfile_html, HtmlFactory( "kfile_html" ) )
-KHtmlPlugin::KHtmlPlugin( QObject *parent, const char *name,
- const QStringList &args )
+KHtmlPlugin::KHtmlPlugin( TQObject *parent, const char *name,
+ const TQStringList &args )
: KFilePlugin( parent, name, args )
{
kdDebug(7034) << "html plugin\n";
@@ -46,13 +46,13 @@ KHtmlPlugin::KHtmlPlugin( QObject *parent, const char *name,
KFileMimeTypeInfo::ItemInfo* item;
group = addGroupInfo(info, "General", i18n("General"));
- addItemInfo(group, "Doctype", i18n("Document Type"), QVariant::String);
- addItemInfo(group, "Javascript", i18n("JavaScript"), QVariant::Bool);
- item = addItemInfo(group, "Title", i18n("Title"), QVariant::String);
+ addItemInfo(group, "Doctype", i18n("Document Type"), TQVariant::String);
+ addItemInfo(group, "Javascript", i18n("JavaScript"), TQVariant::Bool);
+ item = addItemInfo(group, "Title", i18n("Title"), TQVariant::String);
setHint(item, KFileMimeTypeInfo::Name);
group = addGroupInfo(info, "Metatags", i18n("Meta Tags"));
- addVariableInfo(group, QVariant::String, 0);
+ addVariableInfo(group, TQVariant::String, 0);
}
@@ -61,7 +61,7 @@ bool KHtmlPlugin::readInfo( KFileMetaInfo& info, uint )
if ( info.path().isEmpty() ) // remote file
return false;
- QFile f(info.path());
+ TQFile f(info.path());
if (!f.open(IO_ReadOnly))
return false;
@@ -70,14 +70,14 @@ bool KHtmlPlugin::readInfo( KFileMetaInfo& info, uint )
// In this case, it's better to limit the size of the buffer to something
// sensible. Think a 0-filled 3GB file with an .html extension.
int maxBufSize = QMIN(f.size(), 32768);
- QByteArray data(maxBufSize + 1);
+ TQByteArray data(maxBufSize + 1);
f.readBlock(data.data(), maxBufSize);
data[maxBufSize]='\0';
- QString s(data);
+ TQString s(data);
int start=0, last=0;
- QRegExp exp;
+ TQRegExp exp;
exp.setCaseSensitive(false);
exp.setMinimal(true);
@@ -91,7 +91,7 @@ bool KHtmlPlugin::readInfo( KFileMetaInfo& info, uint )
last += exp.matchedLength();
}
- QString title;
+ TQString title;
exp.setPattern("<\\s*title\\s*>\\s*(.*)\\s*<\\s*/\\s*title\\s*>");
if (exp.search(s, last) != -1)
{
@@ -101,12 +101,12 @@ bool KHtmlPlugin::readInfo( KFileMetaInfo& info, uint )
KFileMetaInfoGroup metatags = appendGroup(info, "Metatags");
- QString meta, name, content;
+ TQString meta, name, content;
exp.setPattern("<\\s*meta\\s*([^>]*)\\s*>");
- QRegExp rxName("(?:name|http-equiv)\\s*=\\s*\"([^\"]+)\"", false);
- QRegExp rxContent("content\\s*=\\s*\"([^\"]+)\"", false);
- QRegExp rxCharset("charset\\s*=\\s*(.*)", false);
- QTextCodec *codec = 0;
+ TQRegExp rxName("(?:name|http-equiv)\\s*=\\s*\"([^\"]+)\"", false);
+ TQRegExp rxContent("content\\s*=\\s*\"([^\"]+)\"", false);
+ TQRegExp rxCharset("charset\\s*=\\s*(.*)", false);
+ TQTextCodec *codec = 0;
// find the meta tags
last = 0;
@@ -133,7 +133,7 @@ bool KHtmlPlugin::readInfo( KFileMetaInfo& info, uint )
if ( rxCharset.search(content) != -1 )
{
kdDebug(7034) << "CodecForName : " << rxCharset.cap(1) << endl;
- codec = QTextCodec::codecForName(rxCharset.cap(1).ascii());
+ codec = TQTextCodec::codecForName(rxCharset.cap(1).ascii());
}
}
@@ -151,7 +151,7 @@ bool KHtmlPlugin::readInfo( KFileMetaInfo& info, uint )
// find out if it contains javascript
exp.setPattern("<script>");
- appendItem(group, "Javascript", QVariant( s.find(exp)!=-1, 42));
+ appendItem(group, "Javascript", TQVariant( s.find(exp)!=-1, 42));
return true;
}
diff --git a/kfile-plugins/html/kfile_html.h b/kfile-plugins/html/kfile_html.h
index 4d9eec6..adf2046 100644
--- a/kfile-plugins/html/kfile_html.h
+++ b/kfile-plugins/html/kfile_html.h
@@ -31,7 +31,7 @@ class KHtmlPlugin: public KFilePlugin
Q_OBJECT
public:
- KHtmlPlugin( QObject *parent, const char *name, const QStringList& args );
+ KHtmlPlugin( TQObject *parent, const char *name, const TQStringList& args );
virtual bool readInfo( KFileMetaInfo& info, uint what );
};
diff --git a/kfile-plugins/lnk/kfile_lnk.cpp b/kfile-plugins/lnk/kfile_lnk.cpp
index 6d8ea94..eb9e106 100644
--- a/kfile-plugins/lnk/kfile_lnk.cpp
+++ b/kfile-plugins/lnk/kfile_lnk.cpp
@@ -35,8 +35,8 @@ K_EXPORT_COMPONENT_FACTORY(kfile_lnk, lnkFactory( "kfile_lnk" ))
//--------------------------------------------------------------------------------
-lnkPlugin::lnkPlugin(QObject *parent, const char *name,
- const QStringList &args)
+lnkPlugin::lnkPlugin(TQObject *parent, const char *name,
+ const TQStringList &args)
: KFilePlugin(parent, name, args)
{
KFileMimeTypeInfo* info = addMimeTypeInfo( "application/x-win-lnk" );
@@ -48,12 +48,12 @@ lnkPlugin::lnkPlugin(QObject *parent, const char *name,
KFileMimeTypeInfo::ItemInfo* item;
// our new items in the group
- item = addItemInfo(group, "TargetSize", i18n("Size of Target"), QVariant::Int);
+ item = addItemInfo(group, "TargetSize", i18n("Size of Target"), TQVariant::Int);
setUnit(item, KFileMimeTypeInfo::Bytes);
- addItemInfo(group, "Where", i18n("Location"), QVariant::String);
- addItemInfo(group, "PointsTo", i18n("Points To"), QVariant::String);
- addItemInfo(group, "Description", i18n("Description"), QVariant::String);
+ addItemInfo(group, "Where", i18n("Location"), TQVariant::String);
+ addItemInfo(group, "PointsTo", i18n("Points To"), TQVariant::String);
+ addItemInfo(group, "Description", i18n("Description"), TQVariant::String);
}
//--------------------------------------------------------------------------------
@@ -76,7 +76,7 @@ bool lnkPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
if ( ! lnkInfo.isNetworkPath )
{
appendItem(group, "Where", i18n("on Windows disk: %1").arg(lnkInfo.volumeName)); // volume label
- appendItem(group, "PointsTo", QString("%1%2").arg(lnkInfo.driveName).arg(lnkInfo.path));
+ appendItem(group, "PointsTo", TQString("%1%2").arg(lnkInfo.driveName).arg(lnkInfo.path));
}
else
{
diff --git a/kfile-plugins/lnk/kfile_lnk.h b/kfile-plugins/lnk/kfile_lnk.h
index 3ee4ae8..6f48013 100644
--- a/kfile-plugins/lnk/kfile_lnk.h
+++ b/kfile-plugins/lnk/kfile_lnk.h
@@ -37,7 +37,7 @@ class lnkPlugin: public KFilePlugin
Q_OBJECT
public:
- lnkPlugin( QObject *parent, const char *name, const QStringList& args );
+ lnkPlugin( TQObject *parent, const char *name, const TQStringList& args );
virtual bool readInfo( KFileMetaInfo& info, uint what);
};
diff --git a/kfile-plugins/lnk/lnkforward.cpp b/kfile-plugins/lnk/lnkforward.cpp
index a79a7db..af4492b 100644
--- a/kfile-plugins/lnk/lnkforward.cpp
+++ b/kfile-plugins/lnk/lnkforward.cpp
@@ -72,9 +72,9 @@ int LNKForwarder::run(KCmdLineArgs *args)
bool ret = readLNK(args->arg(0), info);
if ( ! ret ) return 1;
- info.path.replace(QChar('\\'), QChar('/'));
+ info.path.replace(TQChar('\\'), TQChar('/'));
- QString path;
+ TQString path;
if ( info.isNetworkPath )
{
@@ -109,8 +109,8 @@ int LNKForwarder::run(KCmdLineArgs *args)
kdDebug(7034) << "running:" << path << endl;
KRun * run = new KRun(path);
- QObject::connect(run, SIGNAL(finished()), this, SLOT(delayedQuit()));
- QObject::connect(run, SIGNAL(error()), this, SLOT(delayedQuit()));
+ TQObject::connect(run, TQT_SIGNAL(finished()), this, TQT_SLOT(delayedQuit()));
+ TQObject::connect(run, TQT_SIGNAL(error()), this, TQT_SLOT(delayedQuit()));
return exec();
}
@@ -122,7 +122,7 @@ void LNKForwarder::delayedQuit()
{
// Quit in 2 seconds. This leaves time for KRun to pop up
// "app not found" in KProcessRunner, if that was the case.
- QTimer::singleShot(2000, this, SLOT(deref()));
+ TQTimer::singleShot(2000, this, TQT_SLOT(deref()));
}
//--------------------------------------------------------------------------------
diff --git a/kfile-plugins/lnk/read_lnk.cpp b/kfile-plugins/lnk/read_lnk.cpp
index 2d627fb..f65b657 100644
--- a/kfile-plugins/lnk/read_lnk.cpp
+++ b/kfile-plugins/lnk/read_lnk.cpp
@@ -62,7 +62,7 @@ bool readLNK(const KURL &url, LNKInfo &info)
{
const char* lnkFile = 0;
- QString tempFile;
+ TQString tempFile;
if ( KIO::NetAccess::download(url, tempFile, 0) )
lnkFile = tempFile.latin1();
else
@@ -156,7 +156,7 @@ bool readLNK(const KURL &url, LNKInfo &info)
{
info.volumeName = (start + loc.localVolume + 0x10); // volume label
- info.path = QString::null;
+ info.path = TQString::null;
if ( *(start + loc.basePath) )
{
@@ -181,7 +181,7 @@ bool readLNK(const KURL &url, LNKInfo &info)
}
else // network path
{
- info.path = QString("%1\\%2")
+ info.path = TQString("%1\\%2")
.arg(start + loc.netVolume + 0x14) // network share name
.arg(start + loc.pathname);
}
diff --git a/kfile-plugins/lnk/read_lnk.h b/kfile-plugins/lnk/read_lnk.h
index da947a1..ff8fe63 100644
--- a/kfile-plugins/lnk/read_lnk.h
+++ b/kfile-plugins/lnk/read_lnk.h
@@ -24,7 +24,7 @@
#ifndef _READ_LNK_H_
#define _READ_LNK_H_
-#include <qstring.h>
+#include <tqstring.h>
class KURL;
struct LNKInfo
@@ -35,10 +35,10 @@ struct LNKInfo
bool isNetworkPath;
bool isDirectory;
bool isFileOrDir;
- QString volumeName;
- QString driveName;
- QString path;
- QString description;
+ TQString volumeName;
+ TQString driveName;
+ TQString path;
+ TQString description;
};
bool readLNK(const KURL &url, LNKInfo &info);
diff --git a/kfile-plugins/mhtml/kfile_mhtml.cpp b/kfile-plugins/mhtml/kfile_mhtml.cpp
index f9ef320..0a07ea9 100644
--- a/kfile-plugins/mhtml/kfile_mhtml.cpp
+++ b/kfile-plugins/mhtml/kfile_mhtml.cpp
@@ -24,48 +24,48 @@
#include <kgenericfactory.h>
#include <kmdcodec.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qtextcodec.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqtextcodec.h>
typedef KGenericFactory<mhtmlPlugin> mhtmlFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_mhtml, mhtmlFactory( "kfile_mhtml" ))
-mhtmlPlugin::mhtmlPlugin(QObject *parent, const char *name,
- const QStringList &args)
+mhtmlPlugin::mhtmlPlugin(TQObject *parent, const char *name,
+ const TQStringList &args)
: KFilePlugin(parent, name, args)
{
KFileMimeTypeInfo* info = addMimeTypeInfo( "application/x-mimearchive" );
KFileMimeTypeInfo::GroupInfo* group = 0L;
group = addGroupInfo(info, "mhtmlInfo", i18n("Document Information"));
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Subject", i18n("Subject"), QVariant::String);
- item = addItemInfo(group, "Sender", i18n("Sender"), QVariant::String);
- item = addItemInfo(group, "Recipient", i18n("Recipient"), QVariant::String);
- item = addItemInfo(group, "CopyTo", i18n("CC"), QVariant::String);
- item = addItemInfo(group, "BlindCopyTo", i18n("BCC"), QVariant::String);
- item = addItemInfo(group, "Date", i18n("Date"), QVariant::String);
+ item = addItemInfo(group, "Subject", i18n("Subject"), TQVariant::String);
+ item = addItemInfo(group, "Sender", i18n("Sender"), TQVariant::String);
+ item = addItemInfo(group, "Recipient", i18n("Recipient"), TQVariant::String);
+ item = addItemInfo(group, "CopyTo", i18n("CC"), TQVariant::String);
+ item = addItemInfo(group, "BlindCopyTo", i18n("BCC"), TQVariant::String);
+ item = addItemInfo(group, "Date", i18n("Date"), TQVariant::String);
}
bool mhtmlPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
{
- QString mSender;
- QString mRecipient;
- QString mCopyTo;
- QString mBlindCopyTo;
- QString mSubject;
- QString mDate;
+ TQString mSender;
+ TQString mRecipient;
+ TQString mCopyTo;
+ TQString mBlindCopyTo;
+ TQString mSubject;
+ TQString mDate;
bool canUnfold;
if ( info.path().isEmpty() ) // remote file
return false;
- QFile f(info.path());
+ TQFile f(info.path());
if (!f.open(IO_ReadOnly)) return false;
- QTextStream stream(&f);
- QString l=stream.readLine();
+ TQTextStream stream(&f);
+ TQString l=stream.readLine();
int nFieldsFound = 0;
while(!l.isEmpty()){
if(l.startsWith("From: ")) {
@@ -95,7 +95,7 @@ bool mhtmlPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
}else if(l.startsWith(" ") || l.startsWith("\t")){
// unfold field
if(canUnfold){
- QString tmp=l.stripWhiteSpace();
+ TQString tmp=l.stripWhiteSpace();
if(nFieldsFound & 16) mBlindCopyTo=mBlindCopyTo+" "+tmp;
else if(nFieldsFound & 8) mCopyTo=mCopyTo+" "+tmp;
else if(nFieldsFound & 4) mSubject=mSubject+" "+tmp;
@@ -119,19 +119,19 @@ bool mhtmlPlugin::readInfo( KFileMetaInfo& info, uint /*what*/)
return true;
}
-QString mhtmlPlugin::decodeRFC2047Phrase(const QString &msg, bool removeLessGreater){
+TQString mhtmlPlugin::decodeRFC2047Phrase(const TQString &msg, bool removeLessGreater){
int st=msg.find("=?");
int en=-1;
- QString msgCopy=msg;
- QString decodedText=msgCopy.left(st);
- QString encodedText=msgCopy.mid(st);
+ TQString msgCopy=msg;
+ TQString decodedText=msgCopy.left(st);
+ TQString encodedText=msgCopy.mid(st);
st=encodedText.find("=?");
while(st!=-1){
en=encodedText.find("?=");
while(encodedText.mid(en+2,1)!=" " && en+2<(int)encodedText.length()) en=encodedText.find("?=",en+1);
if(en==-1) break;
decodedText+=encodedText.left(st);
- QString tmp=encodedText.mid(st,en-st+2);
+ TQString tmp=encodedText.mid(st,en-st+2);
encodedText=encodedText.mid(en+2);
decodedText+=decodeRFC2047String(tmp);
st=encodedText.find("=?",st+1);
@@ -140,12 +140,12 @@ QString mhtmlPlugin::decodeRFC2047Phrase(const QString &msg, bool removeLessGrea
// remove unwanted '<' and '>'
if(removeLessGreater){
if(decodedText.stripWhiteSpace().startsWith("<") && decodedText.stripWhiteSpace().endsWith(">")){
- QString tmp=decodedText.stripWhiteSpace();
+ TQString tmp=decodedText.stripWhiteSpace();
tmp=tmp.mid(1,tmp.length()-2);
decodedText=tmp;
}else{
- QString dec=decodedText;
- QString tmp;
+ TQString dec=decodedText;
+ TQString tmp;
st=decodedText.find("<");
while(st!=-1){
@@ -165,12 +165,12 @@ QString mhtmlPlugin::decodeRFC2047Phrase(const QString &msg, bool removeLessGrea
return decodedText;
}
-QString mhtmlPlugin::decodeRFC2047String(const QString &msg){
- QString charset;
- QString encoding;
- QString notEncodedText;
- QString encodedText;
- QString decodedText;
+TQString mhtmlPlugin::decodeRFC2047String(const TQString &msg){
+ TQString charset;
+ TQString encoding;
+ TQString notEncodedText;
+ TQString encodedText;
+ TQString decodedText;
int encEnd=0;
if(msg.startsWith("=?") && (encEnd=msg.findRev("?="))!=-1){
notEncodedText=msg.mid(encEnd+2);
@@ -183,13 +183,13 @@ QString mhtmlPlugin::decodeRFC2047String(const QString &msg){
if(encoding!="b" && encoding!="q") return msg;
encodedText=encodedText.mid(questionMark+3);
if(charset.find(" ")!=-1 && encodedText.find(" ")!=-1) return msg;
- QCString tmpIn;
- QCString tmpOut;
+ TQCString tmpIn;
+ TQCString tmpOut;
tmpIn = encodedText.local8Bit();
if(encoding=="q")tmpOut=KCodecs::quotedPrintableDecode(tmpIn);
else tmpOut=KCodecs::base64Decode(tmpIn);
if(charset!="us-ascii"){
- QTextCodec *codec = QTextCodec::codecForName(charset.local8Bit());
+ TQTextCodec *codec = TQTextCodec::codecForName(charset.local8Bit());
if(!codec) return msg;
decodedText=codec->toUnicode(tmpOut);
decodedText=decodedText.replace("_"," ");
diff --git a/kfile-plugins/mhtml/kfile_mhtml.h b/kfile-plugins/mhtml/kfile_mhtml.h
index dc29ec3..cb5abe9 100644
--- a/kfile-plugins/mhtml/kfile_mhtml.h
+++ b/kfile-plugins/mhtml/kfile_mhtml.h
@@ -34,11 +34,11 @@ class mhtmlPlugin: public KFilePlugin
Q_OBJECT
public:
- mhtmlPlugin( QObject *parent, const char *name, const QStringList& args );
+ mhtmlPlugin( TQObject *parent, const char *name, const TQStringList& args );
virtual bool readInfo( KFileMetaInfo& info, uint what);
private:
- QString decodeRFC2047Phrase(const QString &msg, bool removeLessGreater=TRUE);
- QString decodeRFC2047String(const QString &msg);
+ TQString decodeRFC2047Phrase(const TQString &msg, bool removeLessGreater=TRUE);
+ TQString decodeRFC2047String(const TQString &msg);
};
#endif // __KFILE_MHTML_H__
diff --git a/kfile-plugins/txt/kfile_txt.cpp b/kfile-plugins/txt/kfile_txt.cpp
index 02e166c..fbd1c8b 100644
--- a/kfile-plugins/txt/kfile_txt.cpp
+++ b/kfile-plugins/txt/kfile_txt.cpp
@@ -22,22 +22,22 @@
#include <kgenericfactory.h>
#include <kdebug.h>
-#include <qfile.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
typedef KGenericFactory<KTxtPlugin> TxtFactory;
K_EXPORT_COMPONENT_FACTORY(kfile_txt, TxtFactory("kfile_txt"))
-KTxtPlugin::KTxtPlugin(QObject *parent, const char *name,
- const QStringList &args) : KFilePlugin(parent, name, args)
+KTxtPlugin::KTxtPlugin(TQObject *parent, const char *name,
+ const TQStringList &args) : KFilePlugin(parent, name, args)
{
kdDebug(7034) << "Text file meta info plugin\n";
makeMimeTypeInfo( "text/plain" );
}
-void KTxtPlugin::makeMimeTypeInfo(const QString& mimeType)
+void KTxtPlugin::makeMimeTypeInfo(const TQString& mimeType)
{
KFileMimeTypeInfo* info = addMimeTypeInfo(mimeType);
@@ -45,13 +45,13 @@ void KTxtPlugin::makeMimeTypeInfo(const QString& mimeType)
addGroupInfo(info, "General", i18n("General"));
KFileMimeTypeInfo::ItemInfo* item;
- item = addItemInfo(group, "Lines", i18n("Lines"), QVariant::Int);
+ item = addItemInfo(group, "Lines", i18n("Lines"), TQVariant::Int);
setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "Words", i18n("Words"), QVariant::Int);
+ item = addItemInfo(group, "Words", i18n("Words"), TQVariant::Int);
setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "Characters", i18n("Characters"), QVariant::ULongLong);
+ item = addItemInfo(group, "Characters", i18n("Characters"), TQVariant::ULongLong);
setAttributes(item, KFileMimeTypeInfo::Averaged);
- item = addItemInfo(group, "Format", i18n("Format"), QVariant::String);
+ item = addItemInfo(group, "Format", i18n("Format"), TQVariant::String);
}
bool KTxtPlugin::readInfo(KFileMetaInfo& info, uint)
@@ -59,7 +59,7 @@ bool KTxtPlugin::readInfo(KFileMetaInfo& info, uint)
if ( info.path().isEmpty() ) // remote file
return false;
- QFile f(info.path());
+ TQFile f(info.path());
if (!f.open(IO_ReadOnly))
return false;
@@ -67,8 +67,8 @@ bool KTxtPlugin::readInfo(KFileMetaInfo& info, uint)
int totLines = 0;
int totWords = 0;
unsigned long long totChars = f.size();
- QString fileFormat;
- QString line;
+ TQString fileFormat;
+ TQString line;
bool skipTotals = (totChars > 100*1024); // 100K is the max we read
unsigned int bytesRead = 0;
@@ -79,7 +79,7 @@ bool KTxtPlugin::readInfo(KFileMetaInfo& info, uint)
int len = line.length();
// The checks below are necessary to handle embedded NULLs
- // QFile::readLine() does not handle them well
+ // TQFile::readLine() does not handle them well
bytesRead += len;
if (bytesRead > totChars)
break;
@@ -102,7 +102,7 @@ bool KTxtPlugin::readInfo(KFileMetaInfo& info, uint)
break;
}
- totWords += (QStringList::split(QRegExp("\\s+"), line)).count();
+ totWords += (TQStringList::split(TQRegExp("\\s+"), line)).count();
totLines++;
}
diff --git a/kfile-plugins/txt/kfile_txt.h b/kfile-plugins/txt/kfile_txt.h
index 9b0196d..ad926b1 100644
--- a/kfile-plugins/txt/kfile_txt.h
+++ b/kfile-plugins/txt/kfile_txt.h
@@ -29,11 +29,11 @@ class KTxtPlugin: public KFilePlugin
Q_OBJECT
public:
- KTxtPlugin(QObject *parent, const char *name, const QStringList& args);
+ KTxtPlugin(TQObject *parent, const char *name, const TQStringList& args);
virtual bool readInfo(KFileMetaInfo& info, uint what);
private:
- void makeMimeTypeInfo(const QString& mimeType);
+ void makeMimeTypeInfo(const TQString& mimeType);
};
#endif