diff options
Diffstat (limited to 'kfile-plugins/txt')
-rw-r--r-- | kfile-plugins/txt/kfile_txt.cpp | 30 | ||||
-rw-r--r-- | kfile-plugins/txt/kfile_txt.h | 4 |
2 files changed, 17 insertions, 17 deletions
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 |