summaryrefslogtreecommitdiffstats
path: root/src/tools/ccsc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
commit0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch)
treeb95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/tools/ccsc
parentb79a2c28534cf09987eeeba3077fff9236df182a (diff)
downloadpiklab-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/ccsc')
-rw-r--r--src/tools/ccsc/ccsc.cpp22
-rw-r--r--src/tools/ccsc/ccsc.h14
-rw-r--r--src/tools/ccsc/ccsc_compile.cpp22
-rw-r--r--src/tools/ccsc/ccsc_compile.h13
-rw-r--r--src/tools/ccsc/gui/ccsc_ui.h1
5 files changed, 37 insertions, 35 deletions
diff --git a/src/tools/ccsc/ccsc.cpp b/src/tools/ccsc/ccsc.cpp
index b28f29a..c7b3098 100644
--- a/src/tools/ccsc/ccsc.cpp
+++ b/src/tools/ccsc/ccsc.cpp
@@ -8,7 +8,7 @@
***************************************************************************/
#include "ccsc.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include "ccsc_compile.h"
#include "ccsc_config.h"
@@ -17,9 +17,9 @@
#include "devices/base/device_group.h"
//----------------------------------------------------------------------------
-QStringList CCSC::Base::checkExecutableOptions(bool withWine) const
+TQStringList CCSC::Base::checkExecutableOptions(bool withWine) const
{
- QStringList args;
+ TQStringList args;
if (withWine) {
args += "+STDOUT";
args += "+FM";
@@ -33,7 +33,7 @@ PURL::Directory CCSC::Base::checkExecutableWorkingDirectory() const
return static_cast<const Group *>(_group)->checkExecutableUrl().directory();
}
-bool CCSC::Base::checkExecutableResult(bool withWine, QStringList &lines) const
+bool CCSC::Base::checkExecutableResult(bool withWine, TQStringList &lines) const
{
if (withWine) {
PURL::Url url = static_cast<const Group *>(_group)->checkExecutableUrl().toExtension("err");
@@ -57,10 +57,10 @@ CCSC::Group::Group()
_checkExecTmp.close();
}
-QValueList<const Device::Data *> CCSC::Group::getSupportedDevices(const QString &) const
+TQValueList<const Device::Data *> CCSC::Group::getSupportedDevices(const TQString &) const
{
- QValueList<const Device::Data *> list;
- QValueVector<QString> devices = Device::lister().group("pic")->supportedDevices();
+ TQValueList<const Device::Data *> list;
+ TQValueVector<TQString> devices = Device::lister().group("pic")->supportedDevices();
for (uint i=0; i<devices.count(); i++) {
const Device::Data *data = Device::lister().data(devices[i]);
Pic::Architecture arch = static_cast<const Pic::Data *>(data)->architecture();
@@ -85,9 +85,9 @@ Compile::Config *CCSC::Group::configFactory(::Project *project) const
return new Config(project);
}
-QString CCSC::Group::informationText() const
+TQString CCSC::Group::informationText() const
{
- return i18n("<a href=\"%1\">CCS Compiler</a> is a C compiler distributed by CCS.").arg("http://www.ccsinfo.com/content.php?page=compilers");
+ return i18n("<a href=\"%1\">CCS Compiler</a> is a C compiler distributed by CCS.").tqarg("http://www.ccsinfo.com/content.php?page=compilers");
}
Tool::Group::BaseData CCSC::Group::baseFactory(Tool::Category category) const
@@ -99,8 +99,8 @@ Tool::Group::BaseData CCSC::Group::baseFactory(Tool::Category category) const
VersionData CCSC::Group::getToolchainVersion()
{
if ( !Compile::Config::withWine(*this) ) {
- QStringList lines;
- if ( checkExecutable(Tool::Category::Compiler, lines) && lines.count()>=1 && lines[0].contains("3.") ) return VersionData(3, 0, 0);
+ TQStringList lines;
+ if ( checkExecutable(Tool::Category::Compiler, lines) && lines.count()>=1 && lines[0].tqcontains("3.") ) return VersionData(3, 0, 0);
}
return VersionData(4, 0, 0); // default
}
diff --git a/src/tools/ccsc/ccsc.h b/src/tools/ccsc/ccsc.h
index aef2005..dd8d286 100644
--- a/src/tools/ccsc/ccsc.h
+++ b/src/tools/ccsc/ccsc.h
@@ -18,11 +18,11 @@ namespace CCSC
class Base : public Tool::Base
{
public:
- virtual QString baseExecutable(bool, Tool::OutputExecutableType) const { return "ccsc"; }
+ virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const { return "ccsc"; }
private:
- virtual QStringList checkExecutableOptions(bool withWine) const;
- virtual bool checkExecutableResult(bool withWine, QStringList &lines) const;
+ virtual TQStringList checkExecutableOptions(bool withWine) const;
+ virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const;
virtual PURL::Directory checkExecutableWorkingDirectory() const;
};
@@ -32,9 +32,9 @@ class Group : public Tool::Group
public:
Group();
PURL::Url checkExecutableUrl() const { return _checkExecTmp.url(); }
- virtual QString name() const { return "ccsc"; }
- virtual QString label() const { return i18n("CCS Compiler"); }
- virtual QString informationText() const;
+ virtual TQString name() const { return "ccsc"; }
+ virtual TQString label() const { return i18n("CCS Compiler"); }
+ virtual TQString informationText() const;
virtual Tool::Category checkDevicesCategory() const { return Tool::Category::Nb_Types; }
virtual Tool::ExecutableType preferedExecutableType() const { return Tool::ExecutableType::Unix; }
virtual Tool::CompileType compileType() const { return Tool::SingleFile; }
@@ -44,7 +44,7 @@ private:
Log::StringView _sview;
PURL::TempFile _checkExecTmp;
- 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 BaseData baseFactory(Tool::Category) const;
diff --git a/src/tools/ccsc/ccsc_compile.cpp b/src/tools/ccsc/ccsc_compile.cpp
index 56897e8..15ccedf 100644
--- a/src/tools/ccsc/ccsc_compile.cpp
+++ b/src/tools/ccsc/ccsc_compile.cpp
@@ -14,7 +14,7 @@
#include "devices/list/device_list.h"
#include "devices/pic/base/pic.h"
-QString CCSC::CompileFile::familyName() const
+TQString CCSC::CompileFile::familyName() const
{
const Pic::Data *pdata = static_cast<const Pic::Data *>(Device::lister().data(_data.device));
switch (pdata->architecture().type()) {
@@ -31,13 +31,13 @@ QString CCSC::CompileFile::familyName() const
case Pic::Architecture::Nb_Types: break;
}
Q_ASSERT(false);
- return QString::null;
+ return TQString();
}
-QStringList CCSC::CompileFile::genericArguments(const Compile::Config &config) const
+TQStringList CCSC::CompileFile::genericArguments(const Compile::Config &config) const
{
bool isVersion3 = ( static_cast<const Group &>(Main::toolGroup()).version().majorNum()==3 );
- QStringList args;
+ TQStringList args;
args += "+STDOUT"; // output messages on stdout
if ( !isVersion3 ) args += "+EA"; // show all messages and warnings
args += "-P"; // close compile windows after compilation done
@@ -55,25 +55,25 @@ QStringList CCSC::CompileFile::genericArguments(const Compile::Config &config) c
return args;
}
-void CCSC::CompileFile::logStderrLine(const QString &line)
+void CCSC::CompileFile::logStderrLine(const TQString &line)
{
// ignore output for wine
if ( !Compile::Config::withWine(group()) ) parseLine(line);
}
-void CCSC::CompileFile::parseLine(const QString &line)
+void CCSC::CompileFile::parseLine(const TQString &line)
{
Log::LineType type;
if ( line.startsWith(">>>") ) type = Log::LineType::Warning;
else if ( line.startsWith("***") ) type = Log::LineType::Error;
else if ( line.startsWith("---") ) type = Log::LineType::Information;
else {
- doLog(Log::LineType::Normal, line, QString::null, 0); // unrecognized
+ doLog(Log::LineType::Normal, line, TQString(), 0); // unrecognized
return;
}
if ( parseErrorLine(line, Compile::ParseErrorData("[*>-]+\\s\\w+\\s\\d+\\s\"([^\"]*)\"\\sLine\\s(\\d+)\\([^)]*\\):(.*)", 1, 2, 3, type)) ) return;
if ( parseErrorLine(line, Compile::ParseErrorData("[*>-]+\\s\"([^\"]*)\"\\sLine\\s(\\d+):\\s\\w+\\s#\\d+:(.*)", 1, 2, 3, type)) ) return;
- doLog(type, line, QString::null, 0);
+ doLog(type, line, TQString(), 0);
}
void CCSC::CompileFile::done(int code)
@@ -83,9 +83,9 @@ void CCSC::CompileFile::done(int code)
PURL::Url url = PURL::Url(directory(), inputFilepath(0)).toExtension("err");
Log::StringView sview;
PURL::File file(url, sview);
- if ( !file.openForRead() ) doLog(Log::LineType::Error, i18n("Could not find error file (%1).").arg(url.pretty()), QString::null, 0);
+ if ( !file.openForRead() ) doLog(Log::LineType::Error, i18n("Could not find error file (%1).").tqarg(url.pretty()), TQString(), 0);
else {
- QStringList lines = file.readLines();
+ TQStringList lines = file.readLines();
for (uint i=0; i<lines.count(); i++) parseLine(lines[i]);
}
}
@@ -101,7 +101,7 @@ PURL::Url CCSC::CompileFile::url(PURL::FileType type, uint i) const
return url.toFileType(type);
}
-QString CCSC::CompileFile::outputFiles() const
+TQString CCSC::CompileFile::outputFiles() const
{
return "PURL::Lst PURL::Hex PURL::Coff PURL::Cod sym err esym occ";
}
diff --git a/src/tools/ccsc/ccsc_compile.h b/src/tools/ccsc/ccsc_compile.h
index ddf8f20..949714b 100644
--- a/src/tools/ccsc/ccsc_compile.h
+++ b/src/tools/ccsc/ccsc_compile.h
@@ -17,19 +17,20 @@ namespace CCSC
class CompileFile : public Compile::Process
{
Q_OBJECT
+ TQ_OBJECT
protected:
- virtual QString deviceName() const { return QString::null; }
- virtual QString familyName() const;
- virtual QStringList genericArguments(const Compile::Config &config) const;
- virtual void logStderrLine(const QString &line);
- virtual QString outputFiles() const;
+ virtual TQString deviceName() const { return TQString(); }
+ virtual TQString familyName() const;
+ virtual TQStringList genericArguments(const Compile::Config &config) const;
+ virtual void logStderrLine(const TQString &line);
+ virtual TQString outputFiles() const;
virtual PURL::Url url(PURL::FileType type = PURL::Nb_FileTypes, uint i = 0) const;
protected slots:
virtual void done(int code);
private:
- void parseLine(const QString &line);
+ void parseLine(const TQString &line);
};
} // namespace
diff --git a/src/tools/ccsc/gui/ccsc_ui.h b/src/tools/ccsc/gui/ccsc_ui.h
index 356cf22..298dcf6 100644
--- a/src/tools/ccsc/gui/ccsc_ui.h
+++ b/src/tools/ccsc/gui/ccsc_ui.h
@@ -18,6 +18,7 @@ namespace CCSC
class ConfigWidget : public ToolConfigWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
ConfigWidget(Project *project);
virtual void initEntries();