diff --git a/src/coff/base/cdb_parser.cpp b/src/coff/base/cdb_parser.cpp index 87d9d97..eb7495b 100644 --- a/src/coff/base/cdb_parser.cpp +++ b/src/coff/base/cdb_parser.cpp @@ -101,7 +101,7 @@ CDB::Object::~Object() void CDB::Object::log(Log::LineType type, const TQString &message) { - _log.log(type, message + " " + i18n("at line #%1, column #%2").arg(_line+1).arg(_col+1)); + _log.log(type, message + " " + i18n("at line #%1, column #%2").tqarg(_line+1).tqarg(_col+1)); } void CDB::Object::logMalformed(const TQString &detail) @@ -125,7 +125,7 @@ bool CDB::Object::readAndCheckChar(char c) char r; if ( !readChar(r) ) return false; if ( r!=c ) { - logMalformed(i18n("was expecting '%1'").arg(c)); + logMalformed(i18n("was expecting '%1'").tqarg(c)); return false; } return true; @@ -197,7 +197,7 @@ bool CDB::Object::readBool(bool &b) if ( c=='0' ) b = false; else if ( c=='1' ) b = true; else { - logMalformed(i18n("was expecting a bool ('%1')").arg(c)); + logMalformed(i18n("was expecting a bool ('%1')").tqarg(c)); return false; } return true; diff --git a/src/coff/base/coff.cpp b/src/coff/base/coff.cpp index e85b53d..83100a4 100644 --- a/src/coff/base/coff.cpp +++ b/src/coff/base/coff.cpp @@ -52,7 +52,7 @@ CoffType Coff::identify(const TQByteArray &data, uint &offset, Log::Base &log, F } } if ( !getULong(data, offset, 2, log, magic) ) return CoffType::Nb_Types; - log.log(Log::DebugLevel::Extra, TQString("COFF format: %1").arg(toHexLabel(magic, 4))); + log.log(Log::DebugLevel::Extra, TQString("COFF format: %1").tqarg(toHexLabel(magic, 4))); format = Format::Nb_Types; FOR_EACH(Format, f) if ( magic==f.data().magic ) format = f; return CoffType::Object; @@ -64,7 +64,7 @@ bool Coff::getULong(const TQByteArray &data, uint &offset, uint nbBytes, Log::Ba bool ok; v = ::getULong(data, offset, nbBytes, &ok); if ( !ok ) { - log.log(Log::LineType::Error, i18n("COFF file is truncated (offset: %1 nbBytes: %2 size:%3).").arg(offset).arg(nbBytes).arg(data.count())); + log.log(Log::LineType::Error, i18n("COFF file is truncated (offset: %1 nbBytes: %2 size:%3).").tqarg(offset).tqarg(nbBytes).tqarg(data.count())); return false; } offset += nbBytes; @@ -74,7 +74,7 @@ bool Coff::getULong(const TQByteArray &data, uint &offset, uint nbBytes, Log::Ba bool Coff::getString(const TQByteArray &data, uint &offset, uint nbChars, Log::Base &log, TQString &name) { if ( !checkAvailable(data, offset, nbChars) ) { - log.log(Log::LineType::Error, i18n("COFF file is truncated (offset: %1 nbBytes: %2 size:%3).").arg(offset).arg(nbChars).arg(data.count())); + log.log(Log::LineType::Error, i18n("COFF file is truncated (offset: %1 nbBytes: %2 size:%3).").tqarg(offset).tqarg(nbChars).tqarg(data.count())); return false; } name = TQString::fromAscii(data.data()+offset, nbChars); @@ -90,7 +90,7 @@ bool Coff::Base::initParse(CoffType type, TQByteArray &data, uint &offset, Log:: data = file.readAll(); if ( log.hasError() ) return false; if ( identify(data, offset, log, _format, _magic)!=type ) { - log.log(Log::LineType::Error, i18n("Could not recognize file (magic number is %1).").arg(toHexLabel(_magic, 4))); + log.log(Log::LineType::Error, i18n("Could not recognize file (magic number is %1).").tqarg(toHexLabel(_magic, 4))); return false; } return true; diff --git a/src/coff/base/coff_archive.cpp b/src/coff/base/coff_archive.cpp index e7d4c14..abf48af 100644 --- a/src/coff/base/coff_archive.cpp +++ b/src/coff/base/coff_archive.cpp @@ -16,7 +16,7 @@ Coff::Member::Member(const TQByteArray &data, uint &offset, Log::Base &log) if ( !getString(data, offset, 256, log, s) ) return; int i = s.find('/'); if ( i==-1 ) { - log.log(Log::LineType::Error, i18n("Member name not terminated by '/' (\"%1\").").arg(s)); + log.log(Log::LineType::Error, i18n("Member name not terminated by '/' (\"%1\").").tqarg(s)); return; } _name = s.mid(0, i); @@ -24,20 +24,20 @@ Coff::Member::Member(const TQByteArray &data, uint &offset, Log::Base &log) if ( !getString(data, offset, 10, log, s) ) return; i = s.find('l'); if ( i==-1 ) { - log.log(Log::LineType::Error, i18n("File size not terminated by 'l' (\"%1\").").arg(s)); + log.log(Log::LineType::Error, i18n("File size not terminated by 'l' (\"%1\").").tqarg(s)); return; } bool ok; _nbBytes = s.mid(0, i).toUInt(&ok); if ( !ok ) { - log.log(Log::LineType::Error, i18n("Wrong format for file size \"%1\".").arg(s)); + log.log(Log::LineType::Error, i18n("Wrong format for file size \"%1\".").tqarg(s)); return; } TQ_UINT32 v; if ( !getULong(data, offset, 2, log, v) ) return; - log.log(Log::DebugLevel::Extra, i18n("Magic number: %1").arg(toHexLabel(v, 4))); + log.log(Log::DebugLevel::Extra, i18n("Magic number: %1").tqarg(toHexLabel(v, 4))); // if ( v!=0x600A ) { -// log.log(Log::LineType::Error, i18n("Wrong magic for Microchip archive (\"%1\").").arg(toHexLabel(v, 4))); +// log.log(Log::LineType::Error, i18n("Wrong magic for Microchip archive (\"%1\").").tqarg(toHexLabel(v, 4))); // return; // } offset += _nbBytes; @@ -89,7 +89,7 @@ bool Coff::Archive::readSymbols(const TQByteArray &data, uint offset, Log::Base TQ_UINT32 start; if ( !getULong(data, offset, 4, log, start) ) return false; if ( !_offsets.contains(start) ) { - log.log(Log::LineType::Error, i18n("Unknown file member offset: %1").arg(toHexLabel(start, 8))); + log.log(Log::LineType::Error, i18n("Unknown file member offset: %1").tqarg(toHexLabel(start, 8))); return false; } members[i] = _offsets[start]; @@ -115,7 +115,7 @@ Log::KeyList Coff::Archive::membersInformation() const Log::KeyList keys(i18n("File Members:")); TQMap::const_iterator it; for (it=members().begin(); it!=members().end(); ++it) - keys.append(it.key(), i18n("size: %1 bytes").arg(it.data()->nbBytes())); + keys.append(it.key(), i18n("size: %1 bytes").tqarg(it.data()->nbBytes())); return keys; } diff --git a/src/coff/base/coff_object.cpp b/src/coff/base/coff_object.cpp index ee49a95..6a9a182 100644 --- a/src/coff/base/coff_object.cpp +++ b/src/coff/base/coff_object.cpp @@ -212,7 +212,7 @@ Coff::Symbol::Symbol(const Object &object, const TQByteArray &data, uint start, else if ( _name==".ident" ) auxType = AuxSymbolType::Identifier; else if ( _sclass==SymbolClass::Filename ) auxType = AuxSymbolType::File; else if ( _sclass==SymbolClass::Section ) auxType = AuxSymbolType::Section; - if ( auxType!=AuxSymbolType::Nb_Types && nbAux==0 ) log.log(Log::LineType::Warning, i18n("Symbol without needed auxilliary symbol (type=%1)").arg(auxType.type())); + if ( auxType!=AuxSymbolType::Nb_Types && nbAux==0 ) log.log(Log::LineType::Warning, i18n("Symbol without needed auxilliary symbol (type=%1)").tqarg(auxType.type())); Q_ASSERT( (offset-start)==object.size(SymbolSize) ); _aux.resize(nbAux); for (uint i=0; isection.size() ) log.log(Log::LineType::Warning, i18n("Relocation address beyong section size: %1/%2").arg(v).arg(section.size())); + if ( _address>section.size() ) log.log(Log::LineType::Warning, i18n("Relocation address beyong section size: %1/%2").tqarg(v).tqarg(section.size())); if ( !getULong(data, offset, 4, log, v) ) return; if ( v>=object.nbSymbols() ) { - log.log(Log::LineType::Error, i18n("Relocation has unknown symbol: %1").arg(v)); + log.log(Log::LineType::Error, i18n("Relocation has unknown symbol: %1").tqarg(v)); return; } if ( object.symbol(v)->isAuxSymbol() ) { - log.log(Log::LineType::Error, i18n("Relocation is an auxiliary symbol: %1").arg(v)); + log.log(Log::LineType::Error, i18n("Relocation is an auxiliary symbol: %1").tqarg(v)); return; } _symbol = static_cast(object.symbol(v)); @@ -283,11 +283,11 @@ Coff::CodeLine::CodeLine(const Object &object, const Section §ion, //qDebug("code line %i: %s", _line, toHexLabel(_address, nbChars(_address)).latin1()); } else { if ( tmp>=object.nbSymbols() ) { - log.log(Log::LineType::Error, i18n("Codeline has unknown symbol: %1").arg(tmp)); + log.log(Log::LineType::Error, i18n("Codeline has unknown symbol: %1").tqarg(tmp)); return; } if ( object.symbol(tmp)->isAuxSymbol() ) { - log.log(Log::LineType::Error, i18n("Codeline is an auxiliary symbol: %1").arg(tmp)); + log.log(Log::LineType::Error, i18n("Codeline is an auxiliary symbol: %1").tqarg(tmp)); return; } _symbol = static_cast(object.symbol(tmp)); @@ -296,11 +296,11 @@ Coff::CodeLine::CodeLine(const Object &object, const Section §ion, } } else { if ( tmp>=object.nbSymbols() ) { - log.log(Log::LineType::Error, i18n("Codeline has unknown symbol: %1").arg(tmp)); + log.log(Log::LineType::Error, i18n("Codeline has unknown symbol: %1").tqarg(tmp)); return; } if ( object.symbol(tmp)->isAuxSymbol() ) { - log.log(Log::LineType::Error, i18n("Codeline is an auxiliary symbol: %1").arg(tmp)); + log.log(Log::LineType::Error, i18n("Codeline is an auxiliary symbol: %1").tqarg(tmp)); return; } _symbol = static_cast(object.symbol(tmp)); @@ -318,7 +318,7 @@ Coff::CodeLine::CodeLine(const Object &object, const Section §ion, } // if ( _symbol && _symbol->_class!=Symbol::CFile ) // log.log(Log::LineType::Warning, i18n("Line without file symbol associated (%1:%2 %3).") -// .arg(_section._name).arg(toHexLabel(_address, nbChars(_address))).arg(_symbol->_class)); +// .tqarg(_section._name).tqarg(toHexLabel(_address, nbChars(_address))).tqarg(_symbol->_class)); } //---------------------------------------------------------------------------- @@ -343,7 +343,7 @@ Coff::Section::Section(const Device::Data &device, const Object &object, _address = v; if ( !getULong(data, offset, 4, log, v) ) return; //if ( _address!=v ) log.log(Log::LineType::Warning, i18n("Virtual address (%1) does not match physical address (%2) in %3.") - // .arg(toHexLabel(v, 4)).arg(toHexLabel(_address, 4)).arg(_name)); + // .tqarg(toHexLabel(v, 4)).tqarg(toHexLabel(_address, 4)).tqarg(_name)); if ( !getULong(data, offset, 4, log, v) ) return; _size = v; if ( !getULong(data, offset, 4, log, v) ) return; @@ -451,25 +451,25 @@ bool Coff::Object::parse(Log::Base &log) uint offset = 0; if ( !initParse(CoffType::Object, data, offset, log) ) return false; if ( _format==Format::Nb_Types ) { - log.log(Log::LineType::Error, i18n("COFF format not supported: magic number is %1.").arg(toHexLabel(_magic, 4))); + log.log(Log::LineType::Error, i18n("COFF format not supported: magic number is %1.").tqarg(toHexLabel(_magic, 4))); return false; } - log.log(Log::DebugLevel::Extra, TQString("COFF format: %1").arg(toHexLabel(_magic, 4))); + log.log(Log::DebugLevel::Extra, TQString("COFF format: %1").tqarg(toHexLabel(_magic, 4))); if ( !parseHeader(data, offset, log) ) return false; // optionnal header Q_ASSERT( offset==size(HeaderSize) ); if ( !getULong(data, offset, 2, log, _optHeaderMagic) ) return false; - log.log(Log::DebugLevel::Extra, TQString("COFF optionnal header format: %1").arg(toHexLabel(_optHeaderMagic, 4))); + log.log(Log::DebugLevel::Extra, TQString("COFF optionnal header format: %1").tqarg(toHexLabel(_optHeaderMagic, 4))); _optHeaderFormat = OptHeaderFormat::Nb_Types; uint i = 0; for (; OPT_HEADER_DATA[i].optHeaderFormat!=OptHeaderFormat::Nb_Types; i++) if ( _optHeaderMagic==OPT_HEADER_DATA[i].magic ) break; _optHeaderFormat = OPT_HEADER_DATA[i].optHeaderFormat; if ( _optHeaderFormat==OptHeaderFormat::Nb_Types ) { - log.log(Log::LineType::Warning, i18n("Optional header format not supported: magic number is %1.").arg(toHexLabel(_optHeaderMagic, 4))); + log.log(Log::LineType::Warning, i18n("Optional header format not supported: magic number is %1.").tqarg(toHexLabel(_optHeaderMagic, 4))); offset += size(OptHeaderSize)-2; } else if ( !OPT_HEADER_DATA[i].parsed ) { - log.log(Log::DebugLevel::Normal, TQString("Optional header not parsed: magic number is %1.").arg(toHexLabel(_optHeaderMagic, 4))); + log.log(Log::DebugLevel::Normal, TQString("Optional header not parsed: magic number is %1.").tqarg(toHexLabel(_optHeaderMagic, 4))); offset += size(OptHeaderSize)-2; } else if ( !parseOptionnalHeader(data, offset, log) ) return false; @@ -535,7 +535,7 @@ bool Coff::Object::parseHeader(const TQByteArray &data, uint &offset, Log::Base _nbSymbols = v; if ( !getULong(data, offset, 2, log, v) ) return false; if ( v!=size(OptHeaderSize) ) { - log.log(Log::LineType::Error, i18n("Optionnal header size is not %1: %2").arg(size(OptHeaderSize)).arg(v)); + log.log(Log::LineType::Error, i18n("Optionnal header size is not %1: %2").tqarg(size(OptHeaderSize)).tqarg(v)); return false; } if ( !getULong(data, offset, 2, log, v) ) return false; @@ -561,23 +561,23 @@ bool Coff::Object::parseOptionnalHeader(const TQByteArray &data, uint &offset, L // #### at least for C18 compiler, it can be compiled for generic processor: in such case // the pic type will be 18C452 in non-extended mode and 18F4620 for extended mode... TQString name = Coff::findId(v); - log.log(Log::DebugLevel::Normal, TQString("Device name: \"%1\"").arg(name)); + log.log(Log::DebugLevel::Normal, TQString("Device name: \"%1\"").tqarg(name)); if ( name.isEmpty() ) { - log.log(Log::DebugLevel::Normal, TQString("Unknown processor type: %1").arg(toHexLabel(v, 4))); - log.log(Log::LineType::Error, i18n("Could not determine processor (%1).").arg(toHexLabel(v, 4))); + log.log(Log::DebugLevel::Normal, TQString("Unknown processor type: %1").tqarg(toHexLabel(v, 4))); + log.log(Log::LineType::Error, i18n("Could not determine processor (%1).").tqarg(toHexLabel(v, 4))); return false; } else if ( _device==0 ) _device = Device::lister().data(name); - else if ( name!=_device->name() ) log.log(Log::DebugLevel::Normal, TQString("Different processor name: %1").arg(name)); + else if ( name!=_device->name() ) log.log(Log::DebugLevel::Normal, TQString("Different processor name: %1").tqarg(name)); if ( !getULong(data, offset, 4, log, v) ) return false; const Pic::Data *pdata = static_cast(_device); if (pdata) { uint nbBits = pdata->nbBitsWord(Pic::MemoryRangeType::Code) / pdata->addressIncrement(Pic::MemoryRangeType::Code); - if ( v!=nbBits ) log.log(Log::DebugLevel::Normal, TQString("Rom width is not %1: %2").arg(nbBits).arg(v)); + if ( v!=nbBits ) log.log(Log::DebugLevel::Normal, TQString("Rom width is not %1: %2").tqarg(nbBits).tqarg(v)); } if ( !getULong(data, offset, 4, log, v) ) return false; if (pdata) { uint nbBits = pdata->registersData().nbBits(); - if ( v!=nbBits ) log.log(Log::DebugLevel::Normal, TQString("Ram width is not %1: %2").arg(nbBits).arg(v)); + if ( v!=nbBits ) log.log(Log::DebugLevel::Normal, TQString("Ram width is not %1: %2").tqarg(nbBits).tqarg(v)); } } return true; diff --git a/src/coff/base/text_coff.cpp b/src/coff/base/text_coff.cpp index 1ddeb30..52dd503 100644 --- a/src/coff/base/text_coff.cpp +++ b/src/coff/base/text_coff.cpp @@ -249,12 +249,12 @@ TQString Coff::TextObject::disassembly() const Log::KeyList Coff::TextObject::information() const { Log::KeyList keys; - keys.append(i18n("Format:"), i18n("%1 (magic id: %2)").arg(format().label()).arg(toHexLabel(format().data().magic, 4))); + keys.append(i18n("Format:"), i18n("%1 (magic id: %2)").tqarg(format().label()).tqarg(toHexLabel(format().data().magic, 4))); TQString name = (format()==Format::PIC30 || device()==0 ? "?" : device()->name()); keys.append(i18n("Device:"), name); OptHeaderFormat ohf = optHeaderFormat(); TQString label = (ohf==OptHeaderFormat::Nb_Types ? i18n("Unknown") : ohf.label()); - keys.append(i18n("Option header:"), i18n("%1 (magic id: %2)").arg(label).arg(toHexLabel(optHeaderMagic(), 4))); + keys.append(i18n("Option header:"), i18n("%1 (magic id: %2)").tqarg(label).tqarg(toHexLabel(optHeaderMagic(), 4))); keys.append(i18n("No. of sections:"), TQString::number(nbSections())); keys.append(i18n("No. of symbols:"), TQString::number(nbSymbols())); keys.append(i18n("No. of variables:"), TQString::number(variables().count())); diff --git a/src/common/cli/cli_main.cpp b/src/common/cli/cli_main.cpp index 8b8e2ab..11537a7 100644 --- a/src/common/cli/cli_main.cpp +++ b/src/common/cli/cli_main.cpp @@ -26,7 +26,7 @@ CLI::ExitCode CLI::findCommand(const TQString &s) { if ( s.isEmpty() ) return errorExit(i18n("No command specified"), ARG_ERROR); const CommandData *data = findCommandData(s); - if ( data==0 ) return errorExit(i18n("Unknown command: %1").arg(s), ARG_ERROR); + if ( data==0 ) return errorExit(i18n("Unknown command: %1").tqarg(s), ARG_ERROR); return OK; } @@ -182,7 +182,7 @@ CLI::ExitCode CLI::MainBase::doRun() TQString option = _args->getOption(PROPERTY_DATA[i].name); ExitCode code = executeSetCommand(PROPERTY_DATA[i].name, option); if ( code!=OK ) return code; - log(Log::LineType::Information, TQString("%1: %2").arg(PROPERTY_DATA[i].name).arg(executeGetCommand(PROPERTY_DATA[i].name))); + log(Log::LineType::Information, TQString("%1: %2").tqarg(PROPERTY_DATA[i].name).tqarg(executeGetCommand(PROPERTY_DATA[i].name))); } // process default lists diff --git a/src/common/cli/cli_pfile.cpp b/src/common/cli/cli_pfile.cpp index 1cdbc9a..e984e52 100644 --- a/src/common/cli/cli_pfile.cpp +++ b/src/common/cli/cli_pfile.cpp @@ -17,7 +17,7 @@ bool PURL::File::openForWrite() _file->setName(url().filepath()); if ( !_file->open(IO_WriteOnly) ) { _error = i18n("Could not open file for writing."); - _log.sorry(_error, i18n("File: %1").arg(_file->name())); + _log.sorry(_error, i18n("File: %1").tqarg(_file->name())); return false; } return true; @@ -35,7 +35,7 @@ bool PURL::File::openForRead() _file->setName(_url.filepath()); if ( !_file->open(IO_ReadOnly) ) { _error = i18n("Could not open file for reading."); - _log.sorry(_error, i18n("File: %1").arg(_file->name())); + _log.sorry(_error, i18n("File: %1").tqarg(_file->name())); return false; } return true; diff --git a/src/common/common/streamer.h b/src/common/common/streamer.h index 8d8ea6e..5d0bbaa 100644 --- a/src/common/common/streamer.h +++ b/src/common/common/streamer.h @@ -10,7 +10,7 @@ #define STREAMER_H #include -#include +#include #include "common/global/global.h" #include "common/common/number.h" diff --git a/src/common/global/pfile.h b/src/common/global/pfile.h index 4337ab7..477d7c0 100644 --- a/src/common/global/pfile.h +++ b/src/common/global/pfile.h @@ -9,7 +9,7 @@ #ifndef PFILE_H #define PFILE_H -#include +#include #include "purl.h" namespace PURL diff --git a/src/common/global/process.cpp b/src/common/global/process.cpp index 238d336..ed63f86 100644 --- a/src/common/global/process.cpp +++ b/src/common/global/process.cpp @@ -146,13 +146,13 @@ bool Process::Base::isFilteredLine(const TQString &line) //---------------------------------------------------------------------------- void Process::StringOutput::receivedStdout(KProcess*, char *data, int len) { - _stdout += TQString::fromLatin1(data, len); + _stdout += TQString::tqfromLatin1(data, len); emit stdoutDataReceived(); } void Process::StringOutput::receivedStderr(KProcess*, char *data, int len) { - _stderr += TQString::fromLatin1(data, len); + _stderr += TQString::tqfromLatin1(data, len); emit stderrDataReceived(); } @@ -164,7 +164,7 @@ void Process::LineBase::receivedStdout(KProcess*, char *data, int len) if ( data[i]=='\n' ) { if ( !isFilteredLine(_stdout) ) addStdoutLine(_stdout); _stdout = TQString(); - } else _stdout += TQString::fromLatin1(data + i, 1); + } else _stdout += TQString::tqfromLatin1(data + i, 1); } if ( !_process->isRunning() && !isFilteredLine(_stdout) ) addStdoutLine(_stdout); emit stdoutDataReceived(); @@ -177,7 +177,7 @@ void Process::LineBase::receivedStderr(KProcess*, char *data, int len) if ( data[i]=='\n' ) { if ( !isFilteredLine(_stderr) ) addStderrLine(_stderr); _stderr = TQString(); - } else _stderr += TQString::fromLatin1(data + i, 1); + } else _stderr += TQString::tqfromLatin1(data + i, 1); } if ( !_process->isRunning() && !isFilteredLine(_stderr) ) addStderrLine(_stderr); emit stderrDataReceived(); diff --git a/src/common/global/purl.cpp b/src/common/global/purl.cpp index d0b5498..ab1f8da 100644 --- a/src/common/global/purl.cpp +++ b/src/common/global/purl.cpp @@ -69,7 +69,7 @@ TQString PURL::Private::getWindowsDrivePath(char drive) } return _winDrives[drive]; #else - return TQString("%1:\\").arg(drive); + return TQString("%1:\\").tqarg(drive); #endif } diff --git a/src/common/global/xml_data_file.cpp b/src/common/global/xml_data_file.cpp index bae7f17..528f8e7 100644 --- a/src/common/global/xml_data_file.cpp +++ b/src/common/global/xml_data_file.cpp @@ -26,7 +26,7 @@ bool XmlDataFile::load(TQString &error) Log::StringView sview; PURL::File file(_url, sview); if ( !file.openForRead() ) { - error = i18n("Error opening file: %1").arg(sview.string()); + error = i18n("Error opening file: %1").tqarg(sview.string()); return false; } if ( !_document.setContent(file.qfile(), false, &error) ) return false; @@ -48,7 +48,7 @@ bool XmlDataFile::save(TQString &error) const file.appendText(s); ok = file.close(); } - if ( !ok ) error = i18n("Error saving file: %1").arg(sview.string()); + if ( !ok ) error = i18n("Error saving file: %1").tqarg(sview.string()); return ok; } diff --git a/src/common/gui/container.cpp b/src/common/gui/container.cpp index b5917dc..8a747d3 100644 --- a/src/common/gui/container.cpp +++ b/src/common/gui/container.cpp @@ -55,19 +55,19 @@ void Container::initLayout() setFrame(_type); } -void Container::addWidget(TQWidget *w, uint startRow, uint endRow, uint startCol, uint endCol, int alignment) +void Container::addWidget(TQWidget *w, uint startRow, uint endRow, uint startCol, uint endCol, int tqalignment) { Q_ASSERT( startRow<=endRow ); Q_ASSERT( startCol<=endCol ); w->show(); - _gridLayout->addMultiCellWidget(w, startRow, endRow, startCol, endCol, alignment); + _gridLayout->addMultiCellWidget(w, startRow, endRow, startCol, endCol, tqalignment); } -void Container::addLayout(TQLayout *l, uint startRow, uint endRow, uint startCol, uint endCol, int alignment) +void Container::addLayout(TQLayout *l, uint startRow, uint endRow, uint startCol, uint endCol, int tqalignment) { Q_ASSERT( startRow<=endRow ); Q_ASSERT( startCol<=endCol ); - _gridLayout->addMultiCellLayout(l, startRow, endRow, startCol, endCol, alignment); + _gridLayout->addMultiCellLayout(l, startRow, endRow, startCol, endCol, tqalignment); } //---------------------------------------------------------------------------- diff --git a/src/common/gui/container.h b/src/common/gui/container.h index d377561..af3e5a6 100644 --- a/src/common/gui/container.h +++ b/src/common/gui/container.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include class PopupButton; @@ -26,8 +26,8 @@ public: Container(TQWidget *parent = 0, Type type = Flat); Container(TQWidgetStack *stack, uint index, Type type = Flat); Container(TQTabWidget *tabw, const TQString &title, Type type = Flat); - void addWidget(TQWidget *widget, uint startRow, uint endRow, uint startCol, uint endCol, int alignment = 0); - void addLayout(TQLayout *layout, uint startRow, uint endRow, uint startCol, uint endCol, int alignment = 0); + void addWidget(TQWidget *widget, uint startRow, uint endRow, uint startCol, uint endCol, int tqalignment = 0); + void addLayout(TQLayout *tqlayout, uint startRow, uint endRow, uint startCol, uint endCol, int tqalignment = 0); uint numRows() const { return _gridLayout->numRows(); } uint numCols() const { return _gridLayout->numCols(); } void setFrame(Type type); diff --git a/src/common/gui/dialog.h b/src/common/gui/dialog.h index a28c607..f506411 100644 --- a/src/common/gui/dialog.h +++ b/src/common/gui/dialog.h @@ -9,7 +9,7 @@ #ifndef DIALOG_H #define DIALOG_H -#include +#include #include #include diff --git a/src/common/gui/editlistbox.cpp b/src/common/gui/editlistbox.cpp index ca2c675..b881e0f 100644 --- a/src/common/gui/editlistbox.cpp +++ b/src/common/gui/editlistbox.cpp @@ -53,7 +53,7 @@ void EditListBox::init(uint nbColumns, TQWidget *view) _moveDownButton = 0; _removeAllButton = 0; _resetButton = 0; - setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding)); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding)); TQGridLayout *grid = new TQGridLayout(this, 1, 1, 0, KDialog::spacingHint()); uint row = 0; diff --git a/src/common/gui/editlistbox.h b/src/common/gui/editlistbox.h index 57b156f..53b4294 100644 --- a/src/common/gui/editlistbox.h +++ b/src/common/gui/editlistbox.h @@ -19,7 +19,7 @@ #ifndef EDITLISTBOX_H #define EDITLISTBOX_H -#include +#include #include #include #include diff --git a/src/common/gui/hexword_gui.cpp b/src/common/gui/hexword_gui.cpp index 3030d65..bf1430c 100644 --- a/src/common/gui/hexword_gui.cpp +++ b/src/common/gui/hexword_gui.cpp @@ -125,12 +125,12 @@ bool GenericHexWordEditor::event(TQEvent *e) return TQLineEdit::event(e); } -TQSize GenericHexWordEditor::sizeHint() const +TQSize GenericHexWordEditor::tqsizeHint() const { return TQSize(maxCharWidth(NumberBase::Hex, font()) * (_nbChars+1), fontMetrics().height()); } -TQSize GenericHexWordEditor::minimumSizeHint() const +TQSize GenericHexWordEditor::tqminimumSizeHint() const { return TQSize(maxCharWidth(NumberBase::Hex, font()) * (_nbChars+1), fontMetrics().height()); } diff --git a/src/common/gui/hexword_gui.h b/src/common/gui/hexword_gui.h index 2be2a75..a973291 100644 --- a/src/common/gui/hexword_gui.h +++ b/src/common/gui/hexword_gui.h @@ -35,8 +35,8 @@ Q_OBJECT TQ_OBJECT public: GenericHexWordEditor(uint nbChars, bool hasBlankValue, TQWidget *parent); - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; signals: void modified(); diff --git a/src/common/gui/key_gui.h b/src/common/gui/key_gui.h index f40c5d2..5afce35 100644 --- a/src/common/gui/key_gui.h +++ b/src/common/gui/key_gui.h @@ -77,7 +77,7 @@ public: ParentType::_widget->clear(); } void fixMinimumWidth() { - ParentType::_widget->setMinimumWidth(ParentType::_widget->sizeHint().width()); + ParentType::_widget->setMinimumWidth(ParentType::_widget->tqsizeHint().width()); } protected: diff --git a/src/common/gui/list_view.cpp b/src/common/gui/list_view.cpp index 1e0cb66..52bd32b 100644 --- a/src/common/gui/list_view.cpp +++ b/src/common/gui/list_view.cpp @@ -62,8 +62,8 @@ bool ListView::eventFilter(TQObject *o, TQEvent *e) break; } case TQEvent::FocusOut: { - //qDebug("focus out %i %i=%i", tqApp->focusWidget(), focusWidget(), (*it)->_editWidgets[i]); - if ( tqApp->focusWidget() && focusWidget()==(*it)->_editWidgets[i] ) break; + //qDebug("focus out %i %i=%i", tqApp->tqfocusWidget(), tqfocusWidget(), (*it)->_editWidgets[i]); + if ( tqApp->tqfocusWidget() && tqfocusWidget()==(*it)->_editWidgets[i] ) break; //qDebug("ext"); TQCustomEvent *e = new TQCustomEvent(9999); TQApplication::postEvent(o, e); @@ -95,7 +95,7 @@ void ListViewToolTip::maybeTip(const TQPoint &p) if ( _listView==0 ) return; const TQListViewItem* item = _listView->itemAt(p); if ( item==0 ) return; - TQRect rect = _listView->itemRect(item); + TQRect rect = _listView->tqitemRect(item); if ( !rect.isValid() ) return; int col = _listView->header()->sectionAt(p.x()); TQString text = _listView->tooltip(*item, col); @@ -149,7 +149,7 @@ void EditListViewItem::startRename() _renaming = true; _editWidgets.resize(lv->columns()); for (uint i=0; i<_editWidgets.count(); i++) { - TQRect r = lv->itemRect(this); + TQRect r = lv->tqitemRect(this); r = TQRect(lv->viewportToContents(r.topLeft()), r.size()); r.setLeft(lv->header()->sectionPos(i)); r.setWidth(lv->header()->sectionSize(i) - 1); @@ -162,7 +162,7 @@ void EditListViewItem::startRename() if ( _editWidgets[i]==0 ) continue; _editWidgets[i]->installEventFilter(lv); lv->addChild(_editWidgets[i], r.x(), r.y()); - uint w = TQMIN(r.width(), _editWidgets[i]->sizeHint().width()); + uint w = TQMIN(r.width(), _editWidgets[i]->tqsizeHint().width()); _editWidgets[i]->resize(w, r.height()); lv->viewport()->setFocusProxy(_editWidgets[i]); _editWidgets[i]->setFocus(); @@ -191,9 +191,9 @@ void EditListViewItem::removeEditBox() void EditListViewItem::editDone(int col, const TQWidget *edit) { - if ( edit->metaObject()->findProperty("text", true)!=-1 ) + if ( edit->tqmetaObject()->findProperty("text", true)!=-1 ) emit listView()->itemRenamed(this, col, edit->property("text").toString()); - else if ( edit->metaObject()->findProperty("currentText", true)!=-1 ) + else if ( edit->tqmetaObject()->findProperty("currentText", true)!=-1 ) emit listView()->itemRenamed(this, col, edit->property("currentText").toString()); } @@ -215,7 +215,7 @@ int EditListViewItem::width(const TQFontMetrics &fm, const TQListView *lv, int c int w = KListViewItem::width(fm, lv, col); TQWidget *edit = editWidgetFactory(col); if ( edit==0 ) return w; - w = TQMAX(w, edit->sizeHint().width()); + w = TQMAX(w, edit->tqsizeHint().width()); delete edit; return w; } diff --git a/src/common/gui/misc_gui.h b/src/common/gui/misc_gui.h index eea2e1f..8c6a2ee 100644 --- a/src/common/gui/misc_gui.h +++ b/src/common/gui/misc_gui.h @@ -9,7 +9,7 @@ #ifndef MISC_GUI_H #define MISC_GUI_H -#include +#include #include #include #include diff --git a/src/common/gui/pfile_ext.cpp b/src/common/gui/pfile_ext.cpp index 080421f..43f9e81 100644 --- a/src/common/gui/pfile_ext.cpp +++ b/src/common/gui/pfile_ext.cpp @@ -22,7 +22,7 @@ bool PURL::File::openForWrite() _tmp->setAutoDelete(true); if ( _tmp->status()!=0 ) { _error = i18n("Could not create temporary file."); - _log.sorry(_error, i18n("File: %1").arg(_tmp->name())); + _log.sorry(_error, i18n("File: %1").tqarg(_tmp->name())); return false; } return true; @@ -61,7 +61,7 @@ bool PURL::File::openForRead() _file->setName(tmp); if ( !_file->open(IO_ReadOnly) ) { _error = i18n("Could not open temporary file."); - _log.sorry(_error, i18n("File: %1").arg(_file->name())); + _log.sorry(_error, i18n("File: %1").tqarg(_file->name())); return false; } return true; @@ -92,7 +92,7 @@ bool PURL::TempFile::close() _tmp->close(); if ( _tmp->status()!=IO_Ok ) { _error = i18n("Could not write to temporary file."); - _log.sorry(_error, i18n("File: %1").arg(_tmp->name())); + _log.sorry(_error, i18n("File: %1").tqarg(_tmp->name())); return false; } } @@ -107,7 +107,7 @@ bool PURL::TempFile::openForWrite() _tmp->setAutoDelete(true); if ( _tmp->status()!=0 ) { _error = i18n("Could not create temporary file."); - _log.sorry(_error, i18n("File: %1").arg(_tmp->name())); + _log.sorry(_error, i18n("File: %1").tqarg(_tmp->name())); return false; } return true; diff --git a/src/common/gui/purl_gui.cpp b/src/common/gui/purl_gui.cpp index 0299bcb..0284682 100644 --- a/src/common/gui/purl_gui.cpp +++ b/src/common/gui/purl_gui.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "purl_gui.h" -#include +#include #include #include #include @@ -40,7 +40,7 @@ PURL::Url PURL::getSaveUrl(const TQString &startDir, const TQString &filter, case NoSaveAction: break; case AskOverwrite: if ( url.exists() ) { - if ( !MessageBox::askContinue(i18n("File \"%1\" already exists. Overwrite ?").arg(url.pretty())) ) return Url(); + if ( !MessageBox::askContinue(i18n("File \"%1\" already exists. Overwrite ?").tqarg(url.pretty())) ) return Url(); } break; case CancelIfExists: diff --git a/src/common/nokde/nokde_kaboutdata.cpp b/src/common/nokde/nokde_kaboutdata.cpp index baa986c..6dd8f33 100644 --- a/src/common/nokde/nokde_kaboutdata.cpp +++ b/src/common/nokde/nokde_kaboutdata.cpp @@ -25,7 +25,7 @@ #include "nokde_kaboutdata.h" //#include #include -#include +#include #include TQString @@ -271,7 +271,7 @@ KAboutData::setProgramLogo(const TQImage& image) TQString KAboutData::version() const { - return TQString::fromLatin1(mVersion); + return TQString::tqfromLatin1(mVersion); } TQString @@ -286,13 +286,13 @@ KAboutData::shortDescription() const TQString KAboutData::homepage() const { - return TQString::fromLatin1(mHomepageAddress); + return TQString::tqfromLatin1(mHomepageAddress); } TQString KAboutData::bugAddress() const { - return TQString::fromLatin1(mBugEmailAddress); + return TQString::tqfromLatin1(mBugEmailAddress); } const TQValueList @@ -434,7 +434,7 @@ KAboutData::license() const } if (!l.isEmpty()) - result += i18n("This program is distributed under the terms of the %1.").arg( l ); + result += i18n("This program is distributed under the terms of the %1.").tqarg( l ); if (!f.isEmpty()) { diff --git a/src/common/nokde/nokde_kcmdlineargs.cpp b/src/common/nokde/nokde_kcmdlineargs.cpp index 42dc5c1..2191049 100644 --- a/src/common/nokde/nokde_kcmdlineargs.cpp +++ b/src/common/nokde/nokde_kcmdlineargs.cpp @@ -518,7 +518,7 @@ KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled, if (ignoreUnknown) return; enable_i18n(); - usage( i18n("Unknown option '%1'.").arg(TQString::fromLocal8Bit(_opt))); + usage( i18n("Unknown option '%1'.").tqarg(TQString::fromLocal8Bit(_opt))); } if ((result & 4) != 0) @@ -534,7 +534,7 @@ KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled, if (ignoreUnknown) return; enable_i18n(); - usage( i18n("Unknown option '%1'.").arg(TQString::fromLocal8Bit(_opt))); + usage( i18n("Unknown option '%1'.").tqarg(TQString::fromLocal8Bit(_opt))); } if (argument.isEmpty()) { @@ -542,7 +542,7 @@ KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled, if (i >= argc) { enable_i18n(); - usage( i18n("'%1' missing.").arg( opt_name)); + usage( i18n("'%1' missing.").tqarg( opt_name)); } argument = argv[i]; } @@ -618,10 +618,10 @@ KCmdLineArgs::parseAllArgs() else if ( (::qstrcmp(option, "version") == 0) || (::qstrcmp(option, "v") == 0)) { - printQ( TQString("TQt: %1\n").arg(qVersion())); -// printQ( TQString("KDE: %1\n").arg(TDE_VERSION_STRING)); + printQ( TQString("TQt: %1\n").tqarg(qVersion())); +// printQ( TQString("KDE: %1\n").tqarg(TDE_VERSION_STRING)); printQ( TQString("%1: %2\n"). - arg(about->programName()).arg(about->version())); + arg(about->programName()).tqarg(about->version())); exit(0); } else if ( (::qstrcmp(option, "license") == 0) ) { @@ -641,17 +641,17 @@ KCmdLineArgs::parseAllArgs() email = " <" + (*it).emailAddress() + ">"; authorlist += TQString(" ") + (*it).name() + email + "\n"; } - printQ( i18n("the 2nd argument is a list of name+address, one on each line","%1 was written by\n%2").arg ( TQString(about->programName()) ).arg( authorlist ) ); + printQ( i18n("the 2nd argument is a list of name+address, one on each line","%1 was written by\n%2").arg ( TQString(about->programName()) ).tqarg( authorlist ) ); } } else { - printQ( i18n("%1 was written by somebody who wants to remain anonymous.").arg(about->programName()) ); + printQ( i18n("%1 was written by somebody who wants to remain anonymous.").tqarg(about->programName()) ); } if (!about->bugAddress().isEmpty()) { if (about->bugAddress() == "submit@bugs.kde.org") printQ( i18n( "Please use http://bugs.kde.org to report bugs, do not mail the authors directly.\n" ) ); else - printQ( i18n( "Please use %1 to report bugs, do not mail the authors directly.\n" ).arg(about->bugAddress()) ); + printQ( i18n( "Please use %1 to report bugs, do not mail the authors directly.\n" ).tqarg(about->bugAddress()) ); } exit(0); } else { @@ -671,7 +671,7 @@ KCmdLineArgs::parseAllArgs() if (ignoreUnknown) continue; enable_i18n(); - usage( i18n("Unexpected argument '%1'.").arg(TQString::fromLocal8Bit(argv[i]))); + usage( i18n("Unexpected argument '%1'.").tqarg(TQString::fromLocal8Bit(argv[i]))); } else { @@ -815,7 +815,7 @@ KCmdLineArgs::usage(const char *id) { if (args->name) { - usage = i18n("[%1-options]").arg(args->name)+" "+usage; + usage = i18n("[%1-options]").tqarg(args->name)+" "+usage; } args = argsList->prev(); } @@ -835,30 +835,30 @@ KCmdLineArgs::usage(const char *id) } } - printQ(i18n("Usage: %1 %2\n").arg(argv[0]).arg(usage)); + printQ(i18n("Usage: %1 %2\n").tqarg(argv[0]).tqarg(usage)); printQ("\n"+about->shortDescription()+"\n"); - printQ(optionHeaderString.arg(i18n("Generic options"))); - printQ(optionFormatString.arg("--help", -25).arg(i18n("Show help about options"))); + printQ(optionHeaderString.tqarg(i18n("Generic options"))); + printQ(optionFormatString.tqarg("--help", -25).tqarg(i18n("Show help about options"))); args = argsList->first(); while(args) { if (args->name && args->id) { - TQString option = TQString("--help-%1").arg(args->id); - TQString desc = i18n("Show %1 specific options").arg(args->name); + TQString option = TQString("--help-%1").tqarg(args->id); + TQString desc = i18n("Show %1 specific options").tqarg(args->name); - printQ(optionFormatString.arg(option, -25).arg(desc)); + printQ(optionFormatString.tqarg(option, -25).tqarg(desc)); } args = argsList->next(); } - printQ(optionFormatString.arg("--help-all",-25).arg(i18n("Show all options"))); - printQ(optionFormatString.arg("--author",-25).arg(i18n("Show author information"))); - printQ(optionFormatString.arg("-v, --version",-25).arg(i18n("Show version information"))); - printQ(optionFormatString.arg("--license",-25).arg(i18n("Show license information"))); - printQ(optionFormatString.arg("--", -25).arg(i18n("End of options"))); + printQ(optionFormatString.tqarg("--help-all",-25).tqarg(i18n("Show all options"))); + printQ(optionFormatString.tqarg("--author",-25).tqarg(i18n("Show author information"))); + printQ(optionFormatString.tqarg("-v, --version",-25).tqarg(i18n("Show version information"))); + printQ(optionFormatString.tqarg("--license",-25).tqarg(i18n("Show license information"))); + printQ(optionFormatString.tqarg("--", -25).tqarg(i18n("End of options"))); args = argsList->first(); // Sets current to 1st. @@ -880,7 +880,7 @@ KCmdLineArgs::usage(const char *id) bool hasOptions = false; TQString optionsHeader; if (args->name) - optionsHeader = optionHeaderString.arg(i18n("%1 options").arg(TQString::fromLatin1(args->name))); + optionsHeader = optionHeaderString.tqarg(i18n("%1 options").tqarg(TQString::tqfromLatin1(args->name))); else optionsHeader = i18n("\nOptions:\n"); @@ -950,8 +950,8 @@ KCmdLineArgs::usage(const char *id) name = name.mid(1); if ((name[0] == '[') && (name[name.length()-1] == ']')) name = name.mid(1, name.length()-2); - printQ(optionFormatString.arg(TQString(name), -25) - .arg(description)); + printQ(optionFormatString.tqarg(TQString(name), -25) + .tqarg(description)); } else { @@ -974,13 +974,13 @@ KCmdLineArgs::usage(const char *id) opt = opt + name; if (!option->def) { - printQ(optionFormatString.arg(TQString(opt), -25) - .arg(description)); + printQ(optionFormatString.tqarg(TQString(opt), -25) + .tqarg(description)); } else { - printQ(optionFormatStringDef.arg(TQString(opt), -25) - .arg(description).arg(option->def)); + printQ(optionFormatStringDef.tqarg(TQString(opt), -25) + .tqarg(description).tqarg(option->def)); } opt = ""; } @@ -989,7 +989,7 @@ KCmdLineArgs::usage(const char *id) it != dl.end(); ++it) { - printQ(optionFormatString.arg("", -25).arg(*it)); + printQ(optionFormatString.tqarg("", -25).tqarg(*it)); } option++; diff --git a/src/common/port/parallel.cpp b/src/common/port/parallel.cpp index 3d92ae0..daa0c6a 100644 --- a/src/common/port/parallel.cpp +++ b/src/common/port/parallel.cpp @@ -59,12 +59,12 @@ TQStringList Port::Parallel::deviceList() TQStringList list; #if defined(HAVE_PPDEV) // standard parport in user space - for(int i = 0; i<8; ++i) list.append(TQString("/dev/parport%1").arg(i)); + for(int i = 0; i<8; ++i) list.append(TQString("/dev/parport%1").tqarg(i)); // new devfs parport flavour - for(int i = 0; i<8; ++i) list.append(TQString("/dev/parports/%1").arg(i)); + for(int i = 0; i<8; ++i) list.append(TQString("/dev/parports/%1").tqarg(i)); #elif defined(HAVE_PPBUS) // FreeBSD - for(int i = 0; i<8; ++i) list.append(TQString("/dev/ppi%1").arg(i)); + for(int i = 0; i<8; ++i) list.append(TQString("/dev/ppi%1").tqarg(i)); #endif return list; } @@ -100,12 +100,12 @@ const Port::Parallel::PPinData Port::Parallel::PIN_DATA[Nb_Pins] = { { Data, 0x20, Out, "D5" }, // data 5 { Data, 0x40, Out, "D6" }, // data 6 { Data, 0x80, Out, "D7" }, // data 7 - { Status, 0x40, In, "/ACK" }, // !ack - { Status, 0x80, In, "BUSY" }, // busy - { Status, 0x20, In, "PAPER" }, // pout - { Status, 0x10, In, "SELin" }, // select + { tqStatus, 0x40, In, "/ACK" }, // !ack + { tqStatus, 0x80, In, "BUSY" }, // busy + { tqStatus, 0x20, In, "PAPER" }, // pout + { tqStatus, 0x10, In, "SELin" }, // select { Control, 0x02, Out, "LF" }, // !feed - { Status, 0x08, In, "/ERROR" }, // !error + { tqStatus, 0x08, In, "/ERROR" }, // !error { Control, 0x04, Out, "PRIME" }, // !init { Control, 0x08, Out, "SELout" }, // !si { Nb_RequestTypes, 0x00, NoIO, "GND" }, // GND @@ -166,17 +166,17 @@ bool Port::Parallel::internalOpen() #if defined(HAVE_PPDEV) _fd = ::open(_device.latin1(), O_RDWR); if ( _fd<0 ) { - setSystemError(i18n("Could not open device \"%1\"").arg(_device)); + setSystemError(i18n("Could not open device \"%1\"").tqarg(_device)); return false; } if ( ioctl(_fd, PPCLAIM)<0 ) { - setSystemError(i18n("Could not claim device \"%1\": check it is read/write enabled").arg(_device)); + setSystemError(i18n("Could not claim device \"%1\": check it is read/write enabled").tqarg(_device)); return false; } #elif defined(HAVE_PPBUS) _fd = ::open(_device.latin1(), O_RDWR); if ( _fd<0 ) { - setSystemError(i18n("Could not open device \"%1\"").arg(_device)); + setSystemError(i18n("Could not open device \"%1\"").tqarg(_device)); return false; } #endif @@ -208,7 +208,7 @@ bool Port::Parallel::setPinOn(uint pin, bool on, LogicType type) int request = REQUEST_DATA[rtype].write; Q_ASSERT( request!=0 ); if ( ioctl(_fd, request, &c)<0 ) { - setSystemError(i18n("Error setting pin %1 to %2").arg(PIN_DATA[pin].label).arg(on)); + setSystemError(i18n("Error setting pin %1 to %2").tqarg(PIN_DATA[pin].label).tqarg(on)); return false; } _images[rtype] = c; @@ -228,7 +228,7 @@ bool Port::Parallel::readPin(uint pin, LogicType type, bool &value) Q_ASSERT( request!=0 ); uchar c = 0; if ( ioctl(_fd, request, &c)<0 ) { - setSystemError(i18n("Error reading bit on pin %1").arg(PIN_DATA[pin].label)); + setSystemError(i18n("Error reading bit on pin %1").tqarg(PIN_DATA[pin].label)); return false; } _images[rtype] = c; @@ -240,7 +240,7 @@ bool Port::Parallel::readPin(uint pin, LogicType type, bool &value) void Port::Parallel::setSystemError(const TQString &message) { #if defined(HAVE_PPDEV) || defined(HAVE_PPBUS) - log(Log::LineType::Error, message + TQString(" (errno=%1).").arg(strerror(errno))); + log(Log::LineType::Error, message + TQString(" (errno=%1).").tqarg(strerror(errno))); #else Q_UNUSED(message); #endif diff --git a/src/common/port/parallel.h b/src/common/port/parallel.h index d25529d..08741e1 100644 --- a/src/common/port/parallel.h +++ b/src/common/port/parallel.h @@ -33,7 +33,7 @@ public: enum Pin { DS = 0, D0, D1, D2, D3, D4, D5, D6, D7, ACK, BUSY, PAPER, SELin, LF, ERROR, PRIME, SELout, P18, P19, P20, P21, P22, P23, P24, P25, Nb_Pins }; - enum RequestType { Control = 0, Status, Data, Nb_RequestTypes }; + enum RequestType { Control = 0, tqStatus, Data, Nb_RequestTypes }; struct PPinData { RequestType rType; uchar mask; diff --git a/src/common/port/port_base.cpp b/src/common/port/port_base.cpp index 63e820e..0112a1b 100644 --- a/src/common/port/port_base.cpp +++ b/src/common/port/port_base.cpp @@ -28,7 +28,7 @@ void Port::Base::close() bool Port::Base::send(const char *data, uint size, uint timeout) { - log(Log::DebugLevel::LowLevel, TQString("Sending: \"%1\"").arg(toPrintable(data, size, PrintAlphaNum))); + log(Log::DebugLevel::LowLevel, TQString("Sending: \"%1\"").tqarg(toPrintable(data, size, PrintAlphaNum))); return internalSend(data, size, timeout); } @@ -45,14 +45,14 @@ bool Port::Base::receive(uint size, TQMemArray &a, uint timeout) { a.resize(size); bool ok = internalReceive(size, (char *)a.data(), timeout); - if (ok) log(Log::DebugLevel::LowLevel, TQString("Received: \"%1\"").arg(toPrintable(a, PrintAlphaNum))); + if (ok) log(Log::DebugLevel::LowLevel, TQString("Received: \"%1\"").tqarg(toPrintable(a, PrintAlphaNum))); return ok; } bool Port::Base::receiveChar(char &c, uint timeout) { if ( !internalReceive(1, &c, timeout) ) return false; - log(Log::DebugLevel::LowLevel, TQString("Received: \"%1\"").arg(toPrintable(c, PrintAlphaNum))); + log(Log::DebugLevel::LowLevel, TQString("Received: \"%1\"").tqarg(toPrintable(c, PrintAlphaNum))); return true; } diff --git a/src/common/port/serial.cpp b/src/common/port/serial.cpp index 977f31c..2db84b9 100644 --- a/src/common/port/serial.cpp +++ b/src/common/port/serial.cpp @@ -73,21 +73,21 @@ TQStringList Port::Serial::deviceList() TQStringList list; #if defined(Q_OS_UNIX) // standard serport in user space - for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyS%1").arg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyS%1").tqarg(i)); // new devfs serport flavour - for (uint i=0; i<8; i++) list.append(TQString("/dev/tts/%1").arg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/tts/%1").tqarg(i)); // standard USB serport in user space - for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyUSB%1").arg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyUSB%1").tqarg(i)); // new devfs USB serport flavour - for (uint i=0; i<8; i++) list.append(TQString("/dev/usb/tts/%1").arg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/usb/tts/%1").tqarg(i)); // FreeBSD - for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyd%1").arg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyd%1").tqarg(i)); // Slackware 11 devfs USB Serial port support. - for (uint i=0; i<8; i++) list.append(TQString("/dev/tts/USB%1").arg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/tts/USB%1").tqarg(i)); // MacOSX devfs USB Serial port support. list.append("/dev/tty.usbserial"); #elif defined(Q_OS_WIN) - for (uint i=1; i<10; i++) list.append(TQString("COM%1").arg(i)); + for (uint i=1; i<10; i++) list.append(TQString("COM%1").tqarg(i)); #endif return list; } @@ -187,7 +187,7 @@ bool Port::Serial::internalOpen() { _fd = openHandle(_device, In | Out); if ( _fd==INVALID_HANDLE ) { - setSystemError(i18n("Could not open device \"%1\" read-write").arg(_device)); + setSystemError(i18n("Could not open device \"%1\" read-write").tqarg(_device)); return false; } if ( !getParameters(_oldParameters) ) return false; // save configuration @@ -232,7 +232,7 @@ bool Port::Serial::internalSend(const char *data, uint size, uint timeout) if ( res>0 ) todo -= res; else { if ( uint(time.elapsed())>timeout ) { - log(Log::LineType::Error, i18n("Timeout sending data (%1/%2 bytes sent).").arg(size-todo).arg(size)); + log(Log::LineType::Error, i18n("Timeout sending data (%1/%2 bytes sent).").tqarg(size-todo).tqarg(size)); return false; } msleep(1); @@ -277,7 +277,7 @@ bool Port::Serial::internalReceive(uint size, char *data, uint timeout) if ( res>0 ) todo -= res; else { if ( uint(time.elapsed())>timeout ) { - log(Log::LineType::Error, i18n("Timeout receiving data (%1/%2 bytes received).").arg(size-todo).arg(size)); + log(Log::LineType::Error, i18n("Timeout receiving data (%1/%2 bytes received).").tqarg(size-todo).tqarg(size)); return false; } msleep(1); @@ -303,7 +303,7 @@ bool Port::Serial::drain(uint timeout) if ( nb==0 ) break; if ( uint(time.elapsed())>timeout ) { _fd = INVALID_HANDLE; // otherwise close blocks... - log(Log::LineType::Error, i18n("Timeout sending data (%1 bytes left).").arg(nb)); + log(Log::LineType::Error, i18n("Timeout sending data (%1 bytes left).").tqarg(nb)); return false; } } @@ -364,7 +364,7 @@ bool Port::Serial::setPinOn(uint pin, bool on, LogicType type) Q_ASSERT( pindevices; dev; dev=dev->next) { if ( dev->descriptor.idVendor==0 ) continue; // controller list.append(TQString("Vendor Id: %1 - Product Id: %2") - .arg(toLabel(NumberBase::Hex, dev->descriptor.idVendor, 4)).arg(toLabel(NumberBase::Hex, dev->descriptor.idProduct, 4))); + .tqarg(toLabel(NumberBase::Hex, dev->descriptor.idVendor, 4)).tqarg(toLabel(NumberBase::Hex, dev->descriptor.idProduct, 4))); } } #endif @@ -179,7 +179,7 @@ Port::USB::~USB() void Port::USB::setSystemError(const TQString &message) { #ifdef HAVE_USB - log(Log::LineType::Error, message + TQString(" (err=%1).").arg(usb_strerror())); + log(Log::LineType::Error, message + TQString(" (err=%1).").tqarg(usb_strerror())); #else log(Log::LineType::Error, message); #endif @@ -192,7 +192,7 @@ void Port::USB::tryToDetachDriver() log(Log::DebugLevel::Extra, "find if there is already an installed driver"); char dname[256] = ""; if ( usb_get_driver_np(_handle, _interface, dname, 255)<0 ) return; - log(Log::DebugLevel::Normal, TQString(" a driver \"%1\" is already installed...").arg(dname)); + log(Log::DebugLevel::Normal, TQString(" a driver \"%1\" is already installed...").tqarg(dname)); # if defined(LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP) && LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP usb_detach_kernel_driver_np(_handle, _interface); log(Log::DebugLevel::Normal, " try to detach it..."); @@ -208,10 +208,10 @@ bool Port::USB::internalOpen() _device = findDevice(_vendorId, _productId); if ( _device==0 ) { log(Log::LineType::Error, i18n("Could not find USB device (vendor=%1 product=%2).") - .arg(toLabel(NumberBase::Hex, _vendorId, 4)).arg(toLabel(NumberBase::Hex, _productId, 4))); + .tqarg(toLabel(NumberBase::Hex, _vendorId, 4)).tqarg(toLabel(NumberBase::Hex, _productId, 4))); return false; } - log(Log::DebugLevel::Extra, TQString("found USB device as \"%1\" on bus \"%2\"").arg(_device->filename).arg(_device->bus->dirname)); + log(Log::DebugLevel::Extra, TQString("found USB device as \"%1\" on bus \"%2\"").tqarg(_device->filename).tqarg(_device->bus->dirname)); _handle = usb_open(_device); if ( _handle==0 ) { setSystemError(i18n("Error opening USB device.")); @@ -239,11 +239,11 @@ bool Port::USB::internalOpen() uint old = _config; i = 0; _config = _device->config[i].bConfigurationValue; - log(Log::LineType::Warning, i18n("Configuration %1 not present: using %2").arg(old).arg(_config)); + log(Log::LineType::Warning, i18n("Configuration %1 not present: using %2").tqarg(old).tqarg(_config)); } const usb_config_descriptor &configd = _device->config[i]; if ( usb_set_configuration(_handle, _config)<0 ) { - setSystemError(i18n("Error setting USB configuration %1.").arg(_config)); + setSystemError(i18n("Error setting USB configuration %1.").tqarg(_config)); return false; } for (i=0; i_interface = &(configd.interface[i].altsetting[0]); if ( usb_claim_interface(_handle, _interface)<0 ) { - setSystemError(i18n("Could not claim USB interface %1").arg(_interface)); + setSystemError(i18n("Could not claim USB interface %1").tqarg(_interface)); return false; } - log(Log::DebugLevel::Max, TQString("alternate setting is %1").arg(_private->_interface->bAlternateSetting)); - log(Log::DebugLevel::Max, TQString("USB bcdDevice: %1").arg(toHexLabel(_device->descriptor.bcdDevice, 4))); + log(Log::DebugLevel::Max, TQString("alternate setting is %1").tqarg(_private->_interface->bAlternateSetting)); + log(Log::DebugLevel::Max, TQString("USB bcdDevice: %1").tqarg(toHexLabel(_device->descriptor.bcdDevice, 4))); return true; #else log(Log::LineType::Error, i18n("USB support disabled")); @@ -343,7 +343,7 @@ bool Port::USB::write(uint ep, const char *data, uint size) IODir dir = endpointDir(ep); EndpointMode mode = endpointMode(ep); log(Log::DebugLevel::LowLevel, TQString("write to endpoint %1 (%2 - %3) %4 chars: \"%5\"") - .arg(toHexLabel(ep, 2)).arg(ENDPOINT_MODE_NAMES[mode]).arg(IO_DIR_NAMES[dir]).arg(size).arg(toPrintable(data, size, PrintEscapeAll))); + .tqarg(toHexLabel(ep, 2)).tqarg(ENDPOINT_MODE_NAMES[mode]).tqarg(IO_DIR_NAMES[dir]).tqarg(size).tqarg(toPrintable(data, size, PrintEscapeAll))); Q_ASSERT( dir==Out ); TQTime time; time.start(); @@ -356,8 +356,8 @@ bool Port::USB::write(uint ep, const char *data, uint size) //qDebug("res: %i", res); if ( res==todo ) break; if ( uint(time.elapsed())>3000 ) { // 3 s - if ( res<0 ) setSystemError(i18n("Error sending data (ep=%1 res=%2)").arg(toHexLabel(ep, 2)).arg(res)); - else log(Log::LineType::Error, i18n("Timeout: only some data sent (%1/%2 bytes).").arg(size-todo).arg(size)); + if ( res<0 ) setSystemError(i18n("Error sending data (ep=%1 res=%2)").tqarg(toHexLabel(ep, 2)).tqarg(res)); + else log(Log::LineType::Error, i18n("Timeout: only some data sent (%1/%2 bytes).").tqarg(size-todo).tqarg(size)); return false; } if ( res==0 ) log(Log::DebugLevel::Normal, i18n("Nothing sent: retrying...")); @@ -377,7 +377,7 @@ bool Port::USB::read(uint ep, char *data, uint size, bool *poll) IODir dir = endpointDir(ep); EndpointMode mode = endpointMode(ep); log(Log::DebugLevel::LowLevel, TQString("read from endpoint %1 (%2 - %3) %4 chars") - .arg(toHexLabel(ep, 2)).arg(ENDPOINT_MODE_NAMES[mode]).arg(IO_DIR_NAMES[dir]).arg(size)); + .tqarg(toHexLabel(ep, 2)).tqarg(ENDPOINT_MODE_NAMES[mode]).tqarg(IO_DIR_NAMES[dir]).tqarg(size)); Q_ASSERT( dir==In ); TQTime time; time.start(); @@ -390,8 +390,8 @@ bool Port::USB::read(uint ep, char *data, uint size, bool *poll) //qDebug("res: %i", res); if ( res==todo ) break; if ( uint(time.elapsed())>3000 ) { // 3 s: seems to help icd2 in some case (?) - if ( res<0 ) setSystemError(i18n("Error receiving data (ep=%1 res=%2)").arg(toHexLabel(ep, 2)).arg(res)); - else log(Log::LineType::Error, i18n("Timeout: only some data received (%1/%2 bytes).").arg(size-todo).arg(size)); + if ( res<0 ) setSystemError(i18n("Error receiving data (ep=%1 res=%2)").tqarg(toHexLabel(ep, 2)).tqarg(res)); + else log(Log::LineType::Error, i18n("Timeout: only some data received (%1/%2 bytes).").tqarg(size-todo).tqarg(size)); return false; } if ( res==0 ) { diff --git a/src/data/syntax_xml_generator.cpp b/src/data/syntax_xml_generator.cpp index e424801..d1d44b5 100644 --- a/src/data/syntax_xml_generator.cpp +++ b/src/data/syntax_xml_generator.cpp @@ -11,7 +11,7 @@ // the original syntax file was created by Alain Gibaud #include -#include +#include const char * const DIRECTIVES[] = { "__badram", "__config", "__idlocs", "__maxram", diff --git a/src/devices/base/device_group.cpp b/src/devices/base/device_group.cpp index db70264..94586bd 100644 --- a/src/devices/base/device_group.cpp +++ b/src/devices/base/device_group.cpp @@ -12,16 +12,16 @@ # include # include -TQColor Device::statusColor(Status status) +TQColor Device::statusColor(tqStatus status) { switch (status.type()) { - case Status::Future: return TQt::blue; - case Status::InProduction: return TQt::green; - case Status::Mature: - case Status::NotRecommended: return TQColor("orange"); - case Status::EOL: return TQt::red; - case Status::Unknown: - case Status::Nb_Types: break; + case tqStatus::Future: return TQt::blue; + case tqStatus::InProduction: return TQt::green; + case tqStatus::Mature: + case tqStatus::NotRecommended: return TQColor("orange"); + case tqStatus::EOL: return TQt::red; + case tqStatus::Unknown: + case tqStatus::Nb_Types: break; } return TQt::black; } @@ -232,8 +232,8 @@ TQString Device::htmlInfo(const Device::Data &data, const TQString &deviceHref, if ( i!=0 ) s += ", "; if ( deviceHref.isEmpty() ) s += data.alternatives()[i].upper(); else { - TQString href = deviceHref.arg(data.alternatives()[i].upper()); - s += TQString("%2").arg(href).arg(data.alternatives()[i].upper()); + TQString href = deviceHref.tqarg(data.alternatives()[i].upper()); + s += TQString("%2").tqarg(href).tqarg(data.alternatives()[i].upper()); } } doc += htmlTableRow(i18n("Alternatives"), s); @@ -247,7 +247,7 @@ TQString Device::htmlInfo(const Device::Data &data, const TQString &deviceHref, TQString s; for (uint i=0; i &boxes); extern const Package *barPackage(const char *name, const Data &data); extern TQPixmap pinsGraph(const Package &package); diff --git a/src/devices/base/generic_device.cpp b/src/devices/base/generic_device.cpp index d147e4b..c0109de 100644 --- a/src/devices/base/generic_device.cpp +++ b/src/devices/base/generic_device.cpp @@ -13,7 +13,7 @@ #include "register.h" //----------------------------------------------------------------------------- -const Device::Status::Data Device::Status::DATA[Nb_Types] = { +const Device::tqStatus::Data Device::tqStatus::DATA[Nb_Types] = { { "IP", I18N_NOOP("In Production") }, { "Future", I18N_NOOP("Future Product") }, { "NR", I18N_NOOP("Not Recommended for New Design") }, diff --git a/src/devices/base/generic_device.h b/src/devices/base/generic_device.h index 373601c..73f9b15 100644 --- a/src/devices/base/generic_device.h +++ b/src/devices/base/generic_device.h @@ -19,9 +19,9 @@ namespace Device { //---------------------------------------------------------------------------- -BEGIN_DECLARE_ENUM(Status) +BEGIN_DECLARE_ENUM(tqStatus) InProduction = 0, Future, NotRecommended, EOL, Unknown, Mature -END_DECLARE_ENUM_STD(Status) +END_DECLARE_ENUM_STD(tqStatus) BEGIN_DECLARE_ENUM(MemoryTechnology) Flash = 0, Eprom, Rom, Romless @@ -70,7 +70,7 @@ public: enum { MAX_NB = 9 }; struct TypeData { const char *name, *label; - Shape shape; + Shape tqshape; uint nbPins[MAX_NB]; }; static const TypeData TYPE_DATA[]; @@ -121,7 +121,7 @@ public: virtual TQString name() const { return _name; } virtual TQString fname(Special) const { return _name; } virtual TQString listViewGroup() const = 0; - Status status() const { return _status; } + tqStatus status() const { return _status; } const Documents &documents() const { return _documents; } const TQStringList &alternatives() const { return _alternatives; } MemoryTechnology memoryTechnology() const { return _memoryTechnology; } @@ -141,7 +141,7 @@ protected: TQString _name; Documents _documents; TQStringList _alternatives; - Status _status; + tqStatus _status; TQValueVector _frequencyRanges; MemoryTechnology _memoryTechnology; RegistersData *_registersData; diff --git a/src/devices/base/generic_memory.cpp b/src/devices/base/generic_memory.cpp index 6430497..54190f5 100644 --- a/src/devices/base/generic_memory.cpp +++ b/src/devices/base/generic_memory.cpp @@ -31,7 +31,7 @@ Device::Memory::WarningTypes Device::Memory::fromHexBuffer(const HexBuffer &hb, if ( !it.data().isInitialized() || inRange[it.key()] ) continue; if ( !(result & ValueOutsideRange) ) { result |= ValueOutsideRange; - warnings += i18n("At least one value (at address %1) is defined outside memory ranges.").arg(toHexLabel(it.key(), 8)); + warnings += i18n("At least one value (at address %1) is defined outside memory ranges.").tqarg(toHexLabel(it.key(), 8)); } break; } diff --git a/src/devices/base/hex_buffer.cpp b/src/devices/base/hex_buffer.cpp index a0a4704..f389c92 100644 --- a/src/devices/base/hex_buffer.cpp +++ b/src/devices/base/hex_buffer.cpp @@ -9,7 +9,7 @@ ***************************************************************************/ #include "hex_buffer.h" -#include +#include #include "devices/base/generic_device.h" @@ -136,10 +136,10 @@ bool HexBuffer::fetchNextBlock(const_iterator& it, const const_iterator &end, in TQString HexBuffer::ErrorData::message() const { switch (type) { - case UnrecognizedFormat: return i18n("Unrecognized format (line %1).").arg(line); + case UnrecognizedFormat: return i18n("Unrecognized format (line %1).").tqarg(line); case UnexpectedEOF: return i18n("Unexpected end-of-file."); - case UnexpectedEOL: return i18n("Unexpected end-of-line (line %1).").arg(line); - case WrongCRC: return i18n("CRC mismatch (line %1).").arg(line); + case UnexpectedEOL: return i18n("Unexpected end-of-line (line %1).").tqarg(line); + case WrongCRC: return i18n("CRC mismatch (line %1).").tqarg(line); } Q_ASSERT(false); return TQString(); diff --git a/src/devices/base/register.cpp b/src/devices/base/register.cpp index d6ff59c..946f668 100644 --- a/src/devices/base/register.cpp +++ b/src/devices/base/register.cpp @@ -48,7 +48,7 @@ Register::Type Register::TypeData::type() const TQString Register::TypeData::toString() const { - return TQString("%1 %2 %3").arg(toLabel(_address)).arg(_nbChars).arg(_name); + return TQString("%1 %2 %3").tqarg(toLabel(_address)).tqarg(_nbChars).tqarg(_name); } Register::TypeData Register::TypeData::fromString(const TQString &s) diff --git a/src/devices/gui/memory_editor.cpp b/src/devices/gui/memory_editor.cpp index d46b6c4..bee291e 100644 --- a/src/devices/gui/memory_editor.cpp +++ b/src/devices/gui/memory_editor.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/devices/gui/register_view.cpp b/src/devices/gui/register_view.cpp index bd444c9..264a04b 100644 --- a/src/devices/gui/register_view.cpp +++ b/src/devices/gui/register_view.cpp @@ -43,7 +43,7 @@ void Register::PortBitListViewItem::updateView() else text += (pdata[_bit].drivenState==Device::IoHigh ? "1" : "0"); } setText(2, text); - repaint(); + tqrepaint(); } void Register::PortBitListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align) @@ -114,7 +114,7 @@ void Register::ListViewItem::updateView() if ( _data.type()!=Special ) setText(0, toHexLabel(_data.address(), nbCharsAddress()) + ":"); setText(1, label()); setText(2, text()); - repaint(); + tqrepaint(); for (uint i=0; i<_items.count(); i++) _items[i]->updateView(); } @@ -145,8 +145,8 @@ TQString Register::ListViewItem::tooltip(int col) const if ( isprint(c) ) s = c + s; else s = "." + s; } - return TQString("%1 - %2 - \"%3\"").arg(toHexLabel(value, _data.nbChars())) - .arg(toLabel(NumberBase::Bin, value, 4*_data.nbChars())).arg(s); + return TQString("%1 - %2 - \"%3\"").tqarg(toHexLabel(value, _data.nbChars())) + .tqarg(toLabel(NumberBase::Bin, value, 4*_data.nbChars())).tqarg(s); } TQWidget *Register::ListViewItem::editWidgetFactory(int col) const @@ -176,7 +176,7 @@ void Register::LineEdit::updateText() setText(_value.isInitialized() ? toLabel(_base, _value, _nbChars) : "--"); uint w = 2*frameWidth() + maxLabelWidth(_base, _nbChars, font()); setFixedWidth(w+5); - setFixedHeight(minimumSizeHint().height()); + setFixedHeight(tqminimumSizeHint().height()); } void Register::LineEdit::setValue(NumberBase base, BitValue value, uint nbChars) diff --git a/src/devices/mem24/gui/mem24_hex_view.cpp b/src/devices/mem24/gui/mem24_hex_view.cpp index c732731..349e2fc 100644 --- a/src/devices/mem24/gui/mem24_hex_view.cpp +++ b/src/devices/mem24/gui/mem24_hex_view.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "mem24_hex_view.h" -#include +#include #include #include diff --git a/src/devices/mem24/gui/mem24_memory_editor.cpp b/src/devices/mem24/gui/mem24_memory_editor.cpp index 27ed4a7..c395b17 100644 --- a/src/devices/mem24/gui/mem24_memory_editor.cpp +++ b/src/devices/mem24/gui/mem24_memory_editor.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "mem24_memory_editor.h" -#include +#include #include #include diff --git a/src/devices/mem24/mem24/mem24_group.cpp b/src/devices/mem24/mem24/mem24_group.cpp index 00ca072..f396027 100644 --- a/src/devices/mem24/mem24/mem24_group.cpp +++ b/src/devices/mem24/mem24/mem24_group.cpp @@ -18,7 +18,7 @@ Device::Memory *Mem24::Group::createMemory(const Device::Data &data) const TQString Mem24::Group::informationHtml(const Device::Data &data) const { const Mem24::Data &mdata = static_cast(data); - TQString tmp = i18n("%1 bytes").arg(formatNumber(mdata.nbBytes())); + TQString tmp = i18n("%1 bytes").tqarg(formatNumber(mdata.nbBytes())); return htmlTableRow(i18n("Memory Size"), tmp); } @@ -35,7 +35,7 @@ TQPixmap Mem24::Group::memoryGraph(const Device::Data &data) const data.endAddress = offset - 1; data.start = toHexLabel(data.startAddress, mdata.nbCharsAddress()); data.end = toHexLabel(data.endAddress, mdata.nbCharsAddress()); - data.label = i18n("Block #%1").arg(i+1); + data.label = i18n("Block #%1").tqarg(i+1); ranges.append(data); } return Device::memoryGraph(ranges); diff --git a/src/devices/mem24/mem24/mem24_memory.cpp b/src/devices/mem24/mem24/mem24_memory.cpp index aba1cbf..f3ce758 100644 --- a/src/devices/mem24/mem24/mem24_memory.cpp +++ b/src/devices/mem24/mem24/mem24_memory.cpp @@ -84,7 +84,7 @@ void Mem24::Memory::fromHexBuffer(const HexBuffer &hb, WarningTypes &result, if ( !(result & ValueTooLarge) && !_data[k].isInside(mask) ) { result |= ValueTooLarge; warnings += i18n("At least one word (at offset %1) is larger (%2) than the corresponding mask (%3).") - .arg(toHexLabel(k, 8)).arg(toHexLabel(_data[k], 8)).arg(toHexLabel(mask, 8)); + .tqarg(toHexLabel(k, 8)).tqarg(toHexLabel(_data[k], 8)).tqarg(toHexLabel(mask, 8)); } _data[k] = _data[k].maskWith(mask); } diff --git a/src/devices/mem24/prog/mem24_prog.cpp b/src/devices/mem24/prog/mem24_prog.cpp index 4c4b201..82c596c 100644 --- a/src/devices/mem24/prog/mem24_prog.cpp +++ b/src/devices/mem24/prog/mem24_prog.cpp @@ -38,9 +38,9 @@ bool Programmer::Mem24DeviceSpecific::verifyByte(uint index, BitValue d, const V Address address = index; if ( vdata.actions & BlankCheckVerify ) log(Log::LineType::Error, i18n("Device memory is not blank (at address %1: reading %2 and expecting %3).") - .arg(toHexLabel(address, device().nbCharsAddress())).arg(toHexLabel(d, 2)).arg(toHexLabel(v, 2))); + .tqarg(toHexLabel(address, device().nbCharsAddress())).tqarg(toHexLabel(d, 2)).tqarg(toHexLabel(v, 2))); else log(Log::LineType::Error, i18n("Device memory doesn't match hex file (at address %1: reading %2 and expecting %3).") - .arg(toHexLabel(address, device().nbCharsAddress())).arg(toHexLabel(d, 2)).arg(toHexLabel(v, 2))); + .tqarg(toHexLabel(address, device().nbCharsAddress())).tqarg(toHexLabel(d, 2)).tqarg(toHexLabel(v, 2))); return false; } diff --git a/src/devices/mem24/xml/mem24_xml_to_data.cpp b/src/devices/mem24/xml/mem24_xml_to_data.cpp index e73d7bb..81fd7bb 100644 --- a/src/devices/mem24/xml/mem24_xml_to_data.cpp +++ b/src/devices/mem24/xml/mem24_xml_to_data.cpp @@ -7,7 +7,7 @@ * (at your option) any later version. * ***************************************************************************/ #include -#include +#include #include "xml_to_data/device_xml_to_data.h" #include "common/common/misc.h" @@ -49,7 +49,7 @@ virtual void checkPins(const TQMap &pinLabels) const if ( !pinLabels.contains("VSS") ) qFatal("No VSS pin specified"); TQMap::const_iterator it; for (it=pinLabels.begin(); it!=pinLabels.end(); ++it) - if ( it.data()!=1 ) qFatal(TQString("Duplicated pin %1").arg(it.key())); + if ( it.data()!=1 ) qFatal(TQString("Duplicated pin %1").tqarg(it.key())); } }; // class diff --git a/src/devices/pic/base/pic.cpp b/src/devices/pic/base/pic.cpp index 75e6bf4..94267e2 100644 --- a/src/devices/pic/base/pic.cpp +++ b/src/devices/pic/base/pic.cpp @@ -212,17 +212,17 @@ TQStringList Pic::Data::idNames(const TQMap &ids) cons case Architecture::P18C: case Architecture::P18F: case Architecture::P18J: - list += i18n("%1 (rev. %2)").arg(it.key()).arg(toLabel(it.data().revision)); + list += i18n("%1 (rev. %2)").tqarg(it.key()).tqarg(toLabel(it.data().revision)); break; case Architecture::P24F: - list += i18n("%1 (rev. %2.%3)").arg(it.key()).arg(toLabel(it.data().revision)).arg(toLabel(it.data().minorRevision)); + list += i18n("%1 (rev. %2.%3)").tqarg(it.key()).tqarg(toLabel(it.data().revision)).tqarg(toLabel(it.data().minorRevision)); break; case Architecture::P30F: - list += i18n("%1 (proc. %2; rev. %3.%4)").arg(it.key()).arg(toLabel(it.data().process)).arg(toLabel(it.data().revision)).arg(toLabel(it.data().minorRevision)); + list += i18n("%1 (proc. %2; rev. %3.%4)").tqarg(it.key()).tqarg(toLabel(it.data().process)).tqarg(toLabel(it.data().revision)).tqarg(toLabel(it.data().minorRevision)); break; case Architecture::P24H: case Architecture::P33F: - list += i18n("%1 (rev. %2)").arg(it.key()).arg(toLabel(it.data().revision)); + list += i18n("%1 (rev. %2)").tqarg(it.key()).tqarg(toLabel(it.data().revision)); break; case Architecture::Nb_Types: Q_ASSERT(false); break; } @@ -236,14 +236,14 @@ bool Pic::Data::checkCalibration(const Device::Array &data, TQString *message) c for (uint i=0; i &Pic::Config::masks() (*_masks)[DATA[i].mask.name] = MapData(i, -1); if ( DATA[i].type==MemoryRange ) { for (uint k=0; k=0 ) return i18n("%1 for block %2").arg(s).arg(mp.block); + if ( mp.block>=0 ) return i18n("%1 for block %2").tqarg(s).tqarg(mp.block); return s; } diff --git a/src/devices/pic/base/pic_protection.cpp b/src/devices/pic/base/pic_protection.cpp index 8fac920..d91f1f7 100644 --- a/src/devices/pic/base/pic_protection.cpp +++ b/src/devices/pic/base/pic_protection.cpp @@ -30,7 +30,7 @@ Pic::Protection::Family Pic::Protection::family() const { if ( _config.findMask("WRTBS") ) return CodeGuard; TQString mask = maskName(ProgramProtected, MemoryRangeType::Code); - if ( _config.findMask(TQString("%1_%2").arg(mask).arg(0)) ) return BlockProtection; + if ( _config.findMask(TQString("%1_%2").tqarg(mask).tqarg(0)) ) return BlockProtection; if ( _config.findMask(mask) ) return BasicProtection; return NoProtection; } @@ -79,7 +79,7 @@ TQString Pic::Protection::blockMaskName(Type type, uint block) const if ( type==StandardSecurity || type==HighSecurity ) return (block==0 ? "SSSEC" : "GSSEC"); return TQString(); } - return TQString("%1_%2").arg(maskName(type, MemoryRangeType::Code)).arg(block); + return TQString("%1_%2").tqarg(maskName(type, MemoryRangeType::Code)).tqarg(block); } TQString Pic::Protection::maskName(Type type, MemoryRangeType mtype) const @@ -341,7 +341,7 @@ uint Pic::Protection::nbBlocks() const { if ( family()==CodeGuard ) return 2; // codeguard : secure segment + general segment for (uint i=0; i"; case Sfr: return sfrNames[address]; } diff --git a/src/devices/pic/gui/pic_config_editor.cpp b/src/devices/pic/gui/pic_config_editor.cpp index 193891a..4b70c3d 100644 --- a/src/devices/pic/gui/pic_config_editor.cpp +++ b/src/devices/pic/gui/pic_config_editor.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "pic_config_editor.h" -#include +#include #include #include diff --git a/src/devices/pic/gui/pic_config_word_editor.cpp b/src/devices/pic/gui/pic_config_word_editor.cpp index 773ed03..67c5cc9 100644 --- a/src/devices/pic/gui/pic_config_word_editor.cpp +++ b/src/devices/pic/gui/pic_config_word_editor.cpp @@ -10,7 +10,7 @@ #include "pic_config_word_editor.h" #include -#include +#include #include #include @@ -114,7 +114,7 @@ Pic::ConfigWordEditor::ConfigWordEditor(Memory &memory, uint ci, bool withWordEd connect(_mdb, TQT_SIGNAL(modified()), TQT_SLOT(updateDisplay())); hbox->addWidget(_mdb); KPushButton *button = new KPushButton(i18n("Details..."), this); - button->setFixedHeight(button->sizeHint().height()); + button->setFixedHeight(button->tqsizeHint().height()); connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(showDialog())); hbox->addWidget(button); hbox->addStretch(1); diff --git a/src/devices/pic/gui/pic_group_ui.cpp b/src/devices/pic/gui/pic_group_ui.cpp index d2ff2f4..fa4aa56 100644 --- a/src/devices/pic/gui/pic_group_ui.cpp +++ b/src/devices/pic/gui/pic_group_ui.cpp @@ -56,7 +56,7 @@ void Pic::GroupUI::fillWatchListContainer(ListContainer *container, TQValueVecto list = Pic::gprList(data, coff); for (uint k=0; kappendBranch(i18n("Bank %1").arg(k))); + ListContainer *bbranch = (rdata.nbBanks==1 ? branch : branch->appendBranch(i18n("Bank %1").tqarg(k))); uint nb = 0; for (uint i=0; i +#include #include #include diff --git a/src/devices/pic/gui/pic_memory_editor.cpp b/src/devices/pic/gui/pic_memory_editor.cpp index f62cbcb..a964988 100644 --- a/src/devices/pic/gui/pic_memory_editor.cpp +++ b/src/devices/pic/gui/pic_memory_editor.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include @@ -112,14 +112,14 @@ void Pic::MemoryEditorLegend::updateDisplay() if (_boot.label) { AddressRange r = memory().bootRange(); if ( r.isEmpty() ) _boot.label->setText(i18n("not present")); - else _boot.label->setText(TQString("[%1:%2]").arg(toHex(r.start, nbChars)).arg(toHex(r.end, nbChars))); + else _boot.label->setText(TQString("[%1:%2]").tqarg(toHex(r.start, nbChars)).tqarg(toHex(r.end, nbChars))); _boot.button->setEnabled(!r.isEmpty()); _boot.setProtected(memory().isBootProtected(ptype)); } for (uint i=0; i<_blocks.count(); i++) { AddressRange r = memory().blockRange(i); if ( r.isEmpty() ) _blocks[i].label->setText(i18n("not present")); - else _blocks[i].label->setText(TQString("[%1:%2]").arg(toHex(r.start, nbChars)).arg(toHex(r.end, nbChars))); + else _blocks[i].label->setText(TQString("[%1:%2]").tqarg(toHex(r.start, nbChars)).tqarg(toHex(r.end, nbChars))); _blocks[i].button->setEnabled(!r.isEmpty()); _blocks[i].setProtected(memory().isBlockProtected(ptype, i)); } @@ -251,10 +251,10 @@ void Pic::MemoryTypeEditor::init(bool first) uint nbChars = device().nbCharsWord(type()); TQString add; - if ( type()==MemoryRangeType::UserId ) add = i18n(" - recommended mask: %1").arg(toHexLabel(device().userIdRecommendedMask(), nbChars)); + if ( type()==MemoryRangeType::UserId ) add = i18n(" - recommended mask: %1").tqarg(toHexLabel(device().userIdRecommendedMask(), nbChars)); if ( type()==MemoryRangeType::Cal && _hexview ) add = i18n(" - not programmed by default"); TQString comment = i18n("%1-bit words - mask: %2") - .arg(device().nbBitsWord(type())).arg(toHexLabel(device().mask(type()), nbChars)); + .tqarg(device().nbBitsWord(type())).tqarg(toHexLabel(device().mask(type()), nbChars)); _comment->setText(comment + add); } diff --git a/src/devices/pic/gui/pic_prog_group_ui.cpp b/src/devices/pic/gui/pic_prog_group_ui.cpp index 565ec93..6e350ed 100644 --- a/src/devices/pic/gui/pic_prog_group_ui.cpp +++ b/src/devices/pic/gui/pic_prog_group_ui.cpp @@ -36,6 +36,6 @@ void Programmer::PicAdvancedDialog::updateDisplay() if ( !base().group().canReadVoltage(Pic::VoltageType(i)) ) continue; double v = base().voltage(Pic::VoltageType(i)); if ( v==::Programmer::UNKNOWN_VOLTAGE ) _voltages[i]->setText("---"); - else _voltages[i]->setText(TQString("%1 V").arg(v)); + else _voltages[i]->setText(TQString("%1 V").tqarg(v)); } } diff --git a/src/devices/pic/gui/pic_register_view.cpp b/src/devices/pic/gui/pic_register_view.cpp index c852689..b640036 100644 --- a/src/devices/pic/gui/pic_register_view.cpp +++ b/src/devices/pic/gui/pic_register_view.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "pic_register_view.h" -#include +#include #include #include #include @@ -46,20 +46,20 @@ Pic::BankWidget::BankWidget(uint i, TQWidget *parent) if ( (i/2)==0 ) { TQString title = ((i%2)==0 ? i18n("Access Bank (low)") : i18n("Access Bank (high)")); TQLabel *label = new TQLabel(title, this); - label->setAlignment(AlignCenter); + label->tqsetAlignment(AlignCenter); top->addMultiCellWidget(label, row,row, 0,6, AlignHCenter); } else { _bankCombo = new TQComboBox(this); for (uint k=1; k<2*rdata.nbBanks-1; k++) { - _bankCombo->insertItem((k%2)==0 ? i18n("Bank %1 (low)").arg(k/2) : i18n("Bank %1 (high)").arg(k/2)); + _bankCombo->insertItem((k%2)==0 ? i18n("Bank %1 (low)").tqarg(k/2) : i18n("Bank %1 (high)").tqarg(k/2)); } if ( _bindex==3 ) _bankCombo->setCurrentItem(1); connect(_bankCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(bankChanged())); top->addMultiCellWidget(_bankCombo, row,row, 0,6, AlignHCenter); } } else { - TQLabel *label = new TQLabel(i18n("Bank %1").arg(i), this); - label->setAlignment(AlignCenter); + TQLabel *label = new TQLabel(i18n("Bank %1").tqarg(i), this); + label->tqsetAlignment(AlignCenter); top->addMultiCellWidget(label, row,row, 0,6, AlignHCenter); } row++; diff --git a/src/devices/pic/pic/pic_group.cpp b/src/devices/pic/pic/pic_group.cpp index 2ae250f..311bff3 100644 --- a/src/devices/pic/pic/pic_group.cpp +++ b/src/devices/pic/pic/pic_group.cpp @@ -27,14 +27,14 @@ TQString Pic::Group::informationHtml(const Device::Data &data) const TQString s = htmlTableRow(i18n("Memory Type"), data.memoryTechnology().label()); if ( pdata.isPresent(MemoryRangeType::Code) ) { uint nbw = pdata.nbWords(MemoryRangeType::Code); - TQString tmp = i18n("%1 words").arg(formatNumber(nbw)); - tmp += i18n(" (%2 bits)").arg(pdata.nbBitsWord(MemoryRangeType::Code)); + TQString tmp = i18n("%1 words").tqarg(formatNumber(nbw)); + tmp += i18n(" (%2 bits)").tqarg(pdata.nbBitsWord(MemoryRangeType::Code)); s += htmlTableRow(MemoryRangeType(MemoryRangeType::Code).label(), tmp); } if ( pdata.isPresent(MemoryRangeType::Eeprom) ) { uint nbw = pdata.nbWords(MemoryRangeType::Eeprom); - TQString tmp = i18n("%1 bytes").arg(formatNumber(nbw)); - tmp += i18n(" (%2 bits)").arg(pdata.nbBitsWord(MemoryRangeType::Eeprom)); + TQString tmp = i18n("%1 bytes").tqarg(formatNumber(nbw)); + tmp += i18n(" (%2 bits)").tqarg(pdata.nbBitsWord(MemoryRangeType::Eeprom)); if ( !(pdata.range(MemoryRangeType::Eeprom).properties & Programmable) ) tmp += i18n(" (not programmable)"); s += htmlTableRow(MemoryRangeType(MemoryRangeType::Eeprom).label(), tmp); } diff --git a/src/devices/pic/pic/pic_memory.cpp b/src/devices/pic/pic/pic_memory.cpp index 5ffb663..5f86517 100644 --- a/src/devices/pic/pic/pic_memory.cpp +++ b/src/devices/pic/pic/pic_memory.cpp @@ -543,7 +543,7 @@ void Pic::Memory::fromHexBuffer(MemoryRangeType type, const HexBuffer &hb, Warni if ( !(result & ValueTooLarge) && _ranges[type][wOffset].maskWith(mask)!=_ranges[type][wOffset] ) { result |= ValueTooLarge; warnings += i18n("At least one word (at offset %1) is larger (%2) than the corresponding mask (%3).") - .arg(toHexLabel(offset, 8)).arg(toHexLabel(_ranges[type][wOffset], 8)).arg(toHexLabel(mask, 8)); + .tqarg(toHexLabel(offset, 8)).tqarg(toHexLabel(_ranges[type][wOffset], 8)).tqarg(toHexLabel(mask, 8)); } _ranges[type][wOffset] = _ranges[type][wOffset].maskWith(mask); } diff --git a/src/devices/pic/prog/pic_debug.cpp b/src/devices/pic/prog/pic_debug.cpp index eef84cc..9434a74 100644 --- a/src/devices/pic/prog/pic_debug.cpp +++ b/src/devices/pic/prog/pic_debug.cpp @@ -20,7 +20,7 @@ Register::TypeData Debugger::PicBase::registerTypeData(const TQString &name) con return Register::TypeData(rdata.sfrs[name].address, rdata.nbChars()); } -bool Debugger::PicBase::updatePortStatus(uint index, TQMap &bits) +bool Debugger::PicBase::updatePorttqStatus(uint index, TQMap &bits) { const Pic::RegistersData &rdata = device()->registersData(); BitValue tris; @@ -65,7 +65,7 @@ const Debugger::PicBase &Debugger::PicSpecific::base() const return static_cast(_base); } -bool Debugger::PicSpecific::updateStatus() +bool Debugger::PicSpecific::updatetqStatus() { if ( !Debugger::manager->readRegister(base().pcTypeData()) ) return false; if ( !Debugger::manager->readRegister(base().registerTypeData("STATUS")) ) return false; @@ -86,15 +86,15 @@ TQString Debugger::P16FSpecific::statusString() const uint bank = (status.bit(5) ? 1 : 0) + (status.bit(6) ? 2 : 0); BitValue wreg = Register::list().value(wregTypeData()); return TQString("W:%1 %2 %3 %4 PC:%5 Bank:%6") - .arg(toHexLabel(wreg, rdata.nbChars())).arg(status.bit(2) ? "Z" : "z") - .arg(status.bit(1) ? "DC" : "dc").arg(status.bit(0) ? "C" : "c") - .arg(toHexLabel(_base.pc(), device().nbCharsAddress())).arg(bank); + .tqarg(toHexLabel(wreg, rdata.nbChars())).tqarg(status.bit(2) ? "Z" : "z") + .tqarg(status.bit(1) ? "DC" : "dc").tqarg(status.bit(0) ? "C" : "c") + .tqarg(toHexLabel(_base.pc(), device().nbCharsAddress())).tqarg(bank); } //---------------------------------------------------------------------------- -bool Debugger::P18FSpecific::updateStatus() +bool Debugger::P18FSpecific::updatetqStatus() { - if ( !PicSpecific::updateStatus() ) return false; + if ( !PicSpecific::updatetqStatus() ) return false; if ( !Debugger::manager->readRegister(base().registerTypeData("BSR")) ) return false; return true; } @@ -111,8 +111,8 @@ TQString Debugger::P18FSpecific::statusString() const BitValue bsr = Register::list().value(base().registerTypeData("BSR")); BitValue wreg = Register::list().value(wregTypeData()); return TQString("W:%1 %2 %3 %4 %5 %6 PC:%7 Bank:%8") - .arg(toHexLabel(wreg, rdata.nbChars())).arg(status.bit(4) ? "N" : "n") - .arg(status.bit(3) ? "OV" : "ov").arg(status.bit(2) ? "Z" : "z") - .arg(status.bit(1) ? "DC" : "dc").arg(status.bit(0) ? "C" : "c") - .arg(toHexLabel(base().pc(), device().nbCharsAddress())).arg(toLabel(bsr)); + .tqarg(toHexLabel(wreg, rdata.nbChars())).tqarg(status.bit(4) ? "N" : "n") + .tqarg(status.bit(3) ? "OV" : "ov").tqarg(status.bit(2) ? "Z" : "z") + .tqarg(status.bit(1) ? "DC" : "dc").tqarg(status.bit(0) ? "C" : "c") + .tqarg(toHexLabel(base().pc(), device().nbCharsAddress())).tqarg(toLabel(bsr)); } diff --git a/src/devices/pic/prog/pic_debug.h b/src/devices/pic/prog/pic_debug.h index d73aeee..ce08387 100644 --- a/src/devices/pic/prog/pic_debug.h +++ b/src/devices/pic/prog/pic_debug.h @@ -25,7 +25,7 @@ public: const Pic::Data &device() const { return static_cast(*_base.device()); } PicBase &base(); const PicBase &base() const; - virtual bool updateStatus(); + virtual bool updatetqStatus(); virtual Register::TypeData wregTypeData() const = 0; }; @@ -44,7 +44,7 @@ class P18FSpecific : public PicSpecific public: P18FSpecific(Debugger::Base &base) : PicSpecific(base) {} virtual TQString statusString() const; - virtual bool updateStatus(); + virtual bool updatetqStatus(); virtual Register::TypeData wregTypeData() const; }; @@ -57,7 +57,7 @@ public: const PicSpecific *deviceSpecific() const { return static_cast(_deviceSpecific); } const Pic::Data *device() const { return static_cast(Debugger::Base::device()); } Register::TypeData registerTypeData(const TQString &name) const; - virtual bool updatePortStatus(uint index, TQMap &bits); + virtual bool updatePorttqStatus(uint index, TQMap &bits); }; } // namespace diff --git a/src/devices/pic/prog/pic_prog.cpp b/src/devices/pic/prog/pic_prog.cpp index b134303..f0c917d 100644 --- a/src/devices/pic/prog/pic_prog.cpp +++ b/src/devices/pic/prog/pic_prog.cpp @@ -106,9 +106,9 @@ bool Programmer::PicBase::readVoltages() if ( !group().canReadVoltage(Pic::VoltageType(i)) ) continue; if ( _voltages[i].error==true ) { ok = false; - log(Log::LineType::Error, i18n(" %1 = %2 V: error in voltage level.").arg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).arg(_voltages[i].value)); + log(Log::LineType::Error, i18n(" %1 = %2 V: error in voltage level.").tqarg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).tqarg(_voltages[i].value)); } else if ( _voltages[i].value!=UNKNOWN_VOLTAGE ) - log(Log::DebugLevel::Normal, TQString(" %1 = %2 V").arg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).arg(_voltages[i].value)); + log(Log::DebugLevel::Normal, TQString(" %1 = %2 V").tqarg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).tqarg(_voltages[i].value)); } return ok; } @@ -136,10 +136,10 @@ bool Programmer::PicBase::initProgramming(Task) const Pic::VoltageData &tvpp = device()->voltage(Pic::Vpp); if ( vpp()tvpp.max ) { TQString s = i18n("Vpp (%1 V) is higher than the maximum voltage (%2 V). You may damage the device.") - .arg(vpp()).arg(tvpp.max); + .tqarg(vpp()).tqarg(tvpp.max); log(Log::LineType::Warning, s); if ( !askContinue(s) ) { logUserAbort(); @@ -153,15 +153,15 @@ bool Programmer::PicBase::initProgramming(Task) if ( vdd()voltage(Pic::VddWrite).min!=tvdd.min ) log(Log::LineType::Warning, i18n("Vdd (%1 V) is too low for high-voltage programming\n(piklab only supports high-voltage programming at the moment).\nMinimum required is %2 V.") - .arg(vdd()).arg(tvdd.min)); + .tqarg(vdd()).tqarg(tvdd.min)); else if ( type==Pic::VddRead && device()->voltage(Pic::VddWrite).min!=tvdd.min ) log(Log::LineType::Warning, i18n("Vdd (%1 V) is too low for reading\nMinimum required is %2 V.") - .arg(vdd()).arg(tvdd.min)); + .tqarg(vdd()).tqarg(tvdd.min)); else log(Log::LineType::Warning, i18n("Vdd (%1 V) is too low for programming\nMinimum required is %2 V.") - .arg(vdd()).arg(tvdd.min)); + .tqarg(vdd()).tqarg(tvdd.min)); } else if ( vdd()>tvdd.max ) { TQString s = i18n("Vdd (%1 V) is higher than the maximum voltage (%2 V). You may damage the device.") - .arg(vdd()).arg(tvdd.max); + .tqarg(vdd()).tqarg(tvdd.max); log(Log::LineType::Warning, s); if ( !askContinue(s) ) { logUserAbort(); @@ -178,7 +178,7 @@ bool Programmer::PicBase::initProgramming(Task) _hasProtectedCode = _deviceMemory->isProtected(Pic::Protection::ProgramProtected, Pic::MemoryRangeType::Code); _hasProtectedEeprom = _deviceMemory->isProtected(Pic::Protection::ProgramProtected, Pic::MemoryRangeType::Eeprom); log(Log::DebugLevel::Normal, TQString(" protected: code=%1 data=%2") - .arg(_hasProtectedCode ? "true" : "false").arg(_hasProtectedEeprom ? "true" : "false")); + .tqarg(_hasProtectedCode ? "true" : "false").tqarg(_hasProtectedEeprom ? "true" : "false")); // read calibration if ( !readCalibration() ) return false; } @@ -250,14 +250,14 @@ bool Programmer::PicBase::verifyDeviceId() { if ( !specific()->canReadRange(Pic::MemoryRangeType::DeviceId ) ) return true; if ( !device()->isReadable(Pic::MemoryRangeType::DeviceId) ) { - log(Log::LineType::Information, i18n("Device not autodetectable: continuing with the specified device name \"%1\"...").arg(device()->name())); + log(Log::LineType::Information, i18n("Device not autodetectable: continuing with the specified device name \"%1\"...").tqarg(device()->name())); return true; } BitValue rawId = readDeviceId(); if ( hasError() ) return false; uint nbChars = device()->nbWords(Pic::MemoryRangeType::DeviceId) * device()->nbCharsWord(Pic::MemoryRangeType::DeviceId); if ( rawId==0x0 || rawId==device()->mask(Pic::MemoryRangeType::DeviceId) ) { - log(Log::LineType::Error, i18n("Missing or incorrect device (Read id is %1).").arg(toHexLabel(rawId, nbChars))); + log(Log::LineType::Error, i18n("Missing or incorrect device (Read id is %1).").tqarg(toHexLabel(rawId, nbChars))); return false; } TQMap ids; @@ -270,18 +270,18 @@ bool Programmer::PicBase::verifyDeviceId() } TQString message; if ( ids.count()!=0 ) { - log(Log::LineType::Information, i18n("Read id: %1").arg(device()->idNames(ids).join("; "))); + log(Log::LineType::Information, i18n("Read id: %1").tqarg(device()->idNames(ids).join("; "))); if ( ids.contains(device()->name()) ) return true; - message = i18n("Read id does not match the specified device name \"%1\".").arg(device()->name()); + message = i18n("Read id does not match the specified device name \"%1\".").tqarg(device()->name()); } else { - log(Log::LineType::Warning, i18n(" Unknown or incorrect device (Read id is %1).").arg(toHexLabel(rawId, nbChars))); + log(Log::LineType::Warning, i18n(" Unknown or incorrect device (Read id is %1).").tqarg(toHexLabel(rawId, nbChars))); message = i18n("Unknown device."); } if ( !askContinue(message) ) { logUserAbort(); return false; } - log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").arg(device()->name())); + log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").tqarg(device()->name())); return true; } @@ -306,7 +306,7 @@ bool Programmer::PicBase::readCalibration() Device::Array data; if ( !specific()->read(Pic::MemoryRangeType::Cal, data, 0) ) return false; _deviceMemory->setArray(Pic::MemoryRangeType::Cal, data); - log(Log::DebugLevel::Normal, TQString(" Read osccal: %1").arg(prettyCalibration(data))); + log(Log::DebugLevel::Normal, TQString(" Read osccal: %1").tqarg(prettyCalibration(data))); TQString message; if ( !device()->checkCalibration(data, &message) ) log(Log::LineType::Warning, " " + message); if ( device()->isReadable(Pic::MemoryRangeType::CalBackup) ) { @@ -316,7 +316,7 @@ bool Programmer::PicBase::readCalibration() } if ( !specific()->read(Pic::MemoryRangeType::CalBackup, data, 0) ) return false; _deviceMemory->setArray(Pic::MemoryRangeType::CalBackup, data); - log(Log::DebugLevel::Normal, TQString(" Read osccal backup: %1").arg(prettyCalibration(data))); + log(Log::DebugLevel::Normal, TQString(" Read osccal backup: %1").tqarg(prettyCalibration(data))); if ( !device()->checkCalibration(data, &message) ) log(Log::LineType::Warning, " " + message); } } @@ -381,7 +381,7 @@ bool Programmer::PicBase::restoreBandGapBits() log(Log::LineType::Warning, i18n("Could not restore band gap bits because programmer does not support writing config bits.")); return true; } - log(Log::DebugLevel::Normal, TQString(" Write config with band gap bits: %2").arg(toHexLabel(cdata[0], device()->nbCharsWord(Pic::MemoryRangeType::Config)))); + log(Log::DebugLevel::Normal, TQString(" Write config with band gap bits: %2").tqarg(toHexLabel(cdata[0], device()->nbCharsWord(Pic::MemoryRangeType::Config)))); if ( !programRange(Pic::MemoryRangeType::Config, cdata) ) return false; if ( !specific()->read(Pic::MemoryRangeType::Config, data, 0) ) return false; if ( data==cdata ) log(Log::LineType::Information, i18n(" Band gap bits have been preserved.")); @@ -464,7 +464,7 @@ bool Programmer::PicBase::internalEraseRange(Pic::MemoryRangeType type) log(Log::LineType::SoftError, i18n("Cannot erase specified range because of programmer limitations.")); return false; } - if ( !askContinue(i18n("%1: Erasing this range only is not supported with this programmer. This will erase the whole chip and restore the other memory ranges.").arg(type.label())) ) { + if ( !askContinue(i18n("%1: Erasing this range only is not supported with this programmer. This will erase the whole chip and restore the other memory ranges.").tqarg(type.label())) ) { logUserAbort(); return false; } @@ -497,19 +497,19 @@ bool Programmer::PicBase::readRange(Pic::MemoryRangeType type, Pic::Memory *memo { if ( !device()->isReadable(type) ) return true; if ( !specific()->canReadRange(type) ) { - log(Log::LineType::Information, i18n("The selected programmer cannot read %1: operation skipped.").arg(type.label())); + log(Log::LineType::Information, i18n("The selected programmer cannot read %1: operation skipped.").tqarg(type.label())); return true; } VerifyData *vdata = (vd ? new VerifyData(vd->actions, vd->memory) : 0); if (vdata) { - log(Log::LineType::Information, i18n(" Verify memory: %1").arg(type.label())); + log(Log::LineType::Information, i18n(" Verify memory: %1").tqarg(type.label())); if ( !(vdata->actions & IgnoreProtectedVerify) ) { vdata->protectedRanges = static_cast(vdata->memory).protectedRanges(Pic::Protection::ProgramProtected, type); if ( !vdata->protectedRanges.isEmpty() ) log(Log::LineType::Warning, i18n(" Part of device memory is protected (in %1) and cannot be verified.") - .arg(type.label())); + .tqarg(type.label())); } else vdata->protectedRanges.clear(); } else { - log(Log::LineType::Information, i18n(" Read memory: %1").arg(type.label())); + log(Log::LineType::Information, i18n(" Read memory: %1").tqarg(type.label())); CRASH_ASSERT(memory); } Device::Array data; @@ -562,7 +562,7 @@ bool Programmer::PicBase::programSingle(Pic::MemoryRangeType type, const Pic::Me bool Programmer::PicBase::programRange(Pic::MemoryRangeType mtype, const Device::Array &data) { - log(Log::LineType::Information, i18n(" Write memory: %1").arg(mtype.label())); + log(Log::LineType::Information, i18n(" Write memory: %1").tqarg(mtype.label())); bool only = ( readConfigEntry(Config::OnlyProgramNonMask).toBool() && (mtype==Pic::MemoryRangeType::Code || mtype==Pic::MemoryRangeType::Eeprom) ); return specific()->write(mtype, data, !only); @@ -672,15 +672,15 @@ bool Programmer::PicBase::checkProgramCalibration(const Device::Array &data) { TQString message, s = prettyCalibration(data); if ( !device()->checkCalibration(data, &message) ) { - sorry(i18n("The calibration word %1 is not valid.").arg(s), message); + sorry(i18n("The calibration word %1 is not valid.").tqarg(s), message); return false; } - return askContinue(i18n("Do you want to overwrite the device calibration with %1?").arg(s)); + return askContinue(i18n("Do you want to overwrite the device calibration with %1?").tqarg(s)); } bool Programmer::PicBase::tryProgramCalibration(const Device::Array &data, bool &success) { - log(Log::LineType::Information, i18n(" Write memory: %1").arg(Pic::MemoryRangeType(Pic::MemoryRangeType::Cal).label())); + log(Log::LineType::Information, i18n(" Write memory: %1").tqarg(Pic::MemoryRangeType(Pic::MemoryRangeType::Cal).label())); success = true; if ( !specific()->write(Pic::MemoryRangeType::Cal, data, true) ) return false; Device::Array read; @@ -691,7 +691,7 @@ bool Programmer::PicBase::tryProgramCalibration(const Device::Array &data, bool if ( device()->isWritable(Pic::MemoryRangeType::CalBackup) ) { if ( !specific()->read(Pic::MemoryRangeType::CalBackup, read, 0) ) return false; if ( device()->checkCalibration(read) ) return true; // do not overwrite correct backup value - log(Log::LineType::Information, i18n(" Write memory: %1").arg(Pic::MemoryRangeType(Pic::MemoryRangeType::CalBackup).label())); + log(Log::LineType::Information, i18n(" Write memory: %1").tqarg(Pic::MemoryRangeType(Pic::MemoryRangeType::CalBackup).label())); if ( !specific()->write(Pic::MemoryRangeType::CalBackup, data, true) ) return false; if ( !specific()->read(Pic::MemoryRangeType::CalBackup, read, 0) ) return false; for (uint i=0; i(this)->log(Log::DebugLevel::Normal, TQString("start before align: %1").arg(start)); + const_cast(this)->log(Log::DebugLevel::Normal, TQString("start before align: %1").tqarg(start)); uint align = device().nbWordsWriteAlignment(type); start -= start % align; - const_cast(this)->log(Log::DebugLevel::Normal, TQString("start after align: %1 (align=%2)").arg(start).arg(align)); + const_cast(this)->log(Log::DebugLevel::Normal, TQString("start after align: %1 (align=%2)").tqarg(start).tqarg(align)); return start; } @@ -41,10 +41,10 @@ uint Programmer::PicDeviceSpecific::findNonMaskEnd(Pic::MemoryRangeType type, co uint end = data.count()-1; for (; end>0; end--) if ( data[end]!=device().mask(type) ) break; - const_cast(this)->log(Log::DebugLevel::Normal, TQString("end before align: %1").arg(end)); + const_cast(this)->log(Log::DebugLevel::Normal, TQString("end before align: %1").tqarg(end)); uint align = device().nbWordsWriteAlignment(type); if ( (end+1) % align ) end += align - (end+1) % align; - const_cast(this)->log(Log::DebugLevel::Normal, TQString("end after align: %1 (align=%2)").arg(end).arg(align)); + const_cast(this)->log(Log::DebugLevel::Normal, TQString("end after align: %1 (align=%2)").tqarg(end).tqarg(align)); Q_ASSERT(end_voltages[type].min = voltages.attribute("min").toDouble(&ok1); data()->_voltages[type].max = voltages.attribute("max").toDouble(&ok2); data()->_voltages[type].nominal = voltages.attribute("nominal").toDouble(&ok3); - if ( !ok1 || !ok2 || !ok3 ) qFatal(TQString("Cannot extract voltage value for \"%1\"").arg(type.key())); + if ( !ok1 || !ok2 || !ok3 ) qFatal(TQString("Cannot extract voltage value for \"%1\"").tqarg(type.key())); if ( data()->_voltages[type].min>data()->_voltages[type].max || data()->_voltages[type].nominal_voltages[type].min || data()->_voltages[type].nominal>data()->_voltages[type].max ) @@ -50,11 +50,11 @@ bool getMemoryRange(MemoryRangeType type, TQDomElement element) if ( !ok ) qFatal("Cannot extract end address"); if ( data()->_ranges[type].end_ranges[type].start ) qFatal("Memory range end is before its start"); uint nbCharsWord = data()->nbCharsWord(type); - if ( data()->nbBitsWord(type)==0 ) qFatal(TQString("Architecture doesn't contain memory range %1").arg(type.key())); + if ( data()->nbBitsWord(type)==0 ) qFatal(TQString("Architecture doesn't contain memory range %1").tqarg(type.key())); if ( type==MemoryRangeType::UserId ) { data()->_userIdRecommendedMask = fromHexLabel(range.attribute("rmask"), nbCharsWord, &ok); if ( !ok ) qFatal("Cannot extract rmask value for user id"); - if ( !data()->_userIdRecommendedMask.isInside(data()->mask(type)) ) qFatal(TQString("rmask is not inside mask %1 (%2)").arg(toHexLabel(data()->_userIdRecommendedMask, 8)).arg(toHexLabel(data()->mask(type), 8))); + if ( !data()->_userIdRecommendedMask.isInside(data()->mask(type)) ) qFatal(TQString("rmask is not inside mask %1 (%2)").tqarg(toHexLabel(data()->_userIdRecommendedMask, 8)).tqarg(toHexLabel(data()->mask(type), 8))); } if ( range.attribute("hexfile_offset")!="?" ) { data()->_ranges[type].properties |= Programmable; @@ -100,19 +100,19 @@ void processName(const Pic::Config::Mask &cmask, BitValue pmask, Pic::Config::Va TQStringList &cnames = cvalue.configNames[Pic::ConfigNameType::Default]; if ( cvalue.name=="invalid" ) { cvalue.name = TQString(); - if ( !cnames.isEmpty() ) qFatal(TQString("No cname should be defined for invalid value in mask %1").arg(cmask.name)); + if ( !cnames.isEmpty() ) qFatal(TQString("No cname should be defined for invalid value in mask %1").tqarg(cmask.name)); return; } - if ( cvalue.name.isEmpty() ) qFatal(TQString("Empty value name in mask %1").arg(cmask.name)); + if ( cvalue.name.isEmpty() ) qFatal(TQString("Empty value name in mask %1").tqarg(cmask.name)); if ( cmask.value.isInside(pmask) ) { // protected bits - if ( !cnames.isEmpty() ) qFatal(TQString("Config name should be null for protected config mask \"%1\"").arg(cmask.name)); + if ( !cnames.isEmpty() ) qFatal(TQString("Config name should be null for protected config mask \"%1\"").tqarg(cmask.name)); } else { if ( cnames.isEmpty() && cmask.name!="BSSEC" && cmask.name!="BSSIZ" && cmask.name!="SSSEC" && cmask.name!="SSSIZ" ) { // ### FIXME: 18J 24H 30F1010/202X if ( data()->architecture()!=Pic::Architecture::P18J && data()->architecture()!=Pic::Architecture::P24H && data()->architecture()!=Pic::Architecture::P24F && data()->architecture()!=Pic::Architecture::P33F && data()->name()!="30F1010" && data()->name()!="30F2020" && data()->name()!="30F2023" ) - qFatal(TQString("cname not defined for \"%1\" (%2)").arg(cvalue.name).arg(cmask.name)); + qFatal(TQString("cname not defined for \"%1\" (%2)").tqarg(cvalue.name).tqarg(cmask.name)); } if ( cnames.count()==1 && cnames[0]=="_" ) cnames.clear(); for (uint i=0; iarchitecture()==Pic::Architecture::P30F) ) continue; - qFatal(TQString("Invalid config name for \"%1\"/\"%2\"").arg(cmask.name).arg(cvalue.name)); + qFatal(TQString("Invalid config name for \"%1\"/\"%2\"").tqarg(cmask.name).tqarg(cvalue.name)); } TQStringList &ecnames = cvalue.configNames[Pic::ConfigNameType::Extra]; for (uint i=0; i defConfigNames; Config::Mask cmask; cmask.name = mask.attribute("name"); - if ( !Config::hasMaskName(cmask.name) ) qFatal(TQString("Unknown mask name %1").arg(cmask.name)); + if ( !Config::hasMaskName(cmask.name) ) qFatal(TQString("Unknown mask name %1").tqarg(cmask.name)); cmask.value = fromHexLabel(mask.attribute("value"), nbChars, &ok); if ( !ok || cmask.value==0 || cmask.value>data()->mask(MemoryRangeType::Config) ) - qFatal(TQString("Malformed mask value in mask %1").arg(mask.attribute("name"))); + qFatal(TQString("Malformed mask value in mask %1").tqarg(mask.attribute("name"))); //TQStringList names; TQDomNode child = mask.firstChild(); while ( !child.isNull() ) { TQDomElement value = child.toElement(); child = child.nextSibling(); if ( value.isNull() ) continue; - if ( value.nodeName()!="value" ) qFatal(TQString("Non value child in mask %1").arg(cmask.name)); + if ( value.nodeName()!="value" ) qFatal(TQString("Non value child in mask %1").tqarg(cmask.name)); if ( value.attribute("value")=="default" ) { - if ( !defName.isEmpty() ) qFatal(TQString("Default value already defined for mask %1").arg(cmask.name)); + if ( !defName.isEmpty() ) qFatal(TQString("Default value already defined for mask %1").tqarg(cmask.name)); defName = value.attribute("name"); - //if ( names.contains(defName) ) qFatal(TQString("Value name duplicated in mask %1").arg(cmask.name)); + //if ( names.contains(defName) ) qFatal(TQString("Value name duplicated in mask %1").tqarg(cmask.name)); //names.append(defName); FOR_EACH(Pic::ConfigNameType, type) defConfigNames[type] = TQStringList::split(' ', value.attribute(type.data().key)); continue; } Config::Value cvalue; cvalue.value = fromHexLabel(value.attribute("value"), nbChars, &ok); - if ( !ok || !cvalue.value.isInside(cmask.value) ) qFatal(TQString("Malformed value in mask %1").arg(cmask.name)); + if ( !ok || !cvalue.value.isInside(cmask.value) ) qFatal(TQString("Malformed value in mask %1").tqarg(cmask.name)); cvalue.name = value.attribute("name"); - //if ( names.contains(cvalue.name) ) qFatal(TQString("Value name duplicated in mask %1").arg(cmask.name)); + //if ( names.contains(cvalue.name) ) qFatal(TQString("Value name duplicated in mask %1").tqarg(cmask.name)); //names.append(cvalue.name); FOR_EACH(Pic::ConfigNameType, type) cvalue.configNames[type] = TQStringList::split(' ', value.attribute(type.data().key)); processName(cmask, pmask, cvalue); @@ -183,7 +183,7 @@ Pic::Config::Mask toConfigMask(TQDomElement mask, BitValue pmask) processName(cmask, pmask, cvalue); cmask.values.append(cvalue); } - if ( nb<=1 ) qFatal(TQString("Default value used less than twice in mask %1").arg(cmask.name)); + if ( nb<=1 ) qFatal(TQString("Default value used less than twice in mask %1").tqarg(cmask.name)); } qHeapSort(cmask.values); return cmask; @@ -198,9 +198,9 @@ Pic::Config::Word toConfigWord(TQDomElement config) bool ok; cword.wmask = fromHexLabel(config.attribute("wmask"), nbChars, &ok); BitValue gmask = data()->mask(MemoryRangeType::Config); - if ( !ok || cword.wmask>gmask ) qFatal(TQString("Missing or malformed config wmask \"%1\"").arg(config.attribute("wmask"))); + if ( !ok || cword.wmask>gmask ) qFatal(TQString("Missing or malformed config wmask \"%1\"").tqarg(config.attribute("wmask"))); cword.bvalue = fromHexLabel(config.attribute("bvalue"), nbChars, &ok); - if ( !ok ) qFatal(TQString("Missing or malformed config bvalue \"%1\"").arg(config.attribute("bvalue"))); + if ( !ok ) qFatal(TQString("Missing or malformed config bvalue \"%1\"").tqarg(config.attribute("bvalue"))); if ( config.attribute("pmask").isEmpty() ) cword.pmask = 0; else { bool ok; @@ -209,19 +209,19 @@ Pic::Config::Word toConfigWord(TQDomElement config) } cword.ignoredCNames = TQStringList::split(' ', config.attribute("icnames")); for (uint i=0; igmask ) qFatal("Missing or malformed config cmask"); - //if ( data()->_architecture==Pic::Architecture::P30X &&cword.cmask==cword.wmask ) qFatal(TQString("Redundant cmask in %1").arg(cword.name)); - if ( cword.cmask==mask ) qFatal(TQString("Redundant cmask in %1").arg(cword.name)); + //if ( data()->_architecture==Pic::Architecture::P30X &&cword.cmask==cword.wmask ) qFatal(TQString("Redundant cmask in %1").tqarg(cword.name)); + if ( cword.cmask==mask ) qFatal(TQString("Redundant cmask in %1").tqarg(cword.name)); } if ( !cword.pmask.isInside(cword.usedMask()) ) qFatal("pmask should be inside or'ed mask values."); return cword; @@ -255,11 +255,11 @@ TQValueVector getConfigWords(TQDomElement element) if ( !ok ) qFatal("Missing or malformed config offset"); if ( (offset % data()->addressIncrement(MemoryRangeType::Config))!=0 ) qFatal("Config offset not aligned"); offset /= data()->addressIncrement(MemoryRangeType::Config); - if ( offset>=nbWords ) qFatal(TQString("Offset too big %1/%2").arg(offset).arg(nbWords)); - if ( !configWords[offset].name.isNull() ) qFatal(TQString("Config offset %1 is duplicated").arg(offset)); + if ( offset>=nbWords ) qFatal(TQString("Offset too big %1/%2").tqarg(offset).tqarg(nbWords)); + if ( !configWords[offset].name.isNull() ) qFatal(TQString("Config offset %1 is duplicated").tqarg(offset)); for (uint i=0; iconfig().findMask(list[i]); - if ( mask==0 ) qFatal(TQString("Not valid mask name for \"protected\" tag in checksum: %1").arg(list[i])); + if ( mask==0 ) qFatal(TQString("Not valid mask name for \"protected\" tag in checksum: %1").tqarg(list[i])); if ( mask->values.count()==2 ) continue; for (uint k=0; kvalues.count()); k++) { TQString valueName = mask->values[k].name; if ( valueName.isEmpty() ) continue; if ( !protection.isNoneProtectedValueName(valueName) && !protection.isAllProtectedValueName(valueName) ) - qFatal(TQString("Not switch protection from mask name for \"protected\" tag in checksum: %1").arg(list[i])); + qFatal(TQString("Not switch protection from mask name for \"protected\" tag in checksum: %1").tqarg(list[i])); } } cdata.protectedMaskNames = list; @@ -358,7 +358,7 @@ virtual void processDevice(TQDomElement device) TQString arch = device.attribute("architecture"); data()->_architecture = Architecture::fromKey(arch); - if ( data()->_architecture==Architecture::Nb_Types ) qFatal(TQString("Unrecognized architecture \"%1\"").arg(arch)); + if ( data()->_architecture==Architecture::Nb_Types ) qFatal(TQString("Unrecognized architecture \"%1\"").tqarg(arch)); if ( (data()->_architecture==Architecture::P18F && data()->_name.contains("C")) || (data()->_architecture==Architecture::P18F && data()->_name.contains("J")) ) qFatal("Not matching family"); @@ -396,7 +396,7 @@ virtual void processDevice(TQDomElement device) if ( !getVoltages(vtype, device) ) { switch (vtype.type()) { case ProgVoltageType::Vpp: - case ProgVoltageType::VddBulkErase: qFatal(TQString("Voltage \"%1\" not defined").arg(vtype.key())); + case ProgVoltageType::VddBulkErase: qFatal(TQString("Voltage \"%1\" not defined").tqarg(vtype.key())); case ProgVoltageType::VddWrite: data()->_voltages[ProgVoltageType::VddWrite] = data()->_voltages[ProgVoltageType::VddBulkErase]; break; case ProgVoltageType::Nb_Types: Q_ASSERT(false); break; } @@ -426,7 +426,7 @@ virtual void processDevice(TQDomElement device) Address start2 = data()->_ranges[i].start + data()->_ranges[i].hexFileOffset; Address end2 = data()->_ranges[i].end + data()->_ranges[i].hexFileOffset; if ( end1>=start2 && start1<=end2 ) - qFatal(TQString("Overlapping memory ranges (%1 and %2)").arg(k.key()).arg(i.key())); + qFatal(TQString("Overlapping memory ranges (%1 and %2)").tqarg(k.key()).tqarg(i.key())); } } checkTagNames(device, "memory", names); @@ -440,7 +440,7 @@ virtual void processDevice(TQDomElement device) FOR_EACH(Pic::ConfigNameType, type) { TQMap cnames; // cname -> mask name for (uint i=0; i_config->_words[i] = cwords[i]; const Config::Word &word = data()->_config->_words[i]; for (uint j=0; j_config->checkValueName(mask.name, value.name) ) - qFatal(TQString("Malformed value name \"%1\" in mask %2").arg(value.name).arg(mask.name)); + qFatal(TQString("Malformed value name \"%1\" in mask %2").tqarg(value.name).tqarg(mask.name)); } } } @@ -477,7 +477,7 @@ virtual void processDevice(TQDomElement device) const Config::Mask &mask = word.masks[j]; BitValue::const_iterator it; for (it=mask.value.begin(); it!=mask.value.end(); ++it) - if ( !hasValue(mask, *it) ) qFatal(TQString("Value %1 not defined in mask %2").arg(toHexLabel(*it, data()->nbCharsWord(MemoryRangeType::Config))).arg(mask.name)); + if ( !hasValue(mask, *it) ) qFatal(TQString("Value %1 not defined in mask %2").tqarg(toHexLabel(*it, data()->nbCharsWord(MemoryRangeType::Config))).tqarg(mask.name)); } } @@ -507,7 +507,7 @@ virtual void processDevice(TQDomElement device) } TQMap::const_iterator it; for (it=valueNames.begin(); it!=valueNames.end(); ++it) - if ( !it.key().isEmpty() && !it.data() ) qFatal(TQString("Missing checksum \"%1\"").arg(it.key())); + if ( !it.key().isEmpty() && !it.data() ) qFatal(TQString("Missing checksum \"%1\"").tqarg(it.key())); } } @@ -552,13 +552,13 @@ void processSfr(TQDomElement e) qFatal("SFR name is duplicated"); bool ok; uint address = fromHexLabel(e.attribute("address"), &ok); - if ( !ok ) qFatal(TQString("SFR %1 address %2 is malformed").arg(name).arg(e.attribute("address"))); + if ( !ok ) qFatal(TQString("SFR %1 address %2 is malformed").tqarg(name).tqarg(e.attribute("address"))); uint rlength = data()->registersData().nbBanks * data()->architecture().data().registerBankLength; - if ( address>=rlength ) qFatal(TQString("Address %1 outside register range").arg(toHexLabel(address, 3))); + if ( address>=rlength ) qFatal(TQString("Address %1 outside register range").tqarg(toHexLabel(address, 3))); RegisterData rdata; rdata.address = address; uint nb = data()->registersData().nbBits(); - if ( nb>Device::MAX_NB_PORT_BITS ) qFatal(TQString("Need higher MAX_NB_PORT_BITS: %1").arg(nb)); + if ( nb>Device::MAX_NB_PORT_BITS ) qFatal(TQString("Need higher MAX_NB_PORT_BITS: %1").tqarg(nb)); TQString access = e.attribute("access"); if ( uint(access.length())!=nb ) qFatal("access is missing or malformed"); TQString mclr = e.attribute("mclr"); @@ -569,11 +569,11 @@ void processSfr(TQDomElement e) uint k = nb - i - 1; bool ok; rdata.bits[k].properties = RegisterBitProperties(fromHex(access[i].latin1(), &ok)); - if ( !ok || rdata.bits[k].properties>MaxRegisterBitProperty ) qFatal(TQString("Malformed access bit %1").arg(k)); + if ( !ok || rdata.bits[k].properties>MaxRegisterBitProperty ) qFatal(TQString("Malformed access bit %1").tqarg(k)); rdata.bits[k].mclr = RegisterBitState(fromHex(mclr[i].latin1(), &ok)); - if ( !ok || rdata.bits[k].mclr>Nb_RegisterBitStates ) qFatal(TQString("Malformed mclr bit %1").arg(k)); + if ( !ok || rdata.bits[k].mclr>Nb_RegisterBitStates ) qFatal(TQString("Malformed mclr bit %1").tqarg(k)); rdata.bits[k].por = RegisterBitState(fromHex(por[i].latin1(), &ok)); - if ( !ok || rdata.bits[k].por>Nb_RegisterBitStates ) qFatal(TQString("Malformed por bit %1").arg(k)); + if ( !ok || rdata.bits[k].por>Nb_RegisterBitStates ) qFatal(TQString("Malformed por bit %1").tqarg(k)); } static_cast(data()->_registersData)->sfrs[name] = rdata; } @@ -587,13 +587,13 @@ void processCombined(TQDomElement e) bool ok; CombinedData rdata; rdata.address = fromHexLabel(e.attribute("address"), &ok); - if ( !ok ) qFatal(TQString("Combined %1 address %2 is malformed").arg(name).arg(e.attribute("address"))); + if ( !ok ) qFatal(TQString("Combined %1 address %2 is malformed").tqarg(name).tqarg(e.attribute("address"))); uint rlength = data()->registersData().nbBanks * data()->architecture().data().registerBankLength; - if ( rdata.address>=rlength ) qFatal(TQString("Address %1 outside register range").arg(toHexLabel(rdata.address, 3))); + if ( rdata.address>=rlength ) qFatal(TQString("Address %1 outside register range").tqarg(toHexLabel(rdata.address, 3))); rdata.nbChars = 2*e.attribute("size").toUInt(&ok); - if ( !ok || rdata.nbChars<2 ) qFatal(TQString("Combined %1 size %2 is malformed").arg(name).arg(e.attribute("size"))); + if ( !ok || rdata.nbChars<2 ) qFatal(TQString("Combined %1 size %2 is malformed").tqarg(name).tqarg(e.attribute("size"))); Address end = rdata.address + rdata.nbChars/2 - 1; - if ( end>=rlength ) qFatal(TQString("Address %1 outside register range").arg(toHexLabel(end, 3))); + if ( end>=rlength ) qFatal(TQString("Address %1 outside register range").tqarg(toHexLabel(end, 3))); static_cast(data()->_registersData)->combined[name] = rdata; } @@ -601,7 +601,7 @@ void processDeviceRegisters(TQDomElement element) { TQString s = element.attribute("same_as"); if ( !s.isEmpty() ) { - if ( !_map.contains(s) ) qFatal(TQString("Registers same as unknown device %1").arg(s)); + if ( !_map.contains(s) ) qFatal(TQString("Registers same as unknown device %1").tqarg(s)); const Pic::Data *d = static_cast(_map[s]); data()->_registersData = d->_registersData; return; @@ -629,7 +629,7 @@ void processDeviceRegisters(TQDomElement element) else if ( e.nodeName()=="unused" ) processUnused(e); else if ( e.nodeName()=="combined" ) processCombined(e); else if ( e.nodeName()=="sfr" ) processSfr(e); - else qFatal(TQString("Node name \"%1\" is not recognized").arg(e.nodeName())); + else qFatal(TQString("Node name \"%1\" is not recognized").tqarg(e.nodeName())); child = child.nextSibling(); } @@ -640,11 +640,11 @@ void processDeviceRegisters(TQDomElement element) TQString trisname = rdata.trisName(i); if ( trisname.isEmpty() ) continue; bool hasTris = rdata.sfrs.contains(trisname); - if ( !hasPort && hasTris ) qFatal(TQString("%1 needs %2 to be present").arg(trisname).arg(portname)); + if ( !hasPort && hasTris ) qFatal(TQString("%1 needs %2 to be present").tqarg(trisname).tqarg(portname)); TQString latchname = rdata.latchName(i); if ( latchname.isEmpty() ) continue; bool hasLatch = rdata.sfrs.contains(latchname); - if ( !hasPort && hasLatch ) qFatal(TQString("%1 needs %2 to be present").arg(latchname).arg(portname)); + if ( !hasPort && hasLatch ) qFatal(TQString("%1 needs %2 to be present").tqarg(latchname).tqarg(portname)); } } @@ -660,7 +660,7 @@ void processRegistersFile(const TQString &filename, TQStringList &devices) if ( child.nodeName()!="device" ) qFatal("Device node should be named \"device\""); TQDomElement device = child.toElement(); TQString name = device.attribute("name"); - if ( devices.contains(name) ) qFatal(TQString("Registers already defined for %1").arg(name)); + if ( devices.contains(name) ) qFatal(TQString("Registers already defined for %1").tqarg(name)); if ( _map.contains(name) ) { _data = _map[name]; processDeviceRegisters(device); @@ -691,7 +691,7 @@ virtual void checkPins(const TQMap &pinLabels) const TQMap::const_iterator it; for (it=pinLabels.begin(); it!=pinLabels.end(); ++it) { if ( it.key()=="VDD" || it.key()=="VSS" || it.key().startsWith("CCP") ) continue; - if ( it.data()!=1 ) qFatal(TQString("Duplicated pin \"%1\"").arg(it.key())); + if ( it.data()!=1 ) qFatal(TQString("Duplicated pin \"%1\"").tqarg(it.key())); } const Pic::RegistersData &rdata = static_cast(*_data->registersData()); for (uint i=0; i &pinLabels) const for (uint k=0; k +#include #include #include diff --git a/src/libgui/config_center.cpp b/src/libgui/config_center.cpp index f20959b..e91a956 100644 --- a/src/libgui/config_center.cpp +++ b/src/libgui/config_center.cpp @@ -10,7 +10,7 @@ #include "config_center.h" #include -#include +#include #include #include #include diff --git a/src/libgui/config_gen.cpp b/src/libgui/config_gen.cpp index 68bd865..01dc06b 100644 --- a/src/libgui/config_gen.cpp +++ b/src/libgui/config_gen.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "config_gen.h" -#include +#include #include #include diff --git a/src/libgui/console.cpp b/src/libgui/console.cpp index 741fd3a..b2e30d7 100644 --- a/src/libgui/console.cpp +++ b/src/libgui/console.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "console.h" -#include +#include #include #include #include diff --git a/src/libgui/device_editor.cpp b/src/libgui/device_editor.cpp index c48ffb2..9b3b852 100644 --- a/src/libgui/device_editor.cpp +++ b/src/libgui/device_editor.cpp @@ -63,7 +63,7 @@ void DeviceEditor::setDevice(bool force) if ( name==Device::AUTO_DATA.name ) _labelDevice->setText(i18n("The target device is not configured and cannot be guessed from source file. " "The source file either cannot be found or does not contain any processor directive.")); - else _labelDevice->setText(i18n("Device guessed from file: %1").arg(name)); + else _labelDevice->setText(i18n("Device guessed from file: %1").tqarg(name)); _labelDevice->show(); } else { if ( !force && Main::device()==_device ) return; @@ -71,7 +71,7 @@ void DeviceEditor::setDevice(bool force) _labelDevice->hide(); } if ( _view && isModified() ) { - if ( MessageBox::questionYesNo(i18n("File %1 not saved.").arg(filename()), KStdGuiItem::save(), KStdGuiItem::discard()) ) + if ( MessageBox::questionYesNo(i18n("File %1 not saved.").tqarg(filename()), KStdGuiItem::save(), KStdGuiItem::discard()) ) Editor::save(); } _labelWarning->hide(); diff --git a/src/libgui/device_gui.cpp b/src/libgui/device_gui.cpp index a064752..bb91cea 100644 --- a/src/libgui/device_gui.cpp +++ b/src/libgui/device_gui.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "device_gui.h" -#include +#include #include #include #include @@ -147,7 +147,7 @@ DeviceChooser::Dialog::Dialog(const TQString &device, Type type, TQWidget *paren shbox = new TQHBoxLayout(vbox); // status filter - _statusCombo = new EnumComboBox(i18n(""), "status", frame); + _statusCombo = new EnumComboBox(i18n(""), "status", frame); connect(_statusCombo->combo(), TQT_SIGNAL(activated(int)), TQT_SLOT(updateList())); shbox->addWidget(_statusCombo->combo()); @@ -260,12 +260,12 @@ void DeviceChooser::Dialog::updateList(const TQString &device) TQListViewItem *selected = 0; const Programmer::Group *pgroup = programmerGroup(); if ( pgroup && pgroup->supportedDevices().isEmpty() && pgroup->isSoftware() ) { - _deviceView->setText(i18n("Could not detect supported devices for \"%1\". Please check installation.").arg(pgroup->label())); + _deviceView->setText(i18n("Could not detect supported devices for \"%1\". Please check installation.").tqarg(pgroup->label())); return; } const Tool::Group *tgroup = toolGroup(); if ( tgroup && tgroup->supportedDevices().isEmpty() ) { - _deviceView->setText(i18n("Could not detect supported devices for toolchain \"%1\". Please check installation.").arg(tgroup->label())); + _deviceView->setText(i18n("Could not detect supported devices for toolchain \"%1\". Please check installation.").tqarg(tgroup->label())); return; } for (int i=list.count()-1; i>=0; i--) { @@ -274,7 +274,7 @@ void DeviceChooser::Dialog::updateList(const TQString &device) const Device::Data *data = Device::lister().data(list[i]); Q_ASSERT(data); if ( _memoryCombo->value()!=Device::MemoryTechnology::Nb_Types && data->memoryTechnology()!=_memoryCombo->value() ) continue; - if ( _statusCombo->value()!=Device::Status::Nb_Types && data->status()!=_statusCombo->value() ) continue; + if ( _statusCombo->value()!=Device::tqStatus::Nb_Types && data->status()!=_statusCombo->value() ) continue; if ( _featureCombo->value()!=Pic::Feature::Nb_Types ) { if ( data->group().name()!="pic" ) continue; if ( !static_cast(data)->hasFeature(_featureCombo->value()) ) continue; diff --git a/src/libgui/device_gui.h b/src/libgui/device_gui.h index ae63dfa..de28bbf 100644 --- a/src/libgui/device_gui.h +++ b/src/libgui/device_gui.h @@ -10,7 +10,7 @@ #define DEVICE_GUI_H #include -#include +#include #include class TQListViewItem; class TQCheckBox; @@ -105,7 +105,7 @@ private: KeyComboBox *_programmerCombo, *_toolCombo; EnumComboBox *_listTypeCombo; EnumComboBox *_memoryCombo; - EnumComboBox *_statusCombo; + EnumComboBox *_statusCombo; EnumComboBox *_featureCombo; KListView *_listView; View *_deviceView; diff --git a/src/libgui/editor.cpp b/src/libgui/editor.cpp index e5cea2e..2999b1e 100644 --- a/src/libgui/editor.cpp +++ b/src/libgui/editor.cpp @@ -77,7 +77,7 @@ TQString Editor::filename() const bool Editor::checkSaved() { if ( !isModified() ) return true; - MessageBox::Result res = MessageBox::questionYesNoCancel(i18n("File %1 not saved.").arg(filename()), + MessageBox::Result res = MessageBox::questionYesNoCancel(i18n("File %1 not saved.").tqarg(filename()), KStdGuiItem::save(), KStdGuiItem::discard()); if ( res==MessageBox::Cancel ) return false; if ( res==MessageBox::Yes ) save(); diff --git a/src/libgui/editor.h b/src/libgui/editor.h index a08d7a4..0c80b07 100644 --- a/src/libgui/editor.h +++ b/src/libgui/editor.h @@ -10,7 +10,7 @@ #define EDITOR_H #include -#include +#include #include #include "common/common/qflags.h" #include diff --git a/src/libgui/editor_manager.cpp b/src/libgui/editor_manager.cpp index 8713c9e..5c9c193 100644 --- a/src/libgui/editor_manager.cpp +++ b/src/libgui/editor_manager.cpp @@ -106,7 +106,7 @@ bool EditorManager::openFile(const PURL::Url &url) if ( url.isEmpty() ) return false; Editor *e = findEditor(url); if (e) { // document already loaded - if ( !MessageBox::askContinue(i18n("File \"%1\" already loaded. Reload?").arg(url.kurl().prettyURL()), + if ( !MessageBox::askContinue(i18n("File \"%1\" already loaded. Reload?").tqarg(url.kurl().prettyURL()), i18n("Warning"), i18n("Reload")) ) return true; if ( !e->slotLoad() ) { closeEditor(e, false); @@ -439,7 +439,7 @@ void EditorManager::switchToEditor() SwitchToDialog dialog(names, this); if ( dialog.exec()!=TQDialog::Accepted ) return; for (uint i=0; i #include #include -#include +#include #include #include #include @@ -99,7 +99,7 @@ bool HexEditor::simpleLoad() TQStringList warnings; if ( _memory->fromHexBuffer(_hexBuffer, warnings)!=Device::Memory::NoWarning ) { _labelWarning->setText(i18n("Warning: hex file seems to be incompatible with the selected device %1:
%2") - .arg(_memory->device().name()).arg(warnings.join("
"))); + .tqarg(_memory->device().name()).tqarg(warnings.join("
"))); _labelWarning->show(); } else _labelWarning->hide(); display(); @@ -139,7 +139,7 @@ bool HexEditor::open(const PURL::Url &url) bool HexEditor::save(const PURL::Url &url) { - return save(url, i18n("File URL: \"%1\".").arg(url.pretty())); + return save(url, i18n("File URL: \"%1\".").tqarg(url.pretty())); } bool HexEditor::save(const PURL::Url &url, const TQString &fileErrorString) @@ -147,7 +147,7 @@ bool HexEditor::save(const PURL::Url &url, const TQString &fileErrorString) PURL::File file(url, Main::compileLog()); if ( !file.openForWrite() ) return false; if ( !_memory->save(file.stream(), HexBuffer::IHX32) ) { - MessageBox::detailedSorry(i18n("Error while writing file \"%1\".").arg(url.pretty()), fileErrorString, Log::Show); + MessageBox::detailedSorry(i18n("Error while writing file \"%1\".").tqarg(url.pretty()), fileErrorString, Log::Show); return false; } _originalMemory->copyFrom(*_memory); @@ -186,7 +186,7 @@ void HexEditor::statusChanged() TQString s; if (_memory) { BitValue cs = static_cast(_view)->checksum(); - s = i18n("Checksum: %1").arg(toHexLabel(cs, 4)); + s = i18n("Checksum: %1").tqarg(toHexLabel(cs, 4)); } emit statusTextChanged(s); } diff --git a/src/libgui/likeback.cpp b/src/libgui/likeback.cpp index b376c8e..21ee759 100644 --- a/src/libgui/likeback.cpp +++ b/src/libgui/likeback.cpp @@ -26,12 +26,12 @@ #include #include #include -#include +#include #include #include #include -#include -#include +#include +#include #include #include #include @@ -55,7 +55,7 @@ LikeBack::LikeBack(Button buttons) : TQWidget( 0, "LikeBack", TQt::WX11BypassWM | TQt::WStyle_NoBorder | TQt::WNoAutoErase | TQt::WStyle_StaysOnTop | TQt::WStyle_NoBorder | TQt::TQt::WGroupLeader) , m_buttons(buttons) { - TQHBoxLayout *layout = new TQHBoxLayout(this); + TQHBoxLayout *tqlayout = new TQHBoxLayout(this); TQIconSet likeIconSet = kapp->iconLoader()->loadIconSet("likeback_like", KIcon::Small); TQIconSet dislikeIconSet = kapp->iconLoader()->loadIconSet("likeback_dislike", KIcon::Small); @@ -67,21 +67,21 @@ LikeBack::LikeBack(Button buttons) m_likeButton->setTextLabel(i18n("I Like...")); m_likeButton->setAutoRaise(true); connect( m_likeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(iLike()) ); - layout->add(m_likeButton); + tqlayout->add(m_likeButton); TQToolButton *m_dislikeButton = new TQToolButton(this, "idonotlike"); m_dislikeButton->setIconSet(dislikeIconSet); m_dislikeButton->setTextLabel(i18n("I Do not Like...")); m_dislikeButton->setAutoRaise(true); connect( m_dislikeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(iDoNotLike()) ); - layout->add(m_dislikeButton); + tqlayout->add(m_dislikeButton); TQToolButton *m_bugButton = new TQToolButton(this, "ifoundabug"); m_bugButton->setIconSet(bugIconSet); m_bugButton->setTextLabel(i18n("I Found a Bug...")); m_bugButton->setAutoRaise(true); connect( m_bugButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(iFoundABug()) ); - layout->add(m_bugButton); + tqlayout->add(m_bugButton); m_configureButton = new TQToolButton(this, "configure"); TQIconSet helpIconSet = kapp->iconLoader()->loadIconSet("help", KIcon::Small); @@ -89,7 +89,7 @@ LikeBack::LikeBack(Button buttons) m_configureButton->setTextLabel(i18n("Configure...")); m_configureButton->setAutoRaise(true); connect( m_likeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(configure()) ); - layout->add(m_configureButton); + tqlayout->add(m_configureButton); TQPopupMenu *configureMenu = new TQPopupMenu(this); configureMenu->insertItem(helpIconSet, i18n("What's &This?"), this , TQT_SLOT(showWhatsThisMessage()) ); @@ -110,7 +110,7 @@ LikeBack::LikeBack(Button buttons) // KMessageBox::saveDontShowAgainContinue(messageShown); // } - resize(sizeHint()); + resize(tqsizeHint()); connect( &m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(autoMove()) ); m_timer.start(10); @@ -171,7 +171,7 @@ void LikeBack::showInformationMessage() TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_dislike", dislikeIcon); TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_bug", bugIcon); KMessageBox::information(0, - "

