diff options
Diffstat (limited to 'kexi')
47 files changed, 280 insertions, 280 deletions
diff --git a/kexi/core/kexidialogbase.cpp b/kexi/core/kexidialogbase.cpp index 7b57d673..f8067ddd 100644 --- a/kexi/core/kexidialogbase.cpp +++ b/kexi/core/kexidialogbase.cpp @@ -43,7 +43,7 @@ KexiDialogBase::KexiDialogBase(KexiMainWindow *parent, const TQString &caption) : KMdiChildView(caption, parent, "KexiDialogBase") - , KexiActionProxy(TQT_TQOBJECT(this), parent) + , KexiActionProxy(this, parent) , m_isRegistered(false) , m_origCaption(caption) , m_schemaData(0) @@ -100,7 +100,7 @@ void KexiDialogBase::addView(KexiViewBase *view, int mode) // addActionProxyChild( view ); //set focus proxy inside this view - TQWidget *ch = TQT_TQWIDGET(view->child( 0, "TQWidget", false )); + TQWidget *ch = static_cast<TQWidget*>(view->child( 0, "TQWidget", false )); if (ch) view->setFocusProxy(ch); @@ -191,7 +191,7 @@ void KexiDialogBase::closeEvent( TQCloseEvent * e ) TQObjectList *list = m_stack->queryList( "KexiViewBase", 0, false, false); KexiViewBase *view; TQObjectListIt it( *list ); - for ( ;(view = static_cast<KexiViewBase*>(TQT_TQWIDGET(it.current())) ) != 0; ++it ) { + for ( ;(view = static_cast<KexiViewBase*>(it.current()) ) != 0; ++it ) { bool cancel = false; emit view->closing(cancel); if (cancel) { @@ -394,7 +394,7 @@ tristate KexiDialogBase::switchToViewMode( int newViewMode, TQMap<TQString,TQStr addActionProxyChild( newView ); //new proxy child m_stack->raiseWidget( newView ); newView->propertySetSwitched(); - m_parentWindow->invalidateSharedActions( TQT_TQOBJECT(newView) ); + m_parentWindow->invalidateSharedActions( newView ); TQTimer::singleShot(10, newView, TQT_SLOT(setFocus())); //newView->setFocus(); //js ok? // setFocus(); return true; @@ -439,7 +439,7 @@ bool KexiDialogBase::eventFilter(TQObject *obj, TQEvent *e) }*/ if ((e->type()==TQEvent::FocusIn && m_parentWindow->activeWindow()==this) || e->type()==TQEvent::MouseButtonPress) { - if (m_stack->visibleWidget() && KexiUtils::hasParent(TQT_TQOBJECT(m_stack->visibleWidget()), obj)) { + if (m_stack->visibleWidget() && KexiUtils::hasParent(m_stack->visibleWidget(), obj)) { //pass the activation activate(); } @@ -625,7 +625,7 @@ void KexiDialogBase::activate() { KexiViewBase *v = selectedView(); //kdDebug() << "focusWidget(): " << focusWidget()->name() << endl; - if (KexiUtils::hasParent( TQT_TQOBJECT(v), TQT_TQOBJECT(KMdiChildView::focusedChildWidget())))//focusWidget())) + if (KexiUtils::hasParent( v, KMdiChildView::focusedChildWidget()))//focusWidget())) KMdiChildView::activate(); else {//ah, focused widget is not in this view, move focus: if (v) diff --git a/kexi/core/kexipart.cpp b/kexi/core/kexipart.cpp index e907110a..48b4f9f0 100644 --- a/kexi/core/kexipart.cpp +++ b/kexi/core/kexipart.cpp @@ -392,7 +392,7 @@ bool Part::remove(KexiMainWindow *win, KexiPart::Item &item) KexiDialogTempData* Part::createTempData(KexiDialogBase* dialog) { - return new KexiDialogTempData(TQT_TQOBJECT(dialog)); + return new KexiDialogTempData(dialog); } TQString Part::i18nMessage(const TQCString& englishMessage, KexiDialogBase* dlg) const diff --git a/kexi/core/kexisharedactionhost.cpp b/kexi/core/kexisharedactionhost.cpp index 20eae6c4..5370ba57 100644 --- a/kexi/core/kexisharedactionhost.cpp +++ b/kexi/core/kexisharedactionhost.cpp @@ -202,12 +202,12 @@ TQWidget* KexiSharedActionHost::focusWindow() fw = dynamic_cast<KMdiMainFrm*>(d->mainWin)->activeWindow(); } else { - TQWidget *aw = TQT_TQWIDGET(tqApp->activeWindow()); + TQWidget *aw = tqApp->activeWindow(); if (!aw) aw = d->mainWin; fw = aw->focusWidget(); } - while (fw && !acceptsSharedActions(TQT_TQOBJECT(fw))) + while (fw && !acceptsSharedActions(fw)) fw = fw->parentWidget(); return fw; } diff --git a/kexi/core/kexiviewbase.cpp b/kexi/core/kexiviewbase.cpp index c2a3f2a5..b7f09355 100644 --- a/kexi/core/kexiviewbase.cpp +++ b/kexi/core/kexiviewbase.cpp @@ -32,7 +32,7 @@ KexiViewBase::KexiViewBase(KexiMainWindow *mainWin, TQWidget *parent, const char *name) : TQWidget(parent, name) - , KexiActionProxy(TQT_TQOBJECT(this), mainWin) + , KexiActionProxy(this, mainWin) , m_mainWin(mainWin) , m_viewWidget(0) , m_parentView(0) @@ -214,10 +214,10 @@ bool KexiViewBase::eventFilter( TQObject *o, TQEvent *e ) { if (e->type()==TQEvent::FocusIn || e->type()==TQEvent::FocusOut) {// && o->inherits("TQWidget")) { // //hp==true if currently focused widget is a child of this table view -// const bool hp = Kexi::hasParent( static_cast<TQWidget*>(o), focusWidget()); +// const bool hp = Kexi::hasParent( o, focusWidget()); // kexidbg << "KexiViewBase::eventFilter(): " << o->name() << " " << e->type() << endl; - if (KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(o))) { - if (e->type()==TQEvent::FocusOut && focusWidget() && !KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(focusWidget()))) { + if (KexiUtils::hasParent( this, o)) { + if (e->type()==TQEvent::FocusOut && focusWidget() && !KexiUtils::hasParent( this, focusWidget())) { //focus out: when currently focused widget is not a parent of this view emit focus(false); } else if (e->type()==TQEvent::FocusIn) { @@ -231,9 +231,9 @@ bool KexiViewBase::eventFilter( TQObject *o, TQEvent *e ) if (v) { while (v->m_parentView) v = v->m_parentView; - if (KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(v->focusWidget()) )) - v->m_lastFocusedChildBeforeFocusOut = static_cast<TQWidget*>(v->focusWidget()); -// v->m_lastFocusedChildBeforeFocusOut = static_cast<TQWidget*>(o); //focusWidget(); + if (KexiUtils::hasParent( this, v->focusWidget() )) + v->m_lastFocusedChildBeforeFocusOut = v->focusWidget(); +// v->m_lastFocusedChildBeforeFocusOut = o; //focusWidget(); } } @@ -286,7 +286,7 @@ void KexiViewBase::setFocus() else setFocusInternal(); } - m_mainWin->invalidateSharedActions(TQT_TQOBJECT(this)); + m_mainWin->invalidateSharedActions(this); } TDEAction* KexiViewBase::sharedAction( const char *action_name ) diff --git a/kexi/formeditor/container.cpp b/kexi/formeditor/container.cpp index ae75caa2..d1a4b1b6 100644 --- a/kexi/formeditor/container.cpp +++ b/kexi/formeditor/container.cpp @@ -50,7 +50,7 @@ EventEater::EventEater(TQWidget *widget, TQObject *container) m_widget = widget; m_container = container; - installRecursiveEventFilter(TQT_TQOBJECT(m_widget), this); + installRecursiveEventFilter(m_widget, this); } bool @@ -83,7 +83,7 @@ EventEater::eventFilter(TQObject *, TQEvent *ev) EventEater::~EventEater() { if(m_widget) - removeRecursiveEventFilter(TQT_TQOBJECT(m_widget), TQT_TQOBJECT(this)); + removeRecursiveEventFilter(m_widget, this); } // Container itself @@ -161,7 +161,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) << "of type " << s->className() << endl; kdDebug() << "TQEvent::MouseButtonPress this = " << name() << endl; - m_moving = TQT_TQWIDGET(s); + m_moving = static_cast<TQWidget*>(s); TQMouseEvent *mev = static_cast<TQMouseEvent*>(e); m_grab = TQPoint(mev->x(), mev->y()); @@ -217,7 +217,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) tmpy *= gridX; } - m_insertBegin = (TQT_TQWIDGET(s))->mapTo(m_container, TQPoint(tmpx, tmpy)); + m_insertBegin = (static_cast<TQWidget*>(s))->mapTo(m_container, TQPoint(tmpx, tmpy)); if(m_form->formWidget()) m_form->formWidget()->initBuffer(); @@ -268,7 +268,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) return true; if(m_form->formWidget() && (tree->widget() != s)) - m_form->formWidget()->highlightWidgets(tree->widget(), TQT_TQWIDGET(s)); + m_form->formWidget()->highlightWidgets(tree->widget(), static_cast<TQWidget*>(s)); } else if(m_insertBegin!=TQPoint(-1,-1) && s == m_container && !m_toplevel && (mev->state() != TQt::ControlButton) && !FormManager::self()->isCreatingConnection()) // draw the selection rect { @@ -379,7 +379,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) } else if(kev->key() == FormManager::self()->contextMenuKey()) { - FormManager::self()->createContextMenu(TQT_TQWIDGET(s), this, false); + FormManager::self()->createContextMenu(static_cast<TQWidget*>(s), this, false); return true; } else if (kev->key() == Key_Delete) @@ -448,7 +448,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) case TQEvent::MouseButtonDblClick: // editing { kdDebug() << "Container: Mouse dbl click for widget " << s->name() << endl; - TQWidget *w = TQT_TQWIDGET(s); + TQWidget *w = static_cast<TQWidget*>(s); if(!w) return false; @@ -494,7 +494,7 @@ Container::handleMouseReleaseEvent(TQObject *s, TQMouseEvent *mev) } if(mev->button() == TQt::RightButton) // Right-click -> context menu { - FormManager::self()->createContextMenu(TQT_TQWIDGET(s), this); + FormManager::self()->createContextMenu(static_cast<TQWidget*>(s), this); } else if(mev->state() == (TQt::LeftButton|TQt::ControlButton))// && (m_copyRect.isValid())) { @@ -519,7 +519,7 @@ Container::handleMouseReleaseEvent(TQObject *s, TQMouseEvent *mev) if(m_form->selectedWidgets()->count() > 1) FormManager::self()->setInsertPoint( mev->pos() ); else - FormManager::self()->setInsertPoint( TQT_TQWIDGET(s)->mapTo(m_container, mev->pos() - m_grab) ); + FormManager::self()->setInsertPoint( static_cast<TQWidget*>(s)->mapTo(m_container, mev->pos() - m_grab) ); FormManager::self()->pasteWidget(); m_form->setInteractiveMode(true); @@ -1020,7 +1020,7 @@ void Container::drawInsertRect(TQMouseEvent *mev, TQObject *s) { int tmpx, tmpy; - TQPoint pos = TQT_TQWIDGET(s)->mapTo(m_container, mev->pos()); + TQPoint pos = static_cast<TQWidget*>(s)->mapTo(m_container, mev->pos()); int gridX = m_form->gridSize(); int gridY = m_form->gridSize(); if(!FormManager::self()->snapWidgetsToGrid() || (mev->state() == (TQt::LeftButton|TQt::ControlButton|TQt::AltButton)) ) @@ -1175,7 +1175,7 @@ void DesignTimeDynamicChildWidgetHandler::childWidgetAdded(TQWidget* w) { if (m_item) { - installRecursiveEventFilter(TQT_TQOBJECT(w), m_item->eventEater()); + installRecursiveEventFilter(w, m_item->eventEater()); } } diff --git a/kexi/formeditor/editlistviewdialog.cpp b/kexi/formeditor/editlistviewdialog.cpp index 5dfc176a..55bf34e1 100644 --- a/kexi/formeditor/editlistviewdialog.cpp +++ b/kexi/formeditor/editlistviewdialog.cpp @@ -106,7 +106,7 @@ EditListViewDialog::EditListViewDialog(TQWidget *parent) // The "item properties" field m_editor = new KoProperty::Editor(m_column, "editcolumn_propeditor"); - m_propSet = new KoProperty::Set(TQT_TQOBJECT(this), "columns"); + m_propSet = new KoProperty::Set(this, "columns"); m_propSet->addProperty(new KoProperty::Property("caption", "Caption", i18n("Caption"),i18n("Caption"))); m_propSet->addProperty(new KoProperty::Property("width", 100, i18n("Width"), i18n("Width"))); m_propSet->addProperty(new KoProperty::Property("clickable", TQVariant(true), i18n("Clickable"), i18n("Clickable") )); diff --git a/kexi/formeditor/factories/containerfactory.cpp b/kexi/formeditor/factories/containerfactory.cpp index 164dea27..f2fde913 100644 --- a/kexi/formeditor/factories/containerfactory.cpp +++ b/kexi/formeditor/factories/containerfactory.cpp @@ -541,7 +541,7 @@ ContainerFactory::createWidget(const TQCString &c, TQWidget *p, const char *n, else if(c == "TQWidget" || c=="ContainerWidget") { TQWidget *w = new ContainerWidget(p, n); - new KFormDesigner::Container(container, w, TQT_TQOBJECT(p)); + new KFormDesigner::Container(container, w, p); return w; } else if(c == "TQGroupBox" || c == "GroupBox") @@ -752,7 +752,7 @@ ContainerFactory::readSpecialProperty(const TQCString &, TQDomElement &node, TQW if((name == "id") && (w->parentWidget()->isA("TQWidgetStack"))) { TQWidgetStack *stack = (TQWidgetStack*)w->parentWidget(); - int id = KFormDesigner::FormIO::readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name).toInt(); + int id = KFormDesigner::FormIO::readPropertyValue(node.firstChild(), w, name).toInt(); stack->addWidget(w, id); stack->raiseWidget(w); item->addModifiedProperty("id", id); diff --git a/kexi/formeditor/factories/stdwidgetfactory.cpp b/kexi/formeditor/factories/stdwidgetfactory.cpp index 10107333..89326c20 100644 --- a/kexi/formeditor/factories/stdwidgetfactory.cpp +++ b/kexi/formeditor/factories/stdwidgetfactory.cpp @@ -747,7 +747,7 @@ StdWidgetFactory::readSpecialProperty(const TQCString &classname, TQDomElement & if((tag == "item") && (classname == "KComboBox")) { KComboBox *combo = (KComboBox*)w; - TQVariant val = KFormDesigner::FormIO::readPropertyValue(node.firstChild().firstChild(), TQT_TQOBJECT(w), name); + TQVariant val = KFormDesigner::FormIO::readPropertyValue(node.firstChild().firstChild(), w, name); if(val.canCast(TQVariant::Pixmap)) combo->insertItem(val.toPixmap()); else @@ -758,7 +758,7 @@ StdWidgetFactory::readSpecialProperty(const TQCString &classname, TQDomElement & if((tag == "item") && (classname == "TDEListBox")) { TDEListBox *listbox = (TDEListBox*)w; - TQVariant val = KFormDesigner::FormIO::readPropertyValue(node.firstChild().firstChild(), TQT_TQOBJECT(w), name); + TQVariant val = KFormDesigner::FormIO::readPropertyValue(node.firstChild().firstChild(), w, name); if(val.canCast(TQVariant::Pixmap)) listbox->insertItem(val.toPixmap()); else @@ -773,7 +773,7 @@ StdWidgetFactory::readSpecialProperty(const TQCString &classname, TQDomElement & for(TQDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling()) { TQString prop = n.toElement().attribute("name"); - TQVariant val = KFormDesigner::FormIO::readPropertyValue(n.firstChild(), TQT_TQOBJECT(w), name); + TQVariant val = KFormDesigner::FormIO::readPropertyValue(n.firstChild(), w, name); if(prop == "text") id = listview->addColumn(val.toString()); else if(prop == "width") @@ -833,7 +833,7 @@ StdWidgetFactory::readListItem(TQDomElement &node, TQListViewItem *parent, TDELi // and column texts else if((tag == "property") && (prop == "text")) { - TQVariant val = KFormDesigner::FormIO::readPropertyValue(n.firstChild(), TQT_TQOBJECT(listview), "item"); + TQVariant val = KFormDesigner::FormIO::readPropertyValue(n.firstChild(), listview, "item"); item->setText(i, val.toString()); i++; } diff --git a/kexi/formeditor/form.cpp b/kexi/formeditor/form.cpp index 58fdf6c0..349210f1 100644 --- a/kexi/formeditor/form.cpp +++ b/kexi/formeditor/form.cpp @@ -536,15 +536,15 @@ Form::autoAssignTabStops() ++it; TQWidget *nextw = it.current(); TQObject *page_w = 0; - KFormDesigner::TabWidget *tab_w = KFormDesigner::findParent<KFormDesigner::TabWidget>(TQT_TQOBJECT(w), "KFormDesigner::TabWidget", page_w); + KFormDesigner::TabWidget *tab_w = KFormDesigner::findParent<KFormDesigner::TabWidget>(w, "KFormDesigner::TabWidget", page_w); while (nextw) { - if (KexiUtils::hasParent(TQT_TQOBJECT(w), TQT_TQOBJECT(nextw))) // do not group (sort) widgets where on is a child of another + if (KexiUtils::hasParent(w, nextw)) // do not group (sort) widgets where on is a child of another break; if (nextw->y() >= (w->y() + 20)) break; if (tab_w) { TQObject *page_nextw = 0; - KFormDesigner::TabWidget *tab_nextw = KFormDesigner::findParent<KFormDesigner::TabWidget>(TQT_TQOBJECT(nextw), "KFormDesigner::TabWidget", page_nextw); + KFormDesigner::TabWidget *tab_nextw = KFormDesigner::findParent<KFormDesigner::TabWidget>(nextw, "KFormDesigner::TabWidget", page_nextw); if (tab_w == tab_nextw) { if (page_w != page_nextw) // 'nextw' widget within different tab page break; diff --git a/kexi/formeditor/formIO.cpp b/kexi/formeditor/formIO.cpp index 62402bfa..188238fd 100644 --- a/kexi/formeditor/formIO.cpp +++ b/kexi/formeditor/formIO.cpp @@ -879,7 +879,7 @@ FormIO::readPropertyValue(TQDomNode node, TQObject *obj, const TQString &name) else if(type == "set") { WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(obj); - TQObject *subobject = (subpropIface && subpropIface->subwidget()) ? TQT_TQOBJECT(subpropIface->subwidget()) : obj; + TQObject *subobject = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : obj; const int count = subobject->metaObject()->findProperty(name.latin1(), true); const TQMetaProperty *meta = count!=-1 ? subobject->metaObject()->property(count, true) : 0; @@ -1343,7 +1343,7 @@ FormIO::readChildNodes(ObjectTreeItem *item, Container *container, const TQDomEl if (node.attribute("subwidget")=="true") { //this is property for subwidget: remember it for delayed setting //because now the subwidget could be not created yet (true e.g. for KexiDBAutoField) - const TQVariant val( readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name) ); + const TQVariant val( readPropertyValue(node.firstChild(), w, name) ); kdDebug() << val.toStringList() << endl; item->addSubproperty( name.latin1(), val ); //subwidget->setProperty(name.latin1(), val); @@ -1353,23 +1353,23 @@ FormIO::readChildNodes(ObjectTreeItem *item, Container *container, const TQDomEl // We cannot assign the buddy now as the buddy widget may not be created yet if(name == "buddy") - m_buddies->insert(readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name).toString(), (TQLabel*)w); + m_buddies->insert(readPropertyValue(node.firstChild(), w, name).toString(), (TQLabel*)w); else if(((eltag == "grid") || (eltag == "hbox") || (eltag == "vbox")) && item->container() && item->container()->layout()) { // We load the margin of a Layout if(name == "margin") { - int margin = readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name).toInt(); + int margin = readPropertyValue(node.firstChild(), w, name).toInt(); item->container()->setLayoutMargin(margin); item->container()->layout()->setMargin(margin); } // We load the spacing of a Layout else if(name == "spacing") { - int spacing = readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name).toInt(); + int spacing = readPropertyValue(node.firstChild(), w, name).toInt(); item->container()->setLayoutSpacing(spacing); item->container()->layout()->setSpacing(spacing); } else if((name == "justify")){ - bool justify = readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name).toBool(); + bool justify = readPropertyValue(node.firstChild(), w, name).toBool(); KexiFlowLayout *flow = static_cast<KexiFlowLayout*>(item->container()->layout()); if(flow) flow->setJustified(justify); @@ -1389,7 +1389,7 @@ FormIO::readChildNodes(ObjectTreeItem *item, Container *container, const TQDomEl } else // we have a normal property, let's load it { - TQVariant val( readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name) ); + TQVariant val( readPropertyValue(node.firstChild(), w, name) ); if(name == "geometry" && dynamic_cast<FormWidget*>(w)) { //fix geometry if needed - this is top level form widget TQRect r( val.toRect() ); diff --git a/kexi/formeditor/formmanager.cpp b/kexi/formeditor/formmanager.cpp index d502d5e8..14584e20 100644 --- a/kexi/formeditor/formmanager.cpp +++ b/kexi/formeditor/formmanager.cpp @@ -297,8 +297,8 @@ FormManager::insertWidget(const TQCString &classname) if( ((TQWidget*)o)->ownCursor() ) { // form->d->cursors->insert(o->name(), ((TQWidget*)o)->cursor()); - form->d->cursors.insert(o, TQT_TQWIDGET(o)->cursor()); - TQT_TQWIDGET(o)->setCursor(TQCursor(TQt::CrossCursor)); + form->d->cursors.insert(o, static_cast<TQWidget*>(o)->cursor()); + static_cast<TQWidget*>(o)->setCursor(TQCursor(TQt::CrossCursor)); } } @@ -325,12 +325,12 @@ FormManager::stopInsert() TQObjectList *l = form->widget()->queryList( "TQWidget" ); for(TQObject *o = l->first(); o; o = l->next()) { - TQT_TQWIDGET(o)->unsetCursor(); + static_cast<TQWidget*>(o)->unsetCursor(); #if 0 if( ((TQWidget*)o)->ownCursor()) { TQMap<TQObject*,TQCursor>::ConstIterator curIt( form->d->cursors.find(o) ); if (curIt!=form->d->cursors.constEnd()) - TQT_TQWIDGET(o)->setCursor( *curIt ); + static_cast<TQWidget*>(o)->setCursor( *curIt ); // ((TQWidget*)o)->setCursor( (*(form->d->cursors))[o->name()] ) ; } #endif @@ -376,11 +376,11 @@ FormManager::startCreatingConnection() TQObjectList *l = form->widget()->queryList( "TQWidget" ); for(TQObject *o = l->first(); o; o = l->next()) { - TQWidget *w = TQT_TQWIDGET(o); + TQWidget *w = static_cast<TQWidget*>(o); if( w->ownCursor() ) { - form->d->cursors.insert(TQT_TQOBJECT(w), w->cursor()); -// form->d->cursors->insert(TQT_TQOBJECT(w)->name(), w->cursor()); + form->d->cursors.insert(w, w->cursor()); +// form->d->cursors->insert(w->name(), w->cursor()); w->setCursor(TQCursor(PointingHandCursor )); } if(w->hasMouseTracking()) @@ -439,7 +439,7 @@ FormManager::stopCreatingConnection() if( w->ownCursor()) { TQMap<TQObject*,TQCursor>::ConstIterator curIt( form->d->cursors.find(o) ); if (curIt!=form->d->cursors.constEnd()) - TQT_TQWIDGET(o)->setCursor( *curIt ); + static_cast<TQWidget*>(o)->setCursor( *curIt ); } // w->setCursor( (*(form->d->cursors))[o->name()] ) ; w->setMouseTracking( !form->d->mouseTrackers->grep(w->name()).isEmpty() ); @@ -1212,7 +1212,7 @@ FormManager::slotStyle() TQObjectList *l = activeForm()->widget()->queryList( "TQWidget" ); for(TQObject *o = l->first(); o; o = l->next()) - (TQT_TQWIDGET(o))->setStyle( style ); + (static_cast<TQWidget*>(o))->setStyle( style ); delete l; } diff --git a/kexi/formeditor/utils.cpp b/kexi/formeditor/utils.cpp index b04222f3..a55f121d 100644 --- a/kexi/formeditor/utils.cpp +++ b/kexi/formeditor/utils.cpp @@ -131,8 +131,8 @@ HorWidgetList::~HorWidgetList() int HorWidgetList::compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2) { - TQWidget *w1 = TQT_TQWIDGET(item1); - TQWidget *w2 = TQT_TQWIDGET(item2); + TQWidget *w1 = static_cast<TQWidget*>(item1); + TQWidget *w2 = static_cast<TQWidget*>(item2); return w1->mapTo(m_topLevelWidget, TQPoint(0,0)).x() - w2->mapTo(m_topLevelWidget, TQPoint(0,0)).x(); } @@ -150,8 +150,8 @@ VerWidgetList::~VerWidgetList() int VerWidgetList::compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2) { - TQWidget *w1 = TQT_TQWIDGET(item1); - TQWidget *w2 = TQT_TQWIDGET(item2); + TQWidget *w1 = static_cast<TQWidget*>(item1); + TQWidget *w2 = static_cast<TQWidget*>(item2); int y1, y2; TQObject *page1 = 0; @@ -165,7 +165,7 @@ int VerWidgetList::compareItems(TQPtrCollection::Item item1, TQPtrCollection::It TabWidget *tw2 = KFormDesigner::findParent<KFormDesigner::TabWidget>(w2, "KFormDesigner::TabWidget", page2); if (tw1 && tw2 && tw1 == tw2 && page1 != page2) { // this sorts widgets by tabs there're put in - return tw1->indexOf(TQT_TQWIDGET(page1)) - tw2->indexOf(TQT_TQWIDGET(page2)); + return tw1->indexOf(static_cast<TQWidget*>(page1)) - tw2->indexOf(static_cast<TQWidget*>(page2)); } if (tw2) // special case diff --git a/kexi/formeditor/utils.h b/kexi/formeditor/utils.h index d42a891f..1f325265 100644 --- a/kexi/formeditor/utils.h +++ b/kexi/formeditor/utils.h @@ -41,10 +41,10 @@ type* findParent(TQObject* o, const char* className, TQObject* &prevPrev) { if (!o || !className || className[0]=='\0') return 0; - TQObject *prev = TQT_TQOBJECT(o); - while ( ((o=TQT_TQOBJECT(o)->parent())) && !TQT_TQOBJECT(o)->inherits(className) ) { + TQObject *prev = o; + while ( ((o=o->parent())) && !o->inherits(className) ) { prevPrev = prev; - prev = TQT_TQOBJECT(o); + prev = o; } return static_cast<type*>(o); } diff --git a/kexi/formeditor/widgetpropertyset.cpp b/kexi/formeditor/widgetpropertyset.cpp index 5beed16b..9da235d2 100644 --- a/kexi/formeditor/widgetpropertyset.cpp +++ b/kexi/formeditor/widgetpropertyset.cpp @@ -740,7 +740,7 @@ WidgetPropertySet::eventFilter(TQObject *o, TQEvent *ev) if(d->set["geometry"].value() == o->property("geometry")) // to avoid infinite recursion return false; - d->set["geometry"] = TQT_TQWIDGET(o)->geometry(); + d->set["geometry"] = static_cast<TQWidget*>(o)->geometry(); } } else if(d->widgets.count() > 1 && ev->type() == TQEvent::Move) // the widget is being moved, we update the property diff --git a/kexi/kexidb/fieldvalidator.cpp b/kexi/kexidb/fieldvalidator.cpp index 3b08301c..bea6662b 100644 --- a/kexi/kexidb/fieldvalidator.cpp +++ b/kexi/kexidb/fieldvalidator.cpp @@ -27,7 +27,7 @@ using namespace KexiDB; FieldValidator::FieldValidator( const Field &field, TQWidget * parent, const char * name ) - : KexiUtils::MultiValidator(TQT_TQOBJECT(parent), name) + : KexiUtils::MultiValidator(parent, name) { //! @todo merge this code with KexiTableEdit code! //! @todo set maximum length validator diff --git a/kexi/kexiutils/longlongvalidator.cpp b/kexi/kexiutils/longlongvalidator.cpp index e7cce867..363c18b1 100644 --- a/kexi/kexiutils/longlongvalidator.cpp +++ b/kexi/kexiutils/longlongvalidator.cpp @@ -26,14 +26,14 @@ using namespace KexiUtils; LongLongValidator::LongLongValidator( TQWidget * parent, int base, const char * name ) - : TQValidator(TQT_TQOBJECT(parent), name) + : TQValidator(parent, name) , m_min(0), m_max(0) { setBase(base); } LongLongValidator::LongLongValidator( TQ_LLONG bottom, TQ_LLONG top, TQWidget * parent, int base, const char * name ) - : TQValidator(TQT_TQOBJECT(parent), name) + : TQValidator(parent, name) { setBase(base); setRange( bottom, top ); diff --git a/kexi/kexiutils/utils.h b/kexi/kexiutils/utils.h index 89af157c..2cff43eb 100644 --- a/kexi/kexiutils/utils.h +++ b/kexi/kexiutils/utils.h @@ -46,7 +46,7 @@ namespace KexiUtils { if (!o || !className || className[0]=='\0') return 0; - while ( ((o=TQT_TQOBJECT(o)->parent())) && !TQT_TQOBJECT(o)->inherits(className) ) + while ( ((o=o->parent())) && !o->inherits(className) ) ; return static_cast<type*>(o); } @@ -71,7 +71,7 @@ namespace KexiUtils { if (!o || !className || className[0]=='\0') return 0; - TQObjectList *l = TQT_TQOBJECT(o)->queryList( className, objName ); + TQObjectList *l = o->queryList( className, objName ); TQObject *result = l->first(); delete l; return static_cast<type*>(result); diff --git a/kexi/main/keximainwindowimpl.cpp b/kexi/main/keximainwindowimpl.cpp index 0920928b..7a82eb1e 100644 --- a/kexi/main/keximainwindowimpl.cpp +++ b/kexi/main/keximainwindowimpl.cpp @@ -260,14 +260,14 @@ KexiMainWindowImpl::KexiMainWindowImpl() //get informed connect(&Kexi::partManager(),TQT_SIGNAL(partLoaded(KexiPart::Part*)),this,TQT_SLOT(slotPartLoaded(KexiPart::Part*))); - connect( m_pMdi, TQT_SIGNAL(nowMaximized(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotCaptionForCurrentMDIChild(bool)) ); - connect( m_pMdi, TQT_SIGNAL(noMaximizedChildFrmLeft(KMdiChildFrm*)), TQT_TQOBJECT(this), TQT_SLOT(slotNoMaximizedChildFrmLeft(KMdiChildFrm*))); -// connect( TQT_TQOBJECT(this), TQT_SIGNAL(lastChildFrmClosed()), TQT_TQOBJECT(this), TQT_SLOT(slotLastChildFrmClosed())); - connect( TQT_TQOBJECT(this), TQT_SIGNAL(lastChildViewClosed()), TQT_TQOBJECT(this), TQT_SLOT(slotLastChildViewClosed())); + connect( m_pMdi, TQT_SIGNAL(nowMaximized(bool)), this, TQT_SLOT(slotCaptionForCurrentMDIChild(bool)) ); + connect( m_pMdi, TQT_SIGNAL(noMaximizedChildFrmLeft(KMdiChildFrm*)), this, TQT_SLOT(slotNoMaximizedChildFrmLeft(KMdiChildFrm*))); +// connect( this, TQT_SIGNAL(lastChildFrmClosed()), this, TQT_SLOT(slotLastChildFrmClosed())); + connect( this, TQT_SIGNAL(lastChildViewClosed()), this, TQT_SLOT(slotLastChildViewClosed())); - connect( TQT_TQOBJECT(this), TQT_SIGNAL(childViewIsDetachedNow(TQWidget*)), TQT_TQOBJECT(this), TQT_SLOT(slotChildViewIsDetachedNow(TQWidget*))); - connect( TQT_TQOBJECT(this), TQT_SIGNAL(mdiModeHasBeenChangedTo(KMdi::MdiMode)), - TQT_TQOBJECT(this), TQT_SLOT(slotMdiModeHasBeenChangedTo(KMdi::MdiMode))); + connect( this, TQT_SIGNAL(childViewIsDetachedNow(TQWidget*)), this, TQT_SLOT(slotChildViewIsDetachedNow(TQWidget*))); + connect( this, TQT_SIGNAL(mdiModeHasBeenChangedTo(KMdi::MdiMode)), + this, TQT_SLOT(slotMdiModeHasBeenChangedTo(KMdi::MdiMode))); //if (!userMode()) { @@ -295,7 +295,7 @@ KexiMainWindowImpl::KexiMainWindowImpl() //kdDebug() << "name=" <<it.current()->name() << " cname="<<it.current()->className()<<endl; //KexiMainWindowImpl::eventFilter() will filter our popups: it.current()->installEventFilter(this); - d->popups.insert(it.current()->name(), static_cast<TQPopupMenu*>(TQT_TQWIDGET(it.current()))); + d->popups.insert(it.current()->name(), static_cast<TQPopupMenu*>(it.current())); } delete l; d->createMenu = d->popups["create"]; @@ -367,7 +367,7 @@ KexiMainWindowImpl::KexiMainWindowImpl() // when initially the main window is empty TQToolTip::add(closeButton, i18n("Close the current tab page in Kexi tab interface", "Close the current tab")); - TQObject::connect( closeButton, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( closeActiveView() ) ); + TQObject::connect( closeButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeActiveView() ) ); } #ifdef KEXI_ADD_CUSTOM_KEXIMAINWINDOWIMPL @@ -406,7 +406,7 @@ void KexiMainWindowImpl::setWindowMenu(TQPopupMenu *menu) menuBar()->insertItem(txt, m_pWindowMenu, id, count-3); } m_pWindowMenu->setCheckable(true); - TQObject::connect( m_pWindowMenu, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(fillWindowMenu()) ); + TQObject::connect( m_pWindowMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(fillWindowMenu()) ); } void KexiMainWindowImpl::fillWindowMenu() @@ -521,26 +521,26 @@ void KexiMainWindowImpl::initActions() // setupGUI(TDEMainWindow::Keys|TDEMainWindow::StatusBar|TDEMainWindow::Save|TDEMainWindow::Create); // d->actionMapper = new TQSignalMapper(this, "act_map"); -// connect(d->actionMapper, TQT_SIGNAL(mapped(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotAction(const TQString &))); +// connect(d->actionMapper, TQT_SIGNAL(mapped(const TQString &)), this, TQT_SLOT(slotAction(const TQString &))); // PROJECT MENU TDEAction *action = new TDEAction(i18n("&New..."), "document-new", TDEStdAccel::shortcut(TDEStdAccel::New), - TQT_TQOBJECT(this), TQT_SLOT(slotProjectNew()), actionCollection(), "project_new"); + this, TQT_SLOT(slotProjectNew()), actionCollection(), "project_new"); action->setToolTip(i18n("Create a new project")); action->setWhatsThis(i18n("Creates a new project. Currently opened project is not affected.")); - action = KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( slotProjectOpen() ), actionCollection(), "project_open" ); + action = KStdAction::open( this, TQT_SLOT( slotProjectOpen() ), actionCollection(), "project_open" ); action->setToolTip(i18n("Open an existing project")); action->setWhatsThis(i18n("Opens an existing project. Currently opened project is not affected.")); #ifdef HAVE_TDENEWSTUFF action = new TDEAction(i18n("&Download Example Databases..."), "kget", TDEShortcut(0), - TQT_TQOBJECT(this), TQT_SLOT(slotGetNewStuff()), actionCollection(), "project_download_examples"); + this, TQT_SLOT(slotGetNewStuff()), actionCollection(), "project_download_examples"); action->setToolTip(i18n("Download example databases from the Internet")); action->setWhatsThis(i18n("Downloads example databases from the Internet.")); #endif -// d->action_open_recent = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT(slotProjectOpenRecent(const KURL&)), actionCollection(), "project_open_recent" ); +// d->action_open_recent = KStdAction::openRecent( this, TQT_SLOT(slotProjectOpenRecent(const KURL&)), actionCollection(), "project_open_recent" ); //#ifdef KEXI_SHOW_UNIMPLEMENTED #ifndef KEXI_NO_UNFINISHED @@ -556,42 +556,42 @@ void KexiMainWindowImpl::initActions() // d->action_open_recent->popupMenu()->insertTitle(i18n("Recently Connected Database Servers")); // d->action_open_recent->popupMenu()->insertSeparator(); // d->action_open_recent_more_id = d->action_open_recent->popupMenu() -// ->insertItem(i18n("&More Projects..."), TQT_TQOBJECT(this), TQT_SLOT(slotProjectOpenRecentMore()), 0, 1000); +// ->insertItem(i18n("&More Projects..."), this, TQT_SLOT(slotProjectOpenRecentMore()), 0, 1000); #else d->action_open_recent = d->dummy_action; #endif d->action_save = KStdAction::save( - TQT_TQOBJECT(this), TQT_SLOT( slotProjectSave() ), actionCollection(), "project_save" ); + this, TQT_SLOT( slotProjectSave() ), actionCollection(), "project_save" ); // d->action_save = new TDEAction(i18n("&Save"), "document-save", TDEStdAccel::shortcut(TDEStdAccel::Save), -// TQT_TQOBJECT(this), TQT_SLOT(slotProjectSave()), actionCollection(), "project_save"); +// this, TQT_SLOT(slotProjectSave()), actionCollection(), "project_save"); d->action_save->setToolTip(i18n("Save object changes")); d->action_save->setWhatsThis(i18n("Saves object changes from currently selected window.")); #ifdef KEXI_SHOW_UNIMPLEMENTED d->action_save_as = new TDEAction(i18n("Save &As..."), "document-save-as", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotProjectSaveAs()), actionCollection(), "project_saveas"); + this, TQT_SLOT(slotProjectSaveAs()), actionCollection(), "project_saveas"); d->action_save_as->setToolTip(i18n("Save object as")); d->action_save_as->setWhatsThis( i18n("Saves object changes from currently selected window under a new name (within the same project).")); d->action_project_properties = new TDEAction(i18n("Project Properties"), "application-vnd.tde.info", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotProjectProperties()), actionCollection(), "project_properties"); + this, TQT_SLOT(slotProjectProperties()), actionCollection(), "project_properties"); #else d->action_save_as = d->dummy_action; d->action_project_properties = d->dummy_action; #endif d->action_close = new TDEAction(i18n("&Close Project"), "window-close", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotProjectClose()), actionCollection(), "project_close" ); + this, TQT_SLOT(slotProjectClose()), actionCollection(), "project_close" ); d->action_close->setToolTip(i18n("Close the current project")); d->action_close->setWhatsThis(i18n("Closes the current project.")); - KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT(slotProjectQuit()), actionCollection(), "quit"); + KStdAction::quit( this, TQT_SLOT(slotProjectQuit()), actionCollection(), "quit"); #ifdef KEXI_SHOW_UNIMPLEMENTED d->action_project_relations = new TDEAction(i18n("&Relationships..."), "relation", TQt::CTRL + TQt::Key_R, - TQT_TQOBJECT(this), TQT_SLOT(slotProjectRelations()), actionCollection(), "project_relations"); + this, TQT_SLOT(slotProjectRelations()), actionCollection(), "project_relations"); d->action_project_relations->setToolTip(i18n("Project relationships")); d->action_project_relations->setWhatsThis(i18n("Shows project relationships.")); @@ -600,13 +600,13 @@ void KexiMainWindowImpl::initActions() #endif d->action_tools_data_migration = new TDEAction( i18n("&Import Database..."), "database_import", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotToolsProjectMigration()), actionCollection(), "tools_import_project"); + this, TQT_SLOT(slotToolsProjectMigration()), actionCollection(), "tools_import_project"); d->action_tools_data_migration->setToolTip(i18n("Import entire database as a Kexi project")); d->action_tools_data_migration->setWhatsThis(i18n("Imports entire database as a Kexi project.")); d->action_tools_compact_database = new TDEAction( i18n("&Compact Database..."), "", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotToolsCompactDatabase()), actionCollection(), "tools_compact_database"); + this, TQT_SLOT(slotToolsCompactDatabase()), actionCollection(), "tools_compact_database"); d->action_tools_compact_database->setToolTip(i18n("Compact the current database project")); d->action_tools_compact_database->setWhatsThis( i18n("Compacts the current database project, so it will take less space and work faster.")); @@ -617,7 +617,7 @@ void KexiMainWindowImpl::initActions() d->action_project_import_data_table = new TDEAction( i18n("Import->Table Data From File...", "Table Data From &File..."), "table"/*! @todo: change to "file_import" or so*/, - 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectImportDataTable()), actionCollection(), + 0, this, TQT_SLOT(slotProjectImportDataTable()), actionCollection(), "project_import_data_table"); d->action_project_import_data_table->setToolTip(i18n("Import table data from a file")); d->action_project_import_data_table->setWhatsThis(i18n("Imports table data from a file.")); @@ -626,7 +626,7 @@ void KexiMainWindowImpl::initActions() d->action_project_export_data_table = new TDEAction(i18n("Export->Table or Query Data to File...", "Table or Query Data to &File..."), "table"/*! @todo: change to "file_export" or so*/, - 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectExportDataTable()), actionCollection(), + 0, this, TQT_SLOT(slotProjectExportDataTable()), actionCollection(), "project_export_data_table"); d->action_project_export_data_table->setToolTip( i18n("Export data from the active table or query data to a file")); @@ -634,17 +634,17 @@ void KexiMainWindowImpl::initActions() i18n("Exports data from the active table or query data to a file.")); //TODO new TDEAction(i18n("From File..."), "document-open", 0, -//TODO TQT_TQOBJECT(this), TQT_SLOT(slotImportFile()), actionCollection(), "project_import_file"); +//TODO this, TQT_SLOT(slotImportFile()), actionCollection(), "project_import_file"); //TODO new TDEAction(i18n("From Server..."), "server", 0, -//TODO TQT_TQOBJECT(this), TQT_SLOT(slotImportServer()), actionCollection(), "project_import_server"); +//TODO this, TQT_SLOT(slotImportServer()), actionCollection(), "project_import_server"); - d->action_project_print = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotProjectPrint()), + d->action_project_print = KStdAction::print(this, TQT_SLOT(slotProjectPrint()), actionCollection(), "project_print" ); d->action_project_print->setToolTip(i18n("Print data from the active table or query")); d->action_project_print->setWhatsThis(i18n("Prints data from the active table or query.")); d->action_project_print_preview = KStdAction::printPreview( - TQT_TQOBJECT(this), TQT_SLOT(slotProjectPrintPreview()), + this, TQT_SLOT(slotProjectPrintPreview()), actionCollection(), "project_print_preview" ); d->action_project_print_preview->setToolTip( i18n("Show print preview for the active table or query")); @@ -652,7 +652,7 @@ void KexiMainWindowImpl::initActions() i18n("Shows print preview for the active table or query.")); d->action_project_print_setup = new TDEAction(i18n("Page Set&up..."), - "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectPageSetup()), actionCollection(), + "", 0, this, TQT_SLOT(slotProjectPageSetup()), actionCollection(), "project_print_setup"); d->action_project_print_setup->setToolTip( i18n("Show page setup for printing the active table or query")); @@ -669,7 +669,7 @@ void KexiMainWindowImpl::initActions() else { d->action_edit_paste_special_data_table = new TDEAction(i18n("Paste Special->As Data &Table...", "As Data &Table..."), - "table", 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditPasteSpecialDataTable()), + "table", 0, this, TQT_SLOT(slotEditPasteSpecialDataTable()), actionCollection(), "edit_paste_special_data_table"); d->action_edit_paste_special_data_table->setToolTip( i18n("Paste clipboard data as a table")); @@ -680,7 +680,7 @@ void KexiMainWindowImpl::initActions() d->action_edit_copy_special_data_table = new TDEAction(i18n("Copy Special->Table or Query Data...", "Table or Query as Data Table..."), - "table", 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditCopySpecialDataTable()), + "table", 0, this, TQT_SLOT(slotEditCopySpecialDataTable()), actionCollection(), "edit_copy_special_data_table"); d->action_edit_copy_special_data_table->setToolTip( i18n("Copy selected table or query data to clipboard")); @@ -700,18 +700,18 @@ void KexiMainWindowImpl::initActions() #endif d->action_edit_find = KStdAction::find( - TQT_TQOBJECT(this), TQT_SLOT(slotEditFind()), actionCollection(), "edit_find" ); + this, TQT_SLOT(slotEditFind()), actionCollection(), "edit_find" ); // d->action_edit_find = createSharedAction( KStdAction::Find, "edit_find"); d->action_edit_findnext = KStdAction::findNext( - TQT_TQOBJECT(this), TQT_SLOT(slotEditFindNext()), actionCollection(), "edit_findnext"); + this, TQT_SLOT(slotEditFindNext()), actionCollection(), "edit_findnext"); d->action_edit_findprev = KStdAction::findPrev( - TQT_TQOBJECT(this), TQT_SLOT(slotEditFindPrevious()), actionCollection(), "edit_findprevious"); + this, TQT_SLOT(slotEditFindPrevious()), actionCollection(), "edit_findprevious"); d->action_edit_replace = 0; //! @todo d->action_edit_replace = KStdAction::replace( -//! TQT_TQOBJECT(this), TQT_SLOT(slotEditReplace()), actionCollection(), "project_print_preview" ); +//! this, TQT_SLOT(slotEditReplace()), actionCollection(), "project_print_preview" ); d->action_edit_replace_all = 0; //! @todo d->action_edit_replace_all = new TDEAction( i18n("Replace All"), "", 0, -//! TQT_TQOBJECT(this), TQT_SLOT(slotEditReplaceAll()), actionCollection(), "edit_replaceall"); +//! this, TQT_SLOT(slotEditReplaceAll()), actionCollection(), "edit_replaceall"); d->action_edit_select_all = createSharedAction( KStdAction::SelectAll, "edit_select_all"); @@ -745,7 +745,7 @@ void KexiMainWindowImpl::initActions() //VIEW MENU if (!userMode()) { d->action_view_data_mode = new TDERadioAction(i18n("&Data View"), "state_data", TQt::Key_F6, - TQT_TQOBJECT(this), TQT_SLOT(slotViewDataMode()), actionCollection(), "view_data_mode"); + this, TQT_SLOT(slotViewDataMode()), actionCollection(), "view_data_mode"); d->actions_for_view_modes.insert( Kexi::DataViewMode, d->action_view_data_mode ); d->action_view_data_mode->setExclusiveGroup("view_mode"); d->action_view_data_mode->setToolTip(i18n("Switch to data view")); @@ -756,7 +756,7 @@ void KexiMainWindowImpl::initActions() if (!userMode()) { d->action_view_design_mode = new TDERadioAction(i18n("D&esign View"), "state_edit", TQt::Key_F7, - TQT_TQOBJECT(this), TQT_SLOT(slotViewDesignMode()), actionCollection(), "view_design_mode"); + this, TQT_SLOT(slotViewDesignMode()), actionCollection(), "view_design_mode"); d->actions_for_view_modes.insert( Kexi::DesignViewMode, d->action_view_design_mode ); d->action_view_design_mode->setExclusiveGroup("view_mode"); d->action_view_design_mode->setToolTip(i18n("Switch to design view")); @@ -767,7 +767,7 @@ void KexiMainWindowImpl::initActions() if (!userMode()) { d->action_view_text_mode = new TDERadioAction(i18n("&Text View"), "state_sql", TQt::Key_F8, - TQT_TQOBJECT(this), TQT_SLOT(slotViewTextMode()), actionCollection(), "view_text_mode"); + this, TQT_SLOT(slotViewTextMode()), actionCollection(), "view_text_mode"); d->actions_for_view_modes.insert( Kexi::TextViewMode, d->action_view_text_mode ); d->action_view_text_mode->setExclusiveGroup("view_mode"); d->action_view_text_mode->setToolTip(i18n("Switch to text view")); @@ -778,7 +778,7 @@ void KexiMainWindowImpl::initActions() if (d->isProjectNavigatorVisible) { d->action_view_nav = new TDEAction(i18n("Project Navigator"), "", TQt::ALT + TQt::Key_1, - TQT_TQOBJECT(this), TQT_SLOT(slotViewNavigator()), actionCollection(), "view_navigator"); + this, TQT_SLOT(slotViewNavigator()), actionCollection(), "view_navigator"); d->action_view_nav->setToolTip(i18n("Go to project navigator panel")); d->action_view_nav->setWhatsThis(i18n("Goes to project navigator panel.")); } @@ -786,13 +786,13 @@ void KexiMainWindowImpl::initActions() d->action_view_nav = 0; d->action_view_mainarea = new TDEAction(i18n("Main Area"), "", TQt::ALT + TQt::Key_2, - TQT_TQOBJECT(this), TQT_SLOT(slotViewMainArea()), actionCollection(), "view_mainarea"); + this, TQT_SLOT(slotViewMainArea()), actionCollection(), "view_mainarea"); d->action_view_mainarea->setToolTip(i18n("Go to main area")); d->action_view_mainarea->setWhatsThis(i18n("Goes to main area.")); if (!userMode()) { d->action_view_propeditor = new TDEAction(i18n("Property Editor"), "", TQt::ALT + TQt::Key_3, - TQT_TQOBJECT(this), TQT_SLOT(slotViewPropertyEditor()), actionCollection(), "view_propeditor"); + this, TQT_SLOT(slotViewPropertyEditor()), actionCollection(), "view_propeditor"); d->action_view_propeditor->setToolTip(i18n("Go to property editor panel")); d->action_view_propeditor->setWhatsThis(i18n("Goes to property editor panel.")); } @@ -863,7 +863,7 @@ void KexiMainWindowImpl::initActions() #else TQt::ALT+TQt::Key_Right, #endif - TQT_TQOBJECT(this), TQT_SLOT(activateNextWin()), actionCollection(), "window_next"); + this, TQT_SLOT(activateNextWin()), actionCollection(), "window_next"); d->action_window_next->setToolTip( i18n("Next window") ); d->action_window_next->setWhatsThis(i18n("Switches to the next window.")); @@ -873,17 +873,17 @@ void KexiMainWindowImpl::initActions() #else TQt::ALT+TQt::Key_Left, #endif - TQT_TQOBJECT(this), TQT_SLOT(activatePrevWin()), actionCollection(), "window_previous"); + this, TQT_SLOT(activatePrevWin()), actionCollection(), "window_previous"); d->action_window_previous->setToolTip( i18n("Previous window") ); d->action_window_previous->setWhatsThis(i18n("Switches to the previous window.")); //SETTINGS MENU setStandardToolBarMenuEnabled( true ); - action = KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT( slotConfigureKeys() ), actionCollection() ); + action = KStdAction::keyBindings(this, TQT_SLOT( slotConfigureKeys() ), actionCollection() ); action->setWhatsThis(i18n("Lets you configure shortcut keys.")); #ifdef KEXI_SHOW_UNIMPLEMENTED - action = KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT( slotConfigureToolbars() ), actionCollection() ); + action = KStdAction::configureToolbars( this, TQT_SLOT( slotConfigureToolbars() ), actionCollection() ); action->setWhatsThis(i18n("Lets you configure toolbars.")); d->action_show_other = new TDEActionMenu(i18n("Other"), @@ -923,31 +923,31 @@ void KexiMainWindowImpl::initActions() #endif #ifdef KEXI_SHOW_UNIMPLEMENTED - d->action_configure = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotShowSettings()), actionCollection()); + d->action_configure = KStdAction::preferences(this, TQT_SLOT(slotShowSettings()), actionCollection()); action->setWhatsThis(i18n("Lets you configure Kexi.")); #endif //HELP MENU #if 0//js: todo reenable later - KStdAction::tipOfDay( TQT_TQOBJECT(this), TQT_SLOT( slotTipOfTheDayAction() ), actionCollection() ) + KStdAction::tipOfDay( this, TQT_SLOT( slotTipOfTheDayAction() ), actionCollection() ) ->setWhatsThis(i18n("This shows useful tips on the use of this application.")); #endif #if 0 //we don't have a time for updating info text for each new version new TDEAction(i18n("Important Information"), "messagebox_info", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotImportantInfo()), actionCollection(), "help_show_important_info"); + this, TQT_SLOT(slotImportantInfo()), actionCollection(), "help_show_important_info"); #endif //TODO: UNCOMMENT TO REMOVE MDI MODES SETTING m_pMdiModeMenu->hide(); #ifndef KEXI_NO_FEEDBACK_AGENT #ifdef FEEDBACK_CLASS new TDEAction(i18n("Give Feedback..."), "messagebox_info", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotStartFeedbackAgent()), actionCollection(), "help_start_feedback_agent"); + this, TQT_SLOT(slotStartFeedbackAgent()), actionCollection(), "help_start_feedback_agent"); #endif #endif // TDEAction *actionSettings = new TDEAction(i18n("Configure Kexi..."), "configure", 0, // actionCollection(), "kexi_settings"); // actionSettings->setWhatsThis(i18n("Lets you configure Kexi.")); -// connect(actionSettings, TQT_SIGNAL(activated()), TQT_TQOBJECT(this), TQT_SLOT(slotShowSettings())); +// connect(actionSettings, TQT_SIGNAL(activated()), this, TQT_SLOT(slotShowSettings())); // -- add a few missing tooltips (usable especially in Form's "Assign action" dialog) if ((action = actionCollection()->action("window_close"))) @@ -1126,7 +1126,7 @@ void KexiMainWindowImpl::invalidateSharedActions(TQObject *o) d->action_edit_paste->setEnabled(true);*/ if (!o) - o = TQT_TQOBJECT(focusWindow()); + o = focusWindow(); KexiSharedActionHost::invalidateSharedActions(o); } @@ -1138,7 +1138,7 @@ void KexiMainWindowImpl::invalidateSharedActions() // unused, I think void KexiMainWindowImpl::invalidateSharedActionsLater() { - TQTimer::singleShot(1, TQT_TQOBJECT(this), TQT_SLOT(invalidateSharedActions())); + TQTimer::singleShot(1, this, TQT_SLOT(invalidateSharedActions())); } void KexiMainWindowImpl::invalidateProjectWideActions() @@ -1345,7 +1345,7 @@ tristate KexiMainWindowImpl::openProject(const KexiProjectData& projectData) // d->disableErrorMessages = true; enableMessages( false ); - TQTimer::singleShot(1, TQT_TQOBJECT(this), TQT_SLOT(slotAutoOpenObjectsLater())); + TQTimer::singleShot(1, this, TQT_SLOT(slotAutoOpenObjectsLater())); return true; } @@ -1721,7 +1721,7 @@ void KexiMainWindowImpl::initNavigator() if(!d->nav) { d->nav = new KexiBrowser(this, this); - d->nav->installEventFilter(TQT_TQOBJECT(this)); + d->nav->installEventFilter(this); d->navToolWindow = addToolWindow(d->nav, KDockWidget::DockLeft, getMainDockWidget(), 20/*, lv, 35, "2"*/); // d->navToolWindow->hide(); @@ -1859,7 +1859,7 @@ void KexiMainWindowImpl::slotPartLoaded(KexiPart::Part* p) if (!p) return; connect(p, TQT_SIGNAL(newObjectRequest(KexiPart::Info*)), - TQT_TQOBJECT(this), TQT_SLOT(newObject(KexiPart::Info*))); + this, TQT_SLOT(newObject(KexiPart::Info*))); p->createGUIClients(this); } @@ -2225,11 +2225,11 @@ KexiMainWindowImpl::registerChild(KexiDialogBase *dlg) { kdDebug() << "KexiMainWindowImpl::registerChild()" << endl; connect(dlg, TQT_SIGNAL(activated(KMdiChildView *)), - TQT_TQOBJECT(this), TQT_SLOT(activeWindowChanged(KMdiChildView *))); + this, TQT_SLOT(activeWindowChanged(KMdiChildView *))); connect(dlg, TQT_SIGNAL(dirtyChanged(KexiDialogBase*)), - TQT_TQOBJECT(this), TQT_SLOT(slotDirtyFlagChanged(KexiDialogBase*))); + this, TQT_SLOT(slotDirtyFlagChanged(KexiDialogBase*))); -// connect(dlg, TQT_SIGNAL(childWindowCloseRequest(KMdiChildView *)), TQT_TQOBJECT(this), TQT_SLOT(childClosed(KMdiChildView *))); +// connect(dlg, TQT_SIGNAL(childWindowCloseRequest(KMdiChildView *)), this, TQT_SLOT(childClosed(KMdiChildView *))); if(dlg->id() != -1) { d->insertDialog(dlg); } @@ -2564,7 +2564,7 @@ KexiMainWindowImpl::slotProjectNew() //todo: pass new_data->caption() //start new instance //! @todo use TDEProcess? - TQProcess proc(args, TQT_TQOBJECT(this), "process"); + TQProcess proc(args, this, "process"); proc.setCommunication((TQProcess::Communication)0); // proc.setWorkingDirectory( TQFileInfo(new_data->connectionData()->fileName()).dir(true) ); proc.setWorkingDirectory( TQFileInfo(fileName).dir(true) ); @@ -2579,9 +2579,9 @@ KexiMainWindowImpl::createKexiProject(KexiProjectData* new_data) { d->prj = new KexiProject( new_data, this ); // d->prj = ::createKexiProject(new_data); -//provided by KexiMessageHandler connect(d->prj, TQT_SIGNAL(error(const TQString&,KexiDB::Object*)), TQT_TQOBJECT(this), TQT_SLOT(showErrorMessage(const TQString&,KexiDB::Object*))); -//provided by KexiMessageHandler connect(d->prj, TQT_SIGNAL(error(const TQString&,const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(showErrorMessage(const TQString&,const TQString&))); - connect(d->prj, TQT_SIGNAL(itemRenamed(const KexiPart::Item&, const TQCString&)), TQT_TQOBJECT(this), TQT_SLOT(slotObjectRenamed(const KexiPart::Item&, const TQCString&))); +//provided by KexiMessageHandler connect(d->prj, TQT_SIGNAL(error(const TQString&,KexiDB::Object*)), this, TQT_SLOT(showErrorMessage(const TQString&,KexiDB::Object*))); +//provided by KexiMessageHandler connect(d->prj, TQT_SIGNAL(error(const TQString&,const TQString&)), this, TQT_SLOT(showErrorMessage(const TQString&,const TQString&))); + connect(d->prj, TQT_SIGNAL(itemRenamed(const KexiPart::Item&, const TQCString&)), this, TQT_SLOT(slotObjectRenamed(const KexiPart::Item&, const TQCString&))); if (d->nav) connect(d->prj, TQT_SIGNAL(itemRemoved(const KexiPart::Item&)), d->nav, TQT_SLOT(slotRemoveItem(const KexiPart::Item&))); @@ -2783,7 +2783,7 @@ tristate KexiMainWindowImpl::openProjectInExternalKexiInstance(const TQString& a } //! @todo use KRun args << fileName; - TQProcess proc(args, TQT_TQOBJECT(this), "process"); + TQProcess proc(args, this, "process"); proc.setWorkingDirectory( TQFileInfo(fileName).dir(true) ); const bool ok = proc.start(); if (!ok) { @@ -3394,7 +3394,7 @@ void KexiMainWindowImpl::attachWindow(KMdiChildView *pWnd, bool /*bShow*/, bool TQWidget* KexiMainWindowImpl::findWindow(TQWidget *w) { - while (w && !acceptsSharedActions(TQT_TQOBJECT(w))) + while (w && !acceptsSharedActions(w)) w = w->parentWidget(); return w; } @@ -3465,14 +3465,14 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e ) /*! On mouse click on the findow, make sure it's focused and actions are invalidated */ if (e->type()==TQEvent::MouseButtonPress) { - TQWidget *w = findWindow(TQT_TQWIDGET(obj)); + TQWidget *w = findWindow(static_cast<TQWidget*>(obj)); KexiVDebug << "MouseButtonPress EVENT " << (w ? w->name() : 0) << endl; if (w) { w->setFocus(); - invalidateSharedActions(TQT_TQOBJECT(d->curDialog)); + invalidateSharedActions(d->curDialog); } } - TQWidget *w = findWindow(TQT_TQWIDGET(obj)); + TQWidget *w = findWindow(static_cast<TQWidget*>(obj)); if (e->type()==TQEvent::FocusIn) { focus_w = focusWindow(); KexiVDebug << "Focus EVENT" << endl; @@ -3530,15 +3530,15 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e ) //d->nav->setFocus(); d->focus_before_popup->setFocus(); d->focus_before_popup=0; - invalidateSharedActions(TQT_TQOBJECT(d->curDialog)); + invalidateSharedActions(d->curDialog); return true; } //remember currently focued window invalidate act. if (e->type()==TQEvent::FocusOut) { if (static_cast<TQFocusEvent*>(e)->reason()==TQFocusEvent::Popup) { - if (KexiUtils::hasParent(TQT_TQOBJECT(d->curDialog), TQT_TQOBJECT(focus_w))) { - invalidateSharedActions(TQT_TQOBJECT(d->curDialog)); + if (KexiUtils::hasParent(d->curDialog, focus_w)) { + invalidateSharedActions(d->curDialog); d->focus_before_popup=d->curDialog; } else { diff --git a/kexi/main/keximainwindowimpl_p.h b/kexi/main/keximainwindowimpl_p.h index 8b1a66ab..d1eac9f5 100644 --- a/kexi/main/keximainwindowimpl_p.h +++ b/kexi/main/keximainwindowimpl_p.h @@ -73,7 +73,7 @@ public: wasAutoOpen = false; dialogExistedBeforeCloseProject = false; #ifndef KEXI_SHOW_UNIMPLEMENTED - dummy_action = new TDEActionMenu(TQString(""), TQT_TQOBJECT(wnd)); + dummy_action = new TDEActionMenu(TQString(""), wnd); #endif maximizeFirstOpenedChildFrm = false; #ifdef HAVE_TDENEWSTUFF diff --git a/kexi/main/kexinamewidget.cpp b/kexi/main/kexinamewidget.cpp index 51c1e045..bf38c28a 100644 --- a/kexi/main/kexinamewidget.cpp +++ b/kexi/main/kexinamewidget.cpp @@ -85,7 +85,7 @@ void KexiNameWidget::init( le_name = new KLineEdit( nameText, this, "le_name" ); le_name->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed,1,0)); Validator *idValidator = new IdentifierValidator(0, "id_val"); - le_name->setValidator( m_validator = new MultiValidator(idValidator, TQT_TQOBJECT(this), "val") ); + le_name->setValidator( m_validator = new MultiValidator(idValidator, this, "val") ); lyr->addWidget( le_name, 2, 1 ); setFocusProxy(le_caption); diff --git a/kexi/main/printing/kexisimpleprintpreviewwindow.cpp b/kexi/main/printing/kexisimpleprintpreviewwindow.cpp index 404237bb..11cf1114 100644 --- a/kexi/main/printing/kexisimpleprintpreviewwindow.cpp +++ b/kexi/main/printing/kexisimpleprintpreviewwindow.cpp @@ -169,28 +169,28 @@ KexiSimplePrintPreviewWindow::KexiSimplePrintPreviewWindow( lyr->addWidget(m_toolbar); id = m_toolbar->insertWidget( -1, 0, new KPushButton(KStdGuiItem::print(), m_toolbar) ); - m_toolbar->addConnection(id, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotPrintClicked())); + m_toolbar->addConnection(id, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotPrintClicked())); static_cast<KPushButton*>(m_toolbar->getWidget(id))->setAccel(TQt::CTRL|TQt::Key_P); m_toolbar->insertSeparator(); id = m_toolbar->insertWidget(-1, 0, new KPushButton(i18n("Page Set&up..."), m_toolbar)); - m_toolbar->addConnection(id, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotPageSetup())); + m_toolbar->addConnection(id, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotPageSetup())); m_toolbar->insertSeparator(); #ifndef KEXI_NO_UNFINISHED //! @todo unfinished id = m_toolbar->insertWidget( -1, 0, new KPushButton(BarIconSet("zoom-in"), i18n("Zoom In"), m_toolbar)); - m_toolbar->addConnection(id, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotZoomInClicked())); + m_toolbar->addConnection(id, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotZoomInClicked())); m_toolbar->insertSeparator(); id = m_toolbar->insertWidget( -1, 0, new KPushButton(BarIconSet("zoom-out"), i18n("Zoom Out"), m_toolbar)); - m_toolbar->addConnection(id, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotZoomOutClicked())); + m_toolbar->addConnection(id, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotZoomOutClicked())); m_toolbar->insertSeparator(); #endif id = m_toolbar->insertWidget(-1, 0, new KPushButton(KStdGuiItem::close(), m_toolbar)); - m_toolbar->addConnection(id, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(close())); + m_toolbar->addConnection(id, TQT_SIGNAL(clicked()), this, TQT_SLOT(close())); m_toolbar->alignItemRight(id); m_scrollView = new KexiSimplePrintPreviewScrollView(this); @@ -214,29 +214,29 @@ KexiSimplePrintPreviewWindow::KexiSimplePrintPreviewWindow( m_navToolbar->setIconText(TDEToolBar::IconTextRight); m_idFirst = m_navToolbar->insertWidget( -1, 0, new KPushButton(BarIconSet("go-first"), i18n("First Page"), m_navToolbar)); - m_navToolbar->addConnection(m_idFirst, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotFirstClicked())); + m_navToolbar->addConnection(m_idFirst, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFirstClicked())); m_navToolbar->insertSeparator(); m_idPrevious = m_navToolbar->insertWidget( -1, 0, new KPushButton(BarIconSet("go-previous"), i18n("Previous Page"), m_navToolbar)); - m_navToolbar->addConnection(m_idPrevious, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotPreviousClicked())); + m_navToolbar->addConnection(m_idPrevious, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotPreviousClicked())); m_navToolbar->insertSeparator(); m_idPageNumberLabel = m_navToolbar->insertWidget( -1, 0, new TQLabel(m_navToolbar)); m_navToolbar->insertSeparator(); m_idNext = m_navToolbar->insertWidget( -1, 0, new KPushButton(BarIconSet("go-next"), i18n("Next Page"), m_navToolbar)); - m_navToolbar->addConnection(m_idNext, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotNextClicked())); + m_navToolbar->addConnection(m_idNext, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNextClicked())); m_navToolbar->insertSeparator(); m_idLast = m_navToolbar->insertWidget( -1, 0, new KPushButton(BarIconSet("go-last"), i18n("Last Page"), m_navToolbar)); - m_navToolbar->addConnection(m_idLast, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotLastClicked())); + m_navToolbar->addConnection(m_idLast, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotLastClicked())); m_navToolbar->insertSeparator(); resize(width(), kapp->desktop()->height()*4/5); //! @todo progress bar... - TQTimer::singleShot(50, TQT_TQOBJECT(this), TQT_SLOT(initLater())); + TQTimer::singleShot(50, this, TQT_SLOT(initLater())); } void KexiSimplePrintPreviewWindow::initLater() diff --git a/kexi/main/startup/KexiNewProjectWizard.cpp b/kexi/main/startup/KexiNewProjectWizard.cpp index 26d9cc64..2b1f4026 100644 --- a/kexi/main/startup/KexiNewProjectWizard.cpp +++ b/kexi/main/startup/KexiNewProjectWizard.cpp @@ -188,7 +188,7 @@ KexiNewProjectWizard::KexiNewProjectWizard(KexiDBConnectionSet& conn_set, connect(m_server_db_name->le_dbname, TQT_SIGNAL(returnPressed()), this,TQT_SLOT(accept())); m_server_db_name->le_caption->setText(i18n("New database")); - m_server_db_name->le_dbname->setValidator(new KexiUtils::IdentifierValidator(TQT_TQOBJECT(this), "id_val")); + m_server_db_name->le_dbname->setValidator(new KexiUtils::IdentifierValidator(this, "id_val")); m_project_selector = new KexiProjectSelectorWidget( m_server_db_name->frm_dblist, "KexiProjectSelectorWidget", 0, false, false ); GLUE_WIDGET(m_project_selector, m_server_db_name->frm_dblist); diff --git a/kexi/main/startup/KexiStartupFileDialog.cpp b/kexi/main/startup/KexiStartupFileDialog.cpp index 61aa0735..a5c6f958 100644 --- a/kexi/main/startup/KexiStartupFileDialog.cpp +++ b/kexi/main/startup/KexiStartupFileDialog.cpp @@ -60,7 +60,7 @@ KexiStartupFileDialog::KexiStartupFileDialog( TQObject *obj; while ( (obj = it.current()) != 0 ) { ++it; - static_cast<TQPushButton*>(TQT_TQWIDGET(obj))->hide(); + static_cast<TQPushButton*>(obj)->hide(); } delete l; } @@ -70,7 +70,7 @@ KexiStartupFileDialog::KexiStartupFileDialog( TQObject *obj; while ( (obj = it.current()) != 0 ) { ++it; - TQT_TQWIDGET(obj)->installEventFilter(this); + static_cast<TQWidget*>(obj)->installEventFilter(this); } delete l; } diff --git a/kexi/migration/importwizard.cpp b/kexi/migration/importwizard.cpp index 12b207a9..43bf6e4f 100644 --- a/kexi/migration/importwizard.cpp +++ b/kexi/migration/importwizard.cpp @@ -353,7 +353,7 @@ void ImportWizard::setupImporting() KButtonBox *optionsBox = new KButtonBox(m_importingPage); vbox->addWidget( optionsBox ); - m_importOptionsButton = optionsBox->addButton(i18n("Advanced Options"), TQT_TQOBJECT(this), TQT_SLOT(slotOptionsButtonClicked())); + m_importOptionsButton = optionsBox->addButton(i18n("Advanced Options"), this, TQT_SLOT(slotOptionsButtonClicked())); m_importOptionsButton->setIconSet(SmallIconSet("configure")); optionsBox->addStretch(1); diff --git a/kexi/plugins/forms/kexiformpart.cpp b/kexi/plugins/forms/kexiformpart.cpp index cce155d4..e5d7addf 100644 --- a/kexi/plugins/forms/kexiformpart.cpp +++ b/kexi/plugins/forms/kexiformpart.cpp @@ -230,7 +230,7 @@ void KexiFormPart::initInstanceActions() KexiDialogTempData* KexiFormPart::createTempData(KexiDialogBase* dialog) { - return new KexiFormPart::TempData(TQT_TQOBJECT(dialog)); + return new KexiFormPart::TempData(dialog); } KexiViewBase* KexiFormPart::createView(TQWidget *parent, KexiDialogBase* dialog, diff --git a/kexi/plugins/forms/widgets/kexidbform.cpp b/kexi/plugins/forms/widgets/kexidbform.cpp index 41e8cc64..263f327b 100644 --- a/kexi/plugins/forms/widgets/kexidbform.cpp +++ b/kexi/plugins/forms/widgets/kexidbform.cpp @@ -131,7 +131,7 @@ static void repaintAll(TQWidget *w) TQObjectList *list = w->queryList("TQWidget"); TQObjectListIt it(*list); for (TQObject *obj; (obj=it.current()); ++it ) { - TQT_TQWIDGET(obj)->repaint(); + static_cast<TQWidget*>(obj)->repaint(); } delete list; } @@ -320,7 +320,7 @@ void KexiDBForm::updateTabStopsOrder(KFormDesigner::Form* form) kexipluginsdbg << "KexiDBForm::updateTabStopsOrder(): also adding '" << childrenIt.current()->className() << " " << childrenIt.current()->name() << "' child to filtered widgets" << endl; - //it.current()->widget()->installEventFilter(TQT_TQWIDGET(childrenIt.current())); + //it.current()->widget()->installEventFilter(childrenIt.current()); childrenIt.current()->installEventFilter(this); // } } @@ -495,7 +495,7 @@ bool KexiDBForm::eventFilter( TQObject * watched, TQEvent * e ) if (!realWidget) return true; //ignore //the watched widget can be a subwidget of a real widget, e.g. autofield: find it - //TQWidget* realWidget = TQT_TQWIDGET(watched); + //TQWidget* realWidget = static_cast<TQWidget*>(watched); while (dynamic_cast<KexiDataItemInterface*>(realWidget) && dynamic_cast<KexiDataItemInterface*>(realWidget)->parentInterface()) realWidget = dynamic_cast<TQWidget*>( dynamic_cast<KexiDataItemInterface*>(realWidget)->parentInterface() ); @@ -548,7 +548,7 @@ bool KexiDBForm::eventFilter( TQObject * watched, TQEvent * e ) //behaves differently (e.g. TQLineEdit calls selectAll()) when //focus event's reason is TQFocusEvent::Tab if (widgetToFocus->focusProxy()) - widgetToFocus = TQT_TQWIDGET(widgetToFocus->focusProxy()); + widgetToFocus = widgetToFocus->focusProxy(); if (widgetToFocus && d->dataAwareObject->acceptEditor()) { if (tab) { //try to accept this will validate the current input (if any) diff --git a/kexi/plugins/forms/widgets/kexidblineedit.cpp b/kexi/plugins/forms/widgets/kexidblineedit.cpp index 5e2ac08a..e0395cde 100644 --- a/kexi/plugins/forms/widgets/kexidblineedit.cpp +++ b/kexi/plugins/forms/widgets/kexidblineedit.cpp @@ -56,7 +56,7 @@ KexiDBLineEdit::KexiDBLineEdit(TQWidget *parent, const char *name) , KexiFormDataItemInterface() //moved , m_dateFormatter(0) //moved , m_timeFormatter(0) - , m_menuExtender(TQT_TQOBJECT(this), this) + , m_menuExtender(this, this) , m_internalReadOnly(false) , m_slotTextChanged_enabled(true) { @@ -254,7 +254,7 @@ void KexiDBLineEdit::setReadOnly( bool readOnly ) if (m_internalReadOnly) { m_readWriteValidator = validator(); if (!m_readOnlyValidator) - m_readOnlyValidator = new KexiDBLineEdit_ReadOnlyValidator(TQT_TQOBJECT(this)); + m_readOnlyValidator = new KexiDBLineEdit_ReadOnlyValidator(this); setValidator( m_readOnlyValidator ); } else { diff --git a/kexi/plugins/forms/widgets/kexidbsubform.cpp b/kexi/plugins/forms/widgets/kexidbsubform.cpp index 8b4149a9..d021bcb2 100644 --- a/kexi/plugins/forms/widgets/kexidbsubform.cpp +++ b/kexi/plugins/forms/widgets/kexidbsubform.cpp @@ -124,8 +124,8 @@ KexiDBSubForm::setFormName(const TQString &name) m_form->setDesignMode(false); // Install event filters on the whole newly created form - KFormDesigner::ObjectTreeItem *tree = m_parentForm->objectTree()->lookup(TQT_TQOBJECT(this)->name()); - KFormDesigner::installRecursiveEventFilter(TQT_TQOBJECT(this), tree->eventEater()); + KFormDesigner::ObjectTreeItem *tree = m_parentForm->objectTree()->lookup(this->name()); + KFormDesigner::installRecursiveEventFilter(this, tree->eventEater()); } #include "kexidbsubform.moc" diff --git a/kexi/plugins/forms/widgets/kexidbtextedit.cpp b/kexi/plugins/forms/widgets/kexidbtextedit.cpp index 07e932b4..3b9c6f09 100644 --- a/kexi/plugins/forms/widgets/kexidbtextedit.cpp +++ b/kexi/plugins/forms/widgets/kexidbtextedit.cpp @@ -32,7 +32,7 @@ KexiDBTextEdit::KexiDBTextEdit(TQWidget *parent, const char *name) : KTextEdit(parent, name) , KexiDBTextWidgetInterface() , KexiFormDataItemInterface() - , m_menuExtender(TQT_TQOBJECT(this), this) + , m_menuExtender(this, this) , m_slotTextChanged_enabled(true) { connect(this, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotTextChanged())); diff --git a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp index 9c9c5f22..61f86ec2 100644 --- a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp +++ b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp @@ -383,7 +383,7 @@ if ( m_mode == Clipboard ) connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(optionsButtonClicked())); - installRecursiveEventFilter(TQT_TQOBJECT(this), TQT_TQOBJECT(this)); + installRecursiveEventFilter(this, this); initLater(); } diff --git a/kexi/plugins/queries/kexiquerydesignersql.cpp b/kexi/plugins/queries/kexiquerydesignersql.cpp index be57a766..f443c92f 100644 --- a/kexi/plugins/queries/kexiquerydesignersql.cpp +++ b/kexi/plugins/queries/kexiquerydesignersql.cpp @@ -108,7 +108,7 @@ KexiQueryDesignerSQLView::KexiQueryDesignerSQLView(KexiMainWindow *mainWin, TQWi d->head = new KexiSectionHeader(i18n("SQL Query Text"),TQt::Vertical, d->splitter); d->editor = new KexiQueryDesignerSQLEditor(mainWin, d->head, "sqle"); // d->editor->installEventFilter(this);//for keys - connect(d->editor, TQT_SIGNAL(textChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotTextChanged())); + connect(d->editor, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotTextChanged())); addChildView(d->editor); setViewWidget(d->editor); d->splitter->setFocusProxy(d->editor); @@ -136,8 +136,8 @@ KexiQueryDesignerSQLView::KexiQueryDesignerSQLView(KexiMainWindow *mainWin, TQWi TQHBoxLayout *b = new TQHBoxLayout(this); b->addWidget(d->splitter); - plugSharedAction("querypart_check_query", TQT_TQOBJECT(this), TQT_SLOT(slotCheckQuery())); - plugSharedAction("querypart_view_toggle_history", TQT_TQOBJECT(this), TQT_SLOT(slotUpdateMode())); + plugSharedAction("querypart_check_query", this, TQT_SLOT(slotCheckQuery())); + plugSharedAction("querypart_view_toggle_history", this, TQT_SLOT(slotUpdateMode())); d->action_toggle_history = static_cast<TDEToggleAction*>( sharedAction( "querypart_view_toggle_history" ) ); d->historyHead = new KexiSectionHeader(i18n("SQL Query History"),TQt::Vertical, d->history_section); @@ -146,11 +146,11 @@ KexiQueryDesignerSQLView::KexiQueryDesignerSQLView(KexiMainWindow *mainWin, TQWi static const TQString msg_back = i18n("Back to Selected Query"); static const TQString msg_clear = i18n("Clear History"); - d->historyHead->addButton("select_item", msg_back, TQT_TQOBJECT(this), TQT_SLOT(slotSelectQuery())); - d->historyHead->addButton("edit-clear", msg_clear, TQT_TQOBJECT(d->history), TQT_SLOT(clear())); - d->history->popupMenu()->insertItem(SmallIcon("select_item"), msg_back, TQT_TQOBJECT(this), TQT_SLOT(slotSelectQuery())); + d->historyHead->addButton("select_item", msg_back, this, TQT_SLOT(slotSelectQuery())); + d->historyHead->addButton("edit-clear", msg_clear, d->history, TQT_SLOT(clear())); + d->history->popupMenu()->insertItem(SmallIcon("select_item"), msg_back, this, TQT_SLOT(slotSelectQuery())); d->history->popupMenu()->insertItem(SmallIcon("edit-clear"), msg_clear, d->history, TQT_SLOT(clear())); - connect(d->history, TQT_SIGNAL(currentItemDoubleClicked()), TQT_TQOBJECT(this), TQT_SLOT(slotSelectQuery())); + connect(d->history, TQT_SIGNAL(currentItemDoubleClicked()), this, TQT_SLOT(slotSelectQuery())); d->heightForHistoryMode = -1; //height() / 2; //d->historyHead->hide(); diff --git a/kexi/plugins/queries/kexiquerypart.cpp b/kexi/plugins/queries/kexiquerypart.cpp index 02c4ab94..aad6c992 100644 --- a/kexi/plugins/queries/kexiquerypart.cpp +++ b/kexi/plugins/queries/kexiquerypart.cpp @@ -214,7 +214,7 @@ tristate KexiQueryPart::rename(KexiMainWindow *win, KexiPart::Item &item, const //---------------- KexiQueryPart::TempData::TempData(KexiDialogBase* parent, KexiDB::Connection *conn) - : KexiDialogTempData(TQT_TQOBJECT(parent)) + : KexiDialogTempData(parent) , KexiDB::Connection::TableSchemaChangeListenerInterface() , queryChangedInPreviousView(false) , m_query(0) @@ -253,7 +253,7 @@ void KexiQueryPart::TempData::registerTableSchemaChanges(KexiDB::QuerySchema *q) tristate KexiQueryPart::TempData::closeListener() { - KexiDialogBase* dlg = static_cast<KexiDialogBase*>(TQT_TQWIDGET(parent())); + KexiDialogBase* dlg = static_cast<KexiDialogBase*>(parent()); return dlg->mainWin()->closeDialog(dlg); } @@ -270,7 +270,7 @@ void KexiQueryPart::TempData::setQuery(KexiDB::QuerySchema *query) return; if (m_query /* query not owned by dialog */ - && (static_cast<KexiDialogBase*>(TQT_TQWIDGET(parent()))->schemaData() != static_cast<KexiDB::SchemaData*>( m_query ))) + && (static_cast<KexiDialogBase*>(parent())->schemaData() != static_cast<KexiDB::SchemaData*>( m_query ))) { delete m_query; } diff --git a/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp b/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp index 6de68b7d..4348aae2 100644 --- a/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp +++ b/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp @@ -88,13 +88,13 @@ KexiScriptDesignView::KexiScriptDesignView(KexiMainWindow *mainWin, TQWidget *pa d->statusbrowser->installEventFilter(this); splitter->setResizeMode(d->statusbrowser, TQSplitter::KeepSize); - plugSharedAction( "data_execute", TQT_TQOBJECT(this), TQT_SLOT(execute()) ); + plugSharedAction( "data_execute", this, TQT_SLOT(execute()) ); if(KexiEditor::isAdvancedEditor()) // the configeditor is only in advanced mode avaiable. - plugSharedAction( "script_config_editor", TQT_TQOBJECT(d->editor), TQT_SLOT(slotConfigureEditor()) ); + plugSharedAction( "script_config_editor", d->editor, TQT_SLOT(slotConfigureEditor()) ); loadData(); - d->properties = new KoProperty::Set(TQT_TQOBJECT(this), "KexiScripting"); + d->properties = new KoProperty::Set(this, "KexiScripting"); connect(d->properties, TQT_SIGNAL( propertyChanged(KoProperty::Set&, KoProperty::Property&) ), this, TQT_SLOT( slotPropertyChanged(KoProperty::Set&, KoProperty::Property&) )); diff --git a/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp b/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp index b45c97c7..fe3453ab 100644 --- a/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp +++ b/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp @@ -124,7 +124,7 @@ void KexiScriptPart::initPartActions() // scripting-plugin depends on this instance and loading the plugin will // fail if it's not avaiable. if(! Kross::Api::Manager::scriptManager()->hasChild("KexiMainWindow")) { - Kross::Api::Manager::scriptManager()->addTQObject(TQT_TQOBJECT(m_mainWin), "KexiMainWindow"); + Kross::Api::Manager::scriptManager()->addTQObject(m_mainWin, "KexiMainWindow"); // Add the TDEAction's provided by the ScriptGUIClient to the // KexiMainWindow. diff --git a/kexi/plugins/tables/kexitabledesignerview.cpp b/kexi/plugins/tables/kexitabledesignerview.cpp index 4b68a7de..d092bf89 100644 --- a/kexi/plugins/tables/kexitabledesignerview.cpp +++ b/kexi/plugins/tables/kexitabledesignerview.cpp @@ -160,45 +160,45 @@ KexiTableDesignerView::KexiTableDesignerView(KexiMainWindow *win, TQWidget *pare d->view->setSpreadSheetMode(); connect(d->data, TQT_SIGNAL(aboutToChangeCell(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*)), - TQT_TQOBJECT(this), TQT_SLOT(slotBeforeCellChanged(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*))); + this, TQT_SLOT(slotBeforeCellChanged(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*))); connect(d->data, TQT_SIGNAL(rowUpdated(KexiTableItem*)), - TQT_TQOBJECT(this), TQT_SLOT(slotRowUpdated(KexiTableItem*))); + this, TQT_SLOT(slotRowUpdated(KexiTableItem*))); //connect(d->data, TQT_SIGNAL(aboutToInsertRow(KexiTableItem*,KexiDB::ResultInfo*,bool)), - // TQT_TQOBJECT(this), TQT_SLOT(slotAboutToInsertRow(KexiTableItem*,KexiDB::ResultInfo*,bool))); + // this, TQT_SLOT(slotAboutToInsertRow(KexiTableItem*,KexiDB::ResultInfo*,bool))); connect(d->data, TQT_SIGNAL(aboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool)), - TQT_TQOBJECT(this), TQT_SLOT(slotAboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool))); + this, TQT_SLOT(slotAboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool))); setMinimumSize(d->view->minimumSizeHint().width(), d->view->minimumSizeHint().height()); d->view->setFocus(); d->sets = new KexiDataAwarePropertySet( this, d->view ); - connect(d->sets, TQT_SIGNAL(rowDeleted()), TQT_TQOBJECT(this), TQT_SLOT(updateActions())); - connect(d->sets, TQT_SIGNAL(rowInserted()), TQT_TQOBJECT(this), TQT_SLOT(slotRowInserted())); + connect(d->sets, TQT_SIGNAL(rowDeleted()), this, TQT_SLOT(updateActions())); + connect(d->sets, TQT_SIGNAL(rowInserted()), this, TQT_SLOT(slotRowInserted())); d->contextMenuTitle = new TDEPopupTitle(d->view->contextMenu()); d->view->contextMenu()->insertItem(d->contextMenuTitle, -1, 0); - connect(d->view->contextMenu(), TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(slotAboutToShowContextMenu())); + connect(d->view->contextMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotAboutToShowContextMenu())); - plugSharedAction("tablepart_toggle_pkey", TQT_TQOBJECT(this), TQT_SLOT(slotTogglePrimaryKey())); + plugSharedAction("tablepart_toggle_pkey", this, TQT_SLOT(slotTogglePrimaryKey())); d->action_toggle_pkey = static_cast<TDEToggleAction*>( sharedAction("tablepart_toggle_pkey") ); d->action_toggle_pkey->plug(d->view->contextMenu(), 1); //add at the beginning d->view->contextMenu()->insertSeparator(2); setAvailable("tablepart_toggle_pkey", !conn->isReadOnly()); #ifndef KEXI_NO_UNDOREDO_ALTERTABLE - plugSharedAction("edit_undo", TQT_TQOBJECT(this), TQT_SLOT(slotUndo())); - plugSharedAction("edit_redo", TQT_TQOBJECT(this), TQT_SLOT(slotRedo())); + plugSharedAction("edit_undo", this, TQT_SLOT(slotUndo())); + plugSharedAction("edit_redo", this, TQT_SLOT(slotRedo())); setAvailable("edit_undo", false); setAvailable("edit_redo", false); - connect(d->history, TQT_SIGNAL(commandExecuted(KCommand*)), TQT_TQOBJECT(this), TQT_SLOT(slotCommandExecuted(KCommand*))); + connect(d->history, TQT_SIGNAL(commandExecuted(KCommand*)), this, TQT_SLOT(slotCommandExecuted(KCommand*))); #endif #ifdef KEXI_DEBUG_GUI KexiUtils::addAlterTableActionDebug(TQString()); //to create the tab KexiUtils::connectPushButtonActionForDebugWindow( - "simulateAlterTableExecution", TQT_TQOBJECT(this), TQT_SLOT(slotSimulateAlterTableExecution())); + "simulateAlterTableExecution", this, TQT_SLOT(slotSimulateAlterTableExecution())); KexiUtils::connectPushButtonActionForDebugWindow( - "executeRealAlterTable", TQT_TQOBJECT(this), TQT_SLOT(executeRealAlterTable())); + "executeRealAlterTable", this, TQT_SLOT(executeRealAlterTable())); #endif } @@ -309,7 +309,7 @@ KexiTableDesignerView::createPropertySet( int row, const KexiDB::Field& field, b if (mainWin()->project()->dbConnection()->isReadOnly()) set->setReadOnly( true ); // connect(buff,TQT_SIGNAL(propertyChanged(KexiPropertyBuffer&,KexiProperty&)), -// TQT_TQOBJECT(this), TQT_SLOT(slotPropertyChanged(KexiPropertyBuffer&,KexiProperty&))); +// this, TQT_SLOT(slotPropertyChanged(KexiPropertyBuffer&,KexiProperty&))); KoProperty::Property *prop; @@ -457,7 +457,7 @@ KexiTableDesignerView::createPropertySet( int row, const KexiDB::Field& field, b d->updatePropertiesVisibility(field.type(), *set); connect(set, TQT_SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)), - TQT_TQOBJECT(this), TQT_SLOT(slotPropertyChanged(KoProperty::Set&, KoProperty::Property&))); + this, TQT_SLOT(slotPropertyChanged(KoProperty::Set&, KoProperty::Property&))); d->sets->insert(row, set, newOne); return set; diff --git a/kexi/plugins/tables/kexitablepart.cpp b/kexi/plugins/tables/kexitablepart.cpp index 2a9b61d3..e1c3cd22 100644 --- a/kexi/plugins/tables/kexitablepart.cpp +++ b/kexi/plugins/tables/kexitablepart.cpp @@ -93,7 +93,7 @@ void KexiTablePart::initInstanceActions() KexiDialogTempData* KexiTablePart::createTempData(KexiDialogBase* dialog) { - return new KexiTablePart::TempData(TQT_TQOBJECT(dialog)); + return new KexiTablePart::TempData(dialog); } KexiViewBase* KexiTablePart::createView(TQWidget *parent, KexiDialogBase* dialog, diff --git a/kexi/widget/kexibrowser.cpp b/kexi/widget/kexibrowser.cpp index dd0b16a1..6a17bc94 100644 --- a/kexi/widget/kexibrowser.cpp +++ b/kexi/widget/kexibrowser.cpp @@ -101,10 +101,10 @@ KexiBrowser::KexiBrowser(TQWidget* parent, KexiMainWindow *mainWin, int features m_list->sort(); m_list->setAllColumnsShowFocus(true); m_list->setTooltipColumn(0); - m_list->renameLineEdit()->setValidator( new KexiUtils::IdentifierValidator(TQT_TQOBJECT(this)) ); + m_list->renameLineEdit()->setValidator( new KexiUtils::IdentifierValidator(this) ); m_list->setResizeMode(TQListView::LastColumn); connect(m_list, TQT_SIGNAL(contextMenu(TDEListView *, TQListViewItem *, const TQPoint &)), - TQT_TQOBJECT(this), TQT_SLOT(slotContextMenu(TDEListView*, TQListViewItem *, const TQPoint&))); + this, TQT_SLOT(slotContextMenu(TDEListView*, TQListViewItem *, const TQPoint&))); connect(m_list, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotSelectionChanged(TQListViewItem*))); @@ -123,8 +123,8 @@ KexiBrowser::KexiBrowser(TQWidget* parent, KexiMainWindow *mainWin, int features } // actions - m_openAction = new TDEAction(i18n("&Open"), "document-open", 0/*TQt::Key_Enter conflict!*/, TQT_TQOBJECT(this), - TQT_SLOT(slotOpenObject()), TQT_TQOBJECT(this), "open_object"); + m_openAction = new TDEAction(i18n("&Open"), "document-open", 0/*TQt::Key_Enter conflict!*/, this, + TQT_SLOT(slotOpenObject()), this, "open_object"); m_openAction->setToolTip(i18n("Open object")); m_openAction->setWhatsThis(i18n("Opens object selected in the list")); @@ -146,20 +146,20 @@ KexiBrowser::KexiBrowser(TQWidget* parent, KexiMainWindow *mainWin, int features } else { m_deleteAction = new TDEAction(i18n("&Delete"), "edit-delete", 0/*TQt::Key_Delete*/, - TQT_TQOBJECT(this), TQT_SLOT(slotRemove()), m_actions, "edit_delete"); + this, TQT_SLOT(slotRemove()), m_actions, "edit_delete"); //! @todo 1.1: just add "Delete" tooltip and what's this m_deleteAction->setToolTip(i18n("&Delete").replace("&","")); m_renameAction = new TDEAction(i18n("&Rename"), "", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotRename()), m_actions, "edit_rename"); + this, TQT_SLOT(slotRename()), m_actions, "edit_rename"); #ifdef KEXI_SHOW_UNIMPLEMENTED //todo plugSharedAction("edit_cut",TQT_SLOT(slotCut())); //todo plugSharedAction("edit_copy",TQT_SLOT(slotCopy())); //todo plugSharedAction("edit_paste",TQT_SLOT(slotPaste())); #endif - m_designAction = new TDEAction(i18n("&Design"), "edit", 0/*TQt::CTRL + TQt::Key_Enter conflict!*/, TQT_TQOBJECT(this), - TQT_SLOT(slotDesignObject()), TQT_TQOBJECT(this), "design_object"); + m_designAction = new TDEAction(i18n("&Design"), "edit", 0/*TQt::CTRL + TQt::Key_Enter conflict!*/, this, + TQT_SLOT(slotDesignObject()), this, "design_object"); m_designAction->setToolTip(i18n("Design object")); m_designAction->setWhatsThis(i18n("Starts designing of the object selected in the list")); if (m_features & Toolbar) { @@ -167,21 +167,21 @@ KexiBrowser::KexiBrowser(TQWidget* parent, KexiMainWindow *mainWin, int features buttons_flyr->add(btn); } - m_editTextAction = new TDEAction(i18n("Open in &Text View"), "", 0, TQT_TQOBJECT(this), - TQT_SLOT(slotEditTextObject()), TQT_TQOBJECT(this), "editText_object"); + m_editTextAction = new TDEAction(i18n("Open in &Text View"), "", 0, this, + TQT_SLOT(slotEditTextObject()), this, "editText_object"); m_editTextAction->setToolTip(i18n("Open object in text view")); m_editTextAction->setWhatsThis(i18n("Opens selected object in the list in text view")); - m_newObjectAction = new TDEAction("", "document-new", 0, TQT_TQOBJECT(this), TQT_SLOT(slotNewObject()), TQT_TQOBJECT(this), "new_object"); + m_newObjectAction = new TDEAction("", "document-new", 0, this, TQT_SLOT(slotNewObject()), this, "new_object"); if (m_features & Toolbar) { m_newObjectToolButton = new KexiSmallToolButton(this, "", TQIconSet(), "new_object"); m_newObjectPopup = new TDEPopupMenu(this, "newObjectPopup"); - connect(m_newObjectPopup, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(slotNewObjectPopupAboutToShow())); + connect(m_newObjectPopup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotNewObjectPopupAboutToShow())); // KexiPart::Part* part = Kexi::partManager().part("kexi/table"); // m_newObjectPopup->insertItem( SmallIconSet(part->info()->createItemIcon()), part->instanceName() ); m_newObjectToolButton->setPopup(m_newObjectPopup); m_newObjectToolButton->setPopupDelay(TQApplication::startDragTime()); - connect(m_newObjectToolButton, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotNewObject())); + connect(m_newObjectToolButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewObject())); buttons_flyr->add(m_newObjectToolButton); m_deleteObjectToolButton = new KexiSmallToolButton(this, m_deleteAction); @@ -190,22 +190,22 @@ KexiBrowser::KexiBrowser(TQWidget* parent, KexiMainWindow *mainWin, int features } } - m_executeAction = new TDEAction(i18n("Execute"), "media-playback-start", 0, TQT_TQOBJECT(this), - TQT_SLOT(slotExecuteObject()), TQT_TQOBJECT(this), "data_execute"); + m_executeAction = new TDEAction(i18n("Execute"), "media-playback-start", 0, this, + TQT_SLOT(slotExecuteObject()), this, "data_execute"); m_exportActionMenu = new TDEActionMenu(i18n("Export")); m_dataExportAction = new TDEAction(i18n("Export->To File as Data &Table... ", "To &File as Data Table..."), - "table", 0, TQT_TQOBJECT(this), TQT_SLOT(slotExportAsDataTable()), TQT_TQOBJECT(this), "exportAsDataTable"); + "table", 0, this, TQT_SLOT(slotExportAsDataTable()), this, "exportAsDataTable"); m_dataExportAction->setWhatsThis( i18n("Exports data from the currently selected table or query data to a file.")); m_exportActionMenu->insert( m_dataExportAction ); - m_printAction = new TDEAction(i18n("&Print..."), "document-print", 0, TQT_TQOBJECT(this), - TQT_SLOT(slotPrintItem()), TQT_TQOBJECT(this), "printItem"); + m_printAction = new TDEAction(i18n("&Print..."), "document-print", 0, this, + TQT_SLOT(slotPrintItem()), this, "printItem"); m_printAction->setWhatsThis( i18n("Prints data from the currently selected table or query.")); - m_pageSetupAction = new TDEAction(i18n("Page Setup..."), "", 0, TQT_TQOBJECT(this), - TQT_SLOT(slotPageSetupForItem()), TQT_TQOBJECT(this), "pageSetupForItem"); + m_pageSetupAction = new TDEAction(i18n("Page Setup..."), "", 0, this, + TQT_SLOT(slotPageSetupForItem()), this, "pageSetupForItem"); m_pageSetupAction->setWhatsThis( i18n("Shows page setup for printing the active table or query.")); diff --git a/kexi/widget/kexicustompropertyfactory_p.cpp b/kexi/widget/kexicustompropertyfactory_p.cpp index 2cdd0bfc..5e549461 100644 --- a/kexi/widget/kexicustompropertyfactory_p.cpp +++ b/kexi/widget/kexicustompropertyfactory_p.cpp @@ -83,7 +83,7 @@ KexiIdentifierPropertyEdit::KexiIdentifierPropertyEdit( : StringEdit(property, parent, name) { m_edit->setValidator( - new KexiUtils::IdentifierValidator(TQT_TQOBJECT(m_edit), "KexiIdentifierPropertyEdit Validator") ); + new KexiUtils::IdentifierValidator(m_edit, "KexiIdentifierPropertyEdit Validator") ); } KexiIdentifierPropertyEdit::~KexiIdentifierPropertyEdit() diff --git a/kexi/widget/kexidataawareview.cpp b/kexi/widget/kexidataawareview.cpp index 034b3f70..6c61009b 100644 --- a/kexi/widget/kexidataawareview.cpp +++ b/kexi/widget/kexidataawareview.cpp @@ -45,15 +45,15 @@ void KexiDataAwareView::init( TQWidget* viewWidget, KexiSharedActionClient* acti setViewWidget(m_internalView, true); if (!noDataAware) { - m_dataAwareObject->connectCellSelectedSignal(TQT_TQOBJECT(this), TQT_SLOT(slotCellSelected(int,int))); + m_dataAwareObject->connectCellSelectedSignal(this, TQT_SLOT(slotCellSelected(int,int))); //! before closing - we'are accepting editing - connect(TQT_TQOBJECT(this), TQT_SIGNAL(closing(bool&)), TQT_TQOBJECT(this), TQT_SLOT(slotClosing(bool&))); + connect(this, TQT_SIGNAL(closing(bool&)), this, TQT_SLOT(slotClosing(bool&))); //! updating actions on start/stop editing - m_dataAwareObject->connectRowEditStartedSignal(TQT_TQOBJECT(this), TQT_SLOT(slotUpdateRowActions(int))); - m_dataAwareObject->connectRowEditTerminatedSignal(TQT_TQOBJECT(this), TQT_SLOT(slotUpdateRowActions(int))); - m_dataAwareObject->connectReloadActionsSignal(TQT_TQOBJECT(this), TQT_SLOT(reloadActions())); + m_dataAwareObject->connectRowEditStartedSignal(this, TQT_SLOT(slotUpdateRowActions(int))); + m_dataAwareObject->connectRowEditTerminatedSignal(this, TQT_SLOT(slotUpdateRowActions(int))); + m_dataAwareObject->connectReloadActionsSignal(this, TQT_SLOT(reloadActions())); } TQVBoxLayout *box = new TQVBoxLayout(this); @@ -72,37 +72,37 @@ void KexiDataAwareView::init( TQWidget* viewWidget, KexiSharedActionClient* acti void KexiDataAwareView::initActions() { - plugSharedAction("edit_delete_row", TQT_TQOBJECT(this), TQT_SLOT(deleteCurrentRow())); + plugSharedAction("edit_delete_row", this, TQT_SLOT(deleteCurrentRow())); m_actionClient->plugSharedAction(sharedAction("edit_delete_row")); //for proper shortcut - plugSharedAction("edit_delete", TQT_TQOBJECT(this), TQT_SLOT(deleteAndStartEditCurrentCell())); + plugSharedAction("edit_delete", this, TQT_SLOT(deleteAndStartEditCurrentCell())); m_actionClient->plugSharedAction(sharedAction("edit_delete")); //for proper shortcut - plugSharedAction("edit_edititem", TQT_TQOBJECT(this), TQT_SLOT(startEditOrToggleValue())); + plugSharedAction("edit_edititem", this, TQT_SLOT(startEditOrToggleValue())); m_actionClient->plugSharedAction(sharedAction("edit_edititem")); //for proper shortcut - plugSharedAction("data_save_row", TQT_TQOBJECT(this), TQT_SLOT(acceptRowEdit())); + plugSharedAction("data_save_row", this, TQT_SLOT(acceptRowEdit())); m_actionClient->plugSharedAction(sharedAction("data_save_row")); //for proper shortcut - plugSharedAction("data_cancel_row_changes", TQT_TQOBJECT(this), TQT_SLOT(cancelRowEdit())); + plugSharedAction("data_cancel_row_changes", this, TQT_SLOT(cancelRowEdit())); m_actionClient->plugSharedAction(sharedAction("data_cancel_row_changes")); //for proper shortcut if (m_dataAwareObject->isSortingEnabled()) { - plugSharedAction("data_sort_az", TQT_TQOBJECT(this), TQT_SLOT(sortAscending())); - plugSharedAction("data_sort_za", TQT_TQOBJECT(this), TQT_SLOT(sortDescending())); + plugSharedAction("data_sort_az", this, TQT_SLOT(sortAscending())); + plugSharedAction("data_sort_za", this, TQT_SLOT(sortDescending())); } m_actionClient->plugSharedAction(sharedAction("edit_insert_empty_row")); //for proper shortcut setAvailable("data_sort_az", m_dataAwareObject->isSortingEnabled()); setAvailable("data_sort_za", m_dataAwareObject->isSortingEnabled()); -//! \todo plugSharedAction("data_filter", TQT_TQOBJECT(this), TQT_SLOT(???())); +//! \todo plugSharedAction("data_filter", this, TQT_SLOT(???())); - plugSharedAction("data_go_to_first_record", TQT_TQOBJECT(this), TQT_SLOT(slotGoToFirstRow())); - plugSharedAction("data_go_to_previous_record", TQT_TQOBJECT(this), TQT_SLOT(slotGoToPreviusRow())); - plugSharedAction("data_go_to_next_record", TQT_TQOBJECT(this), TQT_SLOT(slotGoToNextRow())); - plugSharedAction("data_go_to_last_record", TQT_TQOBJECT(this), TQT_SLOT(slotGoToLastRow())); - plugSharedAction("data_go_to_new_record", TQT_TQOBJECT(this), TQT_SLOT(slotGoToNewRow())); + plugSharedAction("data_go_to_first_record", this, TQT_SLOT(slotGoToFirstRow())); + plugSharedAction("data_go_to_previous_record", this, TQT_SLOT(slotGoToPreviusRow())); + plugSharedAction("data_go_to_next_record", this, TQT_SLOT(slotGoToNextRow())); + plugSharedAction("data_go_to_last_record", this, TQT_SLOT(slotGoToLastRow())); + plugSharedAction("data_go_to_new_record", this, TQT_SLOT(slotGoToNewRow())); //! \todo update availability setAvailable("data_go_to_first_record", true); @@ -111,25 +111,25 @@ void KexiDataAwareView::initActions() setAvailable("data_go_to_last_record", true); setAvailable("data_go_to_new_record", true); - plugSharedAction("edit_copy", TQT_TQOBJECT(this), TQT_SLOT(copySelection())); + plugSharedAction("edit_copy", this, TQT_SLOT(copySelection())); m_actionClient->plugSharedAction(sharedAction("edit_copy")); //for proper shortcut - plugSharedAction("edit_cut", TQT_TQOBJECT(this), TQT_SLOT(cutSelection())); + plugSharedAction("edit_cut", this, TQT_SLOT(cutSelection())); m_actionClient->plugSharedAction(sharedAction("edit_cut")); //for proper shortcut - plugSharedAction("edit_paste", TQT_TQOBJECT(this), TQT_SLOT(paste())); + plugSharedAction("edit_paste", this, TQT_SLOT(paste())); m_actionClient->plugSharedAction(sharedAction("edit_paste")); //for proper shortcut -// plugSharedAction("edit_find", TQT_TQOBJECT(this), TQT_SLOT(editFind())); +// plugSharedAction("edit_find", this, TQT_SLOT(editFind())); // m_actionClient->plugSharedAction(sharedAction("edit_find")); //for proper shortcut -// plugSharedAction("edit_findnext", TQT_TQOBJECT(this), TQT_SLOT(editFindNext())); +// plugSharedAction("edit_findnext", this, TQT_SLOT(editFindNext())); // m_actionClient->plugSharedAction(sharedAction("edit_findnext")); //for proper shortcut -// plugSharedAction("edit_findprevious", TQT_TQOBJECT(this), TQT_SLOT(editFindPrevious())); +// plugSharedAction("edit_findprevious", this, TQT_SLOT(editFindPrevious())); // m_actionClient->plugSharedAction(sharedAction("edit_findprev")); //for proper shortcut -//! @todo plugSharedAction("edit_replace", TQT_TQOBJECT(this), TQT_SLOT(editReplace())); +//! @todo plugSharedAction("edit_replace", this, TQT_SLOT(editReplace())); //! @todo m_actionClient->plugSharedAction(sharedAction("edit_replace")); //for proper shortcut // setAvailable("edit_find", true); @@ -188,7 +188,7 @@ void KexiDataAwareView::reloadActions() //warning FIXME Move this to the table part /* kdDebug()<<"INIT ACTIONS***********************************************************************"<<endl; - new TDEAction(i18n("Filter"), "filter", 0, TQT_TQOBJECT(this), TQT_SLOT(filter()), actionCollection(), "tablepart_filter"); + new TDEAction(i18n("Filter"), "filter", 0, this, TQT_SLOT(filter()), actionCollection(), "tablepart_filter"); setXMLFile("kexidatatableui.rc"); */ m_dataAwareObject->contextMenu()->clear(); @@ -200,11 +200,11 @@ void KexiDataAwareView::reloadActions() bool separatorNeeded = true; unplugSharedAction("edit_clear_table"); - plugSharedAction("edit_clear_table", TQT_TQOBJECT(this), TQT_SLOT(deleteAllRows())); + plugSharedAction("edit_clear_table", this, TQT_SLOT(deleteAllRows())); if (m_dataAwareObject->isEmptyRowInsertingEnabled()) { unplugSharedAction("edit_insert_empty_row"); - plugSharedAction("edit_insert_empty_row", TQT_TQOBJECT(m_internalView), TQT_SLOT(insertEmptyRow())); + plugSharedAction("edit_insert_empty_row", m_internalView, TQT_SLOT(insertEmptyRow())); if (separatorNeeded) m_dataAwareObject->contextMenu()->insertSeparator(); plugSharedAction("edit_insert_empty_row", m_dataAwareObject->contextMenu()); diff --git a/kexi/widget/kexieditor.cpp b/kexi/widget/kexieditor.cpp index 5df84c96..01000882 100644 --- a/kexi/widget/kexieditor.cpp +++ b/kexi/widget/kexieditor.cpp @@ -102,7 +102,7 @@ KexiEditor::KexiEditor(KexiMainWindow *mainWin, TQWidget *parent, const char *na layout = new TQVBoxLayout(fr); layout->setMargin( 2 ); - d->doc = KTextEditor::EditorChooser::createDocument(TQT_TQOBJECT(fr)); + d->doc = KTextEditor::EditorChooser::createDocument(fr); if (!d->doc) return; d->view = d->doc->createView(fr, 0L); @@ -118,7 +118,7 @@ KexiEditor::KexiEditor(KexiMainWindow *mainWin, TQWidget *parent, const char *na connect(d->doc, TQT_SIGNAL(textChanged()), this, TQT_SIGNAL(textChanged())); #endif - KexiEditorSharedActionConnector c(this, TQT_TQOBJECT(d->view)); + KexiEditorSharedActionConnector c(this, d->view); d->view->installEventFilter(this); layout->addWidget(d->view); diff --git a/kexi/widget/kexifieldcombobox.cpp b/kexi/widget/kexifieldcombobox.cpp index ceb2aa41..875425de 100644 --- a/kexi/widget/kexifieldcombobox.cpp +++ b/kexi/widget/kexifieldcombobox.cpp @@ -243,7 +243,7 @@ void KexiFieldComboBox::focusOutEvent( TQFocusEvent *e ) { KComboBox::focusOutEvent( e ); // accept changes if the focus is moved - if (!KexiUtils::hasParent(TQT_TQOBJECT(this), TQT_TQOBJECT(focusWidget()))) //(a check needed because drop-down listbox also causes a focusout) + if (!KexiUtils::hasParent(this, focusWidget())) //(a check needed because drop-down listbox also causes a focusout) slotReturnPressed(currentText()); } diff --git a/kexi/widget/kexisectionheader.cpp b/kexi/widget/kexisectionheader.cpp index 1176b793..7ff39106 100644 --- a/kexi/widget/kexisectionheader.cpp +++ b/kexi/widget/kexisectionheader.cpp @@ -104,7 +104,7 @@ bool KexiSectionHeader::eventFilter( TQObject *o, TQEvent *e ) if (o == d->lbl && e->type()==TQEvent::MouseButtonRelease) {//|| e->type()==TQEvent::FocusOut) {// && o->inherits("TQWidget")) { if (d->lyr->view) d->lyr->view->setFocus(); -// if (KexiUtils::hasParent( this, static_cast<TQWidget*>(o))) { +// if (KexiUtils::hasParent( this, o)) { // d->lbl->setPaletteBackgroundColor( e->type()==TQEvent::FocusIn ? red : blue); // } } diff --git a/kexi/widget/relations/kexirelationwidget.cpp b/kexi/widget/relations/kexirelationwidget.cpp index 94d81348..e3a2e8b2 100644 --- a/kexi/widget/relations/kexirelationwidget.cpp +++ b/kexi/widget/relations/kexirelationwidget.cpp @@ -65,7 +65,7 @@ KexiRelationWidget::KexiRelationWidget(KexiMainWindow *win, TQWidget *parent, m_btnAdd = new KPushButton(i18n("&Add"), this); hlyr->addWidget(m_btnAdd); hlyr->addStretch(1); - connect(m_btnAdd, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotAddTable())); + connect(m_btnAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddTable())); m_relationView = new KexiRelationView(this, "relation_view"); setViewWidget(m_relationView); @@ -75,19 +75,19 @@ KexiRelationWidget::KexiRelationWidget(KexiMainWindow *win, TQWidget *parent, //actions m_tableQueryPopup = new TDEPopupMenu(this, "m_popup"); m_tableQueryPopupTitleID = m_tableQueryPopup->insertTitle(SmallIcon("table"), ""); - connect(m_tableQueryPopup, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(aboutToShowPopupMenu())); + connect(m_tableQueryPopup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(aboutToShowPopupMenu())); m_connectionPopup = new TDEPopupMenu(this, "m_connectionPopup"); m_connectionPopupTitleID = m_connectionPopup->insertTitle(""); - connect(m_connectionPopup, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(aboutToShowPopupMenu())); + connect(m_connectionPopup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(aboutToShowPopupMenu())); m_areaPopup = new TDEPopupMenu(this, "m_areaPopup"); m_openSelectedTableAction = new TDEAction(i18n("&Open Table"), SmallIcon("document-open"), TDEShortcut(), - TQT_TQOBJECT(this), TQT_SLOT(openSelectedTable()), TQT_TQOBJECT(this), "relationsview_openTable"); + this, TQT_SLOT(openSelectedTable()), this, "relationsview_openTable"); m_openSelectedTableAction->plug( m_tableQueryPopup ); m_designSelectedTableAction = new TDEAction(i18n("&Design Table"), SmallIcon("edit"), TDEShortcut(), - TQT_TQOBJECT(this), TQT_SLOT(designSelectedTable()), TQT_TQOBJECT(this), "relationsview_designTable"); + this, TQT_SLOT(designSelectedTable()), this, "relationsview_designTable"); m_designSelectedTableAction->plug( m_tableQueryPopup ); m_tableQueryPopup->insertSeparator(); @@ -95,24 +95,24 @@ KexiRelationWidget::KexiRelationWidget(KexiMainWindow *win, TQWidget *parent, hide_action->setIconSet(TQIconSet()); plugSharedAction("edit_delete",m_connectionPopup); - plugSharedAction("edit_delete",TQT_TQOBJECT(this), TQT_SLOT(removeSelectedObject())); + plugSharedAction("edit_delete",this, TQT_SLOT(removeSelectedObject())); connect(m_relationView, TQT_SIGNAL(tableViewGotFocus()), - TQT_TQOBJECT(this), TQT_SLOT(tableViewGotFocus())); + this, TQT_SLOT(tableViewGotFocus())); connect(m_relationView, TQT_SIGNAL(connectionViewGotFocus()), - TQT_TQOBJECT(this), TQT_SLOT(connectionViewGotFocus())); + this, TQT_SLOT(connectionViewGotFocus())); connect(m_relationView, TQT_SIGNAL(emptyAreaGotFocus()), - TQT_TQOBJECT(this), TQT_SLOT(emptyAreaGotFocus())); + this, TQT_SLOT(emptyAreaGotFocus())); connect(m_relationView, TQT_SIGNAL(tableContextMenuRequest( const TQPoint& )), - TQT_TQOBJECT(this), TQT_SLOT(tableContextMenuRequest( const TQPoint& ))); + this, TQT_SLOT(tableContextMenuRequest( const TQPoint& ))); connect(m_relationView, TQT_SIGNAL(connectionContextMenuRequest( const TQPoint& )), - TQT_TQOBJECT(this), TQT_SLOT(connectionContextMenuRequest( const TQPoint& ))); + this, TQT_SLOT(connectionContextMenuRequest( const TQPoint& ))); connect(m_relationView, TQT_SIGNAL(tableHidden(KexiDB::TableSchema&)), - TQT_TQOBJECT(this), TQT_SLOT(slotTableHidden(KexiDB::TableSchema&))); + this, TQT_SLOT(slotTableHidden(KexiDB::TableSchema&))); connect(m_relationView, TQT_SIGNAL(tablePositionChanged(KexiRelationViewTableContainer*)), - TQT_TQOBJECT(this), TQT_SIGNAL(tablePositionChanged(KexiRelationViewTableContainer*))); + this, TQT_SIGNAL(tablePositionChanged(KexiRelationViewTableContainer*))); connect(m_relationView, TQT_SIGNAL(aboutConnectionRemove(KexiRelationViewConnection*)), - TQT_TQOBJECT(this), TQT_SIGNAL(aboutConnectionRemove(KexiRelationViewConnection*))); + this, TQT_SIGNAL(aboutConnectionRemove(KexiRelationViewConnection*))); #if 0 if(!embedd) @@ -172,7 +172,7 @@ KexiRelationWidget::addTable(KexiDB::TableSchema *t, const TQRect &rect) if (!c) return; connect(c->tableView(), TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&,int)), - TQT_TQOBJECT(this), TQT_SLOT(slotTableFieldDoubleClicked(TQListViewItem*,const TQPoint&,int))); + this, TQT_SLOT(slotTableFieldDoubleClicked(TQListViewItem*,const TQPoint&,int))); } const TQString tname = t->name().lower(); diff --git a/kexi/widget/tableview/kexitableview.cpp b/kexi/widget/tableview/kexitableview.cpp index dbb89f5d..11ff828d 100644 --- a/kexi/widget/tableview/kexitableview.cpp +++ b/kexi/widget/tableview/kexitableview.cpp @@ -102,10 +102,10 @@ class KexiTableView::WhatsThis : public TQWhatsThis const int leftMargin = m_tv->verticalHeaderVisible() ? m_tv->verticalHeader()->width() : 0; //const int topMargin = m_tv->horizontalHeaderVisible() ? m_tv->d->pTopHeader->height() : 0; //const int bottomMargin = m_tv->d->appearance.navigatorEnabled ? m_tv->m_navPanel->height() : 0; - if (KexiUtils::hasParent(TQT_TQOBJECT(m_tv->verticalHeader()), TQT_TQOBJECT(m_tv->childAt(pos)))) { + if (KexiUtils::hasParent(m_tv->verticalHeader(), m_tv->childAt(pos))) { return i18n("Contains a pointer to the currently selected row"); } - else if (KexiUtils::hasParent(TQT_TQOBJECT(m_tv->m_navPanel), TQT_TQOBJECT(m_tv->childAt(pos)))) { + else if (KexiUtils::hasParent(m_tv->m_navPanel, m_tv->childAt(pos))) { return i18n("Row navigator"); // return TQWhatsThis::textFor(m_tv->m_navPanel, TQPoint( pos.x(), pos.y() - m_tv->height() + bottomMargin )); } @@ -1264,7 +1264,7 @@ void KexiTableView::keyPressEvent(TQKeyEvent* e) TQWidget *w = focusWidget(); // if (!w || w!=viewport() && w!=this && (!m_editor || w!=m_editor->view() && w!=m_editor)) { // if (!w || w!=viewport() && w!=this && (!m_editor || w!=m_editor->view())) { - if (!w || w!=viewport() && TQT_TQOBJECT(w)!=TQT_TQOBJECT(this) && (!m_editor || !KexiUtils::hasParent(TQT_TQOBJECT(dynamic_cast<TQObject*>(m_editor)), TQT_TQOBJECT(w)))) { + if (!w || w!=viewport() && w!=this && (!m_editor || !KexiUtils::hasParent(dynamic_cast<TQObject*>(m_editor), w))) { //don't process stranger's events e->ignore(); return; @@ -2478,8 +2478,8 @@ bool KexiTableView::eventFilter( TQObject *o, TQEvent *e ) } /* else if (e->type()==TQEvent::FocusOut && o->inherits("TQWidget")) { //hp==true if currently focused widget is a child of this table view - const bool hp = KexiUtils::hasParent( static_cast<TQWidget*>(o), focusWidget()); - if (!hp && KexiUtils::hasParent( this, static_cast<TQWidget*>(o))) { + const bool hp = KexiUtils::hasParent( o, focusWidget()); + if (!hp && KexiUtils::hasParent( this, o)) { //accept row editing if focus is moved to foreign widget //(not a child, like eg. editor) from one of our table view's children //or from table view itself diff --git a/kexi/widget/utils/kexicontextmenuutils.cpp b/kexi/widget/utils/kexicontextmenuutils.cpp index f52ff7d5..e127bea6 100644 --- a/kexi/widget/utils/kexicontextmenuutils.cpp +++ b/kexi/widget/utils/kexicontextmenuutils.cpp @@ -63,20 +63,20 @@ KexiImageContextMenu::KexiImageContextMenu(TQWidget* parent) insertTitle(TQString()); d->insertFromFileAction = new TDEAction(i18n("Insert From &File..."), SmallIconSet("document-open"), 0, - TQT_TQOBJECT(this), TQT_SLOT(insertFromFile()), &d->actionCollection, "insert"); + this, TQT_SLOT(insertFromFile()), &d->actionCollection, "insert"); d->insertFromFileAction->plug(this); - d->saveAsAction = KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(saveAs()), &d->actionCollection); + d->saveAsAction = KStdAction::saveAs(this, TQT_SLOT(saveAs()), &d->actionCollection); // d->saveAsAction->setText(i18n("&Save &As...")); d->saveAsAction->plug(this); insertSeparator(); - d->cutAction = KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(cut()), &d->actionCollection); + d->cutAction = KStdAction::cut(this, TQT_SLOT(cut()), &d->actionCollection); d->cutAction->plug(this); - d->copyAction = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(copy()), &d->actionCollection); + d->copyAction = KStdAction::copy(this, TQT_SLOT(copy()), &d->actionCollection); d->copyAction->plug(this); - d->pasteAction = KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(paste()), &d->actionCollection); + d->pasteAction = KStdAction::paste(this, TQT_SLOT(paste()), &d->actionCollection); d->pasteAction->plug(this); d->deleteAction = new TDEAction(i18n("&Clear"), SmallIconSet("edit-delete"), 0, - TQT_TQOBJECT(this), TQT_SLOT(clear()), &d->actionCollection, "delete"); + this, TQT_SLOT(clear()), &d->actionCollection, "delete"); d->deleteAction->plug(this); #ifdef KEXI_NO_UNFINISHED d->propertiesAction = 0; diff --git a/kexi/widget/utils/kexigradientwidget.cpp b/kexi/widget/utils/kexigradientwidget.cpp index f009bd43..4aa7341c 100644 --- a/kexi/widget/utils/kexigradientwidget.cpp +++ b/kexi/widget/utils/kexigradientwidget.cpp @@ -225,7 +225,7 @@ bool KexiGradientWidget::eventFilter( TQObject* object, TQEvent* event ) { if ( object == this ) { if ( event->type() == TQEvent::ChildInserted ) { child = dynamic_cast<TQWidget*>( dynamic_cast<TQChildEvent*>( event )->child() ); - if ( isValidChildWidget( TQT_TQOBJECT(child) ) == false ) { + if ( isValidChildWidget( child ) == false ) { return false; } /** diff --git a/kexi/widget/utils/kexirecordnavigator.cpp b/kexi/widget/utils/kexirecordnavigator.cpp index 334c605a..5e3cfae8 100644 --- a/kexi/widget/utils/kexirecordnavigator.cpp +++ b/kexi/widget/utils/kexirecordnavigator.cpp @@ -106,7 +106,7 @@ KexiRecordNavigator::KexiRecordNavigator(TQWidget *parent, int leftMargin, const m_navRecordNumber->setFocusPolicy(TQWidget::ClickFocus); m_navRecordNumber->installEventFilter(this); // m_navRowNumber->setFixedWidth(fw); - m_navRecordNumberValidator = new TQIntValidator(1, INT_MAX, TQT_TQOBJECT(this)); + m_navRecordNumberValidator = new TQIntValidator(1, INT_MAX, this); m_navRecordNumber->setValidator(m_navRecordNumberValidator); m_navRecordNumber->installEventFilter(this); TQToolTip::add(m_navRecordNumber, i18n("Current row number")); |