summaryrefslogtreecommitdiffstats
path: root/src/tools/list
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/list
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/list')
-rw-r--r--src/tools/list/compile_config.cpp88
-rw-r--r--src/tools/list/compile_config.h64
-rw-r--r--src/tools/list/compile_manager.cpp32
-rw-r--r--src/tools/list/compile_manager.h19
-rw-r--r--src/tools/list/compile_process.cpp126
-rw-r--r--src/tools/list/compile_process.h74
-rw-r--r--src/tools/list/device_info.cpp20
-rw-r--r--src/tools/list/device_info.h8
-rw-r--r--src/tools/list/tools_config_widget.cpp54
-rw-r--r--src/tools/list/tools_config_widget.h24
10 files changed, 258 insertions, 251 deletions
diff --git a/src/tools/list/compile_config.cpp b/src/tools/list/compile_config.cpp
index 5ec8dfc..ffa1895 100644
--- a/src/tools/list/compile_config.cpp
+++ b/src/tools/list/compile_config.cpp
@@ -16,68 +16,68 @@
//----------------------------------------------------------------------------
PURL::Directory Compile::Config::directory(const Tool::Group &group, DirectoryType type)
{
- QString def;
+ TQString def;
if ( type!=DirectoryType::Executable )
def = group.autodetectDirectory(type, directory(group, DirectoryType::Executable), withWine(group)).path();
- return PURL::Directory(value(group.name(), QString::null, type.key() + QString("_path"), def));
+ return PURL::Directory(value(group.name(), TQString(), type.key() + TQString("_path"), def));
}
void Compile::Config::setDirectory(const Tool::Group &group, DirectoryType type, const PURL::Directory &dir)
{
- setValue(group.name(), QString::null, type.key() + QString("_path"), dir.path());
+ setValue(group.name(), TQString(), type.key() + TQString("_path"), dir.path());
if ( type==DirectoryType::Executable ) const_cast<Tool::Group &>(group).init();
}
bool Compile::Config::withWine(const Tool::Group &group)
{
- QString def = (group.preferedExecutableType()==Tool::ExecutableType::Unix ? "false" : "true");
- return ( value(group.name(), QString::null, "with_wine", def)=="true" );
+ TQString def = (group.preferedExecutableType()==Tool::ExecutableType::Unix ? "false" : "true");
+ return ( value(group.name(), TQString(), "with_wine", def)=="true" );
}
void Compile::Config::setWithWine(const Tool::Group &group, bool withWine)
{
- setValue(group.name(), QString::null, "with_wine", withWine ? "true" : "false");
+ setValue(group.name(), TQString(), "with_wine", withWine ? "true" : "false");
const_cast<Tool::Group &>(group).init();
}
Tool::OutputExecutableType Compile::Config::outputExecutableType(const Tool::Group &group)
{
- QString s = value(group.name(), QString::null, "output_type", Tool::OutputExecutableType(Tool::OutputExecutableType::Coff).key());
+ TQString s = value(group.name(), TQString(), "output_type", Tool::OutputExecutableType(Tool::OutputExecutableType::Coff).key());
return Tool::OutputExecutableType::fromKey(s);
}
void Compile::Config::setOutputExecutableType(const Tool::Group &group, Tool::OutputExecutableType type)
{
- setValue(group.name(), QString::null, "output_type", type.key());
+ setValue(group.name(), TQString(), "output_type", type.key());
const_cast<Tool::Group &>(group).init();
}
-QString Compile::Config::value(const QString &group, const QString &subGroup, const QString &key, const QString &defaultValue)
+TQString Compile::Config::value(const TQString &group, const TQString &subGroup, const TQString &key, const TQString &defaultValue)
{
- QString grp = (subGroup.isEmpty() ? group : group + '-' + subGroup);
+ TQString grp = (subGroup.isEmpty() ? group : group + '-' + subGroup);
GenericConfig gc(grp);
return gc.readEntry(key, defaultValue);
}
-void Compile::Config::setValue(const QString &group, const QString &subGroup, const QString &key, const QString &value)
+void Compile::Config::setValue(const TQString &group, const TQString &subGroup, const TQString &key, const TQString &value)
{
- QString grp = (subGroup.isEmpty() ? group : group + '-' + subGroup);
+ TQString grp = (subGroup.isEmpty() ? group : group + '-' + subGroup);
GenericConfig gc(grp);
gc.writeEntry(key, value);
}
-QStringList Compile::Config::listValues(const QString &group, const QString &subGroup, const QString &key, const QStringList &defaultValues)
+TQStringList Compile::Config::listValues(const TQString &group, const TQString &subGroup, const TQString &key, const TQStringList &defaultValues)
{
- QString grp = (subGroup.isEmpty() ? group : group + '-' + subGroup);
+ TQString grp = (subGroup.isEmpty() ? group : group + '-' + subGroup);
GenericConfig gc(grp);
return gc.readListEntry(key, defaultValues);
}
-void Compile::Config::setListValues(const QString &group, const QString &subGroup, const QString &key, const QStringList &values)
+void Compile::Config::setListValues(const TQString &group, const TQString &subGroup, const TQString &key, const TQStringList &values)
{
- QString grp = (subGroup.isEmpty() ? group : group + '-' + subGroup);
+ TQString grp = (subGroup.isEmpty() ? group : group + '-' + subGroup);
GenericConfig gc(grp);
gc.writeEntry(key, values);
}
-QStringList Compile::Config::includeDirs(Tool::Category category, const QString &prefix, const QString &suffix, const QString &separator) const
+TQStringList Compile::Config::includeDirs(Tool::Category category, const TQString &prefix, const TQString &suffix, const TQString &separator) const
{
- QStringList list;
- QStringList raw = rawIncludeDirs(category);
+ TQStringList list;
+ TQStringList raw = rawIncludeDirs(category);
for (uint i=0; i<raw.size(); i++) {
if ( separator.isEmpty() ) list.append(prefix + raw[i] + suffix);
else if ( i==0 ) list.append(prefix + raw[i]);
@@ -89,101 +89,101 @@ QStringList Compile::Config::includeDirs(Tool::Category category, const QString
HexBuffer::Format Compile::Config::hexFormat() const
{
- QString s = value(Tool::Category::Linker, "format", HexBuffer::FORMATS[HexBuffer::IHX32]);
+ TQString s = value(Tool::Category::Linker, "format", HexBuffer::FORMATS[HexBuffer::IHX32]);
for (uint i=0; i<HexBuffer::Nb_Formats; i++)
if ( s==HexBuffer::FORMATS[i] ) return HexBuffer::Format(i);
return HexBuffer::Nb_Formats;
}
void Compile::Config::setHexFormat(HexBuffer::Format f)
{
- QString s = (f==HexBuffer::Nb_Formats ? 0 : HexBuffer::FORMATS[f]);
+ TQString s = (f==HexBuffer::Nb_Formats ? 0 : HexBuffer::FORMATS[f]);
setValue(Tool::Category::Linker, "format", s);
}
-QString Compile::Config::device(const Project *project)
+TQString Compile::Config::device(const Project *project)
{
- QString device = globalValue(project, "device", QString::null);
+ TQString device = globalValue(project, "device", TQString());
return Device::lister().checkName(device);
}
const Tool::Group &Compile::Config::toolGroup(const Project *project)
{
- QString s = globalValue(project, "tool", QString::null);
+ TQString s = globalValue(project, "tool", TQString());
const Tool::Group *group = Tool::lister().group(s);
if ( group==0 ) return *Tool::lister().begin().data();
return *group;
}
-QStringList Compile::Config::customOptions(Tool::Category category) const
+TQStringList Compile::Config::customOptions(Tool::Category category) const
{
- return QStringList::split(' ', rawCustomOptions(category));
+ return TQStringList::split(' ', rawCustomOptions(category));
}
-QStringList Compile::Config::customLibraries(Tool::Category category) const
+TQStringList Compile::Config::customLibraries(Tool::Category category) const
{
- return QStringList::split(' ', rawCustomLibraries(category));
+ return TQStringList::split(' ', rawCustomLibraries(category));
}
-void Compile::Config::setValue(Tool::Category category, const QString &key, const QString &value)
+void Compile::Config::setValue(Tool::Category category, const TQString &key, const TQString &value)
{
Q_ASSERT( category!=Tool::Category::Nb_Types );
Q_ASSERT( _project || _group );
if (_project) _project->setValue(category.key(), key, value);
else Config::setValue(_group->name(), category.key(), key, value);
}
-QString Compile::Config::value(Tool::Category category, const QString &key, const QString &defaultValue) const
+TQString Compile::Config::value(Tool::Category category, const TQString &key, const TQString &defaultValue) const
{
Q_ASSERT( category!=Tool::Category::Nb_Types );
Q_ASSERT( _project || _group );
if (_project) return _project->value(category.key(), key, defaultValue);
return Config::value(_group->name(), category.key(), key, defaultValue);
}
-void Compile::Config::setListValues(Tool::Category category, const QString &key, const QStringList &values)
+void Compile::Config::setListValues(Tool::Category category, const TQString &key, const TQStringList &values)
{
Q_ASSERT( category!=Tool::Category::Nb_Types );
Q_ASSERT( _project || _group );
if (_project) _project->setListValues(category.key(), key, values);
else Config::setListValues(_group->name(), category.key(), key, values);
}
-QStringList Compile::Config::listValues(Tool::Category category, const QString &key, const QStringList &defaultValues) const
+TQStringList Compile::Config::listValues(Tool::Category category, const TQString &key, const TQStringList &defaultValues) const
{
Q_ASSERT( category!=Tool::Category::Nb_Types );
Q_ASSERT( _project || _group );
if (_project) return _project->listValues(category.key(), key, defaultValues);
return Config::listValues(_group->name(), category.key(), key, defaultValues);
}
-bool Compile::Config::boolValue(Tool::Category category, const QString &key, bool defaultValue) const
+bool Compile::Config::boolValue(Tool::Category category, const TQString &key, bool defaultValue) const
{
- QString s = value(category, key, QString::null);
+ TQString s = value(category, key, TQString());
if ( s.isNull() ) return defaultValue;
return !( s=="false" || s=="0" );
}
-uint Compile::Config::uintValue(Tool::Category category, const QString &key, uint defaultValue) const
+uint Compile::Config::uintValue(Tool::Category category, const TQString &key, uint defaultValue) const
{
bool ok;
- uint i = value(category, key, QString::null).toUInt(&ok);
+ uint i = value(category, key, TQString()).toUInt(&ok);
if ( !ok ) return defaultValue;
return i;
}
-QString Compile::Config::globalValue(const Project *project, const QString &key, const QString &defaultValue)
+TQString Compile::Config::globalValue(const Project *project, const TQString &key, const TQString &defaultValue)
{
if (project) return project->value("general", key, defaultValue);
- return Config::value("general", QString::null, key, defaultValue);
+ return Config::value("general", TQString(), key, defaultValue);
}
-void Compile::Config::setGlobalValue(Project *project, const QString &key, const QString &value)
+void Compile::Config::setGlobalValue(Project *project, const TQString &key, const TQString &value)
{
if (project) project->setValue("general", key, value);
- else Config::setValue("general", QString::null, key, value);
+ else Config::setValue("general", TQString(), key, value);
}
-QStringList Compile::Config::globalListValues(const Project *project, const QString &key, const QStringList &defaultValues)
+TQStringList Compile::Config::globalListValues(const Project *project, const TQString &key, const TQStringList &defaultValues)
{
if (project) return project->listValues("general", key, defaultValues);
- return Config::listValues("general", QString::null, key, defaultValues);
+ return Config::listValues("general", TQString(), key, defaultValues);
}
-void Compile::Config::setGlobalListValues(Project *project, const QString &key, const QStringList &values)
+void Compile::Config::setGlobalListValues(Project *project, const TQString &key, const TQStringList &values)
{
if (project) project->setListValues("general", key, values);
- else Config::setListValues("general", QString::null, key, values);
+ else Config::setListValues("general", TQString(), key, values);
}
diff --git a/src/tools/list/compile_config.h b/src/tools/list/compile_config.h
index 13beff4..7e032a1 100644
--- a/src/tools/list/compile_config.h
+++ b/src/tools/list/compile_config.h
@@ -24,32 +24,32 @@ public:
bool hasCustomArguments(Tool::Category category) const { return boolValue(category, "has_custom_arguments", false); }
void setHasCustomArguments(Tool::Category category, bool custom) { setValue(category, "has_custom_arguments", custom); }
- QStringList customArguments(Tool::Category category) const { return listValues(category, "custom_arguments", QStringList()); }
- void setCustomArguments(Tool::Category category, const QStringList &args) { return setListValues(category, "custom_arguments", args); }
- QStringList rawIncludeDirs(Tool::Category category) const { return listValues(category, "includes", "$(SRCPATH)"); }
- QStringList includeDirs(Tool::Category category, const QString &prefix, const QString &suffix = QString::null, const QString &separator = QString::null) const;
- void setRawIncludeDirs(Tool::Category category, const QStringList &dirs) { setListValues(category, "includes", dirs); }
- QString rawCustomOptions(Tool::Category category) const { return value(category, "custom_options", QString::null); }
- QStringList customOptions(Tool::Category category) const;
- void setRawCustomOptions(Tool::Category category, const QString &value) { setValue(category, "custom_options", value); }
- QString rawCustomLibraries(Tool::Category category) const { return value(category, "custom_libraries", QString::null); }
- QStringList customLibraries(Tool::Category category) const;
- void setRawCustomLibraries(Tool::Category category, const QString &value) { setValue(category, "custom_libraries", value); }
+ TQStringList customArguments(Tool::Category category) const { return listValues(category, "custom_arguments", TQStringList()); }
+ void setCustomArguments(Tool::Category category, const TQStringList &args) { return setListValues(category, "custom_arguments", args); }
+ TQStringList rawIncludeDirs(Tool::Category category) const { return listValues(category, "includes", "$(SRCPATH)"); }
+ TQStringList includeDirs(Tool::Category category, const TQString &prefix, const TQString &suffix = TQString(), const TQString &separator = TQString()) const;
+ void setRawIncludeDirs(Tool::Category category, const TQStringList &dirs) { setListValues(category, "includes", dirs); }
+ TQString rawCustomOptions(Tool::Category category) const { return value(category, "custom_options", TQString()); }
+ TQStringList customOptions(Tool::Category category) const;
+ void setRawCustomOptions(Tool::Category category, const TQString &value) { setValue(category, "custom_options", value); }
+ TQString rawCustomLibraries(Tool::Category category) const { return value(category, "custom_libraries", TQString()); }
+ TQStringList customLibraries(Tool::Category category) const;
+ void setRawCustomLibraries(Tool::Category category, const TQString &value) { setValue(category, "custom_libraries", value); }
uint warningLevel(Tool::Category category) const { return uintValue(category, "warning_level", 0); }
- void setWarningLevel(Tool::Category category, uint level) { setValue(category, "warning_level", QString::number(level)); }
+ void setWarningLevel(Tool::Category category, uint level) { setValue(category, "warning_level", TQString::number(level)); }
HexBuffer::Format hexFormat() const;
void setHexFormat(HexBuffer::Format format);
static const Tool::Group &toolGroup(const Project *project);
static void setToolGroup(Project *project, const Tool::Group &group) { setGlobalValue(project, "tool", group.name()); }
- static QString device(const Project *project);
- static void setDevice(Project *project, const QString &device) { setGlobalValue(project, "device", device); }
- static QStringList customCommands(Project *project) { return globalListValues(project, "custom_shell_commands", QStringList()); }
- static void setCustomCommands(Project *project, const QStringList &commands) { setGlobalListValues(project, "custom_shell_commands", commands); }
- static QString globalValue(const Project *project, const QString &key, const QString &defaultValue);
- static void setGlobalValue(Project *project, const QString &key, const QString &value);
- static QStringList globalListValues(const Project *project, const QString &key, const QStringList &defaultValues);
- static void setGlobalListValues(Project *project, const QString &key, const QStringList &value);
+ static TQString device(const Project *project);
+ static void setDevice(Project *project, const TQString &device) { setGlobalValue(project, "device", device); }
+ static TQStringList customCommands(Project *project) { return globalListValues(project, "custom_shell_commands", TQStringList()); }
+ static void setCustomCommands(Project *project, const TQStringList &commands) { setGlobalListValues(project, "custom_shell_commands", commands); }
+ static TQString globalValue(const Project *project, const TQString &key, const TQString &defaultValue);
+ static void setGlobalValue(Project *project, const TQString &key, const TQString &value);
+ static TQStringList globalListValues(const Project *project, const TQString &key, const TQStringList &defaultValues);
+ static void setGlobalListValues(Project *project, const TQString &key, const TQStringList &value);
static PURL::Directory directory(const Tool::Group &group, DirectoryType type);
static void setDirectory(const Tool::Group &group, DirectoryType type, const PURL::Directory &dir);
@@ -62,19 +62,19 @@ protected:
const Tool::Group *_group;
Project *_project;
- void setValue(Tool::Category category, const QString &key, const QString &value);
- QString value(Tool::Category category, const QString &key, const QString &defaultValue) const;
- void setListValues(Tool::Category category, const QString &key, const QStringList &values);
- QStringList listValues(Tool::Category category, const QString &key, const QStringList &defaultValues) const;
- void setValue(Tool::Category category, const QString &key, bool value) { setValue(category, key, QString(value ? "true" : "false")); }
- bool boolValue(Tool::Category category, const QString &key, bool defaultValue) const;
- void setValue(Tool::Category category, const QString &key, uint value) { setValue(category, key, QString::number(value)); }
- uint uintValue(Tool::Category category, const QString &key, uint defaultValue) const;
+ void setValue(Tool::Category category, const TQString &key, const TQString &value);
+ TQString value(Tool::Category category, const TQString &key, const TQString &defaultValue) const;
+ void setListValues(Tool::Category category, const TQString &key, const TQStringList &values);
+ TQStringList listValues(Tool::Category category, const TQString &key, const TQStringList &defaultValues) const;
+ void setValue(Tool::Category category, const TQString &key, bool value) { setValue(category, key, TQString(value ? "true" : "false")); }
+ bool boolValue(Tool::Category category, const TQString &key, bool defaultValue) const;
+ void setValue(Tool::Category category, const TQString &key, uint value) { setValue(category, key, TQString::number(value)); }
+ uint uintValue(Tool::Category category, const TQString &key, uint defaultValue) const;
- static QString value(const QString &group, const QString &subGroup, const QString &key, const QString &defaultValue);
- static void setValue(const QString &group, const QString &subGroup, const QString &key, const QString &value);
- static QStringList listValues(const QString &group, const QString &subGroup, const QString &key, const QStringList &defaultValues);
- static void setListValues(const QString &group, const QString &subGroup, const QString &key, const QStringList &values);
+ static TQString value(const TQString &group, const TQString &subGroup, const TQString &key, const TQString &defaultValue);
+ static void setValue(const TQString &group, const TQString &subGroup, const TQString &key, const TQString &value);
+ static TQStringList listValues(const TQString &group, const TQString &subGroup, const TQString &key, const TQStringList &defaultValues);
+ static void setListValues(const TQString &group, const TQString &subGroup, const TQString &key, const TQStringList &values);
friend class Tool::Group;
};
diff --git a/src/tools/list/compile_manager.cpp b/src/tools/list/compile_manager.cpp
index 00a4182..92f33a5 100644
--- a/src/tools/list/compile_manager.cpp
+++ b/src/tools/list/compile_manager.cpp
@@ -9,14 +9,14 @@
***************************************************************************/
#include "compile_manager.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include "libgui/project.h"
#include "common/gui/misc_gui.h"
#include "compile_config.h"
-Compile::Manager::Manager(QObject *parent)
- : QObject(parent, "compile_manager"), _base(0)
+Compile::Manager::Manager(TQObject *tqparent)
+ : TQObject(tqparent, "compile_manager"), _base(0)
{}
void Compile::Manager::cleanFile(const PURL::Url &url)
@@ -39,7 +39,7 @@ bool Compile::Manager::setupFile(Operations op, const TodoItem &item)
_todo.append(item);
_action = Compiling;
_wholeProject = false;
- QTimer::singleShot(0, this, SLOT(start()));
+ TQTimer::singleShot(0, this, TQT_SLOT(start()));
return true;
}
@@ -74,7 +74,7 @@ bool Compile::Manager::setupProject(Operations op, LinkType type)
}
_action = Compiling;
_wholeProject = true;
- QTimer::singleShot(0, this, SLOT(start()));
+ TQTimer::singleShot(0, this, TQT_SLOT(start()));
return true;
}
@@ -106,9 +106,9 @@ bool Compile::Manager::setupCompile()
for (uint i=0; i<_items.count(); i++) {
if ( _items[i].url.fileType()!=type ) {
if ( _operations!=Clean ) {
- QString e = PURL::extensions(type);
+ TQString e = PURL::extensions(type);
MessageBox::detailedSorry(i18n("The selected toolchain (%1) cannot compile file. It only supports files with extensions: %2")
- .arg(Main::toolGroup().label()).arg(e), i18n("File: %1").arg(_items[i].url.pretty()), Log::Show);
+ .tqarg(Main::toolGroup().label()).tqarg(e), i18n("File: %1").tqarg(_items[i].url.pretty()), Log::Show);
Log::Base::log(Log::LineType::Error, i18n("*** Aborted ***"), Log::Delayed);
processFailed();
}
@@ -131,9 +131,9 @@ bool Compile::Manager::setupAssemble()
if ( _items[i].url.fileType()!=type ) {
if ( _operations!=Clean ) {
if ( type==PURL::Nb_FileTypes ) type = Main::toolGroup().implementationType(PURL::ToolType::Compiler);
- QString e = PURL::extensions(type);
+ TQString e = PURL::extensions(type);
MessageBox::detailedSorry(i18n("The selected toolchain (%1) cannot assemble file. It only supports files with extensions: %2")
- .arg(Main::toolGroup().label()).arg(e), i18n("File: %1").arg(_items[i].url.pretty()), Log::Show);
+ .tqarg(Main::toolGroup().label()).tqarg(e), i18n("File: %1").tqarg(_items[i].url.pretty()), Log::Show);
Log::Base::log(Log::LineType::Error, i18n("*** Aborted ***"), Log::Delayed);
processFailed();
}
@@ -216,7 +216,7 @@ void Compile::Manager::start()
}
if ( _operations & Clean ) {
_base->files(0).onlyExistingFiles().cleanGenerated();
- QTimer::singleShot(0, this, SLOT(start()));
+ TQTimer::singleShot(0, this, TQT_SLOT(start()));
return;
}
if ( !_base->start() ) {
@@ -225,13 +225,13 @@ void Compile::Manager::start()
}
}
-void Compile::Manager::log(Log::LineType type, const QString &message, const QString &filepath, uint line)
+void Compile::Manager::log(Log::LineType type, const TQString &message, const TQString &filepath, uint line)
{
if ( type==Log::LineType::Error ) setError(message);
static_cast<LogWidget *>(view())->appendLine(type, message, filepath, line);
}
-void Compile::Manager::log(Log::DebugLevel level, const QString &message, const QString &filepath, uint line)
+void Compile::Manager::log(Log::DebugLevel level, const TQString &message, const TQString &filepath, uint line)
{
static_cast<LogWidget *>(view())->appendLine(level, message, filepath, line);
}
@@ -249,7 +249,7 @@ void Compile::Manager::processDone()
FileData::List list = _base->files(0).onlyExistingFiles();
FileData::List::iterator it;
for (it=list.begin(); it!=list.end(); ++it) emit updateFile(*it);
- QTimer::singleShot(0, this, SLOT(start()));
+ TQTimer::singleShot(0, this, TQT_SLOT(start()));
}
}
@@ -263,18 +263,18 @@ void Compile::Manager::startCustomCommand()
{
delete _base;
_base = 0;
- QStringList commands = Compile::Config::customCommands(Main::project());
+ TQStringList commands = Compile::Config::customCommands(Main::project());
if ( _customCommandIndex==commands.count() ) {
Log::Base::log(Log::LineType::Information, i18n("*** Success ***"), Log::Delayed);
emit success();
return;
}
- QString command = commands[_customCommandIndex];
+ TQString command = commands[_customCommandIndex];
_base = new CustomProcess(command);
Compile::Data data(Tool::Category::Nb_Types, _todo, Main::device(), Main::project(), _type);
_base->init(data, this);
if ( !_base->start() ) {
- Log::Base::log(Log::LineType::Error, i18n("Failed to execute custom command #%1.").arg(_customCommandIndex+1), Log::Delayed);
+ Log::Base::log(Log::LineType::Error, i18n("Failed to execute custom command #%1.").tqarg(_customCommandIndex+1), Log::Delayed);
processFailed();
}
}
diff --git a/src/tools/list/compile_manager.h b/src/tools/list/compile_manager.h
index 6f617b4..0d144e6 100644
--- a/src/tools/list/compile_manager.h
+++ b/src/tools/list/compile_manager.h
@@ -14,16 +14,17 @@
namespace Compile
{
-class Manager : public QObject, public Log::Base
+class Manager : public TQObject, public Log::Base
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Operation { NoOperation = 0, Clean = 1, CompileOnly = 2, Build = 4 };
- Q_DECLARE_FLAGS(Operations, Operation)
+ TQ_DECLARE_FLAGS(Operations, Operation)
public:
- Manager(QObject *parent);
- QString label() const { return _label; }
+ Manager(TQObject *tqparent);
+ TQString label() const { return _label; }
bool compileFile(const TodoItem &item);
void cleanFile(const PURL::Url &url);
bool buildProject(LinkType type);
@@ -32,8 +33,8 @@ public:
bool compileOnly() const { return (_operations & CompileOnly); }
void processDone();
void processFailed();
- void log(Log::LineType type, const QString &message, const QString &filepath = QString::null, uint line = 0);
- void log(Log::DebugLevel debug, const QString &message, const QString &filepath = QString::null, uint line = 0);
+ void log(Log::LineType type, const TQString &message, const TQString &filepath = TQString(), uint line = 0);
+ void log(Log::DebugLevel debug, const TQString &message, const TQString &filepath = TQString(), uint line = 0);
signals:
void success();
@@ -47,9 +48,9 @@ private:
Operations _operations;
enum Action { Compiling, Linking, BinToHex };
Action _action;
- QValueList<TodoItem> _todo, _items;
+ TQValueList<TodoItem> _todo, _items;
BaseProcess *_base;
- QString _label;
+ TQString _label;
LinkType _type;
bool _wholeProject;
uint _customCommandIndex;
@@ -67,7 +68,7 @@ private:
void startCustomCommand();
void executeCustomCommands();
};
-Q_DECLARE_OPERATORS_FOR_FLAGS(Manager::Operations)
+TQ_DECLARE_OPERATORS_FOR_FLAGS(Manager::Operations)
} // namespace
diff --git a/src/tools/list/compile_process.cpp b/src/tools/list/compile_process.cpp
index 4f251bc..4d24e88 100644
--- a/src/tools/list/compile_process.cpp
+++ b/src/tools/list/compile_process.cpp
@@ -9,8 +9,8 @@
***************************************************************************/
#include "compile_process.h"
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
#include "devices/list/device_list.h"
#include "common/global/process.h"
@@ -67,10 +67,10 @@ void Compile::FileData::List::cleanGenerated() const
}
//-----------------------------------------------------------------------------
-Compile::LogWidget::LogWidget(QWidget *parent)
- : Log::Widget(parent, "compile_log")
+Compile::LogWidget::LogWidget(TQWidget *tqparent)
+ : Log::Widget(tqparent, "compile_log")
{
- connect(this, SIGNAL(clicked(int, int)), SLOT(lineClicked(int)));
+ connect(this, TQT_SIGNAL(clicked(int, int)), TQT_SLOT(lineClicked(int)));
}
void Compile::LogWidget::clear()
@@ -79,13 +79,13 @@ void Compile::LogWidget::clear()
_map.clear();
}
-void Compile::LogWidget::appendLine(Log::LineType type, const QString &message, const QString &filepath, uint line)
+void Compile::LogWidget::appendLine(Log::LineType type, const TQString &message, const TQString &filepath, uint line)
{
log(type, message, Log::Delayed);
if ( !filepath.isEmpty() ) _map[paragraphs()-1] = Data(filepath, line);
}
-void Compile::LogWidget::appendLine(Log::DebugLevel level, const QString &message, const QString &filepath, uint line)
+void Compile::LogWidget::appendLine(Log::DebugLevel level, const TQString &message, const TQString &filepath, uint line)
{
log(level, message, Log::Delayed);
if ( !filepath.isEmpty() ) _map[paragraphs()-1] = Data(filepath, line);
@@ -93,16 +93,16 @@ void Compile::LogWidget::appendLine(Log::DebugLevel level, const QString &messag
void Compile::LogWidget::lineClicked(int line)
{
- if ( !_map.contains(line) ) return;
+ if ( !_map.tqcontains(line) ) return;
PURL::Url url = PURL::Url::fromPathOrUrl(_map[line].filepath);
- TextEditor *e = ::qt_cast<TextEditor *>(Main::editorManager().openEditor(url));
+ TextEditor *e = ::tqqt_cast<TextEditor *>(Main::editorManager().openEditor(url));
if ( e==0 ) return;
e->setCursor(_map[line].line, 0);
}
//-----------------------------------------------------------------------------
Compile::BaseProcess::BaseProcess()
- : QObject(0, "compile_process"), _manager(0), _process(0)
+ : TQObject(0, "compile_process"), _manager(0), _process(0)
{}
void Compile::BaseProcess::init(const Data &data, Manager *manager)
@@ -120,14 +120,14 @@ PURL::Directory Compile::BaseProcess::directory(uint i) const
bool Compile::BaseProcess::start()
{
- _stdout = QString::null;
- _stderr = QString::null;
+ _stdout = TQString();
+ _stderr = TQString();
delete _process;
_process = new ::Process::LineSignal;
- connect(_process, SIGNAL(done(int)), SLOT(done(int)));
- connect(_process, SIGNAL(timeout()), SLOT(timeout()));
- connect(_process, SIGNAL(logStdoutLine(const QString &)), SLOT(logStdoutLine(const QString &)));
- connect(_process, SIGNAL(logStderrLine(const QString &)), SLOT(logStderrLine(const QString &)));
+ connect(_process, TQT_SIGNAL(done(int)), TQT_SLOT(done(int)));
+ connect(_process, TQT_SIGNAL(timeout()), TQT_SLOT(timeout()));
+ connect(_process, TQT_SIGNAL(logStdoutLine(const TQString &)), TQT_SLOT(logStdoutLine(const TQString &)));
+ connect(_process, TQT_SIGNAL(logStderrLine(const TQString &)), TQT_SLOT(logStderrLine(const TQString &)));
_process->setWorkingDirectory(directory().path());
setupProcess();
_manager->log(Log::LineType::Command, _process->arguments().join(" "));
@@ -137,7 +137,7 @@ bool Compile::BaseProcess::start()
void Compile::BaseProcess::done(int code)
{
if ( code!=0 ) {
- _manager->log(Log::LineType::Error, i18n("*** Exited with status: %1 ***").arg(code));
+ _manager->log(Log::LineType::Error, i18n("*** Exited with status: %1 ***").tqarg(code));
_manager->processFailed();
} else if ( _manager->hasError() ) {
_manager->log(Log::LineType::Error, i18n("*** Error ***"));
@@ -183,12 +183,12 @@ PURL::Url Compile::Process::url(PURL::FileType type, uint i) const
return url.toFileType(type);
}
-QString Compile::Process::filepath(PURL::FileType type, uint i) const
+TQString Compile::Process::filepath(PURL::FileType type, uint i) const
{
return url(type, i).relativeTo(directory(), Compile::Config::withWine(group()) ? PURL::WindowsSeparator : PURL::UnixSeparator);
}
-QString Compile::Process::outputFilepath() const
+TQString Compile::Process::outputFilepath() const
{
if ( _data.category==Tool::Category::Librarian ) return filepath(PURL::Library);
return filepath(PURL::Hex);
@@ -203,8 +203,8 @@ Compile::FileData::List Compile::Process::files(bool *ok) const
{
if (ok) *ok = true;
FileData::List list;
- QRegExp rexp("PURL::(.*)");
- QStringList files = QStringList::split(" ", outputFiles());
+ TQRegExp rexp("PURL::(.*)");
+ TQStringList files = TQStringList::split(" ", outputFiles());
for (uint i=0; i<files.count(); i++) {
if ( rexp.exactMatch(files[i]) ) {
PURL::FileType type = PURL::FileType::fromKey(rexp.cap(1));
@@ -228,31 +228,31 @@ Compile::FileData::List Compile::Process::files(bool *ok) const
return list;
}
-bool Compile::Process::checkIs(const QString &s, const QString &key)
+bool Compile::Process::checkIs(const TQString &s, const TQString &key)
{
- if ( !s.contains(key) ) return false;
+ if ( !s.tqcontains(key) ) return false;
if ( s!=key ) qWarning("Argument should be only %s, the rest will be ignored...", key.latin1());
return true;
}
-QString Compile::Process::replaceIf(const QString &s, const QString &key, bool condition)
+TQString Compile::Process::replaceIf(const TQString &s, const TQString &key, bool condition)
{
- QRegExp rexp("(.*)\\$" + key + "\\(([^)]*)\\)(.*)");
+ TQRegExp rexp("(.*)\\$" + key + "\\(([^)]*)\\)(.*)");
if ( !rexp.exactMatch(s) ) return s;
- return rexp.cap(1) + (condition ? rexp.cap(2) : QString::null) + rexp.cap(3);
+ return rexp.cap(1) + (condition ? rexp.cap(2) : TQString()) + rexp.cap(3);
}
-QStringList Compile::Process::arguments() const
+TQStringList Compile::Process::arguments() const
{
bool custom = _config->hasCustomArguments(_data.category);
bool withWine = Compile::Config::withWine(group());
- QStringList args = (custom ? _config->customArguments(_data.category) : genericArguments(*_config));
+ TQStringList args = (custom ? _config->customArguments(_data.category) : genericArguments(*_config));
PURL::Url lkr = Main::toolGroup().linkerScript(_data.project, _data.linkType);
- QStringList nargs;
+ TQStringList nargs;
for (uint i=0; i<args.count(); i++) {
- if ( args[i].contains("$(SRCPATH)") ) {
- args[i].replace("$(SRCPATH)", directory().path());
- args[i].replace("//", "/");
+ if ( args[i].tqcontains("$(SRCPATH)") ) {
+ args[i].tqreplace("$(SRCPATH)", directory().path());
+ args[i].tqreplace("//", "/");
}
args[i] = replaceIf(args[i], "WINE", withWine);
args[i] = replaceIf(args[i], "LKR", hasLinkerScript());
@@ -267,22 +267,22 @@ QStringList Compile::Process::arguments() const
continue;
}
if ( checkIs(args[i], "%LIBS") ) {
- if (_data.project) nargs += _data.project->librariesForLinker(QString::null, withWine);
+ if (_data.project) nargs += _data.project->librariesForLinker(TQString(), withWine);
continue;
}
- args[i].replace("%OBJECT", filepath(PURL::Object)); // before %O
- args[i].replace("%O", outputFilepath());
- args[i].replace("%COFF", filepath(PURL::Coff));
- if (_data.project) args[i].replace("%PROJECT", _data.project->name());
- else args[i].replace("%PROJECT", url().basename());
- args[i].replace("%MAP", filepath(PURL::Map));
- args[i].replace("%SYM", url().toExtension("sym").relativeTo(directory(), withWine ? PURL::WindowsSeparator : PURL::UnixSeparator));
- args[i].replace("%LIST", filepath(PURL::Lst));
- args[i].replace("%DEVICE", deviceName());
- args[i].replace("%FAMILY", familyName());
- args[i].replace("%LKR_PATH", lkr.path()); // before %LKR
- args[i].replace("%LKR_NAME", lkr.filename()); // before LKR
- args[i].replace("%LKR", lkr.filepath());
+ args[i].tqreplace("%OBJECT", filepath(PURL::Object)); // before %O
+ args[i].tqreplace("%O", outputFilepath());
+ args[i].tqreplace("%COFF", filepath(PURL::Coff));
+ if (_data.project) args[i].tqreplace("%PROJECT", _data.project->name());
+ else args[i].tqreplace("%PROJECT", url().basename());
+ args[i].tqreplace("%MAP", filepath(PURL::Map));
+ args[i].tqreplace("%SYM", url().toExtension("sym").relativeTo(directory(), withWine ? PURL::WindowsSeparator : PURL::UnixSeparator));
+ args[i].tqreplace("%LIST", filepath(PURL::Lst));
+ args[i].tqreplace("%DEVICE", deviceName());
+ args[i].tqreplace("%FAMILY", familyName());
+ args[i].tqreplace("%LKR_PATH", lkr.path()); // before %LKR
+ args[i].tqreplace("%LKR_NAME", lkr.filename()); // before LKR
+ args[i].tqreplace("%LKR", lkr.filepath());
if ( checkIs(args[i], "%I") ) {
for (uint k=0; k<nbFiles(); k++) nargs += inputFilepath(k);
continue;
@@ -290,46 +290,46 @@ QStringList Compile::Process::arguments() const
if ( !args[i].isEmpty() ) nargs += args[i];
}
args.clear();
- for (uint i=0; i<nargs.count(); i++) args += QStringList::split("%SEP", nargs[i]);
+ for (uint i=0; i<nargs.count(); i++) args += TQStringList::split("%SEP", nargs[i]);
return args;
}
void Compile::Process::setupProcess()
{
bool withWine = Compile::Config::withWine(group());
- QString exec = tool()->baseExecutable(withWine, Compile::Config::outputExecutableType(group()));
- QString path = tool()->executableDirectory().path();
+ TQString exec = tool()->baseExecutable(withWine, Compile::Config::outputExecutableType(group()));
+ TQString path = tool()->executableDirectory().path();
_process->setup(path + exec, arguments(), withWine);
}
-Log::LineType Compile::Process::filterType(const QString &type) const
+Log::LineType Compile::Process::filterType(const TQString &type) const
{
- QString s = type.lower();
+ TQString s = type.lower();
if ( s.startsWith("warning") ) return Log::LineType::Warning;
if ( s.startsWith("error") ) return Log::LineType::Error;
if ( s.startsWith("message") ) return Log::LineType::Information;
return Log::LineType::Normal;
}
-bool Compile::Process::parseErrorLine(const QString &s, const ParseErrorData &data)
+bool Compile::Process::parseErrorLine(const TQString &s, const ParseErrorData &data)
{
- QRegExp re(data.pattern);
+ TQRegExp re(data.pattern);
if ( !re.exactMatch(s) ) return false;
- QString file;
+ TQString file;
if ( data.indexFile>=0 ) {
file = re.cap(data.indexFile).stripWhiteSpace();
if ( file.endsWith(".") ) file = file.mid(0, file.length()-1);
- if ( file=="-" ) file = QString::null;
+ if ( file=="-" ) file = TQString();
}
bool ok;
int line = -1;
if ( data.indexLine>=0 ) line = re.cap(data.indexLine).stripWhiteSpace().toUInt(&ok) - 1;
if ( !ok ) line = -1;
- QString message;
+ TQString message;
if ( data.indexMessage>=0 ) message= re.cap(data.indexMessage).stripWhiteSpace();
Log::LineType type = data.defaultLineType;
if ( data.indexLogType>=0 ) {
- QString s = re.cap(data.indexLogType).stripWhiteSpace();
+ TQString s = re.cap(data.indexLogType).stripWhiteSpace();
if ( s.isEmpty() ) type = data.defaultLineType;
else type = filterType(s);
}
@@ -337,22 +337,22 @@ bool Compile::Process::parseErrorLine(const QString &s, const ParseErrorData &da
return true;
}
-void Compile::Process::doLog(const QString &type, const QString &message, const QString &surl, uint line)
+void Compile::Process::doLog(const TQString &type, const TQString &message, const TQString &surl, uint line)
{
doLog(filterType(type), message, surl, line);
}
-void Compile::Process::doLog(Log::LineType type, const QString &message, const QString &surl, uint line)
+void Compile::Process::doLog(Log::LineType type, const TQString &message, const TQString &surl, uint line)
{
if ( surl.isEmpty() ) {
_manager->log(type, message);
return;
}
PURL::Url url = PURL::Url::fromPathOrUrl(surl);
- QString s;
+ TQString s;
if ( !url.isEmpty() ) {
if ( !url.exists() && !url.isInto(directory()) ) url = PURL::Url(directory(), surl);
- s += url.filename() + ":" + QString::number(line+1) + ": ";
+ s += url.filename() + ":" + TQString::number(line+1) + ": ";
}
switch (type.type()) {
case Log::LineType::Warning: s += i18n("warning: "); break;
@@ -367,10 +367,10 @@ void Compile::Process::doLog(Log::LineType type, const QString &message, const Q
void Compile::CustomProcess::setupProcess()
{
_process->setUseShell(true);
- _process->setup(_command, QStringList(), false);
+ _process->setup(_command, TQStringList(), false);
}
-void Compile::CustomProcess::logStderrLine(const QString &line)
+void Compile::CustomProcess::logStderrLine(const TQString &line)
{
_manager->log(Log::LineType::Normal, line);
}
diff --git a/src/tools/list/compile_process.h b/src/tools/list/compile_process.h
index 4fe396e..dd5ce3b 100644
--- a/src/tools/list/compile_process.h
+++ b/src/tools/list/compile_process.h
@@ -22,8 +22,8 @@ namespace Compile
{
class Manager;
enum FileAction { NoAction = 0, Show = 1, InProject = 2, Generated = 8, Included = 16 };
- Q_DECLARE_FLAGS(FileActions, FileAction)
- Q_DECLARE_OPERATORS_FOR_FLAGS(FileActions)
+ TQ_DECLARE_FLAGS(FileActions, FileAction)
+ TQ_DECLARE_OPERATORS_FOR_FLAGS(FileActions)
class FileData {
public:
@@ -31,7 +31,7 @@ namespace Compile
FileData(const PURL::Url &u, FileActions a) : url(u), actions(a) {}
PURL::Url url;
FileActions actions;
- class List : public QValueList<FileData> {
+ class List : public TQValueList<FileData> {
public:
List() {}
List(const FileData &data) { append(data); }
@@ -47,14 +47,14 @@ namespace Compile
class ParseErrorData {
public:
- ParseErrorData(const QString &p, int iFile, int iLine, int iMessage, Log::LineType dLineType)
+ ParseErrorData(const TQString &p, int iFile, int iLine, int iMessage, Log::LineType dLineType)
: pattern(p), indexFile(iFile), indexLine(iLine), indexMessage(iMessage), indexLogType(-1),
defaultLineType(dLineType) {}
- ParseErrorData(const QString &p, int iFile, int iLine, int iMessage, uint iLogType,
+ ParseErrorData(const TQString &p, int iFile, int iLine, int iMessage, uint iLogType,
Log::LineType dLineType = Log::LineType::Error)
: pattern(p), indexFile(iFile), indexLine(iLine), indexMessage(iMessage), indexLogType(iLogType),
defaultLineType(dLineType) {}
- QString pattern;
+ TQString pattern;
int indexFile, indexLine, indexMessage, indexLogType;
Log::LineType defaultLineType;
};
@@ -63,10 +63,11 @@ namespace Compile
class LogWidget : public Log::Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- LogWidget(QWidget *parent);
- void appendLine(Log::LineType type, const QString &message, const QString &filepath, uint line);
- void appendLine(Log::DebugLevel debug, const QString &message, const QString &filepath, uint line);
+ LogWidget(TQWidget *tqparent);
+ void appendLine(Log::LineType type, const TQString &message, const TQString &filepath, uint line);
+ void appendLine(Log::DebugLevel debug, const TQString &message, const TQString &filepath, uint line);
virtual void clear();
private slots:
@@ -76,17 +77,18 @@ private:
class Data {
public:
Data() {}
- Data(const QString &fp, uint l) : filepath(fp), line(l) {}
- QString filepath;
+ Data(const TQString &fp, uint l) : filepath(fp), line(l) {}
+ TQString filepath;
uint line;
};
- QMap<uint, Data> _map;
+ TQMap<uint, Data> _map;
};
//-----------------------------------------------------------------------------
-class BaseProcess : public QObject
+class BaseProcess : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
BaseProcess();
virtual void init(const Data &data, Manager *manager);
@@ -102,15 +104,15 @@ protected:
Manager *_manager;
Data _data;
::Process::LineSignal *_process;
- QString _stdout, _stderr;
+ TQString _stdout, _stderr;
const Tool::Group &group() const { return Main::toolGroup(); }
PURL::Directory directory(uint i = 0) const;
virtual void setupProcess() = 0;
protected slots:
- virtual void logStdoutLine(const QString &line) { logStderrLine(line); }
- virtual void logStderrLine(const QString &line) = 0;
+ virtual void logStdoutLine(const TQString &line) { logStderrLine(line); }
+ virtual void logStderrLine(const TQString &line) = 0;
virtual void done(int code);
void timeout();
};
@@ -119,48 +121,50 @@ protected slots:
class Process : public BaseProcess
{
Q_OBJECT
+ TQ_OBJECT
public:
virtual ~Process();
virtual void init(const Data &data, Manager *manager);
virtual bool check() const;
virtual FileData::List files(bool *ok) const;
- virtual QStringList genericArguments(const Compile::Config &config) const = 0;
+ virtual TQStringList genericArguments(const Compile::Config &config) const = 0;
void checkArguments() const;
protected:
Config *_config;
virtual PURL::Url url(PURL::FileType type = PURL::Nb_FileTypes, uint i = 0) const;
- QString filepath(PURL::FileType type, uint i=0) const;
- virtual QString outputFilepath() const;
- virtual QString outputFiles() const = 0;
+ TQString filepath(PURL::FileType type, uint i=0) const;
+ virtual TQString outputFilepath() const;
+ virtual TQString outputFiles() const = 0;
uint nbFiles() const { return _data.items.count(); }
- virtual QString inputFilepath(uint i) const { return filepath(PURL::Nb_FileTypes, i); }
- virtual QString deviceName() const = 0;
- virtual QString familyName() const { return QString::null; }
- virtual QString objectExtension() const { return QString::null; }
- virtual QString libraryExtension() const { return "lib"; }
+ virtual TQString inputFilepath(uint i) const { return filepath(PURL::Nb_FileTypes, i); }
+ virtual TQString deviceName() const = 0;
+ virtual TQString familyName() const { return TQString(); }
+ virtual TQString objectExtension() const { return TQString(); }
+ virtual TQString libraryExtension() const { return "lib"; }
virtual bool hasLinkerScript() const { return group().hasCustomLinkerScript(_data.project); }
FileData fileData(PURL::FileType type, FileActions actions) const;
- bool parseErrorLine(const QString &s, const ParseErrorData &data);
- virtual Log::LineType filterType(const QString &type) const;
- void doLog(const QString &type, const QString &message, const QString &surl, uint line);
- void doLog(Log::LineType type, const QString &message, const QString &surl, uint line);
+ bool parseErrorLine(const TQString &s, const ParseErrorData &data);
+ virtual Log::LineType filterType(const TQString &type) const;
+ void doLog(const TQString &type, const TQString &message, const TQString &surl, uint line);
+ void doLog(Log::LineType type, const TQString &message, const TQString &surl, uint line);
virtual void setupProcess();
- QStringList arguments() const;
+ TQStringList arguments() const;
const Tool::Base *tool() const { return group().base(_data.category); }
private:
- static bool checkIs(const QString &s, const QString &key);
- static QString replaceIf(const QString &s, const QString &key, bool condition);
+ static bool checkIs(const TQString &s, const TQString &key);
+ static TQString replaceIf(const TQString &s, const TQString &key, bool condition);
};
//-----------------------------------------------------------------------------
class CustomProcess : public BaseProcess
{
Q_OBJECT
+ TQ_OBJECT
public:
- CustomProcess(const QString &command) : _command(command) {}
+ CustomProcess(const TQString &command) : _command(command) {}
virtual bool check() const { return true; }
virtual FileData::List files(bool *ok) const { if (ok) *ok = true; return FileData::List(); }
@@ -168,10 +172,10 @@ protected:
virtual void setupProcess();
protected slots:
- virtual void logStderrLine(const QString &line);
+ virtual void logStderrLine(const TQString &line);
private:
- QString _command;
+ TQString _command;
};
} // namespace
diff --git a/src/tools/list/device_info.cpp b/src/tools/list/device_info.cpp
index 78ca7a7..be4169a 100644
--- a/src/tools/list/device_info.cpp
+++ b/src/tools/list/device_info.cpp
@@ -12,35 +12,35 @@
#include "progs/list/prog_list.h"
#include "tool_list.h"
-QString Device::webpageHtml(const Device::Data &data)
+TQString Device::webpageHtml(const Device::Data &data)
{
const Device::Documents &documents = data.documents();
- QString url = "http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;nodeId=";
+ TQString url = "http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&amp;nodeId=";
if ( documents.webpage.isEmpty() ) url += "2044&amp;AllWords=" + data.name();
else url += "1335&amp;dDocName=en" + documents.webpage;
return "<a href=\"" + url + "\">" + i18n("Device Page") + "</a> ";
}
-QString documentHtml(const QString &document, const QString &label)
+TQString documentHtml(const TQString &document, const TQString &label)
{
- if ( document.isEmpty() ) return QString::null;
+ if ( document.isEmpty() ) return TQString();
return ", <a href=\"document://" + document + "\">" + label + "</a>";
}
-QString Device::documentHtml(const Device::Data &data)
+TQString Device::documentHtml(const Device::Data &data)
{
- QString s = webpageHtml(data);
+ TQString s = webpageHtml(data);
s += documentHtml(data.documents().datasheet, i18n("Datasheet"));
s += documentHtml(data.documents().progsheet, i18n("Programming Specifications"));
return htmlTableRow(i18n("Documents"), s);
}
-QString Device::supportedHtmlInfo(const Device::Data &data)
+TQString Device::supportedHtmlInfo(const Device::Data &data)
{
- QString doc;
+ TQString doc;
doc += "<hr />\n";
doc += "<table>\n";
- QString tools;
+ TQString tools;
Tool::Lister::ConstIterator tit;
for (tit=Tool::lister().begin(); tit!=Tool::lister().end(); ++tit) {
if ( !tit.data()->isSupported(data.name()) ) continue;
@@ -49,7 +49,7 @@ QString Device::supportedHtmlInfo(const Device::Data &data)
tools += tit.data()->label();
}
doc += htmlTableRow(i18n("Tools"), tools) + "\n";
- QString progs;
+ TQString progs;
Programmer::Lister::ConstIterator pit;
for (pit=Programmer::lister().begin(); pit!=Programmer::lister().end(); ++pit) {
if ( !pit.data()->isSupported(data.name()) ) continue;
diff --git a/src/tools/list/device_info.h b/src/tools/list/device_info.h
index ad69c59..036aac3 100644
--- a/src/tools/list/device_info.h
+++ b/src/tools/list/device_info.h
@@ -9,14 +9,14 @@
#ifndef DEVICE_INFO_H
#define DEVICE_INFO_H
-#include <qstring.h>
+#include <tqstring.h>
namespace Device { class Data; }
namespace Device
{
- extern QString webpageHtml(const Device::Data &data);
- extern QString documentHtml(const Device::Data &data);
- extern QString supportedHtmlInfo(const Device::Data &data);
+ extern TQString webpageHtml(const Device::Data &data);
+ extern TQString documentHtml(const Device::Data &data);
+ extern TQString supportedHtmlInfo(const Device::Data &data);
} // namespace
#endif
diff --git a/src/tools/list/tools_config_widget.cpp b/src/tools/list/tools_config_widget.cpp
index 449183d..43ca04c 100644
--- a/src/tools/list/tools_config_widget.cpp
+++ b/src/tools/list/tools_config_widget.cpp
@@ -9,8 +9,8 @@
***************************************************************************/
#include "tools_config_widget.h"
-#include <qwidgetstack.h>
-#include <qlabel.h>
+#include <tqwidgetstack.h>
+#include <tqlabel.h>
#include "tool_list.h"
#include "tools/gui/tool_config_widget.h"
@@ -20,15 +20,15 @@
#include "libgui/project.h"
//----------------------------------------------------------------------------
-HelpDialog::HelpDialog(QWidget *parent)
- : Dialog(parent, "help_dialog", false, i18n("Help Dialog"), Close, Close, false)
+HelpDialog::HelpDialog(TQWidget *tqparent)
+ : Dialog(tqparent, "help_dialog", false, i18n("Help Dialog"), Close, Close, false)
{
- QGridLayout *top = new QGridLayout(mainWidget(), 1, 1, 10, 10);
+ TQGridLayout *top = new TQGridLayout(mainWidget(), 1, 1, 10, 10);
uint k = 0;
for (; Compile::ARGUMENT_DATA[k].key; k++) {
- QLabel *label = new QLabel(Compile::ARGUMENT_DATA[k].key, mainWidget());
+ TQLabel *label = new TQLabel(Compile::ARGUMENT_DATA[k].key, mainWidget());
top->addWidget(label, k, 0);
- label = new QLabel(i18n(Compile::ARGUMENT_DATA[k].description), mainWidget());
+ label = new TQLabel(i18n(Compile::ARGUMENT_DATA[k].description), mainWidget());
top->addWidget(label, k, 1);
}
top->setColStretch(2, 1);
@@ -36,33 +36,33 @@ HelpDialog::HelpDialog(QWidget *parent)
}
//----------------------------------------------------------------------------
-ToolsConfigWidget::ToolsConfigWidget(Project *project, QWidget *parent)
- : ::ConfigWidget(parent), _project(project), _helpDialog(0)
+ToolsConfigWidget::ToolsConfigWidget(Project *project, TQWidget *tqparent)
+ : ::ConfigWidget(tqparent), _project(project), _helpDialog(0)
{
uint row = 0;
- QLabel *label = new QLabel(i18n("Toolchain:"), this);
+ TQLabel *label = new TQLabel(i18n("Toolchain:"), this);
addWidget(label, row,row, 0,0);
- _tool = new KeyComboBox<QString>(this);
+ _tool = new KeyComboBox<TQString>(this);
Tool::Lister::ConstIterator it;
for (it=Tool::lister().begin(); it!=Tool::lister().end(); ++it)
_tool->appendItem(it.key(), it.data()->label());
- connect(_tool->widget(), SIGNAL(activated(int)), SLOT(toolChanged()));
+ connect(_tool->widget(), TQT_SIGNAL(activated(int)), TQT_SLOT(toolChanged()));
addWidget(_tool->widget(), row,row, 1,1);
- label = new QLabel(i18n("Output type:"), this);
+ label = new TQLabel(i18n("Output type:"), this);
addWidget(label, row,row, 2,2);
_output = new KeyComboBox<Tool::OutputType>(this);
FOR_EACH(Tool::OutputType, type) _output->appendItem(type, type.label());
addWidget(_output->widget(), row,row, 3,3);
row++;
- _mainStack = new QWidgetStack(this);
+ _mainStack = new TQWidgetStack(this);
addWidget(_mainStack, row,row, 0,4);
row++;
- _tabWidget = new QTabWidget(_mainStack);
+ _tabWidget = new TQTabWidget(_mainStack);
_mainStack->addWidget(_tabWidget);
FOR_EACH(Tool::Category, category) {
- _stacks[category] = new KeyWidgetStack<QString>(_tabWidget);
+ _stacks[category] = new KeyWidgetStack<TQString>(_tabWidget);
_stacks[category]->widget()->setMargin(10);
Tool::Lister::ConstIterator it;
for (it=Tool::lister().begin(); it!=Tool::lister().end(); ++it) {
@@ -71,13 +71,13 @@ ToolsConfigWidget::ToolsConfigWidget(Project *project, QWidget *parent)
ToolConfigWidget *cw = static_cast<const Tool::GroupUI *>(it.data()->gui())->createConfigWidget(category, project);
Q_ASSERT(cw);
_stacks[category]->appendItem(it.key(), cw);
- connect(cw, SIGNAL(displayHelp()), SLOT(displayHelp()));
+ connect(cw, TQT_SIGNAL(displayHelp()), TQT_SLOT(displayHelp()));
}
}
- _customWidget = new QWidget(_mainStack);
+ _customWidget = new TQWidget(_mainStack);
_mainStack->addWidget(_customWidget);
- QVBoxLayout *vbox = new QVBoxLayout(_customWidget);
- label = new QLabel(i18n("Custom shell commands:"), _customWidget);
+ TQVBoxLayout *vbox = new TQVBoxLayout(_customWidget);
+ label = new TQLabel(i18n("Custom shell commands:"), _customWidget);
vbox->addWidget(label);
_commandsEditor = new EditListBox(1, _customWidget, "command_editor", EditListBox::DuplicatesAllowed);
vbox->addWidget(_commandsEditor);
@@ -87,7 +87,7 @@ ToolsConfigWidget::ToolsConfigWidget(Project *project, QWidget *parent)
void ToolsConfigWidget::toolChanged()
{
- QString name = _tool->currentItem();
+ TQString name = _tool->currentItem();
bool canMakeLibrary = Tool::lister().group(name)->needs(_project, Tool::Category::Librarian);
_output->widget()->setEnabled(canMakeLibrary);
if ( !canMakeLibrary ) _output->setCurrentItem(Tool::OutputType::Executable);
@@ -97,7 +97,7 @@ void ToolsConfigWidget::toolChanged()
FOR_EACH(Tool::Category, k) {
_tabWidget->removePage(_stacks[k]->widget());
_stacks[k]->widget()->hide();
- if ( _stacks[k]->contains(name) ) {
+ if ( _stacks[k]->tqcontains(name) ) {
_stacks[k]->setCurrentItem(name);
_stacks[k]->widget()->show();
_tabWidget->addTab(_stacks[k]->widget(), i18n(k.data().title));
@@ -112,11 +112,11 @@ void ToolsConfigWidget::loadConfig()
const Tool::Group &group = Compile::Config::toolGroup(_project);
_tool->setCurrentItem(group.name());
_output->setCurrentItem(_project->outputType());
- QStringList commands = Compile::Config::customCommands(_project);
+ TQStringList commands = Compile::Config::customCommands(_project);
_commandsEditor->setTexts(commands);
toolChanged();
FOR_EACH(Tool::Category, k) {
- KeyWidgetStack<QString>::ConstIterator it;
+ KeyWidgetStack<TQString>::ConstIterator it;
for (it=_stacks[k]->begin(); it!=_stacks[k]->end(); ++it) {
if ( it.key()==Tool::Group::CUSTOM_NAME ) continue;
static_cast<ToolConfigWidget *>(_stacks[k]->item(it.key()))->loadConfig();
@@ -126,13 +126,13 @@ void ToolsConfigWidget::loadConfig()
void ToolsConfigWidget::saveConfig()
{
- QString name = _tool->currentItem();
+ TQString name = _tool->currentItem();
Compile::Config::setToolGroup(_project, *Tool::lister().group(name));
_project->setOutputType(_output->currentItem());
Compile::Config::setCustomCommands(_project, _commandsEditor->texts());
FOR_EACH(Tool::Category, k) {
- if ( !_stacks[k]->contains(name) ) continue;
- QWidget *w = _stacks[k]->item(name);
+ if ( !_stacks[k]->tqcontains(name) ) continue;
+ TQWidget *w = _stacks[k]->item(name);
static_cast<ToolConfigWidget *>(w)->saveConfig();
}
}
diff --git a/src/tools/list/tools_config_widget.h b/src/tools/list/tools_config_widget.h
index 0f41b6a..bd4561a 100644
--- a/src/tools/list/tools_config_widget.h
+++ b/src/tools/list/tools_config_widget.h
@@ -10,9 +10,9 @@
#ifndef TOOLS_CONFIG_WIDGET_H
#define TOOLS_CONFIG_WIDGET_H
-#include <qcombobox.h>
-#include <qtabwidget.h>
-#include <qvaluevector.h>
+#include <tqcombobox.h>
+#include <tqtabwidget.h>
+#include <tqvaluevector.h>
#include "common/gui/config_widget.h"
#include "common/gui/dialog.h"
@@ -26,16 +26,18 @@ class ToolConfigWidget;
class HelpDialog : public Dialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- HelpDialog(QWidget *parent);
+ HelpDialog(TQWidget *tqparent);
};
//----------------------------------------------------------------------------
class ToolsConfigWidget : public ConfigWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- ToolsConfigWidget(Project *project, QWidget *parent);
+ ToolsConfigWidget(Project *project, TQWidget *tqparent);
virtual void loadConfig();
public slots:
@@ -47,14 +49,14 @@ private slots:
private:
Project *_project;
- KeyComboBox<QString> *_tool;
+ KeyComboBox<TQString> *_tool;
KeyComboBox<Tool::OutputType> *_output;
- QWidgetStack *_mainStack;
- QWidget *_customWidget;
+ TQWidgetStack *_mainStack;
+ TQWidget *_customWidget;
EditListBox *_commandsEditor;
- QTabWidget *_tabWidget;
- QMap<Tool::Category, KeyWidgetStack<QString> *> _stacks;
- QGuardedPtr<Dialog> _helpDialog;
+ TQTabWidget *_tabWidget;
+ TQMap<Tool::Category, KeyWidgetStack<TQString> *> _stacks;
+ TQGuardedPtr<Dialog> _helpDialog;
};
#endif