diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:57:30 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:57:30 -0600 |
commit | ad1fc5fc8eadb9b63e8767e57ac41cbac84f7eb7 (patch) | |
tree | c47273eb6595f763c282d33fb89affe1f8866120 /src/common | |
parent | 9d6927a7d6a543332f828bffedf65eecf6774c6d (diff) | |
download | piklab-ad1fc5fc8eadb9b63e8767e57ac41cbac84f7eb7.tar.gz piklab-ad1fc5fc8eadb9b63e8767e57ac41cbac84f7eb7.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 9d6927a7d6a543332f828bffedf65eecf6774c6d.
Diffstat (limited to 'src/common')
26 files changed, 130 insertions, 130 deletions
diff --git a/src/common/cli/cli_main.cpp b/src/common/cli/cli_main.cpp index 8b8e2ab..11537a7 100644 --- a/src/common/cli/cli_main.cpp +++ b/src/common/cli/cli_main.cpp @@ -26,7 +26,7 @@ CLI::ExitCode CLI::findCommand(const TQString &s) { if ( s.isEmpty() ) return errorExit(i18n("No command specified"), ARG_ERROR); const CommandData *data = findCommandData(s); - if ( data==0 ) return errorExit(i18n("Unknown command: %1").arg(s), ARG_ERROR); + if ( data==0 ) return errorExit(i18n("Unknown command: %1").tqarg(s), ARG_ERROR); return OK; } @@ -182,7 +182,7 @@ CLI::ExitCode CLI::MainBase::doRun() TQString option = _args->getOption(PROPERTY_DATA[i].name); ExitCode code = executeSetCommand(PROPERTY_DATA[i].name, option); if ( code!=OK ) return code; - log(Log::LineType::Information, TQString("%1: %2").arg(PROPERTY_DATA[i].name).arg(executeGetCommand(PROPERTY_DATA[i].name))); + log(Log::LineType::Information, TQString("%1: %2").tqarg(PROPERTY_DATA[i].name).tqarg(executeGetCommand(PROPERTY_DATA[i].name))); } // process default lists diff --git a/src/common/cli/cli_pfile.cpp b/src/common/cli/cli_pfile.cpp index 1cdbc9a..e984e52 100644 --- a/src/common/cli/cli_pfile.cpp +++ b/src/common/cli/cli_pfile.cpp @@ -17,7 +17,7 @@ bool PURL::File::openForWrite() _file->setName(url().filepath()); if ( !_file->open(IO_WriteOnly) ) { _error = i18n("Could not open file for writing."); - _log.sorry(_error, i18n("File: %1").arg(_file->name())); + _log.sorry(_error, i18n("File: %1").tqarg(_file->name())); return false; } return true; @@ -35,7 +35,7 @@ bool PURL::File::openForRead() _file->setName(_url.filepath()); if ( !_file->open(IO_ReadOnly) ) { _error = i18n("Could not open file for reading."); - _log.sorry(_error, i18n("File: %1").arg(_file->name())); + _log.sorry(_error, i18n("File: %1").tqarg(_file->name())); return false; } return true; diff --git a/src/common/common/streamer.h b/src/common/common/streamer.h index 8d8ea6e..5d0bbaa 100644 --- a/src/common/common/streamer.h +++ b/src/common/common/streamer.h @@ -10,7 +10,7 @@ #define STREAMER_H #include <tqdatastream.h> -#include <textstream.h> +#include <tqtextstream.h> #include "common/global/global.h" #include "common/common/number.h" diff --git a/src/common/global/pfile.h b/src/common/global/pfile.h index 4337ab7..477d7c0 100644 --- a/src/common/global/pfile.h +++ b/src/common/global/pfile.h @@ -9,7 +9,7 @@ #ifndef PFILE_H #define PFILE_H -#include <textstream.h> +#include <tqtextstream.h> #include "purl.h" namespace PURL diff --git a/src/common/global/process.cpp b/src/common/global/process.cpp index 238d336..ed63f86 100644 --- a/src/common/global/process.cpp +++ b/src/common/global/process.cpp @@ -146,13 +146,13 @@ bool Process::Base::isFilteredLine(const TQString &line) //---------------------------------------------------------------------------- void Process::StringOutput::receivedStdout(KProcess*, char *data, int len) { - _stdout += TQString::fromLatin1(data, len); + _stdout += TQString::tqfromLatin1(data, len); emit stdoutDataReceived(); } void Process::StringOutput::receivedStderr(KProcess*, char *data, int len) { - _stderr += TQString::fromLatin1(data, len); + _stderr += TQString::tqfromLatin1(data, len); emit stderrDataReceived(); } @@ -164,7 +164,7 @@ void Process::LineBase::receivedStdout(KProcess*, char *data, int len) if ( data[i]=='\n' ) { if ( !isFilteredLine(_stdout) ) addStdoutLine(_stdout); _stdout = TQString(); - } else _stdout += TQString::fromLatin1(data + i, 1); + } else _stdout += TQString::tqfromLatin1(data + i, 1); } if ( !_process->isRunning() && !isFilteredLine(_stdout) ) addStdoutLine(_stdout); emit stdoutDataReceived(); @@ -177,7 +177,7 @@ void Process::LineBase::receivedStderr(KProcess*, char *data, int len) if ( data[i]=='\n' ) { if ( !isFilteredLine(_stderr) ) addStderrLine(_stderr); _stderr = TQString(); - } else _stderr += TQString::fromLatin1(data + i, 1); + } else _stderr += TQString::tqfromLatin1(data + i, 1); } if ( !_process->isRunning() && !isFilteredLine(_stderr) ) addStderrLine(_stderr); emit stderrDataReceived(); diff --git a/src/common/global/purl.cpp b/src/common/global/purl.cpp index d0b5498..ab1f8da 100644 --- a/src/common/global/purl.cpp +++ b/src/common/global/purl.cpp @@ -69,7 +69,7 @@ TQString PURL::Private::getWindowsDrivePath(char drive) } return _winDrives[drive]; #else - return TQString("%1:\\").arg(drive); + return TQString("%1:\\").tqarg(drive); #endif } diff --git a/src/common/global/xml_data_file.cpp b/src/common/global/xml_data_file.cpp index bae7f17..528f8e7 100644 --- a/src/common/global/xml_data_file.cpp +++ b/src/common/global/xml_data_file.cpp @@ -26,7 +26,7 @@ bool XmlDataFile::load(TQString &error) Log::StringView sview; PURL::File file(_url, sview); if ( !file.openForRead() ) { - error = i18n("Error opening file: %1").arg(sview.string()); + error = i18n("Error opening file: %1").tqarg(sview.string()); return false; } if ( !_document.setContent(file.qfile(), false, &error) ) return false; @@ -48,7 +48,7 @@ bool XmlDataFile::save(TQString &error) const file.appendText(s); ok = file.close(); } - if ( !ok ) error = i18n("Error saving file: %1").arg(sview.string()); + if ( !ok ) error = i18n("Error saving file: %1").tqarg(sview.string()); return ok; } diff --git a/src/common/gui/container.cpp b/src/common/gui/container.cpp index b5917dc..8a747d3 100644 --- a/src/common/gui/container.cpp +++ b/src/common/gui/container.cpp @@ -55,19 +55,19 @@ void Container::initLayout() setFrame(_type); } -void Container::addWidget(TQWidget *w, uint startRow, uint endRow, uint startCol, uint endCol, int alignment) +void Container::addWidget(TQWidget *w, uint startRow, uint endRow, uint startCol, uint endCol, int tqalignment) { Q_ASSERT( startRow<=endRow ); Q_ASSERT( startCol<=endCol ); w->show(); - _gridLayout->addMultiCellWidget(w, startRow, endRow, startCol, endCol, alignment); + _gridLayout->addMultiCellWidget(w, startRow, endRow, startCol, endCol, tqalignment); } -void Container::addLayout(TQLayout *l, uint startRow, uint endRow, uint startCol, uint endCol, int alignment) +void Container::addLayout(TQLayout *l, uint startRow, uint endRow, uint startCol, uint endCol, int tqalignment) { Q_ASSERT( startRow<=endRow ); Q_ASSERT( startCol<=endCol ); - _gridLayout->addMultiCellLayout(l, startRow, endRow, startCol, endCol, alignment); + _gridLayout->addMultiCellLayout(l, startRow, endRow, startCol, endCol, tqalignment); } //---------------------------------------------------------------------------- diff --git a/src/common/gui/container.h b/src/common/gui/container.h index d377561..af3e5a6 100644 --- a/src/common/gui/container.h +++ b/src/common/gui/container.h @@ -12,7 +12,7 @@ #include <tqframe.h> #include <tqwidgetstack.h> #include <tqtabwidget.h> -#include <layout.h> +#include <tqlayout.h> class PopupButton; @@ -26,8 +26,8 @@ public: Container(TQWidget *parent = 0, Type type = Flat); Container(TQWidgetStack *stack, uint index, Type type = Flat); Container(TQTabWidget *tabw, const TQString &title, Type type = Flat); - void addWidget(TQWidget *widget, uint startRow, uint endRow, uint startCol, uint endCol, int alignment = 0); - void addLayout(TQLayout *layout, uint startRow, uint endRow, uint startCol, uint endCol, int alignment = 0); + void addWidget(TQWidget *widget, uint startRow, uint endRow, uint startCol, uint endCol, int tqalignment = 0); + void addLayout(TQLayout *tqlayout, uint startRow, uint endRow, uint startCol, uint endCol, int tqalignment = 0); uint numRows() const { return _gridLayout->numRows(); } uint numCols() const { return _gridLayout->numCols(); } void setFrame(Type type); diff --git a/src/common/gui/dialog.h b/src/common/gui/dialog.h index a28c607..f506411 100644 --- a/src/common/gui/dialog.h +++ b/src/common/gui/dialog.h @@ -9,7 +9,7 @@ #ifndef DIALOG_H #define DIALOG_H -#include <layout.h> +#include <tqlayout.h> #include <kdialogbase.h> #include <klistview.h> diff --git a/src/common/gui/editlistbox.cpp b/src/common/gui/editlistbox.cpp index ca2c675..b881e0f 100644 --- a/src/common/gui/editlistbox.cpp +++ b/src/common/gui/editlistbox.cpp @@ -53,7 +53,7 @@ void EditListBox::init(uint nbColumns, TQWidget *view) _moveDownButton = 0; _removeAllButton = 0; _resetButton = 0; - setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding)); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding)); TQGridLayout *grid = new TQGridLayout(this, 1, 1, 0, KDialog::spacingHint()); uint row = 0; diff --git a/src/common/gui/editlistbox.h b/src/common/gui/editlistbox.h index 57b156f..53b4294 100644 --- a/src/common/gui/editlistbox.h +++ b/src/common/gui/editlistbox.h @@ -19,7 +19,7 @@ #ifndef EDITLISTBOX_H #define EDITLISTBOX_H -#include <layout.h> +#include <tqlayout.h> #include <klineedit.h> #include <kpushbutton.h> #include <klistview.h> diff --git a/src/common/gui/hexword_gui.cpp b/src/common/gui/hexword_gui.cpp index 3030d65..bf1430c 100644 --- a/src/common/gui/hexword_gui.cpp +++ b/src/common/gui/hexword_gui.cpp @@ -125,12 +125,12 @@ bool GenericHexWordEditor::event(TQEvent *e) return TQLineEdit::event(e); } -TQSize GenericHexWordEditor::sizeHint() const +TQSize GenericHexWordEditor::tqsizeHint() const { return TQSize(maxCharWidth(NumberBase::Hex, font()) * (_nbChars+1), fontMetrics().height()); } -TQSize GenericHexWordEditor::minimumSizeHint() const +TQSize GenericHexWordEditor::tqminimumSizeHint() const { return TQSize(maxCharWidth(NumberBase::Hex, font()) * (_nbChars+1), fontMetrics().height()); } diff --git a/src/common/gui/hexword_gui.h b/src/common/gui/hexword_gui.h index 2be2a75..a973291 100644 --- a/src/common/gui/hexword_gui.h +++ b/src/common/gui/hexword_gui.h @@ -35,8 +35,8 @@ Q_OBJECT TQ_OBJECT public: GenericHexWordEditor(uint nbChars, bool hasBlankValue, TQWidget *parent); - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; signals: void modified(); diff --git a/src/common/gui/key_gui.h b/src/common/gui/key_gui.h index f40c5d2..5afce35 100644 --- a/src/common/gui/key_gui.h +++ b/src/common/gui/key_gui.h @@ -77,7 +77,7 @@ public: ParentType::_widget->clear(); } void fixMinimumWidth() { - ParentType::_widget->setMinimumWidth(ParentType::_widget->sizeHint().width()); + ParentType::_widget->setMinimumWidth(ParentType::_widget->tqsizeHint().width()); } protected: diff --git a/src/common/gui/list_view.cpp b/src/common/gui/list_view.cpp index 1e0cb66..52bd32b 100644 --- a/src/common/gui/list_view.cpp +++ b/src/common/gui/list_view.cpp @@ -62,8 +62,8 @@ bool ListView::eventFilter(TQObject *o, TQEvent *e) break; } case TQEvent::FocusOut: { - //qDebug("focus out %i %i=%i", tqApp->focusWidget(), focusWidget(), (*it)->_editWidgets[i]); - if ( tqApp->focusWidget() && focusWidget()==(*it)->_editWidgets[i] ) break; + //qDebug("focus out %i %i=%i", tqApp->tqfocusWidget(), tqfocusWidget(), (*it)->_editWidgets[i]); + if ( tqApp->tqfocusWidget() && tqfocusWidget()==(*it)->_editWidgets[i] ) break; //qDebug("ext"); TQCustomEvent *e = new TQCustomEvent(9999); TQApplication::postEvent(o, e); @@ -95,7 +95,7 @@ void ListViewToolTip::maybeTip(const TQPoint &p) if ( _listView==0 ) return; const TQListViewItem* item = _listView->itemAt(p); if ( item==0 ) return; - TQRect rect = _listView->itemRect(item); + TQRect rect = _listView->tqitemRect(item); if ( !rect.isValid() ) return; int col = _listView->header()->sectionAt(p.x()); TQString text = _listView->tooltip(*item, col); @@ -149,7 +149,7 @@ void EditListViewItem::startRename() _renaming = true; _editWidgets.resize(lv->columns()); for (uint i=0; i<_editWidgets.count(); i++) { - TQRect r = lv->itemRect(this); + TQRect r = lv->tqitemRect(this); r = TQRect(lv->viewportToContents(r.topLeft()), r.size()); r.setLeft(lv->header()->sectionPos(i)); r.setWidth(lv->header()->sectionSize(i) - 1); @@ -162,7 +162,7 @@ void EditListViewItem::startRename() if ( _editWidgets[i]==0 ) continue; _editWidgets[i]->installEventFilter(lv); lv->addChild(_editWidgets[i], r.x(), r.y()); - uint w = TQMIN(r.width(), _editWidgets[i]->sizeHint().width()); + uint w = TQMIN(r.width(), _editWidgets[i]->tqsizeHint().width()); _editWidgets[i]->resize(w, r.height()); lv->viewport()->setFocusProxy(_editWidgets[i]); _editWidgets[i]->setFocus(); @@ -191,9 +191,9 @@ void EditListViewItem::removeEditBox() void EditListViewItem::editDone(int col, const TQWidget *edit) { - if ( edit->metaObject()->findProperty("text", true)!=-1 ) + if ( edit->tqmetaObject()->findProperty("text", true)!=-1 ) emit listView()->itemRenamed(this, col, edit->property("text").toString()); - else if ( edit->metaObject()->findProperty("currentText", true)!=-1 ) + else if ( edit->tqmetaObject()->findProperty("currentText", true)!=-1 ) emit listView()->itemRenamed(this, col, edit->property("currentText").toString()); } @@ -215,7 +215,7 @@ int EditListViewItem::width(const TQFontMetrics &fm, const TQListView *lv, int c int w = KListViewItem::width(fm, lv, col); TQWidget *edit = editWidgetFactory(col); if ( edit==0 ) return w; - w = TQMAX(w, edit->sizeHint().width()); + w = TQMAX(w, edit->tqsizeHint().width()); delete edit; return w; } diff --git a/src/common/gui/misc_gui.h b/src/common/gui/misc_gui.h index eea2e1f..8c6a2ee 100644 --- a/src/common/gui/misc_gui.h +++ b/src/common/gui/misc_gui.h @@ -9,7 +9,7 @@ #ifndef MISC_GUI_H #define MISC_GUI_H -#include <layout.h> +#include <tqlayout.h> #include <tqsplitter.h> #include <tqvaluevector.h> #include <tqvalidator.h> diff --git a/src/common/gui/pfile_ext.cpp b/src/common/gui/pfile_ext.cpp index 080421f..43f9e81 100644 --- a/src/common/gui/pfile_ext.cpp +++ b/src/common/gui/pfile_ext.cpp @@ -22,7 +22,7 @@ bool PURL::File::openForWrite() _tmp->setAutoDelete(true); if ( _tmp->status()!=0 ) { _error = i18n("Could not create temporary file."); - _log.sorry(_error, i18n("File: %1").arg(_tmp->name())); + _log.sorry(_error, i18n("File: %1").tqarg(_tmp->name())); return false; } return true; @@ -61,7 +61,7 @@ bool PURL::File::openForRead() _file->setName(tmp); if ( !_file->open(IO_ReadOnly) ) { _error = i18n("Could not open temporary file."); - _log.sorry(_error, i18n("File: %1").arg(_file->name())); + _log.sorry(_error, i18n("File: %1").tqarg(_file->name())); return false; } return true; @@ -92,7 +92,7 @@ bool PURL::TempFile::close() _tmp->close(); if ( _tmp->status()!=IO_Ok ) { _error = i18n("Could not write to temporary file."); - _log.sorry(_error, i18n("File: %1").arg(_tmp->name())); + _log.sorry(_error, i18n("File: %1").tqarg(_tmp->name())); return false; } } @@ -107,7 +107,7 @@ bool PURL::TempFile::openForWrite() _tmp->setAutoDelete(true); if ( _tmp->status()!=0 ) { _error = i18n("Could not create temporary file."); - _log.sorry(_error, i18n("File: %1").arg(_tmp->name())); + _log.sorry(_error, i18n("File: %1").tqarg(_tmp->name())); return false; } return true; diff --git a/src/common/gui/purl_gui.cpp b/src/common/gui/purl_gui.cpp index 0299bcb..0284682 100644 --- a/src/common/gui/purl_gui.cpp +++ b/src/common/gui/purl_gui.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "purl_gui.h" -#include <layout.h> +#include <tqlayout.h> #include <kiconloader.h> #include <kpushbutton.h> #include <krun.h> @@ -40,7 +40,7 @@ PURL::Url PURL::getSaveUrl(const TQString &startDir, const TQString &filter, case NoSaveAction: break; case AskOverwrite: if ( url.exists() ) { - if ( !MessageBox::askContinue(i18n("File \"%1\" already exists. Overwrite ?").arg(url.pretty())) ) return Url(); + if ( !MessageBox::askContinue(i18n("File \"%1\" already exists. Overwrite ?").tqarg(url.pretty())) ) return Url(); } break; case CancelIfExists: diff --git a/src/common/nokde/nokde_kaboutdata.cpp b/src/common/nokde/nokde_kaboutdata.cpp index baa986c..6dd8f33 100644 --- a/src/common/nokde/nokde_kaboutdata.cpp +++ b/src/common/nokde/nokde_kaboutdata.cpp @@ -25,7 +25,7 @@ #include "nokde_kaboutdata.h" //#include <kstandarddirs.h> #include <tqfile.h> -#include <textstream.h> +#include <tqtextstream.h> #include <tqstringlist.h> TQString @@ -271,7 +271,7 @@ KAboutData::setProgramLogo(const TQImage& image) TQString KAboutData::version() const { - return TQString::fromLatin1(mVersion); + return TQString::tqfromLatin1(mVersion); } TQString @@ -286,13 +286,13 @@ KAboutData::shortDescription() const TQString KAboutData::homepage() const { - return TQString::fromLatin1(mHomepageAddress); + return TQString::tqfromLatin1(mHomepageAddress); } TQString KAboutData::bugAddress() const { - return TQString::fromLatin1(mBugEmailAddress); + return TQString::tqfromLatin1(mBugEmailAddress); } const TQValueList<KAboutPerson> @@ -434,7 +434,7 @@ KAboutData::license() const } if (!l.isEmpty()) - result += i18n("This program is distributed under the terms of the %1.").arg( l ); + result += i18n("This program is distributed under the terms of the %1.").tqarg( l ); if (!f.isEmpty()) { diff --git a/src/common/nokde/nokde_kcmdlineargs.cpp b/src/common/nokde/nokde_kcmdlineargs.cpp index 42dc5c1..2191049 100644 --- a/src/common/nokde/nokde_kcmdlineargs.cpp +++ b/src/common/nokde/nokde_kcmdlineargs.cpp @@ -518,7 +518,7 @@ KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled, if (ignoreUnknown) return; enable_i18n(); - usage( i18n("Unknown option '%1'.").arg(TQString::fromLocal8Bit(_opt))); + usage( i18n("Unknown option '%1'.").tqarg(TQString::fromLocal8Bit(_opt))); } if ((result & 4) != 0) @@ -534,7 +534,7 @@ KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled, if (ignoreUnknown) return; enable_i18n(); - usage( i18n("Unknown option '%1'.").arg(TQString::fromLocal8Bit(_opt))); + usage( i18n("Unknown option '%1'.").tqarg(TQString::fromLocal8Bit(_opt))); } if (argument.isEmpty()) { @@ -542,7 +542,7 @@ KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled, if (i >= argc) { enable_i18n(); - usage( i18n("'%1' missing.").arg( opt_name)); + usage( i18n("'%1' missing.").tqarg( opt_name)); } argument = argv[i]; } @@ -618,10 +618,10 @@ KCmdLineArgs::parseAllArgs() else if ( (::qstrcmp(option, "version") == 0) || (::qstrcmp(option, "v") == 0)) { - printQ( TQString("TQt: %1\n").arg(qVersion())); -// printQ( TQString("KDE: %1\n").arg(TDE_VERSION_STRING)); + printQ( TQString("TQt: %1\n").tqarg(qVersion())); +// printQ( TQString("KDE: %1\n").tqarg(TDE_VERSION_STRING)); printQ( TQString("%1: %2\n"). - arg(about->programName()).arg(about->version())); + arg(about->programName()).tqarg(about->version())); exit(0); } else if ( (::qstrcmp(option, "license") == 0) ) { @@ -641,17 +641,17 @@ KCmdLineArgs::parseAllArgs() email = " <" + (*it).emailAddress() + ">"; authorlist += TQString(" ") + (*it).name() + email + "\n"; } - printQ( i18n("the 2nd argument is a list of name+address, one on each line","%1 was written by\n%2").arg ( TQString(about->programName()) ).arg( authorlist ) ); + printQ( i18n("the 2nd argument is a list of name+address, one on each line","%1 was written by\n%2").arg ( TQString(about->programName()) ).tqarg( authorlist ) ); } } else { - printQ( i18n("%1 was written by somebody who wants to remain anonymous.").arg(about->programName()) ); + printQ( i18n("%1 was written by somebody who wants to remain anonymous.").tqarg(about->programName()) ); } if (!about->bugAddress().isEmpty()) { if (about->bugAddress() == "submit@bugs.kde.org") printQ( i18n( "Please use http://bugs.kde.org to report bugs, do not mail the authors directly.\n" ) ); else - printQ( i18n( "Please use %1 to report bugs, do not mail the authors directly.\n" ).arg(about->bugAddress()) ); + printQ( i18n( "Please use %1 to report bugs, do not mail the authors directly.\n" ).tqarg(about->bugAddress()) ); } exit(0); } else { @@ -671,7 +671,7 @@ KCmdLineArgs::parseAllArgs() if (ignoreUnknown) continue; enable_i18n(); - usage( i18n("Unexpected argument '%1'.").arg(TQString::fromLocal8Bit(argv[i]))); + usage( i18n("Unexpected argument '%1'.").tqarg(TQString::fromLocal8Bit(argv[i]))); } else { @@ -815,7 +815,7 @@ KCmdLineArgs::usage(const char *id) { if (args->name) { - usage = i18n("[%1-options]").arg(args->name)+" "+usage; + usage = i18n("[%1-options]").tqarg(args->name)+" "+usage; } args = argsList->prev(); } @@ -835,30 +835,30 @@ KCmdLineArgs::usage(const char *id) } } - printQ(i18n("Usage: %1 %2\n").arg(argv[0]).arg(usage)); + printQ(i18n("Usage: %1 %2\n").tqarg(argv[0]).tqarg(usage)); printQ("\n"+about->shortDescription()+"\n"); - printQ(optionHeaderString.arg(i18n("Generic options"))); - printQ(optionFormatString.arg("--help", -25).arg(i18n("Show help about options"))); + printQ(optionHeaderString.tqarg(i18n("Generic options"))); + printQ(optionFormatString.tqarg("--help", -25).tqarg(i18n("Show help about options"))); args = argsList->first(); while(args) { if (args->name && args->id) { - TQString option = TQString("--help-%1").arg(args->id); - TQString desc = i18n("Show %1 specific options").arg(args->name); + TQString option = TQString("--help-%1").tqarg(args->id); + TQString desc = i18n("Show %1 specific options").tqarg(args->name); - printQ(optionFormatString.arg(option, -25).arg(desc)); + printQ(optionFormatString.tqarg(option, -25).tqarg(desc)); } args = argsList->next(); } - printQ(optionFormatString.arg("--help-all",-25).arg(i18n("Show all options"))); - printQ(optionFormatString.arg("--author",-25).arg(i18n("Show author information"))); - printQ(optionFormatString.arg("-v, --version",-25).arg(i18n("Show version information"))); - printQ(optionFormatString.arg("--license",-25).arg(i18n("Show license information"))); - printQ(optionFormatString.arg("--", -25).arg(i18n("End of options"))); + printQ(optionFormatString.tqarg("--help-all",-25).tqarg(i18n("Show all options"))); + printQ(optionFormatString.tqarg("--author",-25).tqarg(i18n("Show author information"))); + printQ(optionFormatString.tqarg("-v, --version",-25).tqarg(i18n("Show version information"))); + printQ(optionFormatString.tqarg("--license",-25).tqarg(i18n("Show license information"))); + printQ(optionFormatString.tqarg("--", -25).tqarg(i18n("End of options"))); args = argsList->first(); // Sets current to 1st. @@ -880,7 +880,7 @@ KCmdLineArgs::usage(const char *id) bool hasOptions = false; TQString optionsHeader; if (args->name) - optionsHeader = optionHeaderString.arg(i18n("%1 options").arg(TQString::fromLatin1(args->name))); + optionsHeader = optionHeaderString.tqarg(i18n("%1 options").tqarg(TQString::tqfromLatin1(args->name))); else optionsHeader = i18n("\nOptions:\n"); @@ -950,8 +950,8 @@ KCmdLineArgs::usage(const char *id) name = name.mid(1); if ((name[0] == '[') && (name[name.length()-1] == ']')) name = name.mid(1, name.length()-2); - printQ(optionFormatString.arg(TQString(name), -25) - .arg(description)); + printQ(optionFormatString.tqarg(TQString(name), -25) + .tqarg(description)); } else { @@ -974,13 +974,13 @@ KCmdLineArgs::usage(const char *id) opt = opt + name; if (!option->def) { - printQ(optionFormatString.arg(TQString(opt), -25) - .arg(description)); + printQ(optionFormatString.tqarg(TQString(opt), -25) + .tqarg(description)); } else { - printQ(optionFormatStringDef.arg(TQString(opt), -25) - .arg(description).arg(option->def)); + printQ(optionFormatStringDef.tqarg(TQString(opt), -25) + .tqarg(description).tqarg(option->def)); } opt = ""; } @@ -989,7 +989,7 @@ KCmdLineArgs::usage(const char *id) it != dl.end(); ++it) { - printQ(optionFormatString.arg("", -25).arg(*it)); + printQ(optionFormatString.tqarg("", -25).tqarg(*it)); } option++; diff --git a/src/common/port/parallel.cpp b/src/common/port/parallel.cpp index 3d92ae0..daa0c6a 100644 --- a/src/common/port/parallel.cpp +++ b/src/common/port/parallel.cpp @@ -59,12 +59,12 @@ TQStringList Port::Parallel::deviceList() TQStringList list; #if defined(HAVE_PPDEV) // standard parport in user space - for(int i = 0; i<8; ++i) list.append(TQString("/dev/parport%1").arg(i)); + for(int i = 0; i<8; ++i) list.append(TQString("/dev/parport%1").tqarg(i)); // new devfs parport flavour - for(int i = 0; i<8; ++i) list.append(TQString("/dev/parports/%1").arg(i)); + for(int i = 0; i<8; ++i) list.append(TQString("/dev/parports/%1").tqarg(i)); #elif defined(HAVE_PPBUS) // FreeBSD - for(int i = 0; i<8; ++i) list.append(TQString("/dev/ppi%1").arg(i)); + for(int i = 0; i<8; ++i) list.append(TQString("/dev/ppi%1").tqarg(i)); #endif return list; } @@ -100,12 +100,12 @@ const Port::Parallel::PPinData Port::Parallel::PIN_DATA[Nb_Pins] = { { Data, 0x20, Out, "D5" }, // data 5 { Data, 0x40, Out, "D6" }, // data 6 { Data, 0x80, Out, "D7" }, // data 7 - { Status, 0x40, In, "/ACK" }, // !ack - { Status, 0x80, In, "BUSY" }, // busy - { Status, 0x20, In, "PAPER" }, // pout - { Status, 0x10, In, "SELin" }, // select + { tqStatus, 0x40, In, "/ACK" }, // !ack + { tqStatus, 0x80, In, "BUSY" }, // busy + { tqStatus, 0x20, In, "PAPER" }, // pout + { tqStatus, 0x10, In, "SELin" }, // select { Control, 0x02, Out, "LF" }, // !feed - { Status, 0x08, In, "/ERROR" }, // !error + { tqStatus, 0x08, In, "/ERROR" }, // !error { Control, 0x04, Out, "PRIME" }, // !init { Control, 0x08, Out, "SELout" }, // !si { Nb_RequestTypes, 0x00, NoIO, "GND" }, // GND @@ -166,17 +166,17 @@ bool Port::Parallel::internalOpen() #if defined(HAVE_PPDEV) _fd = ::open(_device.latin1(), O_RDWR); if ( _fd<0 ) { - setSystemError(i18n("Could not open device \"%1\"").arg(_device)); + setSystemError(i18n("Could not open device \"%1\"").tqarg(_device)); return false; } if ( ioctl(_fd, PPCLAIM)<0 ) { - setSystemError(i18n("Could not claim device \"%1\": check it is read/write enabled").arg(_device)); + setSystemError(i18n("Could not claim device \"%1\": check it is read/write enabled").tqarg(_device)); return false; } #elif defined(HAVE_PPBUS) _fd = ::open(_device.latin1(), O_RDWR); if ( _fd<0 ) { - setSystemError(i18n("Could not open device \"%1\"").arg(_device)); + setSystemError(i18n("Could not open device \"%1\"").tqarg(_device)); return false; } #endif @@ -208,7 +208,7 @@ bool Port::Parallel::setPinOn(uint pin, bool on, LogicType type) int request = REQUEST_DATA[rtype].write; Q_ASSERT( request!=0 ); if ( ioctl(_fd, request, &c)<0 ) { - setSystemError(i18n("Error setting pin %1 to %2").arg(PIN_DATA[pin].label).arg(on)); + setSystemError(i18n("Error setting pin %1 to %2").tqarg(PIN_DATA[pin].label).tqarg(on)); return false; } _images[rtype] = c; @@ -228,7 +228,7 @@ bool Port::Parallel::readPin(uint pin, LogicType type, bool &value) Q_ASSERT( request!=0 ); uchar c = 0; if ( ioctl(_fd, request, &c)<0 ) { - setSystemError(i18n("Error reading bit on pin %1").arg(PIN_DATA[pin].label)); + setSystemError(i18n("Error reading bit on pin %1").tqarg(PIN_DATA[pin].label)); return false; } _images[rtype] = c; @@ -240,7 +240,7 @@ bool Port::Parallel::readPin(uint pin, LogicType type, bool &value) void Port::Parallel::setSystemError(const TQString &message) { #if defined(HAVE_PPDEV) || defined(HAVE_PPBUS) - log(Log::LineType::Error, message + TQString(" (errno=%1).").arg(strerror(errno))); + log(Log::LineType::Error, message + TQString(" (errno=%1).").tqarg(strerror(errno))); #else Q_UNUSED(message); #endif diff --git a/src/common/port/parallel.h b/src/common/port/parallel.h index d25529d..08741e1 100644 --- a/src/common/port/parallel.h +++ b/src/common/port/parallel.h @@ -33,7 +33,7 @@ public: enum Pin { DS = 0, D0, D1, D2, D3, D4, D5, D6, D7, ACK, BUSY, PAPER, SELin, LF, ERROR, PRIME, SELout, P18, P19, P20, P21, P22, P23, P24, P25, Nb_Pins }; - enum RequestType { Control = 0, Status, Data, Nb_RequestTypes }; + enum RequestType { Control = 0, tqStatus, Data, Nb_RequestTypes }; struct PPinData { RequestType rType; uchar mask; diff --git a/src/common/port/port_base.cpp b/src/common/port/port_base.cpp index 63e820e..0112a1b 100644 --- a/src/common/port/port_base.cpp +++ b/src/common/port/port_base.cpp @@ -28,7 +28,7 @@ void Port::Base::close() bool Port::Base::send(const char *data, uint size, uint timeout) { - log(Log::DebugLevel::LowLevel, TQString("Sending: \"%1\"").arg(toPrintable(data, size, PrintAlphaNum))); + log(Log::DebugLevel::LowLevel, TQString("Sending: \"%1\"").tqarg(toPrintable(data, size, PrintAlphaNum))); return internalSend(data, size, timeout); } @@ -45,14 +45,14 @@ bool Port::Base::receive(uint size, TQMemArray<uchar> &a, uint timeout) { a.resize(size); bool ok = internalReceive(size, (char *)a.data(), timeout); - if (ok) log(Log::DebugLevel::LowLevel, TQString("Received: \"%1\"").arg(toPrintable(a, PrintAlphaNum))); + if (ok) log(Log::DebugLevel::LowLevel, TQString("Received: \"%1\"").tqarg(toPrintable(a, PrintAlphaNum))); return ok; } bool Port::Base::receiveChar(char &c, uint timeout) { if ( !internalReceive(1, &c, timeout) ) return false; - log(Log::DebugLevel::LowLevel, TQString("Received: \"%1\"").arg(toPrintable(c, PrintAlphaNum))); + log(Log::DebugLevel::LowLevel, TQString("Received: \"%1\"").tqarg(toPrintable(c, PrintAlphaNum))); return true; } diff --git a/src/common/port/serial.cpp b/src/common/port/serial.cpp index 977f31c..2db84b9 100644 --- a/src/common/port/serial.cpp +++ b/src/common/port/serial.cpp @@ -73,21 +73,21 @@ TQStringList Port::Serial::deviceList() TQStringList list; #if defined(Q_OS_UNIX) // standard serport in user space - for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyS%1").arg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyS%1").tqarg(i)); // new devfs serport flavour - for (uint i=0; i<8; i++) list.append(TQString("/dev/tts/%1").arg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/tts/%1").tqarg(i)); // standard USB serport in user space - for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyUSB%1").arg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyUSB%1").tqarg(i)); // new devfs USB serport flavour - for (uint i=0; i<8; i++) list.append(TQString("/dev/usb/tts/%1").arg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/usb/tts/%1").tqarg(i)); // FreeBSD - for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyd%1").arg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/ttyd%1").tqarg(i)); // Slackware 11 devfs USB Serial port support. - for (uint i=0; i<8; i++) list.append(TQString("/dev/tts/USB%1").arg(i)); + for (uint i=0; i<8; i++) list.append(TQString("/dev/tts/USB%1").tqarg(i)); // MacOSX devfs USB Serial port support. list.append("/dev/tty.usbserial"); #elif defined(Q_OS_WIN) - for (uint i=1; i<10; i++) list.append(TQString("COM%1").arg(i)); + for (uint i=1; i<10; i++) list.append(TQString("COM%1").tqarg(i)); #endif return list; } @@ -187,7 +187,7 @@ bool Port::Serial::internalOpen() { _fd = openHandle(_device, In | Out); if ( _fd==INVALID_HANDLE ) { - setSystemError(i18n("Could not open device \"%1\" read-write").arg(_device)); + setSystemError(i18n("Could not open device \"%1\" read-write").tqarg(_device)); return false; } if ( !getParameters(_oldParameters) ) return false; // save configuration @@ -232,7 +232,7 @@ bool Port::Serial::internalSend(const char *data, uint size, uint timeout) if ( res>0 ) todo -= res; else { if ( uint(time.elapsed())>timeout ) { - log(Log::LineType::Error, i18n("Timeout sending data (%1/%2 bytes sent).").arg(size-todo).arg(size)); + log(Log::LineType::Error, i18n("Timeout sending data (%1/%2 bytes sent).").tqarg(size-todo).tqarg(size)); return false; } msleep(1); @@ -277,7 +277,7 @@ bool Port::Serial::internalReceive(uint size, char *data, uint timeout) if ( res>0 ) todo -= res; else { if ( uint(time.elapsed())>timeout ) { - log(Log::LineType::Error, i18n("Timeout receiving data (%1/%2 bytes received).").arg(size-todo).arg(size)); + log(Log::LineType::Error, i18n("Timeout receiving data (%1/%2 bytes received).").tqarg(size-todo).tqarg(size)); return false; } msleep(1); @@ -303,7 +303,7 @@ bool Port::Serial::drain(uint timeout) if ( nb==0 ) break; if ( uint(time.elapsed())>timeout ) { _fd = INVALID_HANDLE; // otherwise close blocks... - log(Log::LineType::Error, i18n("Timeout sending data (%1 bytes left).").arg(nb)); + log(Log::LineType::Error, i18n("Timeout sending data (%1 bytes left).").tqarg(nb)); return false; } } @@ -364,7 +364,7 @@ bool Port::Serial::setPinOn(uint pin, bool on, LogicType type) Q_ASSERT( pin<Nb_Pins ); Q_ASSERT( PIN_DATA[pin].dir==Out ); if ( !internalSetPinOn(Pin(pin), on) ) { - setSystemError(i18n("Error setting bit %1 of serial port to %2").arg(PIN_DATA[pin].label).arg(on)); + setSystemError(i18n("Error setting bit %1 of serial port to %2").tqarg(PIN_DATA[pin].label).tqarg(on)); return false; } return true; @@ -387,7 +387,7 @@ bool Port::Serial::internalReadPin(Pin pin, LogicType type, bool &value) return true; #elif defined(Q_OS_WIN) DWORD status; - if ( GetCommModemStatus(_fd, &status)==0 ) return false; + if ( GetCommModemtqStatus(_fd, &status)==0 ) return false; switch (pin) { case DCD: value = (status & MS_RLSD_ON); break; case DSR: value = (status & MS_DSR_ON); break; @@ -406,7 +406,7 @@ bool Port::Serial::internalReadPin(Pin pin, LogicType type, bool &value) Q_ASSERT( pin<Nb_Pins ); Q_ASSERT( PIN_DATA[pin].dir==In ); if ( !internalReadPin(Pin(pin), type, value) ) { - setSystemError(i18n("Error reading serial pin %1").arg(PIN_DATA[pin].label)); + setSystemError(i18n("Error reading serial pin %1").tqarg(PIN_DATA[pin].label)); return false; } return true; @@ -513,11 +513,11 @@ bool Port::Serial::setHardwareFlowControl(bool on) void Port::Serial::setSystemError(const TQString &message) { #if defined(Q_OS_UNIX) - log(Log::LineType::Error, message + TQString(" (errno=%1)").arg(strerror(errno))); + log(Log::LineType::Error, message + TQString(" (errno=%1)").tqarg(strerror(errno))); #elif defined(Q_OS_WIN) LPVOID lpMsgBuf; FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&lpMsgBuf, 0, NULL); - log(Log::LineType::Error, message + TQString(" (last error=%1 %2)").arg(GetLastError()).arg((const char *)(LPCTSTR)lpMsgBuf)); + log(Log::LineType::Error, message + TQString(" (last error=%1 %2)").tqarg(GetLastError()).tqarg((const char *)(LPCTSTR)lpMsgBuf)); LocalFree(lpMsgBuf); #endif } diff --git a/src/common/port/usb_port.cpp b/src/common/port/usb_port.cpp index 76fa5b0..80e7de2 100644 --- a/src/common/port/usb_port.cpp +++ b/src/common/port/usb_port.cpp @@ -38,7 +38,7 @@ void Port::USB::initialize() #ifdef HAVE_USB usb_init(); VersionData vd = VersionData::fromString(LIBUSB_VERSION); - TQString s = TQString("libusb %1").arg(vd.pretty()); + TQString s = TQString("libusb %1").tqarg(vd.pretty()); if ( vd<VersionData(0, 1, 8) ) qWarning("%s: may be too old (you need at least version 0.1.8)", s.latin1()); #endif } @@ -132,7 +132,7 @@ TQStringList Port::USB::probedDeviceList() for (struct usb_device *dev=bus->devices; dev; dev=dev->next) { if ( dev->descriptor.idVendor==0 ) continue; // controller list.append(TQString("Vendor Id: %1 - Product Id: %2") - .arg(toLabel(NumberBase::Hex, dev->descriptor.idVendor, 4)).arg(toLabel(NumberBase::Hex, dev->descriptor.idProduct, 4))); + .tqarg(toLabel(NumberBase::Hex, dev->descriptor.idVendor, 4)).tqarg(toLabel(NumberBase::Hex, dev->descriptor.idProduct, 4))); } } #endif @@ -179,7 +179,7 @@ Port::USB::~USB() void Port::USB::setSystemError(const TQString &message) { #ifdef HAVE_USB - log(Log::LineType::Error, message + TQString(" (err=%1).").arg(usb_strerror())); + log(Log::LineType::Error, message + TQString(" (err=%1).").tqarg(usb_strerror())); #else log(Log::LineType::Error, message); #endif @@ -192,7 +192,7 @@ void Port::USB::tryToDetachDriver() log(Log::DebugLevel::Extra, "find if there is already an installed driver"); char dname[256] = ""; if ( usb_get_driver_np(_handle, _interface, dname, 255)<0 ) return; - log(Log::DebugLevel::Normal, TQString(" a driver \"%1\" is already installed...").arg(dname)); + log(Log::DebugLevel::Normal, TQString(" a driver \"%1\" is already installed...").tqarg(dname)); # if defined(LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP) && LIBUSB_HAS_DETACH_KERNEL_DRIVER_NP usb_detach_kernel_driver_np(_handle, _interface); log(Log::DebugLevel::Normal, " try to detach it..."); @@ -208,10 +208,10 @@ bool Port::USB::internalOpen() _device = findDevice(_vendorId, _productId); if ( _device==0 ) { log(Log::LineType::Error, i18n("Could not find USB device (vendor=%1 product=%2).") - .arg(toLabel(NumberBase::Hex, _vendorId, 4)).arg(toLabel(NumberBase::Hex, _productId, 4))); + .tqarg(toLabel(NumberBase::Hex, _vendorId, 4)).tqarg(toLabel(NumberBase::Hex, _productId, 4))); return false; } - log(Log::DebugLevel::Extra, TQString("found USB device as \"%1\" on bus \"%2\"").arg(_device->filename).arg(_device->bus->dirname)); + log(Log::DebugLevel::Extra, TQString("found USB device as \"%1\" on bus \"%2\"").tqarg(_device->filename).tqarg(_device->bus->dirname)); _handle = usb_open(_device); if ( _handle==0 ) { setSystemError(i18n("Error opening USB device.")); @@ -239,11 +239,11 @@ bool Port::USB::internalOpen() uint old = _config; i = 0; _config = _device->config[i].bConfigurationValue; - log(Log::LineType::Warning, i18n("Configuration %1 not present: using %2").arg(old).arg(_config)); + log(Log::LineType::Warning, i18n("Configuration %1 not present: using %2").tqarg(old).tqarg(_config)); } const usb_config_descriptor &configd = _device->config[i]; if ( usb_set_configuration(_handle, _config)<0 ) { - setSystemError(i18n("Error setting USB configuration %1.").arg(_config)); + setSystemError(i18n("Error setting USB configuration %1.").tqarg(_config)); return false; } for (i=0; i<configd.bNumInterfaces; i++) @@ -252,15 +252,15 @@ bool Port::USB::internalOpen() uint old = _interface; i = 0; _interface = configd.interface[i].altsetting[0].bInterfaceNumber; - log(Log::LineType::Warning, i18n("Interface %1 not present: using %2").arg(old).arg(_interface)); + log(Log::LineType::Warning, i18n("Interface %1 not present: using %2").tqarg(old).tqarg(_interface)); } _private->_interface = &(configd.interface[i].altsetting[0]); if ( usb_claim_interface(_handle, _interface)<0 ) { - setSystemError(i18n("Could not claim USB interface %1").arg(_interface)); + setSystemError(i18n("Could not claim USB interface %1").tqarg(_interface)); return false; } - log(Log::DebugLevel::Max, TQString("alternate setting is %1").arg(_private->_interface->bAlternateSetting)); - log(Log::DebugLevel::Max, TQString("USB bcdDevice: %1").arg(toHexLabel(_device->descriptor.bcdDevice, 4))); + log(Log::DebugLevel::Max, TQString("alternate setting is %1").tqarg(_private->_interface->bAlternateSetting)); + log(Log::DebugLevel::Max, TQString("USB bcdDevice: %1").tqarg(toHexLabel(_device->descriptor.bcdDevice, 4))); return true; #else log(Log::LineType::Error, i18n("USB support disabled")); @@ -343,7 +343,7 @@ bool Port::USB::write(uint ep, const char *data, uint size) IODir dir = endpointDir(ep); EndpointMode mode = endpointMode(ep); log(Log::DebugLevel::LowLevel, TQString("write to endpoint %1 (%2 - %3) %4 chars: \"%5\"") - .arg(toHexLabel(ep, 2)).arg(ENDPOINT_MODE_NAMES[mode]).arg(IO_DIR_NAMES[dir]).arg(size).arg(toPrintable(data, size, PrintEscapeAll))); + .tqarg(toHexLabel(ep, 2)).tqarg(ENDPOINT_MODE_NAMES[mode]).tqarg(IO_DIR_NAMES[dir]).tqarg(size).tqarg(toPrintable(data, size, PrintEscapeAll))); Q_ASSERT( dir==Out ); TQTime time; time.start(); @@ -356,8 +356,8 @@ bool Port::USB::write(uint ep, const char *data, uint size) //qDebug("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)); - else log(Log::LineType::Error, i18n("Timeout: only some data sent (%1/%2 bytes).").arg(size-todo).arg(size)); + if ( res<0 ) setSystemError(i18n("Error sending data (ep=%1 res=%2)").tqarg(toHexLabel(ep, 2)).tqarg(res)); + else log(Log::LineType::Error, i18n("Timeout: only some data sent (%1/%2 bytes).").tqarg(size-todo).tqarg(size)); return false; } if ( res==0 ) log(Log::DebugLevel::Normal, i18n("Nothing sent: retrying...")); @@ -377,7 +377,7 @@ bool Port::USB::read(uint ep, char *data, uint size, bool *poll) IODir dir = endpointDir(ep); EndpointMode mode = endpointMode(ep); log(Log::DebugLevel::LowLevel, TQString("read from endpoint %1 (%2 - %3) %4 chars") - .arg(toHexLabel(ep, 2)).arg(ENDPOINT_MODE_NAMES[mode]).arg(IO_DIR_NAMES[dir]).arg(size)); + .tqarg(toHexLabel(ep, 2)).tqarg(ENDPOINT_MODE_NAMES[mode]).tqarg(IO_DIR_NAMES[dir]).tqarg(size)); Q_ASSERT( dir==In ); TQTime time; time.start(); @@ -390,8 +390,8 @@ bool Port::USB::read(uint ep, char *data, uint size, bool *poll) //qDebug("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)); - else log(Log::LineType::Error, i18n("Timeout: only some data received (%1/%2 bytes).").arg(size-todo).arg(size)); + if ( res<0 ) setSystemError(i18n("Error receiving data (ep=%1 res=%2)").tqarg(toHexLabel(ep, 2)).tqarg(res)); + else log(Log::LineType::Error, i18n("Timeout: only some data received (%1/%2 bytes).").tqarg(size-todo).tqarg(size)); return false; } if ( res==0 ) { |