" + i18n("This is a quick feedback system for %1.").arg(s_about->programName()) + "

" + "

" + i18n("This is a quick feedback system for %1.").tqarg(s_about->programName()) + "

" "

" + i18n("To help us improve it, your comments are important.") + "

" "

" + i18n("Each time you have a great or frustrating experience, " "please click the appropriate hand below the window title-bar, " @@ -452,7 +452,7 @@ void LikeBack::init(bool isDevelopmentVersion, Button buttons) if (m_process) return; m_process = new KProcess(); - *m_process << TQString::fromLatin1("kcmshell") << TQString::fromLatin1("kcm_useraccount"); + *m_process << TQString::tqfromLatin1("kcmshell") << TQString::tqfromLatin1("kcm_useraccount"); connect( m_process, TQT_SIGNAL(processExited(KProcess*)), TQT_SLOT(endFetchingEmailFrom()) ); if (!m_process->start()) { kdDebug() << "Couldn't start kcmshell.." << endl; @@ -473,23 +473,23 @@ void LikeBack::endFetchingEmailFrom() // m_configureEmail->setEnabled(true); // ### KDE4: why oh why is KEmailSettings in kio? - KConfig emailConf( TQString::fromLatin1("emaildefaults") ); + KConfig emailConf( TQString::tqfromLatin1("emaildefaults") ); // find out the default profile - emailConf.setGroup(TQString::fromLatin1("Defaults")); - TQString profile = TQString::fromLatin1("PROFILE_"); - profile += emailConf.readEntry(TQString::fromLatin1("Profile"), TQString::fromLatin1("Default")); + emailConf.setGroup(TQString::tqfromLatin1("Defaults")); + TQString profile = TQString::tqfromLatin1("PROFILE_"); + profile += emailConf.readEntry(TQString::tqfromLatin1("Profile"), TQString::tqfromLatin1("Default")); emailConf.setGroup(profile); - TQString fromaddr = emailConf.readEntry(TQString::fromLatin1("EmailAddress")); + TQString fromaddr = emailConf.readEntry(TQString::tqfromLatin1("EmailAddress")); if (fromaddr.isEmpty()) { struct passwd *p; p = getpwuid(getuid()); - m_fetchedEmail = TQString::fromLatin1(p->pw_name); + m_fetchedEmail = TQString::tqfromLatin1(p->pw_name); } else { - TQString name = emailConf.readEntry(TQString::fromLatin1("FullName")); + TQString name = emailConf.readEntry(TQString::tqfromLatin1("FullName")); if (!name.isEmpty()) - m_fetchedEmail = /*name + TQString::fromLatin1(" <") +*/ fromaddr /*+ TQString::fromLatin1(">")*/; + m_fetchedEmail = /*name + TQString::tqfromLatin1(" <") +*/ fromaddr /*+ TQString::tqfromLatin1(">")*/; } // m_from->setText( fromaddr ); } @@ -580,7 +580,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, TQString windowName, TQS m_comment = new TQTextEdit(coloredWidget); TQIconSet sendIconSet = kapp->iconLoader()->loadIconSet("mail_send", KIcon::Toolbar); m_sendButton = new TQPushButton(sendIconSet, i18n("Send"), coloredWidget); - m_sendButton->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding); + m_sendButton->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding); m_sendButton->setEnabled(false); connect( m_sendButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(send()) ); connect( m_comment, TQT_SIGNAL(textChanged()), this, TQT_SLOT(commentChanged()) ); @@ -607,7 +607,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, TQString windowName, TQS resize(kapp->desktop()->width() / 2, kapp->desktop()->height() / 3); setCaption(kapp->makeStdCaption(i18n("Send a Comment"))); - // setMinimumSize(mainLayout->sizeHint()); // FIXME: Doesn't work! + // setMinimumSize(mainLayout->tqsizeHint()); // FIXME: Doesn't work! } LikeBackDialog::~LikeBackDialog() diff --git a/src/libgui/log_view.cpp b/src/libgui/log_view.cpp index cdb92f2..2442bc3 100644 --- a/src/libgui/log_view.cpp +++ b/src/libgui/log_view.cpp @@ -48,7 +48,7 @@ void Log::Widget::doLog(DebugLevel level, const TQString &text, Action action) void Log::Widget::doLog(const TQString &text, const TQString &color, bool bold, Action action) { logExtra(text + "\n"); - TQString s = TQString("").arg(color); + TQString s = TQString("").tqarg(color); if (bold) s += ""; s += escapeXml(text); if (bold) s += ""; diff --git a/src/libgui/log_view.h b/src/libgui/log_view.h index 963649b..5f0fa44 100644 --- a/src/libgui/log_view.h +++ b/src/libgui/log_view.h @@ -9,7 +9,7 @@ #ifndef LOG_VIEW_H #define LOG_VIEW_H -#include +#include #include "common/global/log.h" namespace Log diff --git a/src/libgui/new_dialogs.h b/src/libgui/new_dialogs.h index 494f915..dd71f67 100644 --- a/src/libgui/new_dialogs.h +++ b/src/libgui/new_dialogs.h @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include "common/global/purl.h" diff --git a/src/libgui/object_view.cpp b/src/libgui/object_view.cpp index 1854b8a..fa5239d 100644 --- a/src/libgui/object_view.cpp +++ b/src/libgui/object_view.cpp @@ -123,7 +123,7 @@ bool DisassemblyEditor::open(const PURL::Url &url) Device::Memory *memory = 0; if ( _editor==0 ) { - log(Log::LineType::Information, i18n("Disassembling hex file: %1").arg(_source.pretty())); + log(Log::LineType::Information, i18n("Disassembling hex file: %1").tqarg(_source.pretty())); PURL::File file(_source, Main::compileLog()); if ( !file.openForRead() ) return false; memory = _device.group().createMemory(_device); diff --git a/src/libgui/project.cpp b/src/libgui/project.cpp index c7a043f..8ece518 100644 --- a/src/libgui/project.cpp +++ b/src/libgui/project.cpp @@ -21,7 +21,7 @@ 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; diff --git a/src/libgui/project_editor.cpp b/src/libgui/project_editor.cpp index a4d5649..331bb55 100644 --- a/src/libgui/project_editor.cpp +++ b/src/libgui/project_editor.cpp @@ -10,7 +10,7 @@ #include "project_editor.h" #include -#include +#include #include #include "project.h" diff --git a/src/libgui/project_editor.h b/src/libgui/project_editor.h index 9526b5d..ce08aca 100644 --- a/src/libgui/project_editor.h +++ b/src/libgui/project_editor.h @@ -17,7 +17,7 @@ #ifndef PROJECT_EDITOR_H #define PROJECT_EDITOR_H -#include +#include #include #include #include diff --git a/src/libgui/project_manager.cpp b/src/libgui/project_manager.cpp index c9eabc1..ce58146 100644 --- a/src/libgui/project_manager.cpp +++ b/src/libgui/project_manager.cpp @@ -242,7 +242,7 @@ void ProjectManager::View::closeProject() _project->setWatchedRegisters(Register::list().watched()); TQString error; if ( !_project->save(error) ) - MessageBox::detailedSorry(i18n("Could not save project file \"%1\".").arg(_project->url().pretty()), error, Log::Show); + MessageBox::detailedSorry(i18n("Could not save project file \"%1\".").tqarg(_project->url().pretty()), error, Log::Show); delete _project; _project = 0; } @@ -304,25 +304,25 @@ void ProjectManager::View::insertObjectFiles() void ProjectManager::View::insertFile(const PURL::Url &url) { if ( !url.exists() ) { - MessageBox::detailedSorry(i18n("Could not find file."), i18n("File: %1").arg(url.pretty()), Log::Show); + MessageBox::detailedSorry(i18n("Could not find file."), i18n("File: %1").tqarg(url.pretty()), Log::Show); return; } PURL::Url purl = url; MessageBox::Result copy = MessageBox::No; if ( !url.isInto(_project->directory()) ) { - copy = MessageBox::questionYesNoCancel(i18n("File \"%1\" is not inside the project directory. Do you want to copy the file to your project directory?").arg(url.pretty()), + copy = MessageBox::questionYesNoCancel(i18n("File \"%1\" is not inside the project directory. Do you want to copy the file to your project directory?").tqarg(url.pretty()), i18n("Copy and Add"), i18n("Add only")); if ( copy==MessageBox::Cancel ) return; if ( copy==MessageBox::Yes ) purl = PURL::Url(_project->directory(), url.filename()); } if ( _project->absoluteFiles().contains(purl) ) { - MessageBox::detailedSorry(i18n("File is already in the project."), i18n("File: %1").arg(purl.pretty()), Log::Show); + MessageBox::detailedSorry(i18n("File is already in the project."), i18n("File: %1").tqarg(purl.pretty()), Log::Show); return; } if ( copy==MessageBox::Yes ) { Log::StringView sview; if ( !url.copyTo(purl, sview) ) { - MessageBox::detailedSorry(i18n("Copying file to project directory failed."), i18n("File: %1\n").arg(url.pretty()) + sview.string(), Log::Show); + MessageBox::detailedSorry(i18n("Copying file to project directory failed."), i18n("File: %1\n").tqarg(url.pretty()) + sview.string(), Log::Show); return; } } diff --git a/src/libgui/project_wizard.cpp b/src/libgui/project_wizard.cpp index 15fe174..78fcd49 100644 --- a/src/libgui/project_wizard.cpp +++ b/src/libgui/project_wizard.cpp @@ -36,7 +36,7 @@ FileListItem::FileListItem(KListView *view) void FileListItem::toggle() { _copy = !_copy; - repaint(); + tqrepaint(); } PURL::FileGroup FileListItem::fileGroup() const @@ -76,7 +76,7 @@ FileListBox::FileListBox(TQWidget *parent) _listView->header()->setResizeEnabled(false); _listView->header()->setMovingEnabled(false); _listView->setColumnText(0, i18n("Copy")); - int spacing = tqstyle().pixelMetric(TQStyle::PM_HeaderMargin); + int spacing = tqstyle().tqpixelMetric(TQStyle::PM_HeaderMargin); TQFontMetrics fm(font()); _listView->header()->resizeSection(0, fm.width(i18n("Copy")) + 2*spacing); // hack _listView->setColumnText(1, i18n("Filename")); @@ -184,7 +184,7 @@ void ProjectWizard::next() return; } } else if ( url().exists() ) { - if ( !MessageBox::askContinue(i18n("Project \"%1\"already exists. Overwrite it?").arg(url().filename())) ) return; + if ( !MessageBox::askContinue(i18n("Project \"%1\"already exists. Overwrite it?").tqarg(url().filename())) ) return; } if ( !toolchain().check(device(), &Main::compileLog()) ) return; _files->setDirectory(_directory->directory()); @@ -203,7 +203,7 @@ void ProjectWizard::next() for (uint i=0; i<_files->count(); i++) if ( static_cast(_files->item(i))->fileGroup()==PURL::Source ) nb++; if ( toolchain().compileType()==Tool::SingleFile && nb>1 ) { - if ( !MessageBox::askContinue(i18n("The selected toolchain can only compile a single source file and you have selected %1 source files. Continue anyway? ").arg(nb)) ) return; + if ( !MessageBox::askContinue(i18n("The selected toolchain can only compile a single source file and you have selected %1 source files. Continue anyway? ").tqarg(nb)) ) return; } } KWizard::next(); @@ -243,7 +243,7 @@ void ProjectWizard::done(int r) } Log::StringView sview; if ( turl.write(text, sview) ) files += turl; - else MessageBox::detailedSorry(i18n("Error creating template file."), i18n("File: %1\n").arg(turl.pretty()) + sview.string(), Log::Show); + else MessageBox::detailedSorry(i18n("Error creating template file."), i18n("File: %1\n").tqarg(turl.pretty()) + sview.string(), Log::Show); _project->setOpenedFiles(files); } else { Log::StringView sview; diff --git a/src/libgui/register_view.cpp b/src/libgui/register_view.cpp index 4c96b0b..4f2aaff 100644 --- a/src/libgui/register_view.cpp +++ b/src/libgui/register_view.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "register_view.h" -#include +#include #include #include #include diff --git a/src/libgui/text_editor.cpp b/src/libgui/text_editor.cpp index bd2c026..e7f0382 100644 --- a/src/libgui/text_editor.cpp +++ b/src/libgui/text_editor.cpp @@ -10,8 +10,8 @@ #include "text_editor.h" #include -#include -#include +#include +#include #include #include @@ -96,7 +96,7 @@ void TextEditor::addView() connect(v, TQT_SIGNAL(gotFocus(Kate::View *)), TQT_SLOT(gotFocus(Kate::View *))); connect(v, TQT_SIGNAL(cursorPositionChanged()), TQT_SLOT(statusChanged())); connect(v, TQT_SIGNAL(dropEventPass(TQDropEvent *)), TQT_SIGNAL(dropEventPass(TQDropEvent *))); - connect(v, TQT_SIGNAL(newStatus()), TQT_SLOT(statusChanged())); + connect(v, TQT_SIGNAL(newtqStatus()), TQT_SLOT(statusChanged())); v->show(); v->setFocus(); v->child(0, "KateViewInternal")->installEventFilter(this); @@ -167,7 +167,7 @@ void TextEditor::statusChanged() { uint line, col; _view->cursorPosition(&line, &col) ; - TQString text = i18n("Line: %1 Col: %2").arg(line+1).arg(col+1); + TQString text = i18n("Line: %1 Col: %2").tqarg(line+1).tqarg(col+1); if( isReadOnly() ) text += " " + i18n("R/O"); emit statusTextChanged(" " + text + " "); if ( isReadOnly()!=_oldReadOnly || isModified()!=_oldModified ) emit guiChanged(); diff --git a/src/libgui/toplevel.cpp b/src/libgui/toplevel.cpp index 7a8522b..f087a4a 100644 --- a/src/libgui/toplevel.cpp +++ b/src/libgui/toplevel.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include #include @@ -91,23 +91,23 @@ MainWindow::MainWindow() Main::_toplevel = this; // status bar - _actionStatus = new TQLabel(statusBar()); - statusBar()->addWidget(_actionStatus); + _actiontqStatus = new TQLabel(statusBar()); + statusBar()->addWidget(_actiontqStatus); _actionProgress = new TQProgressBar(statusBar()); statusBar()->addWidget(_actionProgress); - _debugStatus = new TQLabel(statusBar()); - statusBar()->addWidget(_debugStatus, 0, true); - _editorStatus = new TQLabel(statusBar()); - statusBar()->addWidget(_editorStatus, 0, true); - _programmerStatus = new ProgrammerStatusWidget(statusBar()); - connect(_programmerStatus, TQT_SIGNAL(configure()), TQT_SLOT(configureProgrammer())); - connect(_programmerStatus, TQT_SIGNAL(selected(const Programmer::Group &)), TQT_SLOT(selectProgrammer(const Programmer::Group &))); - statusBar()->addWidget(_programmerStatus->widget(), 0, true); - _toolStatus = new ToolStatusWidget(statusBar()); - connect(_toolStatus, TQT_SIGNAL(configureToolchain()), TQT_SLOT(configureToolchains())); - connect(_toolStatus, TQT_SIGNAL(configure()), TQT_SLOT(configureProject())); - connect(_toolStatus, TQT_SIGNAL(selected(const Tool::Group &)), TQT_SLOT(selectTool(const Tool::Group &))); - statusBar()->addWidget(_toolStatus->widget(), 0, true); + _debugtqStatus = new TQLabel(statusBar()); + statusBar()->addWidget(_debugtqStatus, 0, true); + _editortqStatus = new TQLabel(statusBar()); + statusBar()->addWidget(_editortqStatus, 0, true); + _programmertqStatus = new ProgrammerStatusWidget(statusBar()); + connect(_programmertqStatus, TQT_SIGNAL(configure()), TQT_SLOT(configureProgrammer())); + connect(_programmertqStatus, TQT_SIGNAL(selected(const Programmer::Group &)), TQT_SLOT(selectProgrammer(const Programmer::Group &))); + statusBar()->addWidget(_programmertqStatus->widget(), 0, true); + _tooltqStatus = new ToolStatusWidget(statusBar()); + connect(_tooltqStatus, TQT_SIGNAL(configureToolchain()), TQT_SLOT(configureToolchains())); + connect(_tooltqStatus, TQT_SIGNAL(configure()), TQT_SLOT(configureProject())); + connect(_tooltqStatus, TQT_SIGNAL(selected(const Tool::Group &)), TQT_SLOT(selectTool(const Tool::Group &))); + statusBar()->addWidget(_tooltqStatus->widget(), 0, true); // interface _mainDock = createDockWidget("main_dock_widget", TQPixmap()); @@ -132,7 +132,7 @@ MainWindow::MainWindow() _mainDock->setWidget(Main::_editorManager); connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(guiChanged()), TQT_SLOT(updateGUI())); connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(modified(const PURL::Url &)), TQT_TQOBJECT(Main::_projectManager), TQT_SLOT(modified(const PURL::Url &))); - connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(statusChanged(const TQString &)), _editorStatus, TQT_SLOT(setText(const TQString &))); + connect(TQT_TQOBJECT(Main::_editorManager), TQT_SIGNAL(statusChanged(const TQString &)), _editortqStatus, TQT_SLOT(setText(const TQString &))); dock = createDock("compile_log_dock_widget", loader.loadIcon("piklab_compile", KIcon::Small), i18n("Compile Log"), DockPosition(KDockWidget::DockBottom, 80)); @@ -160,15 +160,15 @@ MainWindow::MainWindow() // managers Programmer::manager = new Programmer::GuiManager(TQT_TQOBJECT(this)); Programmer::manager->setView(_programLog); - connect(Programmer::manager, TQT_SIGNAL(actionMessage(const TQString &)), _actionStatus, TQT_SLOT(setText(const TQString &))); + connect(Programmer::manager, TQT_SIGNAL(actionMessage(const TQString &)), _actiontqStatus, TQT_SLOT(setText(const TQString &))); connect(Programmer::manager, TQT_SIGNAL(showProgress(bool)), TQT_SLOT(showProgress(bool))); connect(Programmer::manager, TQT_SIGNAL(setTotalProgress(uint)), TQT_SLOT(setTotalProgress(uint))); connect(Programmer::manager, TQT_SIGNAL(setProgress(uint)), TQT_SLOT(setProgress(uint))); Debugger::manager = new Debugger::GuiManager; connect(Debugger::manager, TQT_SIGNAL(targetStateChanged()), TQT_SLOT(updateGUI())); - connect(Debugger::manager, TQT_SIGNAL(statusChanged(const TQString &)), _debugStatus, TQT_SLOT(setText(const TQString &))); - connect(Debugger::manager, TQT_SIGNAL(actionMessage(const TQString &)), _actionStatus, TQT_SLOT(setText(const TQString &))); + connect(Debugger::manager, TQT_SIGNAL(statusChanged(const TQString &)), _debugtqStatus, TQT_SLOT(setText(const TQString &))); + connect(Debugger::manager, TQT_SIGNAL(actionMessage(const TQString &)), _actiontqStatus, TQT_SLOT(setText(const TQString &))); Main::_compileManager = new Compile::Manager(TQT_TQOBJECT(this)); Main::_compileManager->setView(Main::_compileLog); @@ -570,7 +570,7 @@ void MainWindow::updateGUI() showProgress(false); break; case Main::Compiling: - _actionStatus->setText(Main::_compileManager->label()); + _actiontqStatus->setText(Main::_compileManager->label()); showProgress(true); makeWidgetDockVisible(Main::_compileLog); break; @@ -618,7 +618,7 @@ void MainWindow::updateGUI() Main::action("project_add_current_file")->setEnabled(Main::project() && !inProject && idle && isSource); // update build actions - static_cast(_toolStatus->widget())->setText(" " + Main::toolGroup().label() + " "); + static_cast(_tooltqStatus->widget())->setText(" " + Main::toolGroup().label() + " "); bool hexProject = ( Main::_projectManager->projectUrl().fileType()==PURL::Hex ); bool customTool = Main::toolGroup().isCustom(); Main::action("build_build_project")->setEnabled((Main::project() || (inProject && !hexProject) ) && idle); @@ -630,11 +630,11 @@ void MainWindow::updateGUI() // update programmer status PortType ptype = Programmer::GroupConfig::portType(Main::programmerGroup()); - static_cast(_programmerStatus->widget())->setText(" " + Main::programmerGroup().statusLabel(ptype) + " "); + static_cast(_programmertqStatus->widget())->setText(" " + Main::programmerGroup().statusLabel(ptype) + " "); TQFont f = font(); bool supported = (Main::deviceData() ? Main::programmerGroup().isSupported(Main::deviceData()->name()) : false); f.setItalic(!supported); - _programmerStatus->widget()->setFont(f); + _programmertqStatus->widget()->setFont(f); bool isProgrammer = ( Main::programmerGroup().properties() & ::Programmer::Programmer ); PURL::Url purl = Main::_projectManager->projectUrl(); bool hasHex = ( currentType==PURL::Hex || Main::_projectManager->contains(purl.toFileType(PURL::Hex)) ); @@ -728,7 +728,7 @@ void MainWindow::runPikloops() _pikloopsProcess->setup("pikloops", TQStringList(), false); connect(_pikloopsProcess, TQT_SIGNAL(done(int)), TQT_SLOT(pikloopsDone())); if ( !_pikloopsProcess->start(0) ) - MessageBox::detailedSorry(i18n("Could not run \"pikloops\""), i18n("The Pikloops utility (%1) is not installed in your system.").arg("http://pikloops.sourceforge.net"), Log::Show); + MessageBox::detailedSorry(i18n("Could not run \"pikloops\""), i18n("The Pikloops utility (%1) is not installed in your system.").tqarg("http://pikloops.sourceforge.net"), Log::Show); } void MainWindow::pikloopsDone() @@ -965,11 +965,11 @@ void MainWindow::showProgress(bool show) { if (show) { PBusyCursor::start(); - _actionStatus->show(); + _actiontqStatus->show(); _actionProgress->show(); } else { PBusyCursor::stop(); - _actionStatus->hide(); + _actiontqStatus->hide(); _actionProgress->hide(); } } diff --git a/src/libgui/toplevel.h b/src/libgui/toplevel.h index a3c6306..f7ef383 100644 --- a/src/libgui/toplevel.h +++ b/src/libgui/toplevel.h @@ -93,9 +93,9 @@ signals: private: Log::Widget *_programLog; - TQLabel *_actionStatus, *_debugStatus, *_editorStatus; - ProgrammerStatusWidget *_programmerStatus; - ToolStatusWidget *_toolStatus; + TQLabel *_actiontqStatus, *_debugtqStatus, *_editortqStatus; + ProgrammerStatusWidget *_programmertqStatus; + ToolStatusWidget *_tooltqStatus; TQProgressBar *_actionProgress; ConfigGenerator *_configGenerator; ::Process::Base *_pikloopsProcess, *_kfindProcess; diff --git a/src/libgui/toplevel_ui.cpp b/src/libgui/toplevel_ui.cpp index 83a92c4..51abeab 100644 --- a/src/libgui/toplevel_ui.cpp +++ b/src/libgui/toplevel_ui.cpp @@ -65,7 +65,7 @@ MenuBarButton::MenuBarButton(const TQString &icon, TQWidget *parent) : TQToolButton(parent, "menu_bar_button") { TQFontMetrics fm(font()); - int h = fm.height() + 2*tqstyle().pixelMetric(TQStyle::PM_DefaultFrameWidth, this); + int h = fm.height() + 2*tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth, this); setFixedHeight(h); KIconLoader loader; setIconSet(loader.loadIconSet(icon, KIcon::Small, fm.height()-2)); @@ -73,7 +73,7 @@ MenuBarButton::MenuBarButton(const TQString &icon, TQWidget *parent) setAutoRaise(true); } -TQSize MenuBarButton::sizeHint() const +TQSize MenuBarButton::tqsizeHint() const { - return TQSize(TQToolButton::sizeHint().width(), height()); + return TQSize(TQToolButton::tqsizeHint().width(), height()); } diff --git a/src/libgui/toplevel_ui.h b/src/libgui/toplevel_ui.h index 77ae7fc..651809c 100644 --- a/src/libgui/toplevel_ui.h +++ b/src/libgui/toplevel_ui.h @@ -75,7 +75,7 @@ Q_OBJECT TQ_OBJECT public: MenuBarButton(const TQString &icon, TQWidget *parent); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; }; #endif diff --git a/src/piklab-coff/main.cpp b/src/piklab-coff/main.cpp index dff1b68..9e865e7 100644 --- a/src/piklab-coff/main.cpp +++ b/src/piklab-coff/main.cpp @@ -95,11 +95,11 @@ TQString CLI::Main::prettySymbol(const Coff::Symbol &sym) for (uint i=0; iname(), i18n("type=\"%1\" address=%2 size=%3 flags=%4") - .arg(s->type()==Coff::SectionType::Nb_Types ? "?" : s->type().label()) - .arg(toHexLabel(s->address(), nbCharsAddress)).arg(toHexLabel(s->size(), nbCharsAddress)).arg(toHexLabel(s->flags(), 8))); + .tqarg(s->type()==Coff::SectionType::Nb_Types ? "?" : s->type().label()) + .tqarg(toHexLabel(s->address(), nbCharsAddress)).tqarg(toHexLabel(s->size(), nbCharsAddress)).tqarg(toHexLabel(s->flags(), 8))); } return OK; } @@ -180,13 +180,13 @@ CLI::ExitCode CLI::Main::executeCommandObject(const TQString &command, Log::KeyL for (uint k=0; klines().count()); k++) { if (first) { first = false; - keys.append(i18n("section \"%1\":").arg(s->name()), TQString()); + keys.append(i18n("section \"%1\":").tqarg(s->name()), TQString()); } const Coff::CodeLine *cl = s->lines()[k]; TQString key = cl->filename() + ":" + TQString::number(cl->line()); if ( !cl->address().isValid() ) { const Coff::Symbol &sym = *cl->symbol(); - keys.append(key, i18n("symbol \"%1\"").arg(sym.name()) + prettySymbol(sym)); + keys.append(key, i18n("symbol \"%1\"").tqarg(sym.name()) + prettySymbol(sym)); } else keys.append(key, toHexLabel(cl->address(), nbCharsAddress)); } } @@ -235,10 +235,10 @@ CLI::ExitCode CLI::Main::executeSetCommand(const TQString &property, const TQStr } TQString s = value.upper(); _device = Device::lister().data(s); - if ( _device==0 ) return errorExit(i18n("Unknown device \"%1\".").arg(s), ARG_ERROR); + if ( _device==0 ) return errorExit(i18n("Unknown device \"%1\".").tqarg(s), ARG_ERROR); return OK; } - return errorExit(i18n("Unknown property \"%1\".").arg(property), ARG_ERROR); + return errorExit(i18n("Unknown property \"%1\".").tqarg(property), ARG_ERROR); } TQString CLI::Main::executeGetCommand(const TQString &property) @@ -247,7 +247,7 @@ TQString CLI::Main::executeGetCommand(const TQString &property) if ( _device==0 ) return i18n(""); return _device->name(); } - log(Log::LineType::SoftError, i18n("Unknown property \"%1\".").arg(property)); + log(Log::LineType::SoftError, i18n("Unknown property \"%1\".").tqarg(property)); return TQString(); } diff --git a/src/piklab-hex/main.cpp b/src/piklab-hex/main.cpp index 70796bb..0d9a7cc 100644 --- a/src/piklab-hex/main.cpp +++ b/src/piklab-hex/main.cpp @@ -115,7 +115,7 @@ CLI::ExitCode CLI::Main::executeCommand(const TQString &command) if ( _device==0 ) return okExit(i18n("Hex file is valid.")); TQStringList warnings; Device::Memory::WarningTypes wtypes = _memory->fromHexBuffer(_source1, warnings); - if ( wtypes==Device::Memory::NoWarning ) return okExit(i18n("Hex file is compatible with device \"%1\".").arg(_device->name())); + if ( wtypes==Device::Memory::NoWarning ) return okExit(i18n("Hex file is compatible with device \"%1\".").tqarg(_device->name())); return errorExit(warnings.join("\n"), EXEC_ERROR); } if ( command=="info" ) { @@ -169,7 +169,7 @@ CLI::ExitCode CLI::Main::executeCommand(const TQString &command) if ( firstInSecond && secondInFirst ) return okExit(i18n("The two hex files have the same content.")); if (firstInSecond) log(Log::LineType::Information, i18n("The first hex file is a subset of the second one.")); if (secondInFirst) log(Log::LineType::Information, i18n("The second hex file is a subset of the first one.")); - return errorExit(i18n("The two hex files are different at address %1.").arg(toHexLabel(it.key(), 8)), EXEC_ERROR); + return errorExit(i18n("The two hex files are different at address %1.").tqarg(toHexLabel(it.key(), 8)), EXEC_ERROR); } if ( command=="checksum" ) { TQStringList warnings; @@ -177,10 +177,10 @@ CLI::ExitCode CLI::Main::executeCommand(const TQString &command) for (uint i=0; ichecksum(); - log(Log::LineType::Normal, i18n("Checksum: %1").arg(toHexLabel(cs, 4))); + log(Log::LineType::Normal, i18n("Checksum: %1").tqarg(toHexLabel(cs, 4))); if ( _device->group().name()=="pic" ) { BitValue ucs = static_cast(_memory)->unprotectedChecksum(); - if ( ucs!=cs ) log(Log::LineType::Information, i18n("Unprotected checksum: %1").arg(toHexLabel(ucs, 4))); + if ( ucs!=cs ) log(Log::LineType::Information, i18n("Unprotected checksum: %1").tqarg(toHexLabel(ucs, 4))); } return OK; } @@ -220,7 +220,7 @@ CLI::ExitCode CLI::Main::executeSetCommand(const TQString &property, const TQStr } TQString s = value.upper(); _device = Device::lister().data(s); - if ( _device==0 ) return errorExit(i18n("Unknown device \"%1\".").arg(s), ARG_ERROR); + if ( _device==0 ) return errorExit(i18n("Unknown device \"%1\".").tqarg(s), ARG_ERROR); return OK; } if ( property=="fill" ) { @@ -232,7 +232,7 @@ CLI::ExitCode CLI::Main::executeSetCommand(const TQString &property, const TQStr if ( !ok ) return errorExit(i18n("Number format not recognized."), ARG_ERROR); return OK; } - return errorExit(i18n("Unknown property \"%1\".").arg(property), ARG_ERROR); + return errorExit(i18n("Unknown property \"%1\".").tqarg(property), ARG_ERROR); } TQString CLI::Main::executeGetCommand(const TQString &property) @@ -245,7 +245,7 @@ TQString CLI::Main::executeGetCommand(const TQString &property) if ( _fill.isEmpty() ) return i18n(""); return _fill; } - log(Log::LineType::SoftError, i18n("Unknown property \"%1\".").arg(property)); + log(Log::LineType::SoftError, i18n("Unknown property \"%1\".").tqarg(property)); return TQString(); } diff --git a/src/piklab-prog/cli_interactive.cpp b/src/piklab-prog/cli_interactive.cpp index 40adb2c..ae485a1 100644 --- a/src/piklab-prog/cli_interactive.cpp +++ b/src/piklab-prog/cli_interactive.cpp @@ -158,11 +158,11 @@ CLI::ExitCode CLI::Interactive::processLine(const TQString &s) if ( !ok ) return errorExit(i18n("Number format not recognized."), ARG_ERROR); PURL::Url dummy; Breakpoint::Data data(dummy, address); - if ( Breakpoint::list().contains(data) ) return okExit(i18n("Breakpoint already set at %1.").arg(toHexLabel(address, nbChars(NumberBase::Hex, address)))); + if ( Breakpoint::list().contains(data) ) return okExit(i18n("Breakpoint already set at %1.").tqarg(toHexLabel(address, nbChars(NumberBase::Hex, address)))); Breakpoint::list().append(data); Breakpoint::list().setAddress(data, address); Breakpoint::list().setState(data, Breakpoint::Active); - return okExit(i18n("Breakpoint set at %1.").arg(toHexLabel(address, nbChars(NumberBase::Hex, address)))); + return okExit(i18n("Breakpoint set at %1.").tqarg(toHexLabel(address, nbChars(NumberBase::Hex, address)))); } return errorExit(i18n("The first argument should be \"e\"."), ARG_ERROR); } @@ -178,7 +178,7 @@ CLI::ExitCode CLI::Interactive::processLine(const TQString &s) } for (uint i=0; i list = Pic::sfrList(data); - for (uint i=0; i list = Pic::variableList(data, *coff); if ( list.count()==0 ) log(Log::LineType::Normal, i18n("No variable.")); - for (uint i=0; imaxValue(NumberBase::Hex, nbChars) ) return errorExit(i18n("The given value is too large (max: %1).").arg(toHexLabel(maxValue(NumberBase::Hex, nbChars), nbChars)), ARG_ERROR); + if ( v>maxValue(NumberBase::Hex, nbChars) ) return errorExit(i18n("The given value is too large (max: %1).").tqarg(toHexLabel(maxValue(NumberBase::Hex, nbChars), nbChars)), ARG_ERROR); Register::TypeData rtd; if ( name.lower()=="w" || name.lower()=="wreg" ) rtd = static_cast(Debugger::manager->debugger())->deviceSpecific()->wregTypeData(); @@ -305,7 +305,7 @@ CLI::ExitCode CLI::Interactive::executeRegister(const TQString &name, const TQSt } if ( value.isEmpty() ) { if ( !Debugger::manager->readRegister(rtd) ) return ARG_ERROR; - return okExit(i18n("%1 = %2").arg(name.upper()).arg(toHexLabel(Register::list().value(rtd), nbChars))); + return okExit(i18n("%1 = %2").tqarg(name.upper()).tqarg(toHexLabel(Register::list().value(rtd), nbChars))); } return (Debugger::manager->writeRegister(rtd, v) ? OK : EXEC_ERROR); } @@ -313,7 +313,7 @@ CLI::ExitCode CLI::Interactive::executeRegister(const TQString &name, const TQSt CLI::ExitCode CLI::Interactive::executeRawCommands(const TQString &filename) { TQFile file(filename); - if ( !file.open(IO_ReadOnly) ) return errorExit(i18n("Could not open filename \"%1\".").arg(filename), ARG_ERROR); + if ( !file.open(IO_ReadOnly) ) return errorExit(i18n("Could not open filename \"%1\".").tqarg(filename), ARG_ERROR); if ( Programmer::manager->programmer()==0 ) { Programmer::manager->createProgrammer(_device); if ( !Programmer::manager->programmer()->simpleConnectHardware() ) return EXEC_ERROR; @@ -330,7 +330,7 @@ CLI::ExitCode CLI::Interactive::executeRawCommands(const TQString &filename) } else { TQString rs; if ( !programmer->hardware()->rawRead(s.length(), rs) ) return EXEC_ERROR; - if ( rs!=s ) log(Log::LineType::Warning, i18n("Read string is different than expected: %1 (%2).").arg(rs).arg(s)); + if ( rs!=s ) log(Log::LineType::Warning, i18n("Read string is different than expected: %1 (%2).").tqarg(rs).tqarg(s)); } } return okExit(i18n("End of command file reached.")); diff --git a/src/piklab-prog/cli_prog_manager.cpp b/src/piklab-prog/cli_prog_manager.cpp index d448f95..f8b73d1 100644 --- a/src/piklab-prog/cli_prog_manager.cpp +++ b/src/piklab-prog/cli_prog_manager.cpp @@ -25,7 +25,7 @@ Port::Description Programmer::CliManager::portDescription() const if ( CLI::_port=="usb" ) return Port::Description(PortType::USB, TQString()); PortType type = Port::findType(CLI::_port); if ( type==PortType::Nb_Types ) { - log->log(Log::LineType::Warning, i18n("Could not find device \"%1\" as serial or parallel port. Will try to open as serial port.").arg(CLI::_port)); + log->log(Log::LineType::Warning, i18n("Could not find device \"%1\" as serial or parallel port. Will try to open as serial port.").tqarg(CLI::_port)); type = PortType::Serial; } return Port::Description(type, CLI::_port); diff --git a/src/piklab-prog/cmdline.cpp b/src/piklab-prog/cmdline.cpp index 2f206a2..beb309a 100644 --- a/src/piklab-prog/cmdline.cpp +++ b/src/piklab-prog/cmdline.cpp @@ -112,7 +112,7 @@ CLI::ExitCode CLI::Main::deviceList() log(Log::LineType::Normal, i18n("Supported devices:")); devices = Programmer::lister().supportedDevices(); } else { - log(Log::LineType::Normal, i18n("Supported devices for \"%1\":").arg(_progGroup->label())); + log(Log::LineType::Normal, i18n("Supported devices for \"%1\":").tqarg(_progGroup->label())); devices = _progGroup->supportedDevices(); } qHeapSort(devices); @@ -124,7 +124,7 @@ CLI::ExitCode CLI::Main::deviceList() CLI::ExitCode CLI::Main::portList() { - if (_progGroup) log(Log::LineType::Normal, i18n("Detected ports supported by \"%1\":").arg(_progGroup->label())); + if (_progGroup) log(Log::LineType::Normal, i18n("Detected ports supported by \"%1\":").tqarg(_progGroup->label())); else log(Log::LineType::Normal, i18n("Detected ports:")); FOR_EACH(PortType, type) { if ( _progGroup && !_progGroup->isPortSupported(type) ) continue; @@ -146,7 +146,7 @@ CLI::ExitCode CLI::Main::portList() CLI::ExitCode CLI::Main::rangeList() { log(Log::LineType::Normal, i18n("Memory ranges for PIC/dsPIC devices:")); - FOR_EACH(Pic::MemoryRangeType, type) log(Log::LineType::Normal, TQString(" %1").arg(type.key())); + FOR_EACH(Pic::MemoryRangeType, type) log(Log::LineType::Normal, TQString(" %1").tqarg(type.key())); return OK; } @@ -170,9 +170,9 @@ CLI::ExitCode CLI::Main::prepareCommand(const TQString &command) TQStringList errors, warnings; Device::Memory::WarningTypes warningTypes; if ( !_memory->load(file.stream(), errors, warningTypes, warnings) ) - return errorExit(i18n("Could not load hex file \"%1\".").arg(errors[0]), FILE_ERROR); + return errorExit(i18n("Could not load hex file \"%1\".").tqarg(errors[0]), FILE_ERROR); if ( warningTypes!=Device::Memory::NoWarning ) - log(Log::LineType::Warning, i18n("Hex file seems incompatible with device \"%1\".").arg(warnings.join(" "))); + log(Log::LineType::Warning, i18n("Hex file seems incompatible with device \"%1\".").tqarg(warnings.join(" "))); } } else if ( properties & OutputHex ) { if ( !_force && _hexUrl.exists() ) return errorExit(i18n("Output hex filename already exists."), FILE_ERROR); @@ -299,7 +299,7 @@ CLI::ExitCode CLI::Main::executeCommand(const TQString &command) PURL::File file(_hexUrl, *_view); if ( !file.openForWrite() ) return FILE_ERROR; if ( !_memory->save(file.stream(), _format) ) - return errorExit(i18n("Error while writing file \"%1\".").arg(_hexUrl.pretty()), FILE_ERROR); + return errorExit(i18n("Error while writing file \"%1\".").tqarg(_hexUrl.pretty()), FILE_ERROR); return OK; } if ( command=="erase" ) { @@ -328,13 +328,13 @@ CLI::ExitCode CLI::Main::checkProgrammer() if ( _progGroup->isSoftware() && _progGroup->supportedDevices().isEmpty() ) return errorExit(i18n("Please check installation of selected software debugger."), NOT_SUPPORTED_ERROR); if ( _device && !_progGroup->isSupported(_device->name()) ) - return errorExit(i18n("The selected device \"%1\" is not supported by the selected programmer.").arg(_device->name()), NOT_SUPPORTED_ERROR); + return errorExit(i18n("The selected device \"%1\" is not supported by the selected programmer.").tqarg(_device->name()), NOT_SUPPORTED_ERROR); if ( !_hardware.isEmpty() ) { ::Hardware::Config *config = _progGroup->hardwareConfig(); Port::Description pd = static_cast(Programmer::manager)->portDescription(); bool ok = (config==0 || config->hardwareNames(pd.type).contains(_hardware)); delete config; - if ( !ok ) return errorExit(i18n("The selected programmer does not supported the specified hardware configuration (\"%1\").").arg(_hardware), NOT_SUPPORTED_ERROR); + if ( !ok ) return errorExit(i18n("The selected programmer does not supported the specified hardware configuration (\"%1\").").tqarg(_hardware), NOT_SUPPORTED_ERROR); } return OK; } @@ -346,7 +346,7 @@ CLI::ExitCode CLI::Main::executeSetCommand(const TQString &property, const TQStr if ( value.isEmpty() ) return OK; _progGroup = Programmer::lister().group(value.lower()); if (_progGroup) return checkProgrammer(); - return errorExit(i18n("Unknown programmer \"%1\".").arg(value.lower()), ARG_ERROR); + return errorExit(i18n("Unknown programmer \"%1\".").tqarg(value.lower()), ARG_ERROR); } if ( property=="hardware" ) { _hardware = value; return OK; } if ( property=="device" || property=="processor" ) { @@ -357,7 +357,7 @@ CLI::ExitCode CLI::Main::executeSetCommand(const TQString &property, const TQStr TQString s = value.upper(); _device = Device::lister().data(s); Debugger::manager->updateDevice(); - if ( _device==0 ) return errorExit(i18n("Unknown device \"%1\".").arg(s), ARG_ERROR); + if ( _device==0 ) return errorExit(i18n("Unknown device \"%1\".").tqarg(s), ARG_ERROR); Debugger::manager->init(); return checkProgrammer(); } @@ -372,7 +372,7 @@ CLI::ExitCode CLI::Main::executeSetCommand(const TQString &property, const TQStr _format = HexBuffer::Format(i); return OK; } - return errorExit(i18n("Unknown hex file format \"%1\".").arg(s), ARG_ERROR); + return errorExit(i18n("Unknown hex file format \"%1\".").tqarg(s), ARG_ERROR); } if ( property=="port" ) { _port = value; return OK; } if ( property=="firmware-dir" ) { _firmwareDir = value; return OK; } @@ -390,7 +390,7 @@ CLI::ExitCode CLI::Main::executeSetCommand(const TQString &property, const TQStr if ( _device && !Debugger::manager->init() ) return ARG_ERROR; return OK; } - return errorExit(i18n("Unknown property \"%1\"").arg(property), ARG_ERROR); + return errorExit(i18n("Unknown property \"%1\"").tqarg(property), ARG_ERROR); } TQString CLI::Main::executeGetCommand(const TQString &property) @@ -438,7 +438,7 @@ TQString CLI::Main::executeGetCommand(const TQString &property) if ( !_coffUrl.isEmpty() ) return _coffUrl.pretty(); return i18n(""); } - log(Log::LineType::SoftError, i18n("Unknown property \"%1\"").arg(property)); + log(Log::LineType::SoftError, i18n("Unknown property \"%1\"").tqarg(property)); return TQString(); } diff --git a/src/piklab-test/base/generator_check.cpp b/src/piklab-test/base/generator_check.cpp index 8dfa36c..1df1a9c 100644 --- a/src/piklab-test/base/generator_check.cpp +++ b/src/piklab-test/base/generator_check.cpp @@ -92,21 +92,21 @@ bool GeneratorCheck::execute(const Device::Data &data) // run compiler Process::State state = Process::runSynchronously(*_helper->_cprocess, Process::Start, 2000); // 2s timeout if ( state!=Process::Exited ) TEST_FAILED_RETURN("Error while running compilation") - if ( _helper->_cprocess->exitCode()!=0 ) TEST_FAILED_RETURN(TQString("Error in compilation for %1:\n%2%3").arg(data.name()).arg(_helper->_cprocess->sout()+_helper->_cprocess->serr()).arg(TQString())) + if ( _helper->_cprocess->exitCode()!=0 ) TEST_FAILED_RETURN(TQString("Error in compilation for %1:\n%2%3").tqarg(data.name()).tqarg(_helper->_cprocess->sout()+_helper->_cprocess->serr()).tqarg(TQString())) // run linker if (_helper->_lprocess) { state = Process::runSynchronously(*_helper->_lprocess, Process::Start, 2000); // 2s timeout if ( state!=Process::Exited ) TEST_FAILED_RETURN("Error while running linking") - if ( _helper->_lprocess->exitCode()!=0 ) TEST_FAILED_RETURN(TQString("Error in linking for %1:\n%2%3").arg(data.name()).arg(_helper->_lprocess->sout()+_helper->_lprocess->serr()).arg(TQString())) + if ( _helper->_lprocess->exitCode()!=0 ) TEST_FAILED_RETURN(TQString("Error in linking for %1:\n%2%3").tqarg(data.name()).tqarg(_helper->_lprocess->sout()+_helper->_lprocess->serr()).tqarg(TQString())) } // load hex file if ( !_fhex->openForRead() ) TEST_FAILED_RETURN("") TQStringList errors, warnings; Device::Memory::WarningTypes warningTypes; - if ( !_memory1->load(_fhex->stream(), errors, warningTypes, warnings) ) TEST_FAILED_RETURN(TQString("Error loading hex into memory: %1").arg(errors.join(" "))) - //if ( warningTypes!=Device::Memory::NoWarning ) TEST_FAILED(TQString("Warning loading hex into memory: %1").arg(warnings.join(" "))) + if ( !_memory1->load(_fhex->stream(), errors, warningTypes, warnings) ) TEST_FAILED_RETURN(TQString("Error loading hex into memory: %1").tqarg(errors.join(" "))) + //if ( warningTypes!=Device::Memory::NoWarning ) TEST_FAILED(TQString("Warning loading hex into memory: %1").tqarg(warnings.join(" "))) TEST_PASSED return true; @@ -172,8 +172,8 @@ bool ConfigGeneratorCheck::execute(const Device::Data &data) } if ( name1==name2 ) continue; TEST_FAILED_RETURN(TQString("Config bits are different in %1: set\"%2\"=(%3) != compiled=%4)") - .arg(cmask.name).arg(cmask.values[l2].name) - .arg(toHexLabel(word2.maskWith(cmask.value), nbChars)).arg(toHexLabel(word1.maskWith(cmask.value), nbChars))) + .tqarg(cmask.name).tqarg(cmask.values[l2].name) + .tqarg(toHexLabel(word2.maskWith(cmask.value), nbChars)).tqarg(toHexLabel(word1.maskWith(cmask.value), nbChars))) } } } @@ -198,7 +198,7 @@ bool TemplateGeneratorCheck::init(const Device::Data &data) PURL::ToolType ttype = sfamily.data().toolType; SourceLine::List lines = _helper->generator()->templateSourceFile(ttype, data, ok); _source = SourceLine::text(sfamily, lines, 2); - if (!ok) TEST_FAILED_RETURN(TQString("Incomplete template generator for %1").arg(data.name())) + if (!ok) TEST_FAILED_RETURN(TQString("Incomplete template generator for %1").tqarg(data.name())) return true; } diff --git a/src/piklab-test/checksum/checksum_check.cpp b/src/piklab-test/checksum/checksum_check.cpp index a165c86..47873ab 100644 --- a/src/piklab-test/checksum/checksum_check.cpp +++ b/src/piklab-test/checksum/checksum_check.cpp @@ -50,7 +50,7 @@ void ChecksumCheck::setProtection(const Pic::Data &data, const Pic::Checksum::Da bool ChecksumCheck::checkChecksum(BitValue checksum, const TQString &label) { BitValue c = _memory->checksum(); - if ( c!=checksum ) TEST_FAILED_RETURN(TQString("%1 %2/%3").arg(label).arg(toHexLabel(c, 4)).arg(toHexLabel(checksum, 4))) + if ( c!=checksum ) TEST_FAILED_RETURN(TQString("%1 %2/%3").tqarg(label).tqarg(toHexLabel(c, 4)).tqarg(toHexLabel(checksum, 4))) return true; } diff --git a/src/piklab-test/save_load_memory/save_load_memory_check.cpp b/src/piklab-test/save_load_memory/save_load_memory_check.cpp index df05930..e6bb1be 100644 --- a/src/piklab-test/save_load_memory/save_load_memory_check.cpp +++ b/src/piklab-test/save_load_memory/save_load_memory_check.cpp @@ -52,7 +52,7 @@ bool SaveLoadMemoryCheck::execute(const Device::Data &data) if ( !_fdest->openForRead() ) TEST_FAILED_RETURN("") TQStringList errors, warnings; Device::Memory::WarningTypes wtypes; - if ( !_memory2->load(_fdest->stream(), errors, wtypes, warnings) ) TEST_FAILED_RETURN(TQString("Error loading hex file into memory %1").arg(data.name())) + if ( !_memory2->load(_fdest->stream(), errors, wtypes, warnings) ) TEST_FAILED_RETURN(TQString("Error loading hex file into memory %1").tqarg(data.name())) // compare checksums if ( _memory1->checksum()!=_memory2->checksum() ) TEST_FAILED_RETURN("Memory saved and loaded is different") diff --git a/src/progs/base/generic_debug.cpp b/src/progs/base/generic_debug.cpp index f96ca2f..46c6597 100644 --- a/src/progs/base/generic_debug.cpp +++ b/src/progs/base/generic_debug.cpp @@ -53,7 +53,7 @@ bool Debugger::Base::init() bool Debugger::Base::update() { if ( !updateState() ) return false; - if ( _programmer.state()==::Programmer::Halted ) return _deviceSpecific->updateStatus(); + if ( _programmer.state()==::Programmer::Halted ) return _deviceSpecific->updatetqStatus(); return true; } @@ -76,7 +76,7 @@ bool Debugger::Base::halt() if ( !softHalt(success) ) return false; if ( !success ) return hardHalt(); if ( !update() ) return false; - log(Log::LineType::Information, TQString("Halted at %1").arg(toHexLabel(pc(), _programmer.device()->nbCharsAddress()))); + log(Log::LineType::Information, TQString("Halted at %1").tqarg(toHexLabel(pc(), _programmer.device()->nbCharsAddress()))); _programmer.setState(::Programmer::Halted); return true; } diff --git a/src/progs/base/generic_debug.h b/src/progs/base/generic_debug.h index 5486ad1..48f9e60 100644 --- a/src/progs/base/generic_debug.h +++ b/src/progs/base/generic_debug.h @@ -44,7 +44,7 @@ public: Register::TypeData pcTypeData() const; virtual bool readRegister(const Register::TypeData &data, BitValue &value) = 0; virtual bool writeRegister(const Register::TypeData &data, BitValue value) = 0; - virtual bool updatePortStatus(uint index, TQMap &bits) = 0; + virtual bool updatePorttqStatus(uint index, TQMap &bits) = 0; protected: Programmer::Base &_programmer; @@ -68,7 +68,7 @@ class DeviceSpecific : public Log::Base { public: DeviceSpecific(Debugger::Base &base) : Log::Base(base), _base(base) {} - virtual bool updateStatus() = 0; + virtual bool updatetqStatus() = 0; virtual TQString statusString() const = 0; protected: diff --git a/src/progs/base/generic_prog.cpp b/src/progs/base/generic_prog.cpp index a3e3770..e7e6e2e 100644 --- a/src/progs/base/generic_prog.cpp +++ b/src/progs/base/generic_prog.cpp @@ -72,13 +72,13 @@ bool Programmer::Base::simpleConnectHardware() if (_device) { TQString label = _group.label(); if ( group().isSoftware() ) - log(Log::LineType::Information, i18n("Connecting %1 with device %2...").arg(label).arg(_device->name())); + log(Log::LineType::Information, i18n("Connecting %1 with device %2...").tqarg(label).tqarg(_device->name())); else { if ( !_hardware->name().isEmpty() ) label += "[" + _hardware->name() + "]"; Port::Description pd = _hardware->portDescription(); TQString s = pd.type.label(); if (pd.type.data().withDevice) s += " (" + pd.device + ")"; - log(Log::LineType::Information, i18n("Connecting %1 on %2 with device %3...").arg(label).arg(s).arg(_device->name())); + log(Log::LineType::Information, i18n("Connecting %1 on %2 with device %3...").tqarg(label).tqarg(s).tqarg(_device->name())); } } return _hardware->connectHardware(); @@ -98,7 +98,7 @@ bool Programmer::Base::connectHardware() if ( !checkFirmwareVersion() ) return false; if ( !setTargetPowerOn(false) ) return false; if ( !setTarget() ) return false; - log(Log::LineType::Information, i18n(" Set target self powered: %1").arg(_targetSelfPowered ? "true" : "false")); + log(Log::LineType::Information, i18n(" Set target self powered: %1").tqarg(_targetSelfPowered ? "true" : "false")); if ( !setTargetPowerOn(!_targetSelfPowered) ) return false; if ( !internalSetupHardware() ) return false; if ( !readVoltages() ) return false; @@ -133,30 +133,30 @@ bool Programmer::Base::checkFirmwareVersion() { if ( _mode==BootloadMode ) log(Log::LineType::Information, i18n("Programmer is in bootload mode.")); if ( !_firmwareVersion.isValid() ) return true; - log(Log::LineType::Information, i18n("Firmware version is %1").arg(_firmwareVersion.pretty())); + log(Log::LineType::Information, i18n("Firmware version is %1").tqarg(_firmwareVersion.pretty())); VersionData vd = _firmwareVersion.toWithoutDot(); VersionData tmp = firmwareVersion(FirmwareVersionType::Max); if ( tmp.isValid() && tmp.toWithoutDot()setPinOn(p, on, (pin<0 ? Port::NegativeLogic : Port::PositiveLogic)); if ( type==Clock ) Port::usleep(_data.clockDelay); } @@ -95,7 +95,7 @@ bool Direct::Hardware::readBit() uint p = (pin<0 ? -pin : pin)-1; bool on; _port->readPin(p, (pin<0 ? Port::NegativeLogic : Port::PositiveLogic), on); - //log(Log::DebugLevel::Extra, TQString("Hardware::read DataIn %2: %3").arg(pin).arg(on)); + //log(Log::DebugLevel::Extra, TQString("Hardware::read DataIn %2: %3").tqarg(pin).tqarg(on)); return on; } @@ -107,7 +107,7 @@ uint Direct::Hardware::nbPins(Port::IODir dir) const TQString Direct::Hardware::pinLabelForIndex(Port::IODir dir, uint i) const { Port::PinData pd = _port->pinData(dir)[i]; - return TQString("%1 (%2)").arg(pd.pin+1).arg(pd.label); + return TQString("%1 (%2)").tqarg(pd.pin+1).tqarg(pd.label); } Port::IODir Direct::Hardware::ioTypeForPin(int pin) const diff --git a/src/progs/direct/base/direct_16.cpp b/src/progs/direct/base/direct_16.cpp index 0c930c9..ef17479 100644 --- a/src/progs/direct/base/direct_16.cpp +++ b/src/progs/direct/base/direct_16.cpp @@ -105,7 +105,7 @@ bool Direct::pic16::doWrite(Pic::MemoryRangeType type, const Device::Array &data gotoMemory(type); for (uint i = 0; i=0; i--) { uint add = (address >> 8*i) & 0xFF; - log(Log::DebugLevel::Max, TQString(" byte #%1: %2").arg(i).arg(toHexLabel(add, 2))); + log(Log::DebugLevel::Max, TQString(" byte #%1: %2").tqarg(i).tqarg(toHexLabel(add, 2))); if ( !writeByteAck(add) ) return false; } return true; @@ -107,7 +107,7 @@ bool Direct::Mem24DeviceSpecific::doWrite(const Device::Array &data) // page by page (page_size==1: byte by byte) uint nbPages = device().nbBytes() / device().nbBytesPage(); for (uint i=0; i200 ) { // 200 ms timeout - log(Log::LineType::Error, i18n("Timeout writing at address %1").arg(toHexLabel(address, nbChars(device().nbBytes())))); + log(Log::LineType::Error, i18n("Timeout writing at address %1").tqarg(toHexLabel(address, nbChars(device().nbBytes())))); return false; } } diff --git a/src/progs/direct/base/direct_pic.cpp b/src/progs/direct/base/direct_pic.cpp index 19c74b5..c6316e9 100644 --- a/src/progs/direct/base/direct_pic.cpp +++ b/src/progs/direct/base/direct_pic.cpp @@ -19,7 +19,7 @@ Direct::PulseEngine::PulseEngine(::Programmer::Base &base) BitValue Direct::PulseEngine::pulseEngine(const TQString &cmd, BitValue value) { - _pbase.log(Log::DebugLevel::Extra, TQString("pulse engine: %1").arg(cmd)); + _pbase.log(Log::DebugLevel::Extra, TQString("pulse engine: %1").tqarg(cmd)); TQByteArray a = toAscii(cmd); BitValue res = 0; for (const char *ptr=a.data(); (ptr-a.data())addWidget(_testLabels[i], i, 4); - updateTestStatus(PinType(i), false); + updateTesttqStatus(PinType(i), false); } else { _testcbs[i] = 0; _testLabels[i] = 0; @@ -150,11 +150,11 @@ void Direct::HConfigWidget::updateTestPin(PinType ptype) Q_ASSERT( _connected && ptype!=DataIn ); bool on = _testcbs[ptype]->isChecked(); hardware()->setPin(ptype, on); - updateTestStatus(ptype, on); + updateTesttqStatus(ptype, on); if ( ptype==Vpp ) updateDataIn(); } -void Direct::HConfigWidget::updateTestStatus(PinType ptype, bool on) +void Direct::HConfigWidget::updateTesttqStatus(PinType ptype, bool on) { if (on) _testLabels[ptype]->setText(i18n(PIN_DATA[ptype].onLabel)); else _testLabels[ptype]->setText(i18n(PIN_DATA[ptype].offLabel)); @@ -163,7 +163,7 @@ void Direct::HConfigWidget::updateTestStatus(PinType ptype, bool on) void Direct::HConfigWidget::updateDataIn() { bool on = hardware()->readBit(); - updateTestStatus(DataIn, on); + updateTesttqStatus(DataIn, on); _testcbs[DataIn]->setChecked(on); } @@ -204,7 +204,7 @@ bool Direct::HConfigWidget::set(const Port::Description &pd, const ::Hardware::D if (_edit) { for (uint i=0; isetEnabled(_connected); - updateTestStatus(PinType(i), false); + updateTesttqStatus(PinType(i), false); } if ( _connected ) _timerPollDataOut->start(100); _sendBitsButton->setEnabled(_connected); diff --git a/src/progs/direct/gui/direct_config_widget.h b/src/progs/direct/gui/direct_config_widget.h index 8d7d5cb..d61be1a 100644 --- a/src/progs/direct/gui/direct_config_widget.h +++ b/src/progs/direct/gui/direct_config_widget.h @@ -55,7 +55,7 @@ private: void sendBits(uint d, int nbb); void updateTestPin(PinType ptype); - void updateTestStatus(PinType ptype, bool on); + void updateTesttqStatus(PinType ptype, bool on); uint pin(PinType ptype) const; void updatePin(PinType ptype); Hardware *hardware() { return static_cast(_hardware); } diff --git a/src/progs/gpsim/base/gpsim.cpp b/src/progs/gpsim/base/gpsim.cpp index 6803686..4352162 100644 --- a/src/progs/gpsim/base/gpsim.cpp +++ b/src/progs/gpsim/base/gpsim.cpp @@ -138,7 +138,7 @@ void GPSim::Hardware::internalDisconnectHardware() bool GPSim::Hardware::execute(const TQString &command, bool synchronous, TQStringList *output) { - log(Log::DebugLevel::Normal, TQString("command: %1").arg(command)); + log(Log::DebugLevel::Normal, TQString("command: %1").tqarg(command)); if (output) output->clear(); if ( !_manager->sendCommand(command, synchronous) ) return false; if (output) *output = _manager->process().sout(); @@ -147,7 +147,7 @@ bool GPSim::Hardware::execute(const TQString &command, bool synchronous, TQStrin bool GPSim::Hardware::signal(uint n, bool synchronous, TQStringList *output) { - log(Log::DebugLevel::Normal, TQString("signal: %1").arg(n)); + log(Log::DebugLevel::Normal, TQString("signal: %1").tqarg(n)); if (output) output->clear(); if ( !_manager->sendSignal(n, synchronous) ) return false; if (output) *output = _manager->process().sout(); diff --git a/src/progs/gpsim/base/gpsim_debug.cpp b/src/progs/gpsim/base/gpsim_debug.cpp index f6c2541..eca9841 100644 --- a/src/progs/gpsim/base/gpsim_debug.cpp +++ b/src/progs/gpsim/base/gpsim_debug.cpp @@ -104,7 +104,7 @@ bool GPSim::Debugger::readWreg(BitValue &value) TQString w = (_coff->symbol("_WREG") ? "_WREG" : "W"); TQString s; if ( !findRegExp(lines, "^\\s*[0-9A-Fa-f]+\\s+(\\w+)\\s*=\\s*([0-9A-Fa-f]+)", w, s) ) { - log(Log::LineType::Error, i18n("Error reading register \"%1\"").arg(w)); + log(Log::LineType::Error, i18n("Error reading register \"%1\"").tqarg(w)); return false; } value = fromHex(s, 0); @@ -126,7 +126,7 @@ bool GPSim::Debugger::getRegister(const TQString &name, BitValue &value) for (; iregistersData(); TQString name = toHex(address, rdata.nbCharsAddress()); if ( hardware()->version()registersData(); - TQString s = TQString("%1 = %2").arg(name).arg(toHexLabel(value, rdata.nbChars())); + TQString s = TQString("%1 = %2").tqarg(name).tqarg(toHexLabel(value, rdata.nbChars())); return hardware()->execute(s, true); } bool GPSim::Debugger::setRegister(Address address, BitValue value) { const Pic::RegistersData &rdata = device()->registersData(); - TQString s = TQString("ramData[$%1]").arg(toHex(address, rdata.nbCharsAddress())); + TQString s = TQString("ramData[$%1]").tqarg(toHex(address, rdata.nbCharsAddress())); return setRegister(s, value); } @@ -195,7 +195,7 @@ bool GPSim::Debugger::writeWreg(BitValue value) return setRegister("W", value); } -bool GPSim::Debugger::updatePortStatus(uint index, TQMap &bits) +bool GPSim::Debugger::updatePorttqStatus(uint index, TQMap &bits) { for (uint i=0; iregistersData().hasPortBit(index, i) ) continue; @@ -204,7 +204,7 @@ bool GPSim::Debugger::updatePortStatus(uint index, TQMapexecute("symbol " + name, true, &lines) ) return false; TQString pattern = "^(\\w+)=([^\\s])+\\s*", value; if ( !findRegExp(lines, pattern, "bitState", value) || value.length()!=1 ) { - log(Log::LineType::Error, i18n("Error reading state of IO bit: %1").arg(name)); + log(Log::LineType::Error, i18n("Error reading state of IO bit: %1").tqarg(name)); return false; } switch (value[0].latin1()) { @@ -218,24 +218,24 @@ bool GPSim::Debugger::updatePortStatus(uint index, TQMap &list); virtual bool readRegister(const Register::TypeData &data, BitValue &value); virtual bool writeRegister(const Register::TypeData &data, BitValue value); - virtual bool updatePortStatus(uint index, TQMap &bits); + virtual bool updatePorttqStatus(uint index, TQMap &bits); private: uint _nbBreakpoints; diff --git a/src/progs/gpsim/gui/gpsim_group_ui.cpp b/src/progs/gpsim/gui/gpsim_group_ui.cpp index aa404c3..931ffaf 100644 --- a/src/progs/gpsim/gui/gpsim_group_ui.cpp +++ b/src/progs/gpsim/gui/gpsim_group_ui.cpp @@ -23,16 +23,16 @@ GPSim::ConfigWidget::ConfigWidget(const ::Programmer::Group &group, TQWidget *pa _status = new TQLabel(this); addWidget(_status, row,row, 1,1); - TQTimer::singleShot(0, this, TQT_SLOT(updateStatus())); + TQTimer::singleShot(0, this, TQT_SLOT(updatetqStatus())); } -void GPSim::ConfigWidget::updateStatus() +void GPSim::ConfigWidget::updatetqStatus() { VersionData version; ProcessManager manager(0); if ( !manager.start() ) _status->setText(i18n("Could not start \"gpsim\"")); else if ( !manager.getVersion(version) || !version.isValid() ) _status->setText(i18n("Could not detect \"gpsim\" version")); - else _status->setText(i18n("Found version \"%1\"").arg(version.pretty())); + else _status->setText(i18n("Found version \"%1\"").tqarg(version.pretty())); } //---------------------------------------------------------------------------- diff --git a/src/progs/gpsim/gui/gpsim_group_ui.h b/src/progs/gpsim/gui/gpsim_group_ui.h index 26c69cc..1978574 100644 --- a/src/progs/gpsim/gui/gpsim_group_ui.h +++ b/src/progs/gpsim/gui/gpsim_group_ui.h @@ -23,7 +23,7 @@ public: ConfigWidget(const ::Programmer::Group &group, TQWidget *parent); private slots: - void updateStatus(); + void updatetqStatus(); private: TQLabel *_status; diff --git a/src/progs/gui/hardware_config_widget.cpp b/src/progs/gui/hardware_config_widget.cpp index 82b0bab..193fdfb 100644 --- a/src/progs/gui/hardware_config_widget.cpp +++ b/src/progs/gui/hardware_config_widget.cpp @@ -47,7 +47,7 @@ Hardware::EditDialog::EditDialog(ConfigWidget *cwidget, const TQString &name, co _name = new TQLineEdit(name, plainPage()); grid->addWidget(_name, 0, 1); - label = new TQLabel(i18n("%1 at %2:").arg(pd.type.label()).arg(pd.device), plainPage()); + label = new TQLabel(i18n("%1 at %2:").tqarg(pd.type.label()).tqarg(pd.device), plainPage()); grid->addWidget(label, 1, 0); label = new TQLabel(plainPage()); grid->addWidget(label, 1, 1); @@ -73,7 +73,7 @@ void Hardware::EditDialog::slotOk() } TQStringList names = _cwidget->_config->hardwareNames(PortType::Nb_Types); // all hardwares if ( names.contains(_name->text()) ) { - if ( !MessageBox::askContinue(i18n("Do you want to overwrite this custom hardware \"%1\"?").arg(_name->text()), + if ( !MessageBox::askContinue(i18n("Do you want to overwrite this custom hardware \"%1\"?").tqarg(_name->text()), KStdGuiItem::save()) ) return; } delete _oldData; @@ -174,7 +174,7 @@ void Hardware::ConfigWidget::updateList(PortType type) _names = _config->hardwareNames(type); for (uint i=0; i<_names.count(); i++) { bool standard = _config->isStandardHardware(_names[i]); - TQString s = (standard ? _config->label(_names[i]) : i18n("%1 ").arg(_names[i])); + TQString s = (standard ? _config->label(_names[i]) : i18n("%1 ").tqarg(_names[i])); _configCombo->insertItem(s); } } @@ -196,7 +196,7 @@ void Hardware::ConfigWidget::editClicked() void Hardware::ConfigWidget::deleteClicked() { TQString name = _names[_configCombo->currentItem()]; - if ( !MessageBox::askContinue(i18n("Do you want to delete custom hardware \"%1\"?").arg(name), + if ( !MessageBox::askContinue(i18n("Do you want to delete custom hardware \"%1\"?").tqarg(name), KStdGuiItem::del()) ) return; _config->deleteCustomHardware(name); updateList(_hc->portDescription().type); diff --git a/src/progs/gui/port_selector.cpp b/src/progs/gui/port_selector.cpp index 27ecb12..f34d426 100644 --- a/src/progs/gui/port_selector.cpp +++ b/src/progs/gui/port_selector.cpp @@ -85,7 +85,7 @@ void PortSelector::addPortType(const Port::Description &pd) KTextBrowser *comment = new KTextBrowser(_main); TQString text = (notAvailable ? notAvailableMessage : noDeviceMessage); text += "

