summaryrefslogtreecommitdiffstats
path: root/src/tools/sdcc
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/sdcc')
-rw-r--r--src/tools/sdcc/gui/sdcc_ui.h1
-rw-r--r--src/tools/sdcc/sdcc.cpp14
-rw-r--r--src/tools/sdcc/sdcc.h18
-rw-r--r--src/tools/sdcc/sdcc_compile.cpp32
-rw-r--r--src/tools/sdcc/sdcc_compile.h26
-rw-r--r--src/tools/sdcc/sdcc_generator.cpp16
-rw-r--r--src/tools/sdcc/sdcc_generator.h8
7 files changed, 60 insertions, 55 deletions
diff --git a/src/tools/sdcc/gui/sdcc_ui.h b/src/tools/sdcc/gui/sdcc_ui.h
index a0f0ffc..1b39fce 100644
--- a/src/tools/sdcc/gui/sdcc_ui.h
+++ b/src/tools/sdcc/gui/sdcc_ui.h
@@ -18,6 +18,7 @@ namespace SDCC
class ConfigWidget : public ToolConfigWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
ConfigWidget(Project *project);
virtual void initEntries();
diff --git a/src/tools/sdcc/sdcc.cpp b/src/tools/sdcc/sdcc.cpp
index ba86273..bc3724d 100644
--- a/src/tools/sdcc/sdcc.cpp
+++ b/src/tools/sdcc/sdcc.cpp
@@ -17,15 +17,15 @@
#include "sdcc_generator.h"
//----------------------------------------------------------------------------
-bool SDCC::Base::checkExecutableResult(bool, QStringList &lines) const
+bool SDCC::Base::checkExecutableResult(bool, TQStringList &lines) const
{
return ( lines.count()>0 && lines[0].startsWith("SDCC") );
}
//----------------------------------------------------------------------------
-QString SDCC::Group::informationText() const
+TQString SDCC::Group::informationText() const
{
- return i18n("The <a href=\"%1\">Small Devices C Compiler</a> is an open-source C compiler for several families of microcontrollers.").arg("http://sdcc.sourceforge.net");
+ return i18n("The <a href=\"%1\">Small Devices C Compiler</a> is an open-source C compiler for several families of microcontrollers.").tqarg("http://sdcc.sourceforge.net");
}
const ::Tool::Base *SDCC::Group::base(Tool::Category category) const
@@ -50,10 +50,10 @@ SDCC::Group::Group()
_checkDevicesTmp.close();
}
-QStringList SDCC::Group::checkDevicesOptions(uint i) const
+TQStringList SDCC::Group::checkDevicesOptions(uint i) const
{
- QStringList options;
- options += QString("-m") + SDCC::FAMILY_DATA[i].name;
+ TQStringList options;
+ options += TQString("-m") + SDCC::FAMILY_DATA[i].name;
options += "-phelp";
options += _checkDevicesTmp.url().filepath();
return options;
@@ -103,7 +103,7 @@ Tool::SourceGenerator *SDCC::Group::sourceGeneratorFactory() const
return new SourceGenerator;
}
-bool SDCC::Group::generateDebugInformation(const QString &device) const
+bool SDCC::Group::generateDebugInformation(const TQString &device) const
{
switch (family(device)) {
case P14: return false;
diff --git a/src/tools/sdcc/sdcc.h b/src/tools/sdcc/sdcc.h
index 3155273..f088bec 100644
--- a/src/tools/sdcc/sdcc.h
+++ b/src/tools/sdcc/sdcc.h
@@ -19,11 +19,11 @@ namespace SDCC
class Base : public Tool::Base
{
public:
- virtual QString baseExecutable(bool, Tool::OutputExecutableType) const { return "sdcc"; }
+ virtual TQString baseExecutable(bool, Tool::OutputExecutableType) const { return "sdcc"; }
private:
- virtual QStringList checkExecutableOptions(bool) const { return "-v"; }
- virtual bool checkExecutableResult(bool withWine, QStringList &lines) const;
+ virtual TQStringList checkExecutableOptions(bool) const { return "-v"; }
+ virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const;
};
//----------------------------------------------------------------------------
@@ -31,9 +31,9 @@ class Group : public Tool::Group
{
public:
Group();
- virtual QString name() const { return "sdcc"; }
- virtual QString label() const { return i18n("Small Device C Compiler"); }
- virtual QString informationText() const;
+ virtual TQString name() const { return "sdcc"; }
+ virtual TQString label() const { return i18n("Small Device C Compiler"); }
+ virtual TQString informationText() const;
virtual const ::Tool::Base *base(Tool::Category category) const;
virtual uint nbCheckDevices() const { return SDCC::Nb_Families; }
virtual bool hasDirectory(Compile::DirectoryType type) const { return type==Compile::DirectoryType::Header || type==Compile::DirectoryType::LinkerScript; }
@@ -43,16 +43,16 @@ public:
virtual Tool::ExecutableType preferedExecutableType() const { return Tool::ExecutableType::Unix; }
virtual Tool::CompileType compileType() const { return Tool::SeparateFiles; }
virtual Tool::Category checkDevicesCategory() const { return Tool::Category::Compiler; }
- virtual QStringList checkDevicesOptions(uint i) const;
+ virtual TQStringList checkDevicesOptions(uint i) const;
virtual bool needs(bool withProject, Tool::Category category) const;
virtual PURL::FileType implementationType(PURL::ToolType type) const;
- virtual bool generateDebugInformation(const QString &device) const;
+ virtual bool generateDebugInformation(const TQString &device) const;
private:
Log::StringView _sview;
PURL::TempFile _checkDevicesTmp;
virtual BaseData baseFactory(Tool::Category category) const;
- virtual QValueList<const Device::Data *> getSupportedDevices(const QString &s) const { return SDCC::getSupportedDevices(s); }
+ virtual TQValueList<const Device::Data *> getSupportedDevices(const TQString &s) const { return SDCC::getSupportedDevices(s); }
virtual Compile::Process *processFactory(const Compile::Data &data) const;
virtual Compile::Config *configFactory(::Project *project) const;
virtual Tool::SourceGenerator *sourceGeneratorFactory() const;
diff --git a/src/tools/sdcc/sdcc_compile.cpp b/src/tools/sdcc/sdcc_compile.cpp
index a3c072f..1c2e04d 100644
--- a/src/tools/sdcc/sdcc_compile.cpp
+++ b/src/tools/sdcc/sdcc_compile.cpp
@@ -14,19 +14,19 @@
#include "sdcc_generator.h"
//-----------------------------------------------------------------------------
-QString SDCC::Process::familyName() const
+TQString SDCC::Process::familyName() const
{
return FAMILY_DATA[family(_data.device)].name;
}
-QString SDCC::Process::deviceName() const
+TQString SDCC::Process::deviceName() const
{
return toDeviceName(_data.device);
}
-QStringList SDCC::Process::genericArguments(const Compile::Config &) const
+TQStringList SDCC::Process::genericArguments(const Compile::Config &) const
{
- QStringList args;
+ TQStringList args;
args += "-m%FAMILY";
args += "-%DEVICE";
args += "-V"; // verbose
@@ -34,12 +34,12 @@ QStringList SDCC::Process::genericArguments(const Compile::Config &) const
return args;
}
-QString SDCC::Process::outputFiles() const
+TQString SDCC::Process::outputFiles() const
{
return "PURL::Object PURL::AsmGPAsm adb p d PURL::Lst";
}
-void SDCC::Process::logStderrLine(const QString &line)
+void SDCC::Process::logStderrLine(const TQString &line)
{
if ( parseErrorLine(line, Compile::ParseErrorData("([^:]*):([0-9]+):(error|warning|message):(.+)", 1, 2, 4, 3)) ) return;
if ( parseErrorLine(line, Compile::ParseErrorData("([^:]*):([0-9]+):(\\w+)\\s*\\[[0-9]+\\](.+)", 1, 2, 4, 3)) ) return;
@@ -47,33 +47,33 @@ void SDCC::Process::logStderrLine(const QString &line)
if ( parseErrorLine(line, Compile::ParseErrorData("([^:]*):([0-9]+):(.+)", 1, 2, 3, Log::LineType::Warning)) ) return;
if ( parseErrorLine(line, Compile::ParseErrorData("([^:]*):([^:]+):([0-9]+):(.+)", 2, 3, 4, Log::LineType::Warning)) ) return;
if ( parseErrorLine(line, Compile::ParseErrorData("([^:]+):(.+)", -1, -1, 2, 1, Log::LineType::Warning)) ) return;
- doLog(filterType(line), line, QString::null, 0);
+ doLog(filterType(line), line, TQString(), 0);
}
//-----------------------------------------------------------------------------
-QStringList SDCC::CompileStandaloneFile::genericArguments(const Compile::Config &config) const
+TQStringList SDCC::CompileStandaloneFile::genericArguments(const Compile::Config &config) const
{
- QStringList args = Process::genericArguments(config);
+ TQStringList args = Process::genericArguments(config);
args += config.includeDirs(Tool::Category::Compiler, "-I");
args += config.customOptions(Tool::Category::Compiler);
args += "-Wl-o%O";
args += "-Wl-m"; // output map file
HexBuffer::Format format = config.hexFormat();
if( format!=HexBuffer::Nb_Formats )
- args += QString("-Wl-a") + HexBuffer::FORMATS[format];
+ args += TQString("-Wl-a") + HexBuffer::FORMATS[format];
args += "%I";
return args;
}
-QString SDCC::CompileStandaloneFile::outputFiles() const
+TQString SDCC::CompileStandaloneFile::outputFiles() const
{
return Process::outputFiles() + " PURL::Map PURL::Hex PURL::Cod rst sym mem lnk";
}
//-----------------------------------------------------------------------------
-QStringList SDCC::CompileProjectFile::genericArguments(const Compile::Config &config) const
+TQStringList SDCC::CompileProjectFile::genericArguments(const Compile::Config &config) const
{
- QStringList args = Process::genericArguments(config);
+ TQStringList args = Process::genericArguments(config);
args += config.includeDirs(Tool::Category::Compiler, "-I");
args += config.customOptions(Tool::Category::Compiler);
args += "-c"; // compile only
@@ -82,9 +82,9 @@ QStringList SDCC::CompileProjectFile::genericArguments(const Compile::Config &co
}
//-----------------------------------------------------------------------------
-QStringList SDCC::LinkProjectFile::genericArguments(const Compile::Config &config) const
+TQStringList SDCC::LinkProjectFile::genericArguments(const Compile::Config &config) const
{
- QStringList args = Process::genericArguments(config);
+ TQStringList args = Process::genericArguments(config);
args += "-Wl-c"; // create coff file
args += "-Wl-m"; // output map file
args += "$LKR(-Wl-s%LKR)";
@@ -97,7 +97,7 @@ QStringList SDCC::LinkProjectFile::genericArguments(const Compile::Config &confi
return args;
}
-QString SDCC::LinkProjectFile::outputFiles() const
+TQString SDCC::LinkProjectFile::outputFiles() const
{
return Process::outputFiles() + " PURL::Lkr PURL::Hex PURL::Cod PURL::Coff PURL::Map";
}
diff --git a/src/tools/sdcc/sdcc_compile.h b/src/tools/sdcc/sdcc_compile.h
index 8ba4c30..c5067e6 100644
--- a/src/tools/sdcc/sdcc_compile.h
+++ b/src/tools/sdcc/sdcc_compile.h
@@ -17,12 +17,13 @@ namespace SDCC
class Process : public Compile::Process
{
Q_OBJECT
+ TQ_OBJECT
protected:
- virtual QString deviceName() const;
- virtual QString familyName() const;
- virtual QStringList genericArguments(const Compile::Config &config) const;
- virtual QString outputFiles() const;
- virtual void logStderrLine(const QString &line);
+ virtual TQString deviceName() const;
+ virtual TQString familyName() const;
+ virtual TQStringList genericArguments(const Compile::Config &config) const;
+ virtual TQString outputFiles() const;
+ virtual void logStderrLine(const TQString &line);
virtual bool hasLinkerScript() const { return ( _data.linkType==Compile::Icd2Linking || Main::toolGroup().hasCustomLinkerScript(_data.project) ); }
};
@@ -30,27 +31,30 @@ protected:
class CompileStandaloneFile : public Process
{
Q_OBJECT
+ TQ_OBJECT
private:
- virtual QStringList genericArguments(const Compile::Config &config) const;
- virtual QString outputFiles() const;
+ virtual TQStringList genericArguments(const Compile::Config &config) const;
+ virtual TQString outputFiles() const;
};
//-----------------------------------------------------------------------------
class CompileProjectFile : public Process
{
Q_OBJECT
+ TQ_OBJECT
private:
- virtual QStringList genericArguments(const Compile::Config &config) const;
+ virtual TQStringList genericArguments(const Compile::Config &config) const;
};
//-----------------------------------------------------------------------------
class LinkProjectFile : public Process
{
Q_OBJECT
+ TQ_OBJECT
private:
- virtual QStringList genericArguments(const Compile::Config &config) const;
- virtual QString outputFiles() const;
- virtual QString objectExtension() const { return "o"; }
+ virtual TQStringList genericArguments(const Compile::Config &config) const;
+ virtual TQString outputFiles() const;
+ virtual TQString objectExtension() const { return "o"; }
};
} // namespace
diff --git a/src/tools/sdcc/sdcc_generator.cpp b/src/tools/sdcc/sdcc_generator.cpp
index fb57ab6..0a2b0ee 100644
--- a/src/tools/sdcc/sdcc_generator.cpp
+++ b/src/tools/sdcc/sdcc_generator.cpp
@@ -18,7 +18,7 @@ const SDCC::FamilyData SDCC::FAMILY_DATA[Nb_Families] = {
{ "pic16" }
};
-SDCC::Family SDCC::family(const QString &device)
+SDCC::Family SDCC::family(const TQString &device)
{
const Device::Data *data = Device::lister().data(device);
switch (static_cast<const Pic::Data *>(data)->architecture().type()) {
@@ -38,12 +38,12 @@ SDCC::Family SDCC::family(const QString &device)
return Nb_Families;
}
-QString SDCC::toDeviceName(const QString &device)
+TQString SDCC::toDeviceName(const TQString &device)
{
return GPUtils::toDeviceName(device);
}
-QValueList<const Device::Data *> SDCC::getSupportedDevices(const QString &s)
+TQValueList<const Device::Data *> SDCC::getSupportedDevices(const TQString &s)
{
return GPUtils::getSupportedDevices(s);
}
@@ -60,12 +60,12 @@ SourceLine::List SDCC::SourceGenerator::configLines(PURL::ToolType type, const D
SourceLine::List lines;
if ( !data.is18Family() ) lines.appendNotIndentedCode("typedef unsigned int word;");
Address address = data.range(Pic::MemoryRangeType::Config).start;
- QString prefix = (data.nbWords(Pic::MemoryRangeType::Config)==2 || data.name().startsWith("16F9") ? "_" : "__");
+ TQString prefix = (data.nbWords(Pic::MemoryRangeType::Config)==2 || data.name().startsWith("16F9") ? "_" : "__");
for (uint i=0; i<data.nbWords(Pic::MemoryRangeType::Config); i++) {
const Pic::Config::Word &cword = config._words[i];
- QStringList cnames = SourceLine::configNames(Pic::ConfigNameType::SDCC, pmemory, i, ok);
+ TQStringList cnames = SourceLine::configNames(Pic::ConfigNameType::SDCC, pmemory, i, ok);
if ( cnames.isEmpty() ) continue;
- QString code;
+ TQString code;
if ( data.is18Family() ) code += "code char at ";
else code += "word at ";
if ( cword.name.isEmpty() ) code += toHexLabel(address, data.nbCharsAddress()) + " CONFIG";
@@ -99,7 +99,7 @@ SourceLine::List SDCC::SourceGenerator::sourceFileContent(PURL::ToolType type, c
switch (static_cast<const Pic::Data &>(data).architecture().type()) {
case Pic::Architecture::P16X:
lines.appendNotIndentedCode("void isr() interrupt 0 {", i18n("interrupt service routine"));
- lines.appendIndentedCode(QString::null, "<< " + i18n("insert interrupt code") + " >>");
+ lines.appendIndentedCode(TQString(), "<< " + i18n("insert interrupt code") + " >>");
lines.appendNotIndentedCode("}");
lines.appendEmpty();
break;
@@ -111,7 +111,7 @@ SourceLine::List SDCC::SourceGenerator::sourceFileContent(PURL::ToolType type, c
default: Q_ASSERT(false); break;
}
lines.appendNotIndentedCode("void main() {");
- lines.appendIndentedCode(QString::null, "<< " + i18n("insert code") + " >>");
+ lines.appendIndentedCode(TQString(), "<< " + i18n("insert code") + " >>");
lines.appendNotIndentedCode("}");
return lines;
}
diff --git a/src/tools/sdcc/sdcc_generator.h b/src/tools/sdcc/sdcc_generator.h
index e5f0101..a0f0f7e 100644
--- a/src/tools/sdcc/sdcc_generator.h
+++ b/src/tools/sdcc/sdcc_generator.h
@@ -19,9 +19,9 @@ struct FamilyData {
const char *name;
};
extern const FamilyData FAMILY_DATA[Nb_Families];
-extern Family family(const QString &device);
-extern QString toDeviceName(const QString &device);
-extern QValueList<const Device::Data *> getSupportedDevices(const QString &s);
+extern Family family(const TQString &device);
+extern TQString toDeviceName(const TQString &device);
+extern TQValueList<const Device::Data *> getSupportedDevices(const TQString &s);
//----------------------------------------------------------------------------
class SourceGenerator : public Tool::SourceGenerator
@@ -36,7 +36,7 @@ private:
const char *cname, *sdccName;
};
static const P16CNameData P16_CNAME_DATA[];
- static void transformCName(QString &cname, const Pic::Data &data);
+ static void transformCName(TQString &cname, const Pic::Data &data);
};