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
v3.5.13-sru
tpearson 14 years ago
parent c6ea5f2c66
commit f007f85c4d

@ -159,7 +159,7 @@ inline BytesEditInterface *bytesEditInterface( T *t )
if( !t ) if( !t )
return 0; return 0;
return static_cast<BytesEditInterface*>( t->qt_cast("KHE::BytesEditInterface") ); return ::tqqt_cast<KHE::BytesEditInterface*>( t );
} }
/** tries to create an instance of a hexedit widget for arrays of chars (char[]) /** tries to create an instance of a hexedit widget for arrays of chars (char[])

@ -97,7 +97,7 @@ CharColumnInterface *charColumnInterface( T *t )
if( !t ) if( !t )
return 0; return 0;
return static_cast<CharColumnInterface*>( t->qt_cast("KHE::CharColumnInterface") ); return ::tqqt_cast<KHE::CharColumnInterface*>( t );
} }
} }

@ -78,7 +78,7 @@ ClipboardInterface *clipboardInterface( T *t )
if( !t ) if( !t )
return 0; return 0;
return static_cast<ClipboardInterface*>( t->qt_cast("KHE::ClipboardInterface") ); return ::tqqt_cast<KHE::ClipboardInterface*>( t );
} }
} }

@ -162,7 +162,7 @@ ValueColumnInterface *valueColumnInterface( T *t )
if( !t ) if( !t )
return 0; return 0;
return static_cast<ValueColumnInterface*>( t->qt_cast("KHE::ValueColumnInterface") ); return ::tqqt_cast<KHE::ValueColumnInterface*>( t );
} }
} }

@ -71,7 +71,7 @@ ZoomInterface *zoomInterface( T *t )
if( !t ) if( !t )
return 0; return 0;
return static_cast<ZoomInterface*>( t->qt_cast("KHE::ZoomInterface") ); return ::tqqt_cast<KHE::ZoomInterface*>( t );
} }
} }

@ -25,7 +25,7 @@
* TQDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor" ); * TQDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor" );
* if ( editorDialog ) { * if ( editorDialog ) {
* // kdeutils was installed, so the dialog was found fetch the editor interface * // kdeutils was installed, so the dialog was found fetch the editor interface
* KRegExpEditorInterface *editor = static_cast<KRegExpEditorInterface *>( editorDialog->qt_cast( "KRegExpEditorInterface" ) ); * KRegExpEditorInterface *editor = ::tqqt_cast<KRegExpEditorInterface *>( editorDialog );
* Q_ASSERT( editor ); // This should not fail! * Q_ASSERT( editor ); // This should not fail!
* *
* // now use the editor. * // now use the editor.
@ -53,7 +53,7 @@
* "KRegExpEditor/KRegExpEditor", TQString::null, parent ); * "KRegExpEditor/KRegExpEditor", TQString::null, parent );
* if ( editorWidget ) { * if ( editorWidget ) {
* // kdeutils was installed, so the widget was found fetch the editor interface * // kdeutils was installed, so the widget was found fetch the editor interface
* KRegExpEditorInterface *editor = static_cast<KRegExpEditorInterface *>( editorWidget->qt_cast( "KRegExpEditorInterface" ) ); * KRegExpEditorInterface *editor = ::tqqt_cast<KRegExpEditorInterface *>( editorWidget );
* Q_ASSERT( editor ); // This should not fail! * Q_ASSERT( editor ); // This should not fail!
* *
* // now use the editor. * // now use the editor.

@ -70,5 +70,5 @@ BlockSelectionInterface *KTextEditor::blockSelectionInterface (Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return static_cast<BlockSelectionInterface*>(doc->qt_cast("KTextEditor::BlockSelectionInterface")); return dynamic_cast<KTextEditor::BlockSelectionInterface*>(doc);
} }

@ -52,5 +52,5 @@ ClipboardInterface *KTextEditor::clipboardInterface (View *view)
if (!view) if (!view)
return 0; return 0;
return static_cast<ClipboardInterface*>(view->qt_cast("KTextEditor::ClipboardInterface")); return dynamic_cast<KTextEditor::ClipboardInterface*>(view);
} }

@ -45,7 +45,7 @@ CodeCompletionInterface *KTextEditor::codeCompletionInterface (View *view)
if (!view) if (!view)
return 0; return 0;
return static_cast<CodeCompletionInterface*>(view->qt_cast("KTextEditor::CodeCompletionInterface")); return dynamic_cast<KTextEditor::CodeCompletionInterface*>(view);
} }

@ -67,7 +67,7 @@ ConfigInterface *KTextEditor::configInterface (Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return static_cast<ConfigInterface*>(doc->qt_cast("KTextEditor::ConfigInterface")); return dynamic_cast<KTextEditor::ConfigInterface*>(doc);
} }
ConfigInterface *KTextEditor::configInterface (Plugin *plugin) ConfigInterface *KTextEditor::configInterface (Plugin *plugin)
@ -75,5 +75,5 @@ ConfigInterface *KTextEditor::configInterface (Plugin *plugin)
if (!plugin) if (!plugin)
return 0; return 0;
return static_cast<ConfigInterface*>(plugin->qt_cast("KTextEditor::ConfigInterface")); return dynamic_cast<KTextEditor::ConfigInterface*>(plugin);
} }

@ -72,7 +72,7 @@ ConfigInterfaceExtension *KTextEditor::configInterfaceExtension (Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return static_cast<ConfigInterfaceExtension*>(doc->qt_cast("KTextEditor::ConfigInterfaceExtension")); return dynamic_cast<KTextEditor::ConfigInterfaceExtension*>(doc);
} }
ConfigInterfaceExtension *KTextEditor::configInterfaceExtension (Plugin *plugin) ConfigInterfaceExtension *KTextEditor::configInterfaceExtension (Plugin *plugin)
@ -80,5 +80,5 @@ ConfigInterfaceExtension *KTextEditor::configInterfaceExtension (Plugin *plugin)
if (!plugin) if (!plugin)
return 0; return 0;
return static_cast<ConfigInterfaceExtension*>(plugin->qt_cast("KTextEditor::ConfigInterfaceExtension")); return dynamic_cast<KTextEditor::ConfigInterfaceExtension*>(plugin);
} }

@ -65,5 +65,5 @@ CursorInterface *KTextEditor::cursorInterface (Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return static_cast<CursorInterface*>(doc->qt_cast("KTextEditor::CursorInterface")); return dynamic_cast<KTextEditor::CursorInterface*>(doc);
} }

@ -65,5 +65,5 @@ DynWordWrapInterface *KTextEditor::dynWordWrapInterface (View *view)
if (!view) if (!view)
return 0; return 0;
return static_cast<DynWordWrapInterface*>(view->qt_cast("KTextEditor::DynWordWrapInterface")); return dynamic_cast<KTextEditor::DynWordWrapInterface*>(view);
} }

@ -52,6 +52,6 @@ EditInterface *KTextEditor::editInterface (Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return static_cast<EditInterface*>(doc->qt_cast("KTextEditor::EditInterface")); return dynamic_cast<KTextEditor::EditInterface*>(doc);
} }

@ -45,6 +45,6 @@ EditInterfaceExt *KTextEditor::editInterfaceExt (Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return static_cast<EditInterfaceExt*>(doc->qt_cast("KTextEditor::EditInterfaceExt")); return dynamic_cast<KTextEditor::EditInterfaceExt*>(doc);
} }

@ -72,5 +72,5 @@ EncodingInterface *KTextEditor::encodingInterface (Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return static_cast<EncodingInterface*>(doc->qt_cast("KTextEditor::EncodingInterface")); return dynamic_cast<KTextEditor::EncodingInterface*>(doc);
} }

@ -65,5 +65,5 @@ HighlightingInterface *KTextEditor::highlightingInterface (Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return static_cast<HighlightingInterface*>(doc->qt_cast("KTextEditor::HighlightingInterface")); return dynamic_cast<KTextEditor::HighlightingInterface*>(doc);
} }

@ -226,6 +226,6 @@ PluginViewInterface *KTextEditor::pluginViewInterface (Plugin *plugin)
if (!plugin) if (!plugin)
return 0; return 0;
return static_cast<PluginViewInterface*>(plugin->qt_cast("KTextEditor::PluginViewInterface")); return dynamic_cast<KTextEditor::PluginViewInterface*>(plugin);
} }

@ -65,7 +65,7 @@ MarkInterface *KTextEditor::markInterface (Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return static_cast<MarkInterface*>(doc->qt_cast("KTextEditor::MarkInterface")); return dynamic_cast<KTextEditor::MarkInterface*>(doc);
} }
int MarkInterface::reservedMarkersCount() int MarkInterface::reservedMarkersCount()

@ -65,5 +65,5 @@ MarkInterfaceExtension *KTextEditor::markInterfaceExtension (Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return static_cast<MarkInterfaceExtension*>(doc->qt_cast("KTextEditor::MarkInterfaceExtension")); return dynamic_cast<KTextEditor::MarkInterfaceExtension*>(doc);
} }

@ -65,5 +65,5 @@ PopupMenuInterface *KTextEditor::popupMenuInterface (View *view)
if (!view) if (!view)
return 0; return 0;
return static_cast<PopupMenuInterface*>(view->qt_cast("KTextEditor::PopupMenuInterface")); return dynamic_cast<KTextEditor::PopupMenuInterface*>(view);
} }

@ -70,5 +70,5 @@ PrintInterface *KTextEditor::printInterface (Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return static_cast<PrintInterface*>(doc->qt_cast("KTextEditor::PrintInterface")); return dynamic_cast<KTextEditor::PrintInterface*>(doc);
} }

@ -51,5 +51,5 @@ SearchInterface *KTextEditor::searchInterface (Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return static_cast<SearchInterface*>(doc->qt_cast("KTextEditor::SearchInterface")); return dynamic_cast<KTextEditor::SearchInterface*>(doc);
} }

@ -52,7 +52,7 @@ SelectionInterface *KTextEditor::selectionInterface (Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return static_cast<SelectionInterface*>(doc->qt_cast("KTextEditor::SelectionInterface")); return dynamic_cast<KTextEditor::SelectionInterface*>(doc);
} }
SelectionInterface *KTextEditor::selectionInterface (View *view) SelectionInterface *KTextEditor::selectionInterface (View *view)
@ -60,6 +60,6 @@ SelectionInterface *KTextEditor::selectionInterface (View *view)
if (!view) if (!view)
return 0; return 0;
return static_cast<SelectionInterface*>(view->qt_cast("KTextEditor::SelectionInterface")); return dynamic_cast<KTextEditor::SelectionInterface*>(view);
} }

@ -68,7 +68,7 @@ SelectionInterfaceExt *KTextEditor::selectionInterfaceExt (Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return static_cast<SelectionInterfaceExt*>(doc->qt_cast("KTextEditor::SelectionInterfaceExt")); return dynamic_cast<KTextEditor::SelectionInterfaceExt*>(doc);
} }
SelectionInterfaceExt *KTextEditor::selectionInterfaceExt (View *view) SelectionInterfaceExt *KTextEditor::selectionInterfaceExt (View *view)
@ -76,7 +76,7 @@ SelectionInterfaceExt *KTextEditor::selectionInterfaceExt (View *view)
if (!view) if (!view)
return 0; return 0;
return static_cast<SelectionInterfaceExt*>(view->qt_cast("KTextEditor::SelectionInterfaceExt")); return dynamic_cast<KTextEditor::SelectionInterfaceExt*>(view);
} }
//END KTextEditor::SelectionInterfaceExt //END KTextEditor::SelectionInterfaceExt

@ -68,7 +68,7 @@ SessionConfigInterface *KTextEditor::sessionConfigInterface (Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return static_cast<SessionConfigInterface*>(doc->qt_cast("KTextEditor::SessionConfigInterface")); return dynamic_cast<KTextEditor::SessionConfigInterface*>(doc);
} }
SessionConfigInterface *KTextEditor::sessionConfigInterface (View *view) SessionConfigInterface *KTextEditor::sessionConfigInterface (View *view)
@ -76,7 +76,7 @@ SessionConfigInterface *KTextEditor::sessionConfigInterface (View *view)
if (!view) if (!view)
return 0; return 0;
return static_cast<SessionConfigInterface*>(view->qt_cast("KTextEditor::SessionConfigInterface")); return dynamic_cast<KTextEditor::SessionConfigInterface*>(view);
} }
SessionConfigInterface *KTextEditor::sessionConfigInterface (Plugin *plugin) SessionConfigInterface *KTextEditor::sessionConfigInterface (Plugin *plugin)
@ -84,5 +84,5 @@ SessionConfigInterface *KTextEditor::sessionConfigInterface (Plugin *plugin)
if (!plugin) if (!plugin)
return 0; return 0;
return static_cast<SessionConfigInterface*>(plugin->qt_cast("KTextEditor::SessionConfigInterface")); return dynamic_cast<KTextEditor::SessionConfigInterface*>(plugin);
} }

@ -192,6 +192,6 @@ TemplateInterface *KTextEditor::templateInterface ( KTextEditor::Document *doc )
if ( !doc ) if ( !doc )
return 0; return 0;
return static_cast<TemplateInterface*>( doc->qt_cast( "KTextEditor::TemplateInterface" ) ); return dynamic_cast<KTextEditor::TemplateInterface*>( doc );
} }

@ -58,7 +58,7 @@ TextHintInterface *textHintInterface (View *view)
if (!view) if (!view)
return 0; return 0;
return static_cast<TextHintInterface*>(view->qt_cast("KTextEditor::TextHintInterface")); return dynamic_cast<KTextEditor::TextHintInterface*>(view);
} }

@ -70,5 +70,5 @@ UndoInterface *KTextEditor::undoInterface (Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return static_cast<UndoInterface*>(doc->qt_cast("KTextEditor::UndoInterface")); return dynamic_cast<KTextEditor::UndoInterface*>(doc);
} }

@ -44,5 +44,5 @@ VariableInterface *KTextEditor::variableInterface( Document *doc )
if ( ! doc ) if ( ! doc )
return 0; return 0;
return static_cast<VariableInterface*>(doc->qt_cast("KTextEditor::VariableInterface")); return dynamic_cast<KTextEditor::VariableInterface*>(doc);
} }

@ -70,5 +70,5 @@ ViewCursorInterface *KTextEditor::viewCursorInterface (View *view)
if (!view) if (!view)
return 0; return 0;
return static_cast<ViewCursorInterface*>(view->qt_cast("KTextEditor::ViewCursorInterface")); return dynamic_cast<KTextEditor::ViewCursorInterface*>(view);
} }

@ -72,5 +72,5 @@ ViewStatusMsgInterface *KTextEditor::viewStatusMsgInterface (View *view)
if (!view) if (!view)
return 0; return 0;
return static_cast<ViewStatusMsgInterface*>(view->qt_cast("KTextEditor::ViewStatusMsgInterface")); return dynamic_cast<KTextEditor::ViewStatusMsgInterface*>(view);
} }

@ -66,5 +66,5 @@ WordWrapInterface *KTextEditor::wordWrapInterface (Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return static_cast<WordWrapInterface*>(doc->qt_cast("KTextEditor::WordWrapInterface")); return dynamic_cast<KTextEditor::WordWrapInterface*>(doc);
} }

@ -1,4 +1,4 @@
// interface.h -*- C++ -*- // // interface.h -*- C++ -*-
// Copyright (C) 2002 Dominique Devriese <devriese@kde.org> // Copyright (C) 2002 Dominique Devriese <devriese@kde.org>
// Copyright (C) 2005 Peter Rockai <me@mornfall.net> // Copyright (C) 2005 Peter Rockai <me@mornfall.net>
@ -60,7 +60,7 @@ class TQStrList;
* setCentralWidget( p->widget() ); * setCentralWidget( p->widget() );
* *
* // cast the part to the TerminalInterface.. * // cast the part to the TerminalInterface..
* TerminalInterface* t = static_cast<TerminalInterface*>( p->qt_cast( "TerminalInterface" ) ); * TerminalInterface* t = ::tqqt_cast<TerminalInterface*>( p );
* if( ! t ) * if( ! t )
* { * {
* // This probably happens because the konsole that is installed * // This probably happens because the konsole that is installed

@ -20,7 +20,7 @@ Win::Win()
KParts::Part* p = static_cast<KParts::Part*>( factory->create( this, "tralala", "TQObject", "KParts::ReadOnlyPart" ) ); KParts::Part* p = static_cast<KParts::Part*>( factory->create( this, "tralala", "TQObject", "KParts::ReadOnlyPart" ) );
setCentralWidget( p->widget() ); setCentralWidget( p->widget() );
TerminalInterface* t = static_cast<TerminalInterface*>( p->qt_cast( "TerminalInterface" ) ); TerminalInterface* t = ::tqqt_cast<TerminalInterface*>( p );
t->showShellInDir( TQDir::home().path() ); t->showShellInDir( TQDir::home().path() );
// TQStrList l; // TQStrList l;
// l.append( "python" ); // l.append( "python" );
@ -46,11 +46,11 @@ int main( int argc, char** argv )
void Win::pythonExited() void Win::pythonExited()
{ {
std::cerr << "hee, " << p << std::endl; std::cerr << "hee, " << p << std::endl;
std::cerr << ( p->qt_cast( "TerminalInterface" ) ) << std::endl; std::cerr << ( ::tqqt_cast<TerminalInterface>(p) ) << std::endl;
// KMessageBox::sorry( this, TQString::fromUtf8( "Exited, status was %1" ).arg( status ) ); // KMessageBox::sorry( this, TQString::fromUtf8( "Exited, status was %1" ).arg( status ) );
disconnect(p, TQT_SIGNAL( processExited() ), disconnect(p, TQT_SIGNAL( processExited() ),
this, TQT_SLOT( pythonExited() )); this, TQT_SLOT( pythonExited() ));
TerminalInterface* t = static_cast<TerminalInterface*>( p->qt_cast( "TerminalInterface" ) ); TerminalInterface* t = ::tqqt_cast<TerminalInterface*>( p );
TQStrList l; TQStrList l;
l.append( "echo" ); l.append( "echo" );
l.append( "hello world" ); l.append( "hello world" );

@ -100,7 +100,7 @@ Document *document (KTextEditor::Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return static_cast<Document*>(doc->qt_cast("Kate::Document")); return ::tqqt_cast<Kate::Document*>(doc);
} }
DocumentExt *documentExt (KTextEditor::Document *doc) DocumentExt *documentExt (KTextEditor::Document *doc)
@ -108,7 +108,7 @@ DocumentExt *documentExt (KTextEditor::Document *doc)
if (!doc) if (!doc)
return 0; return 0;
return static_cast<DocumentExt*>(doc->qt_cast("Kate::DocumentExt")); return dynamic_cast<Kate::DocumentExt*>(doc);
} }
Document *createDocument ( TQObject *parent, const char *name ) Document *createDocument ( TQObject *parent, const char *name )
@ -121,7 +121,7 @@ View *view (KTextEditor::View *view)
if (!view) if (!view)
return 0; return 0;
return static_cast<View*>(view->qt_cast("Kate::View")); return ::tqqt_cast<Kate::View*>(view);
} }
} }

@ -113,8 +113,7 @@ void AutoBookmarker::slotCompleted()
{ {
// get the document info // get the document info
KTextEditor::DocumentInfoInterface *di = KTextEditor::DocumentInfoInterface *di =
static_cast<KTextEditor::DocumentInfoInterface*>(document()-> ::tqqt_cast<KTextEditor::DocumentInfoInterface*>(document());
qt_cast("KTextEditor::DocumentInfoInterface"));
TQString mt; TQString mt;
if ( di ) // we can still try match the URL otherwise if ( di ) // we can still try match the URL otherwise
mt = di->mimeType(); mt = di->mimeType();

@ -47,6 +47,7 @@
#include "kaccelmanager_private.h" #include "kaccelmanager_private.h"
#include "../kdeui/kstdaction_p.h" #include "../kdeui/kstdaction_p.h"
#include "../kutils/kmultitabbar.h"
/********************************************************************* /*********************************************************************
@ -320,7 +321,7 @@ void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item)
if (dynamic_cast<TQComboBox*>(w) || dynamic_cast<TQLineEdit*>(w) || if (dynamic_cast<TQComboBox*>(w) || dynamic_cast<TQLineEdit*>(w) ||
dynamic_cast<TQTextEdit*>(w) || dynamic_cast<TQTextView*>(w) || dynamic_cast<TQTextEdit*>(w) || dynamic_cast<TQTextView*>(w) ||
dynamic_cast<TQSpinBox*>(w) || w->qt_cast( "KMultiTabBar" )) dynamic_cast<TQSpinBox*>(w) || static_cast<KMultiTabBar*>(w->qt_cast("KMultiTabBar")))
return; return;
// now treat 'ordinary' widgets // now treat 'ordinary' widgets

@ -151,7 +151,7 @@ namespace KDEPrivate
const TQStringList &args, Type2Type<TQWidget> ) const TQStringList &args, Type2Type<TQWidget> )
{ {
WidgetParentType *p = dynamic_cast<WidgetParentType *>( parent ); WidgetParentType *p = dynamic_cast<WidgetParentType *>( static_cast<TQT_BASE_OBJECT_NAME*>(parent) );
if ( parent && !p ) if ( parent && !p )
return 0; return 0;
return new Product( p, name, args ); return new Product( p, name, args );
@ -161,7 +161,7 @@ namespace KDEPrivate
TQObject *parent, const char *name, TQObject *parent, const char *name,
const TQStringList &args, Type2Type<TQObject> ) const TQStringList &args, Type2Type<TQObject> )
{ {
ParentType *p = dynamic_cast<ParentType *>( parent ); ParentType *p = dynamic_cast<ParentType *>( static_cast<TQT_BASE_OBJECT_NAME*>(parent) );
if ( parent && !p ) if ( parent && !p )
return 0; return 0;
return new Product( p, name, args ); return new Product( p, name, args );

@ -181,7 +181,7 @@ int KKeyNative::keyCodeQt() const
{ {
int keyQt = KKeyServer::Sym(m_sym).qt(), modQt; int keyQt = KKeyServer::Sym(m_sym).qt(), modQt;
if( keyQt != Qt::Key_unknown && KKeyServer::modXToModQt( m_mod, modQt ) ) if( keyQt != TQt::Key_unknown && KKeyServer::modXToModQt( m_mod, modQt ) )
return keyQt | modQt; return keyQt | modQt;
return 0; return 0;

@ -490,7 +490,7 @@ int Sym::qt() const
if( g_rgQtToSymX[i].keySymX == m_sym ) if( g_rgQtToSymX[i].keySymX == m_sym )
return g_rgQtToSymX[i].keySymQt; return g_rgQtToSymX[i].keySymQt;
#endif #endif
return Qt::Key_unknown; return TQt::Key_unknown;
} }
TQString Sym::toString( bool bUserSpace ) const TQString Sym::toString( bool bUserSpace ) const
@ -646,7 +646,7 @@ bool symToKeyQt( uint keySym, int& keyQt )
{ {
Sym sym( keySym ); Sym sym( keySym );
keyQt = sym.qt(); keyQt = sym.qt();
return (keyQt != Qt::Key_unknown); return (keyQt != TQt::Key_unknown);
} }
bool modToModQt( uint mod, int& modQt ) bool modToModQt( uint mod, int& modQt )

@ -1825,8 +1825,8 @@ TQPixmap KStyle::stylePixmap( StylePixmap stylepixmap,
} }
int KStyle::tqstyleHint( StyleHint sh, const TQWidget* w, int KStyle::tqstyleHint( TQ_StyleHint sh, const TQWidget* w,
const TQStyleOption &opt, QStyleHintReturn* shr) const const TQStyleOption &opt, TQStyleHintReturn* shr) const
{ {
switch (sh) switch (sh)
{ {

@ -331,10 +331,10 @@ class KDEFX_EXPORT KStyle: public TQCommonStyle
const TQWidget* widget = 0, const TQWidget* widget = 0,
const TQStyleOption& = TQStyleOption::SO_Default ) const; const TQStyleOption& = TQStyleOption::SO_Default ) const;
int tqstyleHint( StyleHint sh, int tqstyleHint( TQ_StyleHint sh,
const TQWidget* w = 0, const TQWidget* w = 0,
const TQStyleOption &opt = TQStyleOption::SO_Default, const TQStyleOption &opt = TQStyleOption::SO_Default,
QStyleHintReturn* shr = 0 ) const; TQStyleHintReturn* shr = 0 ) const;
protected: protected:
bool eventFilter( TQObject* object, TQEvent* event ); bool eventFilter( TQObject* object, TQEvent* event );

@ -932,7 +932,7 @@ KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos)
if (neighbor==this) if (neighbor==this)
return (static_cast<KDockWidget*>(parent()->parent())->findNearestDockWidget(pos)); return (static_cast<KDockWidget*>(parent()->parent())->findNearestDockWidget(pos));
else else
if (neighbor->getWidget() && (neighbor->getWidget()->qt_cast("KDockTabGroup"))) if (neighbor->getWidget() && (::tqqt_cast<KDockTabGroup*>(neighbor->getWidget())))
return (KDockWidget*)(((KDockTabGroup*)neighbor->getWidget())->page(0)); return (KDockWidget*)(((KDockTabGroup*)neighbor->getWidget())->page(0));
else else
return neighbor; return neighbor;
@ -1238,7 +1238,7 @@ void KDockWidget::setForcedFixedWidth(int w)
setFixedWidth(w); setFixedWidth(w);
if (!parent()) return; if (!parent()) return;
if (parent()->inherits("KDockSplitter")) 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) void KDockWidget::setForcedFixedHeight(int h)
@ -1247,7 +1247,7 @@ void KDockWidget::setForcedFixedHeight(int h)
setFixedHeight(h); setFixedHeight(h);
if (!parent()) return; if (!parent()) return;
if (parent()->inherits("KDockSplitter")) if (parent()->inherits("KDockSplitter"))
static_cast<KDockSplitter*>(tqparent()->qt_cast("KDockSplitter"))->setForcedFixedHeight(this,h); ::tqqt_cast<KDockSplitter*>(tqparent())->setForcedFixedHeight(this,h);
} }
int KDockWidget::forcedFixedWidth() int KDockWidget::forcedFixedWidth()
@ -1270,7 +1270,7 @@ void KDockWidget::restoreFromForcedFixedSize()
setMaximumHeight(32000); setMaximumHeight(32000);
if (!parent()) return; if (!parent()) return;
if (parent()->inherits("KDockSplitter")) if (parent()->inherits("KDockSplitter"))
static_cast<KDockSplitter*>(tqparent()->qt_cast("KDockSplitter"))->restoreFromForcedFixedSize(this); ::tqqt_cast<KDockSplitter*>(tqparent())->restoreFromForcedFixedSize(this);
} }
void KDockWidget::toDesktop() void KDockWidget::toDesktop()
@ -3179,8 +3179,8 @@ void KDockContainer::activateOverlapMode(int nonOverlapSize) {
m_overlapMode=true; m_overlapMode=true;
if (parentDockWidget() && parentDockWidget()->parent()) { if (parentDockWidget() && parentDockWidget()->parent()) {
kdDebug(282)<<"KDockContainer::activateOverlapMode: recalculating sizes"<<endl; kdDebug(282)<<"KDockContainer::activateOverlapMode: recalculating sizes"<<endl;
KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()-> KDockSplitter *sp= ::tqqt_cast<KDockSplitter*>(parentDockWidget()->
tqparent()->qt_cast("KDockSplitter")); tqparent());
if (sp) if (sp)
sp->resizeEvent(0); sp->resizeEvent(0);
} }
@ -3191,8 +3191,8 @@ void KDockContainer::deactivateOverlapMode() {
m_overlapMode=false; m_overlapMode=false;
if (parentDockWidget() && parentDockWidget()->parent()) { if (parentDockWidget() && parentDockWidget()->parent()) {
kdDebug(282)<<"KDockContainer::deactivateOverlapMode: recalculating sizes"<<endl; kdDebug(282)<<"KDockContainer::deactivateOverlapMode: recalculating sizes"<<endl;
KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()-> KDockSplitter *sp= ::tqqt_cast<KDockSplitter*>(parentDockWidget()->
tqparent()->qt_cast("KDockSplitter")); tqparent());
if (sp) if (sp)
sp->resizeEvent(0); sp->resizeEvent(0);
} }
@ -3280,7 +3280,7 @@ void KDockContainer::prepareSave(TQStringList &names)
TQWidget *KDockTabGroup::transientTo() { TQWidget *KDockTabGroup::transientTo() {
TQWidget *tT=0; TQWidget *tT=0;
for (int i=0;i<count();i++) { 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; TQWidget *tmp;
if ((tmp=dw->transientTo())) { if ((tmp=dw->transientTo())) {
if (!tT) tT=tmp; if (!tT) tT=tmp;

@ -101,7 +101,7 @@ DockApplication::DockApplication( const char* name )
l->setBackgroundColor(white); l->setBackgroundColor(white);
l->setMinimumSize(100,100); l->setMinimumSize(100,100);
dock5->setWidget(l); 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->setBackgroundColor(white);
l->setMinimumSize(100,100); l->setMinimumSize(100,100);
dock6->setWidget(l); 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");
/*****************************************************/ /*****************************************************/

