diff options
Diffstat (limited to 'kexi/plugins')
71 files changed, 332 insertions, 332 deletions
diff --git a/kexi/plugins/forms/kexiactionselectiondialog.cpp b/kexi/plugins/forms/kexiactionselectiondialog.cpp index 921432b6..a20dbe21 100644 --- a/kexi/plugins/forms/kexiactionselectiondialog.cpp +++ b/kexi/plugins/forms/kexiactionselectiondialog.cpp @@ -352,12 +352,12 @@ public: msg = TQString(); // hardcoded, but it's not that bad else if (actionType=="macro") - msg = i18n("&Select macro to be executed after clicking \"%1\" button:").tqarg(actionWidgetName); + msg = i18n("&Select macro to be executed after clicking \"%1\" button:").arg(actionWidgetName); else if (actionType=="script") - msg = i18n("&Select script to be executed after clicking \"%1\" button:").tqarg(actionWidgetName); + msg = i18n("&Select script to be executed after clicking \"%1\" button:").arg(actionWidgetName); //default: table/query/form/report... else - msg = i18n("&Select object to be opened after clicking \"%1\" button:").tqarg(actionWidgetName); + msg = i18n("&Select object to be opened after clicking \"%1\" button:").arg(actionWidgetName); selectActionToBeExecutedLbl->setText(msg); } @@ -587,7 +587,7 @@ void KexiActionSelectionDialog::slotActionCategorySelected(TQListViewItem* item) TQVBoxLayout *vlyr = new TQVBoxLayout(d->kactionPageWidget, 0, KDialog::spacingHint()); d->kactionListView = new KActionsListView(d->kactionPageWidget, d->mainWin); d->kactionListView->init(); - TQLabel *lbl = new TQLabel(d->kactionListView, selectActionToBeExecutedMsg.tqarg(d->actionWidgetName), + TQLabel *lbl = new TQLabel(d->kactionListView, selectActionToBeExecutedMsg.arg(d->actionWidgetName), d->kactionPageWidget); lbl->setAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); lbl->setMinimumHeight(lbl->fontMetrics().height()*2); @@ -613,7 +613,7 @@ void KexiActionSelectionDialog::slotActionCategorySelected(TQListViewItem* item) d->currentFormActionsPageWidget, d->mainWin); d->currentFormActionsListView->init(); TQLabel *lbl = new TQLabel(d->currentFormActionsListView, - selectActionToBeExecutedMsg.tqarg(d->actionWidgetName), d->currentFormActionsPageWidget); + selectActionToBeExecutedMsg.arg(d->actionWidgetName), d->currentFormActionsPageWidget); lbl->setAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); lbl->setMinimumHeight(lbl->fontMetrics().height()*2); vlyr->addWidget(lbl); @@ -696,7 +696,7 @@ KexiFormEventAction::ActionData KexiActionSelectionDialog::currentAction() const KexiPart::Info* partInfo = partItem ? Kexi::partManager().infoForMimeType( partItem->mimeType() ) : 0; if (partInfo) { // opening or executing: table:name, query:name, form:name, macro:name, script:name, etc. - data.string = TQString("%1:%2").tqarg(partInfo->objectName()).tqarg(partItem->name()); + data.string = TQString("%1:%2").arg(partInfo->objectName()).arg(partItem->name()); data.option = actionToExecute->data; return data; } diff --git a/kexi/plugins/forms/kexidataprovider.cpp b/kexi/plugins/forms/kexidataprovider.cpp index 8ae592d9..1a6df899 100644 --- a/kexi/plugins/forms/kexidataprovider.cpp +++ b/kexi/plugins/forms/kexidataprovider.cpp @@ -113,7 +113,7 @@ void KexiFormDataProvider::fillDataItems(KexiTableItem& row, bool cursorAtNewRow kexipluginsdbg << "fill data of '" << itemIface->dataSource() << "' at idx=" << it.data() << " data=" << value << (indexForVisibleLookupValue!=-1 ? TQString(" SPECIAL: indexForVisibleLookupValue=%1 visibleValue=%2") - .tqarg(indexForVisibleLookupValue).tqarg(visibleLookupValue.toString()) + .arg(indexForVisibleLookupValue).arg(visibleLookupValue.toString()) : TQString()) << endl; const bool displayDefaultValue = cursorAtNewRow && (value.isNull() && visibleLookupValue.isNull()) diff --git a/kexi/plugins/forms/kexidbfactory.cpp b/kexi/plugins/forms/kexidbfactory.cpp index e882c082..d87b31c5 100644 --- a/kexi/plugins/forms/kexidbfactory.cpp +++ b/kexi/plugins/forms/kexidbfactory.cpp @@ -462,7 +462,7 @@ KexiDBFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDesign //! just inherited StdWidgetFactory::clearWidgetContent() should be called KLineEdit *lineedit = static_cast<KLineEdit*>(w); createEditor(classname, lineedit->text(), lineedit, container, - lineedit->tqgeometry(), lineedit->tqalignment(), true); + lineedit->geometry(), lineedit->alignment(), true); return true; } if(classname == "KexiDBTextEdit") @@ -471,7 +471,7 @@ KexiDBFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDesign //! just inherited StdWidgetFactory::clearWidgetContent() should be called KTextEdit *textedit = static_cast<KTextEdit*>(w); createEditor(classname, textedit->text(), textedit, container, - textedit->tqgeometry(), textedit->tqalignment(), true, true); + textedit->geometry(), textedit->alignment(), true, true); //copy a few properties KTextEdit *ed = dynamic_cast<KTextEdit *>( editor(w) ); ed->setWrapPolicy(textedit->wrapPolicy()); @@ -502,8 +502,8 @@ KexiDBFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDesign else { createEditor(classname, label->text(), label, container, - label->tqgeometry(), label->tqalignment(), - false, label->tqalignment() & TQt::WordBreak /*multiline*/); + label->geometry(), label->alignment(), + false, label->alignment() & TQt::WordBreak /*multiline*/); } return true; } @@ -529,12 +529,12 @@ KexiDBFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDesign if(static_cast<KexiDBAutoField*>(w)->hasAutoCaption()) return false; // caption is auto, abort editing TQLabel *label = static_cast<KexiDBAutoField*>(w)->label(); - createEditor(classname, label->text(), label, container, label->tqgeometry(), label->tqalignment()); + createEditor(classname, label->text(), label, container, label->geometry(), label->alignment()); return true; } else if (classname == "KexiDBCheckBox") { KexiDBCheckBox *cb = static_cast<KexiDBCheckBox*>(w); - TQRect r( cb->tqgeometry() ); + TQRect r( cb->geometry() ); r.setLeft( r.left() + 2 + cb->tqstyle().subRect( TQStyle::SR_CheckBoxIndicator, cb ).width() ); createEditor(classname, cb->text(), cb, container, r, TQt::AlignAuto); return true; @@ -679,7 +679,7 @@ KexiDBFactory::changeText(const TQString &text) changeProperty("caption", text, form); return true; } - //! \todo check field's tqgeometry + //! \todo check field's geometry return false; } @@ -690,7 +690,7 @@ KexiDBFactory::resizeEditor(TQWidget *editor, TQWidget *w, const TQCString &clas //TQPoint p = widget->pos(); if(classname == "KexiDBAutoField") - editor->setGeometry( static_cast<KexiDBAutoField*>(w)->label()->tqgeometry() ); + editor->setGeometry( static_cast<KexiDBAutoField*>(w)->label()->geometry() ); } void diff --git a/kexi/plugins/forms/kexidbtextwidgetinterface.cpp b/kexi/plugins/forms/kexidbtextwidgetinterface.cpp index 3c20510e..68dea85f 100644 --- a/kexi/plugins/forms/kexidbtextwidgetinterface.cpp +++ b/kexi/plugins/forms/kexidbtextwidgetinterface.cpp @@ -43,7 +43,7 @@ void KexiDBTextWidgetInterface::setColumnInfo(KexiDB::QueryColumnInfo* cinfo, TQ } } -void KexiDBTextWidgetInterface::paint( TQFrame *w, TQPainter* p, bool textIsEmpty, int tqalignment, bool hasFocus ) +void KexiDBTextWidgetInterface::paint( TQFrame *w, TQPainter* p, bool textIsEmpty, int alignment, bool hasFocus ) { KexiFormDataItemInterface *dataItemIface = dynamic_cast<KexiFormDataItemInterface*>(w); KexiDB::QueryColumnInfo *columnInfo = dataItemIface ? dataItemIface->columnInfo() : 0; @@ -57,7 +57,7 @@ void KexiDBTextWidgetInterface::paint( TQFrame *w, TQPainter* p, bool textIsEmpt } KexiDisplayUtils::paintAutonumberSign(*m_autonumberDisplayParameters, p, 2 + margin + w->margin(), margin, w->width() - margin*2 -2-2, - w->height() - margin*2 -2, tqalignment, hasFocus); + w->height() - margin*2 -2, alignment, hasFocus); } } } @@ -66,6 +66,6 @@ void KexiDBTextWidgetInterface::event( TQEvent * e, TQWidget *w, bool textIsEmpt { if (e->type()==TQEvent::FocusIn || e->type()==TQEvent::FocusOut) { if (m_autonumberDisplayParameters && textIsEmpty) - w->tqrepaint(); + w->repaint(); } } diff --git a/kexi/plugins/forms/kexidbtextwidgetinterface.h b/kexi/plugins/forms/kexidbtextwidgetinterface.h index 6e0299c0..17382e31 100644 --- a/kexi/plugins/forms/kexidbtextwidgetinterface.h +++ b/kexi/plugins/forms/kexidbtextwidgetinterface.h @@ -40,7 +40,7 @@ class KEXIFORMUTILS_EXPORT KexiDBTextWidgetInterface void setColumnInfo(KexiDB::QueryColumnInfo* cinfo, TQWidget *w); //! Called from paintEvent( TQPaintEvent *pe ) method of the data aware widget. - void paint( TQFrame *w, TQPainter *p, bool textIsEmpty, int tqalignment, bool hasFocus ); + void paint( TQFrame *w, TQPainter *p, bool textIsEmpty, int alignment, bool hasFocus ); //! Called from event( TQEvent * e ) method of the data aware widget. void event( TQEvent * e, TQWidget *w, bool textIsEmpty ); diff --git a/kexi/plugins/forms/kexiformeventhandler.cpp b/kexi/plugins/forms/kexiformeventhandler.cpp index 4e066bd6..55e999db 100644 --- a/kexi/plugins/forms/kexiformeventhandler.cpp +++ b/kexi/plugins/forms/kexiformeventhandler.cpp @@ -56,7 +56,7 @@ KexiPart::Info* KexiFormEventAction::ActionData::decodeString( return 0; KexiPart::Info *info = 0; if (_actionType!="kaction" && _actionType!="currentForm") { - info = Kexi::partManager().infoForMimeType( TQString("kexi/%1").tqarg(_actionType) ); + info = Kexi::partManager().infoForMimeType( TQString("kexi/%1").arg(_actionType) ); if (!info) return 0; } @@ -85,7 +85,7 @@ void KexiFormEventAction::activate() if (!project) return; KexiPart::Part* part = Kexi::partManager().partForMimeType( - TQString("kexi/%1").tqarg(m_actionName) ); + TQString("kexi/%1").arg(m_actionName) ); if (!part) return; KexiPart::Item* item = project->item( part->info(), m_objectName ); diff --git a/kexi/plugins/forms/kexiformmanager.cpp b/kexi/plugins/forms/kexiformmanager.cpp index 9674f4fe..8c0c66e7 100644 --- a/kexi/plugins/forms/kexiformmanager.cpp +++ b/kexi/plugins/forms/kexiformmanager.cpp @@ -112,7 +112,7 @@ void KexiFormManager::setFormDataSource(const TQCString& mime, const TQCString& propValues.insert("dataSource", name); propValues.insert("dataSourceMimeType", mime); KFormDesigner::CommandGroup *group - = new KFormDesigner::CommandGroup(i18n("Set Form's Data Source to \"%1\"").tqarg(name.data()), propertySet()); + = new KFormDesigner::CommandGroup(i18n("Set Form's Data Source to \"%1\"").arg(name.data()), propertySet()); propertySet()->createPropertyCommandsInDesignMode(formWidget, propValues, group, true /*addToActiveForm*/); } diff --git a/kexi/plugins/forms/kexiformpart.cpp b/kexi/plugins/forms/kexiformpart.cpp index 84c50efd..9d8017d8 100644 --- a/kexi/plugins/forms/kexiformpart.cpp +++ b/kexi/plugins/forms/kexiformpart.cpp @@ -277,7 +277,7 @@ KexiFormPart::generateForm(KexiDB::FieldList *list, TQDomDocument &domDoc) TQDomElement lNameProperty = domDoc.createElement("property"); lNameProperty.setAttribute("name", "name"); TQDomElement lType = domDoc.createElement("cstring"); - TQDomText lClassN = domDoc.createTextNode(TQString("l%1").tqarg(list->field(i)->name())); + TQDomText lClassN = domDoc.createTextNode(TQString("l%1").arg(list->field(i)->name())); lType.appendChild(lClassN); lNameProperty.appendChild(lType); lclass.appendChild(lNameProperty); diff --git a/kexi/plugins/forms/kexiformscrollview.cpp b/kexi/plugins/forms/kexiformscrollview.cpp index 790064e2..b4b58f70 100644 --- a/kexi/plugins/forms/kexiformscrollview.cpp +++ b/kexi/plugins/forms/kexiformscrollview.cpp @@ -150,9 +150,9 @@ void KexiFormScrollView::moveToFirstRecordRequested() selectFirstRow(); } -void KexiFormScrollView::clearColumnsInternal(bool tqrepaint) +void KexiFormScrollView::clearColumnsInternal(bool repaint) { - Q_UNUSED( tqrepaint ); + Q_UNUSED( repaint ); //! @todo } @@ -349,7 +349,7 @@ void KexiFormScrollView::slotRowRepaintRequested(KexiTableItem& item) } /*void KexiFormScrollView::slotAboutToDeleteRow(KexiTableItem& item, - KexiDB::ResultInfo* result, bool tqrepaint) + KexiDB::ResultInfo* result, bool repaint) { //! @todo }*/ @@ -359,18 +359,18 @@ void KexiFormScrollView::slotRowRepaintRequested(KexiTableItem& item) //! @todo }*/ -void KexiFormScrollView::slotRowInserted(KexiTableItem *item, bool tqrepaint) +void KexiFormScrollView::slotRowInserted(KexiTableItem *item, bool repaint) { Q_UNUSED( item ); - Q_UNUSED( tqrepaint ); + Q_UNUSED( repaint ); //! @todo } -void KexiFormScrollView::slotRowInserted(KexiTableItem *item, uint row, bool tqrepaint) +void KexiFormScrollView::slotRowInserted(KexiTableItem *item, uint row, bool repaint) { Q_UNUSED( item ); Q_UNUSED( row ); - Q_UNUSED( tqrepaint ); + Q_UNUSED( repaint ); //! @todo } diff --git a/kexi/plugins/forms/kexiformscrollview.h b/kexi/plugins/forms/kexiformscrollview.h index d8326a57..7d2b9867 100644 --- a/kexi/plugins/forms/kexiformscrollview.h +++ b/kexi/plugins/forms/kexiformscrollview.h @@ -162,17 +162,17 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView : virtual void slotRowRepaintRequested(KexiTableItem& item); //! Handles KexiTableViewData::aboutToDeleteRow() signal. Prepares info for slotRowDeleted(). - virtual void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint) - { KexiDataAwareObjectInterface::slotAboutToDeleteRow(item, result, tqrepaint); } + virtual void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint) + { KexiDataAwareObjectInterface::slotAboutToDeleteRow(item, result, repaint); } - //! Handles KexiTableViewData::rowDeleted() signal to tqrepaint when needed. + //! Handles KexiTableViewData::rowDeleted() signal to repaint when needed. virtual void slotRowDeleted() { KexiDataAwareObjectInterface::slotRowDeleted(); } - //! Handles KexiTableViewData::rowInserted() signal to tqrepaint when needed. - virtual void slotRowInserted(KexiTableItem *item, bool tqrepaint); + //! Handles KexiTableViewData::rowInserted() signal to repaint when needed. + virtual void slotRowInserted(KexiTableItem *item, bool repaint); //! Like above, not db-aware version - virtual void slotRowInserted(KexiTableItem *item, uint row, bool tqrepaint); + virtual void slotRowInserted(KexiTableItem *item, uint row, bool repaint); virtual void slotRowsDeleted( const TQValueList<int> & ); @@ -193,7 +193,7 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView : protected: //! Implementation for KexiDataAwareObjectInterface - virtual void clearColumnsInternal(bool tqrepaint); + virtual void clearColumnsInternal(bool repaint); //! Implementation for KexiDataAwareObjectInterface virtual void addHeaderColumn(const TQString& caption, const TQString& description, diff --git a/kexi/plugins/forms/kexiformview.cpp b/kexi/plugins/forms/kexiformview.cpp index 3b7968de..36a64db7 100644 --- a/kexi/plugins/forms/kexiformview.cpp +++ b/kexi/plugins/forms/kexiformview.cpp @@ -350,7 +350,7 @@ void KexiFormView::updateValuesForSubproperties() if (meta) { // Special case: the property value of type enum (set) but is saved as a string list, // not as int, so we need to translate it to int. It's been created as such - // by FormIO::readPropertyValue(). Example: "tqalignment" property. + // by FormIO::readPropertyValue(). Example: "alignment" property. if (meta->isSetType() && subpropIt.data().type()==TQVariant::StringList) { TQStrList keys; const TQStringList list( subpropIt.data().toStringList() ); @@ -1115,7 +1115,7 @@ KexiFormView::insertAutoFields(const TQString& sourceMimeType, const TQString& s // KFormDesigner::WidgetList* prevSelection = form()->selectedWidgets(); KFormDesigner::WidgetList widgetsToSelect; KFormDesigner::CommandGroup *group = new KFormDesigner::CommandGroup( - fields.count()==1 ? i18n("Insert AutoField widget") : i18n("Insert %1 AutoField widgets").tqarg(fields.count()), + fields.count()==1 ? i18n("Insert AutoField widget") : i18n("Insert %1 AutoField widgets").arg(fields.count()), KFormDesigner::FormManager::self()->propertySet() ); @@ -1191,10 +1191,10 @@ KexiFormView::insertAutoFields(const TQString& sourceMimeType, const TQString& s } if (widgetsToSelect.last()) { //resize form if needed - TQRect oldFormRect( m_dbform->tqgeometry() ); + TQRect oldFormRect( m_dbform->geometry() ); TQRect newFormRect( oldFormRect ); - newFormRect.setWidth(TQMAX(m_dbform->width(), widgetsToSelect.last()->tqgeometry().right()+1)); - newFormRect.setHeight(TQMAX(m_dbform->height(), widgetsToSelect.last()->tqgeometry().bottom()+1)); + newFormRect.setWidth(TQMAX(m_dbform->width(), widgetsToSelect.last()->geometry().right()+1)); + newFormRect.setHeight(TQMAX(m_dbform->height(), widgetsToSelect.last()->geometry().bottom()+1)); if (newFormRect != oldFormRect) { //1. resize by hand m_dbform->setGeometry( newFormRect ); @@ -1205,8 +1205,8 @@ KexiFormView::insertAutoFields(const TQString& sourceMimeType, const TQString& s group->addCommand(resizeFormCommand, true/*will be executed on CommandGroup::execute()*/); } - //remember tqgeometry of the last inserted widget - m_widgetGeometryForRecentInsertAutoFields = widgetsToSelect.last()->tqgeometry(); + //remember geometry of the last inserted widget + m_widgetGeometryForRecentInsertAutoFields = widgetsToSelect.last()->geometry(); } //eventually, add entire command group to active form @@ -1217,11 +1217,11 @@ KexiFormView::insertAutoFields(const TQString& sourceMimeType, const TQString& s //enable proper REDO usage group->resetAllowExecuteFlags(); - m_scrollView->tqrepaint(); - m_scrollView->viewport()->tqrepaint(); + m_scrollView->repaint(); + m_scrollView->viewport()->repaint(); m_scrollView->repaintContents(); m_scrollView->updateContents(); - m_scrollView->clipper()->tqrepaint(); + m_scrollView->clipper()->repaint(); m_scrollView->refreshContentsSize(); //select all inserted widgets, if multiple diff --git a/kexi/plugins/forms/kexiformview.h b/kexi/plugins/forms/kexiformview.h index 8bc1cb79..f269abf7 100644 --- a/kexi/plugins/forms/kexiformview.h +++ b/kexi/plugins/forms/kexiformview.h @@ -218,7 +218,7 @@ class KEXIFORMUTILS_EXPORT KexiFormView : public KexiDataAwareView TQGuardedPtr<TQWidget> m_setFocusInternalOnce; - /*! Stores tqgeometry of widget recently inserted using insertAutoFields() method. + /*! Stores geometry of widget recently inserted using insertAutoFields() method. having this information, we'r eable to compute position for a newly inserted widget in insertAutoFields() is such position has not been specified. (the position is specified when a widget is inserted with mouse drag & dropping diff --git a/kexi/plugins/forms/widgets/kexidbautofield.cpp b/kexi/plugins/forms/widgets/kexidbautofield.cpp index 939d9b91..3a8e8453 100644 --- a/kexi/plugins/forms/widgets/kexidbautofield.cpp +++ b/kexi/plugins/forms/widgets/kexidbautofield.cpp @@ -232,7 +232,7 @@ KexiDBAutoField::setLabelPosition(LabelPosition position) m_subwidget->show(); //! \todo support right-to-left tqlayout where positions are inverted if (position==Top || position==Left) { - int align = d->label->tqalignment(); + int align = d->label->alignment(); if(position == Top) { d->tqlayout = (TQBoxLayout*) new TQVBoxLayout(this); align |= AlignVertical_Mask; diff --git a/kexi/plugins/forms/widgets/kexidbcombobox.cpp b/kexi/plugins/forms/widgets/kexidbcombobox.cpp index 231003cf..db56b550 100644 --- a/kexi/plugins/forms/widgets/kexidbcombobox.cpp +++ b/kexi/plugins/forms/widgets/kexidbcombobox.cpp @@ -62,7 +62,7 @@ class KexiDBComboBox::Private TQSize sizeHint; //!< A cache for KexiDBComboBox::sizeHint(), //!< rebuilt by KexiDBComboBox::fontChange() and KexiDBComboBox::styleChange() KexiDB::QueryColumnInfo* visibleColumnInfo; - TQPtrDict<char> *subWidgetsWithDisabledEvents; //! used to collect subwidget and its tqchildren (if isEditable is false) + TQPtrDict<char> *subWidgetsWithDisabledEvents; //! used to collect subwidget and its children (if isEditable is false) bool isEditable : 1; //!< true is the combo box is editable bool buttonPressed : 1; bool mouseOver : 1; @@ -259,7 +259,7 @@ bool KexiDBComboBox::handleMousePressEvent(TQMouseEvent *e) if ( arrowRect.contains( e->pos() ) ) { d->arrowPressed = TRUE; d->arrowDown = TRUE; - tqrepaint( FALSE ); + repaint( FALSE ); } } else {*/ showPopup(); diff --git a/kexi/plugins/forms/widgets/kexidbcombobox.h b/kexi/plugins/forms/widgets/kexidbcombobox.h index dec6da1d..60ed78d1 100644 --- a/kexi/plugins/forms/widgets/kexidbcombobox.h +++ b/kexi/plugins/forms/widgets/kexidbcombobox.h @@ -111,7 +111,7 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox : virtual bool eventFilter( TQObject *o, TQEvent *e ); - //! \return internal editor's tqgeometry + //! \return internal editor's geometry TQRect editorGeometry() const; //! Creates editor. Reimplemented, because if the combo box is not editable, diff --git a/kexi/plugins/forms/widgets/kexidbform.cpp b/kexi/plugins/forms/widgets/kexidbform.cpp index bcf28a58..17242953 100644 --- a/kexi/plugins/forms/widgets/kexidbform.cpp +++ b/kexi/plugins/forms/widgets/kexidbform.cpp @@ -125,13 +125,13 @@ KexiDBForm::~KexiDBForm() KexiDataAwareObjectInterface* KexiDBForm::dataAwareObject() const { return d->dataAwareObject; } -//tqrepaint all tqchildren widgets +//repaint all children widgets static void repaintAll(TQWidget *w) { TQObjectList *list = w->queryList(TQWIDGET_OBJECT_NAME_STRING); TQObjectListIt it(*list); for (TQObject *obj; (obj=it.current()); ++it ) { - TQT_TQWIDGET(obj)->tqrepaint(); + TQT_TQWIDGET(obj)->repaint(); } delete list; } @@ -148,7 +148,7 @@ void KexiDBForm::drawRects(const TQValueList<TQRect> &list, int type) { TQPainter p; - p.tqbegin(TQT_TQPAINTDEVICE(this), true); + p.begin(TQT_TQPAINTDEVICE(this), true); bool unclipped = testWFlags( WPaintUnclipped ); setWFlags( WPaintUnclipped ); @@ -192,7 +192,7 @@ void KexiDBForm::clearForm() { TQPainter p; - p.tqbegin(TQT_TQPAINTDEVICE(this), true); + p.begin(TQT_TQPAINTDEVICE(this), true); bool unclipped = testWFlags( WPaintUnclipped ); setWFlags( WPaintUnclipped ); @@ -216,7 +216,7 @@ KexiDBForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &poi toPoint = to->parentWidget()->mapTo(this, to->pos()); TQPainter p; - p.tqbegin(TQT_TQPAINTDEVICE(this), true); + p.begin(TQT_TQPAINTDEVICE(this), true); bool unclipped = testWFlags( WPaintUnclipped ); setWFlags( WPaintUnclipped ); @@ -234,7 +234,7 @@ KexiDBForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &poi TQPixmap pix2 = TQPixmap::grabWidget(to); if((from != this) && (to != this)) - p.drawLine( from->parentWidget()->mapTo(this, from->tqgeometry().center()), to->parentWidget()->mapTo(this, to->tqgeometry().center()) ); + p.drawLine( from->parentWidget()->mapTo(this, from->geometry().center()), to->parentWidget()->mapTo(this, to->geometry().center()) ); p.drawPixmap(fromPoint.x(), fromPoint.y(), pix1); p.drawPixmap(toPoint.x(), toPoint.y(), pix2); @@ -313,18 +313,18 @@ void KexiDBForm::updateTabStopsOrder(KFormDesigner::Form* form) if (it.current()->widget()->focusPolicy() & TQ_TabFocus) { //this widget has tab focus: it.current()->widget()->installEventFilter(this); - //also filter events for data-aware tqchildren of this widget (i.e. KexiDBAutoField's editors) - TQObjectList *tqchildren = it.current()->widget()->queryList(TQWIDGET_OBJECT_NAME_STRING); - for (TQObjectListIt tqchildrenIt(*tqchildren); tqchildrenIt.current(); ++tqchildrenIt) { - // if (dynamic_cast<KexiFormDataItemInterface*>(tqchildrenIt.current())) { + //also filter events for data-aware children of this widget (i.e. KexiDBAutoField's editors) + TQObjectList *children = it.current()->widget()->queryList(TQWIDGET_OBJECT_NAME_STRING); + for (TQObjectListIt childrenIt(*children); childrenIt.current(); ++childrenIt) { + // if (dynamic_cast<KexiFormDataItemInterface*>(childrenIt.current())) { kexipluginsdbg << "KexiDBForm::updateTabStopsOrder(): also adding '" - << tqchildrenIt.current()->className() << " " << tqchildrenIt.current()->name() + << childrenIt.current()->className() << " " << childrenIt.current()->name() << "' child to filtered widgets" << endl; - //it.current()->widget()->installEventFilter(TQT_TQWIDGET(tqchildrenIt.current())); - tqchildrenIt.current()->installEventFilter(this); + //it.current()->widget()->installEventFilter(TQT_TQWIDGET(childrenIt.current())); + childrenIt.current()->installEventFilter(this); // } } - delete tqchildren; + delete children; if (fromWidget) { kexipluginsdbg << "KexiDBForm::updateTabStopsOrder() tab order: " << fromWidget->name() << " -> " << it.current()->widget()->name() << endl; diff --git a/kexi/plugins/forms/widgets/kexidbimagebox.cpp b/kexi/plugins/forms/widgets/kexidbimagebox.cpp index 3ff18406..5b8b2939 100644 --- a/kexi/plugins/forms/widgets/kexidbimagebox.cpp +++ b/kexi/plugins/forms/widgets/kexidbimagebox.cpp @@ -67,7 +67,7 @@ static TQPixmap* KexiDBImageBox_pmSmall = 0; KexiDBImageBox::KexiDBImageBox( bool designMode, TQWidget *parent, const char *name ) : KexiFrame( parent, name, TQt::WNoAutoErase ) , KexiFormDataItemInterface() - , m_tqalignment(TQt::AlignAuto|TQt::AlignTop) + , m_alignment(TQt::AlignAuto|TQt::AlignTop) , m_designMode(designMode) , m_readOnly(false) , m_scaledContents(false) @@ -176,7 +176,7 @@ void KexiDBImageBox::setValueInternal( const TQVariant& add, bool removeOld, boo m_valueMimeType = TQString(); m_pixmap = TQPixmap(); } - tqrepaint(); + repaint(); } void KexiDBImageBox::setInvalidState( const TQString& displayText ) @@ -242,7 +242,7 @@ void KexiDBImageBox::setPixmapId(uint id) if (m_insideSetData) //avoid recursion return; setData(KexiBLOBBuffer::self()->objectForId( id, /*unstored*/false )); - tqrepaint(); + repaint(); } uint KexiDBImageBox::storedPixmapId() const @@ -257,7 +257,7 @@ uint KexiDBImageBox::storedPixmapId() const void KexiDBImageBox::setStoredPixmapId(uint id) { setData(KexiBLOBBuffer::self()->objectForId( id, /*stored*/true )); - tqrepaint(); + repaint(); } bool KexiDBImageBox::hasScaledContents() const @@ -276,14 +276,14 @@ void KexiDBImageBox::setScaledContents(bool set) { //todo m_pixmapLabel->setScaledContents(set); m_scaledContents = set; - tqrepaint(); + repaint(); } void KexiDBImageBox::setKeepAspectRatio(bool set) { m_keepAspectRatio = set; if (m_scaledContents) - tqrepaint(); + repaint(); } TQWidget* KexiDBImageBox::widget() @@ -331,7 +331,7 @@ void KexiDBImageBox::handleInsertFromFileAction(const KURL& url) if (!h) return; setData(h); - tqrepaint(); + repaint(); } else { //db-aware @@ -429,7 +429,7 @@ void KexiDBImageBox::handlePasteAction() } } - tqrepaint(); + repaint(); if (!dataSource().isEmpty()) { // emit pixmapChanged(); signalValueChanged(); @@ -455,7 +455,7 @@ void KexiDBImageBox::clear() //! @todo emit signal for setting "dirty" flag within the design // m_pixmap = TQPixmap(); //will be loaded on demand - tqrepaint(); + repaint(); if (!dataSource().isEmpty()) { // emit pixmapChanged();//valueChanged(data()); signalValueChanged(); @@ -573,7 +573,7 @@ void KexiDBImageBox::updateActionStrings() (see doc/dev/settings.txt) */ beautifiedImageBoxName = beautifiedImageBoxName[0].upper() + beautifiedImageBoxName.mid(1); } - TQToolTip::add(m_chooser, i18n("Click to show actions for \"%1\" image box").tqarg(beautifiedImageBoxName)); + TQToolTip::add(m_chooser, i18n("Click to show actions for \"%1\" image box").arg(beautifiedImageBoxName)); } } } @@ -640,7 +640,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe ) if (m_designMode && pixmap().isNull()) { TQPixmap pm(size()-TQSize(m, m)); TQPainter p2; - p2.tqbegin(TQT_TQPAINTDEVICE(&pm), this); + p2.begin(TQT_TQPAINTDEVICE(&pm), this); p2.fillRect(0,0,width(),height(), bg); updatePixmap(); @@ -678,7 +678,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe ) //clearing needed here because we may need to draw a pixmap with transparency p.fillRect(0,0,width(),height(), bg); - KexiUtils::drawPixmap( p, m, TQRect(TQPoint(0,0), internalSize), pixmap(), m_tqalignment, + KexiUtils::drawPixmap( p, m, TQRect(TQPoint(0,0), internalSize), pixmap(), m_alignment, m_scaledContents, m_keepAspectRatio ); } KexiFrame::drawFrame( &p ); @@ -697,7 +697,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe ) if (oldPalette.active().background()!=palette().active().background()) { delete KexiDBImageBox_pm; KexiDBImageBox_pm = 0; - tqrepaint(); + repaint(); } }*/ @@ -715,11 +715,11 @@ void KexiDBImageBox::updatePixmap() } } -void KexiDBImageBox::setAlignment(int tqalignment) +void KexiDBImageBox::setAlignment(int alignment) { - m_tqalignment = tqalignment; + m_alignment = alignment; if (!m_scaledContents || m_keepAspectRatio) - tqrepaint(); + repaint(); } void KexiDBImageBox::setData(const KexiBLOBBuffer::Handle& handle) @@ -839,7 +839,7 @@ bool KexiDBImageBox::eventFilter( TQObject * watched, TQEvent * e ) { if (TQT_BASE_OBJECT(watched)==TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(watched)==TQT_BASE_OBJECT(m_chooser)) { //we're watching chooser as well because it's a focus proxy even if invisible if (e->type()==TQEvent::FocusIn || e->type()==TQEvent::FocusOut || e->type()==TQEvent::MouseButtonPress) { - update(); //to tqrepaint focus rect + update(); //to repaint focus rect } } // hide popup menu as soon as it loses focus diff --git a/kexi/plugins/forms/widgets/kexidbimagebox.h b/kexi/plugins/forms/widgets/kexidbimagebox.h index a7adb3c8..860ee4c6 100644 --- a/kexi/plugins/forms/widgets/kexidbimagebox.h +++ b/kexi/plugins/forms/widgets/kexidbimagebox.h @@ -48,7 +48,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox : TQ_PROPERTY( uint storedPixmapId READ storedPixmapId WRITE setStoredPixmapId DESIGNABLE false STORED true ) TQ_PROPERTY( bool scaledContents READ hasScaledContents WRITE setScaledContents ) TQ_PROPERTY( bool keepAspectRatio READ keepAspectRatio WRITE setKeepAspectRatio ) - TQ_PROPERTY( int tqalignment READ tqalignment WRITE setAlignment ) + TQ_PROPERTY( int alignment READ alignment WRITE setAlignment ) // TQ_PROPERTY( TQString originalFileName READ originalFileName WRITE setOriginalFileName DESIGNABLE false ) // TQ_OVERRIDE( FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy ) TQ_PROPERTY( bool dropDownButtonVisible READ dropDownButtonVisible WRITE setDropDownButtonVisible ) @@ -95,7 +95,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox : // bool designMode() const { return m_designMode; } - int tqalignment() const { return m_tqalignment; } + int alignment() const { return m_alignment; } bool keepAspectRatio() const { return m_keepAspectRatio; } @@ -158,7 +158,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox : void setScaledContents(bool set); - void setAlignment(int tqalignment); + void setAlignment(int alignment); void setKeepAspectRatio(bool set); @@ -258,7 +258,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox : //moved KAction *m_insertFromFileAction, *m_saveAsAction, *m_cutAction, *m_copyAction, *m_pasteAction, // *m_deleteAction, *m_propertiesAction; // TQTimer m_clickTimer; - int m_tqalignment; + int m_alignment; TQ_FocusPolicy m_focusPolicyInternal; //!< Used for focusPolicyInternal() bool m_designMode : 1; bool m_readOnly : 1; diff --git a/kexi/plugins/forms/widgets/kexidblabel.cpp b/kexi/plugins/forms/widgets/kexidblabel.cpp index 2f653f00..adb833fa 100644 --- a/kexi/plugins/forms/widgets/kexidblabel.cpp +++ b/kexi/plugins/forms/widgets/kexidblabel.cpp @@ -63,7 +63,7 @@ KexiDBInternalLabel::KexiDBInternalLabel( KexiDBLabel* parent ) : TQLabel( parent ) , m_parentLabel(parent) { - int a = tqalignment() | TQt::WordBreak; + int a = alignment() | TQt::WordBreak; a &= (0xffffff ^ TQt::AlignVertical_Mask); a |= TQt::AlignTop; setAlignment( a ); @@ -426,7 +426,7 @@ void KexiDBLabel::init() d->internalLabel->hide(); d->frameColor = tqpalette().active().foreground(); - setAlignment( d->internalLabel->tqalignment() ); + setAlignment( d->internalLabel->alignment() ); } void KexiDBLabel::updatePixmapLater() { @@ -453,7 +453,7 @@ void KexiDBLabel::updatePixmap() { d->internalLabel->setText( text() ); d->internalLabel->setFixedSize( size() ); d->internalLabel->setPalette( palette() ); - d->internalLabel->setAlignment( tqalignment() ); + d->internalLabel->setAlignment( alignment() ); // d->shadowPixmap = KPixmap(); //parallel repaints won't hurt us cause incomplete pixmap KPixmap shadowPixmap = d->internalLabel->getShadowPixmap(); if (shadowPixmap.isNull()) @@ -461,7 +461,7 @@ void KexiDBLabel::updatePixmap() { d->shadowPixmap = shadowPixmap; d->shadowPosition = d->internalLabel->m_shadowRect.topLeft(); d->pixmapDirty = false; - tqrepaint(); + repaint(); } void KexiDBLabel::paintEvent( TQPaintEvent* e ) @@ -491,7 +491,7 @@ void KexiDBLabel::paintEvent( TQPaintEvent* e ) p.drawPixmap( d->internalLabel->m_shadowRect.topLeft(), d->shadowPixmap, clipRect ); } } - KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), false ); + KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), false ); TQLabel::paintEvent( e ); } @@ -577,7 +577,7 @@ void KexiDBLabel::setShadowEnabled( bool state ) { d->pixmapDirty = true; if (state) d->internalLabel->updateFrame(); - tqrepaint(); + repaint(); } void KexiDBLabel::resizeEvent( TQResizeEvent* e ) { @@ -636,7 +636,7 @@ void KexiDBLabel::setText( const TQString& text ) { TQLabel::setText( text ); //This is necessary for KexiFormDataItemInterface valueChanged(); - tqrepaint(); + repaint(); } bool KexiDBLabel::shadowEnabled() const diff --git a/kexi/plugins/forms/widgets/kexidblineedit.cpp b/kexi/plugins/forms/widgets/kexidblineedit.cpp index 5bb74e22..815adca9 100644 --- a/kexi/plugins/forms/widgets/kexidblineedit.cpp +++ b/kexi/plugins/forms/widgets/kexidblineedit.cpp @@ -331,14 +331,14 @@ void KexiDBLineEdit::setColumnInfo(KexiDB::QueryColumnInfo* cinfo) /*todo void KexiDBLineEdit::paint( TQPainter *p ) { - KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), hasFocus() ); + KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), hasFocus() ); }*/ void KexiDBLineEdit::paintEvent ( TQPaintEvent *pe ) { KLineEdit::paintEvent( pe ); TQPainter p(this); - KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), hasFocus() ); + KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), hasFocus() ); } bool KexiDBLineEdit::event( TQEvent * e ) diff --git a/kexi/plugins/forms/widgets/kexidbtextedit.cpp b/kexi/plugins/forms/widgets/kexidbtextedit.cpp index c4cbe4d0..b6ab6b03 100644 --- a/kexi/plugins/forms/widgets/kexidbtextedit.cpp +++ b/kexi/plugins/forms/widgets/kexidbtextedit.cpp @@ -145,7 +145,7 @@ void KexiDBTextEdit::paintEvent ( TQPaintEvent *pe ) { KTextEdit::paintEvent( pe ); TQPainter p(this); - KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), hasFocus() ); + KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), hasFocus() ); } TQPopupMenu * KexiDBTextEdit::createPopupMenu(const TQPoint & pos) diff --git a/kexi/plugins/forms/widgets/kexiframe.h b/kexi/plugins/forms/widgets/kexiframe.h index 2f6ca562..ce51766c 100644 --- a/kexi/plugins/forms/widgets/kexiframe.h +++ b/kexi/plugins/forms/widgets/kexiframe.h @@ -53,7 +53,7 @@ class KEXIFORMUTILS_EXPORT KexiFrame : public TQFrame GroupBoxPanel = TQFrame::GroupBoxPanel //!< rectangular group-box-like panel depending on the GUI style }; Shape frameShape() const; - void setFrameShape( KexiFrame::Shape tqshape ); + void setFrameShape( KexiFrame::Shape shape ); Shadow frameShadow() const; void setFrameShadow( KexiFrame::Shadow shadow ); #endif diff --git a/kexi/plugins/forms/widgets/kexiframeutils_p.cpp b/kexi/plugins/forms/widgets/kexiframeutils_p.cpp index 7adfbaa8..22a71001 100644 --- a/kexi/plugins/forms/widgets/kexiframeutils_p.cpp +++ b/kexi/plugins/forms/widgets/kexiframeutils_p.cpp @@ -69,9 +69,9 @@ ClassName::Shape ClassName::frameShape() const return d->frameShape; } -void ClassName::setFrameShape( ClassName::Shape tqshape ) +void ClassName::setFrameShape( ClassName::Shape shape ) { - d->frameShape = tqshape; + d->frameShape = shape; update(); } diff --git a/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp b/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp index e89f6a65..94642d38 100644 --- a/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp +++ b/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp @@ -255,9 +255,9 @@ void KexiCSVExportWizard::showPage ( TQWidget * page ) int columns = KexiDB::fieldCount(*m_tableOrQuery); text += "\n"; if (m_rowCount>0) - text += i18n("(rows: %1, columns: %2)").tqarg(m_rowCount).tqarg(columns); + text += i18n("(rows: %1, columns: %2)").arg(m_rowCount).arg(columns); else - text += i18n("(columns: %1)").tqarg(columns); + text += i18n("(columns: %1)").arg(columns); m_infoLblFrom->setLabelText(text); TQFontMetrics fm(m_infoLblFrom->fileNameLabel()->font()); m_infoLblFrom->fileNameLabel()->setFixedHeight( fm.height() * 2 + fm.lineSpacing() ); diff --git a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp index 5dd04ed9..69942a79 100644 --- a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp +++ b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp @@ -352,7 +352,7 @@ if ( m_mode == Clipboard ) if (m_mode == File) { m_loadingProgressDlg = new KProgressDialog( this, "m_loadingProgressDlg", i18n("Loading CSV Data"), i18n("Loading CSV Data from \"%1\"...") - .tqarg(TQDir::convertSeparators(m_fname)), true); + .arg(TQDir::convertSeparators(m_fname)), true); m_loadingProgressDlg->progressBar()->setTotalSteps( m_maximumRowsForPreview+1 ); m_loadingProgressDlg->show(); } @@ -440,7 +440,7 @@ bool KexiCSVImportDialog::openData() delete m_file; m_file = 0; KMessageBox::sorry( this, i18n("Cannot open input file <nobr>\"%1\"</nobr>.") - .tqarg(TQDir::convertSeparators(m_fname)) ); + .arg(TQDir::convertSeparators(m_fname)) ); actionButton( Ok )->setEnabled( false ); m_cancelled = true; if (parentWidget()) @@ -458,7 +458,7 @@ bool KexiCSVImportDialog::cancelled() const void KexiCSVImportDialog::fillTable() { KexiUtils::WaitCursor wc(true); - tqrepaint(); + repaint(); m_blockUserEvents = true; TQPushButton *pb = actionButton(KDialogBase::Cancel); if (pb) @@ -530,16 +530,16 @@ void KexiCSVImportDialog::fillTable() m_startAtLineSpinBox->setMaxValue(count); m_startAtLineSpinBox->setValue(m_startline+1); } - m_startAtLineLabel->setText(i18n( "Start at line%1:").tqarg( - m_allRowsLoadedInPreview ? TQString(" (1-%1)").tqarg(count) + m_startAtLineLabel->setText(i18n( "Start at line%1:").arg( + m_allRowsLoadedInPreview ? TQString(" (1-%1)").arg(count) : TQString() //we do not know what's real count )); updateRowCountInfo(); m_blockUserEvents = false; - tqrepaint(); - m_table->verticalScrollBar()->tqrepaint();//avoid missing tqrepaint - m_table->horizontalScrollBar()->tqrepaint();//avoid missing tqrepaint + repaint(); + m_table->verticalScrollBar()->repaint();//avoid missing repaint + m_table->horizontalScrollBar()->repaint();//avoid missing repaint } TQString KexiCSVImportDialog::detectDelimiterByLookingAtFirstBytesOfFile(TQTextStream& inputStream) @@ -548,7 +548,7 @@ TQString KexiCSVImportDialog::detectDelimiterByLookingAtFirstBytesOfFile(TQTextS // try to detect delimiter // \t has priority, then ; then , - const TQIODevice::Offset origOffset = inputStream.tqdevice()->at(); + const TQIODevice::Offset origOffset = inputStream.device()->at(); TQChar c, prevChar=0; int detectedDelimiter = 0; bool insideQuote = false; @@ -601,7 +601,7 @@ TQString KexiCSVImportDialog::detectDelimiterByLookingAtFirstBytesOfFile(TQTextS prevChar = c; } - inputStream.tqdevice()->at(origOffset); //restore orig. offset + inputStream.device()->at(origOffset); //restore orig. offset //now, try to find a delimiter character that exists the same number of times in all the checked lines //this detection method has priority over others @@ -882,7 +882,7 @@ tristate KexiCSVImportDialog::loadRows(TQString &field, int &row, int &column, i m_1stRowForFieldNames->setChecked(true); //this will reload table //slot1stRowForFieldNamesChanged(1); m_blockUserEvents = false; - tqrepaint(); + repaint(); return false; } @@ -926,7 +926,7 @@ void KexiCSVImportDialog::updateColumnText(int col) if (col<(int)m_columnNames.count() && (m_1stRowForFieldNames->isChecked() || m_changedColumnNames[col])) colName = m_columnNames[ col ]; if (colName.isEmpty()) { - colName = i18n("Column %1").tqarg(col+1); //will be changed to a valid identifier on import + colName = i18n("Column %1").arg(col+1); //will be changed to a valid identifier on import m_changedColumnNames[ col ] = false; } int detectedType = m_detectedTypes[col]; @@ -937,7 +937,7 @@ void KexiCSVImportDialog::updateColumnText(int col) detectedType=_TEXT_TYPE; } m_table->horizontalHeader()->setLabel(col, - i18n("Column %1").tqarg(col+1) + " \n(" + m_typeNames[ detectedType ] + ") "); + i18n("Column %1").arg(col+1) + " \n(" + m_typeNames[ detectedType ] + ") "); m_table->setText(0, col, colName); m_table->horizontalHeader()->adjustHeaderSize(); @@ -1108,8 +1108,8 @@ void KexiCSVImportDialog::setText(int row, int col, const TQString& text, bool i TQCString t(text.latin1()); const int textLen = t.length(); for (int i=0; i<textLen; i++) { - if (t.tqat(i)==',') { - t.tqat(i) = '.'; + if (t.at(i)==',') { + t.at(i) = '.'; break; } } @@ -1295,7 +1295,7 @@ void KexiCSVImportDialog::currentCellChanged(int, int col) type=_NUMBER_TYPE; //we're simplifying that for now m_formatCombo->setCurrentItem( type ); - m_formatLabel->setText( m_formatComboText.tqarg(col+1) ); + m_formatLabel->setText( m_formatComboText.arg(col+1) ); m_primaryKeyField->setEnabled( _NUMBER_TYPE == m_detectedTypes[col]); m_primaryKeyField->blockSignals(true); //block to disable executing slotPrimaryKeyFieldToggled() m_primaryKeyField->setChecked( m_primaryKeyColumn == col ); @@ -1522,7 +1522,7 @@ void KexiCSVImportDialog::accept() } m_importingProgressDlg->setLabel( i18n("Importing CSV Data from <nobr>\"%1\"</nobr> into \"%2\" table...") - .tqarg(TQDir::convertSeparators(m_fname)).tqarg(m_destinationTableSchema->name()) ); + .arg(TQDir::convertSeparators(m_fname)).arg(m_destinationTableSchema->name()) ); m_importingProgressDlg->progressBar()->setTotalSteps( TQFileInfo(*m_file).size() ); m_importingProgressDlg->show(); } @@ -1569,7 +1569,7 @@ void KexiCSVImportDialog::accept() TQDialog::accept(); KMessageBox::information(this, i18n("Data has been successfully imported to table \"%1\".") - .tqarg(m_destinationTableSchema->name())); + .arg(m_destinationTableSchema->name())); parentWidget()->raise(); m_conn = 0; } @@ -1651,12 +1651,12 @@ void KexiCSVImportDialog::updateRowCountInfo() m_infoLbl->setFileName( m_fname ); if (m_allRowsLoadedInPreview) { m_infoLbl->setCommentText( - i18n("row count", "(rows: %1)").tqarg( m_table->numRows()-1+m_startline ) ); + i18n("row count", "(rows: %1)").arg( m_table->numRows()-1+m_startline ) ); TQToolTip::remove( m_infoLbl ); } else { m_infoLbl->setCommentText( - i18n("row count", "(rows: more than %1)").tqarg( m_table->numRows()-1+m_startline ) ); + i18n("row count", "(rows: more than %1)").arg( m_table->numRows()-1+m_startline ) ); TQToolTip::add( m_infoLbl->commentLabel(), i18n("Not all rows are visible on this preview") ); } } diff --git a/kexi/plugins/macros/kexiactions/datatableaction.cpp b/kexi/plugins/macros/kexiactions/datatableaction.cpp index d2eb1df1..19922122 100644 --- a/kexi/plugins/macros/kexiactions/datatableaction.cpp +++ b/kexi/plugins/macros/kexiactions/datatableaction.cpp @@ -148,10 +148,10 @@ void DataTableAction::activate(KSharedPtr<KoMacro::Context> context) TQString identifier; if(! partitem.isEmpty()) { TQStringList parts = TQStringList::split(".", partitem); - KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").tqarg(parts[0]) ); + KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").arg(parts[0]) ); KexiPart::Item* item = part ? mainWin()->project()->item(part->info(), parts[1]) : 0; if(! item) - throw KoMacro::Exception(i18n("No such item \"%1\"").tqarg(partitem)); + throw KoMacro::Exception(i18n("No such item \"%1\"").arg(partitem)); identifier = TQString::number(item->identifier()); } @@ -178,7 +178,7 @@ void DataTableAction::activate(KSharedPtr<KoMacro::Context> context) delete dlg; } else { - throw KoMacro::Exception(i18n("No such method \"%1\"").tqarg(method)); + throw KoMacro::Exception(i18n("No such method \"%1\"").arg(method)); } } diff --git a/kexi/plugins/macros/kexiactions/executeaction.cpp b/kexi/plugins/macros/kexiactions/executeaction.cpp index ccad645c..564b03c8 100644 --- a/kexi/plugins/macros/kexiactions/executeaction.cpp +++ b/kexi/plugins/macros/kexiactions/executeaction.cpp @@ -77,17 +77,17 @@ void ExecuteAction::activate(KSharedPtr<KoMacro::Context> context) return; } - const TQString mimetype = TQString("kexi/%1").tqarg( context->variable("object")->variant().toString() ); + const TQString mimetype = TQString("kexi/%1").arg( context->variable("object")->variant().toString() ); const TQString name = context->variable("name")->variant().toString(); KexiPart::Part* part = Kexi::partManager().partForMimeType(mimetype); if(! part) { - throw KoMacro::Exception(i18n("No such mimetype \"%1\"").tqarg(mimetype)); + throw KoMacro::Exception(i18n("No such mimetype \"%1\"").arg(mimetype)); } KexiPart::Item* item = mainWin()->project()->item(part->info(), name); if(! item) { - throw KoMacro::Exception(i18n("Failed to open part \"%1\" for mimetype \"%2\"").tqarg(name).tqarg(mimetype)); + throw KoMacro::Exception(i18n("Failed to open part \"%1\" for mimetype \"%2\"").arg(name).arg(mimetype)); } part->execute(item); diff --git a/kexi/plugins/macros/kexiactions/navigateaction.cpp b/kexi/plugins/macros/kexiactions/navigateaction.cpp index bc573d10..815b8723 100644 --- a/kexi/plugins/macros/kexiactions/navigateaction.cpp +++ b/kexi/plugins/macros/kexiactions/navigateaction.cpp @@ -111,13 +111,13 @@ void NavigateAction::activate(KSharedPtr<KoMacro::Context> context) KexiViewBase* view = dialog->selectedView(); if(! view) { - throw KoMacro::Exception(i18n("No view selected for \"%1\".").tqarg(dialog->caption())); + throw KoMacro::Exception(i18n("No view selected for \"%1\".").arg(dialog->caption())); } KexiDataAwareView* dbview = dynamic_cast<KexiDataAwareView*>( view ); KexiDataAwareObjectInterface* dbobj = dbview ? dbview->dataAwareObject() : 0; if(! dbview) { - throw KoMacro::Exception(i18n("The view for \"%1\" could not handle data.").tqarg(dialog->caption())); + throw KoMacro::Exception(i18n("The view for \"%1\" could not handle data.").arg(dialog->caption())); } const TQString record = context->variable("record")->variant().toString(); @@ -151,7 +151,7 @@ void NavigateAction::activate(KSharedPtr<KoMacro::Context> context) void sortAscending(); void sortDescending(); */ - throw KoMacro::Exception(i18n("Unknown record \"%1\" in view for \"%2\".").tqarg(record).tqarg(dialog->caption())); + throw KoMacro::Exception(i18n("Unknown record \"%1\" in view for \"%2\".").arg(record).arg(dialog->caption())); } } diff --git a/kexi/plugins/macros/kexiactions/objectnamevariable.h b/kexi/plugins/macros/kexiactions/objectnamevariable.h index 419e2b00..1a0aabf8 100644 --- a/kexi/plugins/macros/kexiactions/objectnamevariable.h +++ b/kexi/plugins/macros/kexiactions/objectnamevariable.h @@ -49,7 +49,7 @@ namespace KexiMacro { return; TQStringList namelist; - KexiPart::Info* info = Kexi::partManager().infoForMimeType( TQString("kexi/%1").tqarg(objectname) ); + KexiPart::Info* info = Kexi::partManager().infoForMimeType( TQString("kexi/%1").arg(objectname) ); if(info) { KexiPart::ItemDict* items = actionimpl->mainWin()->project()->items(info); if(items) @@ -65,7 +65,7 @@ namespace KexiMacro { this->setVariant( (name.isNull() || ! namelist.contains(name)) ? namelist[0] : name ); - kdDebug()<<"##################### KexiActions::ObjectNameVariable() objectname="<<objectname<<" name="<<name<<" value="<<this->variant()<<" tqchildren="<<namelist<<endl; + kdDebug()<<"##################### KexiActions::ObjectNameVariable() objectname="<<objectname<<" name="<<name<<" value="<<this->variant()<<" children="<<namelist<<endl; } virtual ~ObjectNameVariable() {} diff --git a/kexi/plugins/macros/kexiactions/objectvariable.h b/kexi/plugins/macros/kexiactions/objectvariable.h index 83a7a471..c27f024b 100644 --- a/kexi/plugins/macros/kexiactions/objectvariable.h +++ b/kexi/plugins/macros/kexiactions/objectvariable.h @@ -72,8 +72,8 @@ namespace KexiMacro { if(! objectname.isNull()) this->setVariant( objectname ); - else if(this->tqchildren().count() > 0) - this->setVariant( this->tqchildren()[0]->variant() ); + else if(this->children().count() > 0) + this->setVariant( this->children()[0]->variant() ); else this->setVariant( TQString() ); diff --git a/kexi/plugins/macros/kexiactions/openaction.cpp b/kexi/plugins/macros/kexiactions/openaction.cpp index 9cd2e664..d7c4e7aa 100644 --- a/kexi/plugins/macros/kexiactions/openaction.cpp +++ b/kexi/plugins/macros/kexiactions/openaction.cpp @@ -53,7 +53,7 @@ namespace KexiMacro { : KexiVariable<ACTIONIMPL>(actionimpl, VIEW, i18n("View")) { TQStringList namelist; - KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").tqarg(objectname) ); + KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").arg(objectname) ); if(part) { int viewmodes = part->supportedViewModes(); if(viewmodes & Kexi::DataViewMode) @@ -63,7 +63,7 @@ namespace KexiMacro { if(viewmodes & Kexi::TextViewMode) namelist << TEXTVIEW; for(TQStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it) - this->tqchildren().append( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) ); + this->children().append( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) ); } const TQString n = namelist.contains(viewname) @@ -124,9 +124,9 @@ void OpenAction::activate(KSharedPtr<KoMacro::Context> context) const TQString objectname = context->variable(OBJECT)->variant().toString(); const TQString name = context->variable(NAME)->variant().toString(); - KexiPart::Item* item = mainWin()->project()->itemForMimeType( TQString("kexi/%1").tqarg(objectname).latin1(), name ); + KexiPart::Item* item = mainWin()->project()->itemForMimeType( TQString("kexi/%1").arg(objectname).latin1(), name ); if(! item) { - throw KoMacro::Exception(i18n("No such object \"%1.%2\".").tqarg(objectname).tqarg(name)); + throw KoMacro::Exception(i18n("No such object \"%1.%2\".").arg(objectname).arg(name)); } // Determinate the viewmode. @@ -139,14 +139,14 @@ void OpenAction::activate(KSharedPtr<KoMacro::Context> context) else if(view == TEXTVIEW) viewmode = Kexi::TextViewMode; else { - throw KoMacro::Exception(i18n("No such viewmode \"%1\" in object \"%2.%3\".").tqarg(view).tqarg(objectname).tqarg(name)); + throw KoMacro::Exception(i18n("No such viewmode \"%1\" in object \"%2.%3\".").arg(view).arg(objectname).arg(name)); } // Try to open the object now. bool openingCancelled; if(! mainWin()->openObject(item, viewmode, openingCancelled)) { if(! openingCancelled) { - throw KoMacro::Exception(i18n("Failed to open object \"%1.%2\".").tqarg(objectname).tqarg(name)); + throw KoMacro::Exception(i18n("Failed to open object \"%1.%2\".").arg(objectname).arg(name)); } } } diff --git a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp index b7e89e9a..2f6ee825 100644 --- a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp +++ b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp @@ -461,10 +461,10 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop kdDebug() << "KexiMacroDesignView::propertyChanged() set existing property=" << *it << endl; KoProperty::Property& p = set.property((*it).latin1()); - KoMacro::Variable::List tqchildren = variable->tqchildren(); - if(tqchildren.count() > 0) { + KoMacro::Variable::List children = variable->children(); + if(children.count() > 0) { TQStringList keys, names; - KoMacro::Variable::List::Iterator childit(tqchildren.begin()), childend(tqchildren.end()); + KoMacro::Variable::List::Iterator childit(children.begin()), childend(children.end()); for(; childit != childend; ++childit) { const TQString s = (*childit)->variant().toString(); keys << s; diff --git a/kexi/plugins/macros/kexipart/keximacrodesignview.h b/kexi/plugins/macros/kexipart/keximacrodesignview.h index 3529ea0c..520d1799 100644 --- a/kexi/plugins/macros/kexipart/keximacrodesignview.h +++ b/kexi/plugins/macros/kexipart/keximacrodesignview.h @@ -91,7 +91,7 @@ class KexiMacroDesignView : public KexiMacroView /** * Called if a row got inserted. */ - void rowInserted(KexiTableItem* item, uint row, bool tqrepaint); + void rowInserted(KexiTableItem* item, uint row, bool repaint); /** * Called if a property in the \a KoProperty got changed. diff --git a/kexi/plugins/macros/kexipart/keximacroerror.cpp b/kexi/plugins/macros/kexipart/keximacroerror.cpp index f6422be9..25ec569f 100644 --- a/kexi/plugins/macros/kexipart/keximacroerror.cpp +++ b/kexi/plugins/macros/kexipart/keximacroerror.cpp @@ -53,14 +53,14 @@ KexiMacroError::KexiMacroError(KexiMainWindow* mainwin, KSharedPtr<KoMacro::Cont KoMacro::Exception* exception = context->exception(); iconlbl->setPixmap(KGlobal::instance()->iconLoader()->loadIcon("messagebox_critical", KIcon::Small, 32)); - errorlbl->setText(i18n("<qt>Failed to execute the macro \"%1\".<br>%2</qt>").tqarg( context->macro()->name() ).tqarg( exception->errorMessage() )); + errorlbl->setText(i18n("<qt>Failed to execute the macro \"%1\".<br>%2</qt>").arg( context->macro()->name() ).arg( exception->errorMessage() )); int i = 1; KoMacro::MacroItem::List items = context->macro()->items(); for (KoMacro::MacroItem::List::ConstIterator mit = items.begin(); mit != items.end(); mit++) { KListViewItem* listviewitem = new KListViewItem(errorlist); - listviewitem->setText(0,TQString("%1").tqarg(i++)); + listviewitem->setText(0,TQString("%1").arg(i++)); listviewitem->setText(1,i18n("Action")); KSharedPtr<KoMacro::MacroItem> macroitem = *mit; @@ -107,7 +107,7 @@ void KexiMacroError::designbtnClicked() const TQString name = macro->name(); KexiPart::Item* item = d->mainwin->project()->itemForMimeType("kexi/macro", name); if(! item) { - kdWarning() << TQString("KexiMacroError::designbtnClicked(): No such macro \"%1\"").tqarg(name) << endl; + kdWarning() << TQString("KexiMacroError::designbtnClicked(): No such macro \"%1\"").arg(name) << endl; return; } @@ -115,7 +115,7 @@ void KexiMacroError::designbtnClicked() bool openingCancelled; if(! d->mainwin->openObject(item, Kexi::DesignViewMode, openingCancelled)) { if(! openingCancelled) { - kdWarning() << TQString("KexiMacroError::designbtnClicked(): Open macro \"%1\" in designview failed.").tqarg(name) << endl; + kdWarning() << TQString("KexiMacroError::designbtnClicked(): Open macro \"%1\" in designview failed.").arg(name) << endl; return; } } diff --git a/kexi/plugins/macros/kexipart/keximacroerrorbase.ui b/kexi/plugins/macros/kexipart/keximacroerrorbase.ui index 72c45001..26bd964d 100644 --- a/kexi/plugins/macros/kexipart/keximacroerrorbase.ui +++ b/kexi/plugins/macros/kexipart/keximacroerrorbase.ui @@ -65,7 +65,7 @@ <property name="text"> <string></string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignVCenter|AlignLeft</set> </property> </widget> @@ -87,7 +87,7 @@ <property name="text"> <string></string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> diff --git a/kexi/plugins/macros/kexipart/keximacroproperty.cpp b/kexi/plugins/macros/kexipart/keximacroproperty.cpp index d5e576f9..e3599b22 100644 --- a/kexi/plugins/macros/kexipart/keximacroproperty.cpp +++ b/kexi/plugins/macros/kexipart/keximacroproperty.cpp @@ -86,7 +86,7 @@ void KexiMacroProperty::init() } //TESTCASE!!!!!!!!!!!!!!!!!!!!!! - //if(! variable->isEnabled()) qFatal( TQString("############## VARIABLE=%1").tqarg(variable->name()).latin1() ); + //if(! variable->isEnabled()) qFatal( TQString("############## VARIABLE=%1").arg(variable->name()).latin1() ); Q_ASSERT(! d->name.isNull()); m_property->setName( d->name.latin1() ); @@ -389,45 +389,45 @@ class ListBox : public TQListBox Q_ASSERT( m_edititem->widget() != 0 ); const TQString name = m_macroproperty->name(); - KoMacro::Variable::List tqchildren; + KoMacro::Variable::List children; { - KoMacro::Variable::List actiontqchildren; + KoMacro::Variable::List actionchildren; KSharedPtr<KoMacro::Variable> itemvar = m_macroproperty->macroItem()->variable(name,false); //kdDebug() << "KexiMacroProperty::ListBox::update() itemvar="<<(itemvar.data() ? "name:"+itemvar->name()+" value:"+itemvar->toString() : "NULL")<<endl; if(itemvar.data()) - actiontqchildren = itemvar->tqchildren(); + actionchildren = itemvar->children(); KSharedPtr<KoMacro::Action> action = m_edititem->action(); KSharedPtr<KoMacro::Variable> actionvar = action.data() ? action->variable(name) : KSharedPtr<KoMacro::Variable>(); //kdDebug() << "KexiMacroProperty::ListBox::update() actionvar="<<(actionvar.data() ? "name:"+actionvar->name()+" value:"+actionvar->toString() : "NULL")<<endl; if(actionvar.data()) - actiontqchildren += actionvar->tqchildren(); + actionchildren += actionvar->children(); - KoMacro::Variable::List::ConstIterator it(actiontqchildren.constBegin()), end(actiontqchildren.constEnd()); + KoMacro::Variable::List::ConstIterator it(actionchildren.constBegin()), end(actionchildren.constEnd()); for(; it != end; ++it) { if(name == (*it)->name()) { - KoMacro::Variable::List list = (*it)->tqchildren(); + KoMacro::Variable::List list = (*it)->children(); KoMacro::Variable::List::ConstIterator listit(list.constBegin()), listend(list.constEnd()); for(; listit != listend; ++listit) - tqchildren.append( *listit ); + children.append( *listit ); } } - if(tqchildren.count() <= 0) - tqchildren = actiontqchildren; + if(children.count() <= 0) + children = actionchildren; } /* - kdDebug() << "KexiMacroProperty::ListBox::update() name="<<name<<" childcount="<<tqchildren.count()<<endl; - KoMacro::Variable::List::ConstIterator listit(tqchildren.constBegin()), listend(tqchildren.constEnd()); + kdDebug() << "KexiMacroProperty::ListBox::update() name="<<name<<" childcount="<<children.count()<<endl; + KoMacro::Variable::List::ConstIterator listit(children.constBegin()), listend(children.constEnd()); for(; listit != listend; ++listit) { - kdDebug()<<" child name="<<(*listit)->name()<<" value="<<(*listit)->toString()<<" childcount="<<(*listit)->tqchildren().count()<<endl; + kdDebug()<<" child name="<<(*listit)->name()<<" value="<<(*listit)->toString()<<" childcount="<<(*listit)->children().count()<<endl; } */ - if(tqchildren.count() > 0) { - KoMacro::Variable::List::Iterator childit(tqchildren.begin()), childend(tqchildren.end()); + if(children.count() > 0) { + KoMacro::Variable::List::Iterator childit(children.begin()), childend(children.end()); for(; childit != childend; ++childit) { const TQString n = (*childit)->name(); //if(! n.startsWith("@")) continue; diff --git a/kexi/plugins/macros/kexipart/keximacrotextview.cpp b/kexi/plugins/macros/kexipart/keximacrotextview.cpp index e35ee5b2..d7f3801e 100644 --- a/kexi/plugins/macros/kexipart/keximacrotextview.cpp +++ b/kexi/plugins/macros/kexipart/keximacrotextview.cpp @@ -72,7 +72,7 @@ bool KexiMacroTextView::loadData() return false; } - kdDebug() << TQString("KexiMacroTextView::loadData()\n%1").tqarg(data) << endl; + kdDebug() << TQString("KexiMacroTextView::loadData()\n%1").arg(data) << endl; //d->editor->blockSignals(true); d->editor->setText(data); //d->editor->blockSignals(false); @@ -82,7 +82,7 @@ bool KexiMacroTextView::loadData() tristate KexiMacroTextView::storeData(bool /*dontAsk*/) { - kexipluginsdbg << TQString("KexiMacroTextView::storeData() %1 [%2]\n%3").tqarg(parentDialog()->partItem()->name()).tqarg(parentDialog()->id()).tqarg(d->editor->text()) << endl; + kexipluginsdbg << TQString("KexiMacroTextView::storeData() %1 [%2]\n%3").arg(parentDialog()->partItem()->name()).arg(parentDialog()->id()).arg(d->editor->text()) << endl; return storeDataBlock( d->editor->text() ); } diff --git a/kexi/plugins/macros/kexipart/keximacroview.cpp b/kexi/plugins/macros/kexipart/keximacroview.cpp index e9f9cd33..19e789f0 100644 --- a/kexi/plugins/macros/kexipart/keximacroview.cpp +++ b/kexi/plugins/macros/kexipart/keximacroview.cpp @@ -115,7 +115,7 @@ bool KexiMacroView::loadData() return false; } - kexipluginsdbg << TQString("KexiMacroView::loadData()\n%1").tqarg(domdoc.toString()) << endl; + kexipluginsdbg << TQString("KexiMacroView::loadData()\n%1").arg(domdoc.toString()) << endl; TQDomElement macroelem = domdoc.namedItem("macro").toElement(); if(macroelem.isNull()) { kexipluginsdbg << "KexiMacroView::loadData() Macro domelement is null" << endl; @@ -154,8 +154,8 @@ tristate KexiMacroView::storeData(bool /*dontAsk*/) TQDomElement macroelem = d->macro->toXML(); domdoc.appendChild(macroelem); const TQString xml = domdoc.toString(2); - const TQString name = TQString("%1 [%2]").tqarg(parentDialog()->partItem()->name()).tqarg(parentDialog()->id()); - kexipluginsdbg << TQString("KexiMacroView::storeData %1\n%2").tqarg(name).tqarg(xml) << endl; + const TQString name = TQString("%1 [%2]").arg(parentDialog()->partItem()->name()).arg(parentDialog()->id()); + kexipluginsdbg << TQString("KexiMacroView::storeData %1\n%2").arg(name).arg(xml) << endl; return storeDataBlock(xml); } diff --git a/kexi/plugins/macros/lib/action.cpp b/kexi/plugins/macros/lib/action.cpp index 45c03d12..fc729b57 100644 --- a/kexi/plugins/macros/lib/action.cpp +++ b/kexi/plugins/macros/lib/action.cpp @@ -81,7 +81,7 @@ Action::Action(const TQString& name, const TQString& text) Action::~Action() { - //kdDebug() << TQString("Action::~Action() name=\"%1\"").tqarg(name()) << endl; + //kdDebug() << TQString("Action::~Action() name=\"%1\"").arg(name()) << endl; // destroy the private d-pointer instance. delete d; @@ -89,7 +89,7 @@ Action::~Action() const TQString Action::toString() const { - return TQString("Action:%1").tqarg(name()); + return TQString("Action:%1").arg(name()); } const TQString Action::name() const diff --git a/kexi/plugins/macros/lib/context.cpp b/kexi/plugins/macros/lib/context.cpp index 7c0b6ee8..c0eea250 100644 --- a/kexi/plugins/macros/lib/context.cpp +++ b/kexi/plugins/macros/lib/context.cpp @@ -44,7 +44,7 @@ namespace KoMacro { KSharedPtr<Macro> macro; /** - * List of @a Action instances that are tqchildren of the + * List of @a Action instances that are children of the * macro. */ TQValueList<KSharedPtr<MacroItem > > items; @@ -70,7 +70,7 @@ namespace KoMacro { /// Constructor. explicit Private(KSharedPtr<Macro> m) : macro(m) // remember the macro - , items(m->items()) // set d-pointer tqchildren to macro tqchildren + , items(m->items()) // set d-pointer children to macro children , exception(0) // no exception yet. { } @@ -119,7 +119,7 @@ KSharedPtr<Variable> Context::variable(const TQString& name) const } } //none found throw exception - throw Exception(TQString("Variable name='%1' does not exist.").tqarg(name)); + throw Exception(TQString("Variable name='%1' does not exist.").arg(name)); } //return a map of our (d-pointer) variables @@ -132,7 +132,7 @@ Variable::Map Context::variables() const void Context::setVariable(const TQString& name, KSharedPtr<Variable> variable) { //debuging infos - kdDebug() << TQString("KoMacro::Context::setVariable name='%1' variable='%2'").tqarg(name).tqarg(variable->toString()) << endl; + kdDebug() << TQString("KoMacro::Context::setVariable name='%1' variable='%2'").arg(name).arg(variable->toString()) << endl; //Use TQMap?s replace to set/replace the variable named name d->variables.replace(name, variable); } @@ -198,14 +198,14 @@ void Context::activate(TQValueList<KSharedPtr<MacroItem > >::ConstIterator it) d->exception = new Exception(e); //add new tracemessages //the macro name - d->exception->addTraceMessage( TQString("macro=%1").tqarg(d->macro->name()) ); + d->exception->addTraceMessage( TQString("macro=%1").arg(d->macro->name()) ); //the action name - d->exception->addTraceMessage( TQString("action=%1").tqarg(action->name()) ); + d->exception->addTraceMessage( TQString("action=%1").arg(action->name()) ); //and all variables wich belong to the action/macro TQStringList variables = action->variableNames(); for(TQStringList::Iterator vit = variables.begin(); vit != variables.end(); ++vit) { KSharedPtr<Variable> v = d->macroitem->variable(*vit, true); - d->exception->addTraceMessage( TQString("%1=%2").tqarg(*vit).tqarg(v->toString()) ); + d->exception->addTraceMessage( TQString("%1=%2").arg(*vit).arg(v->toString()) ); } return; // abort execution } diff --git a/kexi/plugins/macros/lib/context.h b/kexi/plugins/macros/lib/context.h index 2bb1bef3..a7986167 100644 --- a/kexi/plugins/macros/lib/context.h +++ b/kexi/plugins/macros/lib/context.h @@ -35,7 +35,7 @@ namespace KoMacro { /** * The context of an execution. If a @a Macro got executed it creates - * an instance of this class and passes it around all it's tqchildren + * an instance of this class and passes it around all it's children * as local execution context. */ class KOMACRO_EXPORT Context diff --git a/kexi/plugins/macros/lib/exception.cpp b/kexi/plugins/macros/lib/exception.cpp index 91cfa03c..b435f2f2 100644 --- a/kexi/plugins/macros/lib/exception.cpp +++ b/kexi/plugins/macros/lib/exception.cpp @@ -56,7 +56,7 @@ Exception::Exception(const TQString& errormessage) : d( new Private(errormessage) ) // create the private d-pointer instance. { //debuging infos - kdDebug() << TQString("Exception errormessage=\"%1\"").tqarg(errormessage) << endl; + kdDebug() << TQString("Exception errormessage=\"%1\"").arg(errormessage) << endl; } //copy constructor diff --git a/kexi/plugins/macros/lib/macro.cpp b/kexi/plugins/macros/lib/macro.cpp index 6bcdc21d..808c4043 100644 --- a/kexi/plugins/macros/lib/macro.cpp +++ b/kexi/plugins/macros/lib/macro.cpp @@ -84,7 +84,7 @@ void Macro::setName(const TQString& name) //get an "extended" name const TQString Macro::toString() const { - return TQString("Macro:%1").tqarg(name()); + return TQString("Macro:%1").arg(name()); } //get (d-pointer) itemlist diff --git a/kexi/plugins/macros/lib/macro.h b/kexi/plugins/macros/lib/macro.h index 86e0122a..5e5decf8 100644 --- a/kexi/plugins/macros/lib/macro.h +++ b/kexi/plugins/macros/lib/macro.h @@ -85,7 +85,7 @@ namespace KoMacro { /** * @return a list of @a MacroItem instances which - * are tqchildren of this @a Macro . + * are children of this @a Macro . */ TQValueList< KSharedPtr<MacroItem> >& items() const; diff --git a/kexi/plugins/macros/lib/metamethod.cpp b/kexi/plugins/macros/lib/metamethod.cpp index 16b93803..05bd22c3 100644 --- a/kexi/plugins/macros/lib/metamethod.cpp +++ b/kexi/plugins/macros/lib/metamethod.cpp @@ -92,12 +92,12 @@ MetaMethod::MetaMethod(const TQString& signature, Type type, KSharedPtr<MetaObje int startpos = d->signature.find("("); int endpos = d->signature.findRev(")"); if(startpos < 0 || startpos > endpos) { - throw Exception(TQString("Invalid signature \"%1\"").tqarg(d->signature)); + throw Exception(TQString("Invalid signature \"%1\"").arg(d->signature)); } d->signaturetag = d->signature.left(startpos).stripWhiteSpace(); if(d->signaturetag.isEmpty()) { - throw Exception(TQString("Invalid tagname in signature \"%1\"").tqarg(d->signature)); + throw Exception(TQString("Invalid tagname in signature \"%1\"").arg(d->signature)); } d->signaturearguments = d->signature.mid(startpos + 1, endpos - startpos - 1).stripWhiteSpace(); @@ -108,7 +108,7 @@ MetaMethod::MetaMethod(const TQString& signature, Type type, KSharedPtr<MetaObje if(starttemplatepos >= 0 && (commapos < 0 || starttemplatepos < commapos)) { int endtemplatepos = d->signaturearguments.find(">", starttemplatepos); if(endtemplatepos <= 0) { - throw Exception(TQString("No closing template-definiton in signature \"%1\"").tqarg(d->signature)); + throw Exception(TQString("No closing template-definiton in signature \"%1\"").arg(d->signature)); } commapos = d->signaturearguments.find(",", endtemplatepos); } @@ -170,7 +170,7 @@ TQUObject* MetaMethod::toTQUObject(Variable::List arguments) uint argsize = d->arguments.size(); if(arguments.size() <= argsize) { - throw Exception(TQString("To less arguments for slot with siganture \"%1\"").tqarg(d->signature)); + throw Exception(TQString("To less arguments for slot with siganture \"%1\"").arg(d->signature)); } // The first item in the TQUObject-array is for the returnvalue @@ -188,7 +188,7 @@ TQUObject* MetaMethod::toTQUObject(Variable::List arguments) } if(metaargument->type() != variable->type()) { - throw Exception(TQString("Wrong variable type in method \"%1\". Expected \"%2\" but got \"%3\"").tqarg(d->signature).tqarg(metaargument->type()).tqarg(variable->type())); + throw Exception(TQString("Wrong variable type in method \"%1\". Expected \"%2\" but got \"%3\"").arg(d->signature).arg(metaargument->type()).arg(variable->type())); } switch(metaargument->type()) { @@ -287,7 +287,7 @@ KSharedPtr<Variable> MetaMethod::toVariable(TQUObject* uo) return new Variable(v); } - throw Exception(TQString("Invalid parameter '%1'").tqarg(desc)); + throw Exception(TQString("Invalid parameter '%1'").arg(desc)); } Variable::List MetaMethod::toVariableList(TQUObject* uo) diff --git a/kexi/plugins/macros/lib/metaobject.cpp b/kexi/plugins/macros/lib/metaobject.cpp index 0916fe37..ee865c82 100644 --- a/kexi/plugins/macros/lib/metaobject.cpp +++ b/kexi/plugins/macros/lib/metaobject.cpp @@ -91,7 +91,7 @@ int MetaObject::indexOfSignal(const char* signal) const TQMetaObject* metaobject = object()->metaObject(); int signalid = metaobject->findSignal(signal, false); if(signalid < 0) { - throw Exception(TQString("Invalid signal \"%1\"").tqarg(signal)); + throw Exception(TQString("Invalid signal \"%1\"").arg(signal)); } return signalid; } @@ -101,7 +101,7 @@ int MetaObject::indexOfSlot(const char* slot) const TQMetaObject* metaobject = object()->metaObject(); int slotid = metaobject->findSlot(slot, false); if(slotid < 0) { - throw Exception(TQString("Invalid slot \"%1\"").tqarg(slot)); + throw Exception(TQString("Invalid slot \"%1\"").arg(slot)); } return slotid; } @@ -119,13 +119,13 @@ KSharedPtr<MetaMethod> MetaObject::method(int index) metadata = metaobject->signal(index, true); if(! metadata) { - throw Exception(TQString("Invalid method index \"%1\" in object \"%2\"").tqarg(index).tqarg(obj->name())); + throw Exception(TQString("Invalid method index \"%1\" in object \"%2\"").arg(index).arg(obj->name())); } type = MetaMethod::Signal; } if(metadata->access != TQMetaData::Public) { - throw Exception(TQString("Not allowed to access method \"%1\" in object \"%2\"").tqarg(metadata->name).tqarg(obj->name())); + throw Exception(TQString("Not allowed to access method \"%1\" in object \"%2\"").arg(metadata->name).arg(obj->name())); } return new MetaMethod(metadata->name, type, this); diff --git a/kexi/plugins/macros/lib/variable.cpp b/kexi/plugins/macros/lib/variable.cpp index f64613b0..3661ef9a 100644 --- a/kexi/plugins/macros/lib/variable.cpp +++ b/kexi/plugins/macros/lib/variable.cpp @@ -58,10 +58,10 @@ namespace KoMacro { const TQObject* object; /** - * Optional list of tqchildren this @a Variable has. + * Optional list of children this @a Variable has. */ // TODO Dow we use this or is it for the future?? - Variable::List tqchildren; + Variable::List children; /** * Defines if the variable is enabled or disabled. @@ -199,7 +199,7 @@ const TQString Variable::toString() const return variant().toString(); } break; case KoMacro::MetaParameter::TypeObject: { - return TQString("[%1]").tqarg( object()->name() ); + return TQString("[%1]").arg( object()->name() ); } break; default: { throw Exception("Type is undefined."); @@ -213,24 +213,24 @@ int Variable::toInt() const return variant().toInt(); } -Variable::List Variable::tqchildren() const +Variable::List Variable::children() const { - return d->tqchildren; + return d->children; } void Variable::appendChild(KSharedPtr<Variable> variable) { - d->tqchildren.append(variable); + d->children.append(variable); } void Variable::clearChildren() { - d->tqchildren.clear(); + d->children.clear(); } -void Variable::setChildren(const Variable::List& tqchildren) +void Variable::setChildren(const Variable::List& children) { - d->tqchildren = tqchildren; + d->children = children; } /* diff --git a/kexi/plugins/macros/lib/variable.h b/kexi/plugins/macros/lib/variable.h index 108a6005..14adf09c 100644 --- a/kexi/plugins/macros/lib/variable.h +++ b/kexi/plugins/macros/lib/variable.h @@ -173,29 +173,29 @@ namespace KoMacro { /** * @return the optional list of @a Variable instances - * that are tqchildren of this @a Variable . + * that are children of this @a Variable . * * @note that the list is returned call-by-reference. The * list is accessed as getter/setter (read/write). So, * don't set this method to const! */ - List tqchildren() const; + List children() const; /** - * Append a @a Variable to the list of tqchildren this + * Append a @a Variable to the list of children this * @a Variable has. */ void appendChild(KSharedPtr<Variable> variable); /** - * Clear the list of tqchildren this @a Variable has. + * Clear the list of children this @a Variable has. */ void clearChildren(); /** - * Set the tqchildren this @a Variable has. + * Set the children this @a Variable has. */ - void setChildren(const List& tqchildren); + void setChildren(const List& children); #if 0 /** diff --git a/kexi/plugins/macros/lib/xmlhandler.cpp b/kexi/plugins/macros/lib/xmlhandler.cpp index 4894c619..5b53d51b 100644 --- a/kexi/plugins/macros/lib/xmlhandler.cpp +++ b/kexi/plugins/macros/lib/xmlhandler.cpp @@ -75,7 +75,7 @@ bool XMLHandler::parseXML(const TQDomElement& element) // We expect a <macro> element. Do we really need to be such strict or // would it be more wise to trust the application in that case? if(element.tagName() != "macro") { - kdDebug() << TQString("XMLHandler::parseXML() Invalid tagname \"%1\"").tqarg(element.tagName()) << endl; + kdDebug() << TQString("XMLHandler::parseXML() Invalid tagname \"%1\"").arg(element.tagName()) << endl; return false; } @@ -83,7 +83,7 @@ bool XMLHandler::parseXML(const TQDomElement& element) // If there is more than one version, parsing should update old macro-data, so that it // could write out in the newer version in toXML(). if( element.attribute("xmlversion") != "1"){ - kdDebug() << TQString("XMLHandler::parseXML() Invalid xml-version \"%1\"").tqarg(element.attribute("xmlversion")) << endl; + kdDebug() << TQString("XMLHandler::parseXML() Invalid xml-version \"%1\"").arg(element.attribute("xmlversion")) << endl; return false; } @@ -115,7 +115,7 @@ bool XMLHandler::parseXML(const TQDomElement& element) // Set the comment item->setComment( itemelem.attribute("comment") ); - // Iterate through the tqchildren this item has and try + // Iterate through the children this item has and try // to fill the list of variables our new MacroItem has. for(TQDomNode childnode = itemnode.firstChild(); ! childnode.isNull(); childnode = childnode.nextSibling()) { // The tagname should be "variable" @@ -156,12 +156,12 @@ TQDomElement XMLHandler::toXML() // redundancy at this point. //macroelem.setAttribute("name",d->macro->name()); - // The list of MacroItem-tqchildren a Macro provides. + // The list of MacroItem-children a Macro provides. TQValueList<KSharedPtr<MacroItem > > items = d->macro->items(); // Create an iterator... TQValueList<KSharedPtr<MacroItem > >::ConstIterator it(items.constBegin()), end(items.constEnd()); - // ...and iterate over the list of tqchildren the Macro provides. + // ...and iterate over the list of children the Macro provides. for(;it != end; ++it) { // We are iterating over MacroItem instances. KSharedPtr<MacroItem> item = *it; diff --git a/kexi/plugins/macros/tests/commontests.cpp b/kexi/plugins/macros/tests/commontests.cpp index 1086a340..bdc2e6ad 100644 --- a/kexi/plugins/macros/tests/commontests.cpp +++ b/kexi/plugins/macros/tests/commontests.cpp @@ -424,7 +424,7 @@ void CommonTests::testFunction() domdocument.setContent(TQString( "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver + "\" slot=\"myslot(const TQString & , int)\">" "<argument>" + argument1 + "</argument>" - "<argument>" + TQString("%1").tqarg(argument2) + "</argument>" + "<argument>" + TQString("%1").arg(argument2) + "</argument>" "</function>" )); @@ -677,7 +677,7 @@ void CommonTests::testMacro() // KOMACROTEST_ASSERT( actionptr->comment(), TQString("") ); /* //fetch the second one - KSharedPtr<KoMacro::Action> myfuncptr = tqchildren[1]; + KSharedPtr<KoMacro::Action> myfuncptr = children[1]; //cast it to function KoMacro::Function* myfunc = dynamic_cast<KoMacro::Function*>( myfuncptr.data() ); @@ -712,8 +712,8 @@ void CommonTests::testMacro() //KOMACROTEST_XASSERT((int) yanActionptr2.data(), 0); //KOMACROTEST_XASSERT((int) yanActionptr3.data(), 0); - //create a list of the tqchildren from yanMacro - //TQValueList< KSharedPtr<KoMacro::Action> > yanChildren = yanMacro->tqchildren(); + //create a list of the children from yanMacro + //TQValueList< KSharedPtr<KoMacro::Action> > yanChildren = yanMacro->children(); //check that there are two //KOMACROTEST_ASSERT(yanChildren.count(), uint(2)); /* @@ -722,9 +722,9 @@ void CommonTests::testMacro() const int oldsize = yanChildren.count(); //add a new child to the macro yanMacro->addChild(yanActionptr2); - //get the tqchildren - yanChildren = yanMacro->tqchildren(); - //get count of tqchildren + //get the children + yanChildren = yanMacro->children(); + //get count of children const int size = yanChildren.count(); //check count has changed KOMACROTEST_XASSERT(size, oldsize); @@ -735,9 +735,9 @@ void CommonTests::testMacro() const int oldsize = yanChildren.count(); //add a new child to the macro yanMacro->addChild(yanActionptr3); - //get the tqchildren - yanChildren = yanMacro->tqchildren(); - //get count of tqchildren + //get the children + yanChildren = yanMacro->children(); + //get count of children const int size = yanChildren.count(); //check count has changed KOMACROTEST_XASSERT(size, oldsize); @@ -859,12 +859,12 @@ void CommonTests::testVariables() //check that it is not null KOMACROTEST_XASSERT((int) macro, 0); - //create a list of its tqchildren - TQValueList< KSharedPtr<KoMacro::Action> > tqchildren = macro->tqchildren(); - //Check that there are two tqchildren. The first child is always the returnvalue. - KOMACROTEST_ASSERT( tqchildren.count(), uint(2) ); - //fetch the tqchildren - KSharedPtr<KoMacro::Action> func1ptr = tqchildren[1]; + //create a list of its children + TQValueList< KSharedPtr<KoMacro::Action> > children = macro->children(); + //Check that there are two children. The first child is always the returnvalue. + KOMACROTEST_ASSERT( children.count(), uint(2) ); + //fetch the children + KSharedPtr<KoMacro::Action> func1ptr = children[1]; //create new context KSharedPtr<KoMacro::Context> context = new KoMacro::Context(macroptr); diff --git a/kexi/plugins/macros/tests/komacrotestbase.h b/kexi/plugins/macros/tests/komacrotestbase.h index e301730d..ee746991 100644 --- a/kexi/plugins/macros/tests/komacrotestbase.h +++ b/kexi/plugins/macros/tests/komacrotestbase.h @@ -27,7 +27,7 @@ */ #define KOMACROTEST_ASSERT(actual, expected) \ { \ - std::cout << TQString("Testing: %1 == %2").tqarg(#actual).tqarg(#expected).latin1() << std::endl; \ + std::cout << TQString("Testing: %1 == %2").arg(#actual).arg(#expected).latin1() << std::endl; \ check( __FILE__, __LINE__, #actual, actual, expected, false ); \ if(actual != expected) \ { \ @@ -44,7 +44,7 @@ */ #define KOMACROTEST_XASSERT(actual, notexpected) \ { \ - std::cout << TQString("Testing: %1 != %2").tqarg(#actual).tqarg(#notexpected).latin1() << std::endl; \ + std::cout << TQString("Testing: %1 != %2").arg(#actual).arg(#notexpected).latin1() << std::endl; \ check( __FILE__, __LINE__, #actual, actual, notexpected, true ); \ if(actual == notexpected) \ { \ diff --git a/kexi/plugins/macros/tests/testobject.cpp b/kexi/plugins/macros/tests/testobject.cpp index e0db481e..2634d71a 100644 --- a/kexi/plugins/macros/tests/testobject.cpp +++ b/kexi/plugins/macros/tests/testobject.cpp @@ -94,7 +94,7 @@ int TestObject::myslot(const TQString&, int i) //TQString is returnvalue TQString TestObject::myslot(const TQString& s) { - TQString t = TQString("CALLED => TestObject::myslot(const TQString& s) s=%1").tqarg(s); + TQString t = TQString("CALLED => TestObject::myslot(const TQString& s) s=%1").arg(s); //be loud kdDebug() << t << endl; //add some extra Debuginfos to TestResults diff --git a/kexi/plugins/macros/tests/xmlhandlertests.cpp b/kexi/plugins/macros/tests/xmlhandlertests.cpp index 29c53831..90454d35 100644 --- a/kexi/plugins/macros/tests/xmlhandlertests.cpp +++ b/kexi/plugins/macros/tests/xmlhandlertests.cpp @@ -332,7 +332,7 @@ void XMLHandlerTests::testMaxNum() "<variable name=\"testbool\" >true</variable>" "<variable name=\"testdouble\" > %2 </variable>" "</item>" - "</macro>").tqarg(INT_MAX).tqarg(DBL_MAX); + "</macro>").arg(INT_MAX).arg(DBL_MAX); doomdocument.setContent(xml); const TQDomElement elem = doomdocument.documentElement(); KOMACROTEST_ASSERT(macro->parseXML(elem),true); @@ -362,7 +362,7 @@ void XMLHandlerTests::testMaxNum2() "<variable name=\"testbool\" >true</variable>" "<variable name=\"testdouble\" > %2 </variable>" "</item>" - "</macro>").tqarg(INT_MAX+1).tqarg(DBL_MAX+1); + "</macro>").arg(INT_MAX+1).arg(DBL_MAX+1); doomdocument.setContent(xml); const TQDomElement elem = doomdocument.documentElement(); KOMACROTEST_ASSERT(macro->parseXML(elem),true); @@ -392,7 +392,7 @@ void XMLHandlerTests::testMinNum() "<variable name=\"testbool\" >true</variable>" "<variable name=\"testdouble\" > %2 </variable>" "</item>" - "</macro>").tqarg(INT_MIN).tqarg(DBL_MIN); + "</macro>").arg(INT_MIN).arg(DBL_MIN); doomdocument.setContent(xml); const TQDomElement elem = doomdocument.documentElement(); KOMACROTEST_ASSERT(macro->parseXML(elem),true); @@ -422,7 +422,7 @@ void XMLHandlerTests::testMinNum2() "<variable name=\"testbool\" >true</variable>" "<variable name=\"testdouble\" > %2 </variable>" "</item>" - "</macro>").tqarg(INT_MIN-1).tqarg(DBL_MIN-1); + "</macro>").arg(INT_MIN-1).arg(DBL_MIN-1); doomdocument.setContent(xml); const TQDomElement elem = doomdocument.documentElement(); KOMACROTEST_ASSERT(macro->parseXML(elem),true); @@ -452,7 +452,7 @@ void XMLHandlerTests::testBigNumber() "<variable name=\"testbool\" >true</variable>" "<variable name=\"testdouble\" > %1 </variable>" "</item>" - "</macro>").tqarg(DBL_MAX+1); + "</macro>").arg(DBL_MAX+1); doomdocument.setContent(xml); const TQDomElement elem = doomdocument.documentElement(); KOMACROTEST_ASSERT(macro->parseXML(elem),true); diff --git a/kexi/plugins/macros/tests/xmlhandlertests2.cpp b/kexi/plugins/macros/tests/xmlhandlertests2.cpp index ac176f89..f32416c0 100644 --- a/kexi/plugins/macros/tests/xmlhandlertests2.cpp +++ b/kexi/plugins/macros/tests/xmlhandlertests2.cpp @@ -586,7 +586,7 @@ void XMLHandlerTests2::testMaxNum() "<variable name=\"testbool\" >true</variable>" "<variable name=\"testdouble\" > %2 </variable>" "</item>" - "</macro>").tqarg(INT_MAX).tqarg(DBL_MAX); + "</macro>").arg(INT_MAX).arg(DBL_MAX); // Set the XML-document with the above string. TQDomDocument doomdocument; doomdocument.setContent(xml); @@ -674,7 +674,7 @@ void XMLHandlerTests2::testMaxNum2() "<variable name=\"testbool\" >true</variable>" "<variable name=\"testdouble\" > %2 </variable>" "</item>" - "</macro>").tqarg(INT_MAX+1).tqarg(DBL_MAX+1); + "</macro>").arg(INT_MAX+1).arg(DBL_MAX+1); // Set the XML-document with the above string. TQDomDocument doomdocument; doomdocument.setContent(xml); @@ -762,7 +762,7 @@ void XMLHandlerTests2::testMinNum() "<variable name=\"testbool\" >true</variable>" "<variable name=\"testdouble\" > %2 </variable>" "</item>" - "</macro>").tqarg(INT_MIN).tqarg(DBL_MIN); + "</macro>").arg(INT_MIN).arg(DBL_MIN); // Set the XML-document with the above string. TQDomDocument doomdocument; doomdocument.setContent(xml); @@ -850,7 +850,7 @@ void XMLHandlerTests2::testMinNum2() "<variable name=\"testbool\" >true</variable>" "<variable name=\"testdouble\" > %2 </variable>" "</item>" - "</macro>").tqarg(INT_MIN-1).tqarg(DBL_MIN-1); + "</macro>").arg(INT_MIN-1).arg(DBL_MIN-1); // Set the XML-document with the above string. TQDomDocument doomdocument; doomdocument.setContent(xml); diff --git a/kexi/plugins/queries/kexiaddparamwidget.ui b/kexi/plugins/queries/kexiaddparamwidget.ui index ed1864f6..080f8d08 100644 --- a/kexi/plugins/queries/kexiaddparamwidget.ui +++ b/kexi/plugins/queries/kexiaddparamwidget.ui @@ -50,7 +50,7 @@ <property name="text"> <string>kexi_</string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> diff --git a/kexi/plugins/queries/kexiquerydesignerguieditor.cpp b/kexi/plugins/queries/kexiquerydesignerguieditor.cpp index c6708e7f..cfd38e3a 100644 --- a/kexi/plugins/queries/kexiquerydesignerguieditor.cpp +++ b/kexi/plugins/queries/kexiquerydesignerguieditor.cpp @@ -388,7 +388,7 @@ KexiQueryDesignerGuiEditor::buildSchema(TQString *errMsg) d->dataTable->dataAwareObject()->setCursorPosition(i,0); if (errMsg) *errMsg = i18n("Select column for table \"%1\"") - .tqarg(it.current()->at(COLUMN_ID_TABLE).toString()); + .arg(it.current()->at(COLUMN_ID_TABLE).toString()); return false; } @@ -410,7 +410,7 @@ KexiQueryDesignerGuiEditor::buildSchema(TQString *errMsg) true/*allowRelationalOperator*/); if (!criteriaExpr) {//for sanity if (errMsg) - *errMsg = i18n("Invalid criteria \"%1\"").tqarg(criteriaStr); + *errMsg = i18n("Invalid criteria \"%1\"").arg(criteriaStr); delete whereExpr; return false; } @@ -431,7 +431,7 @@ KexiQueryDesignerGuiEditor::buildSchema(TQString *errMsg) false/*!allowRelationalOperator*/); if (!columnExpr) { if (errMsg) - *errMsg = i18n("Invalid expression \"%1\"").tqarg(fieldName); + *errMsg = i18n("Invalid expression \"%1\"").arg(fieldName); return false; } temp->query()->addExpression(columnExpr, fieldVisible); @@ -901,7 +901,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal( columnAlias = query->columnAlias(row_num); if (field->isExpression()) { // if (columnAlias.isEmpty()) { -// columnAlias = i18n("expression", "expr%1").tqarg(row_num); //TODO +// columnAlias = i18n("expression", "expr%1").arg(row_num); //TODO // } // if (columnAlias.isEmpty()) //TODO: ok? perhaps do not allow to omit aliases? @@ -1239,7 +1239,7 @@ void KexiQueryDesignerGuiEditor::slotNewItemAppendedForAfterDeletingInSpreadShee item->at(COLUMN_ID_VISIBLE) = TQVariant(false, 0); //the same init as in initTableRows() } -void KexiQueryDesignerGuiEditor::slotRowInserted(KexiTableItem* item, uint row, bool /*tqrepaint*/) +void KexiQueryDesignerGuiEditor::slotRowInserted(KexiTableItem* item, uint row, bool /*repaint*/) { if (d->droppedNewItem && d->droppedNewItem==item) { createPropertySet( row, d->droppedNewTable, d->droppedNewField, true ); @@ -1449,7 +1449,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int result->allowToDiscardChanges = true; result->column = colnum; result->msg = i18n("Entered column alias \"%1\" is not a valid identifier.") - .tqarg(alias.data()); + .arg(alias.data()); result->desc = i18n("Identifiers should start with a letter or '_' character"); return; } @@ -1468,7 +1468,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int result->success = false; result->allowToDiscardChanges = true; result->column = colnum; - result->msg = i18n("Invalid expression \"%1\"").tqarg(fieldName); + result->msg = i18n("Invalid expression \"%1\"").arg(fieldName); return; } } @@ -1590,7 +1590,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int result->allowToDiscardChanges = true; result->column = colnum; result->msg = i18n("Could not set sorting for multiple columns (%1)") - .tqarg(table=="*" ? table : (table+".*")); + .arg(table=="*" ? table : (table+".*")); } } else if (colnum==COLUMN_ID_CRITERIA) { @@ -1612,7 +1612,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int result->column = colnum; if (propertySet()) result->msg = i18n("Could not set criteria for \"%1\"") - .tqarg(table=="*" ? table : field); + .arg(table=="*" ? table : field); else result->msg = i18n("Could not set criteria for empty row"); //moved to result->allowToDiscardChanges handler //d->dataTable->dataAwareObject()->cancelEditor(); //prevents further editing of this cell @@ -1638,7 +1638,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int result->success = false; result->allowToDiscardChanges = true; result->column = colnum; - result->msg = i18n("Invalid criteria \"%1\"").tqarg(newValue.toString()); + result->msg = i18n("Invalid criteria \"%1\"").arg(newValue.toString()); } } } diff --git a/kexi/plugins/queries/kexiquerydesignerguieditor.h b/kexi/plugins/queries/kexiquerydesignerguieditor.h index d96fd987..1102b1d9 100644 --- a/kexi/plugins/queries/kexiquerydesignerguieditor.h +++ b/kexi/plugins/queries/kexiquerydesignerguieditor.h @@ -129,7 +129,7 @@ class KexiQueryDesignerGuiEditor : public KexiViewBase void slotBeforeCellChanged(KexiTableItem *item, int colnum, TQVariant& newValue, KexiDB::ResultInfo* result); - void slotRowInserted(KexiTableItem* item, uint row, bool tqrepaint); + void slotRowInserted(KexiTableItem* item, uint row, bool repaint); void slotTablePositionChanged(KexiRelationViewTableContainer*); void slotAboutConnectionRemove(KexiRelationViewConnection*); void slotTableFieldDoubleClicked( KexiDB::TableSchema* table, const TQString& fieldName ); diff --git a/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp b/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp index 503b432a..e53e876c 100644 --- a/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp +++ b/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp @@ -57,14 +57,14 @@ KexiQueryDesignerSQLHistory::drawContents(TQPainter *p, int cx, int cy, int cw, for(HistoryEntry *it = m_history->first(); it; it = m_history->next()) { // it->drawItem(p, visibleWidth()); - if(clipping.intersects(it->tqgeometry(y, visibleWidth(), fontMetrics()))) + if(clipping.intersects(it->geometry(y, visibleWidth(), fontMetrics()))) { p->saveWorldMatrix(); p->translate(0, y); it->drawItem(p, visibleWidth(), colorGroup()); p->restoreWorldMatrix(); } - y += it->tqgeometry(y, visibleWidth(), fontMetrics()).height() + 5; + y += it->geometry(y, visibleWidth(), fontMetrics()).height() + 5; } } @@ -80,26 +80,26 @@ KexiQueryDesignerSQLHistory::contentsMousePressEvent(TQMouseEvent * e) { //clear it.current()->setSelected(false, colorGroup()); - updateContents(it.current()->tqgeometry(y, visibleWidth(), fontMetrics())); + updateContents(it.current()->geometry(y, visibleWidth(), fontMetrics())); } - if(it.current()->tqgeometry(y, visibleWidth(), fontMetrics()).contains(e->pos())) + if(it.current()->geometry(y, visibleWidth(), fontMetrics()).contains(e->pos())) { popupHistory = it.current(); pos = y; } - y += it.current()->tqgeometry(y, visibleWidth(), fontMetrics()).height() + 5; + y += it.current()->geometry(y, visibleWidth(), fontMetrics()).height() + 5; } //now do update if (popupHistory) { if (m_selected && m_selected != popupHistory) { m_selected->setSelected(false, colorGroup()); - updateContents(m_selected->tqgeometry(pos, visibleWidth(), fontMetrics())); + updateContents(m_selected->geometry(pos, visibleWidth(), fontMetrics())); } m_selected = popupHistory; m_selected->setSelected(true, colorGroup()); - updateContents(m_selected->tqgeometry(pos, visibleWidth(), fontMetrics())); + updateContents(m_selected->geometry(pos, visibleWidth(), fontMetrics())); if(e->button() == Qt::RightButton) { m_popup->exec(e->globalPos()); } @@ -121,7 +121,7 @@ KexiQueryDesignerSQLHistory::addEvent(const TQString& q, bool s, const TQString if (he) { if (he->statement()==q) { he->updateTime(TQTime::currentTime()); - tqrepaint(); + repaint(); return; } } @@ -137,7 +137,7 @@ KexiQueryDesignerSQLHistory::addEntry(HistoryEntry *e) int y = 0; for(HistoryEntry *it = m_history->first(); it; it = m_history->next()) { - y += it->tqgeometry(y, visibleWidth(), fontMetrics()).height() + 5; + y += it->geometry(y, visibleWidth(), fontMetrics()).height() + 5; } resizeContents(visibleWidth() - 1, y); @@ -155,7 +155,7 @@ KexiQueryDesignerSQLHistory::addEntry(HistoryEntry *e) m_selected = e; m_selected->setSelected(true, colorGroup()); // updateContents(); - updateContents(m_selected->tqgeometry(0, visibleWidth(), fontMetrics()));*/ + updateContents(m_selected->geometry(0, visibleWidth(), fontMetrics()));*/ } /*void @@ -326,7 +326,7 @@ HistoryEntry::highlight(const TQColorGroup &cg) } else { - text = TQString("<font color=\"%1\">%2").tqarg(cg.highlightedText().name()).tqarg(statement); + text = TQString("<font color=\"%1\">%2").arg(cg.highlightedText().name()).arg(statement); } TQRegExp keywords("\\b(SELECT|UPDATE|INSERT|DELETE|DROP|FROM|WHERE|AND|OR|NOT|NULL|JOIN|LEFT|RIGHT|ON|INTO|TABLE)\\b"); @@ -334,9 +334,9 @@ HistoryEntry::highlight(const TQColorGroup &cg) text = text.replace(keywords, "<b>\\1</b>"); if(!m_error.isEmpty()) -// text += ("<br>"+i18n("Error: %1").tqarg(m_error)); -// text += TQString("<br><font face=\"") + KGlobalSettings::generalFont().family() + TQString("\" size=\"-1\">") + i18n("Error: %1").tqarg(m_error) + "</font>"; - text += TQString("<br><font face=\"") + KGlobalSettings::generalFont().family() + TQString("\">") + i18n("Error: %1").tqarg(m_error) + "</font>"; +// text += ("<br>"+i18n("Error: %1").arg(m_error)); +// text += TQString("<br><font face=\"") + KGlobalSettings::generalFont().family() + TQString("\" size=\"-1\">") + i18n("Error: %1").arg(m_error) + "</font>"; + text += TQString("<br><font face=\"") + KGlobalSettings::generalFont().family() + TQString("\">") + i18n("Error: %1").arg(m_error) + "</font>"; kdDebug() << "HistoryEntry::highlight() text:" << text << endl; // m_formated = new TQSimpleRichText(text, TQFont("courier", 8)); @@ -352,7 +352,7 @@ HistoryEntry::setSelected(bool selected, const TQColorGroup &cg) } TQRect -HistoryEntry::tqgeometry(int y, int width, TQFontMetrics f) +HistoryEntry::geometry(int y, int width, TQFontMetrics f) { Q_UNUSED( f ); diff --git a/kexi/plugins/queries/kexiquerydesignersqlhistory.h b/kexi/plugins/queries/kexiquerydesignersqlhistory.h index a6d55285..6c828c39 100644 --- a/kexi/plugins/queries/kexiquerydesignersqlhistory.h +++ b/kexi/plugins/queries/kexiquerydesignersqlhistory.h @@ -36,7 +36,7 @@ class HistoryEntry HistoryEntry(bool success, const TQTime &time, const TQString &statement, /*int y,*/ const TQString &error = TQString()); ~HistoryEntry(); - TQRect tqgeometry(int y, int width, TQFontMetrics f); + TQRect geometry(int y, int width, TQFontMetrics f); void drawItem(TQPainter *p, int width, const TQColorGroup &cg); void setSelected(bool selected, const TQColorGroup &cg); diff --git a/kexi/plugins/reports/kexireportfactory.cpp b/kexi/plugins/reports/kexireportfactory.cpp index dfa8d0d0..7cf7dae9 100644 --- a/kexi/plugins/reports/kexireportfactory.cpp +++ b/kexi/plugins/reports/kexireportfactory.cpp @@ -139,7 +139,7 @@ KexiReportFactory::startEditing(const TQCString &c, TQWidget *w, KFormDesigner:: editText(); } else - createEditor(c, label->text(), label, container, label->tqgeometry(), label->tqalignment()); + createEditor(c, label->text(), label, container, label->geometry(), label->alignment()); return true; } return false; @@ -153,7 +153,7 @@ KexiReportFactory::isPropertyVisibleInternal(const TQCString &classname, TQWidge return false; } else if(classname == "PicLabel") { - if((property == "text") || (property == "indent") || (property == "textFormat") || (property == "font") || (property == "tqalignment")) + if((property == "text") || (property == "indent") || (property == "textFormat") || (property == "font") || (property == "alignment")) return false; } diff --git a/kexi/plugins/reports/kexireportform.cpp b/kexi/plugins/reports/kexireportform.cpp index b0731167..cacf40b7 100644 --- a/kexi/plugins/reports/kexireportform.cpp +++ b/kexi/plugins/reports/kexireportform.cpp @@ -40,13 +40,13 @@ KexiReportForm::~KexiReportForm() kexipluginsdbg << "KexiReportForm::~KexiReportForm(): close" << endl; } -//tqrepaint all tqchildren widgets +//repaint all children widgets static void repaintAll(TQWidget *w) { TQObjectList *list = w->queryList(TQWIDGET_OBJECT_NAME_STRING); TQObjectListIt it(*list); for (TQObject *obj; (obj=it.current()); ++it ) { - static_cast<TQWidget*>(obj)->tqrepaint(); + static_cast<TQWidget*>(obj)->repaint(); } delete list; } @@ -144,7 +144,7 @@ KexiReportForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint TQPixmap pix2 = TQPixmap::grabWidget(to); if((from != this) && (to != this)) - p.drawLine( from->parentWidget()->mapTo(this, from->tqgeometry().center()), to->parentWidget()->mapTo(this, to->tqgeometry().center()) ); + p.drawLine( from->parentWidget()->mapTo(this, from->geometry().center()), to->parentWidget()->mapTo(this, to->geometry().center()) ); p.drawPixmap(fromPoint.x(), fromPoint.y(), pix1); p.drawPixmap(toPoint.x(), toPoint.y(), pix2); diff --git a/kexi/plugins/scripting/kexidb/kexidbconnection.cpp b/kexi/plugins/scripting/kexidb/kexidbconnection.cpp index f64a089f..9d577ec1 100644 --- a/kexi/plugins/scripting/kexidb/kexidbconnection.cpp +++ b/kexi/plugins/scripting/kexidb/kexidbconnection.cpp @@ -102,7 +102,7 @@ const TQString KexiDBConnection::getClassName() const { if(! m_connection) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::Connection is NULL.")) ); //if(m_connection->error()) - // throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::Connection error: %1").tqarg(m_connection->errorMsg())) ); + // throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::Connection error: %1").arg(m_connection->errorMsg())) ); return m_connection; } @@ -140,9 +140,9 @@ KexiDBCursor* KexiDBConnection::executeQueryString(const TQString& sqlquery) { // or e.g. a DROP TABLE operation. So, let's check for such dangerous operations right now. ::KexiDB::Parser parser( connection() ); if(! parser.parse(sqlquery)) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to parse query: %1 %2").tqarg(parser.error().type()).tqarg(parser.error().error())) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to parse query: %1 %2").arg(parser.error().type()).arg(parser.error().error())) ); if( parser.query() == 0 || parser.operation() != ::KexiDB::Parser::OP_Select ) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid query operation \"%1\"").tqarg(parser.operationString()) ) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid query operation \"%1\"").arg(parser.operationString()) ) ); ::KexiDB::Cursor* cursor = connection()->executeQuery(sqlquery); return cursor ? new KexiDBCursor(cursor) : 0; } diff --git a/kexi/plugins/scripting/kexidb/kexidbdrivermanager.cpp b/kexi/plugins/scripting/kexidb/kexidbdrivermanager.cpp index c2475276..74723bc3 100644 --- a/kexi/plugins/scripting/kexidb/kexidbdrivermanager.cpp +++ b/kexi/plugins/scripting/kexidb/kexidbdrivermanager.cpp @@ -66,7 +66,7 @@ const TQString KexiDBDriverManager::getClassName() const { KexiDB::DriverManager& KexiDBDriverManager::driverManager() { if(m_drivermanager.error()) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::DriverManager error: %1").tqarg(m_drivermanager.errorMsg())) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::DriverManager error: %1").arg(m_drivermanager.errorMsg())) ); return m_drivermanager; } @@ -77,7 +77,7 @@ const TQStringList KexiDBDriverManager::driverNames() { KexiDBDriver* KexiDBDriverManager::driver(const TQString& drivername) { TQGuardedPtr< ::KexiDB::Driver > driver = driverManager().driver(drivername); // caching is done by the DriverManager if(! driver) return 0; - if(driver->error()) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::Driver error for drivername '%1': %2").tqarg(drivername).tqarg(driver->errorMsg())) ); + if(driver->error()) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::Driver error for drivername '%1': %2").arg(drivername).arg(driver->errorMsg())) ); return new KexiDBDriver(driver); } diff --git a/kexi/plugins/scripting/kexidb/kexidbschema.cpp b/kexi/plugins/scripting/kexidb/kexidbschema.cpp index 2ac40342..c45eedfc 100644 --- a/kexi/plugins/scripting/kexidb/kexidbschema.cpp +++ b/kexi/plugins/scripting/kexidb/kexidbschema.cpp @@ -179,11 +179,11 @@ bool KexiDBQuerySchema::setWhereExpression(const TQString& whereexpression) { ::KexiDB::Field* field = static_cast< ::KexiDB::QuerySchema* >(m_schema)->field(key); if(! field) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid WHERE-expression: Field \"%1\" does not exists in tableschema \"%2\".").tqarg(key).tqarg(m_schema->name())) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid WHERE-expression: Field \"%1\" does not exists in tableschema \"%2\".").arg(key).arg(m_schema->name())) ); TQVariant v(value); if(! v.cast(field->variantType())) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid WHERE-expression: The for Field \"%1\" defined value is of type \"%2\" rather then the expected type \"%3\"").tqarg(key).tqarg(v.typeName()).tqarg(field->variantType())) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid WHERE-expression: The for Field \"%1\" defined value is of type \"%2\" rather then the expected type \"%3\"").arg(key).arg(v.typeName()).arg(field->variantType())) ); static_cast< ::KexiDB::QuerySchema* >(m_schema)->addToWhereExpression(field,v); } diff --git a/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp b/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp index 421bc31f..ed3b99e2 100644 --- a/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp +++ b/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp @@ -191,7 +191,7 @@ void KexiScriptDesignView::slotPropertyChanged(KoProperty::Set& /*set*/, KoPrope if(property.name() == "language") { TQString language = property.value().toString(); - kdDebug() << TQString("KexiScriptDesignView::slotPropertyChanged() language=%1").tqarg(language) << endl; + kdDebug() << TQString("KexiScriptDesignView::slotPropertyChanged() language=%1").arg(language) << endl; d->scriptaction->setInterpreterName( language ); // We assume Kross and the HighlightingInterface are using same // names for the support languages... @@ -201,7 +201,7 @@ void KexiScriptDesignView::slotPropertyChanged(KoProperty::Set& /*set*/, KoPrope else { bool ok = d->scriptaction->setOption( property.name(), property.value() ); if(! ok) { - kdWarning() << TQString("KexiScriptDesignView::slotPropertyChanged() unknown property '%1'.").tqarg(TQString(property.name())) << endl; + kdWarning() << TQString("KexiScriptDesignView::slotPropertyChanged() unknown property '%1'.").arg(TQString(property.name())) << endl; return; } } @@ -214,12 +214,12 @@ void KexiScriptDesignView::execute() d->statusbrowser->clear(); TQTime time; time.start(); - d->statusbrowser->append( i18n("Execution of the script \"%1\" started.").tqarg(d->scriptaction->name()) ); + d->statusbrowser->append( i18n("Execution of the script \"%1\" started.").arg(d->scriptaction->name()) ); d->scriptaction->activate(); if( d->scriptaction->hadException() ) { TQString errormessage = d->scriptaction->getException()->getError(); - d->statusbrowser->append(TQString("<b>%2</b><br>").tqarg(TQStyleSheet::escape(errormessage)) ); + d->statusbrowser->append(TQString("<b>%2</b><br>").arg(TQStyleSheet::escape(errormessage)) ); TQString tracedetails = d->scriptaction->getException()->getTrace(); d->statusbrowser->append( TQStyleSheet::escape(tracedetails) ); @@ -229,7 +229,7 @@ void KexiScriptDesignView::execute() d->editor->setLineNo(lineno); } else { - d->statusbrowser->append( i18n("Successfully executed. Time elapsed: %1ms").tqarg(time.elapsed()) ); + d->statusbrowser->append( i18n("Successfully executed. Time elapsed: %1ms").arg(time.elapsed()) ); } } diff --git a/kexi/plugins/scripting/kexiscripting/kexiscripteditor.cpp b/kexi/plugins/scripting/kexiscripting/kexiscripteditor.cpp index 8aec288b..08820522 100644 --- a/kexi/plugins/scripting/kexiscripting/kexiscripteditor.cpp +++ b/kexi/plugins/scripting/kexiscripting/kexiscripteditor.cpp @@ -76,7 +76,7 @@ void KexiScriptEditor::initialize(Kross::Api::ScriptAction* scriptaction) "support in Kexi. The scripting API may change in details\n" "in the next Kexi version.\n" "For more information and documentation see\n%1" - ).tqarg("http://www.kexi-project.org/scripting/"), true).join("\n# ") + "\n"; + ).arg("http://www.kexi-project.org/scripting/"), true).join("\n# ") + "\n"; } KexiEditor::setText(code); // We assume Kross and the HighlightingInterface are using same diff --git a/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp b/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp index cb66734d..84fbe4ec 100644 --- a/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp +++ b/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp @@ -95,7 +95,7 @@ bool KexiScriptPart::execute(KexiPart::Item* item, TQObject* sender) bool exec = (dontask == "yes"); if( !exec && dontask != "no" ) { exec = KMessageBox::warningContinueCancel(0, - i18n("Do you want to execute the script \"%1\"?\n\nScripts obtained from unknown sources can contain dangerous code.").tqarg(scriptaction->text()), + i18n("Do you want to execute the script \"%1\"?\n\nScripts obtained from unknown sources can contain dangerous code.").arg(scriptaction->text()), i18n("Execute Script?"), KGuiItem(i18n("Execute"), "exec"), dontAskAgainName, KMessageBox::Notify | KMessageBox::Dangerous ) == KMessageBox::Continue; diff --git a/kexi/plugins/tables/kexitabledesignercommands.cpp b/kexi/plugins/tables/kexitabledesignercommands.cpp index 298363c4..c5368b26 100644 --- a/kexi/plugins/tables/kexitabledesignercommands.cpp +++ b/kexi/plugins/tables/kexitabledesignercommands.cpp @@ -72,8 +72,8 @@ ChangeFieldPropertyCommand::~ChangeFieldPropertyCommand() TQString ChangeFieldPropertyCommand::name() const { return i18n("Change \"%1\" property for table field from \"%2\" to \"%3\"") - .tqarg(m_alterTableAction.propertyName()).tqarg(m_oldValue.toString()) - .tqarg(m_alterTableAction.newValue().toString()); + .arg(m_alterTableAction.propertyName()).arg(m_oldValue.toString()) + .arg(m_alterTableAction.newValue().toString()); } TQString ChangeFieldPropertyCommand::debugString() @@ -81,15 +81,15 @@ TQString ChangeFieldPropertyCommand::debugString() TQString s( name() ); if (m_oldListData || m_listData) s += TQString("\nAnd list data from [%1]\n to [%2]") - .tqarg( m_oldListData ? + .arg( m_oldListData ? TQString("%1 -> %2") - .tqarg(m_oldListData->keysAsStringList().join(",")).tqarg(m_oldListData->names.join(",")) + .arg(m_oldListData->keysAsStringList().join(",")).arg(m_oldListData->names.join(",")) : TQString("<NONE>")) - .tqarg( m_listData ? + .arg( m_listData ? TQString("%1 -> %2") - .tqarg(m_listData->keysAsStringList().join(",")).tqarg(m_listData->names.join(",")) + .arg(m_listData->keysAsStringList().join(",")).arg(m_listData->names.join(",")) : TQString("<NONE>")); - return s + TQString(" (UID=%1)").tqarg(m_alterTableAction.uid()); + return s + TQString(" (UID=%1)").arg(m_alterTableAction.uid()); } void ChangeFieldPropertyCommand::execute() @@ -136,9 +136,9 @@ RemoveFieldCommand::~RemoveFieldCommand() TQString RemoveFieldCommand::name() const { if (m_set) - return i18n("Remove table field \"%1\"").tqarg(m_alterTableAction.fieldName()); + return i18n("Remove table field \"%1\"").arg(m_alterTableAction.fieldName()); - return TQString("Remove empty row at position %1").tqarg(m_fieldIndex); + return TQString("Remove empty row at position %1").arg(m_fieldIndex); } void RemoveFieldCommand::execute() @@ -161,7 +161,7 @@ TQString RemoveFieldCommand::debugString() return name() + "\nAT ROW " + TQString::number(m_fieldIndex) + ", FIELD: " + (*m_set)["caption"].value().toString() - + TQString(" (UID=%1)").tqarg(m_alterTableAction.uid()); + + TQString(" (UID=%1)").arg(m_alterTableAction.uid()); } KexiDB::AlterTableHandler::ActionBase* RemoveFieldCommand::createAction() @@ -192,7 +192,7 @@ InsertFieldCommand::~InsertFieldCommand() TQString InsertFieldCommand::name() const { - return i18n("Insert table field \"%1\"").tqarg(m_set["caption"].value().toString()); + return i18n("Insert table field \"%1\"").arg(m_set["caption"].value().toString()); } void InsertFieldCommand::execute() @@ -229,9 +229,9 @@ ChangePropertyVisibilityCommand::~ChangePropertyVisibilityCommand() TQString ChangePropertyVisibilityCommand::name() const { return TQString("[internal] Change \"%1\" visibility from \"%2\" to \"%3\"") - .tqarg(m_alterTableAction.propertyName()) - .tqarg(m_oldVisibility ? "true" : "false") - .tqarg(m_alterTableAction.newValue().toBool() ? "true" : "false"); + .arg(m_alterTableAction.propertyName()) + .arg(m_oldVisibility ? "true" : "false") + .arg(m_alterTableAction.newValue().toBool() ? "true" : "false"); } void ChangePropertyVisibilityCommand::execute() @@ -265,7 +265,7 @@ InsertEmptyRowCommand::~InsertEmptyRowCommand() TQString InsertEmptyRowCommand::name() const { - return TQString("Insert empty row at position %1").tqarg(m_row); + return TQString("Insert empty row at position %1").arg(m_row); } void InsertEmptyRowCommand::execute() diff --git a/kexi/plugins/tables/kexitabledesignerview.cpp b/kexi/plugins/tables/kexitabledesignerview.cpp index 190e9834..ea337d36 100644 --- a/kexi/plugins/tables/kexitabledesignerview.cpp +++ b/kexi/plugins/tables/kexitabledesignerview.cpp @@ -495,11 +495,11 @@ void KexiTableDesignerView::slotTogglePrimaryKey() /* CommandGroup *setPrimaryKeyCommand; if (isSet) { setPrimaryKeyCommand = new CommandGroup(i18n("Set primary key for field \"%1\"") - .tqarg(set["name"].value().toString()) ); + .arg(set["name"].value().toString()) ); } else { setPrimaryKeyCommand = new CommandGroup(i18n("Unset primary key for field \"%1\"") - .tqarg(set["name"].value().toString()) ); + .arg(set["name"].value().toString()) ); } switchPrimaryKey(set, isSet, false, setPrimaryKeyCommand);*/ //addHistoryCommand( setPrimaryKeyCommand, false /* !execute */ ); @@ -687,8 +687,8 @@ void KexiTableDesignerView::slotBeforeCellChanged( //remember this action containing 2 subactions CommandGroup *changeCaptionAndNameCommand = new CommandGroup( i18n("Change \"%1\" field's name to \"%2\" and caption from \"%3\" to \"%4\"") - .tqarg(oldName).tqarg(propertySetForItem->property("name").value().toString()) - .tqarg(oldCaption).tqarg(newValue.toString() )); + .arg(oldName).arg(propertySetForItem->property("name").value().toString()) + .arg(oldCaption).arg(newValue.toString() )); changeCaptionAndNameCommand->addCommand( changeCaptionCommand ); // new ChangeFieldPropertyCommand( this, *propertySetForItem, // "caption", oldCaption, newValue) @@ -759,7 +759,7 @@ void KexiTableDesignerView::slotBeforeCellChanged( // *** this action contains subactions *** CommandGroup *changeDataTypeCommand = new CommandGroup( i18n("Change data type for field \"%1\" to \"%2\"") - .tqarg(set["name"].value().toString()).tqarg( KexiDB::Field::typeName( fieldType ) ) ); + .arg(set["name"].value().toString()).arg( KexiDB::Field::typeName( fieldType ) ) ); //kexipluginsdbg << "++++++++++" << slist << nlist << endl; @@ -968,13 +968,13 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty //switchPrimaryKey(set, true); // this will be toplevel command setAutonumberCommand = new CommandGroup( - i18n("Assign autonumber for field \"%1\"").tqarg(set["name"].value().toString()) ); + i18n("Assign autonumber for field \"%1\"").arg(set["name"].value().toString()) ); toplevelCommand = setAutonumberCommand; d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(true,1), setAutonumberCommand ); } else { setAutonumberCommand = new CommandGroup( - i18n("Remove autonumber from field \"%1\"").tqarg(set["name"].value().toString()) ); + i18n("Remove autonumber from field \"%1\"").arg(set["name"].value().toString()) ); //d->slotPropertyChanged_enabled = false; // set["autoIncrement"].setValue( TQVariant(false,1), false/*don't save old*/); // d->slotPropertyChanged_enabled = true; @@ -995,7 +995,7 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty setPrimaryKey = false; // this will be toplevel command CommandGroup *unsetIndexedOrUniquOrNotNullCommand = new CommandGroup( - i18n("Set \"%1\" property for field \"%2\"").tqarg(property.caption()).tqarg(set["name"].value().toString()) ); + i18n("Set \"%1\" property for field \"%2\"").arg(property.caption()).arg(set["name"].value().toString()) ); toplevelCommand = unsetIndexedOrUniquOrNotNullCommand; d->setPropertyValueIfNeeded( set, pname, TQVariant(false,1), unsetIndexedOrUniquOrNotNullCommand ); if (pname=="notNull") { @@ -1040,8 +1040,8 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty // kdDebug() << set["type"].value() << endl; // if (KexiDB::Field::typeGroup( set["type"].value().toInt() ) == (int)KexiDB::Field::TextGroup) { CommandGroup* changeFieldTypeCommand = new CommandGroup( - i18n("Change type for field \"%1\" to \"%2\"").tqarg(set["name"].value().toString()) - .tqarg(typeName) ); + i18n("Change type for field \"%1\" to \"%2\"").arg(set["name"].value().toString()) + .arg(typeName) ); d->setPropertyValueIfNeeded( set, "subType", property.value(), property.oldValue(), changeFieldTypeCommand ); @@ -1085,7 +1085,7 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty //this action contains subactions CommandGroup *setPrimaryKeyCommand = new CommandGroup( i18n("Set primary key for field \"%1\"") - .tqarg(set["name"].value().toString()) ); + .arg(set["name"].value().toString()) ); if (toplevelCommand) toplevelCommand->addCommand( setPrimaryKeyCommand ); else @@ -1111,7 +1111,7 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty //remember this action containing 2 subactions CommandGroup *setPrimaryKeyCommand = new CommandGroup( i18n("Unset primary key for field \"%1\"") - .tqarg(set["name"].value().toString()) ); + .arg(set["name"].value().toString()) ); if (toplevelCommand) toplevelCommand->addCommand( setPrimaryKeyCommand ); else @@ -1147,10 +1147,10 @@ void KexiTableDesignerView::slotRowInserted() } void KexiTableDesignerView::slotAboutToDeleteRow( - KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint) + KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint) { Q_UNUSED(result) - Q_UNUSED(tqrepaint) + Q_UNUSED(repaint) if (item[COLUMN_ID_ICON].toString()=="key") d->primaryKeyExists = false; @@ -1213,7 +1213,7 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be "for creating relations between database tables. " "Do you want to add primary key automatically now?</p>" "<p>If you want to add a primary key by hand, press \"Cancel\" " - "to cancel saving table design.</p>").tqarg(schema.name()), + "to cancel saving table design.</p>").arg(schema.name()), TQString(), KGuiItem(i18n("&Add Primary Key"), "key"), KStdGuiItem::no(), "autogeneratePrimaryKeysOnTableDesignSaving"); if (questionRes==KMessageBox::Cancel) { @@ -1229,9 +1229,9 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be KoProperty::Set *set = d->sets->at(i); if (set) { if ((*set)["name"].value().toString() - == pkFieldName.tqarg(idIndex==1?TQString() : TQString::number(idIndex)) + == pkFieldName.arg(idIndex==1?TQString() : TQString::number(idIndex)) || (*set)["caption"].value().toString() - == pkFieldCaption.tqarg(idIndex==1?TQString() : TQString::number(idIndex))) + == pkFieldCaption.arg(idIndex==1?TQString() : TQString::number(idIndex))) { //try next id index i = 0; @@ -1241,8 +1241,8 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be } i++; } - pkFieldName = pkFieldName.tqarg(idIndex==1?TQString() : TQString::number(idIndex)); - pkFieldCaption = pkFieldCaption.tqarg(idIndex==1?TQString() : TQString::number(idIndex)); + pkFieldName = pkFieldName.arg(idIndex==1?TQString() : TQString::number(idIndex)); + pkFieldCaption = pkFieldCaption.arg(idIndex==1?TQString() : TQString::number(idIndex)); //ok, add PK with such unique name d->view->insertEmptyRow(0); d->view->setCursorPosition(0, COLUMN_ID_CAPTION); @@ -1273,7 +1273,7 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be if (beSilent) { kexipluginswarn << TQString("KexiTableDesignerView::buildSchema(): no field caption entered at row %1...") - .tqarg(i+1) << endl; + .arg(i+1) << endl; } else { d->view->setCursorPosition(i, COLUMN_ID_CAPTION); @@ -1304,7 +1304,7 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be if (beSilent) { kexipluginswarn << TQString("KexiTableDesignerView::buildSchema(): duplicated field name '%1'") - .tqarg((*b)["name"].value().toString()) << endl; + .arg((*b)["name"].value().toString()) << endl; } else { d->view->setCursorPosition(i, COLUMN_ID_CAPTION); @@ -1313,7 +1313,7 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be KMessageBox::sorry(this, i18n("You have added \"%1\" field name twice.\nField names cannot be repeated. " "Correct name of the field.") - .tqarg((*b)["name"].value().toString()) ); + .arg((*b)["name"].value().toString()) ); } res = cancelled; } @@ -1457,7 +1457,7 @@ tristate KexiTableDesignerView::storeData(bool dontAsk) this, *conn, *tempData()->table, i18n("You are about to change the design of table \"%1\" " "but following objects using this table are opened:") - .tqarg(tempData()->table->name())); + .arg(tempData()->table->name())); } if (res == true) { @@ -1659,7 +1659,7 @@ void KexiTableDesignerView::slotAboutToShowContextMenu() if (captionOrName.isEmpty()) captionOrName = set["name"].value().toString(); //! @todo show "field" icon - d->contextMenuTitle->setTitle( i18n("Table field \"%1\"").tqarg(captionOrName) ); + d->contextMenuTitle->setTitle( i18n("Table field \"%1\"").arg(captionOrName) ); } else { d->contextMenuTitle->setTitle( i18n("Empty table row", "Empty Row") ); diff --git a/kexi/plugins/tables/kexitabledesignerview.h b/kexi/plugins/tables/kexitabledesignerview.h index 13ce495d..5b9d0215 100644 --- a/kexi/plugins/tables/kexitabledesignerview.h +++ b/kexi/plugins/tables/kexitabledesignerview.h @@ -146,10 +146,10 @@ class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInte //! Called before row inserting in tableview. void slotRowInserted(); -// void slotAboutToInsertRow(KexiTableItem* item, KexiDB::ResultInfo* result, bool tqrepaint); +// void slotAboutToInsertRow(KexiTableItem* item, KexiDB::ResultInfo* result, bool repaint); //! Called before row deleting in tableview. - void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint); + void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint); /*! Called after any property has been changed in the current property set, to perform some actions (like updating other dependent properties) */ diff --git a/kexi/plugins/tables/kexitablepart.cpp b/kexi/plugins/tables/kexitablepart.cpp index 4efd237a..55c8be5d 100644 --- a/kexi/plugins/tables/kexitablepart.cpp +++ b/kexi/plugins/tables/kexitablepart.cpp @@ -137,7 +137,7 @@ bool KexiTablePart::remove(KexiMainWindow *win, KexiPart::Item &item) tristate res = KexiTablePart::askForClosingObjectsUsingTableSchema( win, *conn, *sch, i18n("You are about to remove table \"%1\" but following objects using this table are opened:") - .tqarg(sch->name())); + .arg(sch->name())); return true == conn->dropTable( sch ); } //last chance: just remove item @@ -182,7 +182,7 @@ tristate KexiTablePart::askForClosingObjectsUsingTableSchema(TQWidget *parent, K TQString openedObjectsStr = "<ul>"; for (TQPtrListIterator<KexiDB::Connection::TableSchemaChangeListenerInterface> it(*listeners); it.current(); ++it) { - openedObjectsStr += TQString("<li>%1</li>").tqarg(it.current()->listenerInfoString); + openedObjectsStr += TQString("<li>%1</li>").arg(it.current()->listenerInfoString); } openedObjectsStr += "</ul>"; int r = KMessageBox::questionYesNo(parent, |