summaryrefslogtreecommitdiffstats
path: root/src/tools/base
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/base
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/base')
-rw-r--r--src/tools/base/generic_tool.h12
-rw-r--r--src/tools/base/tool_group.cpp26
-rw-r--r--src/tools/base/tool_group.h18
3 files changed, 28 insertions, 28 deletions
diff --git a/src/tools/base/generic_tool.h b/src/tools/base/generic_tool.h
index 3b3299d..86cd3f2 100644
--- a/src/tools/base/generic_tool.h
+++ b/src/tools/base/generic_tool.h
@@ -47,11 +47,11 @@ namespace Compile
class Data {
public:
Data() {}
- Data(Tool::Category c, const QValueList<TodoItem> &i, const QString &d, const Project *p, LinkType lt)
+ Data(Tool::Category c, const TQValueList<TodoItem> &i, const TQString &d, const Project *p, LinkType lt)
: category(c), items(i), device(d), project(p), linkType(lt) {}
Tool::Category category;
- QValueList<TodoItem> items;
- QString device;
+ TQValueList<TodoItem> items;
+ TQString device;
const Project *project;
LinkType linkType;
};
@@ -84,13 +84,13 @@ class Base
public:
virtual ~Base() {}
const Group &group() const { return *_group; }
- virtual QString baseExecutable(bool withWine, OutputExecutableType type) const = 0;
+ virtual TQString baseExecutable(bool withWine, OutputExecutableType type) const = 0;
PURL::Directory executableDirectory() const;
virtual bool checkExecutable() const { return true; }
- virtual QStringList checkExecutableOptions(bool withWine) const = 0;
+ virtual TQStringList checkExecutableOptions(bool withWine) const = 0;
virtual PURL::Directory checkExecutableWorkingDirectory() const { return PURL::Directory(); }
virtual ::Process::LineOutput *checkExecutableProcess(const PURL::Directory &dir, bool withWine, OutputExecutableType type) const;
- virtual bool checkExecutableResult(bool withWine, QStringList &lines) const = 0;
+ virtual bool checkExecutableResult(bool withWine, TQStringList &lines) const = 0;
protected:
Category _category;
diff --git a/src/tools/base/tool_group.cpp b/src/tools/base/tool_group.cpp
index fb347ce..ac5c75e 100644
--- a/src/tools/base/tool_group.cpp
+++ b/src/tools/base/tool_group.cpp
@@ -58,9 +58,9 @@ PURL::Directory Tool::Group::autodetectDirectory(Compile::DirectoryType, const P
return PURL::Directory();
}
-QString Tool::Group::defaultLinkerScriptFilename(Compile::LinkType type, const QString &device) const
+TQString Tool::Group::defaultLinkerScriptFilename(Compile::LinkType type, const TQString &device) const
{
- QString basename = device.lower();
+ TQString basename = device.lower();
if ( type==Compile::Icd2Linking ) basename += 'i';
return basename + '.' + PURL::extension(PURL::Lkr);
}
@@ -73,7 +73,7 @@ bool Tool::Group::hasCustomLinkerScript(const ::Project *project) const
PURL::Url Tool::Group::linkerScript(const ::Project *project, Compile::LinkType type) const
{
if ( hasCustomLinkerScript(project) ) return project->customLinkerScript();
- QString filename = defaultLinkerScriptFilename(type, Compile::Config::device(project));
+ TQString filename = defaultLinkerScriptFilename(type, Compile::Config::device(project));
return PURL::Url(Compile::Config::directory(*this, Compile::DirectoryType::LinkerScript), filename);
}
@@ -81,12 +81,12 @@ PURL::Url Tool::Group::linkerScript(const ::Project *project, Compile::LinkType
{
::Process::LineOutput *process = new ::Process::LineOutput;
Tool::Category cat = checkDevicesCategory();
- QString exec = base(cat)->baseExecutable(withWine, Compile::Config::outputExecutableType(*this));
+ TQString exec = base(cat)->baseExecutable(withWine, Compile::Config::outputExecutableType(*this));
process->setup(dir.path() + exec, checkDevicesOptions(i), withWine);
return process;
}
-bool Tool::Group::checkExecutable(Tool::Category category, QStringList &lines)
+bool Tool::Group::checkExecutable(Tool::Category category, TQStringList &lines)
{
PURL::Directory dir = Compile::Config::directory(*this, Compile::DirectoryType::Executable);
bool withWine = Compile::Config::withWine(*this);
@@ -102,32 +102,32 @@ void Tool::Group::initSupported()
{
_checkDevicesError = false;
Tool::Category cat = checkDevicesCategory();
- QValueList<const Device::Data *> list;
- if ( cat==Tool::Category::Nb_Types ) list = getSupportedDevices(QString::null);
+ TQValueList<const Device::Data *> list;
+ if ( cat==Tool::Category::Nb_Types ) list = getSupportedDevices(TQString());
else {
PURL::Directory dir = Compile::Config::directory(*this, Compile::DirectoryType::Executable);
for (uint i=0; i<nbCheckDevices(); i++) {
- QStringList lines;
+ TQStringList lines;
::Process::LineOutput *process = checkDevicesProcess(i, dir, Compile::Config::withWine(*this));
::Process::State state = ::Process::runSynchronously(*process, ::Process::Start, 10000);
if ( state==::Process::Exited ) {
- QStringList lines = process->sout() + process->serr();
+ TQStringList lines = process->sout() + process->serr();
list += getSupportedDevices(lines.join("\n"));
} else _checkDevicesError = true;
delete process;
}
}
- QValueList<const Device::Data *>::const_iterator it;
+ TQValueList<const Device::Data *>::const_iterator it;
for (it=list.begin(); it!=list.end(); ++it) addDevice((*it)->name(), *it, ::Group::Support::Tested);
}
-bool Tool::Group::check(const QString &device, Log::Generic *log) const
+bool Tool::Group::check(const TQString &device, Log::Generic *log) const
{
const_cast<Tool::Group *>(this)->checkInitSupported();
if ( hasCheckDevicesError() )
- return (log ? log->askContinue(i18n("There were errors detecting supported devices for the selected toolchain (%1). Please check the toolchain configuration. Continue anyway?").arg(label())) : false);
+ return (log ? log->askContinue(i18n("There were errors detecting supported devices for the selected toolchain (%1). Please check the toolchain configuration. Continue anyway?").tqarg(label())) : false);
if ( !device.isEmpty() && device!=Device::AUTO_DATA.name && !isSupported(device) )
- return (log ? log->askContinue(i18n("The selected toolchain (%1) does not support device %2. Continue anyway?").arg(label()).arg(device)) : false);
+ return (log ? log->askContinue(i18n("The selected toolchain (%1) does not support device %2. Continue anyway?").tqarg(label()).tqarg(device)) : false);
return true;
}
diff --git a/src/tools/base/tool_group.h b/src/tools/base/tool_group.h
index c4adb84..86cfc64 100644
--- a/src/tools/base/tool_group.h
+++ b/src/tools/base/tool_group.h
@@ -28,10 +28,10 @@ public:
static const char *CUSTOM_NAME;
Group();
bool isCustom() const { return ( name()==CUSTOM_NAME ); }
- virtual QString comment() const { return QString::null; }
+ virtual TQString comment() const { return TQString(); }
virtual void init();
virtual const ::Tool::Base *base(Category category) const { return _bases[category].base; }
- virtual QString informationText() const = 0;
+ virtual TQString informationText() const = 0;
virtual ExecutableType preferedExecutableType() const = 0;
virtual bool hasDirectory(Compile::DirectoryType) const { return false; }
virtual PURL::FileType linkerScriptType() const { return PURL::Nb_FileTypes; }
@@ -40,9 +40,9 @@ public:
virtual uint nbCheckDevices() const { return 1; }
bool hasCheckDevicesError() const { return _checkDevicesError; }
virtual Tool::Category checkDevicesCategory() const = 0;
- virtual QStringList checkDevicesOptions(uint) const { return QStringList(); }
+ virtual TQStringList checkDevicesOptions(uint) const { return TQStringList(); }
::Process::LineOutput *checkDevicesProcess(uint i, const PURL::Directory &execDir, bool withWine) const;
- virtual QValueList<const Device::Data *> getSupportedDevices(const QString &s) const = 0;
+ virtual TQValueList<const Device::Data *> getSupportedDevices(const TQString &s) const = 0;
virtual CompileType compileType() const = 0;
virtual bool needs(bool withProject, Category category) const;
Compile::Process *createCompileProcess(const Compile::Data &data, Compile::Manager *manager) const;
@@ -52,9 +52,9 @@ public:
virtual PURL::FileType implementationType(PURL::ToolType type) const = 0;
virtual Compile::Process *processFactory(const Compile::Data &data) const = 0;
const SourceGenerator *sourceGenerator() const { return _sourceGenerator; }
- bool check(const QString &device, Log::Generic *log) const;
+ bool check(const TQString &device, Log::Generic *log) const;
const VersionData &version() const { return _version; }
- virtual bool generateDebugInformation(const QString &device) const { Q_UNUSED(device); return true; }
+ virtual bool generateDebugInformation(const TQString &device) const { Q_UNUSED(device); return true; }
protected:
enum NeedType { StandaloneOnly, ProjectOnly, Both };
@@ -67,15 +67,15 @@ protected:
};
virtual void initSupported();
virtual BaseData baseFactory(Category category) const = 0;
- virtual QString defaultLinkerScriptFilename(Compile::LinkType type, const QString &device) const;
+ virtual TQString defaultLinkerScriptFilename(Compile::LinkType type, const TQString &device) const;
virtual Compile::Config *configFactory(::Project *project) const = 0;
virtual SourceGenerator *sourceGeneratorFactory() const = 0;
- bool checkExecutable(Tool::Category category, QStringList &lines);
+ bool checkExecutable(Tool::Category category, TQStringList &lines);
virtual VersionData getToolchainVersion() { return VersionData(); }
private:
SourceGenerator *_sourceGenerator;
- QMap<Category, BaseData> _bases;
+ TQMap<Category, BaseData> _bases;
bool _checkDevicesError;
VersionData _version;
};