diff options
Diffstat (limited to 'src/tools/list/compile_config.cpp')
-rw-r--r-- | src/tools/list/compile_config.cpp | 88 |
1 files changed, 44 insertions, 44 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); } |