@ -119,7 +119,7 @@ DockContainer::~DockContainer()
it = m_map.begin(); it = m_map.begin();
KDockWidget *w=it.key(); KDockWidget *w=it.key();
if (m_overlapButtons.tqcontains(w)) { if (m_overlapButtons.tqcontains(w)) {
(static_cast<KDockWidgetHeader*>(w->getHeader()->qt_cast("KDockWidgetHeader")))->removeButton(m_overlapButtons[w]); (::tqqt_cast<KDockWidgetHeader*>(w->getHeader()))->removeButton(m_overlapButtons[w]);
m_overlapButtons.remove(w); m_overlapButtons.remove(w);
} }
m_map.remove(w); m_map.remove(w);
@ -148,8 +148,8 @@ void DockContainer::init()
// try to restore splitter size // try to restore splitter size
if ( parentDockWidget() && parentDockWidget()->parent() ) if ( parentDockWidget() && parentDockWidget()->parent() )
{ {
KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()-> KDockSplitter *sp= ::tqqt_cast<KDockSplitter*>(parentDockWidget()->
tqparent()->qt_cast("KDockSplitter")); tqparent());
if ( sp ) if ( sp )
sp->setSeparatorPosX( m_separatorPos ); sp->setSeparatorPosX( m_separatorPos );
} }
@ -184,12 +184,11 @@ void DockContainer::insertWidget (KDockWidget *dwdg, TQPixmap pixmap, const TQSt
if (((KDockWidget*)tqparentWidget())->mayBeShow()) if (((KDockWidget*)tqparentWidget())->mayBeShow())
((KDockWidget*)tqparentWidget())->dockBack(); ((KDockWidget*)tqparentWidget())->dockBack();
if (w->getHeader()->qt_cast("KDockWidgetHeader")) if (::tqqt_cast<KDockWidgetHeader*>(w->getHeader()))
{ {
kdDebug(760)<<"*** KDockWidgetHeader has been found"<<endl; kdDebug(760)<<"*** KDockWidgetHeader has been found"<<endl;
KDockWidgetHeader *hdr=static_cast<KDockWidgetHeader*>(w->getHeader()-> KDockWidgetHeader *hdr=::tqqt_cast<KDockWidgetHeader*>(w->getHeader());
qt_cast("KDockWidgetHeader"));
KDockButton_Private *btn = new KDockButton_Private( hdr, "OverlapButton" ); KDockButton_Private *btn = new KDockButton_Private( hdr, "OverlapButton" );
@ -256,8 +255,7 @@ bool DockContainer::eventFilter( TQObject *obj, TQEvent *event )
kdDebug()<<"NO HEADER"<<endl; kdDebug()<<"NO HEADER"<<endl;
break; break;
} }
KDockWidgetHeader *hdr=static_cast<KDockWidgetHeader*>(w->getHeader()-> KDockWidgetHeader *hdr=::tqqt_cast<KDockWidgetHeader*>(w->getHeader());
qt_cast("KDockWidgetHeader"));
if (!hdr) { if (!hdr) {
kdDebug()<<"Wrong header type in DockContainer::eventFilter"<<endl; kdDebug()<<"Wrong header type in DockContainer::eventFilter"<<endl;
break; break;
@ -357,7 +355,7 @@ void DockContainer::removeWidget(KDockWidget* dwdg)
m_map.remove(w); m_map.remove(w);
m_revMap.remove(id); m_revMap.remove(id);
if (m_overlapButtons.tqcontains(w)) { if (m_overlapButtons.tqcontains(w)) {
(static_cast<KDockWidgetHeader*>(w->getHeader()->qt_cast("KDockWidgetHeader")))->removeButton(m_overlapButtons[w]); (::tqqt_cast<KDockWidgetHeader*>(w->getHeader()))->removeButton(m_overlapButtons[w]);
m_overlapButtons.remove(w); m_overlapButtons.remove(w);
} }
KDockContainer::removeWidget(w); KDockContainer::removeWidget(w);
@ -405,7 +403,7 @@ void DockContainer::tabClicked(int t)
} }
m_ws->raiseWidget(t); m_ws->raiseWidget(t);
if (m_ws->widget(t)) { if (m_ws->widget(t)) {
KDockWidget *tmpDw=static_cast<KDockWidget*>(m_ws->widget(t)->qt_cast("KDockWidget")); KDockWidget *tmpDw=::tqqt_cast<KDockWidget*>(m_ws->widget(t));
if (tmpDw) { if (tmpDw) {
if (tmpDw->getWidget()) tmpDw->getWidget()->setFocus(); if (tmpDw->getWidget()) tmpDw->getWidget()->setFocus();
} else kdDebug(760)<<"Something really weird is going on"<<endl; } else kdDebug(760)<<"Something really weird is going on"<<endl;
@ -422,8 +420,8 @@ void DockContainer::tabClicked(int t)
// try save splitter position // try save splitter position
if ( parentDockWidget() && parentDockWidget()->parent() ) if ( parentDockWidget() && parentDockWidget()->parent() )
{ {
KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()-> KDockSplitter *sp= ::tqqt_cast<KDockSplitter*>(parentDockWidget()->
tqparent()->qt_cast("KDockSplitter")); tqparent());
if ( sp ) if ( sp )
m_separatorPos = sp->separatorPos(); m_separatorPos = sp->separatorPos();
} }
@ -475,8 +473,8 @@ void DockContainer::save(KConfig* cfg,const TQString& group_or_prefix)
// try to save the splitter position // try to save the splitter position
if ( parentDockWidget() && parentDockWidget()->parent() ) if ( parentDockWidget() && parentDockWidget()->parent() )
{ {
KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()-> KDockSplitter *sp= ::tqqt_cast<KDockSplitter*>(parentDockWidget()->
tqparent()->qt_cast("KDockSplitter")); tqparent());
if ( sp ) if ( sp )
cfg->writeEntry( "separatorPosition", m_separatorPos ); cfg->writeEntry( "separatorPosition", m_separatorPos );
} }

@ -201,8 +201,8 @@ void ToggleToolViewAction::anDWChanged()
else if ((!isChecked()) && m_dw->mayBeHide()) else if ((!isChecked()) && m_dw->mayBeHide())
setChecked(true); setChecked(true);
else if (isChecked() && (m_dw->parentDockTabGroup() && else if (isChecked() && (m_dw->parentDockTabGroup() &&
((static_cast<KDockWidget*>(m_dw->parentDockTabGroup()-> ((::tqqt_cast<KDockWidget*>(m_dw->parentDockTabGroup()->
tqparent()->qt_cast("KDockWidget")))->mayBeShow()))) tqparent()))->mayBeShow())))
setChecked(false); setChecked(false);
} }