"; - text += i18n("See Piklab homepage for help.").arg(Piklab::URLS[Piklab::Support]); + text += i18n("See Piklab homepage for help.").tqarg(Piklab::URLS[Piklab::Support]); comment->setText(text); _grid->addMultiCellWidget(comment, 3*(_bgroup->count()-1)+1,3*(_bgroup->count()-1)+1, 0,3); } @@ -101,7 +101,7 @@ void PortSelector::addPortType(const Port::Description &pd) } } -void PortSelector::setStatus(PortType ptype, const TQString &message) +void PortSelector::settqStatus(PortType ptype, const TQString &message) { _pending = false; FOR_EACH(PortType, type) { diff --git a/src/progs/gui/port_selector.h b/src/progs/gui/port_selector.h index a9a53d0..5127976 100644 --- a/src/progs/gui/port_selector.h +++ b/src/progs/gui/port_selector.h @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include @@ -27,7 +27,7 @@ public: void setGroup(const Programmer::Group &group); Port::Description portDescription() const { return Port::Description(type(), device(type())); } void saveConfig(); - void setStatus(PortType type, const TQString &message); + void settqStatus(PortType type, const TQString &message); signals: void changed(); diff --git a/src/progs/gui/prog_config_center.cpp b/src/progs/gui/prog_config_center.cpp index e2ab715..f781280 100644 --- a/src/progs/gui/prog_config_center.cpp +++ b/src/progs/gui/prog_config_center.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "prog_config_center.h" -#include +#include #include #include #include @@ -86,7 +86,7 @@ void Programmer::SelectConfigWidget::portChanged() delete config; TQWidget *w = _stack->item(_combo->currentItem()); bool ok = static_cast< ::Programmer::ConfigWidget *>(w)->setPort(hd); - _portSelector->setStatus(hd.port.type, ok ? i18n("Connection: Ok") : i18n("Connection: Error")); + _portSelector->settqStatus(hd.port.type, ok ? i18n("Connection: Ok") : i18n("Connection: Error")); } TQPixmap Programmer::SelectConfigWidget::pixmap() const diff --git a/src/progs/gui/prog_config_widget.cpp b/src/progs/gui/prog_config_widget.cpp index 01ee2f7..1578e3b 100644 --- a/src/progs/gui/prog_config_widget.cpp +++ b/src/progs/gui/prog_config_widget.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "prog_config_widget.h" -#include +#include #include #include #include diff --git a/src/progs/gui/prog_config_widget.h b/src/progs/gui/prog_config_widget.h index 0ec3fd0..2da2330 100644 --- a/src/progs/gui/prog_config_widget.h +++ b/src/progs/gui/prog_config_widget.h @@ -32,7 +32,7 @@ public: virtual bool setPort(const HardwareDescription &hd); signals: - void updatePortStatus(bool ok); + void updatePorttqStatus(bool ok); protected: const Group &_group; diff --git a/src/progs/icd1/base/icd1.cpp b/src/progs/icd1/base/icd1.cpp index 3cba20c..2ce3c80 100644 --- a/src/progs/icd1/base/icd1.cpp +++ b/src/progs/icd1/base/icd1.cpp @@ -31,7 +31,7 @@ bool Icd1::Hardware::internalConnect(const TQString &mode) Port::msleep(1); port()->setPinOn(Port::Serial::RTS, true, Port::PositiveLogic); if ( s.upper()!=mode ) { - log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").arg(mode)); + log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").tqarg(mode)); return false; } return true; @@ -79,12 +79,12 @@ bool Icd1::Hardware::readVoltages(VoltagesData &voltages) if ( !sendCommand(0x701C, &res) ) return false; voltages[Pic::TargetVdd].value = (2.050 / 256) * res.toUInt(); // voltage at AN0 pin voltages[Pic::TargetVdd].value /= (4.7 / 14.7); // voltage at Vcc - log(Log::DebugLevel::Max, TQString("Vdd: %1 %2").arg(toHexLabel(res, 4)).arg(voltages[Pic::TargetVdd].value)); + log(Log::DebugLevel::Max, TQString("Vdd: %1 %2").tqarg(toHexLabel(res, 4)).tqarg(voltages[Pic::TargetVdd].value)); voltages[Pic::TargetVdd].error = false; if ( !sendCommand(0x701D, &res) ) return false; voltages[Pic::TargetVpp].value = (2.050 / 256) * res.byte(0); // voltage at AN1 pin voltages[Pic::TargetVpp].value /= (10.0 / 110.0); // voltage at Vpp - log(Log::DebugLevel::Max, TQString("Vpp: %1 %2").arg(toHexLabel(res, 4)).arg(voltages[Pic::TargetVpp].value)); + log(Log::DebugLevel::Max, TQString("Vpp: %1 %2").tqarg(toHexLabel(res, 4)).tqarg(voltages[Pic::TargetVpp].value)); voltages[Pic::TargetVpp].error = false; return sendCommand(0x7001); } @@ -106,7 +106,7 @@ bool Icd1::Hardware::selfTest() BitValue res; if ( !sendCommand(0x700B, &res, 5000) ) return false; if ( res!=0 ) { - log(Log::LineType::Warning, i18n("Self-test failed (returned value is %1)").arg(toLabel(res))); + log(Log::LineType::Warning, i18n("Self-test failed (returned value is %1)").tqarg(toLabel(res))); return false; } return true; @@ -152,7 +152,7 @@ bool Icd1::Hardware::eraseAll() if ( !sendCommand(0x7007, &res) ) return false; if ( !sendCommand(0x7001) ) return false; // disable Vpp if ( res!=0x3FFF ) { - log(Log::LineType::Error, i18n("Erase failed (returned value is %1)").arg(toHexLabel(res, 4))); + log(Log::LineType::Error, i18n("Erase failed (returned value is %1)").tqarg(toHexLabel(res, 4))); return false; } return true; diff --git a/src/progs/icd1/base/icd1_serial.cpp b/src/progs/icd1/base/icd1_serial.cpp index 164502f..8d40697 100644 --- a/src/progs/icd1/base/icd1_serial.cpp +++ b/src/progs/icd1/base/icd1_serial.cpp @@ -61,7 +61,7 @@ bool Icd1::SerialPort::sendCommand(uint cmd) synchronize(); char c[7] = "$XXXX\r"; TQString cs = toHex(cmd, 4); - log(Log::DebugLevel::Extra, TQString("Send command: %1").arg(toPrintable(cs, PrintAlphaNum))); + log(Log::DebugLevel::Extra, TQString("Send command: %1").tqarg(toPrintable(cs, PrintAlphaNum))); c[1] = cs[0].latin1(); c[2] = cs[1].latin1(); c[3] = cs[2].latin1(); diff --git a/src/progs/icd2/base/icd.cpp b/src/progs/icd2/base/icd.cpp index c926ca4..18e9574 100644 --- a/src/progs/icd2/base/icd.cpp +++ b/src/progs/icd2/base/icd.cpp @@ -38,8 +38,8 @@ Device::Array Icd::DeviceSpecific::prepareRange(Pic::MemoryRangeType type, const uint end = (force ? data.count() : findNonMaskEnd(type, data)); nbWords = end - wordOffset + 1; log(Log::DebugLevel::Normal, TQString(" start=%1 nbWords=%2 total=%3 force=%4") - .arg(toHexLabel(wordOffset, device().nbCharsAddress())).arg(toHexLabel(nbWords, device().nbCharsAddress())) - .arg(toHexLabel(data.count(), device().nbCharsAddress())).arg(force ? "true" : "false")); + .tqarg(toHexLabel(wordOffset, device().nbCharsAddress())).tqarg(toHexLabel(nbWords, device().nbCharsAddress())) + .tqarg(toHexLabel(data.count(), device().nbCharsAddress())).tqarg(force ? "true" : "false")); } _base.progressMonitor().addTaskProgress(data.count()-nbWords); return data.mid(wordOffset, nbWords); diff --git a/src/progs/icd2/base/icd2.cpp b/src/progs/icd2/base/icd2.cpp index 073dd26..6765340 100644 --- a/src/progs/icd2/base/icd2.cpp +++ b/src/progs/icd2/base/icd2.cpp @@ -170,14 +170,14 @@ bool Icd2::Hardware::setup() TQString s; if ( !_port->receive(2, s) ) return false; if ( s!="02" ) { - log(Log::LineType::Error, i18n("Unexpected answer ($7F00) from ICD2 (%1).").arg(s)); + log(Log::LineType::Error, i18n("Unexpected answer ($7F00) from ICD2 (%1).").tqarg(s)); return false; } // ?? if ( !command("08", 2) ) return false; if ( _rx.mid(5, 2)!="00" ) { - log(Log::LineType::Error, i18n("Unexpected answer (08) from ICD2 (%1).").arg(_rx)); + log(Log::LineType::Error, i18n("Unexpected answer (08) from ICD2 (%1).").tqarg(_rx)); return false; } @@ -195,7 +195,7 @@ bool Icd2::Hardware::sendCommand(const TQString &s) for (uint i=0; isend(a.data(), a.count()); } @@ -207,7 +207,7 @@ bool Icd2::Hardware::receiveResponse(const TQString &command, uint responseSize, if ( poll && _port->type()==PortType::USB ) { if ( !static_cast(_port)->poll(size, _rx) ) return false; } else if ( !_port->receive(size, _rx, 180000) ) return false; // is 3 minutes enough ?? (we should really have an abort button here...) - log(Log::DebugLevel::Extra, TQString("received answer: '%1'").arg(_rx)); + log(Log::DebugLevel::Extra, TQString("received answer: '%1'").tqarg(_rx)); if ( size!=fromHex(_rx.mid(1, 2), 0) ) { log(Log::LineType::Error, i18n("Received length too short.")); return false; @@ -217,12 +217,12 @@ bool Icd2::Hardware::receiveResponse(const TQString &command, uint responseSize, return false; } if ( _rx[0]!='[' || _rx[size-1]!=']' ) { - log(Log::LineType::Error, i18n("Malformed string received \"%1\"").arg(_rx)); + log(Log::LineType::Error, i18n("Malformed string received \"%1\"").tqarg(_rx)); return false; } if ( command.mid(0, 2)!=_rx.mid(3, 2) ) { log(Log::LineType::Error, i18n("Wrong return value (\"%1\"; was expecting \"%2\")") - .arg(_rx.mid(3, 2)).arg(command.mid(0, 2))); + .tqarg(_rx.mid(3, 2)).tqarg(command.mid(0, 2))); return false; } // verify the checksum @@ -348,7 +348,7 @@ bool Icd2::Hardware::readBlock(uint nbBytesWord, uint nbWords, Device::Array &da TQString cs = s.mid(s.length()-3, 2); if ( chk!=fromHex(cs, 0) ) { - log(Log::LineType::Error, i18n("Bad checksum for read block: %1 (%2 expected).").arg(cs).arg(toHex(chk, 2))); + log(Log::LineType::Error, i18n("Bad checksum for read block: %1 (%2 expected).").tqarg(cs).tqarg(toHex(chk, 2))); return false; } return true; @@ -392,7 +392,7 @@ bool Icd2::Hardware::readMemory(Pic::MemoryRangeType type, uint wordOffset, bool Icd2::Hardware::writeBlock(uint nbBytesWord, const Device::Array &data, uint wordIndex, uint nbWords) { - log(Log::DebugLevel::Extra, TQString("writeBlock offset:%1 nbWords:%2 (size: %3)").arg(toHex(wordIndex, 8)).arg(toHex(nbWords, 8)).arg(toHex(data.size(), 8))); + log(Log::DebugLevel::Extra, TQString("writeBlock offset:%1 nbWords:%2 (size: %3)").tqarg(toHex(wordIndex, 8)).tqarg(toHex(nbWords, 8)).tqarg(toHex(data.size(), 8))); Q_ASSERT( wordIndex+nbWords<=data.size() ); // prepare data TQString s = "{"; diff --git a/src/progs/icd2/base/icd2_debug.cpp b/src/progs/icd2/base/icd2_debug.cpp index 6beb0e9..5d4a35f 100644 --- a/src/progs/icd2/base/icd2_debug.cpp +++ b/src/progs/icd2/base/icd2_debug.cpp @@ -27,7 +27,7 @@ bool Icd2::Debugger::waitForTargetMode(Pic::TargetMode mode) Port::msleep(200); } log(Log::LineType::Error, TQString("Timeout waiting for mode: %1 (target is in mode: %2).") - .arg(i18n(Pic::TARGET_MODE_LABELS[mode])).arg(i18n(Pic::TARGET_MODE_LABELS[rmode]))); + .tqarg(i18n(Pic::TARGET_MODE_LABELS[mode])).tqarg(i18n(Pic::TARGET_MODE_LABELS[rmode]))); return false; } @@ -59,7 +59,7 @@ bool Icd2::Debugger::setBreakpoints(const TQValueList

