diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
commit | 7346aee26bf190a7e70333c40fab4caca847cd27 (patch) | |
tree | 4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /kfile-plugins/html/kfile_html.cpp | |
parent | 23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff) | |
download | tdeaddons-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/html/kfile_html.cpp')
-rw-r--r-- | kfile-plugins/html/kfile_html.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
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; } |