summaryrefslogtreecommitdiffstats
path: root/kdeui
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-31 06:26:14 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-31 06:26:14 +0000
commitf007f85c4dc9ed297291c2a209bba73663ecd37b (patch)
treeaf24a01bffa79a5d2006320aed4a3aab0895a8f2 /kdeui
parentc6ea5f2c665bbc4b9c512d3d1fee3a7b58040f5d (diff)
downloadtdelibs-f007f85c4dc9ed297291c2a209bba73663ecd37b.tar.gz
tdelibs-f007f85c4dc9ed297291c2a209bba73663ecd37b.zip
Convert qt_cast() to ::qt_cast<>
This should fix some random segfaults It needs to be tested to make sure that interfaces still work, e.g. kate/kwrite interfaces in interface/ktexteditor git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1218078 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeui')
-rw-r--r--kdeui/kdockwidget.cpp18
-rw-r--r--kdeui/tests/kdockwidgettest.cpp4
2 files changed, 11 insertions, 11 deletions
diff --git a/kdeui/kdockwidget.cpp b/kdeui/kdockwidget.cpp
index 154757a33..3c8832391 100644
--- a/kdeui/kdockwidget.cpp
+++ b/kdeui/kdockwidget.cpp
@@ -932,7 +932,7 @@ KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos)
if (neighbor==this)
return (static_cast<KDockWidget*>(parent()->parent())->findNearestDockWidget(pos));
else
- if (neighbor->getWidget() && (neighbor->getWidget()->qt_cast("KDockTabGroup")))
+ if (neighbor->getWidget() && (::tqqt_cast<KDockTabGroup*>(neighbor->getWidget())))
return (KDockWidget*)(((KDockTabGroup*)neighbor->getWidget())->page(0));
else
return neighbor;
@@ -1238,7 +1238,7 @@ void KDockWidget::setForcedFixedWidth(int w)
setFixedWidth(w);
if (!parent()) return;
if (parent()->inherits("KDockSplitter"))
- static_cast<KDockSplitter*>(tqparent()->qt_cast("KDockSplitter"))->setForcedFixedWidth(this,w);
+ ::tqqt_cast<KDockSplitter*>(tqparent())->setForcedFixedWidth(this,w);
}
void KDockWidget::setForcedFixedHeight(int h)
@@ -1247,7 +1247,7 @@ void KDockWidget::setForcedFixedHeight(int h)
setFixedHeight(h);
if (!parent()) return;
if (parent()->inherits("KDockSplitter"))
- static_cast<KDockSplitter*>(tqparent()->qt_cast("KDockSplitter"))->setForcedFixedHeight(this,h);
+ ::tqqt_cast<KDockSplitter*>(tqparent())->setForcedFixedHeight(this,h);
}
int KDockWidget::forcedFixedWidth()
@@ -1270,7 +1270,7 @@ void KDockWidget::restoreFromForcedFixedSize()
setMaximumHeight(32000);
if (!parent()) return;
if (parent()->inherits("KDockSplitter"))
- static_cast<KDockSplitter*>(tqparent()->qt_cast("KDockSplitter"))->restoreFromForcedFixedSize(this);
+ ::tqqt_cast<KDockSplitter*>(tqparent())->restoreFromForcedFixedSize(this);
}
void KDockWidget::toDesktop()
@@ -3179,8 +3179,8 @@ void KDockContainer::activateOverlapMode(int nonOverlapSize) {
m_overlapMode=true;
if (parentDockWidget() && parentDockWidget()->parent()) {
kdDebug(282)<<"KDockContainer::activateOverlapMode: recalculating sizes"<<endl;
- KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()->
- tqparent()->qt_cast("KDockSplitter"));
+ KDockSplitter *sp= ::tqqt_cast<KDockSplitter*>(parentDockWidget()->
+ tqparent());
if (sp)
sp->resizeEvent(0);
}
@@ -3191,8 +3191,8 @@ void KDockContainer::deactivateOverlapMode() {
m_overlapMode=false;
if (parentDockWidget() && parentDockWidget()->parent()) {
kdDebug(282)<<"KDockContainer::deactivateOverlapMode: recalculating sizes"<<endl;
- KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()->
- tqparent()->qt_cast("KDockSplitter"));
+ KDockSplitter *sp= ::tqqt_cast<KDockSplitter*>(parentDockWidget()->
+ tqparent());
if (sp)
sp->resizeEvent(0);
}
@@ -3280,7 +3280,7 @@ void KDockContainer::prepareSave(TQStringList &names)
TQWidget *KDockTabGroup::transientTo() {
TQWidget *tT=0;
for (int i=0;i<count();i++) {
- KDockWidget *dw=static_cast<KDockWidget*>(page(i)->qt_cast("KDockWidget"));
+ KDockWidget *dw=::tqqt_cast<KDockWidget*>(page(i));
TQWidget *tmp;
if ((tmp=dw->transientTo())) {
if (!tT) tT=tmp;
diff --git a/kdeui/tests/kdockwidgettest.cpp b/kdeui/tests/kdockwidgettest.cpp
index 08a7e42b3..7d4625357 100644
--- a/kdeui/tests/kdockwidgettest.cpp
+++ b/kdeui/tests/kdockwidgettest.cpp
@@ -101,7 +101,7 @@ DockApplication::DockApplication( const char* name )
l->setBackgroundColor(white);
l->setMinimumSize(100,100);
dock5->setWidget(l);
- if (l->qt_cast("KDockContainer")) qDebug("KDockContainer created for dock 5");
+ if (::tqqt_cast<KDockContainer*>(l)) qDebug("KDockContainer created for dock 5");
/*****************************************************/
/*****************************************************/
@@ -112,7 +112,7 @@ DockApplication::DockApplication( const char* name )
l->setBackgroundColor(white);
l->setMinimumSize(100,100);
dock6->setWidget(l);
- if (l->qt_cast("KDockContainer")) qDebug("KDockContainer created for dock 6");
+ if (::tqqt_cast<KDockContainer*>(l)) qDebug("KDockContainer created for dock 6");
/*****************************************************/