&addresses) { if ( addresses.count()==0 ) return specific()->setBreakpoint(Address()); for (uint i=0; inbCharsAddress()))); + log(Log::DebugLevel::Normal, TQString("Set breakpoint at %1").tqarg(toHexLabel(addresses[i], device()->nbCharsAddress()))); if ( !specific()->setBreakpoint(addresses[i]) ) return false; } return true; @@ -147,25 +147,25 @@ bool Icd2::DebugProgrammer::internalSetupHardware() if ( device()->is18Family() ) { Debugger *debug = static_cast(debugger()); reservedBank = static_cast(debug->specific())->reservedBank(); - filename = TQString("de18F_BANK%1.hex").arg(TQString(toString(NumberBase::Dec, reservedBank, 2))); - } else filename = TQString("de%1.hex").arg(fdata.debugExec); + filename = TQString("de18F_BANK%1.hex").tqarg(TQString(toString(NumberBase::Dec, reservedBank, 2))); + } else filename = TQString("de%1.hex").tqarg(fdata.debugExec); PURL::Url url = dir.findMatchingFilename(filename); - log(Log::DebugLevel::Normal, TQString(" Debug executive file: %1").arg(url.pretty())); + log(Log::DebugLevel::Normal, TQString(" Debug executive file: %1").tqarg(url.pretty())); if ( !url.exists() ) { - log(Log::LineType::Error, i18n("Could not find debug executive file \"%1\".").arg(url.pretty())); + log(Log::LineType::Error, i18n("Could not find debug executive file \"%1\".").tqarg(url.pretty())); return false; } // upload hex file Log::StringView sview; PURL::File file(url, sview); if ( !file.openForRead() ) { - log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").arg(url.pretty())); + log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").tqarg(url.pretty())); return false; } TQStringList errors; HexBuffer hbuffer; if ( !hbuffer.load(file.stream(), errors) ) { - log(Log::LineType::Error, i18n("Could not read debug executive file \"%1\": %2.").arg(url.pretty()).arg(errors[0])); + log(Log::LineType::Error, i18n("Could not read debug executive file \"%1\": %2.").tqarg(url.pretty()).tqarg(errors[0])); return false; } uint nbWords = device()->nbWords(Pic::MemoryRangeType::Code); @@ -199,7 +199,7 @@ bool Icd2::DebugProgrammer::internalSetupHardware() _deStart = specific()->findNonMaskStart(Pic::MemoryRangeType::Code, _deArray); _deEnd = specific()->findNonMaskEnd(Pic::MemoryRangeType::Code, _deArray); } - log(Log::DebugLevel::Extra, TQString("debug executive: \"%1\" %2:%3").arg(url.pretty()).arg(toHexLabel(_deStart, 4)).arg(toHexLabel(_deEnd, 4))); + log(Log::DebugLevel::Extra, TQString("debug executive: \"%1\" %2:%3").tqarg(url.pretty()).tqarg(toHexLabel(_deStart, 4)).tqarg(toHexLabel(_deEnd, 4))); return Icd2::ProgrammerBase::internalSetupHardware(); } @@ -251,9 +251,9 @@ bool Icd2::DebugProgrammer::writeDebugExecutive() uint inc = device()->addressIncrement(Pic::MemoryRangeType::Code); Address address = device()->range(Pic::MemoryRangeType::Code).start + inc * (_deStart + i); log(Log::LineType::Error, i18n("Device memory doesn't match debug executive (at address %1: reading %2 and expecting %3).") - .arg(toHexLabel(address, device()->nbCharsAddress())) - .arg(toHexLabel(data[i], device()->nbCharsWord(Pic::MemoryRangeType::Code))) - .arg(toHexLabel(_deArray[_deStart+i], device()->nbCharsWord(Pic::MemoryRangeType::Code)))); + .tqarg(toHexLabel(address, device()->nbCharsAddress())) + .tqarg(toHexLabel(data[i], device()->nbCharsWord(Pic::MemoryRangeType::Code))) + .tqarg(toHexLabel(_deArray[_deStart+i], device()->nbCharsWord(Pic::MemoryRangeType::Code)))); return false; } return true; @@ -311,7 +311,7 @@ bool Icd2::DebugProgrammer::internalRead(Device::Memory *mem, const Device::Memo bool Icd2::DebugProgrammer::readDebugExecutiveVersion() { if ( !hardware()->getDebugExecVersion(_debugExecutiveVersion) ) return false; - log(Log::LineType::Information, i18n(" Debug executive version: %1").arg(_debugExecutiveVersion.pretty())); + log(Log::LineType::Information, i18n(" Debug executive version: %1").tqarg(_debugExecutiveVersion.pretty())); return true; } diff --git a/src/progs/icd2/base/icd2_debug_specific.cpp b/src/progs/icd2/base/icd2_debug_specific.cpp index f856a61..cd05d06 100644 --- a/src/progs/icd2/base/icd2_debug_specific.cpp +++ b/src/progs/icd2/base/icd2_debug_specific.cpp @@ -50,7 +50,7 @@ bool Icd2::P16FDebuggerSpecific::beginInit(Device::Array *saved) if ( !hardware()->setTargetReset(Pic::ResetHeld) ) return false; double vdd; if ( !hardware()->readVoltage(Pic::TargetVdd, vdd) ) return false; - log(Log::DebugLevel::Normal, TQString(" Target Vdd: %1 V").arg(vdd)); + log(Log::DebugLevel::Normal, TQString(" Target Vdd: %1 V").tqarg(vdd)); if (saved) { saved->resize(1); @@ -73,14 +73,14 @@ bool Icd2::P16FDebuggerSpecific::endInit(BitValue expectedPC) //log(Log::LineType::Information, i18n("Detected custom ICD2")); } if ( value!=expectedPC ) { - log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(value, 4))); + log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(value, 4))); return false; } if ( !setBreakpoint(0x0000) ) return false; if ( !base().update() ) return false; if ( base().pc()!=expectedPC ) { - log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(base().pc(), 4))); + log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(base().pc(), 4))); return false; } return true; @@ -163,7 +163,7 @@ bool Icd2::P16F7X7DebuggerSpecific::init(bool last) log(Log::DebugLevel::Normal, "Probably detected custom ICD2"); } if ( value!=expectedPC ) - log(Log::DebugLevel::Normal, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(value, 4))); + log(Log::DebugLevel::Normal, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(value, 4))); if ( !setBreakpoint(0x0000) ) return false; if ( !base().update() ) return false; @@ -241,7 +241,7 @@ bool Icd2::P18FDebuggerSpecific::reset() log(Log::LineType::Information, i18n("Detected custom ICD2")); } if ( base().pc()!=expectedPC ) { - log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(base().pc(), 4))); + log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(base().pc(), 4))); return false; } return true; diff --git a/src/progs/icd2/base/icd2_prog.cpp b/src/progs/icd2/base/icd2_prog.cpp index 71300e1..dbea1d3 100644 --- a/src/progs/icd2/base/icd2_prog.cpp +++ b/src/progs/icd2/base/icd2_prog.cpp @@ -52,8 +52,8 @@ bool Icd2::ProgrammerBase::selfTest(bool ask) if ( i!=0 ) s += "; "; s += _testData.pretty(TestData::VoltageType(i)); } - log(Log::LineType::Warning, i18n("Self-test failed: %1").arg(s)); - if ( ask && !askContinue(i18n("Self-test failed (%1). Do you want to continue anyway?").arg(s)) ) { + log(Log::LineType::Warning, i18n("Self-test failed: %1").tqarg(s)); + if ( ask && !askContinue(i18n("Self-test failed (%1). Do you want to continue anyway?").tqarg(s)) ) { logUserAbort(); return false; } @@ -77,7 +77,7 @@ VersionData Icd2::ProgrammerBase::mplabVersion(::Programmer::FirmwareVersionType bool Icd2::ProgrammerBase::setupFirmware() { const FamilyData &fdata = FAMILY_DATA[family(device()->name())]; - log(Log::DebugLevel::Normal, TQString(" Firmware id is %1 and we want %2").arg(_firmwareId).arg(fdata.efid)); + log(Log::DebugLevel::Normal, TQString(" Firmware id is %1 and we want %2").tqarg(_firmwareId).tqarg(fdata.efid)); if ( fdata.efid==_firmwareId ) return true; log(Log::LineType::Information, i18n(" Incorrect firmware loaded.")); @@ -87,17 +87,17 @@ bool Icd2::ProgrammerBase::setupFirmware() TQString nameFilter = "ICD" + TQString::number(fdata.efid).rightJustify(2, '0') + "??????.hex"; TQStringList files = dir.files(nameFilter); if ( files.isEmpty() ) { - log(Log::LineType::Error, i18n("Could not find firmware file \"%1\" in directory \"%2\".").arg(nameFilter).arg(dir.path())); + log(Log::LineType::Error, i18n("Could not find firmware file \"%1\" in directory \"%2\".").tqarg(nameFilter).tqarg(dir.path())); return false; } // upload hex file PURL::Url url(dir, files[files.count()-1]); - log(Log::DebugLevel::Normal, TQString(" Firmware file: %1").arg(url.pretty())); + log(Log::DebugLevel::Normal, TQString(" Firmware file: %1").tqarg(url.pretty())); Log::StringView sview; PURL::File file(url, sview); if ( !file.openForRead() ) { - log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").arg(url.pretty())); + log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").tqarg(url.pretty())); return false; } if ( !doUploadFirmware(file) ) return false; diff --git a/src/progs/icd2/base/icd2_serial.cpp b/src/progs/icd2/base/icd2_serial.cpp index 5a25462..7f276f0 100644 --- a/src/progs/icd2/base/icd2_serial.cpp +++ b/src/progs/icd2/base/icd2_serial.cpp @@ -40,7 +40,7 @@ bool Icd2::SerialHardware::internalConnect(const TQString &mode) if ( !_port->send(a.data(), a.count()) ) return false; if ( !_port->receive(1, s) ) return false; if ( s.upper()!=mode ) { - log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").arg(mode)); + log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").tqarg(mode)); return false; } //log(Log::Debug, "set fast speed"); diff --git a/src/progs/icd2/base/icd2_usb.cpp b/src/progs/icd2/base/icd2_usb.cpp index 61fd5ae..7cc2458 100644 --- a/src/progs/icd2/base/icd2_usb.cpp +++ b/src/progs/icd2/base/icd2_usb.cpp @@ -128,7 +128,7 @@ bool Icd2::USBPort::poll(uint size, TQMemArray &a) if ( !doSequence(Poll, (char *)a.data(), size) ) return false; if (_poll) break; } - //log(Log::DebugLevel::Max, TQString("Receiced: \"%1\"").arg(toPrintable((const char *)a.data(), size))); + //log(Log::DebugLevel::Max, TQString("Receiced: \"%1\"").tqarg(toPrintable((const char *)a.data(), size))); return true; } @@ -152,7 +152,7 @@ Icd2::USBHardware::USBHardware(::Programmer::Base &base) bool Icd2::USBHardware::internalConnect(const TQString &mode) { // load control messages for USB device if needed - log(Log::DebugLevel::Extra, TQString("need firmware ? %1").arg(USBPort::findDevice(Microchip::VENDOR_ID, ID_FIRMWARE)!=0)); + log(Log::DebugLevel::Extra, TQString("need firmware ? %1").tqarg(USBPort::findDevice(Microchip::VENDOR_ID, ID_FIRMWARE)!=0)); if ( Port::USB::findDevice(Microchip::VENDOR_ID, ID_FIRMWARE) ) { USBPort port(ID_FIRMWARE, *this); if ( !port.open() ) return false; @@ -163,7 +163,7 @@ bool Icd2::USBHardware::internalConnect(const TQString &mode) } port.close(); for (uint i=0; i<10; i++) { - log(Log::DebugLevel::Extra, TQString("client here ? %1").arg(USBPort::findDevice(Microchip::VENDOR_ID, ID_CLIENT)!=0)); + log(Log::DebugLevel::Extra, TQString("client here ? %1").tqarg(USBPort::findDevice(Microchip::VENDOR_ID, ID_CLIENT)!=0)); if ( Port::USB::findDevice(Microchip::VENDOR_ID, ID_CLIENT) ) break; Port::msleep(1000); } diff --git a/src/progs/icd2/base/icd_prog.cpp b/src/progs/icd2/base/icd_prog.cpp index 3923650..00f7c25 100644 --- a/src/progs/icd2/base/icd_prog.cpp +++ b/src/progs/icd2/base/icd_prog.cpp @@ -19,7 +19,7 @@ bool Icd::ProgrammerBase::doUploadFirmware(PURL::File &file) TQStringList errors, warnings; Pic::Memory::WarningTypes warningTypes; if ( !memory.load(file.stream(), errors, warningTypes, warnings) ) { - log(Log::LineType::Error, i18n("Could not read firmware hex file \"%1\": %2.").arg(file.url().pretty()).arg(errors[0])); + log(Log::LineType::Error, i18n("Could not read firmware hex file \"%1\": %2.").tqarg(file.url().pretty()).tqarg(errors[0])); return false; } if ( warningTypes!=Pic::Memory::NoWarning ) { diff --git a/src/progs/icd2/xml/xml_icd2_parser.cpp b/src/progs/icd2/xml/xml_icd2_parser.cpp index 5cb1196..06eed27 100644 --- a/src/progs/icd2/xml/xml_icd2_parser.cpp +++ b/src/progs/icd2/xml/xml_icd2_parser.cpp @@ -29,7 +29,7 @@ uint Icd2::XmlToData::familyIndex(const TQString &family) const uint i = 0; for (; Icd2::FAMILY_DATA[i].efid!=0; i++) if ( family==Icd2::FAMILY_DATA[i].name ) break; - if ( Icd2::FAMILY_DATA[i].efid==0 ) qFatal(TQString("Family \"%1\" is unknown").arg(family)); + if ( Icd2::FAMILY_DATA[i].efid==0 ) qFatal(TQString("Family \"%1\" is unknown").tqarg(family)); return i; } diff --git a/src/progs/manager/debug_manager.cpp b/src/progs/manager/debug_manager.cpp index 0ae4e9f..d8b88b2 100644 --- a/src/progs/manager/debug_manager.cpp +++ b/src/progs/manager/debug_manager.cpp @@ -81,7 +81,7 @@ bool Debugger::Manager::internalInit() if ( !coffUrl().exists() ) return false; Log::Base log; log.setView(compileView()); - log.log(Log::LineType::Information, i18n("Parsing COFF file: %1").arg(coffUrl().pretty())); + log.log(Log::LineType::Information, i18n("Parsing COFF file: %1").tqarg(coffUrl().pretty())); _coff = new Coff::TextObject(_data, coffUrl()); if ( !_coff->parse(log) ) { delete _coff; @@ -110,7 +110,7 @@ void Debugger::Manager::freeActiveBreakpoint() uint max = programmerGroup()->maxNbBreakpoints(deviceData()); Q_ASSERT( nb<=max && max!=0 ); if ( nb==max ) { - log(Log::LineType::Warning, i18n("The number of active breakpoints is higher than the maximum for the current debugger (%1): disabling the last breakpoint.").arg(max)); + log(Log::LineType::Warning, i18n("The number of active breakpoints is higher than the maximum for the current debugger (%1): disabling the last breakpoint.").tqarg(max)); Breakpoint::list().setState(last, Breakpoint::Disabled); } } @@ -213,7 +213,7 @@ bool Debugger::Manager::updateRegister(const Register::TypeData &data) int index = rdata->portIndex(data.address()); if ( index!=-1 ) { TQMap data; - if ( !debugger()->updatePortStatus(index, data) ) return false; + if ( !debugger()->updatePorttqStatus(index, data) ) return false; Register::list().setPortData(index, data); } } @@ -384,7 +384,7 @@ bool Debugger::Manager::prepareDebugging() break; } if ( i==Programmer::Nb_InputFileTypes ) { - log(Log::LineType::Error, i18n("Cannot start debugging session without input file (%1).").arg(first.pretty())); + log(Log::LineType::Error, i18n("Cannot start debugging session without input file (%1).").tqarg(first.pretty())); return false; } } diff --git a/src/progs/manager/prog_manager.cpp b/src/progs/manager/prog_manager.cpp index dac29ee..fddd60c 100644 --- a/src/progs/manager/prog_manager.cpp +++ b/src/progs/manager/prog_manager.cpp @@ -61,8 +61,8 @@ bool Programmer::Manager::internalInitProgramming(bool) } if ( !group().isSupported(device()->name()) ) { if ( group().isSoftware() && group().supportedDevices().isEmpty() ) - sorry(i18n("Could not detect supported devices for \"%1\". Please check installation.").arg(group().label())); - else sorry(i18n("The current programmer \"%1\" does not support device \"%2\".").arg(group().label()).arg(device()->name())); + sorry(i18n("Could not detect supported devices for \"%1\". Please check installation.").tqarg(group().label())); + else sorry(i18n("The current programmer \"%1\" does not support device \"%2\".").tqarg(group().label()).tqarg(device()->name())); return false; } createProgrammer(device()); diff --git a/src/progs/picdem_bootloader/base/picdem_bootloader.cpp b/src/progs/picdem_bootloader/base/picdem_bootloader.cpp index 1e06537..347ec52 100644 --- a/src/progs/picdem_bootloader/base/picdem_bootloader.cpp +++ b/src/progs/picdem_bootloader/base/picdem_bootloader.cpp @@ -42,13 +42,13 @@ bool PicdemBootloader::Port::receive(uint nb, TQMemArray &data) { data.resize(nb); if ( !read(0x81, (char *)data.data(), nb) ) return false; - log(Log::DebugLevel::Max, TQString("received: \"%1\"").arg(toPrintable(data, PrintEscapeAll))); + log(Log::DebugLevel::Max, TQString("received: \"%1\"").tqarg(toPrintable(data, PrintEscapeAll))); return true; } bool PicdemBootloader::Port::send(const TQMemArray &cmd) { - log(Log::DebugLevel::Extra, TQString("send: \"%1\"").arg(toPrintable(cmd, PrintEscapeAll))); + log(Log::DebugLevel::Extra, TQString("send: \"%1\"").tqarg(toPrintable(cmd, PrintEscapeAll))); return write(0x01, (const char *)cmd.data(), cmd.count()); } @@ -81,7 +81,7 @@ bool PicdemBootloader::Hardware::internalConnectHardware() cmd.fill(0); if ( !port().sendAndReceive(cmd, 4) ) return false; VersionData version(cmd[3], cmd[2], 0); - log(Log::LineType::Information, i18n("Bootloader version %1 detected").arg(version.pretty())); + log(Log::LineType::Information, i18n("Bootloader version %1 detected").tqarg(version.pretty())); if ( version.majorNum()!=1 ) { log(Log::LineType::Error, i18n("Only bootloader version 1.x is supported")); return false; @@ -108,7 +108,7 @@ bool PicdemBootloader::Hardware::write(Pic::MemoryRangeType type, const Device:: if ( i>=0x400 ) continue; if ( data[i]==device().mask(Pic::MemoryRangeType::Code) ) continue; uint address = device().addressIncrement(Pic::MemoryRangeType::Code) * i; - log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").arg(toHexLabel(address, device().nbCharsAddress()))); + log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").tqarg(toHexLabel(address, device().nbCharsAddress()))); break; } } @@ -157,9 +157,9 @@ bool PicdemBootloader::Hardware::read(Pic::MemoryRangeType type, Device::Array & if ( nbBytesWord==2 ) data[index] |= (cmd[5 + k+1] << 8); if ( vdata && index>=0x0800 && data[index]!=varray[index] ) { log(Log::LineType::Error, i18n("Device memory does not match hex file (at address 0x%2: reading 0x%3 and expecting 0x%4).") - .arg(TQString(toHex(index/2, device().nbCharsAddress()))) - .arg(TQString(toHex(data[index], device().nbCharsWord(type)))) - .arg(TQString(toHex(varray[index], device().nbCharsWord(type))))); + .tqarg(TQString(toHex(index/2, device().nbCharsAddress()))) + .tqarg(TQString(toHex(data[index], device().nbCharsWord(type)))) + .tqarg(TQString(toHex(varray[index], device().nbCharsWord(type))))); return false; } } diff --git a/src/progs/pickit1/base/pickit1.cpp b/src/progs/pickit1/base/pickit1.cpp index 31d5787..55d98e4 100644 --- a/src/progs/pickit1/base/pickit1.cpp +++ b/src/progs/pickit1/base/pickit1.cpp @@ -38,7 +38,7 @@ bool Pickit1::Baseline::incrementPC(uint nb) Array cmd; uint high = (nb >> 8) & 0xFF; log(Log::DebugLevel::Extra, TQString("work around bug in firmware (nb_inc=%1 high=%2)") - .arg(toHexLabel(nb, 4)).arg(toHexLabel(high, 2))); + .tqarg(toHexLabel(nb, 4)).tqarg(toHexLabel(high, 2))); if ( high==1 ) { cmd[0] = 'I'; cmd[1] = 0x40; diff --git a/src/progs/pickit2/base/pickit.cpp b/src/progs/pickit2/base/pickit.cpp index e6284e1..3344ef8 100644 --- a/src/progs/pickit2/base/pickit.cpp +++ b/src/progs/pickit2/base/pickit.cpp @@ -52,14 +52,14 @@ bool Pickit::USBPort::command(const char *s) bool Pickit::USBPort::command(const Array &cmd) { - log(Log::DebugLevel::Extra, TQString("send command: \"%1\"").arg(cmd.pretty())); + log(Log::DebugLevel::Extra, TQString("send command: \"%1\"").tqarg(cmd.pretty())); return write(writeEndPoint(), (const char *)cmd._data.data(), cmd.length()); } bool Pickit::USBPort::receive(Pickit::Array &array) { if ( !read(readEndPoint(), (char *)array._data.data(), array.length()) ) return false; - log(Log::DebugLevel::Max, TQString("received: \"%1\"").arg(array.pretty())); + log(Log::DebugLevel::Max, TQString("received: \"%1\"").tqarg(array.pretty())); return true; } @@ -80,7 +80,7 @@ bool Pickit::USBPort::getMode(VersionData &version, ::Programmer::Mode &mode) bool Pickit::USBPort::receiveWords(uint nbBytesWord, uint nbRead, TQValueVector &words, uint offset) { - log(Log::DebugLevel::Max, TQString("receive words nbBytesWord=%1 nbRead=%2 offset=%3").arg(nbBytesWord).arg(nbRead).arg(offset)); + log(Log::DebugLevel::Max, TQString("receive words nbBytesWord=%1 nbRead=%2 offset=%3").tqarg(nbBytesWord).tqarg(nbRead).tqarg(offset)); Array a = array(); TQMemArray data(nbRead*a.length()); uint l = 0; diff --git a/src/progs/pickit2/base/pickit2.cpp b/src/progs/pickit2/base/pickit2.cpp index 4c06eb9..6a010ff 100644 --- a/src/progs/pickit2/base/pickit2.cpp +++ b/src/progs/pickit2/base/pickit2.cpp @@ -50,9 +50,9 @@ bool Pickit2::USBPort::readFirmwareCodeMemory(Device::Array &data, const Device: data[index]= read[5 + 2*k] & 0xFF | (read[6 + 2*k] << 8); if ( vdata && index>=0x1000 && index<0x3FF0 && data[index]!=(*vdata)[index] ) { log(Log::LineType::Error, i18n("Firmware memory does not match hex file (at address 0x%2: reading 0x%3 and expecting 0x%4).") - .arg(TQString(toHex(index/2, device->nbCharsAddress()))) - .arg(TQString(toHex(data[index], device->nbCharsWord(Pic::MemoryRangeType::Code)))) - .arg(TQString(toHex((*vdata)[index], device->nbCharsWord(Pic::MemoryRangeType::Code))))); + .tqarg(TQString(toHex(index/2, device->nbCharsAddress()))) + .tqarg(TQString(toHex(data[index], device->nbCharsWord(Pic::MemoryRangeType::Code)))) + .tqarg(TQString(toHex((*vdata)[index], device->nbCharsWord(Pic::MemoryRangeType::Code))))); return false; } } @@ -111,7 +111,7 @@ bool Pickit2::USBPort::uploadFirmware(const Pic::Memory &memory, ProgressMonitor //----------------------------------------------------------------------------- bool Pickit2::Hardware::readVoltages(VoltagesData &voltages) { - log(Log::DebugLevel::Extra, TQString("readVoltages: Firmware is %1").arg(_base.firmwareVersion().pretty())); + log(Log::DebugLevel::Extra, TQString("readVoltages: Firmware is %1").tqarg(_base.firmwareVersion().pretty())); if ( _base.firmwareVersion()name())); + log(Log::LineType::Error, i18n("Calibration firmware file seems incompatible with selected device %1.").tqarg(device()->name())); return false; } if ( !askContinue(i18n("This will overwrite the device code memory. Continue anyway?")) ) return false; diff --git a/src/progs/pickit2_bootloader/base/pickit2_bootloader.cpp b/src/progs/pickit2_bootloader/base/pickit2_bootloader.cpp index d080481..7620a9b 100644 --- a/src/progs/pickit2_bootloader/base/pickit2_bootloader.cpp +++ b/src/progs/pickit2_bootloader/base/pickit2_bootloader.cpp @@ -33,7 +33,7 @@ bool Pickit2Bootloader::Hardware::internalConnectHardware() } } } - log(Log::LineType::Information, i18n("Bootloader version %1 detected.").arg(version.pretty())); + log(Log::LineType::Information, i18n("Bootloader version %1 detected.").tqarg(version.pretty())); if ( version.majorNum()!=2 ) { log(Log::LineType::Error, i18n("Only bootloader version 2.x is supported.")); return false; @@ -50,7 +50,7 @@ bool Pickit2Bootloader::Hardware::write(Pic::MemoryRangeType type, const Device: if ( i>=0x1000 && i<0x3FF0 ) continue; if ( data[i]==device().mask(Pic::MemoryRangeType::Code) ) continue; uint address = device().addressIncrement(Pic::MemoryRangeType::Code) * i; - log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").arg(toHexLabel(address, device().nbCharsAddress()))); + log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").tqarg(toHexLabel(address, device().nbCharsAddress()))); break; } return port().writeFirmwareCodeMemory(data, _base.progressMonitor()); diff --git a/src/progs/pickit2v2/base/pickit2v2.cpp b/src/progs/pickit2v2/base/pickit2v2.cpp index a79484b..478a0f7 100644 --- a/src/progs/pickit2v2/base/pickit2v2.cpp +++ b/src/progs/pickit2v2/base/pickit2v2.cpp @@ -45,9 +45,9 @@ bool Pickit2V2::Hardware::setTarget() return true; } -bool Pickit2V2::Hardware::readStatus(ushort &status) +bool Pickit2V2::Hardware::readtqStatus(ushort &status) { - if ( !port().command(ReadStatus) ) return false; + if ( !port().command(ReadtqStatus) ) return false; Array a; if ( !port().receive(a) ) return false; status = (a[1] << 8) + a[0]; @@ -68,7 +68,7 @@ bool Pickit2V2::Hardware::executeScript(uint i) { Q_ASSERT( i!=0 ); const ScriptData &sdata = SCRIPT_DATA[i-1]; - log(Log::DebugLevel::Extra, TQString("execute script #%1: %2").arg(i).arg(sdata.name)); + log(Log::DebugLevel::Extra, TQString("execute script #%1: %2").tqarg(i).tqarg(sdata.name)); return sendScript(sdata.data, sdata.length); } @@ -78,7 +78,7 @@ bool Pickit2V2::Hardware::getScriptBufferChecksum(uint &checksum) Array array; if ( !port().receive(array) ) return false; checksum = (array[0] << 24) + (array[1] << 16) + (array[2] << 8) + array[3]; - log(Log::DebugLevel::Extra, TQString("get script buffer checksum: %1").arg(toHexLabel(checksum, 8))); + log(Log::DebugLevel::Extra, TQString("get script buffer checksum: %1").tqarg(toHexLabel(checksum, 8))); return true; } @@ -87,7 +87,7 @@ bool Pickit2V2::Hardware::downloadScript(ScriptType type, uint i) if (i==0 ) return true; // empty script const ScriptData &sdata = SCRIPT_DATA[i-1]; log(Log::DebugLevel::Max, TQString(" download script #%1 (\"%2\") at position #%3") - .arg(i-1).arg(sdata.name).arg(toHexLabel(type, 2))); + .tqarg(i-1).tqarg(sdata.name).tqarg(toHexLabel(type, 2))); Array cmd; cmd[0] = DownloadScript; cmd[1] = type; @@ -168,7 +168,7 @@ bool Pickit2V2::Hardware::setVppVoltage(double value, double threshold) bool Pickit2V2::Hardware::setVddOn(bool on) { - log(Log::DebugLevel::Extra, TQString("Vdd set to %1, self powered is %2").arg(on).arg(_base.isTargetSelfPowered())); + log(Log::DebugLevel::Extra, TQString("Vdd set to %1, self powered is %2").tqarg(on).tqarg(_base.isTargetSelfPowered())); ushort script[2]; script[0] = (on ? VddGroundOff : VddOff); if ( _base.isTargetSelfPowered() ) script[1] = (on ? VddOff : VddGroundOff); @@ -215,7 +215,7 @@ bool Pickit2V2::Hardware::readVoltages(VoltagesData &voltagesData) bool Pickit2V2::Hardware::downloadAddress(Address address) { - log(Log::DebugLevel::Max, TQString("download address %1").arg(toHexLabel(address, 6))); + log(Log::DebugLevel::Max, TQString("download address %1").tqarg(toHexLabel(address, 6))); Array cmd; cmd[0] = ClearDownloadBuffer; cmd[1] = DownloadData; @@ -229,7 +229,7 @@ bool Pickit2V2::Hardware::downloadAddress(Address address) bool Pickit2V2::Hardware::runScript(ScriptType stype, uint repetitions, uint nbNoLens) { log(Log::DebugLevel::Max, TQString("run script %1: repetitions=%2 nbNoLen=%3") - .arg(toHexLabel(stype, 2)).arg(repetitions).arg(nbNoLens)); + .tqarg(toHexLabel(stype, 2)).tqarg(repetitions).tqarg(nbNoLens)); #if 0 // ALTERNATE METHOD const Data &d = data(device().name()); for (uint i=0; i=nbWords ) break; data[i] = words[k]; diff --git a/src/progs/pickit2v2/base/pickit2v2.h b/src/progs/pickit2v2/base/pickit2v2.h index f50adb1..d1bd567 100644 --- a/src/progs/pickit2v2/base/pickit2v2.h +++ b/src/progs/pickit2v2/base/pickit2v2.h @@ -18,7 +18,7 @@ namespace Pickit2V2 enum FirmwareCommand { EnterBootloader = 0x42, NoOperation = 0x5A, FirmwareVersion = 0x76, - SetVdd = 0xA0, SetVpp = 0xA1, ReadStatus = 0xA2, ReadVoltages = 0xA3, + SetVdd = 0xA0, SetVpp = 0xA1, ReadtqStatus = 0xA2, ReadVoltages = 0xA3, DownloadScript = 0xA4, RunScript = 0xA5, ExecuteScript = 0xA6, ClearDownloadBuffer = 0xA7, DownloadData = 0xA8, ClearUploadBuffer = 0xA9, UploadData = 0xAA, ClearScriptBuffer = 0xAB, UploadDataNoLen = 0xAC, @@ -94,7 +94,7 @@ public: bool setTarget(); bool setFastProgramming(bool fast); virtual bool readVoltages(VoltagesData &voltagesData); - bool readStatus(ushort &status); + bool readtqStatus(ushort &status); bool readMemory(Pic::MemoryRangeType type, ::Device::Array &data, const ::Programmer::VerifyData *vdata); bool writeMemory(Pic::MemoryRangeType type, const ::Device::Array &data, bool force); bool eraseAll(); diff --git a/src/progs/pickit2v2/base/pickit2v2_prog.cpp b/src/progs/pickit2v2/base/pickit2v2_prog.cpp index 74b82b6..67788e9 100644 --- a/src/progs/pickit2v2/base/pickit2v2_prog.cpp +++ b/src/progs/pickit2v2/base/pickit2v2_prog.cpp @@ -59,7 +59,7 @@ bool Pickit2V2::Base::identifyDevice() if ( !hardware().executeScript(fdata.progExitScript) ) return false; uint rawId = (data[2]<<8) + data[1]; if (fdata.progMemShift) rawId >>= 1; - log(Log::DebugLevel::Normal, TQString("Read id for family %1: %2").arg(fdata.architecture.key()).arg(toHexLabelAbs(rawId))); + log(Log::DebugLevel::Normal, TQString("Read id for family %1: %2").tqarg(fdata.architecture.key()).tqarg(toHexLabelAbs(rawId))); TQMap ids; ::Group::Base::ConstIterator it; for (it=group().begin(); it!=group().end(); ++it) { @@ -69,9 +69,9 @@ bool Pickit2V2::Base::identifyDevice() if ( data->matchId(rawId, idata) ) ids[it.key()] = idata; } if ( ids.count()!=0 ) { - log(Log::LineType::Information, i18n("Read id: %1").arg(device()->idNames(ids).join("; "))); + log(Log::LineType::Information, i18n("Read id: %1").tqarg(device()->idNames(ids).join("; "))); if ( ids.contains(device()->name()) ) return true; - message = i18n("Read id does not match the specified device name \"%1\".").arg(device()->name()); + message = i18n("Read id does not match the specified device name \"%1\".").tqarg(device()->name()); break; } } @@ -79,7 +79,7 @@ bool Pickit2V2::Base::identifyDevice() logUserAbort(); return false; } - log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").arg(device()->name())); + log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").tqarg(device()->name())); return true; } @@ -92,13 +92,13 @@ bool Pickit2V2::Base::setTarget() bool Pickit2V2::Base::selfTest(bool ask) { ushort status; - if ( !hardware().readStatus(status) ) return false; + if ( !hardware().readtqStatus(status) ) return false; TQString error; if ( status & VppError ) error += i18n("Vpp voltage level error; "); if ( status & VddError ) error += i18n("Vdd voltage level error; "); if ( error.isEmpty() ) return true; - log(Log::LineType::Warning, i18n("Self-test failed: %1").arg(error)); - if ( ask && !askContinue(i18n("Self-test failed (%1). Do you want to continue anyway?").arg(error)) ) { + log(Log::LineType::Warning, i18n("Self-test failed: %1").tqarg(error)); + if ( ask && !askContinue(i18n("Self-test failed (%1). Do you want to continue anyway?").tqarg(error)) ) { logUserAbort(); return false; } diff --git a/src/progs/psp/base/psp.cpp b/src/progs/psp/base/psp.cpp index 96dcf4e..0f86180 100644 --- a/src/progs/psp/base/psp.cpp +++ b/src/progs/psp/base/psp.cpp @@ -281,8 +281,8 @@ bool Psp::Hardware::readMemory(Pic::MemoryRangeType type, Device::Array &data, c for (uint i=0; ireceive(2, a) ) return false; data[i] = (a[0] << 8) + a[1]; -// log(Log::DebugLevel::Max, TQString("code data %1: %2 (%3, %4)").arg(i).arg(toHexLabel(data[i], 4)) -// .arg(toHexLabel(a[0], 2)).arg(toHexLabel(a[1], 2))); +// log(Log::DebugLevel::Max, TQString("code data %1: %2 (%3, %4)").tqarg(i).tqarg(toHexLabel(data[i], 4)) +// .tqarg(toHexLabel(a[0], 2)).tqarg(toHexLabel(a[1], 2))); } if ( !port()->receiveEnd() ) return false; break; diff --git a/src/progs/psp/base/psp_serial.cpp b/src/progs/psp/base/psp_serial.cpp index b29be31..7da4c00 100644 --- a/src/progs/psp/base/psp_serial.cpp +++ b/src/progs/psp/base/psp_serial.cpp @@ -48,7 +48,7 @@ bool Psp::SerialPort::reset() bool Psp::SerialPort::command(uchar c, uint nbBytes, TQMemArray &a) { - log(Log::DebugLevel::Extra, TQString("Command %1").arg(toHexLabel(c, 2))); + log(Log::DebugLevel::Extra, TQString("Command %1").tqarg(toHexLabel(c, 2))); if ( !sendChar(c) ) return false; return receive(nbBytes, a); } @@ -57,7 +57,7 @@ bool Psp::SerialPort::checkAck(uchar ec, uchar rc) { if ( ec==rc ) return true; log(Log::LineType::Error, i18n("Incorrect ack: expecting %1, received %2") - .arg(TQString(toHex(ec, 2))).arg(TQString(toHex(rc, 2)))); + .tqarg(TQString(toHex(ec, 2))).tqarg(TQString(toHex(rc, 2)))); return false; } @@ -65,7 +65,7 @@ bool Psp::SerialPort::checkEnd(uchar c) { if ( c==0 ) return true; log(Log::LineType::Error, i18n("Incorrect received data end: expecting 00, received %1") - .arg(TQString(toHex(c, 2)))); + .tqarg(TQString(toHex(c, 2)))); return false; } diff --git a/src/progs/sdcdb/base/sdcdb_debug.cpp b/src/progs/sdcdb/base/sdcdb_debug.cpp index 3a7aa9f..d8d4ad4 100644 --- a/src/progs/sdcdb/base/sdcdb_debug.cpp +++ b/src/progs/sdcdb/base/sdcdb_debug.cpp @@ -125,7 +125,7 @@ bool GPSim::Debugger::getRegister(const TQString &name, BitValue &value) for (; iregistersData(); TQString name = toHex(address, rdata.nbCharsAddress()); if ( hardware()->version()registersData(); - TQString s = TQString("%1 = %2").arg(name).arg(toHexLabel(value, rdata.nbChars())); + TQString s = TQString("%1 = %2").tqarg(name).tqarg(toHexLabel(value, rdata.nbChars())); return hardware()->execute(s, true); } bool GPSim::Debugger::setRegister(Address address, BitValue value) { const Pic::RegistersData &rdata = device()->registersData(); - TQString s = TQString("ramData[$%1]").arg(toHex(address, rdata.nbCharsAddress())); + TQString s = TQString("ramData[$%1]").tqarg(toHex(address, rdata.nbCharsAddress())); return setRegister(s, value); } @@ -194,7 +194,7 @@ bool GPSim::Debugger::writeWreg(BitValue value) return setRegister("W", value); } -bool GPSim::Debugger::updatePortStatus(uint index, TQMap &bits) +bool GPSim::Debugger::updatePorttqStatus(uint index, TQMap &bits) { for (uint i=0; iregistersData().hasPortBit(index, i) ) continue; @@ -203,7 +203,7 @@ bool GPSim::Debugger::updatePortStatus(uint index, TQMapexecute("symbol " + name, true, &lines) ) return false; TQString pattern = "^(\\w+)=([^\\s])+\\s*", value; if ( !findRegExp(lines, pattern, "bitState", value) || value.length()!=1 ) { - log(Log::Error, i18n("Error reading state of IO bit: %1").arg(name)); + log(Log::Error, i18n("Error reading state of IO bit: %1").tqarg(name)); return false; } switch (value[0].latin1()) { @@ -217,24 +217,24 @@ bool GPSim::Debugger::updatePortStatus(uint index, TQMap &list); virtual bool readRegister(const Register::TypeData &data, BitValue &value); virtual bool writeRegister(const Register::TypeData &data, BitValue value); - virtual bool updatePortStatus(uint index, TQMap &bits); + virtual bool updatePorttqStatus(uint index, TQMap &bits); private: uint _nbBreakpoints; diff --git a/src/progs/tbl_bootloader/base/tbl_bootloader.cpp b/src/progs/tbl_bootloader/base/tbl_bootloader.cpp index 381e827..3b8c324 100644 --- a/src/progs/tbl_bootloader/base/tbl_bootloader.cpp +++ b/src/progs/tbl_bootloader/base/tbl_bootloader.cpp @@ -81,12 +81,12 @@ bool TinyBootloader::Hardware::verifyDeviceId() for (uint i=0; i(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/boost/boostbasic.cpp b/src/tools/boost/boostbasic.cpp index 4bec1e9..dc449f8 100644 --- a/src/tools/boost/boostbasic.cpp +++ b/src/tools/boost/boostbasic.cpp @@ -19,7 +19,7 @@ bool Boost::CompilerBasic::checkExecutableResult(bool, TQStringList &lines) cons //---------------------------------------------------------------------------- TQString Boost::GroupBasic::informationText() const { - return i18n("BoostBasic Compiler is a Basic compiler distributed by SourceBoost Technologies.").arg("http://www.sourceboost.com/Products/BoostBasic/Overview.html"); + return i18n("BoostBasic Compiler is a Basic compiler distributed by SourceBoost Technologies.").tqarg("http://www.sourceboost.com/Products/BoostBasic/Overview.html"); } Tool::SourceGenerator *Boost::GroupBasic::sourceGeneratorFactory() const diff --git a/src/tools/boost/boostc.cpp b/src/tools/boost/boostc.cpp index 13d7ad2..74047a0 100644 --- a/src/tools/boost/boostc.cpp +++ b/src/tools/boost/boostc.cpp @@ -19,7 +19,7 @@ bool Boost::CompilerC::checkExecutableResult(bool, TQStringList &lines) const //---------------------------------------------------------------------------- TQString Boost::GroupC::informationText() const { - return i18n("BoostC Compiler is a C compiler distributed by SourceBoost Technologies.").arg("http://www.sourceboost.com/Products/BoostC/Overview.html"); + return i18n("BoostC Compiler is a C compiler distributed by SourceBoost Technologies.").tqarg("http://www.sourceboost.com/Products/BoostC/Overview.html"); } Tool::SourceGenerator *Boost::GroupC::sourceGeneratorFactory() const diff --git a/src/tools/boost/boostcpp.cpp b/src/tools/boost/boostcpp.cpp index 7e4b968..7b83314 100644 --- a/src/tools/boost/boostcpp.cpp +++ b/src/tools/boost/boostcpp.cpp @@ -20,7 +20,7 @@ bool Boost::CompilerCpp::checkExecutableResult(bool, TQStringList &lines) const //---------------------------------------------------------------------------- TQString Boost::GroupCpp::informationText() const { - return i18n("BoostC++ Compiler is a C compiler distributed by SourceBoost Technologies.").arg("http://www.sourceboost.com/Products/BoostCpp/Overview.html"); + return i18n("BoostC++ Compiler is a C compiler distributed by SourceBoost Technologies.").tqarg("http://www.sourceboost.com/Products/BoostCpp/Overview.html"); } Tool::SourceGenerator *Boost::GroupCpp::sourceGeneratorFactory() const diff --git a/src/tools/c18/c18.cpp b/src/tools/c18/c18.cpp index 8f23cb1..5c2b725 100644 --- a/src/tools/c18/c18.cpp +++ b/src/tools/c18/c18.cpp @@ -82,5 +82,5 @@ Tool::Group::BaseData C18::Group::baseFactory(Tool::Category category) const TQString C18::Group::informationText() const { - return i18n("C18 is a C compiler distributed by Microchip.").arg("http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010014&part=SW006011"); + return i18n("C18 is a C compiler distributed by Microchip.").tqarg("http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010014&part=SW006011"); } diff --git a/src/tools/cc5x/cc5x.cpp b/src/tools/cc5x/cc5x.cpp index 71025f8..65b7b98 100644 --- a/src/tools/cc5x/cc5x.cpp +++ b/src/tools/cc5x/cc5x.cpp @@ -52,7 +52,7 @@ Compile::Config *CC5X::Group::configFactory(::Project *project) const TQString CC5X::Group::informationText() const { - return i18n("CC5X is a C compiler distributed by B Knudsen Data.").arg("http://www.bknd.com/cc5x/index.shtml"); + return i18n("CC5X is a C compiler distributed by B Knudsen Data.").tqarg("http://www.bknd.com/cc5x/index.shtml"); } Tool::Group::BaseData CC5X::Group::baseFactory(Tool::Category category) const diff --git a/src/tools/ccsc/ccsc.cpp b/src/tools/ccsc/ccsc.cpp index 5973d6d..0b817a3 100644 --- a/src/tools/ccsc/ccsc.cpp +++ b/src/tools/ccsc/ccsc.cpp @@ -87,7 +87,7 @@ Compile::Config *CCSC::Group::configFactory(::Project *project) const TQString CCSC::Group::informationText() const { - return i18n("CCS Compiler is a C compiler distributed by CCS.").arg("http://www.ccsinfo.com/content.php?page=compilers"); + return i18n("CCS Compiler is a C compiler distributed by CCS.").tqarg("http://www.ccsinfo.com/content.php?page=compilers"); } Tool::Group::BaseData CCSC::Group::baseFactory(Tool::Category category) const diff --git a/src/tools/ccsc/ccsc_compile.cpp b/src/tools/ccsc/ccsc_compile.cpp index c988013..15ccedf 100644 --- a/src/tools/ccsc/ccsc_compile.cpp +++ b/src/tools/ccsc/ccsc_compile.cpp @@ -83,7 +83,7 @@ void CCSC::CompileFile::done(int code) PURL::Url url = PURL::Url(directory(), inputFilepath(0)).toExtension("err"); Log::StringView sview; PURL::File file(url, sview); - if ( !file.openForRead() ) doLog(Log::LineType::Error, i18n("Could not find error file (%1).").arg(url.pretty()), TQString(), 0); + if ( !file.openForRead() ) doLog(Log::LineType::Error, i18n("Could not find error file (%1).").tqarg(url.pretty()), TQString(), 0); else { TQStringList lines = file.readLines(); for (uint i=0; iGPUtils is an open-source assembler and linker suite.
").arg("http://gputils.sourceforge.net"); + return i18n("GPUtils is an open-source assembler and linker suite.
").tqarg("http://gputils.sourceforge.net"); } Tool::Group::BaseData GPUtils::Group::baseFactory(Tool::Category category) const diff --git a/src/tools/gputils/gputils_generator.cpp b/src/tools/gputils/gputils_generator.cpp index c3b67a8..7fd9a1f 100644 --- a/src/tools/gputils/gputils_generator.cpp +++ b/src/tools/gputils/gputils_generator.cpp @@ -77,8 +77,8 @@ SourceLine::List GPUtils::SourceGenerator::sourceFileContent(PURL::ToolType, con if ( !hasShared ) { for (uint i=1; i -#include +#include #include #include #include diff --git a/src/tools/gui/toolchain_config_center.cpp b/src/tools/gui/toolchain_config_center.cpp index f2a84fb..6948c3a 100644 --- a/src/tools/gui/toolchain_config_center.cpp +++ b/src/tools/gui/toolchain_config_center.cpp @@ -10,7 +10,7 @@ #include "toolchain_config_center.h" #include -#include +#include #include #include "tools/list/tools_config_widget.h" diff --git a/src/tools/gui/toolchain_config_widget.cpp b/src/tools/gui/toolchain_config_widget.cpp index e30a26d..1b92cc2 100644 --- a/src/tools/gui/toolchain_config_widget.cpp +++ b/src/tools/gui/toolchain_config_widget.cpp @@ -9,7 +9,7 @@ #include "toolchain_config_widget.h" #include -#include +#include #include #include #include @@ -162,8 +162,8 @@ void ToolchainConfigWidget::checkExecutableDone() _data[i].checkLines = _data[i].process->sout() + _data[i].process->serr(); const Tool::Base *base = _group.base(i); TQString exec = base->baseExecutable(withWine(), outputType()); - if ( base->checkExecutableResult(withWine(), _data[i].checkLines) ) _data[i].label->setText(i18n("\"%1\" found").arg(exec)); - else _data[i].label->setText(i18n("\"%1\" not recognized").arg(exec)); + if ( base->checkExecutableResult(withWine(), _data[i].checkLines) ) _data[i].label->setText(i18n("\"%1\" found").tqarg(exec)); + else _data[i].label->setText(i18n("\"%1\" not recognized").tqarg(exec)); break; } } @@ -185,7 +185,7 @@ void ToolchainConfigWidget::checkDevicesDone() if ( !_devicesData[i].done ) return; list += _group.getSupportedDevices(_devicesData[i].checkLines.join("\n")); } - _devicesLabel->setText(i18n("Detected (%1)").arg(list.count())); + _devicesLabel->setText(i18n("Detected (%1)").tqarg(list.count())); } bool ToolchainConfigWidget::withWine() const @@ -229,13 +229,13 @@ void ToolchainConfigWidget::detect() connect(_data[k].process, TQT_SIGNAL(done(int)), TQT_SLOT(checkExecutableDone())); connect(_data[k].process, TQT_SIGNAL(timeout()), TQT_SLOT(checkExecutableDone())); TQString exec = baseExecutable(k); - if ( !_data[k].process->start(10000) ) _data[k].label->setText(i18n("\"%1\" not found").arg(exec)); - else _data[k].label->setText(i18n("Detecting \"%1\"...").arg(exec)); + if ( !_data[k].process->start(10000) ) _data[k].label->setText(i18n("\"%1\" not found").tqarg(exec)); + else _data[k].label->setText(i18n("Detecting \"%1\"...").tqarg(exec)); } } if ( _group.checkDevicesCategory()==Tool::Category::Nb_Types ) { TQValueVector supported = _group.supportedDevices(); - _devicesLabel->setText(i18n("Hardcoded (%1)").arg(supported.count())); + _devicesLabel->setText(i18n("Hardcoded (%1)").tqarg(supported.count())); } else { for (uint i=0; i<_devicesData.count(); i++) { delete _devicesData[i].process; @@ -265,8 +265,8 @@ void ToolchainConfigWidget::showDetails() TQString s; const Tool::Base *base = _group.base(k); if ( base->checkExecutable() ) { - s += i18n("Command for executable detection:
%1
").arg(_data[k].command); - s += i18n("Version string:
%1
").arg(_data[k].checkLines.join("
")); + s += i18n("Command for executable detection:
%1
").tqarg(_data[k].command); + s += i18n("Version string:
%1
").tqarg(_data[k].checkLines.join("
")); } else s += i18n("This tool cannot be automatically detected."); MessageBox::text(s, Log::Show); break; @@ -290,11 +290,11 @@ void ToolchainConfigWidget::showDeviceDetails() } else { uint nb = _group.nbCheckDevices(); for (uint i=0; iCommand for devices detection:
%1
").arg(_devicesData[i].command); - else s += i18n("Command #%1 for devices detection:
%2
").arg(i+1).arg(_devicesData[i].command); + if ( nb==1 ) s += i18n("Command for devices detection:
%1
").tqarg(_devicesData[i].command); + else s += i18n("Command #%1 for devices detection:
%2
").tqarg(i+1).tqarg(_devicesData[i].command); TQString ss = _devicesData[i].checkLines.join("
"); - if ( nb==1 ) s += i18n("Device string:
%1
").arg(ss); - else s += i18n("Device string #%1:
%2
").arg(i+1).arg(ss); + if ( nb==1 ) s += i18n("Device string:
%1
").tqarg(ss); + else s += i18n("Device string #%1:
%2
").tqarg(i+1).tqarg(ss); } } MessageBox::text(s, Log::Show); diff --git a/src/tools/jal/jal.cpp b/src/tools/jal/jal.cpp index 57ba097..973e0b8 100644 --- a/src/tools/jal/jal.cpp +++ b/src/tools/jal/jal.cpp @@ -28,7 +28,7 @@ bool JAL::Base::checkExecutableResult(bool, TQStringList &lines) const //---------------------------------------------------------------------------- TQString JAL::Group::informationText() const { - return i18n("JAL is a high-level language for PIC microcontrollers.").arg("http://jal.sourceforge.net"); + return i18n("JAL is a high-level language for PIC microcontrollers.").tqarg("http://jal.sourceforge.net"); } Tool::Group::BaseData JAL::Group::baseFactory(Tool::Category category) const diff --git a/src/tools/jalv2/jalv2.cpp b/src/tools/jalv2/jalv2.cpp index ce06dbd..9bf0b26 100644 --- a/src/tools/jalv2/jalv2.cpp +++ b/src/tools/jalv2/jalv2.cpp @@ -28,7 +28,7 @@ bool JALV2::Base::checkExecutableResult(bool, TQStringList &lines) const //---------------------------------------------------------------------------- TQString JALV2::Group::informationText() const { - return i18n("JAL V2 is a new compiler for the high-level language JAL.").arg("http://www.casadeyork.com/jalv2"); + return i18n("JAL V2 is a new compiler for the high-level language JAL.").tqarg("http://www.casadeyork.com/jalv2"); } Tool::Group::BaseData JALV2::Group::baseFactory(Tool::Category category) const diff --git a/src/tools/list/compile_manager.cpp b/src/tools/list/compile_manager.cpp index 28f7aa6..db71eaf 100644 --- a/src/tools/list/compile_manager.cpp +++ b/src/tools/list/compile_manager.cpp @@ -108,7 +108,7 @@ bool Compile::Manager::setupCompile() if ( _operations!=Clean ) { 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(); } @@ -133,7 +133,7 @@ bool Compile::Manager::setupAssemble() if ( type==PURL::Nb_FileTypes ) type = Main::toolGroup().implementationType(PURL::ToolType::Compiler); 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(); } @@ -274,7 +274,7 @@ void Compile::Manager::startCustomCommand() 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_process.cpp b/src/tools/list/compile_process.cpp index 7ec09d8..a22f47d 100644 --- a/src/tools/list/compile_process.cpp +++ b/src/tools/list/compile_process.cpp @@ -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 ***")); diff --git a/src/tools/mpc/mpc.cpp b/src/tools/mpc/mpc.cpp index e170f30..8abb74e 100644 --- a/src/tools/mpc/mpc.cpp +++ b/src/tools/mpc/mpc.cpp @@ -47,7 +47,7 @@ Compile::Config *MPC::Group::configFactory(::Project *project) const TQString MPC::Group::informationText() const { - return i18n("MPC Compiler is a C compiler distributed by Byte Craft.").arg("http://www.bytecraft.com/mpccaps.html"); + return i18n("MPC Compiler is a C compiler distributed by Byte Craft.").tqarg("http://www.bytecraft.com/mpccaps.html"); } Tool::Group::BaseData MPC::Group::baseFactory(Tool::Category category) const diff --git a/src/tools/mpc/mpc_compile.cpp b/src/tools/mpc/mpc_compile.cpp index 22e0969..8c39e3c 100644 --- a/src/tools/mpc/mpc_compile.cpp +++ b/src/tools/mpc/mpc_compile.cpp @@ -37,7 +37,7 @@ void MPC::CompileFile::done(int code) PURL::Url url = PURL::Url(directory(), inputFilepath(0)).toExtension("err"); Log::StringView sview; PURL::File file(url, sview); - if ( !file.openForRead() ) doLog(Log::LineType::Error, i18n("Could not find error file (%1).").arg(url.pretty()), TQString(), 0); + if ( !file.openForRead() ) doLog(Log::LineType::Error, i18n("Could not find error file (%1).").tqarg(url.pretty()), TQString(), 0); else { TQStringList lines = file.readLines(); for (uint i=0; iPIC30 ToolChain is a toolsuite for 16-bit PICs available from Microchip. Most of it is available under the GNU Public License.").arg("http://microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010065&part=SW006012"); + return i18n("The PIC30 ToolChain is a toolsuite for 16-bit PICs available from Microchip. Most of it is available under the GNU Public License.").tqarg("http://microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010065&part=SW006012"); } Tool::Group::BaseData PIC30::Group::baseFactory(Tool::Category category) const diff --git a/src/tools/picc/picc.cpp b/src/tools/picc/picc.cpp index 4581af4..46ece11 100644 --- a/src/tools/picc/picc.cpp +++ b/src/tools/picc/picc.cpp @@ -90,7 +90,7 @@ PURL::FileType PICC::Group::implementationType(PURL::ToolType type) const //---------------------------------------------------------------------------- TQString PICC::PICCLiteGroup::informationText() const { - return i18n("PICC-Lite is a freeware C compiler distributed by HTSoft.").arg("http://www.htsoft.com"); + return i18n("PICC-Lite is a freeware C compiler distributed by HTSoft.").tqarg("http://www.htsoft.com"); } Tool::Group::BaseData PICC::PICCLiteGroup::baseFactory(Tool::Category category) const @@ -103,7 +103,7 @@ Tool::Group::BaseData PICC::PICCLiteGroup::baseFactory(Tool::Category category) //---------------------------------------------------------------------------- TQString PICC::PICCGroup::informationText() const { - return i18n("PICC is a C compiler distributed by HTSoft.").arg("http://www.htsoft.com"); + return i18n("PICC is a C compiler distributed by HTSoft.").tqarg("http://www.htsoft.com"); } Tool::Group::BaseData PICC::PICCGroup::baseFactory(Tool::Category category) const @@ -116,7 +116,7 @@ Tool::Group::BaseData PICC::PICCGroup::baseFactory(Tool::Category category) cons //---------------------------------------------------------------------------- TQString PICC::PICC18Group::informationText() const { - return i18n("PICC 18 is a C compiler distributed by HTSoft.").arg("http://www.htsoft.com"); + return i18n("PICC 18 is a C compiler distributed by HTSoft.").tqarg("http://www.htsoft.com"); } Tool::Group::BaseData PICC::PICC18Group::baseFactory(Tool::Category category) const diff --git a/src/tools/sdcc/sdcc.cpp b/src/tools/sdcc/sdcc.cpp index d61e0a9..bc3724d 100644 --- a/src/tools/sdcc/sdcc.cpp +++ b/src/tools/sdcc/sdcc.cpp @@ -25,7 +25,7 @@ bool SDCC::Base::checkExecutableResult(bool, TQStringList &lines) const //---------------------------------------------------------------------------- TQString SDCC::Group::informationText() const { - return i18n("The Small Devices C Compiler is an open-source C compiler for several families of microcontrollers.").arg("http://sdcc.sourceforge.net"); + return i18n("The Small Devices C Compiler 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 diff --git a/src/xml_to_data/device_xml_to_data.cpp b/src/xml_to_data/device_xml_to_data.cpp index c0861d4..c1d41ac 100644 --- a/src/xml_to_data/device_xml_to_data.cpp +++ b/src/xml_to_data/device_xml_to_data.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include bool Device::XmlToDataBase::getFrequencyRange(OperatingCondition oc, Special special, TQDomElement element) @@ -84,27 +84,27 @@ void Device::XmlToDataBase::processDevice(TQDomElement device) { TQString name = device.attribute("name").upper(); if ( name.isEmpty() ) qFatal("Device has no name"); - if ( _map.contains(name) ) qFatal(TQString("Device \"%1\" already defined").arg(name)); + if ( _map.contains(name) ) qFatal(TQString("Device \"%1\" already defined").tqarg(name)); _data = createData(); _map[name] = _data; _data->_name = name; _data->_alternatives = TQStringList::split(' ', device.attribute("alternative")); if ( _data->_alternatives.count() ) _alternatives[name] = _data->_alternatives; - _data->_status = Status::fromKey(device.attribute("status")); + _data->_status = tqStatus::fromKey(device.attribute("status")); switch (_data->_status.type()) { - case Status::Nb_Types: + case tqStatus::Nb_Types: qFatal("Unrecognized or absent device status"); break; - case Status::Future: + case tqStatus::Future: if ( _data->_alternatives.count() ) qFatal("Future device has alternative"); break; - case Status::NotRecommended: - case Status::Mature: + case tqStatus::NotRecommended: + case tqStatus::Mature: if ( _data->_alternatives.count()==0 ) warning("Not-recommended/mature device has no alternative"); break; - case Status::InProduction: - case Status::EOL: - case Status::Unknown: break; + case tqStatus::InProduction: + case tqStatus::EOL: + case tqStatus::Unknown: break; } // document @@ -119,26 +119,26 @@ void Device::XmlToDataBase::processDevice(TQDomElement device) _data->_documents.datasheet = documents.attribute("datasheet"); TQRegExp rexp("\\d{5}"); if ( _data->_documents.datasheet=="?" ) warning("No datasheet specified"); - if ( !rexp.exactMatch(_data->_documents.datasheet) ) qFatal(TQString("Malformed datasheet \"%1\" (5 digits)").arg(_data->_documents.datasheet)); + if ( !rexp.exactMatch(_data->_documents.datasheet) ) qFatal(TQString("Malformed datasheet \"%1\" (5 digits)").tqarg(_data->_documents.datasheet)); _data->_documents.progsheet = documents.attribute("progsheet"); if ( _data->_documents.progsheet=="?" ) warning("No progsheet specified"); - if ( !rexp.exactMatch(_data->_documents.datasheet) ) qFatal(TQString("Malformed progsheet \"%1\" (5 digits)").arg(_data->_documents.progsheet)); + if ( !rexp.exactMatch(_data->_documents.datasheet) ) qFatal(TQString("Malformed progsheet \"%1\" (5 digits)").tqarg(_data->_documents.progsheet)); _data->_documents.erratas = TQStringList::split(" ", documents.attribute("erratas")); for (uint i=0; i_documents.erratas.count()); i++) { TQString errata = _data->_documents.erratas[i]; if ( !rexp.exactMatch(errata) ) { TQRegExp rexp2("\\d{5}e\\d"); if ( !rexp2.exactMatch(errata) && !errata.startsWith("er") && errata.mid(2)!=_data->_name.lower() ) - qFatal(TQString("Malformed erratas \"%1\" (5 digits or 5 digits + e + 1 digit or \"er\" + name)").arg(errata)); + qFatal(TQString("Malformed erratas \"%1\" (5 digits or 5 digits + e + 1 digit or \"er\" + name)").tqarg(errata)); } } } if ( _data->_documents.webpage=="?" ) warning("No webpage specified"); else { TQRegExp rexp("\\d{6}"); - if ( !rexp.exactMatch(_data->_documents.webpage) ) qFatal(TQString("Malformed webpage \"%1\" (6 digits)").arg(_data->_documents.webpage)); + if ( !rexp.exactMatch(_data->_documents.webpage) ) qFatal(TQString("Malformed webpage \"%1\" (6 digits)").tqarg(_data->_documents.webpage)); if ( _documents.contains(_data->_documents.webpage) ) - qFatal(TQString("webpage duplicated (already used for %1)").arg(_documents[_data->_documents.webpage])); + qFatal(TQString("webpage duplicated (already used for %1)").tqarg(_documents[_data->_documents.webpage])); _documents[_data->_documents.webpage] = name; } @@ -194,21 +194,21 @@ Device::Package Device::XmlToDataBase::processPackage(TQDomElement element) for (; Package::TYPE_DATA[i].name; i++) { if ( types[k]!=Package::TYPE_DATA[i].name ) continue; for (uint j=0; j found(nb); found.fill(false); @@ -234,7 +234,7 @@ Device::Package Device::XmlToDataBase::processPackage(TQDomElement element) child = child.nextSibling(); } if ( !have_pins ) ;//warning("Pins not specified"); // #### REMOVE ME !! - else for (uint i=0; i #include -#include +#include #include "common/common/misc.h" #include "common/common/streamer.h" diff --git a/src/xml_to_data/prog_xml_to_data.h b/src/xml_to_data/prog_xml_to_data.h index b9f6a5f..e45e6e1 100644 --- a/src/xml_to_data/prog_xml_to_data.h +++ b/src/xml_to_data/prog_xml_to_data.h @@ -10,7 +10,7 @@ #define PROG_XML_TO_DATA_H #include -#include +#include #include #include "xml_to_data.h" @@ -68,12 +68,12 @@ void ExtXmlToData::parseDevice(TQDomElement element) { if ( element.nodeName()!="device" ) qFatal("Root node child should be named \"device\""); _current = element.attribute("name").upper(); - if ( Device::lister().data(_current)==0 ) qFatal(TQString("Device name \"%1\" unknown").arg(_current)); - if ( _map.contains(_current) ) qFatal(TQString("Device \"%1\" already parsed").arg(_current)); + if ( Device::lister().data(_current)==0 ) qFatal(TQString("Device name \"%1\" unknown").tqarg(_current)); + if ( _map.contains(_current) ) qFatal(TQString("Device \"%1\" already parsed").tqarg(_current)); PData data; if ( hasFamilies() ) { TQString family = element.attribute("family"); - if ( family.isEmpty() ) qFatal(TQString("Family is empty").arg(family)); + if ( family.isEmpty() ) qFatal(TQString("Family is empty").tqarg(family)); if ( _families.find(family)==_families.end() ) _families.append(family); data.family = familyIndex(family); } @@ -88,7 +88,7 @@ void ExtXmlToData::parse() TQDomDocument doc = parseFile(_basename + ".xml"); TQDomElement root = doc.documentElement(); if ( root.nodeName()!="type" ) qFatal("Root node should be \"type\""); - if ( root.attribute("name")!=_basename ) qFatal(TQString("Root node name is not \"%1\"").arg(_basename)); + if ( root.attribute("name")!=_basename ) qFatal(TQString("Root node name is not \"%1\"").tqarg(_basename)); TQDomNode child = root.firstChild(); while ( !child.isNull() ) { if ( child.isComment() ) qDebug("comment: %s", child.toComment().data().latin1()); @@ -105,7 +105,7 @@ void ExtXmlToData::output() { // write .cpp file TQFile file(_basename + "_data.cpp"); - if ( !file.open(IO_WriteOnly) ) qFatal(TQString("Cannot open output file \"%1\"").arg(file.name())); + if ( !file.open(IO_WriteOnly) ) qFatal(TQString("Cannot open output file \"%1\"").tqarg(file.name())); TQTextStream s(&file); s << "// #### Do not edit: this file is autogenerated !!!" << endl << endl; s << "#include \"devices/list/device_list.h\"" << endl; diff --git a/src/xml_to_data/xml_to_data.cpp b/src/xml_to_data/xml_to_data.cpp index ee6a204..8e14d81 100644 --- a/src/xml_to_data/xml_to_data.cpp +++ b/src/xml_to_data/xml_to_data.cpp @@ -9,7 +9,7 @@ #include "xml_to_data.h" #include -#include +#include TQDomElement XmlToData::findUniqueElement(TQDomElement parent, const TQString &tag, const TQString &attribute, const TQString &value) const @@ -19,7 +19,7 @@ TQDomElement XmlToData::findUniqueElement(TQDomElement parent, const TQString &t while ( !child.isNull() ) { if ( child.nodeName()==tag && child.isElement() && (attribute.isEmpty() || child.toElement().attribute(attribute)==value) ) { - if ( !element.isNull() ) qFatal(TQString("Duplicated element \"%1/%2\"").arg(tag).arg(value)); + if ( !element.isNull() ) qFatal(TQString("Duplicated element \"%1/%2\"").tqarg(tag).tqarg(value)); element = child.toElement(); } child = child.nextSibling(); @@ -34,7 +34,7 @@ void XmlToData::checkTagNames(TQDomElement element, const TQString &tag, for (uint i=0; i