From 4374b9aebc67cce74e5c1099d5f4ad1749b05fc6 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 19 Dec 2011 11:40:25 -0600 Subject: Remove additional unneeded tq method conversions --- src/coff/base/cdb_parser.cpp | 6 +- src/coff/base/coff.cpp | 8 +- src/coff/base/coff_archive.cpp | 14 +-- src/coff/base/coff_object.cpp | 44 ++++---- src/coff/base/text_coff.cpp | 4 +- src/common/cli/cli_main.cpp | 4 +- src/common/cli/cli_pfile.cpp | 4 +- src/common/global/purl.cpp | 2 +- src/common/global/xml_data_file.cpp | 4 +- src/common/gui/container.cpp | 8 +- src/common/gui/container.h | 4 +- src/common/gui/pfile_ext.cpp | 8 +- src/common/gui/purl_gui.cpp | 2 +- src/common/nokde/nokde_kaboutdata.cpp | 2 +- src/common/nokde/nokde_kcmdlineargs.cpp | 60 +++++------ src/common/port/parallel.cpp | 18 ++-- src/common/port/port_base.cpp | 6 +- src/common/port/serial.cpp | 30 +++--- src/common/port/usb_port.cpp | 36 +++---- src/devices/base/device_group.cpp | 8 +- src/devices/base/generic_device.h | 2 +- src/devices/base/generic_memory.cpp | 2 +- src/devices/base/hex_buffer.cpp | 6 +- src/devices/base/register.cpp | 2 +- src/devices/gui/register_view.cpp | 8 +- src/devices/mem24/mem24/mem24_group.cpp | 4 +- src/devices/mem24/mem24/mem24_memory.cpp | 2 +- src/devices/mem24/prog/mem24_prog.cpp | 4 +- src/devices/mem24/xml/mem24_xml_to_data.cpp | 2 +- src/devices/pic/base/pic.cpp | 12 +-- src/devices/pic/base/pic_config.cpp | 4 +- src/devices/pic/base/pic_protection.cpp | 8 +- src/devices/pic/base/pic_register.cpp | 2 +- src/devices/pic/gui/pic_group_ui.cpp | 2 +- src/devices/pic/gui/pic_memory_editor.cpp | 8 +- src/devices/pic/gui/pic_prog_group_ui.cpp | 2 +- src/devices/pic/gui/pic_register_view.cpp | 4 +- src/devices/pic/pic/pic_group.cpp | 8 +- src/devices/pic/pic/pic_memory.cpp | 2 +- src/devices/pic/prog/pic_debug.cpp | 14 +-- src/devices/pic/prog/pic_prog.cpp | 56 +++++----- src/devices/pic/prog/pic_prog_specific.cpp | 16 +-- src/devices/pic/xml/pic_xml_to_data.cpp | 114 ++++++++++----------- src/libgui/device_editor.cpp | 4 +- src/libgui/device_gui.cpp | 4 +- src/libgui/editor.cpp | 2 +- src/libgui/editor_manager.cpp | 4 +- src/libgui/global_config.cpp | 4 +- src/libgui/hex_editor.cpp | 8 +- src/libgui/likeback.cpp | 2 +- src/libgui/log_view.cpp | 2 +- src/libgui/object_view.cpp | 2 +- src/libgui/project.cpp | 2 +- src/libgui/project_manager.cpp | 10 +- src/libgui/project_wizard.cpp | 8 +- src/libgui/text_editor.cpp | 2 +- src/libgui/toplevel.cpp | 2 +- src/piklab-coff/main.cpp | 22 ++-- src/piklab-hex/main.cpp | 14 +-- src/piklab-prog/cli_interactive.cpp | 22 ++-- src/piklab-prog/cli_prog_manager.cpp | 2 +- src/piklab-prog/cmdline.cpp | 26 ++--- src/piklab-test/base/generator_check.cpp | 14 +-- src/piklab-test/checksum/checksum_check.cpp | 2 +- .../save_load_memory/save_load_memory_check.cpp | 2 +- src/progs/base/generic_debug.cpp | 2 +- src/progs/base/generic_prog.cpp | 24 ++--- src/progs/direct/base/direct.cpp | 6 +- src/progs/direct/base/direct_16.cpp | 4 +- src/progs/direct/base/direct_18F.cpp | 8 +- src/progs/direct/base/direct_mem24.cpp | 12 +-- src/progs/direct/base/direct_pic.cpp | 2 +- src/progs/gpsim/base/gpsim.cpp | 4 +- src/progs/gpsim/base/gpsim_debug.cpp | 20 ++-- src/progs/gpsim/gui/gpsim_group_ui.cpp | 2 +- src/progs/gui/hardware_config_widget.cpp | 8 +- src/progs/gui/port_selector.cpp | 2 +- src/progs/icd1/base/icd1.cpp | 10 +- src/progs/icd1/base/icd1_serial.cpp | 2 +- src/progs/icd2/base/icd.cpp | 4 +- src/progs/icd2/base/icd2.cpp | 16 +-- src/progs/icd2/base/icd2_debug.cpp | 26 ++--- src/progs/icd2/base/icd2_debug_specific.cpp | 10 +- src/progs/icd2/base/icd2_prog.cpp | 12 +-- src/progs/icd2/base/icd2_serial.cpp | 2 +- src/progs/icd2/base/icd2_usb.cpp | 6 +- src/progs/icd2/base/icd_prog.cpp | 2 +- src/progs/icd2/xml/xml_icd2_parser.cpp | 2 +- src/progs/manager/debug_manager.cpp | 6 +- src/progs/manager/prog_manager.cpp | 4 +- .../picdem_bootloader/base/picdem_bootloader.cpp | 14 +-- src/progs/pickit1/base/pickit1.cpp | 2 +- src/progs/pickit2/base/pickit.cpp | 6 +- src/progs/pickit2/base/pickit2.cpp | 12 +-- src/progs/pickit2/base/pickit2_prog.cpp | 2 +- src/progs/pickit2/base/pickit_prog.cpp | 8 +- .../pickit2_bootloader/base/pickit2_bootloader.cpp | 4 +- src/progs/pickit2v2/base/pickit2v2.cpp | 16 +-- src/progs/pickit2v2/base/pickit2v2_prog.cpp | 12 +-- src/progs/psp/base/psp.cpp | 4 +- src/progs/psp/base/psp_serial.cpp | 6 +- src/progs/sdcdb/base/sdcdb_debug.cpp | 18 ++-- src/progs/tbl_bootloader/base/tbl_bootloader.cpp | 14 +-- src/tools/base/tool_group.cpp | 4 +- src/tools/boost/boostbasic.cpp | 2 +- src/tools/boost/boostc.cpp | 2 +- src/tools/boost/boostcpp.cpp | 2 +- src/tools/c18/c18.cpp | 2 +- src/tools/cc5x/cc5x.cpp | 2 +- src/tools/ccsc/ccsc.cpp | 2 +- src/tools/ccsc/ccsc_compile.cpp | 2 +- src/tools/gputils/gputils.cpp | 2 +- src/tools/gputils/gputils_generator.cpp | 4 +- src/tools/gui/toolchain_config_widget.cpp | 24 ++--- src/tools/jal/jal.cpp | 2 +- src/tools/jalv2/jalv2.cpp | 2 +- src/tools/list/compile_manager.cpp | 6 +- src/tools/list/compile_process.cpp | 2 +- src/tools/mpc/mpc.cpp | 2 +- src/tools/mpc/mpc_compile.cpp | 2 +- src/tools/pic30/pic30.cpp | 2 +- src/tools/picc/picc.cpp | 6 +- src/tools/sdcc/sdcc.cpp | 2 +- src/xml_to_data/device_xml_to_data.cpp | 24 ++--- src/xml_to_data/prog_xml_to_data.h | 10 +- src/xml_to_data/xml_to_data.cpp | 6 +- 126 files changed, 572 insertions(+), 572 deletions(-) diff --git a/src/coff/base/cdb_parser.cpp b/src/coff/base/cdb_parser.cpp index eb7495b..87d9d97 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").tqarg(_line+1).tqarg(_col+1)); + _log.log(type, message + " " + i18n("at line #%1, column #%2").arg(_line+1).arg(_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'").tqarg(c)); + logMalformed(i18n("was expecting '%1'").arg(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')").tqarg(c)); + logMalformed(i18n("was expecting a bool ('%1')").arg(c)); return false; } return true; diff --git a/src/coff/base/coff.cpp b/src/coff/base/coff.cpp index 83100a4..e85b53d 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").tqarg(toHexLabel(magic, 4))); + log.log(Log::DebugLevel::Extra, TQString("COFF format: %1").arg(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).").tqarg(offset).tqarg(nbBytes).tqarg(data.count())); + log.log(Log::LineType::Error, i18n("COFF file is truncated (offset: %1 nbBytes: %2 size:%3).").arg(offset).arg(nbBytes).arg(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).").tqarg(offset).tqarg(nbChars).tqarg(data.count())); + log.log(Log::LineType::Error, i18n("COFF file is truncated (offset: %1 nbBytes: %2 size:%3).").arg(offset).arg(nbChars).arg(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).").tqarg(toHexLabel(_magic, 4))); + log.log(Log::LineType::Error, i18n("Could not recognize file (magic number is %1).").arg(toHexLabel(_magic, 4))); return false; } return true; diff --git a/src/coff/base/coff_archive.cpp b/src/coff/base/coff_archive.cpp index abf48af..e7d4c14 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\").").tqarg(s)); + log.log(Log::LineType::Error, i18n("Member name not terminated by '/' (\"%1\").").arg(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\").").tqarg(s)); + log.log(Log::LineType::Error, i18n("File size not terminated by 'l' (\"%1\").").arg(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\".").tqarg(s)); + log.log(Log::LineType::Error, i18n("Wrong format for file size \"%1\".").arg(s)); return; } TQ_UINT32 v; if ( !getULong(data, offset, 2, log, v) ) return; - log.log(Log::DebugLevel::Extra, i18n("Magic number: %1").tqarg(toHexLabel(v, 4))); + log.log(Log::DebugLevel::Extra, i18n("Magic number: %1").arg(toHexLabel(v, 4))); // if ( v!=0x600A ) { -// log.log(Log::LineType::Error, i18n("Wrong magic for Microchip archive (\"%1\").").tqarg(toHexLabel(v, 4))); +// log.log(Log::LineType::Error, i18n("Wrong magic for Microchip archive (\"%1\").").arg(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").tqarg(toHexLabel(start, 8))); + log.log(Log::LineType::Error, i18n("Unknown file member offset: %1").arg(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").tqarg(it.data()->nbBytes())); + keys.append(it.key(), i18n("size: %1 bytes").arg(it.data()->nbBytes())); return keys; } diff --git a/src/coff/base/coff_object.cpp b/src/coff/base/coff_object.cpp index 6a9a182..ee49a95 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)").tqarg(auxType.type())); + if ( auxType!=AuxSymbolType::Nb_Types && nbAux==0 ) log.log(Log::LineType::Warning, i18n("Symbol without needed auxilliary symbol (type=%1)").arg(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").tqarg(v).tqarg(section.size())); + if ( _address>section.size() ) log.log(Log::LineType::Warning, i18n("Relocation address beyong section size: %1/%2").arg(v).arg(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").tqarg(v)); + log.log(Log::LineType::Error, i18n("Relocation has unknown symbol: %1").arg(v)); return; } if ( object.symbol(v)->isAuxSymbol() ) { - log.log(Log::LineType::Error, i18n("Relocation is an auxiliary symbol: %1").tqarg(v)); + log.log(Log::LineType::Error, i18n("Relocation is an auxiliary symbol: %1").arg(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").tqarg(tmp)); + log.log(Log::LineType::Error, i18n("Codeline has unknown symbol: %1").arg(tmp)); return; } if ( object.symbol(tmp)->isAuxSymbol() ) { - log.log(Log::LineType::Error, i18n("Codeline is an auxiliary symbol: %1").tqarg(tmp)); + log.log(Log::LineType::Error, i18n("Codeline is an auxiliary symbol: %1").arg(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").tqarg(tmp)); + log.log(Log::LineType::Error, i18n("Codeline has unknown symbol: %1").arg(tmp)); return; } if ( object.symbol(tmp)->isAuxSymbol() ) { - log.log(Log::LineType::Error, i18n("Codeline is an auxiliary symbol: %1").tqarg(tmp)); + log.log(Log::LineType::Error, i18n("Codeline is an auxiliary symbol: %1").arg(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).") -// .tqarg(_section._name).tqarg(toHexLabel(_address, nbChars(_address))).tqarg(_symbol->_class)); +// .arg(_section._name).arg(toHexLabel(_address, nbChars(_address))).arg(_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.") - // .tqarg(toHexLabel(v, 4)).tqarg(toHexLabel(_address, 4)).tqarg(_name)); + // .arg(toHexLabel(v, 4)).arg(toHexLabel(_address, 4)).arg(_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.").tqarg(toHexLabel(_magic, 4))); + log.log(Log::LineType::Error, i18n("COFF format not supported: magic number is %1.").arg(toHexLabel(_magic, 4))); return false; } - log.log(Log::DebugLevel::Extra, TQString("COFF format: %1").tqarg(toHexLabel(_magic, 4))); + log.log(Log::DebugLevel::Extra, TQString("COFF format: %1").arg(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").tqarg(toHexLabel(_optHeaderMagic, 4))); + log.log(Log::DebugLevel::Extra, TQString("COFF optionnal header format: %1").arg(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.").tqarg(toHexLabel(_optHeaderMagic, 4))); + log.log(Log::LineType::Warning, i18n("Optional header format not supported: magic number is %1.").arg(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.").tqarg(toHexLabel(_optHeaderMagic, 4))); + log.log(Log::DebugLevel::Normal, TQString("Optional header not parsed: magic number is %1.").arg(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").tqarg(size(OptHeaderSize)).tqarg(v)); + log.log(Log::LineType::Error, i18n("Optionnal header size is not %1: %2").arg(size(OptHeaderSize)).arg(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\"").tqarg(name)); + log.log(Log::DebugLevel::Normal, TQString("Device name: \"%1\"").arg(name)); if ( name.isEmpty() ) { - 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))); + 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))); 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").tqarg(name)); + else if ( name!=_device->name() ) log.log(Log::DebugLevel::Normal, TQString("Different processor name: %1").arg(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").tqarg(nbBits).tqarg(v)); + if ( v!=nbBits ) log.log(Log::DebugLevel::Normal, TQString("Rom width is not %1: %2").arg(nbBits).arg(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").tqarg(nbBits).tqarg(v)); + if ( v!=nbBits ) log.log(Log::DebugLevel::Normal, TQString("Ram width is not %1: %2").arg(nbBits).arg(v)); } } return true; diff --git a/src/coff/base/text_coff.cpp b/src/coff/base/text_coff.cpp index 52dd503..1ddeb30 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)").tqarg(format().label()).tqarg(toHexLabel(format().data().magic, 4))); + keys.append(i18n("Format:"), i18n("%1 (magic id: %2)").arg(format().label()).arg(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)").tqarg(label).tqarg(toHexLabel(optHeaderMagic(), 4))); + keys.append(i18n("Option header:"), i18n("%1 (magic id: %2)").arg(label).arg(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 11537a7..8b8e2ab 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").tqarg(s), ARG_ERROR); + if ( data==0 ) return errorExit(i18n("Unknown command: %1").arg(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").tqarg(PROPERTY_DATA[i].name).tqarg(executeGetCommand(PROPERTY_DATA[i].name))); + log(Log::LineType::Information, TQString("%1: %2").arg(PROPERTY_DATA[i].name).arg(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 e984e52..1cdbc9a 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").tqarg(_file->name())); + _log.sorry(_error, i18n("File: %1").arg(_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").tqarg(_file->name())); + _log.sorry(_error, i18n("File: %1").arg(_file->name())); return false; } return true; diff --git a/src/common/global/purl.cpp b/src/common/global/purl.cpp index ab1f8da..d0b5498 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:\\").tqarg(drive); + return TQString("%1:\\").arg(drive); #endif } diff --git a/src/common/global/xml_data_file.cpp b/src/common/global/xml_data_file.cpp index 528f8e7..bae7f17 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").tqarg(sview.string()); + error = i18n("Error opening file: %1").arg(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").tqarg(sview.string()); + if ( !ok ) error = i18n("Error saving file: %1").arg(sview.string()); return ok; } diff --git a/src/common/gui/container.cpp b/src/common/gui/container.cpp index 8a747d3..b5917dc 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 tqalignment) +void Container::addWidget(TQWidget *w, uint startRow, uint endRow, uint startCol, uint endCol, int alignment) { Q_ASSERT( startRow<=endRow ); Q_ASSERT( startCol<=endCol ); w->show(); - _gridLayout->addMultiCellWidget(w, startRow, endRow, startCol, endCol, tqalignment); + _gridLayout->addMultiCellWidget(w, startRow, endRow, startCol, endCol, alignment); } -void Container::addLayout(TQLayout *l, uint startRow, uint endRow, uint startCol, uint endCol, int tqalignment) +void Container::addLayout(TQLayout *l, uint startRow, uint endRow, uint startCol, uint endCol, int alignment) { Q_ASSERT( startRow<=endRow ); Q_ASSERT( startCol<=endCol ); - _gridLayout->addMultiCellLayout(l, startRow, endRow, startCol, endCol, tqalignment); + _gridLayout->addMultiCellLayout(l, startRow, endRow, startCol, endCol, alignment); } //---------------------------------------------------------------------------- diff --git a/src/common/gui/container.h b/src/common/gui/container.h index af3e5a6..cf3f351 100644 --- a/src/common/gui/container.h +++ b/src/common/gui/container.h @@ -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 tqalignment = 0); - void addLayout(TQLayout *tqlayout, uint startRow, uint endRow, uint startCol, uint endCol, int tqalignment = 0); + void addWidget(TQWidget *widget, uint startRow, uint endRow, uint startCol, uint endCol, int alignment = 0); + void addLayout(TQLayout *tqlayout, uint startRow, uint endRow, uint startCol, uint endCol, int alignment = 0); uint numRows() const { return _gridLayout->numRows(); } uint numCols() const { return _gridLayout->numCols(); } void setFrame(Type type); diff --git a/src/common/gui/pfile_ext.cpp b/src/common/gui/pfile_ext.cpp index 43f9e81..080421f 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").tqarg(_tmp->name())); + _log.sorry(_error, i18n("File: %1").arg(_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").tqarg(_file->name())); + _log.sorry(_error, i18n("File: %1").arg(_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").tqarg(_tmp->name())); + _log.sorry(_error, i18n("File: %1").arg(_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").tqarg(_tmp->name())); + _log.sorry(_error, i18n("File: %1").arg(_tmp->name())); return false; } return true; diff --git a/src/common/gui/purl_gui.cpp b/src/common/gui/purl_gui.cpp index 0284682..7515b99 100644 --- a/src/common/gui/purl_gui.cpp +++ b/src/common/gui/purl_gui.cpp @@ -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 ?").tqarg(url.pretty())) ) return Url(); + if ( !MessageBox::askContinue(i18n("File \"%1\" already exists. Overwrite ?").arg(url.pretty())) ) return Url(); } break; case CancelIfExists: diff --git a/src/common/nokde/nokde_kaboutdata.cpp b/src/common/nokde/nokde_kaboutdata.cpp index 62d0d3d..85edf3c 100644 --- a/src/common/nokde/nokde_kaboutdata.cpp +++ b/src/common/nokde/nokde_kaboutdata.cpp @@ -434,7 +434,7 @@ KAboutData::license() const } if (!l.isEmpty()) - result += i18n("This program is distributed under the terms of the %1.").tqarg( l ); + result += i18n("This program is distributed under the terms of the %1.").arg( l ); if (!f.isEmpty()) { diff --git a/src/common/nokde/nokde_kcmdlineargs.cpp b/src/common/nokde/nokde_kcmdlineargs.cpp index 1919d1e..42dc5c1 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'.").tqarg(TQString::fromLocal8Bit(_opt))); + usage( i18n("Unknown option '%1'.").arg(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'.").tqarg(TQString::fromLocal8Bit(_opt))); + usage( i18n("Unknown option '%1'.").arg(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.").tqarg( opt_name)); + usage( i18n("'%1' missing.").arg( 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").tqarg(qVersion())); -// printQ( TQString("KDE: %1\n").tqarg(TDE_VERSION_STRING)); + printQ( TQString("TQt: %1\n").arg(qVersion())); +// printQ( TQString("KDE: %1\n").arg(TDE_VERSION_STRING)); printQ( TQString("%1: %2\n"). - arg(about->programName()).tqarg(about->version())); + arg(about->programName()).arg(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()) ).tqarg( 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()) ).arg( authorlist ) ); } } else { - printQ( i18n("%1 was written by somebody who wants to remain anonymous.").tqarg(about->programName()) ); + printQ( i18n("%1 was written by somebody who wants to remain anonymous.").arg(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" ).tqarg(about->bugAddress()) ); + printQ( i18n( "Please use %1 to report bugs, do not mail the authors directly.\n" ).arg(about->bugAddress()) ); } exit(0); } else { @@ -671,7 +671,7 @@ KCmdLineArgs::parseAllArgs() if (ignoreUnknown) continue; enable_i18n(); - usage( i18n("Unexpected argument '%1'.").tqarg(TQString::fromLocal8Bit(argv[i]))); + usage( i18n("Unexpected argument '%1'.").arg(TQString::fromLocal8Bit(argv[i]))); } else { @@ -815,7 +815,7 @@ KCmdLineArgs::usage(const char *id) { if (args->name) { - usage = i18n("[%1-options]").tqarg(args->name)+" "+usage; + usage = i18n("[%1-options]").arg(args->name)+" "+usage; } args = argsList->prev(); } @@ -835,30 +835,30 @@ KCmdLineArgs::usage(const char *id) } } - printQ(i18n("Usage: %1 %2\n").tqarg(argv[0]).tqarg(usage)); + printQ(i18n("Usage: %1 %2\n").arg(argv[0]).arg(usage)); printQ("\n"+about->shortDescription()+"\n"); - printQ(optionHeaderString.tqarg(i18n("Generic options"))); - printQ(optionFormatString.tqarg("--help", -25).tqarg(i18n("Show help about options"))); + printQ(optionHeaderString.arg(i18n("Generic options"))); + printQ(optionFormatString.arg("--help", -25).arg(i18n("Show help about options"))); args = argsList->first(); while(args) { if (args->name && args->id) { - TQString option = TQString("--help-%1").tqarg(args->id); - TQString desc = i18n("Show %1 specific options").tqarg(args->name); + TQString option = TQString("--help-%1").arg(args->id); + TQString desc = i18n("Show %1 specific options").arg(args->name); - printQ(optionFormatString.tqarg(option, -25).tqarg(desc)); + printQ(optionFormatString.arg(option, -25).arg(desc)); } args = argsList->next(); } - 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"))); + 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"))); 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.tqarg(i18n("%1 options").tqarg(TQString::fromLatin1(args->name))); + optionsHeader = optionHeaderString.arg(i18n("%1 options").arg(TQString::fromLatin1(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.tqarg(TQString(name), -25) - .tqarg(description)); + printQ(optionFormatString.arg(TQString(name), -25) + .arg(description)); } else { @@ -974,13 +974,13 @@ KCmdLineArgs::usage(const char *id) opt = opt + name; if (!option->def) { - printQ(optionFormatString.tqarg(TQString(opt), -25) - .tqarg(description)); + printQ(optionFormatString.arg(TQString(opt), -25) + .arg(description)); } else { - printQ(optionFormatStringDef.tqarg(TQString(opt), -25) - .tqarg(description).tqarg(option->def)); + printQ(optionFormatStringDef.arg(TQString(opt), -25) + .arg(description).arg(option->def)); } opt = ""; } @@ -989,7 +989,7 @@ KCmdLineArgs::usage(const char *id) it != dl.end(); ++it) { - printQ(optionFormatString.tqarg("", -25).tqarg(*it)); + printQ(optionFormatString.arg("", -25).arg(*it)); } option++; diff --git a/src/common/port/parallel.cpp b/src/common/port/parallel.cpp index 46e395b..3d92ae0 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").tqarg(i)); + for(int i = 0; i<8; ++i) list.append(TQString("/dev/parport%1").arg(i)); // new devfs parport flavour - for(int i = 0; i<8; ++i) list.append(TQString("/dev/parports/%1").tqarg(i)); + for(int i = 0; i<8; ++i) list.append(TQString("/dev/parports/%1").arg(i)); #elif defined(HAVE_PPBUS) // FreeBSD - for(int i = 0; i<8; ++i) list.append(TQString("/dev/ppi%1").tqarg(i)); + for(int i = 0; i<8; ++i) list.append(TQString("/dev/ppi%1").arg(i)); #endif return list; } @@ -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\"").tqarg(_device)); + setSystemError(i18n("Could not open device \"%1\"").arg(_device)); return false; } if ( ioctl(_fd, PPCLAIM)<0 ) { - setSystemError(i18n("Could not claim device \"%1\": check it is read/write enabled").tqarg(_device)); + setSystemError(i18n("Could not claim device \"%1\": check it is read/write enabled").arg(_device)); return false; } #elif defined(HAVE_PPBUS) _fd = ::open(_device.latin1(), O_RDWR); if ( _fd<0 ) { - setSystemError(i18n("Could not open device \"%1\"").tqarg(_device)); + setSystemError(i18n("Could not open device \"%1\"").arg(_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").tqarg(PIN_DATA[pin].label).tqarg(on)); + setSystemError(i18n("Error setting pin %1 to %2").arg(PIN_DATA[pin].label).arg(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").tqarg(PIN_DATA[pin].label)); + setSystemError(i18n("Error reading bit on pin %1").arg(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).").tqarg(strerror(errno))); + log(Log::LineType::Error, message + TQString(" (errno=%1).").arg(strerror(errno))); #else Q_UNUSED(message); #endif diff --git a/src/common/port/port_base.cpp b/src/common/port/port_base.cpp index 0112a1b..63e820e 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\"").tqarg(toPrintable(data, size, PrintAlphaNum))); + log(Log::DebugLevel::LowLevel, TQString("Sending: \"%1\"").arg(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\"").tqarg(toPrintable(a, PrintAlphaNum))); + if (ok) log(Log::DebugLevel::LowLevel, TQString("Received: \"%1\"").arg(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\"").tqarg(toPrintable(c, PrintAlphaNum))); + log(Log::DebugLevel::LowLevel, TQString("Received: \"%1\"").arg(toPrintable(c, PrintAlphaNum))); return true; } diff --git a/src/common/port/serial.cpp b/src/common/port/serial.cpp index 2aaa7a8..977f31c 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").tqarg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyS%1").arg(i)); // new devfs serport flavour - for (uint i=0; i<8; i++) list.append(TQString("/dev/tts/%1").tqarg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/tts/%1").arg(i)); // standard USB serport in user space - for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyUSB%1").tqarg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyUSB%1").arg(i)); // new devfs USB serport flavour - for (uint i=0; i<8; i++) list.append(TQString("/dev/usb/tts/%1").tqarg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/usb/tts/%1").arg(i)); // FreeBSD - for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyd%1").tqarg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyd%1").arg(i)); // Slackware 11 devfs USB Serial port support. - for (uint i=0; i<8; i++) list.append(TQString("/dev/tts/USB%1").tqarg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/tts/USB%1").arg(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").tqarg(i)); + for (uint i=1; i<10; i++) list.append(TQString("COM%1").arg(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").tqarg(_device)); + setSystemError(i18n("Could not open device \"%1\" read-write").arg(_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).").tqarg(size-todo).tqarg(size)); + log(Log::LineType::Error, i18n("Timeout sending data (%1/%2 bytes sent).").arg(size-todo).arg(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).").tqarg(size-todo).tqarg(size)); + log(Log::LineType::Error, i18n("Timeout receiving data (%1/%2 bytes received).").arg(size-todo).arg(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).").tqarg(nb)); + log(Log::LineType::Error, i18n("Timeout sending data (%1 bytes left).").arg(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") - .tqarg(toLabel(NumberBase::Hex, dev->descriptor.idVendor, 4)).tqarg(toLabel(NumberBase::Hex, dev->descriptor.idProduct, 4))); + .arg(toLabel(NumberBase::Hex, dev->descriptor.idVendor, 4)).arg(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).").tqarg(usb_strerror())); + log(Log::LineType::Error, message + TQString(" (err=%1).").arg(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...").tqarg(dname)); + log(Log::DebugLevel::Normal, TQString(" a driver \"%1\" is already installed...").arg(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).") - .tqarg(toLabel(NumberBase::Hex, _vendorId, 4)).tqarg(toLabel(NumberBase::Hex, _productId, 4))); + .arg(toLabel(NumberBase::Hex, _vendorId, 4)).arg(toLabel(NumberBase::Hex, _productId, 4))); return false; } - log(Log::DebugLevel::Extra, TQString("found USB device as \"%1\" on bus \"%2\"").tqarg(_device->filename).tqarg(_device->bus->dirname)); + log(Log::DebugLevel::Extra, TQString("found USB device as \"%1\" on bus \"%2\"").arg(_device->filename).arg(_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").tqarg(old).tqarg(_config)); + log(Log::LineType::Warning, i18n("Configuration %1 not present: using %2").arg(old).arg(_config)); } const usb_config_descriptor &configd = _device->config[i]; if ( usb_set_configuration(_handle, _config)<0 ) { - setSystemError(i18n("Error setting USB configuration %1.").tqarg(_config)); + setSystemError(i18n("Error setting USB configuration %1.").arg(_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").tqarg(_interface)); + setSystemError(i18n("Could not claim USB interface %1").arg(_interface)); return false; } - 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))); + 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))); 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\"") - .tqarg(toHexLabel(ep, 2)).tqarg(ENDPOINT_MODE_NAMES[mode]).tqarg(IO_DIR_NAMES[dir]).tqarg(size).tqarg(toPrintable(data, size, PrintEscapeAll))); + .arg(toHexLabel(ep, 2)).arg(ENDPOINT_MODE_NAMES[mode]).arg(IO_DIR_NAMES[dir]).arg(size).arg(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)").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)); + 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)); 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") - .tqarg(toHexLabel(ep, 2)).tqarg(ENDPOINT_MODE_NAMES[mode]).tqarg(IO_DIR_NAMES[dir]).tqarg(size)); + .arg(toHexLabel(ep, 2)).arg(ENDPOINT_MODE_NAMES[mode]).arg(IO_DIR_NAMES[dir]).arg(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)").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)); + 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)); return false; } if ( res==0 ) { diff --git a/src/devices/base/device_group.cpp b/src/devices/base/device_group.cpp index fa26d19..db70264 100644 --- a/src/devices/base/device_group.cpp +++ b/src/devices/base/device_group.cpp @@ -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.tqarg(data.alternatives()[i].upper()); - s += TQString("%2").tqarg(href).tqarg(data.alternatives()[i].upper()); + TQString href = deviceHref.arg(data.alternatives()[i].upper()); + s += TQString("%2").arg(href).arg(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; iupdateView(); } @@ -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\"").tqarg(toHexLabel(value, _data.nbChars())) - .tqarg(toLabel(NumberBase::Bin, value, 4*_data.nbChars())).tqarg(s); + return TQString("%1 - %2 - \"%3\"").arg(toHexLabel(value, _data.nbChars())) + .arg(toLabel(NumberBase::Bin, value, 4*_data.nbChars())).arg(s); } TQWidget *Register::ListViewItem::editWidgetFactory(int col) const diff --git a/src/devices/mem24/mem24/mem24_group.cpp b/src/devices/mem24/mem24/mem24_group.cpp index f396027..00ca072 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").tqarg(formatNumber(mdata.nbBytes())); + TQString tmp = i18n("%1 bytes").arg(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").tqarg(i+1); + data.label = i18n("Block #%1").arg(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 f3ce758..aba1cbf 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).") - .tqarg(toHexLabel(k, 8)).tqarg(toHexLabel(_data[k], 8)).tqarg(toHexLabel(mask, 8)); + .arg(toHexLabel(k, 8)).arg(toHexLabel(_data[k], 8)).arg(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 82c596c..4c4b201 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).") - .tqarg(toHexLabel(address, device().nbCharsAddress())).tqarg(toHexLabel(d, 2)).tqarg(toHexLabel(v, 2))); + .arg(toHexLabel(address, device().nbCharsAddress())).arg(toHexLabel(d, 2)).arg(toHexLabel(v, 2))); else log(Log::LineType::Error, i18n("Device memory doesn't match hex file (at address %1: reading %2 and expecting %3).") - .tqarg(toHexLabel(address, device().nbCharsAddress())).tqarg(toHexLabel(d, 2)).tqarg(toHexLabel(v, 2))); + .arg(toHexLabel(address, device().nbCharsAddress())).arg(toHexLabel(d, 2)).arg(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 81fd7bb..6e41c7b 100644 --- a/src/devices/mem24/xml/mem24_xml_to_data.cpp +++ b/src/devices/mem24/xml/mem24_xml_to_data.cpp @@ -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").tqarg(it.key())); + if ( it.data()!=1 ) qFatal(TQString("Duplicated pin %1").arg(it.key())); } }; // class diff --git a/src/devices/pic/base/pic.cpp b/src/devices/pic/base/pic.cpp index 94267e2..75e6bf4 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)").tqarg(it.key()).tqarg(toLabel(it.data().revision)); + list += i18n("%1 (rev. %2)").arg(it.key()).arg(toLabel(it.data().revision)); break; case Architecture::P24F: - list += i18n("%1 (rev. %2.%3)").tqarg(it.key()).tqarg(toLabel(it.data().revision)).tqarg(toLabel(it.data().minorRevision)); + list += i18n("%1 (rev. %2.%3)").arg(it.key()).arg(toLabel(it.data().revision)).arg(toLabel(it.data().minorRevision)); break; case Architecture::P30F: - 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)); + 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)); break; case Architecture::P24H: case Architecture::P33F: - list += i18n("%1 (rev. %2)").tqarg(it.key()).tqarg(toLabel(it.data().revision)); + list += i18n("%1 (rev. %2)").arg(it.key()).arg(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").tqarg(s).tqarg(mp.block); + if ( mp.block>=0 ) return i18n("%1 for block %2").arg(s).arg(mp.block); return s; } diff --git a/src/devices/pic/base/pic_protection.cpp b/src/devices/pic/base/pic_protection.cpp index d91f1f7..8fac920 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").tqarg(mask).tqarg(0)) ) return BlockProtection; + if ( _config.findMask(TQString("%1_%2").arg(mask).arg(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").tqarg(maskName(type, MemoryRangeType::Code)).tqarg(block); + return TQString("%1_%2").arg(maskName(type, MemoryRangeType::Code)).arg(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_group_ui.cpp b/src/devices/pic/gui/pic_group_ui.cpp index fa4aa56..d2ff2f4 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").tqarg(k))); + ListContainer *bbranch = (rdata.nbBanks==1 ? branch : branch->appendBranch(i18n("Bank %1").arg(k))); uint nb = 0; for (uint i=0; isetText(i18n("not present")); - else _boot.label->setText(TQString("[%1:%2]").tqarg(toHex(r.start, nbChars)).tqarg(toHex(r.end, nbChars))); + else _boot.label->setText(TQString("[%1:%2]").arg(toHex(r.start, nbChars)).arg(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]").tqarg(toHex(r.start, nbChars)).tqarg(toHex(r.end, nbChars))); + else _blocks[i].label->setText(TQString("[%1:%2]").arg(toHex(r.start, nbChars)).arg(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").tqarg(toHexLabel(device().userIdRecommendedMask(), nbChars)); + if ( type()==MemoryRangeType::UserId ) add = i18n(" - recommended mask: %1").arg(toHexLabel(device().userIdRecommendedMask(), nbChars)); if ( type()==MemoryRangeType::Cal && _hexview ) add = i18n(" - not programmed by default"); TQString comment = i18n("%1-bit words - mask: %2") - .tqarg(device().nbBitsWord(type())).tqarg(toHexLabel(device().mask(type()), nbChars)); + .arg(device().nbBitsWord(type())).arg(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 6e350ed..565ec93 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").tqarg(v)); + else _voltages[i]->setText(TQString("%1 V").arg(v)); } } diff --git a/src/devices/pic/gui/pic_register_view.cpp b/src/devices/pic/gui/pic_register_view.cpp index 1cba9c9..820da6b 100644 --- a/src/devices/pic/gui/pic_register_view.cpp +++ b/src/devices/pic/gui/pic_register_view.cpp @@ -51,14 +51,14 @@ Pic::BankWidget::BankWidget(uint i, TQWidget *parent) } else { _bankCombo = new TQComboBox(this); for (uint k=1; k<2*rdata.nbBanks-1; k++) { - _bankCombo->insertItem((k%2)==0 ? i18n("Bank %1 (low)").tqarg(k/2) : i18n("Bank %1 (high)").tqarg(k/2)); + _bankCombo->insertItem((k%2)==0 ? i18n("Bank %1 (low)").arg(k/2) : i18n("Bank %1 (high)").arg(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").tqarg(i), this); + TQLabel *label = new TQLabel(i18n("Bank %1").arg(i), this); label->setAlignment(AlignCenter); top->addMultiCellWidget(label, row,row, 0,6, AlignHCenter); } diff --git a/src/devices/pic/pic/pic_group.cpp b/src/devices/pic/pic/pic_group.cpp index 311bff3..2ae250f 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").tqarg(formatNumber(nbw)); - tmp += i18n(" (%2 bits)").tqarg(pdata.nbBitsWord(MemoryRangeType::Code)); + TQString tmp = i18n("%1 words").arg(formatNumber(nbw)); + tmp += i18n(" (%2 bits)").arg(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").tqarg(formatNumber(nbw)); - tmp += i18n(" (%2 bits)").tqarg(pdata.nbBitsWord(MemoryRangeType::Eeprom)); + TQString tmp = i18n("%1 bytes").arg(formatNumber(nbw)); + tmp += i18n(" (%2 bits)").arg(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 5f86517..5ffb663 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).") - .tqarg(toHexLabel(offset, 8)).tqarg(toHexLabel(_ranges[type][wOffset], 8)).tqarg(toHexLabel(mask, 8)); + .arg(toHexLabel(offset, 8)).arg(toHexLabel(_ranges[type][wOffset], 8)).arg(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 7dda5c2..eef84cc 100644 --- a/src/devices/pic/prog/pic_debug.cpp +++ b/src/devices/pic/prog/pic_debug.cpp @@ -86,9 +86,9 @@ 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") - .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); + .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); } //---------------------------------------------------------------------------- @@ -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") - .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)); + .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)); } diff --git a/src/devices/pic/prog/pic_prog.cpp b/src/devices/pic/prog/pic_prog.cpp index f0c917d..b134303 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.").tqarg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).tqarg(_voltages[i].value)); + log(Log::LineType::Error, i18n(" %1 = %2 V: error in voltage level.").arg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).arg(_voltages[i].value)); } else if ( _voltages[i].value!=UNKNOWN_VOLTAGE ) - log(Log::DebugLevel::Normal, TQString(" %1 = %2 V").tqarg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).tqarg(_voltages[i].value)); + log(Log::DebugLevel::Normal, TQString(" %1 = %2 V").arg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).arg(_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.") - .tqarg(vpp()).tqarg(tvpp.max); + .arg(vpp()).arg(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.") - .tqarg(vdd()).tqarg(tvdd.min)); + .arg(vdd()).arg(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.") - .tqarg(vdd()).tqarg(tvdd.min)); + .arg(vdd()).arg(tvdd.min)); else log(Log::LineType::Warning, i18n("Vdd (%1 V) is too low for programming\nMinimum required is %2 V.") - .tqarg(vdd()).tqarg(tvdd.min)); + .arg(vdd()).arg(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.") - .tqarg(vdd()).tqarg(tvdd.max); + .arg(vdd()).arg(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") - .tqarg(_hasProtectedCode ? "true" : "false").tqarg(_hasProtectedEeprom ? "true" : "false")); + .arg(_hasProtectedCode ? "true" : "false").arg(_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\"...").tqarg(device()->name())); + log(Log::LineType::Information, i18n("Device not autodetectable: continuing with the specified device name \"%1\"...").arg(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).").tqarg(toHexLabel(rawId, nbChars))); + log(Log::LineType::Error, i18n("Missing or incorrect device (Read id is %1).").arg(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").tqarg(device()->idNames(ids).join("; "))); + log(Log::LineType::Information, i18n("Read id: %1").arg(device()->idNames(ids).join("; "))); if ( ids.contains(device()->name()) ) return true; - message = i18n("Read id does not match the specified device name \"%1\".").tqarg(device()->name()); + message = i18n("Read id does not match the specified device name \"%1\".").arg(device()->name()); } else { - log(Log::LineType::Warning, i18n(" Unknown or incorrect device (Read id is %1).").tqarg(toHexLabel(rawId, nbChars))); + log(Log::LineType::Warning, i18n(" Unknown or incorrect device (Read id is %1).").arg(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\"...").tqarg(device()->name())); + log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").arg(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").tqarg(prettyCalibration(data))); + log(Log::DebugLevel::Normal, TQString(" Read osccal: %1").arg(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").tqarg(prettyCalibration(data))); + log(Log::DebugLevel::Normal, TQString(" Read osccal backup: %1").arg(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").tqarg(toHexLabel(cdata[0], device()->nbCharsWord(Pic::MemoryRangeType::Config)))); + log(Log::DebugLevel::Normal, TQString(" Write config with band gap bits: %2").arg(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.").tqarg(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.").arg(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.").tqarg(type.label())); + log(Log::LineType::Information, i18n("The selected programmer cannot read %1: operation skipped.").arg(type.label())); return true; } VerifyData *vdata = (vd ? new VerifyData(vd->actions, vd->memory) : 0); if (vdata) { - log(Log::LineType::Information, i18n(" Verify memory: %1").tqarg(type.label())); + log(Log::LineType::Information, i18n(" Verify memory: %1").arg(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.") - .tqarg(type.label())); + .arg(type.label())); } else vdata->protectedRanges.clear(); } else { - log(Log::LineType::Information, i18n(" Read memory: %1").tqarg(type.label())); + log(Log::LineType::Information, i18n(" Read memory: %1").arg(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").tqarg(mtype.label())); + log(Log::LineType::Information, i18n(" Write memory: %1").arg(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.").tqarg(s), message); + sorry(i18n("The calibration word %1 is not valid.").arg(s), message); return false; } - return askContinue(i18n("Do you want to overwrite the device calibration with %1?").tqarg(s)); + return askContinue(i18n("Do you want to overwrite the device calibration with %1?").arg(s)); } bool Programmer::PicBase::tryProgramCalibration(const Device::Array &data, bool &success) { - log(Log::LineType::Information, i18n(" Write memory: %1").tqarg(Pic::MemoryRangeType(Pic::MemoryRangeType::Cal).label())); + log(Log::LineType::Information, i18n(" Write memory: %1").arg(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").tqarg(Pic::MemoryRangeType(Pic::MemoryRangeType::CalBackup).label())); + log(Log::LineType::Information, i18n(" Write memory: %1").arg(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").tqarg(start)); + const_cast(this)->log(Log::DebugLevel::Normal, TQString("start before align: %1").arg(start)); uint align = device().nbWordsWriteAlignment(type); start -= start % align; - const_cast(this)->log(Log::DebugLevel::Normal, TQString("start after align: %1 (align=%2)").tqarg(start).tqarg(align)); + const_cast(this)->log(Log::DebugLevel::Normal, TQString("start after align: %1 (align=%2)").arg(start).arg(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").tqarg(end)); + const_cast(this)->log(Log::DebugLevel::Normal, TQString("end before align: %1").arg(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)").tqarg(end).tqarg(align)); + const_cast(this)->log(Log::DebugLevel::Normal, TQString("end after align: %1 (align=%2)").arg(end).arg(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\"").tqarg(type.key())); + if ( !ok1 || !ok2 || !ok3 ) qFatal(TQString("Cannot extract voltage value for \"%1\"").arg(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").tqarg(type.key())); + if ( data()->nbBitsWord(type)==0 ) qFatal(TQString("Architecture doesn't contain memory range %1").arg(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)").tqarg(toHexLabel(data()->_userIdRecommendedMask, 8)).tqarg(toHexLabel(data()->mask(type), 8))); + 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 ( 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").tqarg(cmask.name)); + if ( !cnames.isEmpty() ) qFatal(TQString("No cname should be defined for invalid value in mask %1").arg(cmask.name)); return; } - if ( cvalue.name.isEmpty() ) qFatal(TQString("Empty value name in mask %1").tqarg(cmask.name)); + if ( cvalue.name.isEmpty() ) qFatal(TQString("Empty value name in mask %1").arg(cmask.name)); if ( cmask.value.isInside(pmask) ) { // protected bits - if ( !cnames.isEmpty() ) qFatal(TQString("Config name should be null for protected config mask \"%1\"").tqarg(cmask.name)); + if ( !cnames.isEmpty() ) qFatal(TQString("Config name should be null for protected config mask \"%1\"").arg(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)").tqarg(cvalue.name).tqarg(cmask.name)); + qFatal(TQString("cname not defined for \"%1\" (%2)").arg(cvalue.name).arg(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\"").tqarg(cmask.name).tqarg(cvalue.name)); + qFatal(TQString("Invalid config name for \"%1\"/\"%2\"").arg(cmask.name).arg(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").tqarg(cmask.name)); + if ( !Config::hasMaskName(cmask.name) ) qFatal(TQString("Unknown mask name %1").arg(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").tqarg(mask.attribute("name"))); + qFatal(TQString("Malformed mask value in mask %1").arg(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").tqarg(cmask.name)); + if ( value.nodeName()!="value" ) qFatal(TQString("Non value child in mask %1").arg(cmask.name)); if ( value.attribute("value")=="default" ) { - if ( !defName.isEmpty() ) qFatal(TQString("Default value already defined for mask %1").tqarg(cmask.name)); + if ( !defName.isEmpty() ) qFatal(TQString("Default value already defined for mask %1").arg(cmask.name)); defName = value.attribute("name"); - //if ( names.contains(defName) ) qFatal(TQString("Value name duplicated in mask %1").tqarg(cmask.name)); + //if ( names.contains(defName) ) qFatal(TQString("Value name duplicated in mask %1").arg(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").tqarg(cmask.name)); + if ( !ok || !cvalue.value.isInside(cmask.value) ) qFatal(TQString("Malformed value in mask %1").arg(cmask.name)); cvalue.name = value.attribute("name"); - //if ( names.contains(cvalue.name) ) qFatal(TQString("Value name duplicated in mask %1").tqarg(cmask.name)); + //if ( names.contains(cvalue.name) ) qFatal(TQString("Value name duplicated in mask %1").arg(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").tqarg(cmask.name)); + if ( nb<=1 ) qFatal(TQString("Default value used less than twice in mask %1").arg(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\"").tqarg(config.attribute("wmask"))); + if ( !ok || cword.wmask>gmask ) qFatal(TQString("Missing or malformed config wmask \"%1\"").arg(config.attribute("wmask"))); cword.bvalue = fromHexLabel(config.attribute("bvalue"), nbChars, &ok); - if ( !ok ) qFatal(TQString("Missing or malformed config bvalue \"%1\"").tqarg(config.attribute("bvalue"))); + if ( !ok ) qFatal(TQString("Missing or malformed config bvalue \"%1\"").arg(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").tqarg(cword.name)); - if ( cword.cmask==mask ) qFatal(TQString("Redundant cmask in %1").tqarg(cword.name)); + //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 ( !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").tqarg(offset).tqarg(nbWords)); - if ( !configWords[offset].name.isNull() ) qFatal(TQString("Config offset %1 is duplicated").tqarg(offset)); + 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)); for (uint i=0; iconfig().findMask(list[i]); - if ( mask==0 ) qFatal(TQString("Not valid mask name for \"protected\" tag in checksum: %1").tqarg(list[i])); + if ( mask==0 ) qFatal(TQString("Not valid mask name for \"protected\" tag in checksum: %1").arg(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").tqarg(list[i])); + qFatal(TQString("Not switch protection from mask name for \"protected\" tag in checksum: %1").arg(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\"").tqarg(arch)); + if ( data()->_architecture==Architecture::Nb_Types ) qFatal(TQString("Unrecognized architecture \"%1\"").arg(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").tqarg(vtype.key())); + case ProgVoltageType::VddBulkErase: qFatal(TQString("Voltage \"%1\" not defined").arg(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)").tqarg(k.key()).tqarg(i.key())); + qFatal(TQString("Overlapping memory ranges (%1 and %2)").arg(k.key()).arg(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").tqarg(value.name).tqarg(mask.name)); + qFatal(TQString("Malformed value name \"%1\" in mask %2").arg(value.name).arg(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").tqarg(toHexLabel(*it, data()->nbCharsWord(MemoryRangeType::Config))).tqarg(mask.name)); + if ( !hasValue(mask, *it) ) qFatal(TQString("Value %1 not defined in mask %2").arg(toHexLabel(*it, data()->nbCharsWord(MemoryRangeType::Config))).arg(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\"").tqarg(it.key())); + if ( !it.key().isEmpty() && !it.data() ) qFatal(TQString("Missing checksum \"%1\"").arg(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").tqarg(name).tqarg(e.attribute("address"))); + if ( !ok ) qFatal(TQString("SFR %1 address %2 is malformed").arg(name).arg(e.attribute("address"))); uint rlength = data()->registersData().nbBanks * data()->architecture().data().registerBankLength; - if ( address>=rlength ) qFatal(TQString("Address %1 outside register range").tqarg(toHexLabel(address, 3))); + if ( address>=rlength ) qFatal(TQString("Address %1 outside register range").arg(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").tqarg(nb)); + if ( nb>Device::MAX_NB_PORT_BITS ) qFatal(TQString("Need higher MAX_NB_PORT_BITS: %1").arg(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").tqarg(k)); + if ( !ok || rdata.bits[k].properties>MaxRegisterBitProperty ) qFatal(TQString("Malformed access bit %1").arg(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").tqarg(k)); + if ( !ok || rdata.bits[k].mclr>Nb_RegisterBitStates ) qFatal(TQString("Malformed mclr bit %1").arg(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").tqarg(k)); + if ( !ok || rdata.bits[k].por>Nb_RegisterBitStates ) qFatal(TQString("Malformed por bit %1").arg(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").tqarg(name).tqarg(e.attribute("address"))); + if ( !ok ) qFatal(TQString("Combined %1 address %2 is malformed").arg(name).arg(e.attribute("address"))); uint rlength = data()->registersData().nbBanks * data()->architecture().data().registerBankLength; - if ( rdata.address>=rlength ) qFatal(TQString("Address %1 outside register range").tqarg(toHexLabel(rdata.address, 3))); + if ( rdata.address>=rlength ) qFatal(TQString("Address %1 outside register range").arg(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").tqarg(name).tqarg(e.attribute("size"))); + if ( !ok || rdata.nbChars<2 ) qFatal(TQString("Combined %1 size %2 is malformed").arg(name).arg(e.attribute("size"))); Address end = rdata.address + rdata.nbChars/2 - 1; - if ( end>=rlength ) qFatal(TQString("Address %1 outside register range").tqarg(toHexLabel(end, 3))); + if ( end>=rlength ) qFatal(TQString("Address %1 outside register range").arg(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").tqarg(s)); + if ( !_map.contains(s) ) qFatal(TQString("Registers same as unknown device %1").arg(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").tqarg(e.nodeName())); + else qFatal(TQString("Node name \"%1\" is not recognized").arg(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").tqarg(trisname).tqarg(portname)); + if ( !hasPort && hasTris ) qFatal(TQString("%1 needs %2 to be present").arg(trisname).arg(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").tqarg(latchname).tqarg(portname)); + if ( !hasPort && hasLatch ) qFatal(TQString("%1 needs %2 to be present").arg(latchname).arg(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").tqarg(name)); + if ( devices.contains(name) ) qFatal(TQString("Registers already defined for %1").arg(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\"").tqarg(it.key())); + if ( it.data()!=1 ) qFatal(TQString("Duplicated pin \"%1\"").arg(it.key())); } const Pic::RegistersData &rdata = static_cast(*_data->registersData()); for (uint i=0; i &pinLabels) const for (uint k=0; ksetText(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").tqarg(name)); + else _labelDevice->setText(i18n("Device guessed from file: %1").arg(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.").tqarg(filename()), KStdGuiItem::save(), KStdGuiItem::discard()) ) + if ( MessageBox::questionYesNo(i18n("File %1 not saved.").arg(filename()), KStdGuiItem::save(), KStdGuiItem::discard()) ) Editor::save(); } _labelWarning->hide(); diff --git a/src/libgui/device_gui.cpp b/src/libgui/device_gui.cpp index fafd5a1..e5c6d4a 100644 --- a/src/libgui/device_gui.cpp +++ b/src/libgui/device_gui.cpp @@ -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.").tqarg(pgroup->label())); + _deviceView->setText(i18n("Could not detect supported devices for \"%1\". Please check installation.").arg(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.").tqarg(tgroup->label())); + _deviceView->setText(i18n("Could not detect supported devices for toolchain \"%1\". Please check installation.").arg(tgroup->label())); return; } for (int i=list.count()-1; i>=0; i--) { diff --git a/src/libgui/editor.cpp b/src/libgui/editor.cpp index 2999b1e..e5cea2e 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.").tqarg(filename()), + MessageBox::Result res = MessageBox::questionYesNoCancel(i18n("File %1 not saved.").arg(filename()), KStdGuiItem::save(), KStdGuiItem::discard()); if ( res==MessageBox::Cancel ) return false; if ( res==MessageBox::Yes ) save(); diff --git a/src/libgui/editor_manager.cpp b/src/libgui/editor_manager.cpp index 5c9c193..8713c9e 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?").tqarg(url.kurl().prettyURL()), + if ( !MessageBox::askContinue(i18n("File \"%1\" already loaded. Reload?").arg(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; ifromHexBuffer(_hexBuffer, warnings)!=Device::Memory::NoWarning ) { _labelWarning->setText(i18n("Warning: hex file seems to be incompatible with the selected device %1:
%2") - .tqarg(_memory->device().name()).tqarg(warnings.join("
"))); + .arg(_memory->device().name()).arg(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\".").tqarg(url.pretty())); + return save(url, i18n("File URL: \"%1\".").arg(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\".").tqarg(url.pretty()), fileErrorString, Log::Show); + MessageBox::detailedSorry(i18n("Error while writing file \"%1\".").arg(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").tqarg(toHexLabel(cs, 4)); + s = i18n("Checksum: %1").arg(toHexLabel(cs, 4)); } emit statusTextChanged(s); } diff --git a/src/libgui/likeback.cpp b/src/libgui/likeback.cpp index bac822c..df00d39 100644 --- a/src/libgui/likeback.cpp +++ b/src/libgui/likeback.cpp @@ -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.").tqarg(s_about->programName()) + "

" + "

" + i18n("This is a quick feedback system for %1.").arg(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, " diff --git a/src/libgui/log_view.cpp b/src/libgui/log_view.cpp index 2442bc3..cdb92f2 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("").tqarg(color); + TQString s = TQString("").arg(color); if (bold) s += ""; s += escapeXml(text); if (bold) s += ""; diff --git a/src/libgui/object_view.cpp b/src/libgui/object_view.cpp index fa5239d..1854b8a 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").tqarg(_source.pretty())); + log(Log::LineType::Information, i18n("Disassembling hex file: %1").arg(_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 8ece518..c7a043f 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.").tqarg(_url.pretty()); + error = i18n("Project file %1 does not exist.").arg(_url.pretty()); return false; } PURL::Url tmp = _url; diff --git a/src/libgui/project_manager.cpp b/src/libgui/project_manager.cpp index ce58146..c9eabc1 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\".").tqarg(_project->url().pretty()), error, Log::Show); + MessageBox::detailedSorry(i18n("Could not save project file \"%1\".").arg(_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").tqarg(url.pretty()), Log::Show); + MessageBox::detailedSorry(i18n("Could not find file."), i18n("File: %1").arg(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?").tqarg(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?").arg(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").tqarg(purl.pretty()), Log::Show); + MessageBox::detailedSorry(i18n("File is already in the project."), i18n("File: %1").arg(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").tqarg(url.pretty()) + sview.string(), Log::Show); + MessageBox::detailedSorry(i18n("Copying file to project directory failed."), i18n("File: %1\n").arg(url.pretty()) + sview.string(), Log::Show); return; } } diff --git a/src/libgui/project_wizard.cpp b/src/libgui/project_wizard.cpp index 35e76b5..15fe174 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; - tqrepaint(); + repaint(); } PURL::FileGroup FileListItem::fileGroup() const @@ -184,7 +184,7 @@ void ProjectWizard::next() return; } } else if ( url().exists() ) { - if ( !MessageBox::askContinue(i18n("Project \"%1\"already exists. Overwrite it?").tqarg(url().filename())) ) return; + if ( !MessageBox::askContinue(i18n("Project \"%1\"already exists. Overwrite it?").arg(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? ").tqarg(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? ").arg(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").tqarg(turl.pretty()) + sview.string(), Log::Show); + else MessageBox::detailedSorry(i18n("Error creating template file."), i18n("File: %1\n").arg(turl.pretty()) + sview.string(), Log::Show); _project->setOpenedFiles(files); } else { Log::StringView sview; diff --git a/src/libgui/text_editor.cpp b/src/libgui/text_editor.cpp index d9d0692..f78ebb8 100644 --- a/src/libgui/text_editor.cpp +++ b/src/libgui/text_editor.cpp @@ -167,7 +167,7 @@ void TextEditor::statusChanged() { uint line, col; _view->cursorPosition(&line, &col) ; - TQString text = i18n("Line: %1 Col: %2").tqarg(line+1).tqarg(col+1); + TQString text = i18n("Line: %1 Col: %2").arg(line+1).arg(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 b909b82..0be3a13 100644 --- a/src/libgui/toplevel.cpp +++ b/src/libgui/toplevel.cpp @@ -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.").tqarg("http://pikloops.sourceforge.net"), Log::Show); + 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); } void MainWindow::pikloopsDone() diff --git a/src/piklab-coff/main.cpp b/src/piklab-coff/main.cpp index 9e865e7..dff1b68 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") - .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))); + .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))); } 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\":").tqarg(s->name()), TQString()); + keys.append(i18n("section \"%1\":").arg(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\"").tqarg(sym.name()) + prettySymbol(sym)); + keys.append(key, i18n("symbol \"%1\"").arg(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\".").tqarg(s), ARG_ERROR); + if ( _device==0 ) return errorExit(i18n("Unknown device \"%1\".").arg(s), ARG_ERROR); return OK; } - return errorExit(i18n("Unknown property \"%1\".").tqarg(property), ARG_ERROR); + return errorExit(i18n("Unknown property \"%1\".").arg(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\".").tqarg(property)); + log(Log::LineType::SoftError, i18n("Unknown property \"%1\".").arg(property)); return TQString(); } diff --git a/src/piklab-hex/main.cpp b/src/piklab-hex/main.cpp index 0d9a7cc..70796bb 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\".").tqarg(_device->name())); + if ( wtypes==Device::Memory::NoWarning ) return okExit(i18n("Hex file is compatible with device \"%1\".").arg(_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.").tqarg(toHexLabel(it.key(), 8)), EXEC_ERROR); + return errorExit(i18n("The two hex files are different at address %1.").arg(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").tqarg(toHexLabel(cs, 4))); + log(Log::LineType::Normal, i18n("Checksum: %1").arg(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").tqarg(toHexLabel(ucs, 4))); + if ( ucs!=cs ) log(Log::LineType::Information, i18n("Unprotected checksum: %1").arg(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\".").tqarg(s), ARG_ERROR); + if ( _device==0 ) return errorExit(i18n("Unknown device \"%1\".").arg(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\".").tqarg(property), ARG_ERROR); + return errorExit(i18n("Unknown property \"%1\".").arg(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\".").tqarg(property)); + log(Log::LineType::SoftError, i18n("Unknown property \"%1\".").arg(property)); return TQString(); } diff --git a/src/piklab-prog/cli_interactive.cpp b/src/piklab-prog/cli_interactive.cpp index ae485a1..40adb2c 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.").tqarg(toHexLabel(address, nbChars(NumberBase::Hex, address)))); + if ( Breakpoint::list().contains(data) ) return okExit(i18n("Breakpoint already set at %1.").arg(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.").tqarg(toHexLabel(address, nbChars(NumberBase::Hex, address)))); + return okExit(i18n("Breakpoint set at %1.").arg(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).").tqarg(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).").arg(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").tqarg(name.upper()).tqarg(toHexLabel(Register::list().value(rtd), nbChars))); + return okExit(i18n("%1 = %2").arg(name.upper()).arg(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\".").tqarg(filename), ARG_ERROR); + if ( !file.open(IO_ReadOnly) ) return errorExit(i18n("Could not open filename \"%1\".").arg(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).").tqarg(rs).tqarg(s)); + if ( rs!=s ) log(Log::LineType::Warning, i18n("Read string is different than expected: %1 (%2).").arg(rs).arg(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 f8b73d1..d448f95 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.").tqarg(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.").arg(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 beb309a..2f206a2 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\":").tqarg(_progGroup->label())); + log(Log::LineType::Normal, i18n("Supported devices for \"%1\":").arg(_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\":").tqarg(_progGroup->label())); + if (_progGroup) log(Log::LineType::Normal, i18n("Detected ports supported by \"%1\":").arg(_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").tqarg(type.key())); + FOR_EACH(Pic::MemoryRangeType, type) log(Log::LineType::Normal, TQString(" %1").arg(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\".").tqarg(errors[0]), FILE_ERROR); + return errorExit(i18n("Could not load hex file \"%1\".").arg(errors[0]), FILE_ERROR); if ( warningTypes!=Device::Memory::NoWarning ) - log(Log::LineType::Warning, i18n("Hex file seems incompatible with device \"%1\".").tqarg(warnings.join(" "))); + log(Log::LineType::Warning, i18n("Hex file seems incompatible with device \"%1\".").arg(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\".").tqarg(_hexUrl.pretty()), FILE_ERROR); + return errorExit(i18n("Error while writing file \"%1\".").arg(_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.").tqarg(_device->name()), NOT_SUPPORTED_ERROR); + return errorExit(i18n("The selected device \"%1\" is not supported by the selected programmer.").arg(_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\").").tqarg(_hardware), NOT_SUPPORTED_ERROR); + if ( !ok ) return errorExit(i18n("The selected programmer does not supported the specified hardware configuration (\"%1\").").arg(_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\".").tqarg(value.lower()), ARG_ERROR); + return errorExit(i18n("Unknown programmer \"%1\".").arg(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\".").tqarg(s), ARG_ERROR); + if ( _device==0 ) return errorExit(i18n("Unknown device \"%1\".").arg(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\".").tqarg(s), ARG_ERROR); + return errorExit(i18n("Unknown hex file format \"%1\".").arg(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\"").tqarg(property), ARG_ERROR); + return errorExit(i18n("Unknown property \"%1\"").arg(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\"").tqarg(property)); + log(Log::LineType::SoftError, i18n("Unknown property \"%1\"").arg(property)); return TQString(); } diff --git a/src/piklab-test/base/generator_check.cpp b/src/piklab-test/base/generator_check.cpp index 1df1a9c..8dfa36c 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").tqarg(data.name()).tqarg(_helper->_cprocess->sout()+_helper->_cprocess->serr()).tqarg(TQString())) + 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())) // 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").tqarg(data.name()).tqarg(_helper->_lprocess->sout()+_helper->_lprocess->serr()).tqarg(TQString())) + 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())) } // 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").tqarg(errors.join(" "))) - //if ( warningTypes!=Device::Memory::NoWarning ) TEST_FAILED(TQString("Warning loading hex into memory: %1").tqarg(warnings.join(" "))) + 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(" "))) 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)") - .tqarg(cmask.name).tqarg(cmask.values[l2].name) - .tqarg(toHexLabel(word2.maskWith(cmask.value), nbChars)).tqarg(toHexLabel(word1.maskWith(cmask.value), nbChars))) + .arg(cmask.name).arg(cmask.values[l2].name) + .arg(toHexLabel(word2.maskWith(cmask.value), nbChars)).arg(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").tqarg(data.name())) + if (!ok) TEST_FAILED_RETURN(TQString("Incomplete template generator for %1").arg(data.name())) return true; } diff --git a/src/piklab-test/checksum/checksum_check.cpp b/src/piklab-test/checksum/checksum_check.cpp index 47873ab..a165c86 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").tqarg(label).tqarg(toHexLabel(c, 4)).tqarg(toHexLabel(checksum, 4))) + if ( c!=checksum ) TEST_FAILED_RETURN(TQString("%1 %2/%3").arg(label).arg(toHexLabel(c, 4)).arg(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 e6bb1be..df05930 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").tqarg(data.name())) + if ( !_memory2->load(_fdest->stream(), errors, wtypes, warnings) ) TEST_FAILED_RETURN(TQString("Error loading hex file into memory %1").arg(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 ed86c35..f96ca2f 100644 --- a/src/progs/base/generic_debug.cpp +++ b/src/progs/base/generic_debug.cpp @@ -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").tqarg(toHexLabel(pc(), _programmer.device()->nbCharsAddress()))); + log(Log::LineType::Information, TQString("Halted at %1").arg(toHexLabel(pc(), _programmer.device()->nbCharsAddress()))); _programmer.setState(::Programmer::Halted); return true; } diff --git a/src/progs/base/generic_prog.cpp b/src/progs/base/generic_prog.cpp index e7e6e2e..a3e3770 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...").tqarg(label).tqarg(_device->name())); + log(Log::LineType::Information, i18n("Connecting %1 with device %2...").arg(label).arg(_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...").tqarg(label).tqarg(s).tqarg(_device->name())); + log(Log::LineType::Information, i18n("Connecting %1 on %2 with device %3...").arg(label).arg(s).arg(_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").tqarg(_targetSelfPowered ? "true" : "false")); + log(Log::LineType::Information, i18n(" Set target self powered: %1").arg(_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").tqarg(_firmwareVersion.pretty())); + log(Log::LineType::Information, i18n("Firmware version is %1").arg(_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").tqarg(pin).tqarg(on)); + //log(Log::DebugLevel::Extra, TQString("Hardware::read DataIn %2: %3").arg(pin).arg(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)").tqarg(pd.pin+1).tqarg(pd.label); + return TQString("%1 (%2)").arg(pd.pin+1).arg(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 ef17479..0c930c9 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").tqarg(i).tqarg(toHexLabel(add, 2))); + log(Log::DebugLevel::Max, TQString(" byte #%1: %2").arg(i).arg(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").tqarg(toHexLabel(address, nbChars(device().nbBytes())))); + log(Log::LineType::Error, i18n("Timeout writing at address %1").arg(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 c6316e9..19c74b5 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").tqarg(cmd)); + _pbase.log(Log::DebugLevel::Extra, TQString("pulse engine: %1").arg(cmd)); TQByteArray a = toAscii(cmd); BitValue res = 0; for (const char *ptr=a.data(); (ptr-a.data())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").tqarg(n)); + log(Log::DebugLevel::Normal, TQString("signal: %1").arg(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 c446bad..f6c2541 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\"").tqarg(w)); + log(Log::LineType::Error, i18n("Error reading register \"%1\"").arg(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").tqarg(name).tqarg(toHexLabel(value, rdata.nbChars())); + TQString s = TQString("%1 = %2").arg(name).arg(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]").tqarg(toHex(address, rdata.nbCharsAddress())); + TQString s = TQString("ramData[$%1]").arg(toHex(address, rdata.nbCharsAddress())); return setRegister(s, value); } @@ -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").tqarg(name)); + log(Log::LineType::Error, i18n("Error reading state of IO bit: %1").arg(name)); return false; } switch (value[0].latin1()) { @@ -218,24 +218,24 @@ bool GPSim::Debugger::updatePortStatus(uint index, TQMapsetText(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\"").tqarg(version.pretty())); + else _status->setText(i18n("Found version \"%1\"").arg(version.pretty())); } //---------------------------------------------------------------------------- diff --git a/src/progs/gui/hardware_config_widget.cpp b/src/progs/gui/hardware_config_widget.cpp index 193fdfb..82b0bab 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:").tqarg(pd.type.label()).tqarg(pd.device), plainPage()); + label = new TQLabel(i18n("%1 at %2:").arg(pd.type.label()).arg(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\"?").tqarg(_name->text()), + if ( !MessageBox::askContinue(i18n("Do you want to overwrite this custom hardware \"%1\"?").arg(_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 ").tqarg(_names[i])); + TQString s = (standard ? _config->label(_names[i]) : i18n("%1 ").arg(_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\"?").tqarg(name), + if ( !MessageBox::askContinue(i18n("Do you want to delete custom hardware \"%1\"?").arg(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 32b1887..27ecb12 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.").tqarg(Piklab::URLS[Piklab::Support]); + text += i18n("See Piklab homepage for help.").arg(Piklab::URLS[Piklab::Support]); comment->setText(text); _grid->addMultiCellWidget(comment, 3*(_bgroup->count()-1)+1,3*(_bgroup->count()-1)+1, 0,3); } diff --git a/src/progs/icd1/base/icd1.cpp b/src/progs/icd1/base/icd1.cpp index 2ce3c80..3cba20c 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'.").tqarg(mode)); + log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").arg(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").tqarg(toHexLabel(res, 4)).tqarg(voltages[Pic::TargetVdd].value)); + log(Log::DebugLevel::Max, TQString("Vdd: %1 %2").arg(toHexLabel(res, 4)).arg(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").tqarg(toHexLabel(res, 4)).tqarg(voltages[Pic::TargetVpp].value)); + log(Log::DebugLevel::Max, TQString("Vpp: %1 %2").arg(toHexLabel(res, 4)).arg(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)").tqarg(toLabel(res))); + log(Log::LineType::Warning, i18n("Self-test failed (returned value is %1)").arg(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)").tqarg(toHexLabel(res, 4))); + log(Log::LineType::Error, i18n("Erase failed (returned value is %1)").arg(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 8d40697..164502f 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").tqarg(toPrintable(cs, PrintAlphaNum))); + log(Log::DebugLevel::Extra, TQString("Send command: %1").arg(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 18e9574..c926ca4 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") - .tqarg(toHexLabel(wordOffset, device().nbCharsAddress())).tqarg(toHexLabel(nbWords, device().nbCharsAddress())) - .tqarg(toHexLabel(data.count(), device().nbCharsAddress())).tqarg(force ? "true" : "false")); + .arg(toHexLabel(wordOffset, device().nbCharsAddress())).arg(toHexLabel(nbWords, device().nbCharsAddress())) + .arg(toHexLabel(data.count(), device().nbCharsAddress())).arg(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 6765340..073dd26 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).").tqarg(s)); + log(Log::LineType::Error, i18n("Unexpected answer ($7F00) from ICD2 (%1).").arg(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).").tqarg(_rx)); + log(Log::LineType::Error, i18n("Unexpected answer (08) from ICD2 (%1).").arg(_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'").tqarg(_rx)); + log(Log::DebugLevel::Extra, TQString("received answer: '%1'").arg(_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\"").tqarg(_rx)); + log(Log::LineType::Error, i18n("Malformed string received \"%1\"").arg(_rx)); return false; } if ( command.mid(0, 2)!=_rx.mid(3, 2) ) { log(Log::LineType::Error, i18n("Wrong return value (\"%1\"; was expecting \"%2\")") - .tqarg(_rx.mid(3, 2)).tqarg(command.mid(0, 2))); + .arg(_rx.mid(3, 2)).arg(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).").tqarg(cs).tqarg(toHex(chk, 2))); + log(Log::LineType::Error, i18n("Bad checksum for read block: %1 (%2 expected).").arg(cs).arg(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)").tqarg(toHex(wordIndex, 8)).tqarg(toHex(nbWords, 8)).tqarg(toHex(data.size(), 8))); + 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))); 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 5d4a35f..6beb0e9 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).") - .tqarg(i18n(Pic::TARGET_MODE_LABELS[mode])).tqarg(i18n(Pic::TARGET_MODE_LABELS[rmode]))); + .arg(i18n(Pic::TARGET_MODE_LABELS[mode])).arg(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").arg(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").tqarg(TQString(toString(NumberBase::Dec, reservedBank, 2))); - } else filename = TQString("de%1.hex").tqarg(fdata.debugExec); + filename = TQString("de18F_BANK%1.hex").arg(TQString(toString(NumberBase::Dec, reservedBank, 2))); + } else filename = TQString("de%1.hex").arg(fdata.debugExec); PURL::Url url = dir.findMatchingFilename(filename); - log(Log::DebugLevel::Normal, TQString(" Debug executive file: %1").tqarg(url.pretty())); + log(Log::DebugLevel::Normal, TQString(" Debug executive file: %1").arg(url.pretty())); if ( !url.exists() ) { - log(Log::LineType::Error, i18n("Could not find debug executive file \"%1\".").tqarg(url.pretty())); + log(Log::LineType::Error, i18n("Could not find debug executive file \"%1\".").arg(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\".").tqarg(url.pretty())); + log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").arg(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.").tqarg(url.pretty()).tqarg(errors[0])); + log(Log::LineType::Error, i18n("Could not read debug executive file \"%1\": %2.").arg(url.pretty()).arg(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").tqarg(url.pretty()).tqarg(toHexLabel(_deStart, 4)).tqarg(toHexLabel(_deEnd, 4))); + log(Log::DebugLevel::Extra, TQString("debug executive: \"%1\" %2:%3").arg(url.pretty()).arg(toHexLabel(_deStart, 4)).arg(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).") - .tqarg(toHexLabel(address, device()->nbCharsAddress())) - .tqarg(toHexLabel(data[i], device()->nbCharsWord(Pic::MemoryRangeType::Code))) - .tqarg(toHexLabel(_deArray[_deStart+i], device()->nbCharsWord(Pic::MemoryRangeType::Code)))); + .arg(toHexLabel(address, device()->nbCharsAddress())) + .arg(toHexLabel(data[i], device()->nbCharsWord(Pic::MemoryRangeType::Code))) + .arg(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").tqarg(_debugExecutiveVersion.pretty())); + log(Log::LineType::Information, i18n(" Debug executive version: %1").arg(_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 cd05d06..f856a61 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").tqarg(vdd)); + log(Log::DebugLevel::Normal, TQString(" Target Vdd: %1 V").arg(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)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(value, 4))); + log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(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)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(base().pc(), 4))); + log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(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)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(value, 4))); + log(Log::DebugLevel::Normal, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(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)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(base().pc(), 4))); + log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(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 dbea1d3..71300e1 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").tqarg(s)); - if ( ask && !askContinue(i18n("Self-test failed (%1). Do you want to continue anyway?").tqarg(s)) ) { + 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)) ) { 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").tqarg(_firmwareId).tqarg(fdata.efid)); + log(Log::DebugLevel::Normal, TQString(" Firmware id is %1 and we want %2").arg(_firmwareId).arg(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\".").tqarg(nameFilter).tqarg(dir.path())); + log(Log::LineType::Error, i18n("Could not find firmware file \"%1\" in directory \"%2\".").arg(nameFilter).arg(dir.path())); return false; } // upload hex file PURL::Url url(dir, files[files.count()-1]); - log(Log::DebugLevel::Normal, TQString(" Firmware file: %1").tqarg(url.pretty())); + log(Log::DebugLevel::Normal, TQString(" Firmware file: %1").arg(url.pretty())); Log::StringView sview; PURL::File file(url, sview); if ( !file.openForRead() ) { - log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").tqarg(url.pretty())); + log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").arg(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 7f276f0..5a25462 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'.").tqarg(mode)); + log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").arg(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 7cc2458..61fd5ae 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\"").tqarg(toPrintable((const char *)a.data(), size))); + //log(Log::DebugLevel::Max, TQString("Receiced: \"%1\"").arg(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").tqarg(USBPort::findDevice(Microchip::VENDOR_ID, ID_FIRMWARE)!=0)); + log(Log::DebugLevel::Extra, TQString("need firmware ? %1").arg(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").tqarg(USBPort::findDevice(Microchip::VENDOR_ID, ID_CLIENT)!=0)); + log(Log::DebugLevel::Extra, TQString("client here ? %1").arg(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 00f7c25..3923650 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.").tqarg(file.url().pretty()).tqarg(errors[0])); + log(Log::LineType::Error, i18n("Could not read firmware hex file \"%1\": %2.").arg(file.url().pretty()).arg(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 06eed27..5cb1196 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").tqarg(family)); + if ( Icd2::FAMILY_DATA[i].efid==0 ) qFatal(TQString("Family \"%1\" is unknown").arg(family)); return i; } diff --git a/src/progs/manager/debug_manager.cpp b/src/progs/manager/debug_manager.cpp index 7a47d5b..0ae4e9f 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").tqarg(coffUrl().pretty())); + log.log(Log::LineType::Information, i18n("Parsing COFF file: %1").arg(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.").tqarg(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)); Breakpoint::list().setState(last, Breakpoint::Disabled); } } @@ -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).").tqarg(first.pretty())); + log(Log::LineType::Error, i18n("Cannot start debugging session without input file (%1).").arg(first.pretty())); return false; } } diff --git a/src/progs/manager/prog_manager.cpp b/src/progs/manager/prog_manager.cpp index fddd60c..dac29ee 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.").tqarg(group().label())); - else sorry(i18n("The current programmer \"%1\" does not support device \"%2\".").tqarg(group().label()).tqarg(device()->name())); + 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())); 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 347ec52..1e06537 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\"").tqarg(toPrintable(data, PrintEscapeAll))); + log(Log::DebugLevel::Max, TQString("received: \"%1\"").arg(toPrintable(data, PrintEscapeAll))); return true; } bool PicdemBootloader::Port::send(const TQMemArray &cmd) { - log(Log::DebugLevel::Extra, TQString("send: \"%1\"").tqarg(toPrintable(cmd, PrintEscapeAll))); + log(Log::DebugLevel::Extra, TQString("send: \"%1\"").arg(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").tqarg(version.pretty())); + log(Log::LineType::Information, i18n("Bootloader version %1 detected").arg(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.").tqarg(toHexLabel(address, device().nbCharsAddress()))); + log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").arg(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).") - .tqarg(TQString(toHex(index/2, device().nbCharsAddress()))) - .tqarg(TQString(toHex(data[index], device().nbCharsWord(type)))) - .tqarg(TQString(toHex(varray[index], device().nbCharsWord(type))))); + .arg(TQString(toHex(index/2, device().nbCharsAddress()))) + .arg(TQString(toHex(data[index], device().nbCharsWord(type)))) + .arg(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 55d98e4..31d5787 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)") - .tqarg(toHexLabel(nb, 4)).tqarg(toHexLabel(high, 2))); + .arg(toHexLabel(nb, 4)).arg(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 3344ef8..e6284e1 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\"").tqarg(cmd.pretty())); + log(Log::DebugLevel::Extra, TQString("send command: \"%1\"").arg(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\"").tqarg(array.pretty())); + log(Log::DebugLevel::Max, TQString("received: \"%1\"").arg(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").tqarg(nbBytesWord).tqarg(nbRead).tqarg(offset)); + log(Log::DebugLevel::Max, TQString("receive words nbBytesWord=%1 nbRead=%2 offset=%3").arg(nbBytesWord).arg(nbRead).arg(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 6a010ff..4c06eb9 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).") - .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))))); + .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))))); 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").tqarg(_base.firmwareVersion().pretty())); + log(Log::DebugLevel::Extra, TQString("readVoltages: Firmware is %1").arg(_base.firmwareVersion().pretty())); if ( _base.firmwareVersion()name())); + log(Log::LineType::Error, i18n("Calibration firmware file seems incompatible with selected device %1.").arg(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 7620a9b..d080481 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.").tqarg(version.pretty())); + log(Log::LineType::Information, i18n("Bootloader version %1 detected.").arg(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.").tqarg(toHexLabel(address, device().nbCharsAddress()))); + log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").arg(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 fbd9997..a79484b 100644 --- a/src/progs/pickit2v2/base/pickit2v2.cpp +++ b/src/progs/pickit2v2/base/pickit2v2.cpp @@ -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").tqarg(i).tqarg(sdata.name)); + log(Log::DebugLevel::Extra, TQString("execute script #%1: %2").arg(i).arg(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").tqarg(toHexLabel(checksum, 8))); + log(Log::DebugLevel::Extra, TQString("get script buffer checksum: %1").arg(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") - .tqarg(i-1).tqarg(sdata.name).tqarg(toHexLabel(type, 2))); + .arg(i-1).arg(sdata.name).arg(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").tqarg(on).tqarg(_base.isTargetSelfPowered())); + log(Log::DebugLevel::Extra, TQString("Vdd set to %1, self powered is %2").arg(on).arg(_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").tqarg(toHexLabel(address, 6))); + log(Log::DebugLevel::Max, TQString("download address %1").arg(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") - .tqarg(toHexLabel(stype, 2)).tqarg(repetitions).tqarg(nbNoLens)); + .arg(toHexLabel(stype, 2)).arg(repetitions).arg(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_prog.cpp b/src/progs/pickit2v2/base/pickit2v2_prog.cpp index ab378c4..74b82b6 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").tqarg(fdata.architecture.key()).tqarg(toHexLabelAbs(rawId))); + log(Log::DebugLevel::Normal, TQString("Read id for family %1: %2").arg(fdata.architecture.key()).arg(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").tqarg(device()->idNames(ids).join("; "))); + log(Log::LineType::Information, i18n("Read id: %1").arg(device()->idNames(ids).join("; "))); if ( ids.contains(device()->name()) ) return true; - message = i18n("Read id does not match the specified device name \"%1\".").tqarg(device()->name()); + message = i18n("Read id does not match the specified device name \"%1\".").arg(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\"...").tqarg(device()->name())); + log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").arg(device()->name())); return true; } @@ -97,8 +97,8 @@ bool Pickit2V2::Base::selfTest(bool ask) 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").tqarg(error)); - if ( ask && !askContinue(i18n("Self-test failed (%1). Do you want to continue anyway?").tqarg(error)) ) { + 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)) ) { logUserAbort(); return false; } diff --git a/src/progs/psp/base/psp.cpp b/src/progs/psp/base/psp.cpp index 0f86180..96dcf4e 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)").tqarg(i).tqarg(toHexLabel(data[i], 4)) -// .tqarg(toHexLabel(a[0], 2)).tqarg(toHexLabel(a[1], 2))); +// 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))); } 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 7da4c00..b29be31 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").tqarg(toHexLabel(c, 2))); + log(Log::DebugLevel::Extra, TQString("Command %1").arg(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") - .tqarg(TQString(toHex(ec, 2))).tqarg(TQString(toHex(rc, 2)))); + .arg(TQString(toHex(ec, 2))).arg(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") - .tqarg(TQString(toHex(c, 2)))); + .arg(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 ba0e78f..3a7aa9f 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").tqarg(name).tqarg(toHexLabel(value, rdata.nbChars())); + TQString s = TQString("%1 = %2").arg(name).arg(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]").tqarg(toHex(address, rdata.nbCharsAddress())); + TQString s = TQString("ramData[$%1]").arg(toHex(address, rdata.nbCharsAddress())); return setRegister(s, value); } @@ -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").tqarg(name)); + log(Log::Error, i18n("Error reading state of IO bit: %1").arg(name)); return false; } switch (value[0].latin1()) { @@ -217,24 +217,24 @@ bool GPSim::Debugger::updatePortStatus(uint index, TQMap(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?").tqarg(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?").arg(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?").tqarg(label()).tqarg(device)) : false); + return (log ? log->askContinue(i18n("The selected toolchain (%1) does not support device %2. Continue anyway?").arg(label()).arg(device)) : false); return true; } diff --git a/src/tools/boost/boostbasic.cpp b/src/tools/boost/boostbasic.cpp index dc449f8..4bec1e9 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.").tqarg("http://www.sourceboost.com/Products/BoostBasic/Overview.html"); + return i18n("BoostBasic Compiler is a Basic compiler distributed by SourceBoost Technologies.").arg("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 74047a0..13d7ad2 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.").tqarg("http://www.sourceboost.com/Products/BoostC/Overview.html"); + return i18n("BoostC Compiler is a C compiler distributed by SourceBoost Technologies.").arg("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 7b83314..7e4b968 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.").tqarg("http://www.sourceboost.com/Products/BoostCpp/Overview.html"); + return i18n("BoostC++ Compiler is a C compiler distributed by SourceBoost Technologies.").arg("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 5c2b725..8f23cb1 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.").tqarg("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.").arg("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 65b7b98..71025f8 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.").tqarg("http://www.bknd.com/cc5x/index.shtml"); + return i18n("CC5X is a C compiler distributed by B Knudsen Data.").arg("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 0b817a3..5973d6d 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.").tqarg("http://www.ccsinfo.com/content.php?page=compilers"); + return i18n("CCS Compiler is a C compiler distributed by CCS.").arg("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 15ccedf..c988013 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).").tqarg(url.pretty()), TQString(), 0); + if ( !file.openForRead() ) doLog(Log::LineType::Error, i18n("Could not find error file (%1).").arg(url.pretty()), TQString(), 0); else { TQStringList lines = file.readLines(); for (uint i=0; iGPUtils is an open-source assembler and linker suite.
").tqarg("http://gputils.sourceforge.net"); + return i18n("GPUtils is an open-source assembler and linker suite.
").arg("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 7fd9a1f..c3b67a8 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; isout() + _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").tqarg(exec)); - else _data[i].label->setText(i18n("\"%1\" not recognized").tqarg(exec)); + 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)); 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)").tqarg(list.count())); + _devicesLabel->setText(i18n("Detected (%1)").arg(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").tqarg(exec)); - else _data[k].label->setText(i18n("Detecting \"%1\"...").tqarg(exec)); + 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 ( _group.checkDevicesCategory()==Tool::Category::Nb_Types ) { TQValueVector supported = _group.supportedDevices(); - _devicesLabel->setText(i18n("Hardcoded (%1)").tqarg(supported.count())); + _devicesLabel->setText(i18n("Hardcoded (%1)").arg(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
").tqarg(_data[k].command); - s += i18n("Version string:
%1
").tqarg(_data[k].checkLines.join("
")); + s += i18n("Command for executable detection:
%1
").arg(_data[k].command); + s += i18n("Version string:
%1
").arg(_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
").tqarg(_devicesData[i].command); - else s += i18n("Command #%1 for devices detection:
%2
").tqarg(i+1).tqarg(_devicesData[i].command); + if ( nb==1 ) s += i18n("Command for devices detection:
%1
").arg(_devicesData[i].command); + else s += i18n("Command #%1 for devices detection:
%2
").arg(i+1).arg(_devicesData[i].command); TQString ss = _devicesData[i].checkLines.join("
"); - if ( nb==1 ) s += i18n("Device string:
%1
").tqarg(ss); - else s += i18n("Device string #%1:
%2
").tqarg(i+1).tqarg(ss); + if ( nb==1 ) s += i18n("Device string:
%1
").arg(ss); + else s += i18n("Device string #%1:
%2
").arg(i+1).arg(ss); } } MessageBox::text(s, Log::Show); diff --git a/src/tools/jal/jal.cpp b/src/tools/jal/jal.cpp index 973e0b8..57ba097 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.").tqarg("http://jal.sourceforge.net"); + return i18n("JAL is a high-level language for PIC microcontrollers.").arg("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 9bf0b26..ce06dbd 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.").tqarg("http://www.casadeyork.com/jalv2"); + return i18n("JAL V2 is a new compiler for the high-level language JAL.").arg("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 db71eaf..28f7aa6 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") - .tqarg(Main::toolGroup().label()).tqarg(e), i18n("File: %1").tqarg(_items[i].url.pretty()), Log::Show); + .arg(Main::toolGroup().label()).arg(e), i18n("File: %1").arg(_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") - .tqarg(Main::toolGroup().label()).tqarg(e), i18n("File: %1").tqarg(_items[i].url.pretty()), Log::Show); + .arg(Main::toolGroup().label()).arg(e), i18n("File: %1").arg(_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.").tqarg(_customCommandIndex+1), Log::Delayed); + Log::Base::log(Log::LineType::Error, i18n("Failed to execute custom command #%1.").arg(_customCommandIndex+1), Log::Delayed); processFailed(); } } diff --git a/src/tools/list/compile_process.cpp b/src/tools/list/compile_process.cpp index a22f47d..7ec09d8 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 ***").tqarg(code)); + _manager->log(Log::LineType::Error, i18n("*** Exited with status: %1 ***").arg(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 8abb74e..e170f30 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.").tqarg("http://www.bytecraft.com/mpccaps.html"); + return i18n("MPC Compiler is a C compiler distributed by Byte Craft.").arg("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 8c39e3c..22e0969 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).").tqarg(url.pretty()), TQString(), 0); + if ( !file.openForRead() ) doLog(Log::LineType::Error, i18n("Could not find error file (%1).").arg(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.").tqarg("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.").arg("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 46ece11..4581af4 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.").tqarg("http://www.htsoft.com"); + return i18n("PICC-Lite is a freeware C compiler distributed by HTSoft.").arg("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.").tqarg("http://www.htsoft.com"); + return i18n("PICC is a C compiler distributed by HTSoft.").arg("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.").tqarg("http://www.htsoft.com"); + return i18n("PICC 18 is a C compiler distributed by HTSoft.").arg("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 bc3724d..d61e0a9 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.").tqarg("http://sdcc.sourceforge.net"); + return i18n("The Small Devices C Compiler is an open-source C compiler for several families of microcontrollers.").arg("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 3389664..3f0dcc0 100644 --- a/src/xml_to_data/device_xml_to_data.cpp +++ b/src/xml_to_data/device_xml_to_data.cpp @@ -84,7 +84,7 @@ 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").tqarg(name)); + if ( _map.contains(name) ) qFatal(TQString("Device \"%1\" already defined").arg(name)); _data = createData(); _map[name] = _data; _data->_name = name; @@ -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)").tqarg(_data->_documents.datasheet)); + if ( !rexp.exactMatch(_data->_documents.datasheet) ) qFatal(TQString("Malformed datasheet \"%1\" (5 digits)").arg(_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)").tqarg(_data->_documents.progsheet)); + if ( !rexp.exactMatch(_data->_documents.datasheet) ) qFatal(TQString("Malformed progsheet \"%1\" (5 digits)").arg(_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)").tqarg(errata)); + qFatal(TQString("Malformed erratas \"%1\" (5 digits or 5 digits + e + 1 digit or \"er\" + name)").arg(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)").tqarg(_data->_documents.webpage)); + if ( !rexp.exactMatch(_data->_documents.webpage) ) qFatal(TQString("Malformed webpage \"%1\" (6 digits)").arg(_data->_documents.webpage)); if ( _documents.contains(_data->_documents.webpage) ) - qFatal(TQString("webpage duplicated (already used for %1)").tqarg(_documents[_data->_documents.webpage])); + qFatal(TQString("webpage duplicated (already used for %1)").arg(_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::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").tqarg(_current)); - if ( _map.contains(_current) ) qFatal(TQString("Device \"%1\" already parsed").tqarg(_current)); + 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)); PData data; if ( hasFamilies() ) { TQString family = element.attribute("family"); - if ( family.isEmpty() ) qFatal(TQString("Family is empty").tqarg(family)); + if ( family.isEmpty() ) qFatal(TQString("Family is empty").arg(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\"").tqarg(_basename)); + if ( root.attribute("name")!=_basename ) qFatal(TQString("Root node name is not \"%1\"").arg(_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\"").tqarg(file.name())); + if ( !file.open(IO_WriteOnly) ) qFatal(TQString("Cannot open output file \"%1\"").arg(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 8e14d81..8176be1 100644 --- a/src/xml_to_data/xml_to_data.cpp +++ b/src/xml_to_data/xml_to_data.cpp @@ -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\"").tqarg(tag).tqarg(value)); + if ( !element.isNull() ) qFatal(TQString("Duplicated element \"%1/%2\"").arg(tag).arg(value)); element = child.toElement(); } child = child.nextSibling(); @@ -34,7 +34,7 @@ void XmlToData::checkTagNames(TQDomElement element, const TQString &tag, for (uint i=0; i