Fix kdelibs FTBFS under Qt4

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1246982 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent a46e337285
commit 7d7b2c04e1

@ -615,7 +615,7 @@ void LdapConfigWidget::setFlags( int flags )
obj = ch2.first();
while ( obj != 0 ) {
widget = dynamic_cast<TQWidget*> (obj);
if ( widget && widget->parent() == this ) {
if ( widget && TQT_BASE_OBJECT(widget->parent()) == TQT_BASE_OBJECT(this) ) {
mainLayout->remove( widget );
delete ( widget );
}

@ -144,7 +144,7 @@ void KMUiManager::setupPropertyDialog(KPrinterPropertyDialog *dlg)
// retrieve the KPrinter object
KPrinter *prt(0);
if (dlg->parent() && dlg->parent()->isA("KPrintDialog"))
prt = static_cast<KPrintDialog*>(dlg->parent())->printer();
prt = static_cast<KPrintDialog*>(TQT_TQWIDGET(dlg->parent()))->printer();
// add margin page
if ( ( prt && !prt->fullPage() && prt->applicationType() == KPrinter::Dialog )

@ -122,7 +122,7 @@ void KDockMainWindow::setMainDockWidget( KDockWidget* mdw )
void KDockMainWindow::setView( TQWidget *view )
{
if ( view->isA("KDockWidget") ){
if ( view->parent() != this ) ((KDockWidget*)view)->applyToWidget( this );
if ( TQT_BASE_OBJECT(view->parent()) != TQT_BASE_OBJECT(this) ) ((KDockWidget*)view)->applyToWidget( this );
}
#ifndef NO_KDE2
@ -778,7 +778,7 @@ void KDockWidget::updateHeader()
setCursor(TQCursor(ArrowCursor));
#endif
if ( (parent() == manager->main) || isGroup || (eDocking == KDockWidget::DockNone) ){
if ( (TQT_BASE_OBJECT(parent()) == TQT_BASE_OBJECT(manager->main)) || isGroup || (eDocking == KDockWidget::DockNone) ){
header->hide();
} else {
header->setTopLevel( false );
@ -799,7 +799,7 @@ void KDockWidget::updateHeader()
void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
{
if ( parent() != s )
if ( TQT_BASE_OBJECT(parent()) != TQT_BASE_OBJECT(s) )
{
hide();
reparent(s, 0, TQPoint(0,0), false);
@ -930,7 +930,7 @@ KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos)
static_cast<KDockWidget*>(((KDockSplitter*)(parent()))->getLast());
if (neighbor==this)
return (static_cast<KDockWidget*>(parent()->parent())->findNearestDockWidget(pos));
return (static_cast<KDockWidget*>(TQT_TQWIDGET(parent()->parent()))->findNearestDockWidget(pos));
else
if (neighbor->getWidget() && (::tqqt_cast<KDockTabGroup*>(neighbor->getWidget())))
return (KDockWidget*)(((KDockTabGroup*)neighbor->getWidget())->page(0));
@ -938,7 +938,7 @@ KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos)
return neighbor;
}
else
return (static_cast<KDockWidget*>(parent()->parent())->findNearestDockWidget(pos));
return (static_cast<KDockWidget*>(TQT_TQWIDGET(parent()->parent()))->findNearestDockWidget(pos));
return 0;
}
@ -1449,7 +1449,7 @@ void KDockWidget::setWidget( TQWidget* mw )
{
if ( !mw ) return;
if ( mw->parent() != this ){
if ( TQT_BASE_OBJECT(mw->parent()) != TQT_BASE_OBJECT(this) ){
mw->reparent(this, 0, TQPoint(0,0), false);
}
@ -1505,13 +1505,13 @@ void KDockWidget::setDockTabName( KDockTabGroup* tab )
bool KDockWidget::mayBeHide() const
{
bool f = (parent() != manager->main);
bool f = (TQT_BASE_OBJECT(parent()) != TQT_BASE_OBJECT(manager->main));
return ( !isGroup && !isTabGroup && f && isVisible() && ( eDocking != (int)KDockWidget::DockNone ) );
}
bool KDockWidget::mayBeShow() const
{
bool f = (parent() != manager->main);
bool f = (TQT_BASE_OBJECT(parent()) != TQT_BASE_OBJECT(manager->main));
return ( !isGroup && !isTabGroup && f && !isVisible() );
}
@ -2213,7 +2213,7 @@ void KDockManager::writeConfig(TQDomElement &base)
TQObjectListIt it(*childDock);
KDockWidget *obj1;
while ( (obj1=(KDockWidget*)it.current()) ) {
if ( obj1->parent() == main )
if ( TQT_BASE_OBJECT(obj1->parent()) == TQT_BASE_OBJECT(main) )
mainWidgetStr = TQString::tqfromLatin1(obj1->name());
nList.append(obj1->name());
++it;
@ -2548,7 +2548,7 @@ void KDockManager::writeConfig( KConfig* c, TQString group )
++it;
//debug(" +Add subdock %s", obj->name());
nList.append( obj->name() );
if ( obj->parent() == main )
if ( TQT_BASE_OBJECT(obj->parent()) == TQT_BASE_OBJECT(main) )
c->writeEntry( "Main:view", obj->name() );
}

@ -536,7 +536,7 @@ bool KJanusWidget::setSwallowedWidget( TQWidget *widget )
}
else
{
if( widget->parent() != mSwallowPage )
if( TQT_BASE_OBJECT(widget->parent()) != TQT_BASE_OBJECT(mSwallowPage) )
{
widget->reparent( mSwallowPage, 0, TQPoint(0,0) );
}

@ -777,7 +777,7 @@ PermissionDialog::PermissionDialog( TQWidget* parent )
{}
TQCString PermissionDialog::exec( const TQString & cert, const TQString & perm ) {
TQGuardedPtr<TQDialog> dialog = new TQDialog( static_cast<TQWidget*>(parent()), "PermissionDialog");
TQGuardedPtr<TQDialog> dialog = new TQDialog( TQT_TQWIDGET(parent()), "PermissionDialog");
dialog->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, dialog->sizePolicy().hasHeightForWidth() ) );
dialog->setModal( true );

@ -79,7 +79,7 @@ bool KPreviewPropsPlugin::supports( KFileItemList _items )
void KPreviewPropsPlugin::aboutToShowPage( TQWidget* widget )
{
if ( widget != preview->parent() )
if ( TQT_TQOBJECT(widget) != TQT_TQOBJECT(preview->parent()) )
return;
disconnect( properties, TQT_SIGNAL( aboutToShowPage( TQWidget * ) ), this, TQT_SLOT( aboutToShowPage( TQWidget* ) ) );

@ -153,7 +153,7 @@ void MainWindow::setupToolViews ()
KDockWidget *w=mainDock;
if (mainDock->parentDockTabGroup()) {
w=static_cast<KDockWidget*>(mainDock->parentDockTabGroup()->parent());
w=static_cast<KDockWidget*>(TQT_TQWIDGET(mainDock->parentDockTabGroup()->parent()));
}
TQPtrList<KDockWidget> leftReparentWidgets;
@ -162,7 +162,7 @@ void MainWindow::setupToolViews ()
TQPtrList<KDockWidget> topReparentWidgets;
if (mainDock->parentDockTabGroup()) {
mainDock=static_cast<KDockWidget*>(mainDock->parentDockTabGroup()->parent());
mainDock=static_cast<KDockWidget*>(TQT_TQWIDGET(mainDock->parentDockTabGroup()->parent()));
}
findToolViewsDockedToMain(&leftReparentWidgets,KDockWidget::DockLeft);
@ -380,7 +380,7 @@ void MainWindow::findToolViewsDockedToMain(TQPtrList<KDockWidget>* list,KDockWid
KDockWidget* widget=mainDock->findNearestDockWidget(dprtmw);
if (widget) {
if (widget->parentDockTabGroup()) {
widget=static_cast<KDockWidget*>(widget->parentDockTabGroup()->parent());
widget=static_cast<KDockWidget*>(TQT_TQWIDGET(widget->parentDockTabGroup()->parent()));
}
if (widget) {

@ -775,7 +775,7 @@ void KMdiChildFrm::setClient( KMdiChildView *w, bool bAutomaticResize )
delete list; // delete the list, not the objects
//Reparent if needed
if ( w->parent() != this )
if ( TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(this) )
{
//reparent to this widget , no flags , point , show it
TQPoint pnt2( KMDI_CHILDFRM_BORDER, clientYPos );

@ -1899,7 +1899,7 @@ void KMdiMainFrm::findToolViewsDockedToMain( TQPtrList<KDockWidget>* list, KDock
KDockWidget* widget = mainDock->findNearestDockWidget( dprtmw );
if ( widget && widget->parentDockTabGroup() )
{
widget = static_cast<KDockWidget*>( widget->parentDockTabGroup() ->parent() );
widget = static_cast<KDockWidget*>( TQT_TQWIDGET(widget->parentDockTabGroup() ->parent()) );
if ( widget )
{
@ -1931,7 +1931,7 @@ void KMdiMainFrm::setupToolViewsForIDEALMode()
KDockWidget *mainDock = getMainDockWidget();
KDockWidget *w = mainDock;
if ( mainDock->parentDockTabGroup() )
w = static_cast<KDockWidget*>( mainDock->parentDockTabGroup()->parent() );
w = static_cast<KDockWidget*>( TQT_TQWIDGET(mainDock->parentDockTabGroup()->parent()) );
TQPtrList<KDockWidget> leftReparentWidgets;
TQPtrList<KDockWidget> rightReparentWidgets;
@ -1939,7 +1939,7 @@ void KMdiMainFrm::setupToolViewsForIDEALMode()
TQPtrList<KDockWidget> topReparentWidgets;
if ( mainDock->parentDockTabGroup() )
mainDock = static_cast<KDockWidget*>( mainDock->parentDockTabGroup() ->parent() );
mainDock = static_cast<KDockWidget*>( TQT_TQWIDGET(mainDock->parentDockTabGroup() ->parent()) );
findToolViewsDockedToMain( &leftReparentWidgets, KDockWidget::DockLeft );
findToolViewsDockedToMain( &rightReparentWidgets, KDockWidget::DockRight );
@ -2137,7 +2137,7 @@ void KMdiMainFrm::idealToolViewsToStandardTabs( TQStringList widgetNames, KDockW
KDockWidget * mainDock = getMainDockWidget();
if ( mainDock->parentDockTabGroup() )
{
mainDock = static_cast<KDockWidget*>( mainDock->parentDockTabGroup() ->parent() );
mainDock = static_cast<KDockWidget*>( TQT_TQWIDGET(mainDock->parentDockTabGroup() ->parent()) );
}
if ( widgetNames.count() > 0 )

@ -259,7 +259,7 @@ void ProviderLoader::slotJobData( KIO::Job *, const TQByteArray &data )
void ProviderLoader::slotJobResult( KIO::Job *job )
{
if ( job->error() ) {
job->showErrorDialog( static_cast<TQWidget *>(parent()) );
job->showErrorDialog( TQT_TQWIDGET(parent()) );
}
kdDebug() << "--PROVIDERS-START--" << endl << mJobData << "--PROV_END--"
@ -267,7 +267,7 @@ void ProviderLoader::slotJobResult( KIO::Job *job )
TQDomDocument doc;
if ( !doc.setContent( mJobData ) ) {
KMessageBox::error( static_cast<TQWidget *>(parent()), i18n("Error parsing providers list.") );
KMessageBox::error( TQT_TQWIDGET(parent()), i18n("Error parsing providers list.") );
return;
}

@ -111,7 +111,7 @@ void AsteroidStyle::polish(TQWidget *w)
wp.setColor(TQColorGroup::Mid, wp.active().color(TQColorGroup::Button).dark(150)); // Which GUI element(s) does this correspond to?
bool isProtectedObject = false;
TQObject *curparent = w;
TQObject *curparent = TQT_TQOBJECT(w);
while (curparent) {
if (curparent->inherits("KonqFileTip") || curparent->inherits("AppletItem")) {
isProtectedObject = true;

@ -1979,7 +1979,7 @@ bool HighColorStyle::eventFilter( TQObject *object, TQEvent *event )
{
x_offset += parent->x();
y_offset += parent->y();
parent = static_cast<TQWidget*>(parent->parent());
parent = TQT_TQWIDGET(parent->parent());
}
TQRect r = widget->rect();

@ -1232,7 +1232,7 @@ void KeramikStyle::drawKStylePrimitive( KStylePrimitive kpe,
TQToolBar* parent = 0;
if (widget && widget->parent() && widget->parent()->inherits(TQTOOLBAR_OBJECT_NAME_STRING))
parent = static_cast<TQToolBar*>(widget->parent());
parent = static_cast<TQToolBar*>(TQT_TQWIDGET(widget->parent()));
renderToolbarEntryBackground(p, parent, r, cg, (flags & Style_Horizontal));
if (flags & Style_Horizontal) {
@ -2238,7 +2238,7 @@ void KeramikStyle::tqdrawComplexControl( TQ_ComplexControl control,
bflags |= Style_MouseOver;
if (onToolbar && static_cast<TQToolBar*>(widget->parent())->orientation() == Qt::Horizontal)
if (onToolbar && static_cast<TQToolBar*>(TQT_TQWIDGET(widget->parent()))->orientation() == Qt::Horizontal)
bflags |= Style_Horizontal;
if (controls & SC_ToolButton)
@ -2270,8 +2270,8 @@ void KeramikStyle::tqdrawComplexControl( TQ_ComplexControl control,
{
// This assumes floating toolbars can't have extenders,
//(so if we're on an extender, we're not floating)
TQWidget* parent = static_cast<TQWidget*> (widget->parent());
TQToolBar* toolbar = static_cast<TQToolBar*>(parent->parent());
TQWidget* parent = static_cast<TQWidget*> (TQT_TQWIDGET(widget->parent()));
TQToolBar* toolbar = static_cast<TQToolBar*>(TQT_TQWIDGET(parent->parent()));
TQRect tr = toolbar->rect();
bool horiz = toolbar->orientation() == Qt::Horizontal;
@ -2893,7 +2893,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event )
{
// We need to override the paint event to draw a
// gradient on a QToolBarExtensionWidget.
TQToolBar* toolbar = static_cast<TQToolBar*>(object->parent());
TQToolBar* toolbar = static_cast<TQToolBar*>(TQT_TQWIDGET(object->parent()));
TQWidget* widget = TQT_TQWIDGET(object);
TQRect wr = widget->rect (), tr = toolbar->rect();
TQPainter p( widget );

Loading…
Cancel
Save