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/progs/manager/debug_manager.cpp | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/progs/manager/debug_manager.cpp') diff --git a/src/progs/manager/debug_manager.cpp b/src/progs/manager/debug_manager.cpp index 7889432..631a4bd 100644 --- a/src/progs/manager/debug_manager.cpp +++ b/src/progs/manager/debug_manager.cpp @@ -8,8 +8,8 @@ ***************************************************************************/ #include "debug_manager.h" -#include -#include +#include +#include #include "coff/base/text_coff.h" #include "coff/base/cdb_parser.h" @@ -23,11 +23,11 @@ Debugger::Manager *Debugger::manager = 0; Debugger::Manager::Manager() - : QObject(Programmer::manager, "debug_manager"), Log::Base(Programmer::manager), GenericView(Breakpoint::list()), + : TQObject(Programmer::manager, "debug_manager"), Log::Base(Programmer::manager), GenericView(Breakpoint::list()), _coff(0), _data(0) { - connect(&_runTimer, SIGNAL(timeout()), SLOT(slotRunTimeout())); - connect(&_stepTimer, SIGNAL(timeout()), SLOT(doStep())); + connect(&_runTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotRunTimeout())); + connect(&_stepTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doStep())); } Debugger::Manager::~Manager() @@ -81,7 +81,7 @@ bool Debugger::Manager::internalInit() if ( !coffUrl().exists() ) return false; Log::Base log; log.setView(compileView()); - log.log(Log::LineType::Information, i18n("Parsing COFF file: %1").arg(coffUrl().pretty())); + log.log(Log::LineType::Information, i18n("Parsing COFF file: %1").tqarg(coffUrl().pretty())); _coff = new Coff::TextObject(_data, coffUrl()); if ( !_coff->parse(log) ) { delete _coff; @@ -110,7 +110,7 @@ void Debugger::Manager::freeActiveBreakpoint() uint max = programmerGroup()->maxNbBreakpoints(deviceData()); Q_ASSERT( nb<=max && max!=0 ); if ( nb==max ) { - log(Log::LineType::Warning, i18n("The number of active breakpoints is higher than the maximum for the current debugger (%1): disabling the last breakpoint.").arg(max)); + log(Log::LineType::Warning, i18n("The number of active breakpoints is higher than the maximum for the current debugger (%1): disabling the last breakpoint.").tqarg(max)); Breakpoint::list().setState(last, Breakpoint::Disabled); } } @@ -137,9 +137,9 @@ bool Debugger::Manager::checkBreakpoint(const Breakpoint::Data &bdata, bool only { address = Address(); if ( _coff==0 ) return true; - QValueVector
addresses = _coff->addresses(bdata.url, bdata.line); + TQValueVector
addresses = _coff->addresses(bdata.url, bdata.line); if ( addresses.isEmpty() ) { - QString s = i18n("Breakpoint at non-code line."); + TQString s = i18n("Breakpoint at non-code line."); if (onlyWarn) log(Log::LineType::Warning, s); else sorry(s); return false; @@ -166,9 +166,9 @@ void Debugger::Manager::computeBreakpointAddresses() } } -QValueList
Debugger::Manager::activeBreakpointAddresses() const +TQValueList
Debugger::Manager::activeBreakpointAddresses() const { - QValueList
addresses; + TQValueList
addresses; for (uint i=0; istatusString()); - else emit statusChanged(QString::null); + else emit statusChanged(TQString()); _currentSourceLines.clear(); if (_coff) _currentSourceLines = _coff->sourceLinesForAddress(pc().toUInt()); updateView(gotoPC); @@ -205,15 +205,15 @@ bool Debugger::Manager::updateRegister(const Register::TypeData &data) // read related registers const Device::RegistersData *rdata = deviceData()->registersData(); Q_ASSERT(rdata); - QValueList related = rdata->relatedRegisters(data); + TQValueList related = rdata->relatedRegisters(data); for (uint k=0; kportIndex(data.address()); if ( index!=-1 ) { - QMap data; - if ( !debugger()->updatePortStatus(index, data) ) return false; + TQMap data; + if ( !debugger()->updatePorttqStatus(index, data) ) return false; Register::list().setPortData(index, data); } } @@ -223,7 +223,7 @@ bool Debugger::Manager::updateRegister(const Register::TypeData &data) bool Debugger::Manager::updateRegisters() { if ( programmer()==0 || programmer()->state()!=Programmer::Halted ) return true; - QValueList watched = Register::list().watched(); + TQValueList watched = Register::list().watched(); for (uint i=0; i::const_iterator it; + TQMap::const_iterator it; for (it=_currentSourceLines.begin(); it!=_currentSourceLines.end(); ++it) { PURL::FileGroup group = it.key().fileType().data().group; if ( group!=PURL::Source && group!=PURL::Header ) continue; if ( !it.key().exists() ) continue; if ( readConfigEntry(Config::OnlyStopOnProjectSourceLine).toBool() && !isProjectSource(it.key()) ) continue; - QValueVector
addresses = _coff->addresses(it.key(), it.data()); + TQValueVector
addresses = _coff->addresses(it.key(), it.data()); qHeapSort(addresses); Q_ASSERT( addresses.count()!=0 ); if ( pc()!=addresses[0] ) continue; // we only break if pc is on the first instruction of the source line @@ -331,7 +331,7 @@ void Debugger::Manager::setRegisterWatched(const Register::TypeData &data, bool bool Debugger::Manager::readRegister(const Register::TypeData &data) { Q_ASSERT( data.type()==Register::Regular || data.type()==Register::Special ); - if ( _readRegisters.contains(data) ) return true; + if ( _readRegisters.tqcontains(data) ) return true; BitValue value; if ( !debugger()->readRegister(data, value) ) return false; Register::list().setValue(data, value); @@ -384,7 +384,7 @@ bool Debugger::Manager::prepareDebugging() break; } if ( i==Programmer::Nb_InputFileTypes ) { - log(Log::LineType::Error, i18n("Cannot start debugging session without input file (%1).").arg(first.pretty())); + log(Log::LineType::Error, i18n("Cannot start debugging session without input file (%1).").tqarg(first.pretty())); return false; } } -- cgit v1.2.3