From 0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 30 Jun 2011 00:15:53 +0000 Subject: 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 --- src/devices/base/register.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/devices/base/register.cpp') diff --git a/src/devices/base/register.cpp b/src/devices/base/register.cpp index 85fc013..dcd4c18 100644 --- a/src/devices/base/register.cpp +++ b/src/devices/base/register.cpp @@ -25,12 +25,12 @@ Register::TypeData::TypeData(Address address, uint nbChars) { Q_ASSERT( address.isValid() && nbChars!=0 ); } -Register::TypeData::TypeData(const QString &name, uint nbChars) +Register::TypeData::TypeData(const TQString &name, uint nbChars) : _nbChars(nbChars), _name(name) { Q_ASSERT( !name.isEmpty() && nbChars!=0 ); } -Register::TypeData::TypeData(const QString &name, Address address, uint nbChars) +Register::TypeData::TypeData(const TQString &name, Address address, uint nbChars) : _nbChars(nbChars), _address(address), _name(name) { Q_ASSERT( address.isValid() && nbChars!=0 && !name.isEmpty() ); @@ -46,21 +46,21 @@ Register::Type Register::TypeData::type() const return Combined; } -QString Register::TypeData::toString() const +TQString Register::TypeData::toString() const { - return QString("%1 %2 %3").arg(toLabel(_address)).arg(_nbChars).arg(_name); + return TQString("%1 %2 %3").tqarg(toLabel(_address)).tqarg(_nbChars).tqarg(_name); } -Register::TypeData Register::TypeData::fromString(const QString &s) +Register::TypeData Register::TypeData::fromString(const TQString &s) { - QStringList list = QStringList::split(" ", s); + TQStringList list = TQStringList::split(" ", s); if ( list.count()<2 || list.count()>3 ) return TypeData(); bool ok; Address address = list[0].toUInt(&ok); if ( !ok ) return TypeData(); uint nbChars = list[1].toUInt(&ok); if ( !ok || nbChars==0 || (nbChars%2)!=0 ) return TypeData(); - QString name; + TQString name; if ( list.count()==3 ) name = list[2]; if ( !address.isValid() ) { if ( name.isEmpty() ) return TypeData(); @@ -83,7 +83,7 @@ void Register::List::init() void Register::List::setWatched(const TypeData &data, bool watched) { if (watched) { - if ( _watched.contains(data) ) return; + if ( _watched.tqcontains(data) ) return; _watched.append(data); } else _watched.remove(data); delayedChanged(); @@ -112,7 +112,7 @@ void Register::List::setValue(const TypeData &data, BitValue value) delayedChanged(); } -void Register::List::setPortData(uint index, const QMap &data) +void Register::List::setPortData(uint index, const TQMap &data) { _portDatas[index].old = _portDatas[index].current; _portDatas[index].current = data; @@ -122,7 +122,7 @@ void Register::List::setPortData(uint index, const QMap