diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:51:49 +0000 |
commit | 4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch) | |
tree | b0a7cd1c184f0003c0292eb416ed27f674f9cc43 /kfile-plugins/c++/kfile_cpp.cpp | |
parent | 1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff) | |
download | tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kfile-plugins/c++/kfile_cpp.cpp')
-rw-r--r-- | kfile-plugins/c++/kfile_cpp.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/kfile-plugins/c++/kfile_cpp.cpp b/kfile-plugins/c++/kfile_cpp.cpp index 9ca4560b..0840ab7f 100644 --- a/kfile-plugins/c++/kfile_cpp.cpp +++ b/kfile-plugins/c++/kfile_cpp.cpp @@ -24,15 +24,15 @@ #include <kgenericfactory.h> #include <kdebug.h> -#include <qfile.h> -#include <qregexp.h> +#include <tqfile.h> +#include <tqregexp.h> typedef KGenericFactory<KCppPlugin> CppFactory; K_EXPORT_COMPONENT_FACTORY(kfile_cpp, CppFactory("kfile_cpp")) -KCppPlugin::KCppPlugin(QObject *parent, const char *name, - const QStringList &args) +KCppPlugin::KCppPlugin(TQObject *parent, const char *name, + const TQStringList &args) : KFilePlugin(parent, name, args) { kdDebug(7034) << "c++ plugin\n"; @@ -40,7 +40,7 @@ KCppPlugin::KCppPlugin(QObject *parent, const char *name, makeMimeTypeInfo("text/x-chdr"); } -void KCppPlugin::makeMimeTypeInfo(const QString& mimetype) +void KCppPlugin::makeMimeTypeInfo(const TQString& mimetype) { KFileMimeTypeInfo* info = addMimeTypeInfo( mimetype ); @@ -48,25 +48,25 @@ void KCppPlugin::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, "Code", i18n("Code"), QVariant::Int); + item = addItemInfo(group, "Code", i18n("Code"), TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Averaged); - item = addItemInfo(group, "Comment", i18n("Comment"), QVariant::Int); + item = addItemInfo(group, "Comment", i18n("Comment"), TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Averaged); - item = addItemInfo(group, "Blank", i18n("Blank"), QVariant::Int); + item = addItemInfo(group, "Blank", i18n("Blank"), TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Averaged); - item = addItemInfo(group, "Strings", i18n("Strings"), QVariant::Int); + item = addItemInfo(group, "Strings", i18n("Strings"), TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Averaged); - item = addItemInfo(group, "i18n Strings", i18n("i18n Strings"), QVariant::Int); + item = addItemInfo(group, "i18n Strings", i18n("i18n Strings"), TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Averaged); - item = addItemInfo(group, "Included Files", i18n("Included Files"), QVariant::Int); + item = addItemInfo(group, "Included Files", i18n("Included Files"), TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Averaged); } bool KCppPlugin::readInfo( KFileMetaInfo& info, uint ) { - QFile f(info.path()); + TQFile f(info.path()); if (!f.open(IO_ReadOnly)) return false; @@ -80,9 +80,9 @@ bool KCppPlugin::readInfo( KFileMetaInfo& info, uint ) bool inComment = false; - QString line; + TQString line; - QTextStream stream( &f ); + TQTextStream stream( &f ); while (!stream.eof()) { line = stream.readLine(); @@ -99,15 +99,15 @@ bool KCppPlugin::readInfo( KFileMetaInfo& info, uint ) if (!inComment) { codeLines++; - if (line.contains(QRegExp("^\\s*#\\s*include"))) Includes++; + if (line.contains(TQRegExp("^\\s*#\\s*include"))) Includes++; int pos = line.find("//"); if (pos>=0) commentLines++; // truncate the comment - we don't want to count strings in it line.truncate(pos); - Strings+=line.contains(QRegExp("\".*\"")); - Stringsi18n+=line.contains(QRegExp("(?:i18n|I18N_NOOP)\\s*\\(")); + Strings+=line.contains(TQRegExp("\".*\"")); + Stringsi18n+=line.contains(TQRegExp("(?:i18n|I18N_NOOP)\\s*\\(")); } else commentLines++; |