diff options
Diffstat (limited to 'src/piklab-prog')
-rw-r--r-- | src/piklab-prog/cli_interactive.cpp | 22 | ||||
-rw-r--r-- | src/piklab-prog/cli_prog_manager.cpp | 2 | ||||
-rw-r--r-- | src/piklab-prog/cmdline.cpp | 26 |
3 files changed, 25 insertions, 25 deletions
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<nb; i++) { Address address = Breakpoint::list().address(Breakpoint::list().data(i)); - log(Log::LineType::Normal, TQString(" #%1: %2").tqarg(i).tqarg(toHexLabel(address, nbc))); + log(Log::LineType::Normal, TQString(" #%1: %2").arg(i).arg(toHexLabel(address, nbc))); } return OK; } @@ -198,7 +198,7 @@ CLI::ExitCode CLI::Interactive::processLine(const TQString &s) Breakpoint::Data data = Breakpoint::list().data(i); Address address = Breakpoint::list().address(data); Breakpoint::list().remove(data); - return okExit(i18n("Breakpoint at %1 removed.").tqarg(toHexLabelAbs(address))); + return okExit(i18n("Breakpoint at %1 removed.").arg(toHexLabelAbs(address))); } if ( words[0]=="raw-com" ) { if ( words.count()!=2 ) return errorExit(i18n("This command needs a commands filename."), ARG_ERROR); @@ -243,10 +243,10 @@ CLI::ExitCode CLI::Interactive::registerList() const Pic::RegistersData &rdata = data.registersData(); log(Log::LineType::Normal, i18n("Special Function Registers:")); TQValueVector<Pic::RegisterNameData> list = Pic::sfrList(data); - for (uint i=0; i<uint(list.count()); i++) log(Log::LineType::Normal, TQString(" %1: %2").tqarg(toHexLabel(list[i].data().address(), rdata.nbCharsAddress())).tqarg(list[i].label())); + for (uint i=0; i<uint(list.count()); i++) log(Log::LineType::Normal, TQString(" %1: %2").arg(toHexLabel(list[i].data().address(), rdata.nbCharsAddress())).arg(list[i].label())); log(Log::LineType::Normal, i18n("General Purpose Registers:")); list = Pic::gprList(data, coff); - for (uint i=0; i<uint(list.count()); i++) log(Log::LineType::Normal, TQString(" %1: %2").tqarg(toHexLabel(list[i].data().address(), rdata.nbCharsAddress())).tqarg(list[i].label())); + for (uint i=0; i<uint(list.count()); i++) log(Log::LineType::Normal, TQString(" %1: %2").arg(toHexLabel(list[i].data().address(), rdata.nbCharsAddress())).arg(list[i].label())); return OK; } @@ -260,7 +260,7 @@ CLI::ExitCode CLI::Interactive::variableList() const Pic::RegistersData &rdata = data.registersData(); TQValueVector<Pic::RegisterNameData> list = Pic::variableList(data, *coff); if ( list.count()==0 ) log(Log::LineType::Normal, i18n("No variable.")); - for (uint i=0; i<uint(list.count()); i++) log(Log::LineType::Normal, TQString(" %1: %2").tqarg(toHexLabel(list[i].data().address(), rdata.nbCharsAddress())).tqarg(list[i].label())); + for (uint i=0; i<uint(list.count()); i++) log(Log::LineType::Normal, TQString(" %1: %2").arg(toHexLabel(list[i].data().address(), rdata.nbCharsAddress())).arg(list[i].label())); return OK; } @@ -292,7 +292,7 @@ CLI::ExitCode CLI::Interactive::executeRegister(const TQString &name, const TQSt bool ok; ulong v = fromAnyLabel(value, &ok); if ( !ok ) return errorExit(i18n("Number format not recognized."), ARG_ERROR); - if ( v>maxValue(NumberBase::Hex, nbChars) ) return errorExit(i18n("The given value is too large (max: %1).").tqarg(toHexLabel(maxValue(NumberBase::Hex, nbChars), nbChars)), ARG_ERROR); + 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::PicBase *>(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::CliManager *>(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("<not set>"); } - log(Log::LineType::SoftError, i18n("Unknown property \"%1\"").tqarg(property)); + log(Log::LineType::SoftError, i18n("Unknown property \"%1\"").arg(property)); return TQString(); } |