diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
commit | 0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch) | |
tree | b95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/progs/icd2/base/icd2_serial.cpp | |
parent | b79a2c28534cf09987eeeba3077fff9236df182a (diff) | |
download | piklab-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/icd2/base/icd2_serial.cpp')
-rw-r--r-- | src/progs/icd2/base/icd2_serial.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/progs/icd2/base/icd2_serial.cpp b/src/progs/icd2/base/icd2_serial.cpp index 1ab738c..7f276f0 100644 --- a/src/progs/icd2/base/icd2_serial.cpp +++ b/src/progs/icd2/base/icd2_serial.cpp @@ -13,7 +13,7 @@ #include "common/common/misc.h" //----------------------------------------------------------------------------- -Icd2::SerialPort::SerialPort(const QString &device, Log::Base &log) +Icd2::SerialPort::SerialPort(const TQString &device, Log::Base &log) : Port::Serial(device, NeedDrain | NeedFlush, log) {} @@ -24,23 +24,23 @@ bool Icd2::SerialPort::open(Speed speed) } //----------------------------------------------------------------------------- -Icd2::SerialHardware::SerialHardware(::Programmer::Base &base, const QString &portDevice) +Icd2::SerialHardware::SerialHardware(::Programmer::Base &base, const TQString &portDevice) : Hardware(base, new SerialPort(portDevice, base)) {} -bool Icd2::SerialHardware::internalConnect(const QString &mode) +bool Icd2::SerialHardware::internalConnect(const TQString &mode) { if ( !static_cast<SerialPort *>(_port)->open(Port::Serial::S19200) ) return false; if ( !reset() ) return false; if ( !_port->send("Z", 1) ) return false; - QString s; + TQString s; if ( !_port->receive(4, s) ) return false; if ( !reset() ) return false; - QByteArray a = toAscii(mode); + TQByteArray a = toAscii(mode); if ( !_port->send(a.data(), a.count()) ) return false; if ( !_port->receive(1, s) ) return false; if ( s.upper()!=mode ) { - log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").arg(mode)); + log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").tqarg(mode)); return false; } //log(Log::Debug, "set fast speed"); |