summaryrefslogtreecommitdiffstats
path: root/src/progs/pickit2_bootloader
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
commit0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch)
treeb95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/progs/pickit2_bootloader
parentb79a2c28534cf09987eeeba3077fff9236df182a (diff)
downloadpiklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz
piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip
TQt4 port piklab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/progs/pickit2_bootloader')
-rw-r--r--src/progs/pickit2_bootloader/base/pickit2_bootloader.cpp6
-rw-r--r--src/progs/pickit2_bootloader/base/pickit2_bootloader_data.h4
-rw-r--r--src/progs/pickit2_bootloader/base/pickit2_bootloader_prog.h5
-rw-r--r--src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.cpp8
-rw-r--r--src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.h5
-rw-r--r--src/progs/pickit2_bootloader/xml/xml_pickit2_bootloader_parser.cpp4
6 files changed, 17 insertions, 15 deletions
diff --git a/src/progs/pickit2_bootloader/base/pickit2_bootloader.cpp b/src/progs/pickit2_bootloader/base/pickit2_bootloader.cpp
index d080481..5a60a28 100644
--- a/src/progs/pickit2_bootloader/base/pickit2_bootloader.cpp
+++ b/src/progs/pickit2_bootloader/base/pickit2_bootloader.cpp
@@ -33,7 +33,7 @@ bool Pickit2Bootloader::Hardware::internalConnectHardware()
}
}
}
- log(Log::LineType::Information, i18n("Bootloader version %1 detected.").arg(version.pretty()));
+ log(Log::LineType::Information, i18n("Bootloader version %1 detected.").tqarg(version.pretty()));
if ( version.majorNum()!=2 ) {
log(Log::LineType::Error, i18n("Only bootloader version 2.x is supported."));
return false;
@@ -48,9 +48,9 @@ bool Pickit2Bootloader::Hardware::write(Pic::MemoryRangeType type, const Device:
// check that there is nothing in bootloader reserved area
for (uint i=0; i<data.count(); i++) {
if ( i>=0x1000 && i<0x3FF0 ) continue;
- if ( data[i]==device().mask(Pic::MemoryRangeType::Code) ) continue;
+ if ( data[i]==device().tqmask(Pic::MemoryRangeType::Code) ) continue;
uint address = device().addressIncrement(Pic::MemoryRangeType::Code) * i;
- log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").arg(toHexLabel(address, device().nbCharsAddress())));
+ log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").tqarg(toHexLabel(address, device().nbCharsAddress())));
break;
}
return port().writeFirmwareCodeMemory(data, _base.progressMonitor());
diff --git a/src/progs/pickit2_bootloader/base/pickit2_bootloader_data.h b/src/progs/pickit2_bootloader/base/pickit2_bootloader_data.h
index 87aead1..92ca6fa 100644
--- a/src/progs/pickit2_bootloader/base/pickit2_bootloader_data.h
+++ b/src/progs/pickit2_bootloader/base/pickit2_bootloader_data.h
@@ -12,8 +12,8 @@
namespace Pickit2Bootloader
{
struct Data {};
- extern bool isSupported(const QString &device);
- extern const Data &data(const QString &device);
+ extern bool isSupported(const TQString &device);
+ extern const Data &data(const TQString &device);
} // namespace
#endif
diff --git a/src/progs/pickit2_bootloader/base/pickit2_bootloader_prog.h b/src/progs/pickit2_bootloader/base/pickit2_bootloader_prog.h
index 461d734..b7e8bd8 100644
--- a/src/progs/pickit2_bootloader/base/pickit2_bootloader_prog.h
+++ b/src/progs/pickit2_bootloader/base/pickit2_bootloader_prog.h
@@ -19,6 +19,7 @@ namespace Pickit2Bootloader
class ProgrammerBase : public ::Bootloader::ProgrammerBase
{
Q_OBJECT
+ TQ_OBJECT
public:
ProgrammerBase(const Programmer::Group &group, const Pic::Data *data);
virtual bool verifyDeviceId() { return true; }
@@ -28,8 +29,8 @@ public:
class Group : public ::Bootloader::Group
{
public:
- virtual QString name() const { return "pickit2_bootloader"; }
- virtual QString label() const { return i18n("Pickit2 Bootloader"); }
+ virtual TQString name() const { return "pickit2_bootloader"; }
+ virtual TQString label() const { return i18n("Pickit2 Bootloader"); }
virtual ::Programmer::Properties properties() const { return ::Programmer::Programmer | ::Programmer::CanReadMemory; }
virtual ::Programmer::TargetPowerMode targetPowerMode() const { return ::Programmer::TargetSelfPowered; }
virtual bool isPortSupported(PortType type) const { return type==PortType::USB; }
diff --git a/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.cpp b/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.cpp
index 89bf5c7..f68e39a 100644
--- a/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.cpp
+++ b/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.cpp
@@ -9,12 +9,12 @@
#include "pickit2_bootloader_ui.h"
//-----------------------------------------------------------------------------
-Pickit2Bootloader::ConfigWidget::ConfigWidget(const::Programmer::Group &group, QWidget *parent)
- : ::Programmer::ConfigWidget(group, parent)
+Pickit2Bootloader::ConfigWidget::ConfigWidget(const::Programmer::Group &group, TQWidget *tqparent)
+ : ::Programmer::ConfigWidget(group, tqparent)
{}
//-----------------------------------------------------------------------------
-::Programmer::ConfigWidget *Pickit2Bootloader::GroupUI::createConfigWidget(QWidget *parent) const
+::Programmer::ConfigWidget *Pickit2Bootloader::GroupUI::createConfigWidget(TQWidget *tqparent) const
{
- return new ConfigWidget(static_cast<const ::Programmer::Group &>(group()), parent);
+ return new ConfigWidget(static_cast<const ::Programmer::Group &>(group()), tqparent);
}
diff --git a/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.h b/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.h
index d715574..e1c88fc 100644
--- a/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.h
+++ b/src/progs/pickit2_bootloader/gui/pickit2_bootloader_ui.h
@@ -17,8 +17,9 @@ namespace Pickit2Bootloader
class ConfigWidget: public ::Programmer::ConfigWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigWidget(const::Programmer::Group &group, QWidget *parent);
+ ConfigWidget(const::Programmer::Group &group, TQWidget *tqparent);
virtual void loadConfig() {}
virtual void saveConfig() {}
};
@@ -28,7 +29,7 @@ public:
class GroupUI : public ::Bootloader::GroupUI
{
public:
- virtual ::Programmer::ConfigWidget *createConfigWidget(QWidget *parent) const;
+ virtual ::Programmer::ConfigWidget *createConfigWidget(TQWidget *tqparent) const;
};
} // namespace
diff --git a/src/progs/pickit2_bootloader/xml/xml_pickit2_bootloader_parser.cpp b/src/progs/pickit2_bootloader/xml/xml_pickit2_bootloader_parser.cpp
index 150e814..f718c03 100644
--- a/src/progs/pickit2_bootloader/xml/xml_pickit2_bootloader_parser.cpp
+++ b/src/progs/pickit2_bootloader/xml/xml_pickit2_bootloader_parser.cpp
@@ -22,10 +22,10 @@ public:
XmlToData() : Programmer::XmlToData<Data>("pickit2_bootloader", "Pickit2Bootloader") {}
private:
- virtual void parseData(QDomElement element, Data &data);
+ virtual void parseData(TQDomElement element, Data &data);
};
-void Pickit2Bootloader::XmlToData::parseData(QDomElement, Data &)
+void Pickit2Bootloader::XmlToData::parseData(TQDomElement, Data &)
{
const Device::Data *ddata = Device::lister().data(currentDevice());
if ( ddata->group().name()!="pic" ) qFatal("non-pic device not supported");