Drop TQT_BASE_OBJECT* defines

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/23/head
Michele Calgaro 9 months ago
parent 19e5278459
commit 8ac0be0f7f
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -79,7 +79,7 @@ bool KLSHistoryCombo::eventFilter( TQObject *o, TQEvent *ev )
// Handle Ctrl+Del/Backspace etc better than the TQt widget, which always
// jumps to the next whitespace.
TQLineEdit *edit = lineEdit();
if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(edit) )
if ( o == edit )
{
int type = ev->type();
if ( type == TQEvent::KeyPress )

@ -225,13 +225,13 @@ bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e )
if ( !o || !e || o->inherits( "TQDockWindowHandle" ) || o->inherits( "TQDockWindowTitleBar" ) )
return TQToolBar::eventFilter( o, e );
if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) && e->type() == TQEvent::MouseButtonPress &&
if ( o == this && e->type() == TQEvent::MouseButtonPress &&
( ( TQMouseEvent*)e )->button() == Qt::LeftButton ) {
mousePressEvent( (TQMouseEvent*)e );
return true;
}
if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) )
if ( o == this )
return TQToolBar::eventFilter( o, e );
if ( e->type() == TQEvent::MouseButtonPress ) {

@ -430,7 +430,7 @@ void SetPropertyCommand::execute()
if ( isResetCommand ) {
MetaDataBase::setPropertyChanged( widget, propName, false );
if ( WidgetFactory::resetProperty( widget, propName ) ) {
if ( !formWindow()->isWidgetSelected( widget ) && TQT_BASE_OBJECT(widget) != TQT_BASE_OBJECT(formWindow()) )
if ( !formWindow()->isWidgetSelected( widget ) && widget != formWindow() )
formWindow()->selectWidget( widget );
if ( editor->widget() != widget )
editor->setWidget( widget, formWindow() );

@ -92,9 +92,9 @@ static const char *const ignore_signals[] = {
ConnectionEditor::ConnectionEditor(TQWidget* parent, TQObject* sndr, TQObject* rcvr, FormWindow* fw)
: ConnectionEditorBase(parent, 0, true), m_formWindow(fw)
{
if (!rcvr || TQT_BASE_OBJECT(rcvr) == TQT_BASE_OBJECT(m_formWindow))
if (!rcvr || rcvr == m_formWindow)
rcvr = TQT_TQOBJECT(m_formWindow->mainContainer());
if (!sndr || TQT_BASE_OBJECT(sndr) == TQT_BASE_OBJECT(m_formWindow))
if (!sndr || sndr == m_formWindow)
sndr = TQT_TQOBJECT(m_formWindow->mainContainer());
m_sender = sndr;
m_receiver = rcvr;
@ -279,7 +279,7 @@ void ConnectionEditor::senderChanged(const TQString& s)
for (TQStrListIterator it(p_sigs); it.current(); ++it)
if (!isSignalIgnored(it.current()) && !signalBox->findItem(it.current(), TQt::ExactMatch))
signalBox->insertItem(it.current());
if (TQT_BASE_OBJECT(m_sender) == TQT_BASE_OBJECT(m_formWindow->mainContainer()))
if (m_sender == m_formWindow->mainContainer())
signalBox->insertStringList(MetaDataBase::signalList(TQT_TQOBJECT(m_formWindow)));
signalBox->sort();
signalBox->setCurrentItem(signalBox->firstItem());

@ -362,7 +362,7 @@ void FormWindow::insertWidget()
TQObject *o = it.current();
++it;
if (o->isWidgetType() && ((TQWidget*)o)->isVisibleTo(this) &&
insertedWidgets.find((TQWidget*)o) && TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(w))
insertedWidgets.find((TQWidget*)o) && o != w)
{
TQRect r2(((TQWidget*)o)->pos(), ((TQWidget*)o)->size());
if (r.contains(r2))
@ -798,7 +798,7 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w)
if (newReceiver && (newReceiver->inherits("TQLayoutWidget")
|| newReceiver->inherits("Spacer")))
newReceiver = (TQWidget*)connectReceiver;
drawRecRect = TQT_BASE_OBJECT(newReceiver) != TQT_BASE_OBJECT(connectReceiver);
drawRecRect = newReceiver != connectReceiver;
currentConnectPos = mapFromGlobal(e->globalPos());
if (newReceiver && (isMainContainer(TQT_TQOBJECT(newReceiver))
|| insertedWidgets.find(newReceiver)) && !isCentralWidget(TQT_TQOBJECT(newReceiver)))
@ -2274,7 +2274,7 @@ bool FormWindow::unify(TQObject *w, TQString &s, bool changeIt)
int num = 1;
TQPtrDictIterator<TQWidget> it(insertedWidgets);
for (; it.current();)
if (TQT_BASE_OBJECT(it.current()) != TQT_BASE_OBJECT(w) && !qstrcmp(it.current()->name(), s.latin1()))
if (it.current() != w && !qstrcmp(it.current()->name(), s.latin1()))
{
found = true;
if (!changeIt)
@ -2489,7 +2489,7 @@ TQWidget *FormWindow::containerAt(const TQPoint &pos, TQWidget *notParentOf)
bool FormWindow::isMainContainer(TQObject *w) const
{
return w && w->isWidgetType() && (TQT_BASE_OBJECT(w) == this || TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(mainContainer()));
return w && w->isWidgetType() && (w == this || w == mainContainer());
}
void FormWindow::setMainContainer(TQWidget *w)
@ -2497,7 +2497,7 @@ void FormWindow::setMainContainer(TQWidget *w)
bool resetPropertyWidget = isMainContainer(propertyWidget);
if (mContainer)
insertedWidgets.remove(mContainer);
if (TQT_BASE_OBJECT(propertyWidget) == TQT_BASE_OBJECT(mContainer))
if (propertyWidget == mContainer)
propertyWidget = 0;
delete mContainer;
mContainer = w;
@ -2567,7 +2567,7 @@ bool FormWindow::isCentralWidget(TQObject *w) const
{
if (!mainContainer()->inherits("TQMainWindow"))
return false;
return TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(((TQMainWindow*)mainContainer())->centralWidget());
return w == ((TQMainWindow*)mainContainer())->centralWidget();
}
TQObject *FormWindow::connectableObject(TQObject *w, TQObject *)

@ -306,7 +306,7 @@ void HorizontalLayout::doLayout()
TQHBoxLayout *layout = (TQHBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::HBox );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) )
if ( needReparent && w->parent() != layoutBase )
w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false );
if ( !useSplitter ) {
if ( qstrcmp( w->className(), "Spacer" ) == 0 )
@ -370,7 +370,7 @@ void VerticalLayout::doLayout()
TQVBoxLayout *layout = (TQVBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::VBox );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) )
if ( needReparent && w->parent() != layoutBase )
w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false );
if ( !useSplitter ) {
if ( qstrcmp( w->className(), "Spacer" ) == 0 )
@ -742,7 +742,7 @@ void GridLayout::doLayout()
int r, c, rs, cs;
for ( w = widgets.first(); w; w = widgets.next() ) {
if ( grid->locateWidget( w, r, c, rs, cs) ) {
if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) )
if ( needReparent && w->parent() != layoutBase )
w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false );
if ( rs * cs == 1 ) {
layout->addWidget( w, r, c, w->inherits( "Spacer" ) ? ( (Spacer*)w )->alignment() : 0 );

@ -705,25 +705,25 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
case TQEvent::Close:
break;
case TQEvent::DragEnter:
if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(qWorkspace()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(workspace()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(workspace()->viewport())) {
if (o == qWorkspace() || o == workspace() || o == workspace()->viewport()) {
workspace()->contentsDragEnterEvent((TQDragEnterEvent*)e);
return true;
}
break;
case TQEvent::DragMove:
if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(qWorkspace()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(workspace()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(workspace()->viewport())) {
if (o == qWorkspace() || o == workspace() || o == workspace()->viewport()) {
workspace()->contentsDragMoveEvent((TQDragMoveEvent*)e);
return true;
}
break;
case TQEvent::Drop:
if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(qWorkspace()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(workspace()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(workspace()->viewport())) {
if (o == qWorkspace() || o == workspace() || o == workspace()->viewport()) {
workspace()->contentsDropEvent((TQDropEvent*)e);
return true;
}
break;
case TQEvent::Show:
if (TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this))
if (o != this)
break;
if (((TQShowEvent*)e)->spontaneous())
break;

@ -786,7 +786,7 @@ void MainWindow::fileCreateTemplate()
void MainWindow::createNewTemplate()
{
CreateTemplate *dia = (CreateTemplate *) TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->parent();
CreateTemplate *dia = (CreateTemplate *) sender()->parent();
TQString fn = dia->editName->text();
TQString cn = dia->listClass->currentText();
if (fn.isEmpty() || cn.isEmpty())

@ -2781,7 +2781,7 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
case TQVariant::CString:
item = new PropertyTextItem( this, item, 0,
name, name == "name" &&
TQT_BASE_OBJECT(editor->widget()) == TQT_BASE_OBJECT(editor->formWindow()->mainContainer()),
editor->widget() == editor->formWindow()->mainContainer(),
false, true );
break;
case TQVariant::Bool:
@ -2917,10 +2917,10 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
return true;
PropertyItem *i = (PropertyItem*)currentItem();
if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) &&e->type() == TQEvent::KeyPress ) {
if ( o != this &&e->type() == TQEvent::KeyPress ) {
TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ( ke->key() == Key_Up || ke->key() == Key_Down ) &&
( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(viewport()) ) &&
( o != this || o != viewport() ) &&
!( ke->state() & ControlButton ) ) {
TQApplication::sendEvent( this, (TQKeyEvent*)e );
return true;
@ -2942,7 +2942,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
}
} else if ( e->type() == TQEvent::FocusOut && o->inherits( "TQLineEdit" ) && editor->formWindow() ) {
TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQT_SLOT( checkCompressedCommand() ) );
} else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) ) {
} else if ( o == viewport() ) {
TQMouseEvent *me;
PropertyListItem* i;
switch ( e->type() ) {
@ -2992,7 +2992,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
default:
break;
}
} else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(header()) ) {
} else if ( o == header() ) {
if ( e->type() == TQEvent::ContextMenu ) {
((TQContextMenuEvent *)e)->accept();
TQPopupMenu menu( 0 );

@ -90,7 +90,7 @@ void QCompletionEdit::updateListBox()
bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
{
if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(popup) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(listbox) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(listbox->viewport()) ) {
if ( o == popup || o == listbox || o == listbox->viewport() ) {
if ( e->type() == TQEvent::KeyPress ) {
TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ke->key() == Key_Enter || ke->key() == Key_Return || ke->key() == Key_Tab ) {
@ -133,7 +133,7 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
emit chosen( text() );
return true;
}
} else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) {
} else if ( o == this ) {
if ( e->type() == TQEvent::KeyPress ) {
TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ke->key() == Key_Up ||

@ -571,7 +571,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
const char* className = WidgetFactory::classNameOf( obj );
if ( obj->isA( "CustomWidget" ) )
usedCustomWidgets << TQString( className );
if ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(formwindow) && !formwindow->widgets()->find( (TQWidget*)obj ) )
if ( obj != formwindow && !formwindow->widgets()->find( (TQWidget*)obj ) )
return; // we don't know anything about this thing
TQString attributes;
@ -984,7 +984,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
changed << "margin" << "spacing";
}
if ( TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) {
if ( w == formwindow->mainContainer() ) {
if ( changed.findIndex( "geometry" ) == -1 )
changed << "geometry";
if ( changed.findIndex( "caption" ) == -1 )
@ -994,7 +994,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
if ( changed.isEmpty() )
return;
bool inLayout = TQT_BASE_OBJECT(w) != TQT_BASE_OBJECT(formwindow->mainContainer()) && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() &&
bool inLayout = w != formwindow->mainContainer() && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() &&
WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
TQStrList lst = w->metaObject()->propertyNames( !w->inherits( "Spacer" ) );
@ -1099,9 +1099,9 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
num = value.toInt();
if ( w && w->inherits( "TQLayout" ) ) {
if ( name == "spacing" )
num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( TQT_TQLAYOUT(TQT_BASE_OBJECT(w)) ) ) );
num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( TQT_TQLAYOUT(w) ) ) );
else if ( name == "margin" )
num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( TQT_TQLAYOUT(TQT_BASE_OBJECT(w)) ) ) );
num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( TQT_TQLAYOUT(w) ) ) );
}
ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << endl;
break;
@ -1117,9 +1117,9 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
unum = value.toUInt();
if ( w && w->inherits( "TQLayout" ) ) {
if ( name == "spacing" )
num = MetaDataBase::spacing( WidgetFactory::layoutParent( TQT_TQLAYOUT(TQT_BASE_OBJECT(w)) ) );
num = MetaDataBase::spacing( WidgetFactory::layoutParent( TQT_TQLAYOUT(w) ) );
else if ( name == "margin" )
num = MetaDataBase::margin( WidgetFactory::layoutParent( TQT_TQLAYOUT(TQT_BASE_OBJECT(w)) ) );
num = MetaDataBase::margin( WidgetFactory::layoutParent( TQT_TQLAYOUT(w) ) );
}
ts << makeIndent( indent ) << "<number>" << TQString::number( unum ) << "</number>" << endl;
break;
@ -1679,7 +1679,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( !p ) {
MetaDataBase::setFakeProperty( obj, prop, v );
if ( obj->isWidgetType() ) {
if ( prop == "database" && TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(toplevel) ) {
if ( prop == "database" && obj != toplevel ) {
TQStringList lst = MetaDataBase::fakeProperty( obj, "database" ).toStringList();
if ( lst.count() > 2 )
dbControls.insert( obj->name(), lst[ 2 ] );
@ -1734,11 +1734,11 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
}
if ( prop == "geometry" ) {
if ( TQT_BASE_OBJECT(obj) == toplevel ) {
if ( obj == toplevel ) {
hadGeometry = true;
toplevel->resize( v.toRect().size() );
return;
} else if ( TQT_BASE_OBJECT(obj) == formwindow->mainContainer() ) {
} else if ( obj == formwindow->mainContainer() ) {
hadGeometry = true;
formwindow->resize( v.toRect().size() );
return;
@ -1762,7 +1762,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
formwindow->unify( TQT_TQOBJECT(obj), s, true );
obj->setName( s.utf8() );
return;
} else if ( formwindow && TQT_BASE_OBJECT(obj) == formwindow->mainContainer() ) {
} else if ( formwindow && obj == formwindow->mainContainer() ) {
formwindow->setName( v.toCString() );
}
}
@ -2019,9 +2019,9 @@ void Resource::loadConnections( const TQDomElement &e )
n2 = n2.nextSibling().toElement();
}
if ( formwindow ) {
if ( TQT_BASE_OBJECT(conn.sender) == TQT_BASE_OBJECT(formwindow) )
if ( conn.sender == formwindow )
conn.sender = TQT_TQOBJECT(formwindow->mainContainer());
if ( TQT_BASE_OBJECT(conn.receiver) == TQT_BASE_OBJECT(formwindow) )
if ( conn.receiver == formwindow )
conn.receiver = TQT_TQOBJECT(formwindow->mainContainer());
}
if ( conn.sender && conn.receiver ) {

@ -188,7 +188,7 @@ int QDesignerTabWidget::count() const
bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
{
if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(tabBar()) ) return false;
if ( o != tabBar() ) return false;
switch ( e->type() ) {
case TQEvent::MouseButtonPress: {
@ -468,7 +468,7 @@ int EditorTabWidget::count() const
bool EditorTabWidget::eventFilter( TQObject *o, TQEvent *e )
{
if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(tabBar()) ) return false;
if ( o != tabBar() ) return false;
switch ( e->type() ) {
case TQEvent::MouseButtonPress: {

@ -720,7 +720,7 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos )
bool Workspace::eventFilter( TQObject *o, TQEvent * e )
{
// Reggie, on what type of events do we have to execute updateBufferEdit()
if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(bufferEdit) && e->type() != TQEvent::ChildRemoved )
if ( o == bufferEdit && e->type() != TQEvent::ChildRemoved )
updateBufferEdit();
return TQListView::eventFilter( o, e );
}

@ -827,7 +827,7 @@ void KommanderFactory::setProperty( TQObject* obj, const TQString &prop, const T
}
if ( prop == "geometry" ) {
if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(toplevel) ) {
if ( obj == toplevel ) {
toplevel->resize( v.toRect().size() );
return;
}
@ -1097,7 +1097,7 @@ void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connect
TQStrList slotList = receiver->metaObject()->slotNames( true );
// if this is a connection to a custom slot and we have a connector, try this as receiver
if ( slotList.find( conn.slot ) == -1 && TQT_BASE_OBJECT(receiver) == TQT_BASE_OBJECT(toplevel) && connector ) {
if ( slotList.find( conn.slot ) == -1 && receiver == toplevel && connector ) {
slotList = connector->metaObject()->slotNames( true );
receiver = connector;
}

@ -125,7 +125,7 @@ void KDockMainWindow::setMainDockWidget( KDockWidget* mdw )
void KDockMainWindow::setView( TQWidget *view )
{
if ( view->isA("KDockWidget") ){
if ( TQT_BASE_OBJECT(view->parent()) != TQT_BASE_OBJECT(this) ) ((KDockWidget*)view)->applyToWidget( this );
if ( view->parent() != this ) ((KDockWidget*)view)->applyToWidget( this );
}
#ifndef NO_KDE2
@ -782,7 +782,7 @@ void KDockWidget::updateHeader()
setCursor(TQCursor(ArrowCursor));
#endif
if ( (TQT_BASE_OBJECT(parent()) == TQT_BASE_OBJECT(manager->main)) || isGroup || (eDocking == KDockWidget::DockNone) ){
if ( (parent() == manager->main) || isGroup || (eDocking == KDockWidget::DockNone) ){
header->hide();
} else {
header->setTopLevel( false );
@ -803,7 +803,7 @@ void KDockWidget::updateHeader()
void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
{
if ( TQT_BASE_OBJECT(parent()) != TQT_BASE_OBJECT(s) )
if ( parent() != s )
{
hide();
reparent(s, 0, TQPoint(0,0), false);
@ -1433,7 +1433,7 @@ void KDockWidget::setWidget( TQWidget* mw )
{
if ( !mw ) return;
if ( TQT_BASE_OBJECT(mw->parent()) != TQT_BASE_OBJECT(this) ){
if ( mw->parent() != this ){
mw->reparent(this, 0, TQPoint(0,0), false);
}
@ -1489,13 +1489,13 @@ void KDockWidget::setDockTabName( KDockTabGroup* tab )
bool KDockWidget::mayBeHide() const
{
bool f = (TQT_BASE_OBJECT(parent()) != TQT_BASE_OBJECT(manager->main));
bool f = (parent() != manager->main);
return ( !isGroup && !isTabGroup && f && isVisible() && ( eDocking != (int)KDockWidget::DockNone ) );
}
bool KDockWidget::mayBeShow() const
{
bool f = (TQT_BASE_OBJECT(parent()) != TQT_BASE_OBJECT(manager->main));
bool f = (parent() != manager->main);
return ( !isGroup && !isTabGroup && f && !isVisible() );
}
@ -2162,7 +2162,7 @@ void KDockManager::writeConfig(TQDomElement &base)
TQObjectListIt it(*childDock);
KDockWidget *obj1;
while ( (obj1=(KDockWidget*)it.current()) ) {
if ( TQT_BASE_OBJECT(obj1->parent()) == TQT_BASE_OBJECT(main) )
if ( obj1->parent() == main )
mainWidgetStr = TQString::fromLatin1(obj1->name());
nList.append(obj1->name());
++it;
@ -2497,7 +2497,7 @@ void KDockManager::writeConfig( TDEConfig* c, TQString group )
++it;
//debug(" +Add subdock %s", obj->name());
nList.append( obj->name() );
if ( TQT_BASE_OBJECT(obj->parent()) == TQT_BASE_OBJECT(main) )
if ( obj->parent() == main )
c->writeEntry( "Main:view", obj->name() );
}

@ -112,7 +112,7 @@ void KMdiChildArea::destroyChild( KMdiChildFrm *child, bool focusTop )
bool wasMaximized = ( child->state() == KMdiChildFrm::Maximized );
// destroy the old one
TQT_BASE_OBJECT_NAME::disconnect( child );
TQObject::disconnect( child );
child->blockSignals( true );
m_pZ->setAutoDelete( false );
m_pZ->removeRef( child );
@ -144,7 +144,7 @@ void KMdiChildArea::destroyChildButNotItsView( KMdiChildFrm* child, bool focusTo
bool wasMaximized = ( child->state() == KMdiChildFrm::Maximized );
// destroy the old one
TQT_BASE_OBJECT_NAME::disconnect( child );
TQObject::disconnect( child );
child->unsetClient();
m_pZ->setAutoDelete( false );
m_pZ->removeRef( child );

@ -775,7 +775,7 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize )
delete list; // delete the list, not the objects
//Reparent if needed
if ( TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(this) )
if ( w->parent() != this )
{
//reparent to this widget , no flags , point , show it
TQPoint pnt2( KMDI_CHILDFRM_BORDER, clientYPos );
@ -1085,7 +1085,7 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
TQObject* pObj = obj;
while ( ( pObj != 0L ) && !bIsChild )
{
bIsChild = ( TQT_BASE_OBJECT(pObj) == TQT_BASE_OBJECT(this) );
bIsChild = ( pObj == this );
pObj = pObj->parent();
}
// unset the resize cursor if the cursor moved from the frame into a inner widget
@ -1101,7 +1101,7 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
if ( m_timeMeasure.elapsed() <= TQApplication::doubleClickInterval() )
bIsSecondClick = true; // of a possible double click
if ( !( ( ( TQT_BASE_OBJECT(obj) == m_pWinIcon ) || ( TQT_BASE_OBJECT(obj) == m_pUnixIcon ) ) && bIsSecondClick ) )
if ( !( ( ( obj == m_pWinIcon ) || ( obj == m_pUnixIcon ) ) && bIsSecondClick ) )
{
// in case we didn't click on the icon button
TQFocusEvent* pFE = new TQFocusEvent( TQFocusEvent::FocusIn );
@ -1112,7 +1112,7 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
m_pClient->activate();
}
if ( ( TQT_BASE_OBJECT(obj->parent()) != TQT_BASE_OBJECT(m_pCaption) ) && ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(m_pCaption) ) )
if ( ( obj->parent() != m_pCaption ) && ( obj != m_pCaption ) )
{
TQWidget* w = ( TQWidget* ) obj;
if ( ( w->focusPolicy() == TQ_ClickFocus ) || ( w->focusPolicy() == TQ_StrongFocus ) )
@ -1121,7 +1121,7 @@ bool KMdiChildFrm::eventFilter( TQObject *obj, TQEvent *e )
}
}
}
if ( ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pWinIcon) ) || ( obj == TQT_BASE_OBJECT(m_pUnixIcon) ) )
if ( ( obj == m_pWinIcon ) || ( obj == m_pUnixIcon ) )
{
// in case we clicked on the icon button
if ( m_timeMeasure.elapsed() > TQApplication::doubleClickInterval() )

@ -492,7 +492,7 @@ void KMdiChildView::slot_childDestroyed()
// if we lost a child we uninstall ourself as event filter for the lost
// child and its children
const TQObject * pLostChild = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(TQT_BASE_OBJECT_NAME::sender()));
const TQObject * pLostChild = TQObject::sender();
if ( pLostChild && ( pLostChild->isWidgetType() ) )
{
TQObjectList* list = ( ( TQObject* ) ( pLostChild ) ) ->queryList( "TQWidget" );
@ -628,14 +628,14 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e )
if ( e->type() == TQEvent::IconChange )
{
// tqDebug("KMDiChildView:: TQEvent:IconChange intercepted\n");
if ( TQT_BASE_OBJECT(obj) == this )
if ( obj == this )
iconUpdated( this, icon() ? ( *icon() ) : TQPixmap() );
else if ( TQT_BASE_OBJECT(obj) == m_trackChanges )
else if ( obj == m_trackChanges )
setIcon( m_trackChanges->icon() ? ( *( m_trackChanges->icon() ) ) : TQPixmap() );
}
if ( e->type() == TQEvent::CaptionChange )
{
if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(this) )
if ( obj == this )
captionUpdated( this, caption() );
}
}

@ -57,7 +57,7 @@ void FrameWizard::split(){
if(m_hasSelected) {
int split = 0;
TQString currNodeLabel = m_currSA;
TQString senderName=TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name();
TQString senderName=sender()->name();
if(senderName=="pbHorizontal"){
split = showRCeditorDlg(i18n("Enter the desired number of rows:"));
if(split>=2) vfe->split(currNodeLabel,split,HORIZONTAL);

@ -160,10 +160,10 @@ KParts::ReadOnlyPart *WHTMLPart::createPart( TQWidget * parentWidget, const char
bool WHTMLPart::eventFilter(TQObject *watched, TQEvent *e)
{
if (TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(view()) && e->type() == TQEvent::FocusOut && (!m_contextMenu || !m_contextMenu->hasFocus()))
if (watched == view() && e->type() == TQEvent::FocusOut && (!m_contextMenu || !m_contextMenu->hasFocus()))
emit previewHasFocus(false);
else
if (TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(view()) && e->type() == TQEvent::FocusIn)
if (watched == view() && e->type() == TQEvent::FocusIn)
emit previewHasFocus(true);
return false;
}

@ -218,7 +218,7 @@ bool ProjectNewGeneral::eventFilter ( TQObject * watched, TQEvent * e )
{
if (e->type() == TQEvent::FocusOut)
{
if (TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(linePrjTmpl))
if (watched == linePrjTmpl)
{
KURL url = baseUrl;
QuantaCommon::setUrl(url, linePrjTmpl->text());
@ -231,7 +231,7 @@ bool ProjectNewGeneral::eventFilter ( TQObject * watched, TQEvent * e )
} else
emit enableNextButton(this, true);
} else
if (TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(linePrjToolbar))
if (watched == linePrjToolbar)
{
KURL url = baseUrl;
QuantaCommon::setUrl(url, linePrjToolbar->text());

@ -554,7 +554,7 @@ void BaseTreeView::slotOpenWith()
void BaseTreeView::slotOpenWithApplication()
{
KService::Ptr ptr = KService::serviceByDesktopPath(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name());
KService::Ptr ptr = KService::serviceByDesktopPath(sender()->name());
if (ptr)
{
KURL::List list;

@ -361,10 +361,10 @@ void QuantaBookmarks::gotoLineNumber(int line)
Document *doc = m_doc;
if (!doc)
doc = m_viewManager->activeDocument();
TQObject *s = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()));
TQObject *s = TQT_TQOBJECT(const_cast<TQObject*>(sender()));
for (uint i = 0; i < m_othersMenuList.count(); i++)
{
if (TQT_BASE_OBJECT(s) == TQT_BASE_OBJECT(m_othersMenuList[i]))
if (s == m_othersMenuList[i])
{
doc = m_others[i];
break;

Loading…
Cancel
Save