diff options
Diffstat (limited to 'kfile-plugins')
-rw-r--r-- | kfile-plugins/c++/kfile_cpp.cpp | 36 | ||||
-rw-r--r-- | kfile-plugins/c++/kfile_cpp.h | 4 | ||||
-rw-r--r-- | kfile-plugins/diff/kfile_diff.cpp | 102 | ||||
-rw-r--r-- | kfile-plugins/diff/kfile_diff.h | 14 | ||||
-rw-r--r-- | kfile-plugins/ts/kfile_ts.cpp | 24 | ||||
-rw-r--r-- | kfile-plugins/ts/kfile_ts.h | 4 |
6 files changed, 92 insertions, 92 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++; diff --git a/kfile-plugins/c++/kfile_cpp.h b/kfile-plugins/c++/kfile_cpp.h index c4388278..29497ae8 100644 --- a/kfile-plugins/c++/kfile_cpp.h +++ b/kfile-plugins/c++/kfile_cpp.h @@ -30,11 +30,11 @@ class KCppPlugin: public KFilePlugin Q_OBJECT public: - KCppPlugin(QObject *parent, const char *name, const QStringList& args); + KCppPlugin(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 diff --git a/kfile-plugins/diff/kfile_diff.cpp b/kfile-plugins/diff/kfile_diff.cpp index 0f2fa02d..957d0574 100644 --- a/kfile-plugins/diff/kfile_diff.cpp +++ b/kfile-plugins/diff/kfile_diff.cpp @@ -27,12 +27,12 @@ ** Added support for Subversion diffs, September 11, 2003 Otto Bruggeman */ -#include <qcstring.h> -#include <qdatetime.h> -#include <qdict.h> -#include <qfile.h> -#include <qregexp.h> -#include <qvalidator.h> +#include <tqcstring.h> +#include <tqdatetime.h> +#include <tqdict.h> +#include <tqfile.h> +#include <tqregexp.h> +#include <tqvalidator.h> #include <kdebug.h> #include <kgenericfactory.h> @@ -44,8 +44,8 @@ K_EXPORT_COMPONENT_FACTORY(kfile_diff, KGenericFactory<KDiffPlugin>("kfile_diff")) -KDiffPlugin::KDiffPlugin(QObject *parent, const char *name, - const QStringList &preferredItems) +KDiffPlugin::KDiffPlugin(TQObject *parent, const char *name, + const TQStringList &preferredItems) : KFilePlugin(parent, name, preferredItems) { kdDebug(7034) << "diff plugin" << endl; @@ -54,15 +54,15 @@ KDiffPlugin::KDiffPlugin(QObject *parent, const char *name, KFileMimeTypeInfo::GroupInfo* group; group = addGroupInfo( info, "General", i18n( "General" ) ); - addItemInfo( group, "Files", i18n( "Files" ), QVariant::UInt ); - addItemInfo( group, "First", i18n( "First File" ), QVariant::String ); - addItemInfo( group, "Format", i18n( "Format" ), QVariant::String ); - addItemInfo( group, "DiffProgram", i18n( "Diff Program" ), QVariant::String ); - addItemInfo( group, "Hunks", i18n( "Hunks" ), QVariant::UInt ); + addItemInfo( group, "Files", i18n( "Files" ), TQVariant::UInt ); + addItemInfo( group, "First", i18n( "First File" ), TQVariant::String ); + addItemInfo( group, "Format", i18n( "Format" ), TQVariant::String ); + addItemInfo( group, "DiffProgram", i18n( "Diff Program" ), TQVariant::String ); + addItemInfo( group, "Hunks", i18n( "Hunks" ), TQVariant::UInt ); group = addGroupInfo( info, "Statistics", i18n( "Statistics" ) ); - addItemInfo( group, "Insert", i18n( "Insertions" ), QVariant::UInt ); - addItemInfo( group, "Modify", i18n( "Changes" ), QVariant::UInt ); - addItemInfo( group, "Delete", i18n( "Deletions" ), QVariant::UInt ); + addItemInfo( group, "Insert", i18n( "Insertions" ), TQVariant::UInt ); + addItemInfo( group, "Modify", i18n( "Changes" ), TQVariant::UInt ); + addItemInfo( group, "Delete", i18n( "Deletions" ), TQVariant::UInt ); } bool KDiffPlugin::readInfo( KFileMetaInfo& info, uint what ) @@ -75,12 +75,12 @@ bool KDiffPlugin::readInfo( KFileMetaInfo& info, uint what ) KFileMetaInfoGroup group; - QFile file( info.path() ); - QStringList lines; + TQFile file( info.path() ); + TQStringList lines; if( file.open( IO_ReadOnly ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); while (!stream.eof()) { lines.append( stream.readLine() ); @@ -88,8 +88,8 @@ bool KDiffPlugin::readInfo( KFileMetaInfo& info, uint what ) file.close(); } - QString format; - QString program; + TQString format; + TQString program; enum KDiffPlugin::Format diffFormat; enum KDiffPlugin::DiffProgram diffProgram; @@ -114,9 +114,9 @@ bool KDiffPlugin::readInfo( KFileMetaInfo& info, uint what ) determineDiffInfo( lines, diffFormat, &numberOfFiles, &numberOfHunks, &numberOfAdditions, &numberOfChanges, &numberOfDeletions ); } - QString filename; - QRegExp firstFile( "^Index: (.*)" ); - QStringList::ConstIterator it = lines.begin(); + TQString filename; + TQRegExp firstFile( "^Index: (.*)" ); + TQStringList::ConstIterator it = lines.begin(); it = lines.begin(); while ( it != lines.end() ) @@ -196,39 +196,39 @@ bool KDiffPlugin::readInfo( KFileMetaInfo& info, uint what ) return dataSet; } -enum KDiffPlugin::Format KDiffPlugin::determineDiffFormat( const QStringList lines ) const +enum KDiffPlugin::Format KDiffPlugin::determineDiffFormat( const TQStringList lines ) const { - QString line; + TQString line; if ( lines.count() == 0 ) { return KDiffPlugin::Empty; } - QStringList::ConstIterator it = lines.begin(); + TQStringList::ConstIterator it = lines.begin(); while ( it != lines.end() ) { line = (*it); - if ( line.find( QRegExp( "^[0-9]+[0-9,]*[acd][0-9]+[0-9,]*$" ), 0 ) == 0 ) + if ( line.find( TQRegExp( "^[0-9]+[0-9,]*[acd][0-9]+[0-9,]*$" ), 0 ) == 0 ) { return KDiffPlugin::Normal; } - else if ( line.find( QRegExp( "^--- " ), 0 ) == 0 ) + else if ( line.find( TQRegExp( "^--- " ), 0 ) == 0 ) { // unified has first a '^--- ' line, then a '^+++ ' line return KDiffPlugin::Unified; } - else if ( line.find( QRegExp( "^\\*\\*\\* [^\\t]+\\t" ), 0 ) == 0 ) + else if ( line.find( TQRegExp( "^\\*\\*\\* [^\\t]+\\t" ), 0 ) == 0 ) { // context has first a '^*** ' line, then a '^--- ' line return KDiffPlugin::Context; } - else if ( line.find( QRegExp( "^[acd][0-9]+ [0-9]+" ), 0 ) == 0 ) + else if ( line.find( TQRegExp( "^[acd][0-9]+ [0-9]+" ), 0 ) == 0 ) { return KDiffPlugin::RCS; } - else if ( line.find( QRegExp( "^[0-9]+[0-9,]*[acd]" ), 0 ) == 0 ) + else if ( line.find( TQRegExp( "^[0-9]+[0-9,]*[acd]" ), 0 ) == 0 ) { return KDiffPlugin::Ed; } @@ -237,17 +237,17 @@ enum KDiffPlugin::Format KDiffPlugin::determineDiffFormat( const QStringList lin return KDiffPlugin::Unknown; } -enum KDiffPlugin::DiffProgram KDiffPlugin::determineDiffProgram( const QStringList lines ) const +enum KDiffPlugin::DiffProgram KDiffPlugin::determineDiffProgram( const TQStringList lines ) const { if ( lines.count() == 0 ) { return KDiffPlugin::Undeterminable; } - QStringList::ConstIterator it = lines.begin(); + TQStringList::ConstIterator it = lines.begin(); // very crude, might need some more refining - QRegExp diffRE( "^diff .*" ); - QRegExp p4sRE("^==== "); + TQRegExp diffRE( "^diff .*" ); + TQRegExp p4sRE("^==== "); bool indexFound = false; @@ -271,9 +271,9 @@ enum KDiffPlugin::DiffProgram KDiffPlugin::determineDiffProgram( const QStringLi return KDiffPlugin::Undeterminable; } -const QString KDiffPlugin::determineI18nedFormat( enum KDiffPlugin::Format diffFormat ) const +const TQString KDiffPlugin::determineI18nedFormat( enum KDiffPlugin::Format diffFormat ) const { - QString format; + TQString format; switch( diffFormat ) { case KDiffPlugin::Context: @@ -303,9 +303,9 @@ const QString KDiffPlugin::determineI18nedFormat( enum KDiffPlugin::Format diffF return format; } -const QString KDiffPlugin::determineI18nedProgram( enum KDiffPlugin::DiffProgram diffProgram ) const +const TQString KDiffPlugin::determineI18nedProgram( enum KDiffPlugin::DiffProgram diffProgram ) const { - QString program; + TQString program; switch( diffProgram ) { @@ -331,7 +331,7 @@ const QString KDiffPlugin::determineI18nedProgram( enum KDiffPlugin::DiffProgram return program; } -void KDiffPlugin::determineDiffInfo( const QStringList lines, +void KDiffPlugin::determineDiffInfo( const TQStringList lines, enum KDiffPlugin::Format diffFormat, int* numberOfFiles, int* numberOfHunks, @@ -339,20 +339,20 @@ void KDiffPlugin::determineDiffInfo( const QStringList lines, int* numberOfChanges, int* numberOfDeletions ) { - QString line; + TQString line; - QRegExp edAdd( "([0-9]+)(|,([0-9]+))a" ); - QRegExp edDel( "([0-9]+)(|,([0-9]+))d" ); - QRegExp edMod( "([0-9]+)(|,([0-9]+))c" ); + TQRegExp edAdd( "([0-9]+)(|,([0-9]+))a" ); + TQRegExp edDel( "([0-9]+)(|,([0-9]+))d" ); + TQRegExp edMod( "([0-9]+)(|,([0-9]+))c" ); - QRegExp normalAdd( "[0-9]+a([0-9]+)(|,([0-9]+))" ); - QRegExp normalDel( "([0-9]+)(|,([0-9]+))d(|[0-9]+)" ); - QRegExp normalMod( "([0-9]+)(|,([0-9]+))c([0-9]+)(|,([0-9]+))" ); + TQRegExp normalAdd( "[0-9]+a([0-9]+)(|,([0-9]+))" ); + TQRegExp normalDel( "([0-9]+)(|,([0-9]+))d(|[0-9]+)" ); + TQRegExp normalMod( "([0-9]+)(|,([0-9]+))c([0-9]+)(|,([0-9]+))" ); - QRegExp rcsAdd( "a[0-9]+ ([0-9]+)" ); - QRegExp rcsDel( "d[0-9]+ ([0-9]+)" ); + TQRegExp rcsAdd( "a[0-9]+ ([0-9]+)" ); + TQRegExp rcsDel( "d[0-9]+ ([0-9]+)" ); - QStringList::ConstIterator it = lines.begin(); + TQStringList::ConstIterator it = lines.begin(); switch( diffFormat ) { diff --git a/kfile-plugins/diff/kfile_diff.h b/kfile-plugins/diff/kfile_diff.h index d32e176c..b395c5da 100644 --- a/kfile-plugins/diff/kfile_diff.h +++ b/kfile-plugins/diff/kfile_diff.h @@ -27,8 +27,8 @@ class KDiffPlugin: public KFilePlugin Q_OBJECT public: - KDiffPlugin( QObject *parent, const char *name, - const QStringList& preferredItems ); + KDiffPlugin( TQObject *parent, const char *name, + const TQStringList& preferredItems ); virtual bool readInfo( KFileMetaInfo& info, uint what ); @@ -38,12 +38,12 @@ public: enum DiffProgram { CVSDiff, Diff, Diff3, Perforce, SubVersion, Undeterminable }; // cant use Unknown again :( private: - enum Format determineDiffFormat ( const QStringList lines ) const; - enum DiffProgram determineDiffProgram ( const QStringList lines ) const; - const QString determineI18nedFormat ( enum KDiffPlugin::Format diffFormat ) const; - const QString determineI18nedProgram( enum KDiffPlugin::DiffProgram diffProgram ) const; + enum Format determineDiffFormat ( const TQStringList lines ) const; + enum DiffProgram determineDiffProgram ( const TQStringList lines ) const; + const TQString determineI18nedFormat ( enum KDiffPlugin::Format diffFormat ) const; + const TQString determineI18nedProgram( enum KDiffPlugin::DiffProgram diffProgram ) const; // yes ugly, it's better to use a struct or classmembers to pass these parameters around - void determineDiffInfo ( const QStringList lines, + void determineDiffInfo ( const TQStringList lines, enum KDiffPlugin::Format diffFormat, int* numberOfFiles, int* numberOfHunks, int* numberOfAdditions, int* numberOfChanges, int* numberOfDeletions ); diff --git a/kfile-plugins/ts/kfile_ts.cpp b/kfile-plugins/ts/kfile_ts.cpp index 3d84bb67..0d6f5dc1 100644 --- a/kfile-plugins/ts/kfile_ts.cpp +++ b/kfile-plugins/ts/kfile_ts.cpp @@ -22,20 +22,20 @@ #include <kgenericfactory.h> #include <kdebug.h> -#include <qfile.h> -#include <qstringlist.h> +#include <tqfile.h> +#include <tqstringlist.h> typedef KGenericFactory<KTsPlugin> TsFactory; K_EXPORT_COMPONENT_FACTORY(kfile_ts, TsFactory("kfile_ts")) -KTsPlugin::KTsPlugin(QObject *parent, const char *name, - const QStringList &args) : KFilePlugin(parent, name, args) +KTsPlugin::KTsPlugin(TQObject *parent, const char *name, + const TQStringList &args) : KFilePlugin(parent, name, args) { makeMimeTypeInfo( "application/x-linguist" ); } -void KTsPlugin::makeMimeTypeInfo(const QString& mimeType) +void KTsPlugin::makeMimeTypeInfo(const TQString& mimeType) { KFileMimeTypeInfo* info = addMimeTypeInfo(mimeType); @@ -43,18 +43,18 @@ void KTsPlugin::makeMimeTypeInfo(const QString& mimeType) addGroupInfo(info, "General", i18n("General")); KFileMimeTypeInfo::ItemInfo* item; - item = addItemInfo(group, "Messages", i18n("Messages"), QVariant::Int); + item = addItemInfo(group, "Messages", i18n("Messages"), TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Averaged); - item = addItemInfo(group, "Translated", i18n("Translated"), QVariant::Int); + item = addItemInfo(group, "Translated", i18n("Translated"), TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Averaged); - item = addItemInfo(group, "Untranslated", i18n("Untranslated"), QVariant::Int); + item = addItemInfo(group, "Untranslated", i18n("Untranslated"), TQVariant::Int); setAttributes(item, KFileMimeTypeInfo::Averaged); - item = addItemInfo(group, "Obsolete", i18n("Obsolete"), QVariant::Int); + item = addItemInfo(group, "Obsolete", i18n("Obsolete"), TQVariant::Int); } bool KTsPlugin::readInfo(KFileMetaInfo& info, uint) { - QFile f(info.path()); + TQFile f(info.path()); if (!f.open(IO_ReadOnly)) return false; @@ -62,8 +62,8 @@ bool KTsPlugin::readInfo(KFileMetaInfo& info, uint) int untranslated = 0; int obsolete = 0; - QTextStream stream( &f ); - QString line = stream.readLine(); + TQTextStream stream( &f ); + TQString line = stream.readLine(); // is it really a linguist file? if (!line.contains("<!DOCTYPE TS>", false)) diff --git a/kfile-plugins/ts/kfile_ts.h b/kfile-plugins/ts/kfile_ts.h index 8bf73293..4515422e 100644 --- a/kfile-plugins/ts/kfile_ts.h +++ b/kfile-plugins/ts/kfile_ts.h @@ -29,11 +29,11 @@ class KTsPlugin: public KFilePlugin Q_OBJECT public: - KTsPlugin(QObject *parent, const char *name, const QStringList& args); + KTsPlugin(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 |