From 4ae0c208b66e0f7954e194384464fe2d0a2c56dd Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:51:49 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kfile-plugins/c++/kfile_cpp.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'kfile-plugins/c++/kfile_cpp.cpp') 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 #include -#include -#include +#include +#include typedef KGenericFactory 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++; -- cgit v1.2.1