diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
commit | 0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch) | |
tree | b95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/tools/picc | |
parent | b79a2c28534cf09987eeeba3077fff9236df182a (diff) | |
download | piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip |
TQt4 port piklab
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/tools/picc')
-rw-r--r-- | src/tools/picc/gui/picc_ui.h | 1 | ||||
-rw-r--r-- | src/tools/picc/picc.cpp | 32 | ||||
-rw-r--r-- | src/tools/picc/picc.h | 32 | ||||
-rw-r--r-- | src/tools/picc/picc_compile.cpp | 44 | ||||
-rw-r--r-- | src/tools/picc/picc_compile.h | 39 |
5 files changed, 78 insertions, 70 deletions
diff --git a/src/tools/picc/gui/picc_ui.h b/src/tools/picc/gui/picc_ui.h index ec096c2..261e4dc 100644 --- a/src/tools/picc/gui/picc_ui.h +++ b/src/tools/picc/gui/picc_ui.h @@ -18,6 +18,7 @@ namespace PICC class ConfigWidget : public ToolConfigWidget { Q_OBJECT + TQ_OBJECT public: ConfigWidget(Project *project); virtual void initEntries(); diff --git a/src/tools/picc/picc.cpp b/src/tools/picc/picc.cpp index f0d6e83..060aa4c 100644 --- a/src/tools/picc/picc.cpp +++ b/src/tools/picc/picc.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "picc.h" -#include <qregexp.h> +#include <tqregexp.h> #include "picc_compile.h" #include "picc_config.h" @@ -17,36 +17,36 @@ #include "common/global/process.h" //---------------------------------------------------------------------------- -bool PICC::Base::checkExecutableResult(bool, QStringList &lines) const +bool PICC::Base::checkExecutableResult(bool, TQStringList &lines) const { - return lines.join(" ").contains("HI-TECH"); + return lines.join(" ").tqcontains("HI-TECH"); } -QString PICC::BaseLite::baseExecutable(bool, Tool::OutputExecutableType) const +TQString PICC::BaseLite::baseExecutable(bool, Tool::OutputExecutableType) const { if ( _category.type()==Tool::Category::Librarian ) return "libr"; return "picl"; } -QString PICC::BaseNormal::baseExecutable(bool, Tool::OutputExecutableType) const +TQString PICC::BaseNormal::baseExecutable(bool, Tool::OutputExecutableType) const { if ( _category.type()==Tool::Category::Librarian ) return "libr"; return "picc"; } -QString PICC::Base18::baseExecutable(bool, Tool::OutputExecutableType) const +TQString PICC::Base18::baseExecutable(bool, Tool::OutputExecutableType) const { if ( _category.type()==Tool::Category::Librarian ) return "libr"; return "picc18"; } //---------------------------------------------------------------------------- -QValueList<const Device::Data *> PICC::Group::getSupportedDevices(const QString &s) const +TQValueList<const Device::Data *> PICC::Group::getSupportedDevices(const TQString &s) const { - QValueList<const Device::Data *> list; - QStringList lines = QStringList::split('\n', s); + TQValueList<const Device::Data *> list; + TQStringList lines = TQStringList::split('\n', s); for (uint i=0; i<lines.count(); i++) { - QRegExp re("([A-Za-z0-9]+):.*"); + TQRegExp re("([A-Za-z0-9]+):.*"); if ( !re.exactMatch(lines[i]) ) continue; const Device::Data *data = Device::lister().data(re.cap(1)); if (data) list.append(data); @@ -88,9 +88,9 @@ PURL::FileType PICC::Group::implementationType(PURL::ToolType type) const } //---------------------------------------------------------------------------- -QString PICC::PICCLiteGroup::informationText() const +TQString PICC::PICCLiteGroup::informationText() const { - return i18n("<a href=\"%1\">PICC-Lite</a> is a freeware C compiler distributed by HTSoft.").arg("http://www.htsoft.com"); + return i18n("<a href=\"%1\">PICC-Lite</a> is a freeware C compiler distributed by HTSoft.").tqarg("http://www.htsoft.com"); } Tool::Group::BaseData PICC::PICCLiteGroup::baseFactory(Tool::Category category) const @@ -101,9 +101,9 @@ Tool::Group::BaseData PICC::PICCLiteGroup::baseFactory(Tool::Category category) } //---------------------------------------------------------------------------- -QString PICC::PICCGroup::informationText() const +TQString PICC::PICCGroup::informationText() const { - return i18n("<a href=\"%1\">PICC</a> is a C compiler distributed by HTSoft.").arg("http://www.htsoft.com"); + return i18n("<a href=\"%1\">PICC</a> is a C compiler distributed by HTSoft.").tqarg("http://www.htsoft.com"); } Tool::Group::BaseData PICC::PICCGroup::baseFactory(Tool::Category category) const @@ -114,9 +114,9 @@ Tool::Group::BaseData PICC::PICCGroup::baseFactory(Tool::Category category) cons } //---------------------------------------------------------------------------- -QString PICC::PICC18Group::informationText() const +TQString PICC::PICC18Group::informationText() const { - return i18n("<a href=\"%1\">PICC 18</a> is a C compiler distributed by HTSoft.").arg("http://www.htsoft.com"); + return i18n("<a href=\"%1\">PICC 18</a> is a C compiler distributed by HTSoft.").tqarg("http://www.htsoft.com"); } Tool::Group::BaseData PICC::PICC18Group::baseFactory(Tool::Category category) const diff --git a/src/tools/picc/picc.h b/src/tools/picc/picc.h index af44d02..ec017b9 100644 --- a/src/tools/picc/picc.h +++ b/src/tools/picc/picc.h @@ -17,26 +17,26 @@ namespace PICC class Base : public Tool::Base { private: - virtual QStringList checkExecutableOptions(bool) const { return "--ver"; } - virtual bool checkExecutableResult(bool withWine, QStringList &lines) const; + virtual TQStringList checkExecutableOptions(bool) const { return "--ver"; } + virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const; }; class BaseLite : public Base { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const; + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const; }; class BaseNormal : public Base { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const; + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const; }; class Base18 : public Base { public: - virtual QString baseExecutable(bool, Tool::OutputExecutableType) const; + virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const; }; //---------------------------------------------------------------------------- @@ -44,13 +44,13 @@ class Group : public Tool::Group { public: virtual Tool::Category checkDevicesCategory() const { return Tool::Category::Compiler; } - virtual QStringList checkDevicesOptions(uint) const { return "--CHIPINFO"; } + virtual TQStringList checkDevicesOptions(uint) const { return "--CHIPINFO"; } virtual Tool::ExecutableType preferedExecutableType() const { return Tool::ExecutableType::Unix; } virtual Tool::CompileType compileType() const { return Tool::SeparateFiles; } virtual PURL::FileType implementationType(PURL::ToolType type) const; private: - virtual QValueList<const Device::Data *> getSupportedDevices(const QString &s) const; + virtual TQValueList<const Device::Data *> getSupportedDevices(const TQString &s) const; virtual Compile::Process *processFactory(const Compile::Data &data) const; virtual Compile::Config *configFactory(::Project *project) const; virtual Tool::SourceGenerator *sourceGeneratorFactory() const { /*TODO*/ return 0; } @@ -60,9 +60,9 @@ private: class PICCLiteGroup : public Group { public: - virtual QString name() const { return "picclite"; } - virtual QString label() const { return i18n("PICC Lite Compiler"); } - virtual QString informationText() const; + virtual TQString name() const { return "picclite"; } + virtual TQString label() const { return i18n("PICC Lite Compiler"); } + virtual TQString informationText() const; private: virtual BaseData baseFactory(Tool::Category) const; @@ -72,9 +72,9 @@ private: class PICCGroup : public Group { public: - virtual QString name() const { return "picc"; } - virtual QString label() const { return i18n("PICC Compiler"); } - virtual QString informationText() const; + virtual TQString name() const { return "picc"; } + virtual TQString label() const { return i18n("PICC Compiler"); } + virtual TQString informationText() const; private: virtual BaseData baseFactory(Tool::Category) const; @@ -84,9 +84,9 @@ private: class PICC18Group : public Group { public: - virtual QString name() const { return "picc18"; } - virtual QString label() const { return i18n("PICC-18 Compiler"); } - virtual QString informationText() const; + virtual TQString name() const { return "picc18"; } + virtual TQString label() const { return i18n("PICC-18 Compiler"); } + virtual TQString informationText() const; private: virtual BaseData baseFactory(Tool::Category) const; diff --git a/src/tools/picc/picc_compile.cpp b/src/tools/picc/picc_compile.cpp index 63fd127..ca390fc 100644 --- a/src/tools/picc/picc_compile.cpp +++ b/src/tools/picc/picc_compile.cpp @@ -11,9 +11,9 @@ #include "picc_config.h" //----------------------------------------------------------------------------- -QStringList PICC::Process::genericArguments(const Compile::Config &) const +TQStringList PICC::Process::genericArguments(const Compile::Config &) const { - QStringList args; + TQStringList args; args += "--ERRFORMAT"; args += "--WARNFORMAT"; args += "--MSGFORMAT"; @@ -23,16 +23,16 @@ QStringList PICC::Process::genericArguments(const Compile::Config &) const return args; } -void PICC::Process::logStderrLine(const QString &line) +void PICC::Process::logStderrLine(const TQString &line) { // #### TODO - doLog(Log::LineType::Normal, line, QString::null, 0); + doLog(Log::LineType::Normal, line, TQString(), 0); } //----------------------------------------------------------------------------- -QStringList PICC::CompileStandaloneFile::genericArguments(const Compile::Config &config) const +TQStringList PICC::CompileStandaloneFile::genericArguments(const Compile::Config &config) const { - QStringList args = Process::genericArguments(config); + TQStringList args = Process::genericArguments(config); args += "-M%MAP"; args += "-G%SYM"; args += "--ASMLIST"; @@ -42,15 +42,15 @@ QStringList PICC::CompileStandaloneFile::genericArguments(const Compile::Config return args; } -QString PICC::CompileStandaloneFile::outputFiles() const +TQString PICC::CompileStandaloneFile::outputFiles() const { return "PURL::Lst PURL::Map obj PURL::Hex PURL::Coff sym sdb hxl rlf"; } //----------------------------------------------------------------------------- -QStringList PICC::CompileProjectFile::genericArguments(const Compile::Config &config) const +TQStringList PICC::CompileProjectFile::genericArguments(const Compile::Config &config) const { - QStringList args = Process::genericArguments(config); + TQStringList args = Process::genericArguments(config); args += "-S"; args += config.includeDirs(Tool::Category::Compiler, "-I"); args += config.customOptions(Tool::Category::Compiler); @@ -58,15 +58,15 @@ QStringList PICC::CompileProjectFile::genericArguments(const Compile::Config &co return args; } -QString PICC::CompileProjectFile::outputFiles() const +TQString PICC::CompileProjectFile::outputFiles() const { return "PURL::AsmPICC"; } //----------------------------------------------------------------------------- -QStringList PICC::AssembleStandaloneFile::genericArguments(const Compile::Config &config) const +TQStringList PICC::AssembleStandaloneFile::genericArguments(const Compile::Config &config) const { - QStringList args = Process::genericArguments(config); + TQStringList args = Process::genericArguments(config); args += "-M%MAP"; args += "-G%SYM"; args += "--ASMLIST"; @@ -76,15 +76,15 @@ QStringList PICC::AssembleStandaloneFile::genericArguments(const Compile::Config return args; } -QString PICC::AssembleStandaloneFile::outputFiles() const +TQString PICC::AssembleStandaloneFile::outputFiles() const { return "PURL::Lst PURL::Map obj PURL::Hex sym sdb hxl rlf"; } //----------------------------------------------------------------------------- -QStringList PICC::AssembleProjectFile::genericArguments(const Compile::Config &config) const +TQStringList PICC::AssembleProjectFile::genericArguments(const Compile::Config &config) const { - QStringList args = Process::genericArguments(config); + TQStringList args = Process::genericArguments(config); args += "-C"; args += "--ASMLIST"; args += config.includeDirs(Tool::Category::Assembler, "-I"); @@ -93,15 +93,15 @@ QStringList PICC::AssembleProjectFile::genericArguments(const Compile::Config &c return args; } -QString PICC::AssembleProjectFile::outputFiles() const +TQString PICC::AssembleProjectFile::outputFiles() const { return "obj PURL::Lst rlf"; } //----------------------------------------------------------------------------- -QStringList PICC::LinkProject::genericArguments(const Compile::Config &config) const +TQStringList PICC::LinkProject::genericArguments(const Compile::Config &config) const { - QStringList args = Process::genericArguments(config); + TQStringList args = Process::genericArguments(config); args += "-O%O"; args += "-M%MAP"; args += "-G%SYM"; @@ -113,15 +113,15 @@ QStringList PICC::LinkProject::genericArguments(const Compile::Config &config) c return args; } -QString PICC::LinkProject::outputFiles() const +TQString PICC::LinkProject::outputFiles() const { return "PURL::Map PURL::Hex PURL::Coff sym sdb hxl"; } //----------------------------------------------------------------------------- -QStringList PICC::LibraryProject::genericArguments(const Compile::Config &config) const +TQStringList PICC::LibraryProject::genericArguments(const Compile::Config &config) const { - QStringList args; + TQStringList args; args += config.customOptions(Tool::Category::Librarian); args += "r"; args += "%O"; @@ -130,7 +130,7 @@ QStringList PICC::LibraryProject::genericArguments(const Compile::Config &config return args; } -QString PICC::LibraryProject::outputFiles() const +TQString PICC::LibraryProject::outputFiles() const { return "PURL::Library"; } diff --git a/src/tools/picc/picc_compile.h b/src/tools/picc/picc_compile.h index 6db92ca..972a6d0 100644 --- a/src/tools/picc/picc_compile.h +++ b/src/tools/picc/picc_compile.h @@ -17,65 +17,72 @@ namespace PICC class Process : public Compile::Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString deviceName() const { return _data.device; } - virtual QStringList genericArguments(const Compile::Config &config) const; - virtual void logStderrLine(const QString &line); - virtual QString objectExtension() const { return "obj"; } + virtual TQString deviceName() const { return _data.device; } + virtual TQStringList genericArguments(const Compile::Config &config) const; + virtual void logStderrLine(const TQString &line); + virtual TQString objectExtension() const { return "obj"; } }; //----------------------------------------------------------------------------- class CompileStandaloneFile : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString outputFiles() const; - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class CompileProjectFile : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString outputFiles() const; - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class AssembleStandaloneFile : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString outputFiles() const; - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class AssembleProjectFile : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString outputFiles() const; - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class LinkProject : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString outputFiles() const; - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; //----------------------------------------------------------------------------- class LibraryProject : public Process { Q_OBJECT + TQ_OBJECT protected: - virtual QString outputFiles() const; - virtual QStringList genericArguments(const Compile::Config &config) const; + virtual TQString outputFiles() const; + virtual TQStringList genericArguments(const Compile::Config &config) const; }; } // namespace |