summaryrefslogtreecommitdiffstats
path: root/src/progs/base/generic_prog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/progs/base/generic_prog.cpp')
-rw-r--r--src/progs/base/generic_prog.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/progs/base/generic_prog.cpp b/src/progs/base/generic_prog.cpp
index 6386eb2..e7e6e2e 100644
--- a/src/progs/base/generic_prog.cpp
+++ b/src/progs/base/generic_prog.cpp
@@ -8,7 +8,7 @@
***************************************************************************/
#include "generic_prog.h"
-#include <qdir.h>
+#include <tqdir.h>
#include "common/global/global.h"
#include "prog_group.h"
@@ -70,15 +70,15 @@ bool Programmer::Base::simpleConnectHardware()
disconnectHardware();
clear();
if (_device) {
- QString label = _group.label();
+ TQString label = _group.label();
if ( group().isSoftware() )
- log(Log::LineType::Information, i18n("Connecting %1 with device %2...").arg(label).arg(_device->name()));
+ log(Log::LineType::Information, i18n("Connecting %1 with device %2...").tqarg(label).tqarg(_device->name()));
else {
if ( !_hardware->name().isEmpty() ) label += "[" + _hardware->name() + "]";
Port::Description pd = _hardware->portDescription();
- QString s = pd.type.label();
+ TQString s = pd.type.label();
if (pd.type.data().withDevice) s += " (" + pd.device + ")";
- log(Log::LineType::Information, i18n("Connecting %1 on %2 with device %3...").arg(label).arg(s).arg(_device->name()));
+ log(Log::LineType::Information, i18n("Connecting %1 on %2 with device %3...").tqarg(label).tqarg(s).tqarg(_device->name()));
}
}
return _hardware->connectHardware();
@@ -98,7 +98,7 @@ bool Programmer::Base::connectHardware()
if ( !checkFirmwareVersion() ) return false;
if ( !setTargetPowerOn(false) ) return false;
if ( !setTarget() ) return false;
- log(Log::LineType::Information, i18n(" Set target self powered: %1").arg(_targetSelfPowered ? "true" : "false"));
+ log(Log::LineType::Information, i18n(" Set target self powered: %1").tqarg(_targetSelfPowered ? "true" : "false"));
if ( !setTargetPowerOn(!_targetSelfPowered) ) return false;
if ( !internalSetupHardware() ) return false;
if ( !readVoltages() ) return false;
@@ -133,30 +133,30 @@ bool Programmer::Base::checkFirmwareVersion()
{
if ( _mode==BootloadMode ) log(Log::LineType::Information, i18n("Programmer is in bootload mode."));
if ( !_firmwareVersion.isValid() ) return true;
- log(Log::LineType::Information, i18n("Firmware version is %1").arg(_firmwareVersion.pretty()));
+ log(Log::LineType::Information, i18n("Firmware version is %1").tqarg(_firmwareVersion.pretty()));
VersionData vd = _firmwareVersion.toWithoutDot();
VersionData tmp = firmwareVersion(FirmwareVersionType::Max);
if ( tmp.isValid() && tmp.toWithoutDot()<vd ) {
VersionData mplab = mplabVersion(FirmwareVersionType::Max);
- QString s = (mplab.isValid() ? " " + i18n("MPLAB %1").arg(mplab.prettyWithoutDot()) : QString::null);
+ TQString s = (mplab.isValid() ? " " + i18n("MPLAB %1").tqarg(mplab.prettyWithoutDot()) : TQString());
log(Log::LineType::Warning, i18n("The firmware version (%1) is higher than the version tested with piklab (%2%3).\n"
- "You may experience problems.").arg(_firmwareVersion.pretty()).arg(tmp.pretty()).arg(s));
+ "You may experience problems.").tqarg(_firmwareVersion.pretty()).tqarg(tmp.pretty()).tqarg(s));
return true;
}
tmp = firmwareVersion(FirmwareVersionType::Min);
if ( tmp.isValid() && vd<tmp.toWithoutDot() ) {
VersionData mplab = mplabVersion(FirmwareVersionType::Min);
- QString s = (mplab.isValid() ? " " + i18n("MPLAB %1").arg(mplab.prettyWithoutDot()) : QString::null);
+ TQString s = (mplab.isValid() ? " " + i18n("MPLAB %1").tqarg(mplab.prettyWithoutDot()) : TQString());
log(Log::LineType::Warning, i18n("The firmware version (%1) is lower than the version tested with piklab (%2%3).\n"
- "You may experience problems.").arg(_firmwareVersion.pretty()).arg(tmp.pretty()).arg(s));
+ "You may experience problems.").tqarg(_firmwareVersion.pretty()).tqarg(tmp.pretty()).tqarg(s));
return true;
}
tmp = firmwareVersion(FirmwareVersionType::Recommended);
if ( tmp.isValid() && vd<tmp.toWithoutDot() ) {
VersionData mplab = mplabVersion(FirmwareVersionType::Recommended);
- QString s = (mplab.isValid() ? " " + i18n("MPLAB %1").arg(mplab.prettyWithoutDot()) : QString::null);
+ TQString s = (mplab.isValid() ? " " + i18n("MPLAB %1").tqarg(mplab.prettyWithoutDot()) : TQString());
log(Log::LineType::Warning, i18n("The firmware version (%1) is lower than the recommended version (%2%3).\n"
- "It is recommended to upgrade the firmware.").arg(_firmwareVersion.pretty()).arg(tmp.pretty()).arg(s));
+ "It is recommended to upgrade the firmware.").tqarg(_firmwareVersion.pretty()).tqarg(tmp.pretty()).tqarg(s));
return true;
}
return true;
@@ -173,13 +173,13 @@ bool Programmer::Base::enterMode(Mode mode)
return ( _mode==mode );
}
-void Programmer::Base::log(Log::LineType type, const QString &message)
+void Programmer::Base::log(Log::LineType type, const TQString &message)
{
if ( type==Log::LineType::Error ) _state = NotConnected;
Log::Base::log(type, message);
}
-void Programmer::Base::log(Log::DebugLevel level, const QString &message)
+void Programmer::Base::log(Log::DebugLevel level, const TQString &message)
{
Log::Base::log(level, message);
}
@@ -243,11 +243,11 @@ void Programmer::Base::endProgramming()
bool Programmer::Base::uploadFirmware(const PURL::Url &url)
{
_progressMonitor.clear();
- log(Log::DebugLevel::Normal, QString(" Firmware file: %1").arg(url.pretty()));
+ log(Log::DebugLevel::Normal, TQString(" Firmware file: %1").tqarg(url.pretty()));
Log::StringView sview;
PURL::File file(url, sview);
if ( !file.openForRead() ) {
- log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").arg(url.pretty()));
+ log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").tqarg(url.pretty()));
return false;
}
bool ok = doUploadFirmware(file);