@ -311,16 +311,16 @@ void MainWindow::setToolViewStyle(int flag)
{ {
d->m_styleIDEAlMode = flag; // see KMultiTabBar for the first 3 bits d->m_styleIDEAlMode = flag; // see KMultiTabBar for the first 3 bits
DockContainer *tmpL=(DockContainer*) (m_leftContainer->getWidget()->qt_cast("KMDI::DockContainer")); DockContainer *tmpL=::tqqt_cast<KMDI::DockContainer*>(m_leftContainer->getWidget());
if (tmpL) tmpL->setStyle(flag); if (tmpL) tmpL->setStyle(flag);
DockContainer *tmpR=(DockContainer*) (m_rightContainer->getWidget()->qt_cast("KMDI::DockContainer")); DockContainer *tmpR=::tqqt_cast<KMDI::DockContainer*>(m_rightContainer->getWidget());
if (tmpR) tmpR->setStyle(flag); if (tmpR) tmpR->setStyle(flag);
DockContainer *tmpT=(DockContainer*) (m_topContainer->getWidget()->qt_cast("KMDI::DockContainer")); DockContainer *tmpT=::tqqt_cast<KMDI::DockContainer*>(m_topContainer->getWidget());
if (tmpT) tmpT->setStyle(flag); if (tmpT) tmpT->setStyle(flag);
DockContainer *tmpB=(DockContainer*) (m_bottomContainer->getWidget()->qt_cast("KMDI::DockContainer")); DockContainer *tmpB=::tqqt_cast<KMDI::DockContainer*>(m_bottomContainer->getWidget());
if (tmpB) tmpB->setStyle(flag); if (tmpB) tmpB->setStyle(flag);
d->m_toolviewStyle = flag; d->m_toolviewStyle = flag;

@ -140,7 +140,7 @@ KMdiDockContainer::~KMdiDockContainer()
KDockWidget *w = it.key(); KDockWidget *w = it.key();
if ( m_overlapButtons.tqcontains( w ) ) if ( m_overlapButtons.tqcontains( w ) )
{ {
( static_cast<KDockWidgetHeader*>( w->getHeader()->qt_cast( "KDockWidgetHeader" ) ) )->removeButton( m_overlapButtons[w] ); ( ::tqqt_cast<KDockWidgetHeader*>( w->getHeader() ) )->removeButton( m_overlapButtons[w] );
m_overlapButtons.remove( w ); m_overlapButtons.remove( w );
} }
m_map.remove( w ); m_map.remove( w );
@ -172,7 +172,7 @@ void KMdiDockContainer::init()
// try to restore splitter size // try to restore splitter size
if ( parentDockWidget() && parentDockWidget()->tqparent() ) if ( parentDockWidget() && parentDockWidget()->tqparent() )
{ {
KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget()->tqparent()->qt_cast( "KDockSplitter" ) ); KDockSplitter * sp = ::tqqt_cast<KDockSplitter*>( parentDockWidget()->tqparent() );
if ( sp ) if ( sp )
sp->setSeparatorPosX( m_separatorPos ); sp->setSeparatorPosX( m_separatorPos );
} }
@ -207,12 +207,12 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, TQPixmap pixmap, const
if ( ( ( KDockWidget* ) tqparentWidget() ) ->mayBeShow() ) if ( ( ( KDockWidget* ) tqparentWidget() ) ->mayBeShow() )
( ( KDockWidget* ) tqparentWidget() ) ->dockBack(); ( ( KDockWidget* ) tqparentWidget() ) ->dockBack();
if ( w->getHeader()->qt_cast( "KDockWidgetHeader" ) ) if ( ::tqqt_cast<KDockWidgetHeader*>(w->getHeader()) )
{ {
kdDebug( 760 ) << k_funcinfo << "The dockwidget we're adding has a header" << endl; kdDebug( 760 ) << k_funcinfo << "The dockwidget we're adding has a header" << endl;
kdDebug( 760 ) << k_funcinfo << "Adding our overlap mode button to it" << endl; kdDebug( 760 ) << k_funcinfo << "Adding our overlap mode button to it" << endl;
KDockWidgetHeader *hdr = static_cast<KDockWidgetHeader*>( w->getHeader()->qt_cast( "KDockWidgetHeader" ) ); KDockWidgetHeader *hdr = ::tqqt_cast<KDockWidgetHeader*>( w->getHeader() );
KDockButton_Private *btn = new KDockButton_Private( hdr, "OverlapButton" ); KDockButton_Private *btn = new KDockButton_Private( hdr, "OverlapButton" );
TQToolTip::add( btn, i18n( "Switch between overlap and side by side mode", "Overlap" ) ); TQToolTip::add( btn, i18n( "Switch between overlap and side by side mode", "Overlap" ) );
@ -272,7 +272,7 @@ bool KMdiDockContainer::eventFilter( TQObject *obj, TQEvent *event )
break; break;
} }
KDockWidgetHeader *hdr = static_cast<KDockWidgetHeader*>( w->getHeader()->qt_cast( "KDockWidgetHeader" ) ); KDockWidgetHeader *hdr = ::tqqt_cast<KDockWidgetHeader*>( w->getHeader() );
if ( !hdr ) if ( !hdr )
{ {
kdDebug(760) << "Wrong header type in KMdiDockContainer::eventFilter" << endl; kdDebug(760) << "Wrong header type in KMdiDockContainer::eventFilter" << endl;
@ -387,7 +387,7 @@ void KMdiDockContainer::removeWidget( KDockWidget* dwdg )
m_revMap.remove( id ); m_revMap.remove( id );
if ( m_overlapButtons.tqcontains( w ) ) if ( m_overlapButtons.tqcontains( w ) )
{ {
( static_cast<KDockWidgetHeader*>( w->getHeader() ->qt_cast( "KDockWidgetHeader" ) ) )->removeButton( m_overlapButtons[ w ] ); ( ::tqqt_cast<KDockWidgetHeader*>( w->getHeader() ) )->removeButton( m_overlapButtons[ w ] );
m_overlapButtons.remove( w ); m_overlapButtons.remove( w );
} }
KDockContainer::removeWidget( w ); KDockContainer::removeWidget( w );
@ -442,7 +442,7 @@ void KMdiDockContainer::tabClicked( int t )
if ( m_ws->widget( t ) ) if ( m_ws->widget( t ) )
{ {
m_ws->raiseWidget( t ); m_ws->raiseWidget( t );
KDockWidget * tmpDw = static_cast<KDockWidget*>( m_ws->widget( t )->qt_cast( "KDockWidget" ) ); KDockWidget * tmpDw = ::tqqt_cast<KDockWidget*>( m_ws->widget( t ) );
if ( tmpDw ) if ( tmpDw )
{ {
if ( tmpDw->getWidget() ) if ( tmpDw->getWidget() )
@ -467,7 +467,7 @@ void KMdiDockContainer::tabClicked( int t )
// try save splitter position // try save splitter position
if ( parentDockWidget() && parentDockWidget()->tqparent() ) if ( parentDockWidget() && parentDockWidget()->tqparent() )
{ {
KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget()->tqparent()->qt_cast( "KDockSplitter" ) ); KDockSplitter * sp = ::tqqt_cast<KDockSplitter*>( parentDockWidget()->tqparent() );
if ( sp ) if ( sp )
m_separatorPos = sp->separatorPos(); m_separatorPos = sp->separatorPos();
} }
@ -638,8 +638,7 @@ void KMdiDockContainer::save( KConfig* cfg, const TQString& group_or_prefix )
// try to save the splitter position // try to save the splitter position
if ( parentDockWidget() && parentDockWidget() ->tqparent() ) if ( parentDockWidget() && parentDockWidget() ->tqparent() )
{ {
KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget() -> KDockSplitter * sp = ::tqqt_cast<KDockSplitter*>( parentDockWidget() -> tqparent() );
tqparent() ->qt_cast( "KDockSplitter" ) );
if ( sp ) if ( sp )
cfg->writeEntry( "separatorPosition", m_separatorPos ); cfg->writeEntry( "separatorPosition", m_separatorPos );
} }

@ -83,8 +83,8 @@ void ToggleToolViewAction::anDWChanged()
else if ( ( !isChecked() ) && m_dw->mayBeHide() ) else if ( ( !isChecked() ) && m_dw->mayBeHide() )
setChecked( true ); setChecked( true );
else if ( isChecked() && ( m_dw->parentDockTabGroup() && else if ( isChecked() && ( m_dw->parentDockTabGroup() &&
( ( static_cast<KDockWidget*>( m_dw->parentDockTabGroup() -> ( ( ::tqqt_cast<KDockWidget*>( m_dw->parentDockTabGroup() ->
tqparent() ->qt_cast( "KDockWidget" ) ) ) ->mayBeShow() ) ) ) tqparent() ) ) ->mayBeShow() ) ) )
setChecked( false ); setChecked( false );
} }

@ -1739,28 +1739,28 @@ void KMdiMainFrm::setIDEAlModeStyle( int flags )
d->m_styleIDEAlMode = flags; // see KMultiTabBar for the first 3 bits d->m_styleIDEAlMode = flags; // see KMultiTabBar for the first 3 bits
if ( m_leftContainer ) if ( m_leftContainer )
{ {
KMdiDockContainer * tmpL = ( KMdiDockContainer* ) ( m_leftContainer->getWidget()->qt_cast( "KMdiDockContainer" ) ); KMdiDockContainer * tmpL = ::tqqt_cast<KMdiDockContainer*>( m_leftContainer->getWidget() );
if ( tmpL ) if ( tmpL )
tmpL->setStyle( flags ); tmpL->setStyle( flags );
} }
if ( m_rightContainer ) if ( m_rightContainer )
{ {
KMdiDockContainer * tmpR = ( KMdiDockContainer* ) ( m_rightContainer->getWidget()->qt_cast( "KMdiDockContainer" ) ); KMdiDockContainer * tmpR = ::tqqt_cast<KMdiDockContainer*>( m_rightContainer->getWidget() );
if ( tmpR ) if ( tmpR )
tmpR->setStyle( flags ); tmpR->setStyle( flags );
} }
if ( m_topContainer ) if ( m_topContainer )
{ {
KMdiDockContainer * tmpT = ( KMdiDockContainer* ) ( m_topContainer->getWidget()->qt_cast( "KMdiDockContainer" ) ); KMdiDockContainer * tmpT = ::tqqt_cast<KMdiDockContainer*>( m_topContainer->getWidget() );
if ( tmpT ) if ( tmpT )
tmpT->setStyle( flags ); tmpT->setStyle( flags );
} }
if ( m_bottomContainer ) if ( m_bottomContainer )
{ {
KMdiDockContainer * tmpB = ( KMdiDockContainer* ) ( m_bottomContainer->getWidget()->qt_cast( "KMdiDockContainer" ) ); KMdiDockContainer * tmpB = ::tqqt_cast<KMdiDockContainer*>( m_bottomContainer->getWidget() );
if ( tmpB ) if ( tmpB )
tmpB->setStyle( flags ); tmpB->setStyle( flags );
} }

@ -66,7 +66,7 @@ namespace KParts
T::tqstaticMetaObject()->className(), T::tqstaticMetaObject()->className(),
args ); args );
T *result = dynamic_cast<T *>( object ); T *result = dynamic_cast<T *>( static_cast<TQT_BASE_OBJECT_NAME*>(object) );
if ( !result ) if ( !result )
delete object; delete object;
return result; return result;

@ -1586,10 +1586,10 @@ TQSize LightStyleV2::tqsizeFromContents( ContentsType contents,
return ret; return ret;
} }
int LightStyleV2::tqstyleHint( StyleHint stylehint, int LightStyleV2::tqstyleHint( TQ_StyleHint stylehint,
const TQWidget *widget, const TQWidget *widget,
const TQStyleOption &option, const TQStyleOption &option,
QStyleHintReturn* returnData ) const TQStyleHintReturn* returnData ) const
{ {
int ret; int ret;

@ -72,9 +72,9 @@ public:
TQSize tqsizeFromContents(ContentsType, const TQWidget *, const TQSize &, TQSize tqsizeFromContents(ContentsType, const TQWidget *, const TQSize &,
const TQStyleOption & = TQStyleOption::Default ) const; const TQStyleOption & = TQStyleOption::Default ) const;
int tqstyleHint(StyleHint, const TQWidget * = 0, int tqstyleHint(TQ_StyleHint, const TQWidget * = 0,
const TQStyleOption & = TQStyleOption::Default, const TQStyleOption & = TQStyleOption::Default,
QStyleHintReturn * = 0 ) const; TQStyleHintReturn * = 0 ) const;
TQPixmap stylePixmap( StylePixmap stylepixmap, TQPixmap stylePixmap( StylePixmap stylepixmap,
const TQWidget* widget = 0, const TQWidget* widget = 0,

@ -1817,10 +1817,10 @@ TQSize LightStyleV3::tqsizeFromContents( ContentsType contents,
return ret; return ret;
} }
int LightStyleV3::tqstyleHint( StyleHint stylehint, int LightStyleV3::tqstyleHint( TQ_StyleHint stylehint,
const TQWidget *widget, const TQWidget *widget,
const TQStyleOption &option, const TQStyleOption &option,
QStyleHintReturn* returnData ) const TQStyleHintReturn* returnData ) const
{ {
int ret; int ret;

@ -76,9 +76,9 @@ public:
TQSize tqsizeFromContents(ContentsType, const TQWidget *, const TQSize &, TQSize tqsizeFromContents(ContentsType, const TQWidget *, const TQSize &,
const TQStyleOption & = TQStyleOption::Default ) const; const TQStyleOption & = TQStyleOption::Default ) const;
int tqstyleHint(StyleHint, const TQWidget * = 0, int tqstyleHint(TQ_StyleHint, const TQWidget * = 0,
const TQStyleOption & = TQStyleOption::Default, const TQStyleOption & = TQStyleOption::Default,
QStyleHintReturn * = 0 ) const; TQStyleHintReturn * = 0 ) const;
TQPixmap stylePixmap( StylePixmap stylepixmap, TQPixmap stylePixmap( StylePixmap stylepixmap,
const TQWidget* widget = 0, const TQWidget* widget = 0,

@ -3433,10 +3433,10 @@ TQSize PlastikStyle::tqsizeFromContents(ContentsType t,
return KStyle::tqsizeFromContents (t, widget, s, opt); return KStyle::tqsizeFromContents (t, widget, s, opt);
} }
int PlastikStyle::tqstyleHint( StyleHint stylehint, int PlastikStyle::tqstyleHint( TQ_StyleHint stylehint,
const TQWidget *widget, const TQWidget *widget,
const TQStyleOption &option, const TQStyleOption &option,
QStyleHintReturn* returnData ) const TQStyleHintReturn* returnData ) const
{ {
switch (stylehint) { switch (stylehint) {
case SH_PopupMenu_SubMenuPopupDelay: case SH_PopupMenu_SubMenuPopupDelay:

@ -123,9 +123,9 @@ public:
const TQSize &s, const TQSize &s,
const TQStyleOption &o) const; const TQStyleOption &o) const;
int tqstyleHint(StyleHint, const TQWidget * = 0, int tqstyleHint(TQ_StyleHint, const TQWidget * = 0,
const TQStyleOption & = TQStyleOption::Default, const TQStyleOption & = TQStyleOption::Default,
QStyleHintReturn * = 0 ) const; TQStyleHintReturn * = 0 ) const;
protected: protected:
enum TabPosition enum TabPosition

@ -358,8 +358,7 @@ void KCMultiDialog::slotAboutToShow(TQWidget *page)
if( ! obj ) if( ! obj )
return; return;
KCModuleProxy * module = ( KCModuleProxy* )obj->qt_cast( KCModuleProxy * module = ::tqqt_cast<KCModuleProxy*>(obj);
"KCModuleProxy" );
if( ! module ) if( ! module )
return; return;
d->currentModule = module; d->currentModule = module;

@ -429,7 +429,7 @@ void KFindDialog::showPatterns()
if ( d->m_regexpDialog ) if ( d->m_regexpDialog )
{ {
KRegExpEditorInterface *iface = static_cast<KRegExpEditorInterface *>( d->m_regexpDialog->qt_cast( "KRegExpEditorInterface" ) ); KRegExpEditorInterface *iface = dynamic_cast<KRegExpEditorInterface *>( d->m_regexpDialog );
assert( iface ); assert( iface );
iface->setRegExp( pattern() ); iface->setRegExp( pattern() );

@ -696,8 +696,7 @@ void KPluginSelector::defaults()
// tabwidget - defaults() will be called for all of them) // tabwidget - defaults() will be called for all of them)
TQWidget * pluginconfig = d->widgetstack->visibleWidget(); TQWidget * pluginconfig = d->widgetstack->visibleWidget();
KCModuleProxy * kcm = ( KCModuleProxy* )pluginconfig->qt_cast( KCModuleProxy * kcm = ::tqqt_cast<KCModuleProxy*>(pluginconfig);
"KCModuleProxy" );
if( kcm ) if( kcm )
{ {
kdDebug( 702 ) << "call KCModule::defaults() for the plugins KCM" kdDebug( 702 ) << "call KCModule::defaults() for the plugins KCM"

Loading…
Cancel
Save