summaryrefslogtreecommitdiffstats
path: root/src/libgui/project.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libgui/project.cpp')
-rw-r--r--src/libgui/project.cpp96
1 files changed, 48 insertions, 48 deletions
diff --git a/src/libgui/project.cpp b/src/libgui/project.cpp
index dcf34c3..8ece518 100644
--- a/src/libgui/project.cpp
+++ b/src/libgui/project.cpp
@@ -16,12 +16,12 @@
#include "global_config.h"
#include "tools/gputils/gputils_config.h"
-bool Project::load(QString &error)
+bool Project::load(TQString &error)
{
if ( _url.fileType()==PURL::Project ) return XmlDataFile::load(error);
if ( !_url.exists() ) {
- error = i18n("Project file %1 does not exist.").arg(_url.pretty());
+ error = i18n("Project file %1 does not exist.").tqarg(_url.pretty());
return false;
}
PURL::Url tmp = _url;
@@ -30,29 +30,29 @@ bool Project::load(QString &error)
KConfig *config = new KSimpleConfig(tmp.filepath(), false);
config->setGroup("Files");
- QStringList list = config->readListEntry("inputFiles");
- QStringList::const_iterator it = list.begin();
+ TQStringList list = config->readListEntry("inputFiles");
+ TQStringList::const_iterator it = list.begin();
for (; it!=list.end(); ++it) addFile(PURL::Url(directory(), *it));
config->setGroup("General");
setVersion(config->readEntry("version", "0.1"));
- setDescription(config->readEntry("description", QString::null));
+ setDescription(config->readEntry("description", TQString()));
config->setGroup("Assembler");
- QString device = config->readEntry("target-device");
+ TQString device = config->readEntry("target-device");
if ( device=="*" ) device = GlobalConfig::programmerGroup().supportedDevices()[0]; // compatibility
Compile::Config::setDevice(this, Device::lister().checkName(device));
GPUtils::Config *gconfig = new GPUtils::Config(this);
- gconfig->setGPAsmWarningLevel(QMIN(config->readUnsignedNumEntry("warn-level", 0), uint(GPUtils::Config::Nb_WarningLevels)));
- gconfig->setRawIncludeDirs(Tool::Category::Assembler, config->readEntry("include-dir", QString::null));
- gconfig->setRawCustomOptions(Tool::Category::Assembler, config->readEntry("other-options", QString::null));
+ gconfig->setGPAsmWarningLevel(TQMIN(config->readUnsignedNumEntry("warn-level", 0), uint(GPUtils::Config::Nb_WarningLevels)));
+ gconfig->setRawIncludeDirs(Tool::Category::Assembler, config->readEntry("include-dir", TQString()));
+ gconfig->setRawCustomOptions(Tool::Category::Assembler, config->readEntry("other-options", TQString()));
config->setGroup("Linker") ;
- QString hexFormatString = config->readEntry("hex-format", HexBuffer::FORMATS[HexBuffer::IHX32]);
+ TQString hexFormatString = config->readEntry("hex-format", HexBuffer::FORMATS[HexBuffer::IHX32]);
for (uint i=0; i<HexBuffer::Nb_Formats; i++)
if ( hexFormatString==HexBuffer::FORMATS[i] ) gconfig->setHexFormat(HexBuffer::Format(i));
- gconfig->setRawIncludeDirs(Tool::Category::Linker, config->readEntry("objs-libs-dir", QString::null));
- gconfig->setRawCustomOptions(Tool::Category::Linker, config->readEntry("other-options", QString::null));
+ gconfig->setRawIncludeDirs(Tool::Category::Linker, config->readEntry("objs-libs-dir", TQString()));
+ gconfig->setRawCustomOptions(Tool::Category::Linker, config->readEntry("other-options", TQString()));
delete gconfig;
delete config;
@@ -62,8 +62,8 @@ bool Project::load(QString &error)
PURL::UrlList Project::openedFiles() const
{
PURL::UrlList files;
- QStringList list = listValues("general", "opened_files", QStringList());
- QStringList::const_iterator it = list.begin();
+ TQStringList list = listValues("general", "opened_files", TQStringList());
+ TQStringList::const_iterator it = list.begin();
for (; it!=list.end(); ++it) {
if ( PURL::Url::fromPathOrUrl(*it).isRelative() ) files += PURL::Url(directory(), *it);
else files += PURL::Url::fromPathOrUrl(*it);
@@ -81,8 +81,8 @@ void Project::setOpenedFiles(const PURL::UrlList &list)
PURL::UrlList Project::absoluteFiles() const
{
PURL::UrlList abs;
- QStringList files = listValues("general", "files", QStringList());
- QStringList::const_iterator it = files.begin();
+ TQStringList files = listValues("general", "files", TQStringList());
+ TQStringList::const_iterator it = files.begin();
for (; it!=files.end(); ++it) abs += PURL::Url::fromPathOrUrl(*it).toAbsolute(directory());
return abs;
}
@@ -99,7 +99,7 @@ void Project::clearFiles()
clearList("general", "files");
}
-QString Project::toSourceObject(const PURL::Url &url, const QString &extension, bool forWindows) const
+TQString Project::toSourceObject(const PURL::Url &url, const TQString &extension, bool forWindows) const
{
PURL::Url tmp;
if ( extension.isEmpty() ) tmp = url.toFileType(PURL::Object);
@@ -107,9 +107,9 @@ QString Project::toSourceObject(const PURL::Url &url, const QString &extension,
return tmp.relativeTo(directory(), forWindows ? PURL::WindowsSeparator : PURL::UnixSeparator);
}
-QStringList Project::objectsForLinker(const QString &extension, bool forWindows) const
+TQStringList Project::objectsForLinker(const TQString &extension, bool forWindows) const
{
- QStringList objs;
+ TQStringList objs;
// objects files corresponding to src files
PURL::UrlList files = absoluteFiles();
PURL::UrlList::const_iterator it;
@@ -121,9 +121,9 @@ QStringList Project::objectsForLinker(const QString &extension, bool forWindows)
return objs;
}
-QStringList Project::librariesForLinker(const QString &prefix, bool forWindows) const
+TQStringList Project::librariesForLinker(const TQString &prefix, bool forWindows) const
{
- QStringList libs;
+ TQStringList libs;
PURL::UrlList files = absoluteFiles();
PURL::UrlList::const_iterator it;
for (it=files.begin(); it!=files.end(); ++it)
@@ -131,11 +131,11 @@ QStringList Project::librariesForLinker(const QString &prefix, bool forWindows)
return libs;
}
-QString Project::version() const
+TQString Project::version() const
{
return Compile::Config::globalValue(this, "version", "0.1");
}
-void Project::setVersion(const QString &version)
+void Project::setVersion(const TQString &version)
{
Compile::Config::setGlobalValue(this, "version", version);
}
@@ -149,18 +149,18 @@ void Project::setOutputType(Tool::OutputType type)
Compile::Config::setGlobalValue(this, "output_type", type.key());
}
-QString Project::description() const
+TQString Project::description() const
{
- return Compile::Config::globalValue(this, "description", QString::null);
+ return Compile::Config::globalValue(this, "description", TQString());
}
-void Project::setDescription(const QString &description)
+void Project::setDescription(const TQString &description)
{
Compile::Config::setGlobalValue(this, "description", description);
}
PURL::Url Project::customLinkerScript() const
{
- QString s = Compile::Config::globalValue(this, "custom_linker_script", QString::null);
+ TQString s = Compile::Config::globalValue(this, "custom_linker_script", TQString());
return PURL::Url::fromPathOrUrl(s);
}
void Project::setCustomLinkerScript(const PURL::Url &url)
@@ -168,33 +168,33 @@ void Project::setCustomLinkerScript(const PURL::Url &url)
Compile::Config::setGlobalValue(this, "custom_linker_script", url.filepath());
}
-QValueList<Register::TypeData> Project::watchedRegisters() const
+TQValueList<Register::TypeData> Project::watchedRegisters() const
{
- QValueList<Register::TypeData> watched;
- QStringList list = listValues("general", "watched_registers", QStringList());
- QStringList::const_iterator it;
+ TQValueList<Register::TypeData> watched;
+ TQStringList list = listValues("general", "watched_registers", TQStringList());
+ TQStringList::const_iterator it;
for (it=list.begin(); it!=list.end(); ++it) {
Register::TypeData rtd = Register::TypeData::fromString(*it);
if ( rtd.type()!=Register::Invalid ) watched.append(rtd);
}
return watched;
}
-void Project::setWatchedRegisters(const QValueList<Register::TypeData> &watched)
+void Project::setWatchedRegisters(const TQValueList<Register::TypeData> &watched)
{
clearList("general", "watched_registers");
- QValueList<Register::TypeData>::const_iterator it;
+ TQValueList<Register::TypeData>::const_iterator it;
for (it=watched.begin(); it!=watched.end(); ++it)
appendListValue("general", "watched_registers", (*it).toString());
}
-QValueList<uint> Project::bookmarkLines(const PURL::Url &url) const
+TQValueList<uint> Project::bookmarkLines(const PURL::Url &url) const
{
- QValueList<uint> lines;
- QStringList list = listValues("editors", "bookmarks", QStringList());
- QStringList::const_iterator it;
+ TQValueList<uint> lines;
+ TQStringList list = listValues("editors", "bookmarks", TQStringList());
+ TQStringList::const_iterator it;
for (it=list.begin(); it!=list.end(); ++it) {
- QStringList slist = QStringList::split(",", *it);
- QStringList::const_iterator sit = slist.begin();
+ TQStringList slist = TQStringList::split(",", *it);
+ TQStringList::const_iterator sit = slist.begin();
if ( sit==slist.end() || (*sit)!=url.kurl().url() ) continue;
for (; sit!=slist.end(); ++sit) {
bool ok;
@@ -206,20 +206,20 @@ QValueList<uint> Project::bookmarkLines(const PURL::Url &url) const
}
return lines;
}
-void Project::setBookmarkLines(const PURL::Url &url, const QValueList<uint> &lines)
+void Project::setBookmarkLines(const PURL::Url &url, const TQValueList<uint> &lines)
{
- QStringList list = listValues("editors", "bookmarks", QStringList());
- QStringList nlist;
- QStringList::const_iterator it;
+ TQStringList list = listValues("editors", "bookmarks", TQStringList());
+ TQStringList nlist;
+ TQStringList::const_iterator it;
for (it=list.begin(); it!=list.end(); ++it) {
- QStringList slist = QStringList::split(",", *it);
- QStringList::const_iterator sit = slist.begin();
+ TQStringList slist = TQStringList::split(",", *it);
+ TQStringList::const_iterator sit = slist.begin();
if ( sit!=slist.end() && slist.count()>1 && (*sit)!=url.kurl().url() ) nlist += *it;
}
if ( lines.count()!=0 ) {
- QStringList slist = url.kurl().url();
- QValueList<uint>::const_iterator lit;
- for (lit=lines.begin(); lit!=lines.end(); ++lit) slist += QString::number(*lit);
+ TQStringList slist = url.kurl().url();
+ TQValueList<uint>::const_iterator lit;
+ for (lit=lines.begin(); lit!=lines.end(); ++lit) slist += TQString::number(*lit);
nlist += slist.join(",");
}
setListValues("editors", "bookmarks", nlist);