diff options
Diffstat (limited to 'src/progs/manager')
-rw-r--r-- | src/progs/manager/breakpoint.cpp | 22 | ||||
-rw-r--r-- | src/progs/manager/breakpoint.h | 13 | ||||
-rw-r--r-- | src/progs/manager/debug_manager.cpp | 40 | ||||
-rw-r--r-- | src/progs/manager/debug_manager.h | 17 | ||||
-rw-r--r-- | src/progs/manager/prog_manager.cpp | 20 | ||||
-rw-r--r-- | src/progs/manager/prog_manager.h | 9 |
6 files changed, 62 insertions, 59 deletions
diff --git a/src/progs/manager/breakpoint.cpp b/src/progs/manager/breakpoint.cpp index 15e08e0..dc7d836 100644 --- a/src/progs/manager/breakpoint.cpp +++ b/src/progs/manager/breakpoint.cpp @@ -23,7 +23,7 @@ Breakpoint::List &Breakpoint::list() void Breakpoint::List::append(const Data &data) { - Q_ASSERT( !contains(data) ); + Q_ASSERT( !tqcontains(data) ); StateData sdata; sdata.data = data; _list.append(sdata); @@ -32,8 +32,8 @@ void Breakpoint::List::append(const Data &data) void Breakpoint::List::remove(const Data &data) { - Q_ASSERT( contains(data) ); - _list.remove(find(data)); + Q_ASSERT( tqcontains(data) ); + _list.remove(tqfind(data)); delayedChanged(); } @@ -43,17 +43,17 @@ void Breakpoint::List::clear() delayedChanged(); } -QValueList<Breakpoint::List::StateData>::iterator Breakpoint::List::find(const Data &data) +TQValueList<Breakpoint::List::StateData>::iterator Breakpoint::List::tqfind(const Data &data) { - QValueList<StateData>::iterator it; + TQValueList<StateData>::iterator it; for (it=_list.begin(); it!=_list.end(); ++it) if ( (*it).data==data ) return it; return _list.end(); } -QValueList<Breakpoint::List::StateData>::const_iterator Breakpoint::List::find(const Data &data) const +TQValueList<Breakpoint::List::StateData>::const_iterator Breakpoint::List::tqfind(const Data &data) const { - QValueList<StateData>::const_iterator it; + TQValueList<StateData>::const_iterator it; for (it=_list.begin(); it!=_list.end(); ++it) if ( (*it).data==data ) return it; return _list.end(); @@ -61,14 +61,14 @@ QValueList<Breakpoint::List::StateData>::const_iterator Breakpoint::List::find(c void Breakpoint::List::setState(const Data &data, State state) { - Q_ASSERT( contains(data) ); - (*find(data)).state = state; + Q_ASSERT( tqcontains(data) ); + (*tqfind(data)).state = state; delayedChanged(); } void Breakpoint::List::setAddress(const Data &data, Address address) { - Q_ASSERT( contains(data) ); - (*find(data)).address = address; + Q_ASSERT( tqcontains(data) ); + (*tqfind(data)).address = address; delayedChanged(); } diff --git a/src/progs/manager/breakpoint.h b/src/progs/manager/breakpoint.h index fca0570..07f5263 100644 --- a/src/progs/manager/breakpoint.h +++ b/src/progs/manager/breakpoint.h @@ -39,6 +39,7 @@ extern List &list(); class List : public GenericStorage { Q_OBJECT + TQ_OBJECT public: List() {} void append(const Data &data); @@ -46,9 +47,9 @@ public: void clear(); uint count() const { return _list.count(); } const Data &data(uint i) const { return _list[i].data; } - bool contains(const Data &data) const { return find(data)!=_list.end(); } - State state(const Data &data) const { return (*find(data)).state; } - Address address(const Data &data) const { return (*find(data)).address; } + bool tqcontains(const Data &data) const { return tqfind(data)!=_list.end(); } + State state(const Data &data) const { return (*tqfind(data)).state; } + Address address(const Data &data) const { return (*tqfind(data)).address; } void setState(const Data &data, State state); void setAddress(const Data &data, Address address); @@ -60,9 +61,9 @@ private: Address address; State state; }; - QValueList<StateData> _list; - QValueList<StateData>::const_iterator find(const Data &data) const; - QValueList<StateData>::iterator find(const Data &data); + TQValueList<StateData> _list; + TQValueList<StateData>::const_iterator tqfind(const Data &data) const; + TQValueList<StateData>::iterator tqfind(const Data &data); }; } // namespace 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 <qtimer.h> -#include <qeventloop.h> +#include <tqtimer.h> +#include <tqeventloop.h> #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<Address> addresses = _coff->addresses(bdata.url, bdata.line); + TQValueVector<Address> 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<Address> Debugger::Manager::activeBreakpointAddresses() const +TQValueList<Address> Debugger::Manager::activeBreakpointAddresses() const { - QValueList<Address> addresses; + TQValueList<Address> addresses; for (uint i=0; i<Breakpoint::list().count(); i++) { const Breakpoint::Data &data = Breakpoint::list().data(i); if ( Breakpoint::list().state(data)==Breakpoint::Active ) addresses.append(Breakpoint::list().address(data)); @@ -193,7 +193,7 @@ bool Debugger::Manager::update(bool gotoPC) _readRegisters.clear(); if ( !updateRegisters() ) return false; if ( debugger() ) emit statusChanged(debugger()->statusString()); - 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<Register::TypeData> related = rdata->relatedRegisters(data); + TQValueList<Register::TypeData> related = rdata->relatedRegisters(data); for (uint k=0; k<uint(related.count()); k++) if ( !readRegister(related[k]) ) return false; // read port status if ( data.type()==Register::Regular ) { int index = rdata->portIndex(data.address()); if ( index!=-1 ) { - QMap<uint, Device::PortBitData> data; - if ( !debugger()->updatePortStatus(index, data) ) return false; + TQMap<uint, Device::PortBitData> 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<Register::TypeData> watched = Register::list().watched(); + TQValueList<Register::TypeData> watched = Register::list().watched(); for (uint i=0; i<uint(watched.count()); i++) if ( !updateRegister(watched[i]) ) return false; return true; @@ -265,13 +265,13 @@ bool Debugger::Manager::checkIfContinueStepping(bool &continueStepping) continueStepping = false; if ( !readConfigEntry(Config::OnlyStopOnSourceLine).toBool() ) return true; if ( !update(false) ) return false; - QMap<PURL::Url, uint>::const_iterator it; + TQMap<PURL::Url, uint>::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<Address> addresses = _coff->addresses(it.key(), it.data()); + TQValueVector<Address> 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; } } diff --git a/src/progs/manager/debug_manager.h b/src/progs/manager/debug_manager.h index 90b8584..1598287 100644 --- a/src/progs/manager/debug_manager.h +++ b/src/progs/manager/debug_manager.h @@ -9,7 +9,7 @@ #ifndef DEBUG_MANAGER_H #define DEBUG_MANAGER_H -#include <qtimer.h> +#include <tqtimer.h> #include "common/global/log.h" #include "common/global/purl.h" @@ -24,9 +24,10 @@ namespace CDB { class Object; } namespace Debugger { -class Manager : public QObject, public Log::Base, public GenericView +class Manager : public TQObject, public Log::Base, public GenericView { Q_OBJECT + TQ_OBJECT public: Manager(); virtual ~Manager(); @@ -58,13 +59,13 @@ public slots: void stopWatchAll(); signals: - void statusChanged(const QString &text); + void statusChanged(const TQString &text); void targetStateChanged(); - void actionMessage(const QString &text); + void actionMessage(const TQString &text); protected: Coff::TextObject *_coff; - QMap<PURL::Url, uint> _currentSourceLines; + TQMap<PURL::Url, uint> _currentSourceLines; void freeActiveBreakpoint(); bool checkBreakpoint(const Breakpoint::Data &bdata, bool onlyWarn, Address &address); @@ -81,11 +82,11 @@ private slots: private: const Device::Data *_data; - QTimer _runTimer, _stepTimer; - QValueList<Register::TypeData> _readRegisters; + TQTimer _runTimer, _stepTimer; + TQValueList<Register::TypeData> _readRegisters; void computeBreakpointAddresses(); - QValueList<Address> activeBreakpointAddresses() const; + TQValueList<Address> activeBreakpointAddresses() const; void updateBreakpointsDisplay(); virtual void updateView() { updateView(false); } virtual void updateView(bool gotoPC) = 0; diff --git a/src/progs/manager/prog_manager.cpp b/src/progs/manager/prog_manager.cpp index bc824c9..c39d955 100644 --- a/src/progs/manager/prog_manager.cpp +++ b/src/progs/manager/prog_manager.cpp @@ -18,8 +18,8 @@ //---------------------------------------------------------------------------- Programmer::Manager *Programmer::manager = 0; -Programmer::Manager::Manager(QObject *parent) - : QObject(parent, "programmer_manager"), _programmer(0) +Programmer::Manager::Manager(TQObject *tqparent) + : TQObject(tqparent, "programmer_manager"), _programmer(0) {} Programmer::Manager::~Manager() @@ -39,11 +39,11 @@ void Programmer::Manager::createProgrammer(const Device::Data *data, const Hardw delete _programmer; _programmer = group().createProgrammer(isTargetSelfPowered(), data, hd); _programmer->Log::Base::setParent(this); - connect(_programmer, SIGNAL(actionMessage(const QString &)), SIGNAL(actionMessage(const QString &))); - connect(&_programmer->progressMonitor(), SIGNAL(setLabel(const QString &)), SIGNAL(actionMessage(const QString &))); - connect(&_programmer->progressMonitor(), SIGNAL(setTotalProgress(uint)), SIGNAL(setTotalProgress(uint))); - connect(&_programmer->progressMonitor(), SIGNAL(setProgress(uint)), SIGNAL(setProgress(uint))); - connect(&_programmer->progressMonitor(), SIGNAL(showProgress(bool)), SIGNAL(showProgress(bool))); + connect(_programmer, TQT_SIGNAL(actionMessage(const TQString &)), TQT_SIGNAL(actionMessage(const TQString &))); + connect(&_programmer->progressMonitor(), TQT_SIGNAL(setLabel(const TQString &)), TQT_SIGNAL(actionMessage(const TQString &))); + connect(&_programmer->progressMonitor(), TQT_SIGNAL(setTotalProgress(uint)), TQT_SIGNAL(setTotalProgress(uint))); + connect(&_programmer->progressMonitor(), TQT_SIGNAL(setProgress(uint)), TQT_SIGNAL(setProgress(uint))); + connect(&_programmer->progressMonitor(), TQT_SIGNAL(showProgress(bool)), TQT_SIGNAL(showProgress(bool))); } bool Programmer::Manager::initProgramming(bool debugging) @@ -61,8 +61,8 @@ bool Programmer::Manager::internalInitProgramming(bool) } if ( !group().isSupported(device()->name()) ) { if ( group().isSoftware() && group().supportedDevices().isEmpty() ) - sorry(i18n("Could not detect supported devices for \"%1\". Please check installation.").arg(group().label())); - else sorry(i18n("The current programmer \"%1\" does not support device \"%2\".").arg(group().label()).arg(device()->name())); + sorry(i18n("Could not detect supported devices for \"%1\". Please check installation.").tqarg(group().label())); + else sorry(i18n("The current programmer \"%1\" does not support device \"%2\".").tqarg(group().label()).tqarg(device()->name())); return false; } createProgrammer(device()); @@ -135,7 +135,7 @@ bool Programmer::Manager::setDevicePower(bool on) if ( !initProgramming(false) ) return false; bool ok = true; if ( _programmer->isTargetSelfPowered() ) - sorry(i18n("Cannot toggle target power since target is self-powered."), QString::null); + sorry(i18n("Cannot toggle target power since target is self-powered."), TQString()); else { emit actionMessage(i18n("Toggle Device Power...")); ok = _programmer->setTargetPowerOn(on); diff --git a/src/progs/manager/prog_manager.h b/src/progs/manager/prog_manager.h index 11f7401..233013b 100644 --- a/src/progs/manager/prog_manager.h +++ b/src/progs/manager/prog_manager.h @@ -10,7 +10,7 @@ #ifndef PROG_MANAGER_H #define PROG_MANAGER_H -#include <qobject.h> +#include <tqobject.h> #include "common/global/log.h" namespace Device { class Data; class Memory; class MemoryRange; } @@ -22,11 +22,12 @@ class Base; class Group; class HardwareDescription; -class Manager : public QObject, public Log::Base +class Manager : public TQObject, public Log::Base { Q_OBJECT + TQ_OBJECT public: - Manager(QObject *parent); + Manager(TQObject *tqparent); virtual ~Manager(); ::Programmer::Base *programmer() { return _programmer; } virtual void createProgrammer(const Device::Data *data) = 0; @@ -52,7 +53,7 @@ public slots: bool step(); signals: - void actionMessage(const QString &message); + void actionMessage(const TQString &message); void showProgress(bool show); void setTotalProgress(uint steps); void setProgress(uint steps); |