From 9abf98be4f3111c54f13dcb44902a275bd2d7169 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 1 Mar 2012 13:22:13 -0600 Subject: Rename additional global TQt functions --- src/coff/base/coff_object.cpp | 14 +- src/coff/base/text_coff.cpp | 2 +- src/coff/xml/xml_coff_parser.cpp | 14 +- src/common/common/bitvalue.cpp | 2 +- src/common/common/misc.cpp | 2 +- src/common/common/number.cpp | 4 +- src/common/global/generic_config.cpp | 2 +- src/common/global/progress_monitor.cpp | 2 +- src/common/global/purl.cpp | 4 +- src/common/gui/list_view.cpp | 8 +- src/common/nokde/nokde_kaboutdata.cpp | 2 +- src/common/nokde/nokde_kcmdlineargs.cpp | 6 +- src/common/port/port_base.cpp | 14 +- src/common/port/port_base.h | 4 +- src/common/port/usb_port.cpp | 24 +- src/data/syntax_xml_generator.cpp | 2 +- src/devices/base/device_group.cpp | 2 +- src/devices/base/hex_buffer.cpp | 8 +- src/devices/mem24/xml/mem24_xml_to_data.cpp | 18 +- src/devices/pic/base/pic_protection.cpp | 40 ++-- src/devices/pic/gui/pic_config_editor.cpp | 4 +- src/devices/pic/gui/pic_config_word_editor.cpp | 6 +- src/devices/pic/pic/pic_memory.cpp | 34 +-- src/devices/pic/xml/pic_xml_to_data.cpp | 254 ++++++++++----------- src/libgui/likeback.cpp | 2 +- src/libgui/text_editor.cpp | 2 +- src/libgui/toplevel.cpp | 2 +- src/piklab-test/base/device_test.cpp | 2 +- src/progs/direct/base/direct_18F.cpp | 4 +- src/progs/direct/base/direct_pic.cpp | 2 +- src/progs/direct/xml/xml_direct_parser.cpp | 2 +- src/progs/icd1/xml/xml_icd1_parser.cpp | 2 +- src/progs/icd2/base/icd2.cpp | 18 +- src/progs/icd2/xml/xml_icd2_parser.cpp | 4 +- .../xml/xml_picdem_bootloader_parser.cpp | 4 +- src/progs/pickit1/xml/xml_pickit1_parser.cpp | 4 +- src/progs/pickit2/xml/xml_pickit2_parser.cpp | 10 +- .../xml/xml_pickit2_bootloader_parser.cpp | 4 +- src/progs/psp/xml/xml_psp_parser.cpp | 6 +- .../xml/xml_tbl_bootloader_parser.cpp | 6 +- src/tools/list/compile_process.cpp | 4 +- src/xml_to_data/device_xml_to_data.cpp | 80 +++---- src/xml_to_data/prog_xml_to_data.h | 22 +- src/xml_to_data/xml_to_data.cpp | 24 +- src/xml_to_data/xml_to_data.h | 2 +- 45 files changed, 339 insertions(+), 339 deletions(-) (limited to 'src') diff --git a/src/coff/base/coff_object.cpp b/src/coff/base/coff_object.cpp index ee49a95..98f8f3b 100644 --- a/src/coff/base/coff_object.cpp +++ b/src/coff/base/coff_object.cpp @@ -205,7 +205,7 @@ Coff::Symbol::Symbol(const Object &object, const TQByteArray &data, uint start, if ( v==sclass.data().id ) { _sclass = sclass; break; } if ( !getULong(data, offset, 1, log, v) ) return; uint nbAux = v; - //qDebug("symbol: %s value=%s type=%i dtype=%i class=%i nbAux=%i section=%i", _name.latin1(), toHexLabel(_value, 4).latin1(), _type, _dtype, _class, nbAux, _section); + //tqDebug("symbol: %s value=%s type=%i dtype=%i class=%i nbAux=%i section=%i", _name.latin1(), toHexLabel(_value, 4).latin1(), _type, _dtype, _class, nbAux, _section); AuxSymbolType auxType = AuxSymbolType::Nb_Types; if ( _name==".direct" ) auxType = AuxSymbolType::Direct; @@ -262,7 +262,7 @@ Coff::Relocation::Relocation(const Object &object, const Section §ion, } if ( !getULong(data, offset, 2, log, v) ) return; _type = v; - //qDebug("reloc %s: address=%s offset=%i type=%i", _symbol->_name.latin1(), toHexLabel(_address, 4).latin1(), _offset, _type); + //tqDebug("reloc %s: address=%s offset=%i type=%i", _symbol->_name.latin1(), toHexLabel(_address, 4).latin1(), _offset, _type); } //---------------------------------------------------------------------------- @@ -280,7 +280,7 @@ Coff::CodeLine::CodeLine(const Object &object, const Section §ion, if ( _line!=0 ) { _address = tmp; _filename = lastFilename; - //qDebug("code line %i: %s", _line, toHexLabel(_address, nbChars(_address)).latin1()); + //tqDebug("code line %i: %s", _line, toHexLabel(_address, nbChars(_address)).latin1()); } else { if ( tmp>=object.nbSymbols() ) { log.log(Log::LineType::Error, i18n("Codeline has unknown symbol: %1").arg(tmp)); @@ -292,7 +292,7 @@ Coff::CodeLine::CodeLine(const Object &object, const Section §ion, } _symbol = static_cast(object.symbol(tmp)); _filename = _symbol->filename(); - //qDebug("code line %i: %s", _line, _symbol->_name.latin1()); + //tqDebug("code line %i: %s", _line, _symbol->_name.latin1()); } } else { if ( tmp>=object.nbSymbols() ) { @@ -314,7 +314,7 @@ Coff::CodeLine::CodeLine(const Object &object, const Section §ion, // flags if ( !getULong(data, offset, 4, log, v) ) return; // function index - //qDebug("code line %i: %s", _line, toHexLabel(_address, nbChars(_address)).latin1()); + //tqDebug("code line %i: %s", _line, toHexLabel(_address, nbChars(_address)).latin1()); } // if ( _symbol && _symbol->_class!=Symbol::CFile ) // log.log(Log::LineType::Warning, i18n("Line without file symbol associated (%1:%2 %3).") @@ -362,7 +362,7 @@ Coff::Section::Section(const Device::Data &device, const Object &object, // read data Q_ASSERT ( device.group().name()=="pic" ); const Pic::Data &pdata = static_cast(device); - //qDebug("section %s: address=%s size=%i flags=%i", _name.data(), toHexLabel(_address, 4).latin1(), _size, int(_flags)); + //tqDebug("section %s: address=%s size=%i flags=%i", _name.data(), toHexLabel(_address, 4).latin1(), _size, int(_flags)); if ( _size!=0 && dataOffset!=0 ) { uint inc = 1; uint nbWords = _size; @@ -392,7 +392,7 @@ Coff::Section::Section(const Device::Data &device, const Object &object, _instructions[address+inc].opcode = toHex(op2, pdata.nbCharsWord(Pic::MemoryRangeType::Code)); i++; } - //qDebug(" %s: %s (%s %s)", toHex(address, 4).data(), _data[address].disasm.data(), _data[address].opcode.data(), (nbop==2 ? _data[address+inc].opcode.data() : "")); + //tqDebug(" %s: %s (%s %s)", toHex(address, 4).data(), _data[address].disasm.data(), _data[address].opcode.data(), (nbop==2 ? _data[address+inc].opcode.data() : "")); } else if ( _flags & FDataRom ) _instructions[address].opcode = toHex(op, 4); else if ( _flags & FData ) _instructions[address].opcode = toHex(op.maskWith(0xFF), 2); } diff --git a/src/coff/base/text_coff.cpp b/src/coff/base/text_coff.cpp index 1ddeb30..d8eba7b 100644 --- a/src/coff/base/text_coff.cpp +++ b/src/coff/base/text_coff.cpp @@ -100,7 +100,7 @@ void Coff::TextObject::init() const const Section *sec = section(*lines[k]); if (sec) { ldata.codes[k].opcode = "0x" + sec->instructions()[address].opcode.upper(); - //qDebug("%s: %s", ldata.codes[k].address.latin1(), ldata.codes[k].opcode.latin1()); + //tqDebug("%s: %s", ldata.codes[k].address.latin1(), ldata.codes[k].opcode.latin1()); opcodeWidth = qMax(opcodeWidth, uint(ldata.codes[k].opcode.length())); TQString s = sec->instructions()[address].disasm; int j = s.find('\t'); diff --git a/src/coff/xml/xml_coff_parser.cpp b/src/coff/xml/xml_coff_parser.cpp index 556cdb0..9b915bf 100644 --- a/src/coff/xml/xml_coff_parser.cpp +++ b/src/coff/xml/xml_coff_parser.cpp @@ -35,14 +35,14 @@ private: void Coff::XmlToData::parseData(TQDomElement element, Data &data) { TQStringList list = TQStringList::split(' ', element.attribute("id")); - if ( list.isEmpty() ) qFatal("Missing id"); - if ( list.count()>MAX_NB_IDS ) qFatal("Please raise MAX_NB_IDS"); + if ( list.isEmpty() ) tqFatal("Missing id"); + if ( list.count()>MAX_NB_IDS ) tqFatal("Please raise MAX_NB_IDS"); for (uint i=0; iname()) ) qWarning("No id for device %s", data->name().latin1()); + if ( !hasDevice(data->name()) ) tqWarning("No id for device %s", data->name().latin1()); } // extract COFF id from gputils for (uint i=0; pics[i].tag!=no_processor; i++) { _current = TQString(pics[i].names[2]).upper(); if ( !Device::lister().isSupported(_current) ) continue; - if ( !hasDevice(_current) ) qDebug(">> add new id %s: %s", _current.latin1(), toHexLabel(pics[i].coff_type, 4).latin1()); + if ( !hasDevice(_current) ) tqDebug(">> add new id %s: %s", _current.latin1(), toHexLabel(pics[i].coff_type, 4).latin1()); else { bool ok = false; for (uint k=0; k> i) & mask; - //qDebug("%i %s %s", i, toHexLabel((value>>i) & mask, 4).latin1(), toHexLabel(res, 4).latin1()); + //tqDebug("%i %s %s", i, toHexLabel((value>>i) & mask, 4).latin1(), toHexLabel(res, 4).latin1()); } return res; } diff --git a/src/common/common/misc.cpp b/src/common/common/misc.cpp index 1c22b4e..0e8b86a 100644 --- a/src/common/common/misc.cpp +++ b/src/common/common/misc.cpp @@ -48,7 +48,7 @@ TQString htmlTableRow(const TQString &title, const TQString &value) void crash(const char *assert, const char *file, int line) { - qDebug("CRASH_ASSERT: \"%s\" in %s (%d)", assert, file, line); + tqDebug("CRASH_ASSERT: \"%s\" in %s (%d)", assert, file, line); int * ptr = 0; (*ptr)++; } diff --git a/src/common/common/number.cpp b/src/common/common/number.cpp index 01fa4eb..e0b5b0a 100644 --- a/src/common/common/number.cpp +++ b/src/common/common/number.cpp @@ -26,7 +26,7 @@ const NumberBase::Data NumberBase::DATA[Nb_Types] = { char toChar(NumberBase base, uint value) { Q_ASSERT( value=base.data().base ) qDebug("toChar %u (%u)", value, base.data().base); + if ( value>=base.data().base ) tqDebug("toChar %u (%u)", value, base.data().base); if ( base==NumberBase::String ) { if ( !isprint(value) ) return '.'; return value; @@ -45,7 +45,7 @@ TQString toString(NumberBase base, ulong value, uint nbChars) value /= base.data().base; } Q_ASSERT( value==0 ); - if ( value!=0 ) qDebug("toString %s nbChars=%u", toLabel(base, tmp, ::nbChars(base, tmp)).latin1(), nbChars); + if ( value!=0 ) tqDebug("toString %s nbChars=%u", toLabel(base, tmp, ::nbChars(base, tmp)).latin1(), nbChars); return s; } diff --git a/src/common/global/generic_config.cpp b/src/common/global/generic_config.cpp index 6ddf44c..6b50ff0 100644 --- a/src/common/global/generic_config.cpp +++ b/src/common/global/generic_config.cpp @@ -51,7 +51,7 @@ GenericConfig::~GenericConfig() void GenericConfig::rollback() { #if defined(NO_KDE) - qWarning("Config rollback not supported"); + tqWarning("Config rollback not supported"); #else _d->config().rollback(); #endif diff --git a/src/common/global/progress_monitor.cpp b/src/common/global/progress_monitor.cpp index 0b3044d..bcb75a1 100644 --- a/src/common/global/progress_monitor.cpp +++ b/src/common/global/progress_monitor.cpp @@ -78,7 +78,7 @@ void ProgressMonitor::addTaskProgress(uint nbSteps) if ( _current==_tasks.end() ) return; uint nb = (*_current).nbDoneSteps + nbSteps; Q_ASSERT( nb<=(*_current).nbSteps ); - if ( nb>(*_current).nbSteps ) qDebug("%s %i+%i > %i", (*_current).label.latin1(), (*_current).nbDoneSteps, nbSteps, (*_current).nbSteps); + if ( nb>(*_current).nbSteps ) tqDebug("%s %i+%i > %i", (*_current).label.latin1(), (*_current).nbDoneSteps, nbSteps, (*_current).nbSteps); (*_current).nbDoneSteps = TQMIN(nb, (*_current).nbSteps); update(); } diff --git a/src/common/global/purl.cpp b/src/common/global/purl.cpp index d0b5498..c9ff16d 100644 --- a/src/common/global/purl.cpp +++ b/src/common/global/purl.cpp @@ -62,7 +62,7 @@ TQString PURL::Private::getWindowsDrivePath(char drive) ::Process::StringOutput process; process.setup("winepath", args, false); ::Process::State state = ::Process::runSynchronously(process, ::Process::Start, 3000); - if ( state!=::Process::Exited ) qWarning("Error running \"winepath\" with \"%s\" (%i)", args.join(" ").latin1(), state); + if ( state!=::Process::Exited ) tqWarning("Error running \"winepath\" with \"%s\" (%i)", args.join(" ").latin1(), state); s = process.sout() + process.serr(); TQDir dir(s.stripWhiteSpace()); _winDrives[drive] = dir.canonicalPath(); @@ -250,7 +250,7 @@ bool PURL::Base::isInto(const Directory &dir) const bool PURL::Base::httpUrlExists(bool *ok) const { - qInitNetworkProtocols(); + tqInitNetworkProtocols(); if (ok) *ok = false; Http http(_url.host()); Synchronous sync(500); diff --git a/src/common/gui/list_view.cpp b/src/common/gui/list_view.cpp index 1e0cb66..9bce72c 100644 --- a/src/common/gui/list_view.cpp +++ b/src/common/gui/list_view.cpp @@ -46,7 +46,7 @@ bool ListView::eventFilter(TQObject *o, TQEvent *e) for (it=_editItems.begin(); it!=_editItems.end(); ++it) { for (uint i=0; i<(*it)->_editWidgets.count(); i++) { if ( TQT_BASE_OBJECT((*it)->_editWidgets[i])==TQT_BASE_OBJECT(o) ) { - //qDebug("event %i", e->type()); + //tqDebug("event %i", e->type()); switch (e->type()) { case TQEvent::KeyPress: { TQKeyEvent *ke = TQT_TQKEYEVENT(e); @@ -62,9 +62,9 @@ bool ListView::eventFilter(TQObject *o, TQEvent *e) break; } case TQEvent::FocusOut: { - //qDebug("focus out %i %i=%i", tqApp->focusWidget(), focusWidget(), (*it)->_editWidgets[i]); + //tqDebug("focus out %i %i=%i", tqApp->focusWidget(), focusWidget(), (*it)->_editWidgets[i]); if ( tqApp->focusWidget() && focusWidget()==(*it)->_editWidgets[i] ) break; - //qDebug("ext"); + //tqDebug("ext"); TQCustomEvent *e = new TQCustomEvent(9999); TQApplication::postEvent(o, e); return true; @@ -73,7 +73,7 @@ bool ListView::eventFilter(TQObject *o, TQEvent *e) (*it)->renameDone(false); return true; default: - //qDebug(" ignored"); + //tqDebug(" ignored"); break; } } diff --git a/src/common/nokde/nokde_kaboutdata.cpp b/src/common/nokde/nokde_kaboutdata.cpp index 85edf3c..e0c4963 100644 --- a/src/common/nokde/nokde_kaboutdata.cpp +++ b/src/common/nokde/nokde_kaboutdata.cpp @@ -165,7 +165,7 @@ KAboutData::setLicenseText( const char *licenseText ) void KAboutData::setLicenseTextFile( const TQString &file ) { - mLicenseText = qstrdup(TQFile::encodeName(file)); + mLicenseText = tqstrdup(TQFile::encodeName(file)); mLicenseKey = License_File; } diff --git a/src/common/nokde/nokde_kcmdlineargs.cpp b/src/common/nokde/nokde_kcmdlineargs.cpp index 42dc5c1..6c34b0b 100644 --- a/src/common/nokde/nokde_kcmdlineargs.cpp +++ b/src/common/nokde/nokde_kcmdlineargs.cpp @@ -618,7 +618,7 @@ KCmdLineArgs::parseAllArgs() else if ( (::qstrcmp(option, "version") == 0) || (::qstrcmp(option, "v") == 0)) { - printQ( TQString("TQt: %1\n").arg(qVersion())); + printQ( TQString("TQt: %1\n").arg(tqVersion())); // printQ( TQString("KDE: %1\n").arg(TDE_VERSION_STRING)); printQ( TQString("%1: %2\n"). arg(about->programName()).arg(about->version())); @@ -742,11 +742,11 @@ KCmdLineArgs::qt_argv() } qt_argv = new char*[ args->count() + 2 ]; - qt_argv[ 0 ] = qstrdup( appName()); + qt_argv[ 0 ] = tqstrdup( appName()); int i = 0; for(; i < args->count(); i++) { - qt_argv[i+1] = qstrdup((char *) args->arg(i)); + qt_argv[i+1] = tqstrdup((char *) args->arg(i)); } qt_argv[i+1] = 0; diff --git a/src/common/port/port_base.cpp b/src/common/port/port_base.cpp index 63e820e..249db1a 100644 --- a/src/common/port/port_base.cpp +++ b/src/common/port/port_base.cpp @@ -58,32 +58,32 @@ bool Port::Base::receiveChar(char &c, uint timeout) bool Port::Base::setPinOn(uint, bool, LogicType) { - qFatal("setPinOn not implemented"); + tqFatal("setPinOn not implemented"); return false; } bool Port::Base::readPin(uint, LogicType, bool &) { - qFatal("readPin not implemented"); + tqFatal("readPin not implemented"); return 0; } TQValueVector Port::Base::pinData(IODir) const { - qFatal("pinData not implemented"); + tqFatal("pinData not implemented"); return TQValueVector(); } bool Port::Base::isGroundPin(uint) const { - qFatal("isGroundPin not implemented"); + tqFatal("isGroundPin not implemented"); return false; } uint Port::Base::groundPin() const { - qFatal("groundPin not implemented"); + tqFatal("groundPin not implemented"); return 0; } Port::IODir Port::Base::ioDir(uint) const { - qFatal("ioType not implemented"); + tqFatal("ioType not implemented"); return NoIO; } @@ -121,7 +121,7 @@ void Port::Base::logData(const TQString &) } } } - qDebug("%s", vs.latin1()); + tqDebug("%s", vs.latin1()); */ //log(Log::Debug, vs); } diff --git a/src/common/port/port_base.h b/src/common/port/port_base.h index c48fed6..5e3ff27 100644 --- a/src/common/port/port_base.h +++ b/src/common/port/port_base.h @@ -46,8 +46,8 @@ public: protected: virtual bool internalOpen() = 0; virtual void internalClose() = 0; - virtual bool internalSend(const char *, uint, uint) { qFatal("Not implemented"); return false; } - virtual bool internalReceive(uint, char *, uint) { qFatal("Not implemented"); return false; } + virtual bool internalSend(const char *, uint, uint) { tqFatal("Not implemented"); return false; } + virtual bool internalReceive(uint, char *, uint) { tqFatal("Not implemented"); return false; } virtual void setSystemError(const TQString &message) = 0; private: diff --git a/src/common/port/usb_port.cpp b/src/common/port/usb_port.cpp index 76fa5b0..8ef4168 100644 --- a/src/common/port/usb_port.cpp +++ b/src/common/port/usb_port.cpp @@ -39,7 +39,7 @@ void Port::USB::initialize() usb_init(); VersionData vd = VersionData::fromString(LIBUSB_VERSION); TQString s = TQString("libusb %1").arg(vd.pretty()); - if ( vddescriptor.bNumConfigurations); + tqDebug("This device has %d possible configuration(s).", dev->descriptor.bNumConfigurations); for (int c=0; cdescriptor.bNumConfigurations; c++) { - qDebug("Looking at configuration %d...This configuration has %d interfaces.", c, dev->config[c].bNumInterfaces); + tqDebug("Looking at configuration %d...This configuration has %d interfaces.", c, dev->config[c].bNumInterfaces); for(int i=0; iconfig[c].bNumInterfaces; i++) { - qDebug(" Looking at interface %d...This interface has %d altsettings.", i, dev->config[c].interface[i].num_altsetting); + tqDebug(" Looking at interface %d...This interface has %d altsettings.", i, dev->config[c].interface[i].num_altsetting); for (int a=0; a < dev->config[c].interface[i].num_altsetting; a++) { - qDebug(" Looking at altsetting %d...This altsetting has %d endpoints.", a, dev->config[c].interface[i].altsetting[a].bNumEndpoints); + tqDebug(" Looking at altsetting %d...This altsetting has %d endpoints.", a, dev->config[c].interface[i].altsetting[a].bNumEndpoints); for (int e=0; e < dev->config[c].interface[i].altsetting[a].bNumEndpoints; e++) { TQString s; s.sprintf(" Endpoint %d: Address %02xh, attributes %02xh ", e, dev->config[c].interface[i].altsetting[a].endpoint[e].bEndpointAddress, dev->config[c].interface[i].altsetting[a].endpoint[e].bmAttributes); @@ -109,13 +109,13 @@ bool Port::USB::findBulk(const struct usb_device *dev) default: s += "ERROR! Got an illegal value in endpoint bEndpointAddress"; } } - qDebug("%s", s.latin1()); + tqDebug("%s", s.latin1()); } } } } if (bulk_endpoint<0) { - qDebug("No valid interface found!"); + tqDebug("No valid interface found!"); return false; } #endif @@ -151,7 +151,7 @@ struct usb_device *Port::USB::findDevice(uint vendorId, uint productId) } #else Q_UNUSED(vendorId); Q_UNUSED(productId); - qDebug("USB support disabled"); + tqDebug("USB support disabled"); #endif return 0; } @@ -350,10 +350,10 @@ bool Port::USB::write(uint ep, const char *data, uint size) int todo = size; for (;;) { int res = 0; - //qDebug("write ep=%i todo=%i/%i", ep, todo, size); + //tqDebug("write ep=%i todo=%i/%i", ep, todo, size); if ( mode==Interrupt ) res = usb_interrupt_write(_handle, ep, (char *)data + size - todo, todo, timeout(todo)); else res = usb_bulk_write(_handle, ep, (char *)data + size - todo, todo, timeout(todo)); - //qDebug("res: %i", res); + //tqDebug("res: %i", res); if ( res==todo ) break; if ( uint(time.elapsed())>3000 ) { // 3 s if ( res<0 ) setSystemError(i18n("Error sending data (ep=%1 res=%2)").arg(toHexLabel(ep, 2)).arg(res)); @@ -384,10 +384,10 @@ bool Port::USB::read(uint ep, char *data, uint size, bool *poll) int todo = size; for (;;) { int res = 0; - //qDebug("read ep=%i size=%i", ep, todo); + //tqDebug("read ep=%i size=%i", ep, todo); if ( mode==Interrupt ) res = usb_interrupt_read(_handle, ep, data + size - todo, todo, timeout(todo)); else res = usb_bulk_read(_handle, ep, data + size - todo, todo, timeout(todo)); - //qDebug("res: %i", res); + //tqDebug("res: %i", res); if ( res==todo ) break; if ( uint(time.elapsed())>3000 ) { // 3 s: seems to help icd2 in some case (?) if ( res<0 ) setSystemError(i18n("Error receiving data (ep=%1 res=%2)").arg(toHexLabel(ep, 2)).arg(res)); diff --git a/src/data/syntax_xml_generator.cpp b/src/data/syntax_xml_generator.cpp index d1d44b5..3bf5e2a 100644 --- a/src/data/syntax_xml_generator.cpp +++ b/src/data/syntax_xml_generator.cpp @@ -60,7 +60,7 @@ const char * const INSTRUCTIONS[] = { TQTextStream *initFile(TQFile &file) { - if ( !file.open(IO_WriteOnly) ) qFatal("Cannot create \"%s\".", file.name().latin1()); + if ( !file.open(IO_WriteOnly) ) tqFatal("Cannot create \"%s\".", file.name().latin1()); TQTextStream *s = new TQTextStream(&file); (*s) << "" << endl; (*s) << "" << endl; diff --git a/src/devices/base/device_group.cpp b/src/devices/base/device_group.cpp index db70264..169a103 100644 --- a/src/devices/base/device_group.cpp +++ b/src/devices/base/device_group.cpp @@ -69,7 +69,7 @@ TQPixmap drawGraph(const TQValueVector &boxes) xTicks.add(0.0, 0.0); yTicks.add(0.0, 0.0); for (uint i=0; i Hi byte else insert(a, value.maskWith(0xFF00) | data); // Low byte - //if ( x==0 ) qDebug("fb@%s: %s", toHex(addrbase+x >> 1, 8).data(), toHex(fb[addrbase+x >> 1], 8).data()); + //if ( x==0 ) tqDebug("fb@%s: %s", toHex(addrbase+x >> 1, 8).data(), toHex(fb[addrbase+x >> 1], 8).data()); cksum += data; } } else if ( bytecount==count*2 ) { @@ -269,7 +269,7 @@ void HexBuffer::load(TQTextStream &stream, Format &format, TQValueList_nbBytes = fromHexLabel(e.attribute("size"), &ok); - if ( !ok ) qFatal("Missing or invalid size"); + if ( !ok ) tqFatal("Missing or invalid size"); data()->_nbBlocks = e.attribute("nb_blocks").toUInt(&ok); - if ( !ok || data()->_nbBlocks==0 ) qFatal("Missing, zero, or invalid nb_blocks"); - if ( (data()->_nbBytes % data()->_nbBlocks)!=0 ) qFatal("nb_blocks should divide size"); - if ( data()->_nbBlocks>8 ) qFatal("nb_blocks is too large (>8)"); + if ( !ok || data()->_nbBlocks==0 ) tqFatal("Missing, zero, or invalid nb_blocks"); + if ( (data()->_nbBytes % data()->_nbBlocks)!=0 ) tqFatal("nb_blocks should divide size"); + if ( data()->_nbBlocks>8 ) tqFatal("nb_blocks is too large (>8)"); data()->_nbBytesPage = e.attribute("page_size").toUInt(&ok); - if ( !ok || data()->_nbBytesPage==0 ) qFatal("Missing, zero, or invalid page_size"); - if ( ((data()->_nbBytes/data()->_nbBlocks) % data()->_nbBytesPage)!=0 ) qFatal("page_size should divide size/nb_blocks"); + if ( !ok || data()->_nbBytesPage==0 ) tqFatal("Missing, zero, or invalid page_size"); + if ( ((data()->_nbBytes/data()->_nbBlocks) % data()->_nbBytesPage)!=0 ) tqFatal("page_size should divide size/nb_blocks"); TQStringList names; names.append(TQString()); checkTagNames(device, "memory", names); @@ -45,11 +45,11 @@ virtual void processDevice(TQDomElement device) virtual void checkPins(const TQMap &pinLabels) const { - if ( !pinLabels.contains("VCC") ) qFatal("No VDD pin specified"); - if ( !pinLabels.contains("VSS") ) qFatal("No VSS pin specified"); + if ( !pinLabels.contains("VCC") ) tqFatal("No VDD pin specified"); + if ( !pinLabels.contains("VSS") ) tqFatal("No VSS pin specified"); TQMap::const_iterator it; for (it=pinLabels.begin(); it!=pinLabels.end(); ++it) - if ( it.data()!=1 ) qFatal(TQString("Duplicated pin %1").arg(it.key())); + if ( it.data()!=1 ) tqFatal(TQString("Duplicated pin %1").arg(it.key())); } }; // class diff --git a/src/devices/pic/base/pic_protection.cpp b/src/devices/pic/base/pic_protection.cpp index 8fac920..3e8f4c9 100644 --- a/src/devices/pic/base/pic_protection.cpp +++ b/src/devices/pic/base/pic_protection.cpp @@ -123,7 +123,7 @@ bool Pic::Protection::extractRanges(const TQString &name, TQValueVector
bool ok1; end = fromHex(regexp.cap(regexp.numCaptures()), &ok1); if ( !ok1 ) { - qDebug("Malformed end address"); + tqDebug("Malformed end address"); return true; } starts.clear(); @@ -133,11 +133,11 @@ bool Pic::Protection::extractRanges(const TQString &name, TQValueVector
TQString s = (i==1 ? regexp.cap(i) : regexp.cap(i).mid(1)); Address start = fromHex(s, &ok1); if ( !ok1 ) { - qDebug("Malformed start address %s", s.latin1()); + tqDebug("Malformed start address %s", s.latin1()); return true; } if ( start>=end && (starts.count()==0 || starts[starts.count()-1]values[k].name.toUInt(&ok1); if ( !ok1 ) { - qDebug("Could not recognize boot size value"); + tqDebug("Could not recognize boot size value"); return pr; } if ( size==0 ) { - qDebug("Boot size cannot be zero"); + tqDebug("Boot size cannot be zero"); return pr; } Address end = 2 * size - 1; // instruction words @@ -278,7 +278,7 @@ Pic::Protection::ProtectedRange Pic::Protection::extractRange(const TQString &ma return pr; } if ( isBootBlock && bsmask ) { - qDebug("Protected range should not be explicit when boot size is present"); + tqDebug("Protected range should not be explicit when boot size is present"); return pr; } @@ -286,20 +286,20 @@ Pic::Protection::ProtectedRange Pic::Protection::extractRange(const TQString &ma Address end; bool ok1; if ( !extractRanges(name, pr.starts, end, ok1) ) { - qDebug("Could not recognized explicit range"); + tqDebug("Could not recognized explicit range"); return pr; } if ( !ok1 ) return pr; if ( end>rdata.end ) { - qDebug("End is beyond memory range"); + tqDebug("End is beyond memory range"); return pr; } if ( (rtype!=MemoryRangeType::Code || isBootBlock) && (pr.starts.count()>1 || !rexp.cap(2).isEmpty() || bmask==0) ) { - qDebug("Only code with blocks and boot can have multiple protected ranges"); + tqDebug("Only code with blocks and boot can have multiple protected ranges"); return pr; } if ( isBootBlock && pr.starts[0]!=0 ) { - qDebug("Boot block start should be zero"); + tqDebug("Boot block start should be zero"); return pr; } pr.ends.append(end); @@ -307,7 +307,7 @@ Pic::Protection::ProtectedRange Pic::Protection::extractRange(const TQString &ma // check with boot block if ( pr.starts.count()>1 ) { if ( bmask==0 ) { - qDebug("No boot mask"); + tqDebug("No boot mask"); return pr; } for (uint i=0; ivalues.count()); i++) { @@ -316,12 +316,12 @@ Pic::Protection::ProtectedRange Pic::Protection::extractRange(const TQString &ma ProtectedRange bpr = extractRange(bmask->name, bmask->values[i].name, ok1); if ( !ok1 ) return pr; if ( bpr.ends.count()!=pr.starts.count() ) { - qDebug("Boot number of ends (%i) should be the same as code number of starts (%i)", int(bpr.ends.count()), int(pr.starts.count())); + tqDebug("Boot number of ends (%i) should be the same as code number of starts (%i)", int(bpr.ends.count()), int(pr.starts.count())); return pr; } for (uint k=0; k1 ) { diff --git a/src/devices/pic/gui/pic_config_word_editor.cpp b/src/devices/pic/gui/pic_config_word_editor.cpp index 39430ca..0931076 100644 --- a/src/devices/pic/gui/pic_config_word_editor.cpp +++ b/src/devices/pic/gui/pic_config_word_editor.cpp @@ -156,14 +156,14 @@ void Pic::ConfigWordEditor::setReadOnly(bool readOnly) void Pic::ConfigWordEditor::slotModified() { BitValue v = memory().word(MemoryRangeType::Config, _configIndex); - //qDebug("BinWordEditor::slotModified %i: %s", _configIndex, toHex(v, 4).data()); + //tqDebug("BinWordEditor::slotModified %i: %s", _configIndex, toHex(v, 4).data()); for (uint k=0; k<_combos.count(); k++) { const Config::Mask &cmask = device().config()._words[_configIndex].masks[k]; v = v.clearMaskBits(cmask.value); v |= cmask.values[_combos[k]->index()].value; // set value } memory().setWord(MemoryRangeType::Config, _configIndex, v); - //qDebug(" now: %s", toHex(v, 4).data()); + //tqDebug(" now: %s", toHex(v, 4).data()); if (_mdb) _mdb->updateDisplay(); emit modified(); } @@ -172,7 +172,7 @@ void Pic::ConfigWordEditor::updateDisplay() { BitValue v = memory().word(MemoryRangeType::Config, _configIndex); uint nbChars = device().nbCharsWord(MemoryRangeType::Config); - //qDebug("BinWordEditor::updateDisplay %i: %s", _configIndex, toHex(v, 4).data()); + //tqDebug("BinWordEditor::updateDisplay %i: %s", _configIndex, toHex(v, 4).data()); for (uint k=0; k<_combos.count(); k++) { const Config::Mask &cmask = device().config()._words[_configIndex].masks[k]; for (int i=cmask.values.count()-1; i>=0; i--) { diff --git a/src/devices/pic/pic/pic_memory.cpp b/src/devices/pic/pic/pic_memory.cpp index 5ffb663..c7071be 100644 --- a/src/devices/pic/pic/pic_memory.cpp +++ b/src/devices/pic/pic/pic_memory.cpp @@ -85,7 +85,7 @@ BitValue Pic::Memory::normalizedWord(MemoryRangeType type, uint offset) const void Pic::Memory::setWord(MemoryRangeType type, uint offset, BitValue value) { - if ( offset>=_ranges[type].size() ) qDebug("Memory::setWord: type=%s offset=%s size=%s value=%s", type.key(), toHexLabelAbs(offset).latin1(), toHexLabelAbs(_ranges[type].size()).latin1(), toHexLabelAbs(value).latin1()); + if ( offset>=_ranges[type].size() ) tqDebug("Memory::setWord: type=%s offset=%s size=%s value=%s", type.key(), toHexLabelAbs(offset).latin1(), toHexLabelAbs(_ranges[type].size()).latin1(), toHexLabelAbs(value).latin1()); CRASH_ASSERT( offset<_ranges[type].size() ); _ranges[type][offset] = value; } @@ -204,7 +204,7 @@ AddressRangeVector Pic::Memory::protectedRanges(Protection::Type ptype, MemoryRa if ( protection.family()!=Protection::CodeGuard ) { TQString maskName = protection.maskName(ptype, type); TQString value = findValue(maskName); - //qDebug("%s %s", maskName.latin1(), value.latin1()); + //tqDebug("%s %s", maskName.latin1(), value.latin1()); if ( !value.isEmpty() ) { AddressRangeVector tmp = protection.extractRanges(value, type); Q_ASSERT( tmp.count()==1 ); @@ -336,9 +336,9 @@ BitValue Pic::Memory::checksum() const bool isProtected = !rv.isEmpty(); uint inc = device().addressIncrement(MemoryRangeType::Code); //uint nbChars = device().nbCharsWord(MemoryRangeType::Code); - //qDebug("protected: %i nb: %s (%s)", isProtected, toHexLabelAbs(inc*device().nbWords(MemoryRangeType::Code)).latin1(), toHexLabel(mask, nbChars).latin1()); + //tqDebug("protected: %i nb: %s (%s)", isProtected, toHexLabelAbs(inc*device().nbWords(MemoryRangeType::Code)).latin1(), toHexLabel(mask, nbChars).latin1()); //for (uint i=0; i_voltages[type].min = voltages.attribute("min").toDouble(&ok1); data()->_voltages[type].max = voltages.attribute("max").toDouble(&ok2); data()->_voltages[type].nominal = voltages.attribute("nominal").toDouble(&ok3); - if ( !ok1 || !ok2 || !ok3 ) qFatal(TQString("Cannot extract voltage value for \"%1\"").arg(type.key())); + if ( !ok1 || !ok2 || !ok3 ) tqFatal(TQString("Cannot extract voltage value for \"%1\"").arg(type.key())); if ( data()->_voltages[type].min>data()->_voltages[type].max || data()->_voltages[type].nominal_voltages[type].min || data()->_voltages[type].nominal>data()->_voltages[type].max ) - qFatal("Inconsistent voltages order"); + tqFatal("Inconsistent voltages order"); return true; } @@ -45,46 +45,46 @@ bool getMemoryRange(MemoryRangeType type, TQDomElement element) bool ok; uint nbCharsAddress = data()->nbCharsAddress(); data()->_ranges[type].start = fromHexLabel(range.attribute("start"), nbCharsAddress, &ok); - if ( !ok ) qFatal("Cannot extract start address"); + if ( !ok ) tqFatal("Cannot extract start address"); data()->_ranges[type].end = fromHexLabel(range.attribute("end"), nbCharsAddress, &ok); - if ( !ok ) qFatal("Cannot extract end address"); - if ( data()->_ranges[type].end_ranges[type].start ) qFatal("Memory range end is before its start"); + if ( !ok ) tqFatal("Cannot extract end address"); + if ( data()->_ranges[type].end_ranges[type].start ) tqFatal("Memory range end is before its start"); uint nbCharsWord = data()->nbCharsWord(type); - if ( data()->nbBitsWord(type)==0 ) qFatal(TQString("Architecture doesn't contain memory range %1").arg(type.key())); + if ( data()->nbBitsWord(type)==0 ) tqFatal(TQString("Architecture doesn't contain memory range %1").arg(type.key())); if ( type==MemoryRangeType::UserId ) { data()->_userIdRecommendedMask = fromHexLabel(range.attribute("rmask"), nbCharsWord, &ok); - if ( !ok ) qFatal("Cannot extract rmask value for user id"); - if ( !data()->_userIdRecommendedMask.isInside(data()->mask(type)) ) qFatal(TQString("rmask is not inside mask %1 (%2)").arg(toHexLabel(data()->_userIdRecommendedMask, 8)).arg(toHexLabel(data()->mask(type), 8))); + if ( !ok ) tqFatal("Cannot extract rmask value for user id"); + if ( !data()->_userIdRecommendedMask.isInside(data()->mask(type)) ) tqFatal(TQString("rmask is not inside mask %1 (%2)").arg(toHexLabel(data()->_userIdRecommendedMask, 8)).arg(toHexLabel(data()->mask(type), 8))); } if ( range.attribute("hexfile_offset")!="?" ) { data()->_ranges[type].properties |= Programmable; if ( !range.attribute("hexfile_offset").isEmpty() ) { data()->_ranges[type].hexFileOffset = fromHexLabel(range.attribute("hexfile_offset"), nbCharsAddress, &ok); - if ( !ok ) qFatal("Cannot extract hexfile_offset"); + if ( !ok ) tqFatal("Cannot extract hexfile_offset"); } } if ( type==MemoryRangeType::Cal && !data()->is18Family() ) { data()->_calibration.opcodeMask = fromHexLabel(range.attribute("cal_opmask"), nbCharsWord, &ok); - if ( !ok ) qFatal("Cannot extract calibration opcode mask"); + if ( !ok ) tqFatal("Cannot extract calibration opcode mask"); data()->_calibration.opcode = fromHexLabel(range.attribute("cal_opcode"), nbCharsWord, &ok); - if ( !ok ) qFatal("Cannot extract calibration opcode"); - if ( !data()->_calibration.opcode.isInside(data()->_calibration.opcodeMask) ) qFatal("Calibration opcode should be inside opcode mask"); - if ( !data()->_calibration.opcodeMask.isInside(data()->mask(type)) ) qFatal("Calibration mask should be inside opcode mask"); + if ( !ok ) tqFatal("Cannot extract calibration opcode"); + if ( !data()->_calibration.opcode.isInside(data()->_calibration.opcodeMask) ) tqFatal("Calibration opcode should be inside opcode mask"); + if ( !data()->_calibration.opcodeMask.isInside(data()->mask(type)) ) tqFatal("Calibration mask should be inside opcode mask"); } TQString wwa = range.attribute("word_write_align"); TQString wea = range.attribute("word_erase_align"); if ( type==MemoryRangeType::Code ) { if ( data()->_architecture==Architecture::P18F || data()->_architecture==Architecture::P18J ) { data()->_nbWordsCodeWrite = wwa.toUInt(&ok); - if ( !ok || data()->_nbWordsCodeWrite==0 || (data()->_nbWordsCodeWrite%4)!=0 ) qFatal("Missing or malformed word write align"); + if ( !ok || data()->_nbWordsCodeWrite==0 || (data()->_nbWordsCodeWrite%4)!=0 ) tqFatal("Missing or malformed word write align"); data()->_nbWordsCodeRowErase = wea.toUInt(&ok); - if ( !ok || (data()->_nbWordsCodeRowErase%4)!=0 ) qFatal("Missing or malformed word erase align"); + if ( !ok || (data()->_nbWordsCodeRowErase%4)!=0 ) tqFatal("Missing or malformed word erase align"); } else { - if ( !wwa.isEmpty() || !wea.isEmpty() ) qFatal("word align should not be defined for this device family/subfamily"); + if ( !wwa.isEmpty() || !wea.isEmpty() ) tqFatal("word align should not be defined for this device family/subfamily"); data()->_nbWordsCodeWrite = 0; // #### TODO data()->_nbWordsCodeRowErase = 0; // #### TODO } - } else if ( !wwa.isEmpty() || !wea.isEmpty() ) qFatal("word align should not be defined for this memory range"); + } else if ( !wwa.isEmpty() || !wea.isEmpty() ) tqFatal("word align should not be defined for this memory range"); return true; } @@ -100,35 +100,35 @@ void processName(const Pic::Config::Mask &cmask, BitValue pmask, Pic::Config::Va TQStringList &cnames = cvalue.configNames[Pic::ConfigNameType::Default]; if ( cvalue.name=="invalid" ) { cvalue.name = TQString(); - if ( !cnames.isEmpty() ) qFatal(TQString("No cname should be defined for invalid value in mask %1").arg(cmask.name)); + if ( !cnames.isEmpty() ) tqFatal(TQString("No cname should be defined for invalid value in mask %1").arg(cmask.name)); return; } - if ( cvalue.name.isEmpty() ) qFatal(TQString("Empty value name in mask %1").arg(cmask.name)); + if ( cvalue.name.isEmpty() ) tqFatal(TQString("Empty value name in mask %1").arg(cmask.name)); if ( cmask.value.isInside(pmask) ) { // protected bits - if ( !cnames.isEmpty() ) qFatal(TQString("Config name should be null for protected config mask \"%1\"").arg(cmask.name)); + if ( !cnames.isEmpty() ) tqFatal(TQString("Config name should be null for protected config mask \"%1\"").arg(cmask.name)); } else { if ( cnames.isEmpty() && cmask.name!="BSSEC" && cmask.name!="BSSIZ" && cmask.name!="SSSEC" && cmask.name!="SSSIZ" ) { // ### FIXME: 18J 24H 30F1010/202X if ( data()->architecture()!=Pic::Architecture::P18J && data()->architecture()!=Pic::Architecture::P24H && data()->architecture()!=Pic::Architecture::P24F && data()->architecture()!=Pic::Architecture::P33F && data()->name()!="30F1010" && data()->name()!="30F2020" && data()->name()!="30F2023" ) - qFatal(TQString("cname not defined for \"%1\" (%2)").arg(cvalue.name).arg(cmask.name)); + tqFatal(TQString("cname not defined for \"%1\" (%2)").arg(cvalue.name).arg(cmask.name)); } if ( cnames.count()==1 && cnames[0]=="_" ) cnames.clear(); for (uint i=0; inbCharsWord(MemoryRangeType::Config); BitValue mask = cmask.value.complementInMask(maxValue(NumberBase::Hex, nbChars)); if ( ok && v==(mask | cvalue.value) ) continue; } else if ( XOR(cnames[i].startsWith("_"), data()->architecture()==Pic::Architecture::P30F) ) continue; - qFatal(TQString("Invalid config name for \"%1\"/\"%2\"").arg(cmask.name).arg(cvalue.name)); + tqFatal(TQString("Invalid config name for \"%1\"/\"%2\"").arg(cmask.name).arg(cvalue.name)); } TQStringList &ecnames = cvalue.configNames[Pic::ConfigNameType::Extra]; for (uint i=0; i defConfigNames; Config::Mask cmask; cmask.name = mask.attribute("name"); - if ( !Config::hasMaskName(cmask.name) ) qFatal(TQString("Unknown mask name %1").arg(cmask.name)); + if ( !Config::hasMaskName(cmask.name) ) tqFatal(TQString("Unknown mask name %1").arg(cmask.name)); cmask.value = fromHexLabel(mask.attribute("value"), nbChars, &ok); if ( !ok || cmask.value==0 || cmask.value>data()->mask(MemoryRangeType::Config) ) - qFatal(TQString("Malformed mask value in mask %1").arg(mask.attribute("name"))); + tqFatal(TQString("Malformed mask value in mask %1").arg(mask.attribute("name"))); //TQStringList names; TQDomNode child = mask.firstChild(); while ( !child.isNull() ) { TQDomElement value = child.toElement(); child = child.nextSibling(); if ( value.isNull() ) continue; - if ( value.nodeName()!="value" ) qFatal(TQString("Non value child in mask %1").arg(cmask.name)); + if ( value.nodeName()!="value" ) tqFatal(TQString("Non value child in mask %1").arg(cmask.name)); if ( value.attribute("value")=="default" ) { - if ( !defName.isEmpty() ) qFatal(TQString("Default value already defined for mask %1").arg(cmask.name)); + if ( !defName.isEmpty() ) tqFatal(TQString("Default value already defined for mask %1").arg(cmask.name)); defName = value.attribute("name"); - //if ( names.contains(defName) ) qFatal(TQString("Value name duplicated in mask %1").arg(cmask.name)); + //if ( names.contains(defName) ) tqFatal(TQString("Value name duplicated in mask %1").arg(cmask.name)); //names.append(defName); FOR_EACH(Pic::ConfigNameType, type) defConfigNames[type] = TQStringList::split(' ', value.attribute(type.data().key)); continue; } Config::Value cvalue; cvalue.value = fromHexLabel(value.attribute("value"), nbChars, &ok); - if ( !ok || !cvalue.value.isInside(cmask.value) ) qFatal(TQString("Malformed value in mask %1").arg(cmask.name)); + if ( !ok || !cvalue.value.isInside(cmask.value) ) tqFatal(TQString("Malformed value in mask %1").arg(cmask.name)); cvalue.name = value.attribute("name"); - //if ( names.contains(cvalue.name) ) qFatal(TQString("Value name duplicated in mask %1").arg(cmask.name)); + //if ( names.contains(cvalue.name) ) tqFatal(TQString("Value name duplicated in mask %1").arg(cmask.name)); //names.append(cvalue.name); FOR_EACH(Pic::ConfigNameType, type) cvalue.configNames[type] = TQStringList::split(' ', value.attribute(type.data().key)); processName(cmask, pmask, cvalue); @@ -183,7 +183,7 @@ Pic::Config::Mask toConfigMask(TQDomElement mask, BitValue pmask) processName(cmask, pmask, cvalue); cmask.values.append(cvalue); } - if ( nb<=1 ) qFatal(TQString("Default value used less than twice in mask %1").arg(cmask.name)); + if ( nb<=1 ) tqFatal(TQString("Default value used less than twice in mask %1").arg(cmask.name)); } qHeapSort(cmask.values); return cmask; @@ -194,34 +194,34 @@ Pic::Config::Word toConfigWord(TQDomElement config) uint nbChars = data()->nbCharsWord(MemoryRangeType::Config); Config::Word cword; cword.name = config.attribute("name"); - if ( cword.name.isNull() ) qFatal("Config word name not specified."); + if ( cword.name.isNull() ) tqFatal("Config word name not specified."); bool ok; cword.wmask = fromHexLabel(config.attribute("wmask"), nbChars, &ok); BitValue gmask = data()->mask(MemoryRangeType::Config); - if ( !ok || cword.wmask>gmask ) qFatal(TQString("Missing or malformed config wmask \"%1\"").arg(config.attribute("wmask"))); + if ( !ok || cword.wmask>gmask ) tqFatal(TQString("Missing or malformed config wmask \"%1\"").arg(config.attribute("wmask"))); cword.bvalue = fromHexLabel(config.attribute("bvalue"), nbChars, &ok); - if ( !ok ) qFatal(TQString("Missing or malformed config bvalue \"%1\"").arg(config.attribute("bvalue"))); + if ( !ok ) tqFatal(TQString("Missing or malformed config bvalue \"%1\"").arg(config.attribute("bvalue"))); if ( config.attribute("pmask").isEmpty() ) cword.pmask = 0; else { bool ok; cword.pmask = fromHexLabel(config.attribute("pmask"), nbChars, &ok); - if ( !ok || cword.pmask>gmask ) qFatal("Missing or malformed config pmask"); + if ( !ok || cword.pmask>gmask ) tqFatal("Missing or malformed config pmask"); } cword.ignoredCNames = TQStringList::split(' ', config.attribute("icnames")); for (uint i=0; igmask ) qFatal("Missing or malformed config cmask"); - //if ( data()->_architecture==Pic::Architecture::P30X &&cword.cmask==cword.wmask ) qFatal(TQString("Redundant cmask in %1").arg(cword.name)); - if ( cword.cmask==mask ) qFatal(TQString("Redundant cmask in %1").arg(cword.name)); + if ( !ok || cword.cmask>gmask ) tqFatal("Missing or malformed config cmask"); + //if ( data()->_architecture==Pic::Architecture::P30X &&cword.cmask==cword.wmask ) tqFatal(TQString("Redundant cmask in %1").arg(cword.name)); + if ( cword.cmask==mask ) tqFatal(TQString("Redundant cmask in %1").arg(cword.name)); } - if ( !cword.pmask.isInside(cword.usedMask()) ) qFatal("pmask should be inside or'ed mask values."); + if ( !cword.pmask.isInside(cword.usedMask()) ) tqFatal("pmask should be inside or'ed mask values."); return cword; } @@ -252,14 +252,14 @@ TQValueVector getConfigWords(TQDomElement element) if ( config.isNull() || config.nodeName()!="config" ) continue; bool ok; uint offset = fromHexLabel(config.attribute("offset"), 1, &ok); - if ( !ok ) qFatal("Missing or malformed config offset"); - if ( (offset % data()->addressIncrement(MemoryRangeType::Config))!=0 ) qFatal("Config offset not aligned"); + if ( !ok ) tqFatal("Missing or malformed config offset"); + if ( (offset % data()->addressIncrement(MemoryRangeType::Config))!=0 ) tqFatal("Config offset not aligned"); offset /= data()->addressIncrement(MemoryRangeType::Config); - if ( offset>=nbWords ) qFatal(TQString("Offset too big %1/%2").arg(offset).arg(nbWords)); - if ( !configWords[offset].name.isNull() ) qFatal(TQString("Config offset %1 is duplicated").arg(offset)); + if ( offset>=nbWords ) tqFatal(TQString("Offset too big %1/%2").arg(offset).arg(nbWords)); + if ( !configWords[offset].name.isNull() ) tqFatal(TQString("Config offset %1 is duplicated").arg(offset)); for (uint i=0; imax ) qFatal("Invalid number of protected blocks for checksum"); + if ( !ok || nb>max ) tqFatal("Invalid number of protected blocks for checksum"); if ( nb>0 ) cdata.protectedMaskNames += "CPB"; for (uint i=1; i_config->findMask(protection.bootSizeMaskName()); if ( mask==0 ) { - if ( !cdata.bbsize.isEmpty() ) qFatal("Device does not have a variable boot size (no \"bbsize\" allowed in checksum)"); + if ( !cdata.bbsize.isEmpty() ) tqFatal("Device does not have a variable boot size (no \"bbsize\" allowed in checksum)"); } else if ( cdata.bbsize.isEmpty() ) { - if ( nb==1 ) qFatal("\"bbsize\" should be define in checksum for \"protected_blocks\"==1"); + if ( nb==1 ) tqFatal("\"bbsize\" should be define in checksum for \"protected_blocks\"==1"); } else { const Config::Value *value = data()->_config->findValue(protection.bootSizeMaskName(), cdata.bbsize); - if ( value==0 ) qFatal("Invalid \"bbsize\" in checksum"); + if ( value==0 ) tqFatal("Invalid \"bbsize\" in checksum"); valueName += "_" + cdata.bbsize; } } else { valueName = checksum.attribute("protected"); if ( protection.family()==Protection::NoProtection && !valueName.isEmpty() ) - qFatal("Checksum protected attribute for device with no code protection"); + tqFatal("Checksum protected attribute for device with no code protection"); } - if ( data()->_checksums.contains(valueName) ) qFatal("Duplicate checksum protected range"); + if ( data()->_checksums.contains(valueName) ) tqFatal("Duplicate checksum protected range"); TQString s = checksum.attribute("constant"); if ( s.isEmpty() ) cdata.constant = 0x0000; else { bool ok; cdata.constant = fromHexLabel(s, 4, &ok); - if ( !ok ) qFatal("Malformed checksum constant"); + if ( !ok ) tqFatal("Malformed checksum constant"); } s = checksum.attribute("type"); if ( s.isEmpty() ) cdata.algorithm = Checksum::Algorithm::Normal; else { cdata.algorithm = Checksum::Algorithm::fromKey(s); - if ( cdata.algorithm==Checksum::Algorithm::Nb_Types ) qFatal("Unrecognized checksum algorithm"); + if ( cdata.algorithm==Checksum::Algorithm::Nb_Types ) tqFatal("Unrecognized checksum algorithm"); } s = checksum.attribute("mprotected"); @@ -320,32 +320,32 @@ TQString getChecksumData(TQDomElement checksum) TQStringList list = TQStringList::split(" ", s); for (uint i=0; iconfig().findMask(list[i]); - if ( mask==0 ) qFatal(TQString("Not valid mask name for \"protected\" tag in checksum: %1").arg(list[i])); + if ( mask==0 ) tqFatal(TQString("Not valid mask name for \"protected\" tag in checksum: %1").arg(list[i])); if ( mask->values.count()==2 ) continue; for (uint k=0; kvalues.count()); k++) { TQString valueName = mask->values[k].name; if ( valueName.isEmpty() ) continue; if ( !protection.isNoneProtectedValueName(valueName) && !protection.isAllProtectedValueName(valueName) ) - qFatal(TQString("Not switch protection from mask name for \"protected\" tag in checksum: %1").arg(list[i])); + tqFatal(TQString("Not switch protection from mask name for \"protected\" tag in checksum: %1").arg(list[i])); } } cdata.protectedMaskNames = list; } s = checksum.attribute("bchecksum"); - if ( s.isEmpty() ) qFatal("No blank checksum"); + if ( s.isEmpty() ) tqFatal("No blank checksum"); else { bool ok; cdata.blankChecksum = fromHexLabel(s, 4, &ok); - if ( !ok ) qFatal("Malformed blank checksum"); + if ( !ok ) tqFatal("Malformed blank checksum"); } s = checksum.attribute("cchecksum"); - if ( s.isEmpty() ) qFatal("No check checksum"); + if ( s.isEmpty() ) tqFatal("No check checksum"); else { bool ok; cdata.checkChecksum = fromHexLabel(s, 4, &ok); - if ( !ok ) qFatal("Malformed check checksum"); + if ( !ok ) tqFatal("Malformed check checksum"); } data()->_checksums[valueName] = cdata; @@ -358,24 +358,24 @@ virtual void processDevice(TQDomElement device) TQString arch = device.attribute("architecture"); data()->_architecture = Architecture::fromKey(arch); - if ( data()->_architecture==Architecture::Nb_Types ) qFatal(TQString("Unrecognized architecture \"%1\"").arg(arch)); + if ( data()->_architecture==Architecture::Nb_Types ) tqFatal(TQString("Unrecognized architecture \"%1\"").arg(arch)); if ( (data()->_architecture==Architecture::P18F && data()->_name.contains("C")) - || (data()->_architecture==Architecture::P18F && data()->_name.contains("J")) ) qFatal("Not matching family"); + || (data()->_architecture==Architecture::P18F && data()->_name.contains("J")) ) tqFatal("Not matching family"); bool ok; TQString pc = device.attribute("pc"); data()->_nbBitsPC = data()->_architecture.data().nbBitsPC; if ( data()->_nbBitsPC==0 ) { data()->_nbBitsPC = pc.toUInt(&ok); - if ( !ok || data()->_nbBitsPC==0 ) qFatal("Malformed or missing PC"); - } else if ( !pc.isEmpty() ) qFatal("No PC should be provided for this device architecture"); + if ( !ok || data()->_nbBitsPC==0 ) tqFatal("Malformed or missing PC"); + } else if ( !pc.isEmpty() ) tqFatal("No PC should be provided for this device architecture"); TQString sw = device.attribute("self_write"); data()->_selfWrite = (data()->_memoryTechnology!=Device::MemoryTechnology::Flash ? SelfWrite::No : data()->_architecture.data().selfWrite); if ( data()->_selfWrite==SelfWrite::Nb_Types ) { data()->_selfWrite = SelfWrite::fromKey(sw); - if ( data()->_selfWrite==SelfWrite::Nb_Types ) qFatal("Malformed or missing self-write field"); - } else if ( !sw.isEmpty() ) qFatal("Self-write is set for the whole family or non-flash device"); + if ( data()->_selfWrite==SelfWrite::Nb_Types ) tqFatal("Malformed or missing self-write field"); + } else if ( !sw.isEmpty() ) tqFatal("Self-write is set for the whole family or non-flash device"); // device ids FOR_EACH(Device::Special, special) { @@ -385,7 +385,7 @@ virtual void processDevice(TQDomElement device) if ( special==Device::Special::Normal ) data()->_ids[special] = 0x0000; } else { data()->_ids[special] = fromHexLabel(id, 4, &ok); - if ( !ok ) qFatal("Malformed id"); + if ( !ok ) tqFatal("Malformed id"); } } @@ -396,16 +396,16 @@ virtual void processDevice(TQDomElement device) if ( !getVoltages(vtype, device) ) { switch (vtype.type()) { case ProgVoltageType::Vpp: - case ProgVoltageType::VddBulkErase: qFatal(TQString("Voltage \"%1\" not defined").arg(vtype.key())); + case ProgVoltageType::VddBulkErase: tqFatal(TQString("Voltage \"%1\" not defined").arg(vtype.key())); case ProgVoltageType::VddWrite: data()->_voltages[ProgVoltageType::VddWrite] = data()->_voltages[ProgVoltageType::VddBulkErase]; break; case ProgVoltageType::Nb_Types: Q_ASSERT(false); break; } } } - //if ( data()->vddMin()>data()->_voltages[ProgVoltageType::VddWrite].min ) qFatal("Vdd min higher than VddWrite min"); - //if ( data()->vddMax()_voltages[ProgVoltageType::VddWrite].max ) qFatal("Vdd max lower than VddWrite max"); - if ( data()->_voltages[ProgVoltageType::VddWrite].min>data()->_voltages[ProgVoltageType::VddBulkErase].min ) qFatal("VddWrite min higher than VddBulkErase min"); - if ( data()->_voltages[ProgVoltageType::VddWrite].max_voltages[ProgVoltageType::VddBulkErase].max ) qFatal("VddWrite max lower than VddBulkErase max"); + //if ( data()->vddMin()>data()->_voltages[ProgVoltageType::VddWrite].min ) tqFatal("Vdd min higher than VddWrite min"); + //if ( data()->vddMax()_voltages[ProgVoltageType::VddWrite].max ) tqFatal("Vdd max lower than VddWrite max"); + if ( data()->_voltages[ProgVoltageType::VddWrite].min>data()->_voltages[ProgVoltageType::VddBulkErase].min ) tqFatal("VddWrite min higher than VddBulkErase min"); + if ( data()->_voltages[ProgVoltageType::VddWrite].max_voltages[ProgVoltageType::VddBulkErase].max ) tqFatal("VddWrite max lower than VddBulkErase max"); checkTagNames(device, "voltages", names); // memory ranges @@ -426,12 +426,12 @@ virtual void processDevice(TQDomElement device) Address start2 = data()->_ranges[i].start + data()->_ranges[i].hexFileOffset; Address end2 = data()->_ranges[i].end + data()->_ranges[i].hexFileOffset; if ( end1>=start2 && start1<=end2 ) - qFatal(TQString("Overlapping memory ranges (%1 and %2)").arg(k.key()).arg(i.key())); + tqFatal(TQString("Overlapping memory ranges (%1 and %2)").arg(k.key()).arg(i.key())); } } checkTagNames(device, "memory", names); if ( XOR(data()->_ids[Device::Special::Normal]!=0x0000, (data()->_ranges[MemoryRangeType::DeviceId].properties & Present)) ) - qFatal("Id present and device id memory range absent or the opposite"); + tqFatal("Id present and device id memory range absent or the opposite"); // config words TQValueVector cwords = getConfigWords(device); @@ -440,7 +440,7 @@ virtual void processDevice(TQDomElement device) FOR_EACH(Pic::ConfigNameType, type) { TQMap cnames; // cname -> mask name for (uint i=0; i_config->_words[i] = cwords[i]; const Config::Word &word = data()->_config->_words[i]; for (uint j=0; j_config->checkValueName(mask.name, value.name) ) - qFatal(TQString("Malformed value name \"%1\" in mask %2").arg(value.name).arg(mask.name)); + tqFatal(TQString("Malformed value name \"%1\" in mask %2").arg(value.name).arg(mask.name)); } } } @@ -477,14 +477,14 @@ virtual void processDevice(TQDomElement device) const Config::Mask &mask = word.masks[j]; BitValue::const_iterator it; for (it=mask.value.begin(); it!=mask.value.end(); ++it) - if ( !hasValue(mask, *it) ) qFatal(TQString("Value %1 not defined in mask %2").arg(toHexLabel(*it, data()->nbCharsWord(MemoryRangeType::Config))).arg(mask.name)); + if ( !hasValue(mask, *it) ) tqFatal(TQString("Value %1 not defined in mask %2").arg(toHexLabel(*it, data()->nbCharsWord(MemoryRangeType::Config))).arg(mask.name)); } } // checksums (after config bits!) TQDomElement checksums = findUniqueElement(device, "checksums", TQString(), TQString()); if ( checksums.isNull() ) { - // qFatal("No checksum defined"); // #### FIXME + // tqFatal("No checksum defined"); // #### FIXME } else { TQMap valueNames; const Pic::Protection &protection = data()->_config->protection(); @@ -497,17 +497,17 @@ virtual void processDevice(TQDomElement device) TQDomNode child = checksums.firstChild(); while ( !child.isNull() ) { if ( !child.isElement() ) continue; - if ( child.nodeName()!="checksum" ) qFatal("Childs of \"checksums\" should \"checksum\""); + if ( child.nodeName()!="checksum" ) tqFatal("Childs of \"checksums\" should \"checksum\""); TQString valueName = getChecksumData(child.toElement()); if ( protection.family()==Protection::BasicProtection ) { - if ( !valueNames.contains(valueName) ) qFatal("Unknown protected attribute"); + if ( !valueNames.contains(valueName) ) tqFatal("Unknown protected attribute"); valueNames[valueName] = true; } child = child.nextSibling(); } TQMap::const_iterator it; for (it=valueNames.begin(); it!=valueNames.end(); ++it) - if ( !it.key().isEmpty() && !it.data() ) qFatal(TQString("Missing checksum \"%1\"").arg(it.key())); + if ( !it.key().isEmpty() && !it.data() ) tqFatal(TQString("Missing checksum \"%1\"").arg(it.key())); } } @@ -516,16 +516,16 @@ void processMirrored(TQDomElement element) TQValueVector mirrored; TQDomNode child = element.firstChild(); while ( !child.isNull() ) { - if ( !child.isElement() ) qFatal("\"mirror\" child should be an element"); + if ( !child.isElement() ) tqFatal("\"mirror\" child should be an element"); TQDomElement e = child.toElement(); - if ( e.nodeName()!="range" ) qFatal("\"mirror\" child should be \"range\""); + if ( e.nodeName()!="range" ) tqFatal("\"mirror\" child should be \"range\""); RangeData rd; bool ok; rd.start = fromHexLabel(e.attribute("start"), &ok); Address end = fromHexLabel(e.attribute("end"), &ok); rd.length = end-rd.start+1; if ( !mirrored.isEmpty() && rd.length!=mirrored[0].length ) - qFatal("Mirrored are not of the same length"); + tqFatal("Mirrored are not of the same length"); mirrored.append(rd); child = child.nextSibling(); } @@ -537,43 +537,43 @@ void processUnused(TQDomElement e) RangeData rd; bool ok; rd.start = fromHexLabel(e.attribute("start"), &ok); - if (!ok) qFatal("Malformed start for unused register"); + if (!ok) tqFatal("Malformed start for unused register"); Address end = fromHexLabel(e.attribute("end"), &ok); rd.length = end-rd.start+1; - if (!ok) qFatal("Malformed end for unused register"); + if (!ok) tqFatal("Malformed end for unused register"); static_cast(data()->_registersData)->unused.append(rd); } void processSfr(TQDomElement e) { TQString name = e.attribute("name"); - if ( name.isEmpty() ) qFatal("SFR cannot have empty name"); + if ( name.isEmpty() ) tqFatal("SFR cannot have empty name"); if ( data()->registersData().sfrs.contains(name) || data()->registersData().combined.contains(name) ) - qFatal("SFR name is duplicated"); + tqFatal("SFR name is duplicated"); bool ok; uint address = fromHexLabel(e.attribute("address"), &ok); - if ( !ok ) qFatal(TQString("SFR %1 address %2 is malformed").arg(name).arg(e.attribute("address"))); + if ( !ok ) tqFatal(TQString("SFR %1 address %2 is malformed").arg(name).arg(e.attribute("address"))); uint rlength = data()->registersData().nbBanks * data()->architecture().data().registerBankLength; - if ( address>=rlength ) qFatal(TQString("Address %1 outside register range").arg(toHexLabel(address, 3))); + if ( address>=rlength ) tqFatal(TQString("Address %1 outside register range").arg(toHexLabel(address, 3))); RegisterData rdata; rdata.address = address; uint nb = data()->registersData().nbBits(); - if ( nb>Device::MAX_NB_PORT_BITS ) qFatal(TQString("Need higher MAX_NB_PORT_BITS: %1").arg(nb)); + if ( nb>Device::MAX_NB_PORT_BITS ) tqFatal(TQString("Need higher MAX_NB_PORT_BITS: %1").arg(nb)); TQString access = e.attribute("access"); - if ( uint(access.length())!=nb ) qFatal("access is missing or malformed"); + if ( uint(access.length())!=nb ) tqFatal("access is missing or malformed"); TQString mclr = e.attribute("mclr"); - if ( uint(mclr.length())!=nb ) qFatal("mclr is missing or malformed"); + if ( uint(mclr.length())!=nb ) tqFatal("mclr is missing or malformed"); TQString por = e.attribute("por"); - if ( uint(por.length())!=nb ) qFatal("por is missing or malformed"); + if ( uint(por.length())!=nb ) tqFatal("por is missing or malformed"); for (uint i=0; iMaxRegisterBitProperty ) qFatal(TQString("Malformed access bit %1").arg(k)); + if ( !ok || rdata.bits[k].properties>MaxRegisterBitProperty ) tqFatal(TQString("Malformed access bit %1").arg(k)); rdata.bits[k].mclr = RegisterBitState(fromHex(mclr[i].latin1(), &ok)); - if ( !ok || rdata.bits[k].mclr>Nb_RegisterBitStates ) qFatal(TQString("Malformed mclr bit %1").arg(k)); + if ( !ok || rdata.bits[k].mclr>Nb_RegisterBitStates ) tqFatal(TQString("Malformed mclr bit %1").arg(k)); rdata.bits[k].por = RegisterBitState(fromHex(por[i].latin1(), &ok)); - if ( !ok || rdata.bits[k].por>Nb_RegisterBitStates ) qFatal(TQString("Malformed por bit %1").arg(k)); + if ( !ok || rdata.bits[k].por>Nb_RegisterBitStates ) tqFatal(TQString("Malformed por bit %1").arg(k)); } static_cast(data()->_registersData)->sfrs[name] = rdata; } @@ -581,19 +581,19 @@ void processSfr(TQDomElement e) void processCombined(TQDomElement e) { TQString name = e.attribute("name"); - if ( name.isEmpty() ) qFatal("Combined register cannot have empty name"); + if ( name.isEmpty() ) tqFatal("Combined register cannot have empty name"); if ( data()->registersData().sfrs.contains(name) || data()->registersData().combined.contains(name) ) - qFatal("Combined register name is duplicated"); + tqFatal("Combined register name is duplicated"); bool ok; CombinedData rdata; rdata.address = fromHexLabel(e.attribute("address"), &ok); - if ( !ok ) qFatal(TQString("Combined %1 address %2 is malformed").arg(name).arg(e.attribute("address"))); + if ( !ok ) tqFatal(TQString("Combined %1 address %2 is malformed").arg(name).arg(e.attribute("address"))); uint rlength = data()->registersData().nbBanks * data()->architecture().data().registerBankLength; - if ( rdata.address>=rlength ) qFatal(TQString("Address %1 outside register range").arg(toHexLabel(rdata.address, 3))); + if ( rdata.address>=rlength ) tqFatal(TQString("Address %1 outside register range").arg(toHexLabel(rdata.address, 3))); rdata.nbChars = 2*e.attribute("size").toUInt(&ok); - if ( !ok || rdata.nbChars<2 ) qFatal(TQString("Combined %1 size %2 is malformed").arg(name).arg(e.attribute("size"))); + if ( !ok || rdata.nbChars<2 ) tqFatal(TQString("Combined %1 size %2 is malformed").arg(name).arg(e.attribute("size"))); Address end = rdata.address + rdata.nbChars/2 - 1; - if ( end>=rlength ) qFatal(TQString("Address %1 outside register range").arg(toHexLabel(end, 3))); + if ( end>=rlength ) tqFatal(TQString("Address %1 outside register range").arg(toHexLabel(end, 3))); static_cast(data()->_registersData)->combined[name] = rdata; } @@ -601,7 +601,7 @@ void processDeviceRegisters(TQDomElement element) { TQString s = element.attribute("same_as"); if ( !s.isEmpty() ) { - if ( !_map.contains(s) ) qFatal(TQString("Registers same as unknown device %1").arg(s)); + if ( !_map.contains(s) ) tqFatal(TQString("Registers same as unknown device %1").arg(s)); const Pic::Data *d = static_cast(_map[s]); data()->_registersData = d->_registersData; return; @@ -610,12 +610,12 @@ void processDeviceRegisters(TQDomElement element) RegistersData &rdata = *static_cast(data()->_registersData); bool ok; rdata.nbBanks = element.attribute("nb_banks").toUInt(&ok); - if ( !ok || data()->registersData().nbBanks==0 ) qFatal("Malformed number of banks"); + if ( !ok || data()->registersData().nbBanks==0 ) tqFatal("Malformed number of banks"); if ( data()->is18Family() ) { rdata.accessBankSplit = fromHexLabel(element.attribute("access_bank_split_offset"), &ok); - if ( !ok || rdata.accessBankSplit==0 || rdata.accessBankSplit>=0xFF ) qFatal("Malformed access bank split offset"); + if ( !ok || rdata.accessBankSplit==0 || rdata.accessBankSplit>=0xFF ) tqFatal("Malformed access bank split offset"); rdata.unusedBankMask = fromHexLabel(element.attribute("unused_bank_mask"), &ok); - if ( !ok || rdata.unusedBankMask>=maxValue(NumberBase::Hex, rdata.nbBanks) ) qFatal("Malformed access unused bank mask"); + if ( !ok || rdata.unusedBankMask>=maxValue(NumberBase::Hex, rdata.nbBanks) ) tqFatal("Malformed access unused bank mask"); } else { rdata.accessBankSplit = 0; rdata.unusedBankMask = 0; @@ -623,13 +623,13 @@ void processDeviceRegisters(TQDomElement element) TQDomNode child = element.firstChild(); while ( !child.isNull() ) { - if ( !child.isElement() ) qFatal("\"device\" child should be an element"); + if ( !child.isElement() ) tqFatal("\"device\" child should be an element"); TQDomElement e = child.toElement(); if ( e.nodeName()=="mirror" ) processMirrored(e); else if ( e.nodeName()=="unused" ) processUnused(e); else if ( e.nodeName()=="combined" ) processCombined(e); else if ( e.nodeName()=="sfr" ) processSfr(e); - else qFatal(TQString("Node name \"%1\" is not recognized").arg(e.nodeName())); + else tqFatal(TQString("Node name \"%1\" is not recognized").arg(e.nodeName())); child = child.nextSibling(); } @@ -640,11 +640,11 @@ void processDeviceRegisters(TQDomElement element) TQString trisname = rdata.trisName(i); if ( trisname.isEmpty() ) continue; bool hasTris = rdata.sfrs.contains(trisname); - if ( !hasPort && hasTris ) qFatal(TQString("%1 needs %2 to be present").arg(trisname).arg(portname)); + if ( !hasPort && hasTris ) tqFatal(TQString("%1 needs %2 to be present").arg(trisname).arg(portname)); TQString latchname = rdata.latchName(i); if ( latchname.isEmpty() ) continue; bool hasLatch = rdata.sfrs.contains(latchname); - if ( !hasPort && hasLatch ) qFatal(TQString("%1 needs %2 to be present").arg(latchname).arg(portname)); + if ( !hasPort && hasLatch ) tqFatal(TQString("%1 needs %2 to be present").arg(latchname).arg(portname)); } } @@ -652,15 +652,15 @@ void processRegistersFile(const TQString &filename, TQStringList &devices) { TQDomDocument doc = parseFile(filename); TQDomElement root = doc.documentElement(); - if ( root.nodeName()!="registers" ) qFatal("root node should be \"registers\""); + if ( root.nodeName()!="registers" ) tqFatal("root node should be \"registers\""); for (TQDomNode child=root.firstChild(); !child.isNull(); child = child.nextSibling()) { - if ( child.isComment() ) qDebug("comment: %s", child.toComment().data().latin1()); + if ( child.isComment() ) tqDebug("comment: %s", child.toComment().data().latin1()); else { - if ( !child.isElement() ) qFatal("\"registers\" child should be an element"); - if ( child.nodeName()!="device" ) qFatal("Device node should be named \"device\""); + if ( !child.isElement() ) tqFatal("\"registers\" child should be an element"); + if ( child.nodeName()!="device" ) tqFatal("Device node should be named \"device\""); TQDomElement device = child.toElement(); TQString name = device.attribute("name"); - if ( devices.contains(name) ) qFatal(TQString("Registers already defined for %1").arg(name)); + if ( devices.contains(name) ) tqFatal(TQString("Registers already defined for %1").arg(name)); if ( _map.contains(name) ) { _data = _map[name]; processDeviceRegisters(device); @@ -680,18 +680,18 @@ void processRegisters() TQMap::const_iterator it = _map.begin(); for (; it!=_map.end(); ++it) { _data = it.data(); - if ( !devices.contains(it.key()) ) qWarning("Register description not found for %s", it.key().latin1()); + if ( !devices.contains(it.key()) ) tqWarning("Register description not found for %s", it.key().latin1()); } } virtual void checkPins(const TQMap &pinLabels) const { - if ( !pinLabels.contains("VDD") ) qFatal("No VDD pin specified"); - if ( !pinLabels.contains("VSS") ) qFatal("No VSS pin specified"); + if ( !pinLabels.contains("VDD") ) tqFatal("No VDD pin specified"); + if ( !pinLabels.contains("VSS") ) tqFatal("No VSS pin specified"); TQMap::const_iterator it; for (it=pinLabels.begin(); it!=pinLabels.end(); ++it) { if ( it.key()=="VDD" || it.key()=="VSS" || it.key().startsWith("CCP") ) continue; - if ( it.data()!=1 ) qFatal(TQString("Duplicated pin \"%1\"").arg(it.key())); + if ( it.data()!=1 ) tqFatal(TQString("Duplicated pin \"%1\"").arg(it.key())); } const Pic::RegistersData &rdata = static_cast(*_data->registersData()); for (uint i=0; i &pinLabels) const for (uint k=0; kmapToGlobal(TQPoint(0, 0)).x() + window->width() - width(), window->mapToGlobal(TQPoint(0, 0)).y() + 1); if (window != lastWindow && s_windowListing != NoListing) -// if (qstricmp(window->name(), "") == 0 || qstricmp(window->name(), "unnamed") == 0) ; +// if (tqstricmp(window->name(), "") == 0 || tqstricmp(window->name(), "unnamed") == 0) ; // std::cout << "===== LikeBack ===== UNNAMED ACTIVE WINDOW OF TYPE " << window->className() << " ======" << activeWindowPath() << std::endl; // else if (s_windowListing == AllWindows) ; // std::cout << "LikeBack: Active Window: " << activeWindowPath() << std::endl; diff --git a/src/libgui/text_editor.cpp b/src/libgui/text_editor.cpp index f78ebb8..dca5827 100644 --- a/src/libgui/text_editor.cpp +++ b/src/libgui/text_editor.cpp @@ -46,7 +46,7 @@ TextEditor::TextEditor(bool withDebugger, TQWidget *parent, const char *name) : Editor(parent, name), _view(0) { KLibFactory *factory = KLibLoader::self()->factory("libkatepart"); - if ( factory==0 ) qFatal("Could not find katepart"); + if ( factory==0 ) tqFatal("Could not find katepart"); _document = static_cast(factory->create(TQT_TQOBJECT(this), "kate", "KTextEditor::Document")); _oldModified = _document->isModified(); _oldReadOnly = !_document->isReadWrite(); diff --git a/src/libgui/toplevel.cpp b/src/libgui/toplevel.cpp index 0be3a13..bcc9f3a 100644 --- a/src/libgui/toplevel.cpp +++ b/src/libgui/toplevel.cpp @@ -980,7 +980,7 @@ void MainWindow::setTotalProgress(uint nb) //int id = Observer::self()->newJob(job, true); //Observer::self()->slotTotalSize(job, total); //Observer::self()->slotInfoMessage(job, "test"); - //qDebug("set total steps: %i", total); + //tqDebug("set total steps: %i", total); _actionProgress->setTotalSteps(nb); _actionProgress->setProgress(0); TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput); // #### DANGER !!!! diff --git a/src/piklab-test/base/device_test.cpp b/src/piklab-test/base/device_test.cpp index 07a5fdd..ef5cef6 100644 --- a/src/piklab-test/base/device_test.cpp +++ b/src/piklab-test/base/device_test.cpp @@ -15,7 +15,7 @@ void DeviceTest::checkArguments() { if ( _args->count()==1 ) { _device = TQString(_args->arg(0)).upper(); - if ( !Device::lister().isSupported(_device) ) qFatal("Specified device \"%s\" not supported.", _device.latin1()); + if ( !Device::lister().isSupported(_device) ) tqFatal("Specified device \"%s\" not supported.", _device.latin1()); printf("Testing only %s\n", _device.latin1()); } } diff --git a/src/progs/direct/base/direct_18F.cpp b/src/progs/direct/base/direct_18F.cpp index 8c2c371..f10916d 100644 --- a/src/progs/direct/base/direct_18F.cpp +++ b/src/progs/direct/base/direct_18F.cpp @@ -83,7 +83,7 @@ bool Direct::P18F::doRead(Pic::MemoryRangeType type, Device::Array &data, const } } BitValue mask = device().mask(type); - //qDebug("read %s %i", Pic::MEMORY_RANGE_TYPE_DATA[type].label, device().nbWords(type)); + //tqDebug("read %s %i", Pic::MEMORY_RANGE_TYPE_DATA[type].label, device().nbWords(type)); //pulseEngine("w300000"); // what for ? directAccess(type); switch (type.type()) { @@ -125,7 +125,7 @@ bool Direct::P18F::doRead(Pic::MemoryRangeType type, Device::Array &data, const bool Direct::P18F::doWrite(Pic::MemoryRangeType type, const Device::Array &data, bool force) { uint inc = device().addressIncrement(type); - //qDebug("write %s %i/%i %i", Pic::MEMORY_RANGE_TYPE_DATA[type].label, nbWords, data.count(), inc); + //tqDebug("write %s %i/%i %i", Pic::MEMORY_RANGE_TYPE_DATA[type].label, nbWords, data.count(), inc); //pulseEngine("w300000"); ?? configureSinglePanel(); directAccess(type); diff --git a/src/progs/direct/base/direct_pic.cpp b/src/progs/direct/base/direct_pic.cpp index 19c74b5..2d2b6de 100644 --- a/src/progs/direct/base/direct_pic.cpp +++ b/src/progs/direct/base/direct_pic.cpp @@ -23,7 +23,7 @@ BitValue Direct::PulseEngine::pulseEngine(const TQString &cmd, BitValue value) TQByteArray a = toAscii(cmd); BitValue res = 0; for (const char *ptr=a.data(); (ptr-a.data())=0; k--) { data[i] = data[i] << 8; @@ -366,12 +366,12 @@ bool Icd2::Hardware::readMemory(Pic::MemoryRangeType type, uint wordOffset, Address start = device().range(type).start; // address uint todo = inc * data.count(); // address uint offset = inc * wordOffset; // address - //qDebug("read size=%s div=%i nbBytes=%i", toHex(size, 8).data(), div, nbBytesWord); + //tqDebug("read size=%s div=%i nbBytes=%i", toHex(size, 8).data(), div, nbBytesWord); data.resize(0); do { uint size = TQMIN(todo, uint(0x1000)); // addresses uint nb = size / inc; // word - //qDebug("read %s start=%s size=%s", Pic::MEMORY_RANGE_TYPE_DATA[type].label, toHex(start+offset, 8).data(), toHex(nb, 8).data()); + //tqDebug("read %s start=%s size=%s", Pic::MEMORY_RANGE_TYPE_DATA[type].label, toHex(start+offset, 8).data(), toHex(nb, 8).data()); TQString cmd = r + toHex(start+offset, 8) + toHex(nb/div, 8); if ( !command(cmd, 0) ) return false; Device::Array pdata; @@ -400,7 +400,7 @@ bool Icd2::Hardware::writeBlock(uint nbBytesWord, const Device::Array &data, uin for (uint i=0; i=0; k--) { - //if ( i<10 || i>=nbWords-10 ) qDebug("send: %i-%i %s", i, k, ts.mid(2*k, 2).data()); + //if ( i<10 || i>=nbWords-10 ) tqDebug("send: %i-%i %s", i, k, ts.mid(2*k, 2).data()); s += ts.mid(2*k, 2); chk += ts[2*k].latin1() + ts[2*k+1].latin1(); } @@ -422,13 +422,13 @@ bool Icd2::Hardware::writeBlock(uint nbBytesWord, const Device::Array &data, uin i += size; } - //qDebug("done sending %i words (chk=%s)", nbWords, toHex(chk, 2).data()); + //tqDebug("done sending %i words (chk=%s)", nbWords, toHex(chk, 2).data()); return true; } bool Icd2::Hardware::writeMemory(Pic::MemoryRangeType type, uint wordOffset, const Device::Array &data) { - //qDebug("write memory: offset:%s nbWords:%s (size: %s)", toHex(wordOffset, 4).data(), toHex(nbWords, 4).data(), toHex(data.size(), 4).data()); + //tqDebug("write memory: offset:%s nbWords:%s (size: %s)", toHex(wordOffset, 4).data(), toHex(nbWords, 4).data(), toHex(data.size(), 4).data()); const char *w = writeCommand(type); if ( w==0 ) return true; uint nbBytesWord = device().nbBytesWord(type); @@ -439,11 +439,11 @@ bool Icd2::Hardware::writeMemory(Pic::MemoryRangeType type, uint wordOffset, con uint todo = inc * data.count(); // address uint offset = inc * wordOffset; // address uint index = 0; - //qDebug("write todo=%s div=%i nbBytes=%i dataSize=%i", toHex(todo, 8).data(), div, nbBytesWord, data.size()); + //tqDebug("write todo=%s div=%i nbBytes=%i dataSize=%i", toHex(todo, 8).data(), div, nbBytesWord, data.size()); do { uint size = TQMIN(todo, uint(0x1000)); // address uint nb = size / inc; // word - //qDebug("write %s start=%s nbWords=%s", Pic::MEMORY_RANGE_TYPE_DATA[type].label, toHex(start+offset, 8).data(), toHex(nb, 8).data()); + //tqDebug("write %s start=%s nbWords=%s", Pic::MEMORY_RANGE_TYPE_DATA[type].label, toHex(start+offset, 8).data(), toHex(nb, 8).data()); TQString cmd = w + toHex(start+offset+index, 8) + toHex(nb/div, 8); if ( !command(cmd, 0) ) return false; if ( !writeBlock(nbBytesWord, data, index/inc, nb) ) return false; diff --git a/src/progs/icd2/xml/xml_icd2_parser.cpp b/src/progs/icd2/xml/xml_icd2_parser.cpp index 5cb1196..c2af113 100644 --- a/src/progs/icd2/xml/xml_icd2_parser.cpp +++ b/src/progs/icd2/xml/xml_icd2_parser.cpp @@ -29,7 +29,7 @@ uint Icd2::XmlToData::familyIndex(const TQString &family) const uint i = 0; for (; Icd2::FAMILY_DATA[i].efid!=0; i++) if ( family==Icd2::FAMILY_DATA[i].name ) break; - if ( Icd2::FAMILY_DATA[i].efid==0 ) qFatal(TQString("Family \"%1\" is unknown").arg(family)); + if ( Icd2::FAMILY_DATA[i].efid==0 ) tqFatal(TQString("Family \"%1\" is unknown").arg(family)); return i; } @@ -37,7 +37,7 @@ void Icd2::XmlToData::parseData(TQDomElement element, Data &data) { bool ok; data.famid = fromHexLabel(element.attribute("famid"), 2, &ok); - if ( !ok ) qFatal("Missing or malformed famid attribute"); + if ( !ok ) tqFatal("Missing or malformed famid attribute"); data.debugSupport = extractSupport(element.attribute("debug_support_type")); } diff --git a/src/progs/picdem_bootloader/xml/xml_picdem_bootloader_parser.cpp b/src/progs/picdem_bootloader/xml/xml_picdem_bootloader_parser.cpp index 04c6e17..2562f1d 100644 --- a/src/progs/picdem_bootloader/xml/xml_picdem_bootloader_parser.cpp +++ b/src/progs/picdem_bootloader/xml/xml_picdem_bootloader_parser.cpp @@ -28,9 +28,9 @@ private: void PicdemBootloader::XmlToData::parseData(TQDomElement, Data &) { const Device::Data *ddata = Device::lister().data(currentDevice()); - if ( ddata->group().name()!="pic" ) qFatal("non-pic device not supported"); + if ( ddata->group().name()!="pic" ) tqFatal("non-pic device not supported"); const Pic::Data *pdata = static_cast(ddata); - if ( !pdata->hasFeature(Pic::Feature::USB) ) qFatal("device does not have USB"); + if ( !pdata->hasFeature(Pic::Feature::USB) ) tqFatal("device does not have USB"); } } // namespace diff --git a/src/progs/pickit1/xml/xml_pickit1_parser.cpp b/src/progs/pickit1/xml/xml_pickit1_parser.cpp index 9fbfafc..1fd09cf 100644 --- a/src/progs/pickit1/xml/xml_pickit1_parser.cpp +++ b/src/progs/pickit1/xml/xml_pickit1_parser.cpp @@ -26,12 +26,12 @@ private: void Pickit1::XmlToData::parseData(TQDomElement element, Data &data) { TQString s = element.attribute("entry"); - if ( s.length()!=1 || (s[0]!='O' && s[0]!='P') ) qFatal("Invalid or missing entry mode"); + if ( s.length()!=1 || (s[0]!='O' && s[0]!='P') ) tqFatal("Invalid or missing entry mode"); data.entryMode = s[0].latin1(); s = element.attribute("regen"); if ( s.isEmpty() || s=="false" ) data.regenerateOsccal = false; else if ( s=="true" ) data.regenerateOsccal = true; - else qFatal("Invalid regen value"); + else tqFatal("Invalid regen value"); } void Pickit1::XmlToData::outputData(const Data &data, TQTextStream &s) const diff --git a/src/progs/pickit2/xml/xml_pickit2_parser.cpp b/src/progs/pickit2/xml/xml_pickit2_parser.cpp index 686e4b2e..fb0543a 100644 --- a/src/progs/pickit2/xml/xml_pickit2_parser.cpp +++ b/src/progs/pickit2/xml/xml_pickit2_parser.cpp @@ -26,25 +26,25 @@ private: void Pickit2::XmlToData::parseData(TQDomElement element, Data &data) { TQString s = element.attribute("entry"); - if ( s.length()!=1 || (s[0]!='O' && s[0]!='P') ) qFatal("Invalid or missing entry mode"); + if ( s.length()!=1 || (s[0]!='O' && s[0]!='P') ) tqFatal("Invalid or missing entry mode"); data.entryMode = s[0].latin1(); s = element.attribute("pmode"); if ( s.length()!=1 || (s[0]!='0' && s[0]!='1' && s[0]!='4' && s[0]!='n') ) - qFatal("Invalid or missing program mode"); + tqFatal("Invalid or missing program mode"); data.progMode = s[0].latin1(); s = element.attribute("pwidth"); if ( data.progMode!='n' ) { - if ( s.length()!=0 ) qFatal("Program width should not be defined"); + if ( s.length()!=0 ) tqFatal("Program width should not be defined"); data.progWidth = 0; } else { bool ok; data.progWidth = s.toUInt(&ok); - if ( !ok ) qFatal("Invalid or missing program width"); + if ( !ok ) tqFatal("Invalid or missing program width"); } s = element.attribute("regen"); if ( s.isEmpty() || s=="false" ) data.regenerateOsccal = false; else if ( s=="true" ) data.regenerateOsccal = true; - else qFatal("Invalid regen value"); + else tqFatal("Invalid regen value"); } void Pickit2::XmlToData::outputData(const Data &data, TQTextStream &s) const 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 f718c03..00c33ed 100644 --- a/src/progs/pickit2_bootloader/xml/xml_pickit2_bootloader_parser.cpp +++ b/src/progs/pickit2_bootloader/xml/xml_pickit2_bootloader_parser.cpp @@ -28,9 +28,9 @@ private: 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"); + if ( ddata->group().name()!="pic" ) tqFatal("non-pic device not supported"); const Pic::Data *pdata = static_cast(ddata); - if ( !pdata->hasFeature(Pic::Feature::USB) ) qFatal("device does not have USB"); + if ( !pdata->hasFeature(Pic::Feature::USB) ) tqFatal("device does not have USB"); } } // namespace diff --git a/src/progs/psp/xml/xml_psp_parser.cpp b/src/progs/psp/xml/xml_psp_parser.cpp index 8b8875b..d2d4aff 100644 --- a/src/progs/psp/xml/xml_psp_parser.cpp +++ b/src/progs/psp/xml/xml_psp_parser.cpp @@ -27,11 +27,11 @@ void Psp::XmlToData::parseData(TQDomElement element, Data &data) { bool ok; data.algorithm = element.attribute("algorithm").toUInt(&ok); - if ( !ok ) qFatal("Missing or invalid algorithm"); + if ( !ok ) tqFatal("Missing or invalid algorithm"); data.overprogram = element.attribute("overprogram").toUInt(&ok); - if ( !ok ) qFatal("Missing or invalid overprogram"); + if ( !ok ) tqFatal("Missing or invalid overprogram"); data.tries = element.attribute("tries").toUInt(&ok); - if ( !ok ) qFatal("Missing or invalid tries"); + if ( !ok ) tqFatal("Missing or invalid tries"); } void Psp::XmlToData::outputData(const Data &data, TQTextStream &s) const diff --git a/src/progs/tbl_bootloader/xml/xml_tbl_bootloader_parser.cpp b/src/progs/tbl_bootloader/xml/xml_tbl_bootloader_parser.cpp index 0960cd1..eb3087d 100644 --- a/src/progs/tbl_bootloader/xml/xml_tbl_bootloader_parser.cpp +++ b/src/progs/tbl_bootloader/xml/xml_tbl_bootloader_parser.cpp @@ -29,12 +29,12 @@ private: void TinyBootloader::XmlToData::parseData(TQDomElement element, Data &data) { const Device::Data *ddata = Device::lister().data(currentDevice()); - if ( ddata->group().name()!="pic" ) qFatal("non-pic device not supported"); + if ( ddata->group().name()!="pic" ) tqFatal("non-pic device not supported"); const Pic::Data *pdata = static_cast(ddata); - if ( !pdata->hasFeature(Pic::Feature::USART) ) qFatal("device does not have USART"); + if ( !pdata->hasFeature(Pic::Feature::USART) ) tqFatal("device does not have USART"); bool ok; data.id = fromHexLabel(element.attribute("id"), 2, &ok); - if ( !ok ) qFatal("Invalid \"id\" tag"); + if ( !ok ) tqFatal("Invalid \"id\" tag"); } void TinyBootloader::XmlToData::outputData(const Data &data, TQTextStream &s) const diff --git a/src/tools/list/compile_process.cpp b/src/tools/list/compile_process.cpp index 7ec09d8..7ba74a2 100644 --- a/src/tools/list/compile_process.cpp +++ b/src/tools/list/compile_process.cpp @@ -210,7 +210,7 @@ Compile::FileData::List Compile::Process::files(bool *ok) const PURL::FileType type = PURL::FileType::fromKey(rexp.cap(1)); if ( type==PURL::Nb_FileTypes ) { if (ok) *ok = false; - qWarning("Unknown PURL::FileType in file list for %s", _manager->label().latin1()); + tqWarning("Unknown PURL::FileType in file list for %s", _manager->label().latin1()); continue; } if ( type.data().group==PURL::LinkerScript ) { @@ -231,7 +231,7 @@ Compile::FileData::List Compile::Process::files(bool *ok) const bool Compile::Process::checkIs(const TQString &s, const TQString &key) { if ( !s.contains(key) ) return false; - if ( s!=key ) qWarning("Argument should be only %s, the rest will be ignored...", key.latin1()); + if ( s!=key ) tqWarning("Argument should be only %s, the rest will be ignored...", key.latin1()); return true; } diff --git a/src/xml_to_data/device_xml_to_data.cpp b/src/xml_to_data/device_xml_to_data.cpp index 3f0dcc0..5ad40a5 100644 --- a/src/xml_to_data/device_xml_to_data.cpp +++ b/src/xml_to_data/device_xml_to_data.cpp @@ -18,12 +18,12 @@ bool Device::XmlToDataBase::getFrequencyRange(OperatingCondition oc, Special spe TQDomElement range; for (TQDomNode child=element.firstChild(); !child.isNull(); child=child.nextSibling()) { if ( child.nodeName()!="frequency_range" ) continue; - if ( !child.isElement() ) qFatal("\"frequency_range\" should be an element"); + if ( !child.isElement() ) tqFatal("\"frequency_range\" should be an element"); if ( child.toElement().attribute("name")!=oc.key() ) continue; Special s = Special::fromKey(child.toElement().attribute("special")); - if ( s==Special::Nb_Types ) qFatal("Unrecognized special"); + if ( s==Special::Nb_Types ) tqFatal("Unrecognized special"); if ( special!=s ) continue; - if ( !range.isNull() ) qFatal("Duplicated \"frequency_range\""); + if ( !range.isNull() ) tqFatal("Duplicated \"frequency_range\""); range = child.toElement(); } if ( range.isNull() ) return false; @@ -32,7 +32,7 @@ bool Device::XmlToDataBase::getFrequencyRange(OperatingCondition oc, Special spe frange.special = special; for (TQDomNode child=range.firstChild(); !child.isNull(); child=child.nextSibling()) { if ( child.nodeName()=="frequency" ) { - if ( !child.isElement() ) qFatal("Frequency is not an element"); + if ( !child.isElement() ) tqFatal("Frequency is not an element"); TQDomElement frequency = child.toElement(); bool ok1, ok2, ok3, ok4; RangeBox box; @@ -44,11 +44,11 @@ bool Device::XmlToDataBase::getFrequencyRange(OperatingCondition oc, Special spe if ( !ok1 || !ok2 || !ok3 || !ok4 || box.start.x<0.0 || box.start.x>box.end.x || box.start.yMin<0.0 || box.start.yMin>box.start.yMax ) - qFatal("Malformed frequency element"); + tqFatal("Malformed frequency element"); if ( frequency.attribute("vdd_min_end").isEmpty() ) box.end.yMin = box.start.yMin; else { box.end.yMin = frequency.attribute("vdd_min_end").toDouble(&ok1); - if ( !ok1 || box.end.yMin>box.end.yMax ) qFatal("Malformed frequency element"); + if ( !ok1 || box.end.yMin>box.end.yMax ) tqFatal("Malformed frequency element"); } box.mode = frequency.attribute("mode"); box.osc = frequency.attribute("osc"); @@ -56,17 +56,17 @@ bool Device::XmlToDataBase::getFrequencyRange(OperatingCondition oc, Special spe for (uint i=0; ifrange.vdds[i].start.x ) { if ( box.mode.isEmpty() && box.osc.isEmpty() && box.special.isEmpty() ) - qFatal("Overlapping frequency ranges"); + tqFatal("Overlapping frequency ranges"); continue; // #### FIXME: ignore additionnal mode } -// qDebug("add Freq Range: %s %s %f=[%f %f] %f=[%f %f]", +// tqDebug("add Freq Range: %s %s %f=[%f %f] %f=[%f %f]", // Device::FrequencyRange::TYPE_LABELS[type], Device::FrequencyRange::SPECIAL_LABELS[type], // box.start.x, box.start.yMin, box.start.yMax, // box.end.x, box.end.yMin, box.end.yMax); frange.vdds.append(box); } } - if ( frange.vdds.count()==0 ) qFatal("Empty frequency range"); + if ( frange.vdds.count()==0 ) tqFatal("Empty frequency range"); _data->_frequencyRanges.append(frange); return true; } @@ -76,15 +76,15 @@ bool Device::XmlToDataBase::getMemoryTechnology(TQDomElement element) TQString s = element.attribute("memory_technology"); _data->_memoryTechnology = MemoryTechnology::fromKey(s); if ( _data->_memoryTechnology!=MemoryTechnology::Nb_Types ) return true; - if ( !s.isNull() ) qFatal("Unrecognized memory technology"); + if ( !s.isNull() ) tqFatal("Unrecognized memory technology"); return false; } void Device::XmlToDataBase::processDevice(TQDomElement device) { TQString name = device.attribute("name").upper(); - if ( name.isEmpty() ) qFatal("Device has no name"); - if ( _map.contains(name) ) qFatal(TQString("Device \"%1\" already defined").arg(name)); + if ( name.isEmpty() ) tqFatal("Device has no name"); + if ( _map.contains(name) ) tqFatal(TQString("Device \"%1\" already defined").arg(name)); _data = createData(); _map[name] = _data; _data->_name = name; @@ -93,10 +93,10 @@ void Device::XmlToDataBase::processDevice(TQDomElement device) _data->_status = Status::fromKey(device.attribute("status")); switch (_data->_status.type()) { case Status::Nb_Types: - qFatal("Unrecognized or absent device status"); + tqFatal("Unrecognized or absent device status"); break; case Status::Future: - if ( _data->_alternatives.count() ) qFatal("Future device has alternative"); + if ( _data->_alternatives.count() ) tqFatal("Future device has alternative"); break; case Status::NotRecommended: case Status::Mature: @@ -111,34 +111,34 @@ void Device::XmlToDataBase::processDevice(TQDomElement device) _data->_documents.webpage = device.attribute("document"); // ### REMOVE ME TQDomElement documents = findUniqueElement(device, "documents", TQString(), TQString()); if ( documents.isNull() ) { - if ( _data->_documents.webpage.isEmpty() ) qFatal("Missing \"documents\" element"); + if ( _data->_documents.webpage.isEmpty() ) tqFatal("Missing \"documents\" element"); } else { - if ( !_data->_documents.webpage.isEmpty() ) qFatal("document should be removed from root element"); + if ( !_data->_documents.webpage.isEmpty() ) tqFatal("document should be removed from root element"); _data->_documents.webpage = documents.attribute("webpage"); - if ( _data->_documents.webpage.isEmpty() ) qFatal("Missing webpage"); + if ( _data->_documents.webpage.isEmpty() ) tqFatal("Missing webpage"); _data->_documents.datasheet = documents.attribute("datasheet"); TQRegExp rexp("\\d{5}"); if ( _data->_documents.datasheet=="?" ) warning("No datasheet specified"); - if ( !rexp.exactMatch(_data->_documents.datasheet) ) qFatal(TQString("Malformed datasheet \"%1\" (5 digits)").arg(_data->_documents.datasheet)); + if ( !rexp.exactMatch(_data->_documents.datasheet) ) tqFatal(TQString("Malformed datasheet \"%1\" (5 digits)").arg(_data->_documents.datasheet)); _data->_documents.progsheet = documents.attribute("progsheet"); if ( _data->_documents.progsheet=="?" ) warning("No progsheet specified"); - if ( !rexp.exactMatch(_data->_documents.datasheet) ) qFatal(TQString("Malformed progsheet \"%1\" (5 digits)").arg(_data->_documents.progsheet)); + if ( !rexp.exactMatch(_data->_documents.datasheet) ) tqFatal(TQString("Malformed progsheet \"%1\" (5 digits)").arg(_data->_documents.progsheet)); _data->_documents.erratas = TQStringList::split(" ", documents.attribute("erratas")); for (uint i=0; i_documents.erratas.count()); i++) { TQString errata = _data->_documents.erratas[i]; if ( !rexp.exactMatch(errata) ) { TQRegExp rexp2("\\d{5}e\\d"); if ( !rexp2.exactMatch(errata) && !errata.startsWith("er") && errata.mid(2)!=_data->_name.lower() ) - qFatal(TQString("Malformed erratas \"%1\" (5 digits or 5 digits + e + 1 digit or \"er\" + name)").arg(errata)); + tqFatal(TQString("Malformed erratas \"%1\" (5 digits or 5 digits + e + 1 digit or \"er\" + name)").arg(errata)); } } } if ( _data->_documents.webpage=="?" ) warning("No webpage specified"); else { TQRegExp rexp("\\d{6}"); - if ( !rexp.exactMatch(_data->_documents.webpage) ) qFatal(TQString("Malformed webpage \"%1\" (6 digits)").arg(_data->_documents.webpage)); + if ( !rexp.exactMatch(_data->_documents.webpage) ) tqFatal(TQString("Malformed webpage \"%1\" (6 digits)").arg(_data->_documents.webpage)); if ( _documents.contains(_data->_documents.webpage) ) - qFatal(TQString("webpage duplicated (already used for %1)").arg(_documents[_data->_documents.webpage])); + tqFatal(TQString("webpage duplicated (already used for %1)").arg(_documents[_data->_documents.webpage])); _documents[_data->_documents.webpage] = name; } @@ -150,11 +150,11 @@ void Device::XmlToDataBase::processDevice(TQDomElement device) FOR_EACH(Special, special) if ( getFrequencyRange(oc, special, device) && special==Special::Normal ) ok = true; } - if ( !ok ) qWarning("No normal frequency range defined"); + if ( !ok ) tqWarning("No normal frequency range defined"); checkTagNames(device, "frequency_range", names); // memory technology - if ( !getMemoryTechnology(device) ) qFatal("Memory technology not defined"); + if ( !getMemoryTechnology(device) ) tqFatal("Memory technology not defined"); // packages for (TQDomNode child=device.firstChild(); !child.isNull(); child=child.nextSibling()) { @@ -172,7 +172,7 @@ void Device::XmlToDataBase::processDevice(TQDomElement device) for (uint k=0; k_packages.count()); k++) for (uint l=0; l_packages[k].types.count()); j++) - if ( _data->_packages[k].types[j]==p.types[l] && _data->_packages[k].pins.count()==p.pins.count() ) qFatal("Duplicated package type"); + if ( _data->_packages[k].types[j]==p.types[l] && _data->_packages[k].pins.count()==p.pins.count() ) tqFatal("Duplicated package type"); if ( !pinLabels.isEmpty() ) checkPins(pinLabels); _data->_packages.append(p); } @@ -184,49 +184,49 @@ Device::Package Device::XmlToDataBase::processPackage(TQDomElement element) // nb pins bool ok; uint nb = element.attribute("nb_pins").toUInt(&ok); - if ( !ok || nb==0 ) qFatal("Malformed \"nb_pins\""); + if ( !ok || nb==0 ) tqFatal("Malformed \"nb_pins\""); package.pins.resize(nb); // types TQStringList types = TQStringList::split(" ", element.attribute("types")); - if ( types.isEmpty() ) qFatal("No package types specified"); + if ( types.isEmpty() ) tqFatal("No package types specified"); for (uint k=0; k found(nb); found.fill(false); TQDomNode child = element.firstChild(); while ( !child.isNull() ) { if ( child.nodeName()=="pin" ) { - if ( !child.isElement() ) qFatal("\"pin\" is not an element"); + if ( !child.isElement() ) tqFatal("\"pin\" is not an element"); TQDomElement pin = child.toElement(); bool ok; uint i = pin.attribute("index").toUInt(&ok); - if ( !ok || i==0 || i>nb ) qFatal("Malformed pin index"); - if (found[i-1]) qFatal("Duplicated pin index"); + if ( !ok || i==0 || i>nb ) tqFatal("Malformed pin index"); + if (found[i-1]) tqFatal("Duplicated pin index"); found[i-1] = true; TQString name = pin.attribute("name"); if ( !name.isEmpty() && name!="N/C" ) { TQStringList labels = TQStringList::split("/", name); - if ( name.contains(" ") || labels.count()==0 ) qFatal("Malformed pin name"); - if ( name!=name.upper() ) qFatal("Pin name should be uppercase"); + if ( name.contains(" ") || labels.count()==0 ) tqFatal("Malformed pin name"); + if ( name!=name.upper() ) tqFatal("Pin name should be uppercase"); } package.pins[i-1] = name; have_pins = true; @@ -234,7 +234,7 @@ Device::Package Device::XmlToDataBase::processPackage(TQDomElement element) child = child.nextSibling(); } if ( !have_pins ) ;//warning("Pins not specified"); // #### REMOVE ME !! - else for (uint i=0; i::extractSupport(const TQString &s) const { if ( s.isEmpty() ) return Group::Support::Untested; Group::Support support = Group::Support::fromKey(s); - if ( support==Group::Support::None ) qFatal("Cannot be \"not supported\""); - if ( support==Group::Support::Nb_Types ) qFatal("Unknown support type"); + if ( support==Group::Support::None ) tqFatal("Cannot be \"not supported\""); + if ( support==Group::Support::Nb_Types ) tqFatal("Unknown support type"); return support; } template void ExtXmlToData::parseDevice(TQDomElement element) { - if ( element.nodeName()!="device" ) qFatal("Root node child should be named \"device\""); + if ( element.nodeName()!="device" ) tqFatal("Root node child should be named \"device\""); _current = element.attribute("name").upper(); - if ( Device::lister().data(_current)==0 ) qFatal(TQString("Device name \"%1\" unknown").arg(_current)); - if ( _map.contains(_current) ) qFatal(TQString("Device \"%1\" already parsed").arg(_current)); + if ( Device::lister().data(_current)==0 ) tqFatal(TQString("Device name \"%1\" unknown").arg(_current)); + if ( _map.contains(_current) ) tqFatal(TQString("Device \"%1\" already parsed").arg(_current)); PData data; if ( hasFamilies() ) { TQString family = element.attribute("family"); - if ( family.isEmpty() ) qFatal(TQString("Family is empty").arg(family)); + if ( family.isEmpty() ) tqFatal(TQString("Family is empty").arg(family)); if ( _families.find(family)==_families.end() ) _families.append(family); data.family = familyIndex(family); } @@ -87,13 +87,13 @@ void ExtXmlToData::parse() { TQDomDocument doc = parseFile(_basename + ".xml"); TQDomElement root = doc.documentElement(); - if ( root.nodeName()!="type" ) qFatal("Root node should be \"type\""); - if ( root.attribute("name")!=_basename ) qFatal(TQString("Root node name is not \"%1\"").arg(_basename)); + if ( root.nodeName()!="type" ) tqFatal("Root node should be \"type\""); + if ( root.attribute("name")!=_basename ) tqFatal(TQString("Root node name is not \"%1\"").arg(_basename)); TQDomNode child = root.firstChild(); while ( !child.isNull() ) { - if ( child.isComment() ) qDebug("comment: %s", child.toComment().data().latin1()); + if ( child.isComment() ) tqDebug("comment: %s", child.toComment().data().latin1()); else { - if ( !child.isElement() ) qFatal("Root node child should be an element"); + if ( !child.isElement() ) tqFatal("Root node child should be an element"); parseDevice(child.toElement()); } child = child.nextSibling(); @@ -105,7 +105,7 @@ void ExtXmlToData::output() { // write .cpp file TQFile file(_basename + "_data.cpp"); - if ( !file.open(IO_WriteOnly) ) qFatal(TQString("Cannot open output file \"%1\"").arg(file.name())); + if ( !file.open(IO_WriteOnly) ) tqFatal(TQString("Cannot open output file \"%1\"").arg(file.name())); TQTextStream s(&file); s << "// #### Do not edit: this file is autogenerated !!!" << endl << endl; s << "#include \"devices/list/device_list.h\"" << endl; diff --git a/src/xml_to_data/xml_to_data.cpp b/src/xml_to_data/xml_to_data.cpp index 8176be1..ef41a8d 100644 --- a/src/xml_to_data/xml_to_data.cpp +++ b/src/xml_to_data/xml_to_data.cpp @@ -19,7 +19,7 @@ TQDomElement XmlToData::findUniqueElement(TQDomElement parent, const TQString &t while ( !child.isNull() ) { if ( child.nodeName()==tag && child.isElement() && (attribute.isEmpty() || child.toElement().attribute(attribute)==value) ) { - if ( !element.isNull() ) qFatal(TQString("Duplicated element \"%1/%2\"").arg(tag).arg(value)); + if ( !element.isNull() ) tqFatal(TQString("Duplicated element \"%1/%2\"").arg(tag).arg(value)); element = child.toElement(); } child = child.nextSibling(); @@ -34,38 +34,38 @@ void XmlToData::checkTagNames(TQDomElement element, const TQString &tag, for (uint i=0; i