summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--interfaces/khexedit/byteseditinterface.h2
-rw-r--r--interfaces/khexedit/charcolumninterface.h2
-rw-r--r--interfaces/khexedit/clipboardinterface.h2
-rw-r--r--interfaces/khexedit/valuecolumninterface.h2
-rw-r--r--interfaces/khexedit/zoominterface.h2
-rw-r--r--interfaces/kregexpeditor/kregexpeditorinterface.h4
-rw-r--r--interfaces/ktexteditor/blockselectioninterface.cpp2
-rw-r--r--interfaces/ktexteditor/clipboardinterface.cpp2
-rw-r--r--interfaces/ktexteditor/codecompletioninterface.cpp2
-rw-r--r--interfaces/ktexteditor/configinterface.cpp4
-rw-r--r--interfaces/ktexteditor/configinterfaceextension.cpp4
-rw-r--r--interfaces/ktexteditor/cursorinterface.cpp2
-rw-r--r--interfaces/ktexteditor/dynwordwrapinterface.cpp2
-rw-r--r--interfaces/ktexteditor/editinterface.cpp2
-rw-r--r--interfaces/ktexteditor/editinterfaceext.cpp2
-rw-r--r--interfaces/ktexteditor/encodinginterface.cpp2
-rw-r--r--interfaces/ktexteditor/highlightinginterface.cpp2
-rw-r--r--interfaces/ktexteditor/ktexteditor.cpp2
-rw-r--r--interfaces/ktexteditor/markinterface.cpp2
-rw-r--r--interfaces/ktexteditor/markinterfaceextension.cpp2
-rw-r--r--interfaces/ktexteditor/popupmenuinterface.cpp2
-rw-r--r--interfaces/ktexteditor/printinterface.cpp2
-rw-r--r--interfaces/ktexteditor/searchinterface.cpp2
-rw-r--r--interfaces/ktexteditor/selectioninterface.cpp4
-rw-r--r--interfaces/ktexteditor/selectioninterfaceext.cpp4
-rw-r--r--interfaces/ktexteditor/sessionconfiginterface.cpp6
-rw-r--r--interfaces/ktexteditor/templateinterface.cpp2
-rw-r--r--interfaces/ktexteditor/texthintinterface.cpp2
-rw-r--r--interfaces/ktexteditor/undointerface.cpp2
-rw-r--r--interfaces/ktexteditor/variableinterface.cpp2
-rw-r--r--interfaces/ktexteditor/viewcursorinterface.cpp2
-rw-r--r--interfaces/ktexteditor/viewstatusmsginterface.cpp2
-rw-r--r--interfaces/ktexteditor/wordwrapinterface.cpp2
-rw-r--r--interfaces/terminal/kde_terminal_interface.h4
-rw-r--r--interfaces/terminal/test/main.cc6
-rw-r--r--kate/interfaces/interfaces.cpp6
-rw-r--r--kate/plugins/autobookmarker/autobookmarker.cpp3
-rw-r--r--kdecore/kaccelmanager.cpp3
-rw-r--r--kdecore/kgenericfactory.tcc4
-rw-r--r--kdecore/kkeynative_x11.cpp2
-rw-r--r--kdecore/kkeyserver_x11.cpp4
-rw-r--r--kdefx/kstyle.cpp4
-rw-r--r--kdefx/kstyle.h4
-rw-r--r--kdeui/kdockwidget.cpp18
-rw-r--r--kdeui/tests/kdockwidgettest.cpp4
-rw-r--r--kmdi/kmdi/dockcontainer.cpp26
-rw-r--r--kmdi/kmdi/guiclient.cpp4
-rw-r--r--kmdi/kmdi/mainwindow.cpp8
-rw-r--r--kmdi/kmdidockcontainer.cpp19
-rw-r--r--kmdi/kmdiguiclient.cpp4
-rw-r--r--kmdi/kmdimainfrm.cpp8
-rw-r--r--kparts/componentfactory.h2
-rw-r--r--kstyles/light/lightstyle-v2.cpp4
-rw-r--r--kstyles/light/lightstyle-v2.h4
-rw-r--r--kstyles/light/lightstyle-v3.cpp4
-rw-r--r--kstyles/light/lightstyle-v3.h4
-rw-r--r--kstyles/plastik/plastik.cpp4
-rw-r--r--kstyles/plastik/plastik.h4
-rw-r--r--kutils/kcmultidialog.cpp3
-rw-r--r--kutils/kfinddialog.cpp2
-rw-r--r--kutils/kpluginselector.cpp3
61 files changed, 120 insertions, 125 deletions
diff --git a/interfaces/khexedit/byteseditinterface.h b/interfaces/khexedit/byteseditinterface.h
index a34e70e42..57d1dd6f3 100644
--- a/interfaces/khexedit/byteseditinterface.h
+++ b/interfaces/khexedit/byteseditinterface.h
@@ -159,7 +159,7 @@ inline BytesEditInterface *bytesEditInterface( T *t )
if( !t )
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[])
diff --git a/interfaces/khexedit/charcolumninterface.h b/interfaces/khexedit/charcolumninterface.h
index 4221de0c4..38e4ae29b 100644
--- a/interfaces/khexedit/charcolumninterface.h
+++ b/interfaces/khexedit/charcolumninterface.h
@@ -97,7 +97,7 @@ CharColumnInterface *charColumnInterface( T *t )
if( !t )
return 0;
- return static_cast<CharColumnInterface*>( t->qt_cast("KHE::CharColumnInterface") );
+ return ::tqqt_cast<KHE::CharColumnInterface*>( t );
}
}
diff --git a/interfaces/khexedit/clipboardinterface.h b/interfaces/khexedit/clipboardinterface.h
index 6b5f4fab2..c63c5a88e 100644
--- a/interfaces/khexedit/clipboardinterface.h
+++ b/interfaces/khexedit/clipboardinterface.h
@@ -78,7 +78,7 @@ ClipboardInterface *clipboardInterface( T *t )
if( !t )
return 0;
- return static_cast<ClipboardInterface*>( t->qt_cast("KHE::ClipboardInterface") );
+ return ::tqqt_cast<KHE::ClipboardInterface*>( t );
}
}
diff --git a/interfaces/khexedit/valuecolumninterface.h b/interfaces/khexedit/valuecolumninterface.h
index 7dafa7d42..78378f1d4 100644
--- a/interfaces/khexedit/valuecolumninterface.h
+++ b/interfaces/khexedit/valuecolumninterface.h
@@ -162,7 +162,7 @@ ValueColumnInterface *valueColumnInterface( T *t )
if( !t )
return 0;
- return static_cast<ValueColumnInterface*>( t->qt_cast("KHE::ValueColumnInterface") );
+ return ::tqqt_cast<KHE::ValueColumnInterface*>( t );
}
}
diff --git a/interfaces/khexedit/zoominterface.h b/interfaces/khexedit/zoominterface.h
index 494fbfd86..9c6f0f677 100644
--- a/interfaces/khexedit/zoominterface.h
+++ b/interfaces/khexedit/zoominterface.h
@@ -71,7 +71,7 @@ ZoomInterface *zoomInterface( T *t )
if( !t )
return 0;
- return static_cast<ZoomInterface*>( t->qt_cast("KHE::ZoomInterface") );
+ return ::tqqt_cast<KHE::ZoomInterface*>( t );
}
}
diff --git a/interfaces/kregexpeditor/kregexpeditorinterface.h b/interfaces/kregexpeditor/kregexpeditorinterface.h
index 01fab0fdf..6995c3982 100644
--- a/interfaces/kregexpeditor/kregexpeditorinterface.h
+++ b/interfaces/kregexpeditor/kregexpeditorinterface.h
@@ -25,7 +25,7 @@
* TQDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor" );
* if ( editorDialog ) {
* // 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!
*
* // now use the editor.
@@ -53,7 +53,7 @@
* "KRegExpEditor/KRegExpEditor", TQString::null, parent );
* if ( editorWidget ) {
* // 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!
*
* // now use the editor.
diff --git a/interfaces/ktexteditor/blockselectioninterface.cpp b/interfaces/ktexteditor/blockselectioninterface.cpp
index c1af4a6ed..6d562a43e 100644
--- a/interfaces/ktexteditor/blockselectioninterface.cpp
+++ b/interfaces/ktexteditor/blockselectioninterface.cpp
@@ -70,5 +70,5 @@ BlockSelectionInterface *KTextEditor::blockSelectionInterface (Document *doc)
if (!doc)
return 0;
- return static_cast<BlockSelectionInterface*>(doc->qt_cast("KTextEditor::BlockSelectionInterface"));
+ return dynamic_cast<KTextEditor::BlockSelectionInterface*>(doc);
}
diff --git a/interfaces/ktexteditor/clipboardinterface.cpp b/interfaces/ktexteditor/clipboardinterface.cpp
index 4401b29de..89f92d089 100644
--- a/interfaces/ktexteditor/clipboardinterface.cpp
+++ b/interfaces/ktexteditor/clipboardinterface.cpp
@@ -52,5 +52,5 @@ ClipboardInterface *KTextEditor::clipboardInterface (View *view)
if (!view)
return 0;
- return static_cast<ClipboardInterface*>(view->qt_cast("KTextEditor::ClipboardInterface"));
+ return dynamic_cast<KTextEditor::ClipboardInterface*>(view);
}
diff --git a/interfaces/ktexteditor/codecompletioninterface.cpp b/interfaces/ktexteditor/codecompletioninterface.cpp
index ae60b2162..416dd593a 100644
--- a/interfaces/ktexteditor/codecompletioninterface.cpp
+++ b/interfaces/ktexteditor/codecompletioninterface.cpp
@@ -45,7 +45,7 @@ CodeCompletionInterface *KTextEditor::codeCompletionInterface (View *view)
if (!view)
return 0;
- return static_cast<CodeCompletionInterface*>(view->qt_cast("KTextEditor::CodeCompletionInterface"));
+ return dynamic_cast<KTextEditor::CodeCompletionInterface*>(view);
}
diff --git a/interfaces/ktexteditor/configinterface.cpp b/interfaces/ktexteditor/configinterface.cpp
index 2ca2e4b12..63bf086e0 100644
--- a/interfaces/ktexteditor/configinterface.cpp
+++ b/interfaces/ktexteditor/configinterface.cpp
@@ -67,7 +67,7 @@ ConfigInterface *KTextEditor::configInterface (Document *doc)
if (!doc)
return 0;
- return static_cast<ConfigInterface*>(doc->qt_cast("KTextEditor::ConfigInterface"));
+ return dynamic_cast<KTextEditor::ConfigInterface*>(doc);
}
ConfigInterface *KTextEditor::configInterface (Plugin *plugin)
@@ -75,5 +75,5 @@ ConfigInterface *KTextEditor::configInterface (Plugin *plugin)
if (!plugin)
return 0;
- return static_cast<ConfigInterface*>(plugin->qt_cast("KTextEditor::ConfigInterface"));
+ return dynamic_cast<KTextEditor::ConfigInterface*>(plugin);
}
diff --git a/interfaces/ktexteditor/configinterfaceextension.cpp b/interfaces/ktexteditor/configinterfaceextension.cpp
index 8557c422f..460d930a4 100644
--- a/interfaces/ktexteditor/configinterfaceextension.cpp
+++ b/interfaces/ktexteditor/configinterfaceextension.cpp
@@ -72,7 +72,7 @@ ConfigInterfaceExtension *KTextEditor::configInterfaceExtension (Document *doc)
if (!doc)
return 0;
- return static_cast<ConfigInterfaceExtension*>(doc->qt_cast("KTextEditor::ConfigInterfaceExtension"));
+ return dynamic_cast<KTextEditor::ConfigInterfaceExtension*>(doc);
}
ConfigInterfaceExtension *KTextEditor::configInterfaceExtension (Plugin *plugin)
@@ -80,5 +80,5 @@ ConfigInterfaceExtension *KTextEditor::configInterfaceExtension (Plugin *plugin)
if (!plugin)
return 0;
- return static_cast<ConfigInterfaceExtension*>(plugin->qt_cast("KTextEditor::ConfigInterfaceExtension"));
+ return dynamic_cast<KTextEditor::ConfigInterfaceExtension*>(plugin);
}
diff --git a/interfaces/ktexteditor/cursorinterface.cpp b/interfaces/ktexteditor/cursorinterface.cpp
index 91a14b06a..96d00290e 100644
--- a/interfaces/ktexteditor/cursorinterface.cpp
+++ b/interfaces/ktexteditor/cursorinterface.cpp
@@ -65,5 +65,5 @@ CursorInterface *KTextEditor::cursorInterface (Document *doc)
if (!doc)
return 0;
- return static_cast<CursorInterface*>(doc->qt_cast("KTextEditor::CursorInterface"));
+ return dynamic_cast<KTextEditor::CursorInterface*>(doc);
}
diff --git a/interfaces/ktexteditor/dynwordwrapinterface.cpp b/interfaces/ktexteditor/dynwordwrapinterface.cpp
index 49d4060c0..9c1da6d4b 100644
--- a/interfaces/ktexteditor/dynwordwrapinterface.cpp
+++ b/interfaces/ktexteditor/dynwordwrapinterface.cpp
@@ -65,5 +65,5 @@ DynWordWrapInterface *KTextEditor::dynWordWrapInterface (View *view)
if (!view)
return 0;
- return static_cast<DynWordWrapInterface*>(view->qt_cast("KTextEditor::DynWordWrapInterface"));
+ return dynamic_cast<KTextEditor::DynWordWrapInterface*>(view);
}
diff --git a/interfaces/ktexteditor/editinterface.cpp b/interfaces/ktexteditor/editinterface.cpp
index 6722fc555..cfa0b67bc 100644
--- a/interfaces/ktexteditor/editinterface.cpp
+++ b/interfaces/ktexteditor/editinterface.cpp
@@ -52,6 +52,6 @@ EditInterface *KTextEditor::editInterface (Document *doc)
if (!doc)
return 0;
- return static_cast<EditInterface*>(doc->qt_cast("KTextEditor::EditInterface"));
+ return dynamic_cast<KTextEditor::EditInterface*>(doc);
}
diff --git a/interfaces/ktexteditor/editinterfaceext.cpp b/interfaces/ktexteditor/editinterfaceext.cpp
index 7d4acf55f..008fa488d 100644
--- a/interfaces/ktexteditor/editinterfaceext.cpp
+++ b/interfaces/ktexteditor/editinterfaceext.cpp
@@ -45,6 +45,6 @@ EditInterfaceExt *KTextEditor::editInterfaceExt (Document *doc)
if (!doc)
return 0;
- return static_cast<EditInterfaceExt*>(doc->qt_cast("KTextEditor::EditInterfaceExt"));
+ return dynamic_cast<KTextEditor::EditInterfaceExt*>(doc);
}
diff --git a/interfaces/ktexteditor/encodinginterface.cpp b/interfaces/ktexteditor/encodinginterface.cpp
index 341847fb7..a0ef1ad22 100644
--- a/interfaces/ktexteditor/encodinginterface.cpp
+++ b/interfaces/ktexteditor/encodinginterface.cpp
@@ -72,5 +72,5 @@ EncodingInterface *KTextEditor::encodingInterface (Document *doc)
if (!doc)
return 0;
- return static_cast<EncodingInterface*>(doc->qt_cast("KTextEditor::EncodingInterface"));
+ return dynamic_cast<KTextEditor::EncodingInterface*>(doc);
}
diff --git a/interfaces/ktexteditor/highlightinginterface.cpp b/interfaces/ktexteditor/highlightinginterface.cpp
index f606ab5c0..1677ca87c 100644
--- a/interfaces/ktexteditor/highlightinginterface.cpp
+++ b/interfaces/ktexteditor/highlightinginterface.cpp
@@ -65,5 +65,5 @@ HighlightingInterface *KTextEditor::highlightingInterface (Document *doc)
if (!doc)
return 0;
- return static_cast<HighlightingInterface*>(doc->qt_cast("KTextEditor::HighlightingInterface"));
+ return dynamic_cast<KTextEditor::HighlightingInterface*>(doc);
}
diff --git a/interfaces/ktexteditor/ktexteditor.cpp b/interfaces/ktexteditor/ktexteditor.cpp
index ef199c819..c334dd990 100644
--- a/interfaces/ktexteditor/ktexteditor.cpp
+++ b/interfaces/ktexteditor/ktexteditor.cpp
@@ -226,6 +226,6 @@ PluginViewInterface *KTextEditor::pluginViewInterface (Plugin *plugin)
if (!plugin)
return 0;
- return static_cast<PluginViewInterface*>(plugin->qt_cast("KTextEditor::PluginViewInterface"));
+ return dynamic_cast<KTextEditor::PluginViewInterface*>(plugin);
}
diff --git a/interfaces/ktexteditor/markinterface.cpp b/interfaces/ktexteditor/markinterface.cpp
index d711b5245..024db35c4 100644
--- a/interfaces/ktexteditor/markinterface.cpp
+++ b/interfaces/ktexteditor/markinterface.cpp
@@ -65,7 +65,7 @@ MarkInterface *KTextEditor::markInterface (Document *doc)
if (!doc)
return 0;
- return static_cast<MarkInterface*>(doc->qt_cast("KTextEditor::MarkInterface"));
+ return dynamic_cast<KTextEditor::MarkInterface*>(doc);
}
int MarkInterface::reservedMarkersCount()
diff --git a/interfaces/ktexteditor/markinterfaceextension.cpp b/interfaces/ktexteditor/markinterfaceextension.cpp
index 57c981421..86538abfc 100644
--- a/interfaces/ktexteditor/markinterfaceextension.cpp
+++ b/interfaces/ktexteditor/markinterfaceextension.cpp
@@ -65,5 +65,5 @@ MarkInterfaceExtension *KTextEditor::markInterfaceExtension (Document *doc)
if (!doc)
return 0;
- return static_cast<MarkInterfaceExtension*>(doc->qt_cast("KTextEditor::MarkInterfaceExtension"));
+ return dynamic_cast<KTextEditor::MarkInterfaceExtension*>(doc);
}
diff --git a/interfaces/ktexteditor/popupmenuinterface.cpp b/interfaces/ktexteditor/popupmenuinterface.cpp
index d2d51e4af..350fa138b 100644
--- a/interfaces/ktexteditor/popupmenuinterface.cpp
+++ b/interfaces/ktexteditor/popupmenuinterface.cpp
@@ -65,5 +65,5 @@ PopupMenuInterface *KTextEditor::popupMenuInterface (View *view)
if (!view)
return 0;
- return static_cast<PopupMenuInterface*>(view->qt_cast("KTextEditor::PopupMenuInterface"));
+ return dynamic_cast<KTextEditor::PopupMenuInterface*>(view);
}
diff --git a/interfaces/ktexteditor/printinterface.cpp b/interfaces/ktexteditor/printinterface.cpp
index 936e803ea..5a4011eb4 100644
--- a/interfaces/ktexteditor/printinterface.cpp
+++ b/interfaces/ktexteditor/printinterface.cpp
@@ -70,5 +70,5 @@ PrintInterface *KTextEditor::printInterface (Document *doc)
if (!doc)
return 0;
- return static_cast<PrintInterface*>(doc->qt_cast("KTextEditor::PrintInterface"));
+ return dynamic_cast<KTextEditor::PrintInterface*>(doc);
}
diff --git a/interfaces/ktexteditor/searchinterface.cpp b/interfaces/ktexteditor/searchinterface.cpp
index d23a25e31..6ea021e0d 100644
--- a/interfaces/ktexteditor/searchinterface.cpp
+++ b/interfaces/ktexteditor/searchinterface.cpp
@@ -51,5 +51,5 @@ SearchInterface *KTextEditor::searchInterface (Document *doc)
if (!doc)
return 0;
- return static_cast<SearchInterface*>(doc->qt_cast("KTextEditor::SearchInterface"));
+ return dynamic_cast<KTextEditor::SearchInterface*>(doc);
}
diff --git a/interfaces/ktexteditor/selectioninterface.cpp b/interfaces/ktexteditor/selectioninterface.cpp
index 2e9ae5204..0a8dc6b00 100644
--- a/interfaces/ktexteditor/selectioninterface.cpp
+++ b/interfaces/ktexteditor/selectioninterface.cpp
@@ -52,7 +52,7 @@ SelectionInterface *KTextEditor::selectionInterface (Document *doc)
if (!doc)
return 0;
- return static_cast<SelectionInterface*>(doc->qt_cast("KTextEditor::SelectionInterface"));
+ return dynamic_cast<KTextEditor::SelectionInterface*>(doc);
}
SelectionInterface *KTextEditor::selectionInterface (View *view)
@@ -60,6 +60,6 @@ SelectionInterface *KTextEditor::selectionInterface (View *view)
if (!view)
return 0;
- return static_cast<SelectionInterface*>(view->qt_cast("KTextEditor::SelectionInterface"));
+ return dynamic_cast<KTextEditor::SelectionInterface*>(view);
}
diff --git a/interfaces/ktexteditor/selectioninterfaceext.cpp b/interfaces/ktexteditor/selectioninterfaceext.cpp
index f59468c17..3034f33a5 100644
--- a/interfaces/ktexteditor/selectioninterfaceext.cpp
+++ b/interfaces/ktexteditor/selectioninterfaceext.cpp
@@ -68,7 +68,7 @@ SelectionInterfaceExt *KTextEditor::selectionInterfaceExt (Document *doc)
if (!doc)
return 0;
- return static_cast<SelectionInterfaceExt*>(doc->qt_cast("KTextEditor::SelectionInterfaceExt"));
+ return dynamic_cast<KTextEditor::SelectionInterfaceExt*>(doc);
}
SelectionInterfaceExt *KTextEditor::selectionInterfaceExt (View *view)
@@ -76,7 +76,7 @@ SelectionInterfaceExt *KTextEditor::selectionInterfaceExt (View *view)
if (!view)
return 0;
- return static_cast<SelectionInterfaceExt*>(view->qt_cast("KTextEditor::SelectionInterfaceExt"));
+ return dynamic_cast<KTextEditor::SelectionInterfaceExt*>(view);
}
//END KTextEditor::SelectionInterfaceExt
diff --git a/interfaces/ktexteditor/sessionconfiginterface.cpp b/interfaces/ktexteditor/sessionconfiginterface.cpp
index 7180aae38..def7bf0a5 100644
--- a/interfaces/ktexteditor/sessionconfiginterface.cpp
+++ b/interfaces/ktexteditor/sessionconfiginterface.cpp
@@ -68,7 +68,7 @@ SessionConfigInterface *KTextEditor::sessionConfigInterface (Document *doc)
if (!doc)
return 0;
- return static_cast<SessionConfigInterface*>(doc->qt_cast("KTextEditor::SessionConfigInterface"));
+ return dynamic_cast<KTextEditor::SessionConfigInterface*>(doc);
}
SessionConfigInterface *KTextEditor::sessionConfigInterface (View *view)
@@ -76,7 +76,7 @@ SessionConfigInterface *KTextEditor::sessionConfigInterface (View *view)
if (!view)
return 0;
- return static_cast<SessionConfigInterface*>(view->qt_cast("KTextEditor::SessionConfigInterface"));
+ return dynamic_cast<KTextEditor::SessionConfigInterface*>(view);
}
SessionConfigInterface *KTextEditor::sessionConfigInterface (Plugin *plugin)
@@ -84,5 +84,5 @@ SessionConfigInterface *KTextEditor::sessionConfigInterface (Plugin *plugin)
if (!plugin)
return 0;
- return static_cast<SessionConfigInterface*>(plugin->qt_cast("KTextEditor::SessionConfigInterface"));
+ return dynamic_cast<KTextEditor::SessionConfigInterface*>(plugin);
}
diff --git a/interfaces/ktexteditor/templateinterface.cpp b/interfaces/ktexteditor/templateinterface.cpp
index 126747260..a22e5edce 100644
--- a/interfaces/ktexteditor/templateinterface.cpp
+++ b/interfaces/ktexteditor/templateinterface.cpp
@@ -192,6 +192,6 @@ TemplateInterface *KTextEditor::templateInterface ( KTextEditor::Document *doc )
if ( !doc )
return 0;
- return static_cast<TemplateInterface*>( doc->qt_cast( "KTextEditor::TemplateInterface" ) );
+ return dynamic_cast<KTextEditor::TemplateInterface*>( doc );
}
diff --git a/interfaces/ktexteditor/texthintinterface.cpp b/interfaces/ktexteditor/texthintinterface.cpp
index 079a1edda..f6aa4f0b3 100644
--- a/interfaces/ktexteditor/texthintinterface.cpp
+++ b/interfaces/ktexteditor/texthintinterface.cpp
@@ -58,7 +58,7 @@ TextHintInterface *textHintInterface (View *view)
if (!view)
return 0;
- return static_cast<TextHintInterface*>(view->qt_cast("KTextEditor::TextHintInterface"));
+ return dynamic_cast<KTextEditor::TextHintInterface*>(view);
}
diff --git a/interfaces/ktexteditor/undointerface.cpp b/interfaces/ktexteditor/undointerface.cpp
index d19a56deb..30a1dd292 100644
--- a/interfaces/ktexteditor/undointerface.cpp
+++ b/interfaces/ktexteditor/undointerface.cpp
@@ -70,5 +70,5 @@ UndoInterface *KTextEditor::undoInterface (Document *doc)
if (!doc)
return 0;
- return static_cast<UndoInterface*>(doc->qt_cast("KTextEditor::UndoInterface"));
+ return dynamic_cast<KTextEditor::UndoInterface*>(doc);
}
diff --git a/interfaces/ktexteditor/variableinterface.cpp b/interfaces/ktexteditor/variableinterface.cpp
index 0ac55167e..616e0beab 100644
--- a/interfaces/ktexteditor/variableinterface.cpp
+++ b/interfaces/ktexteditor/variableinterface.cpp
@@ -44,5 +44,5 @@ VariableInterface *KTextEditor::variableInterface( Document *doc )
if ( ! doc )
return 0;
- return static_cast<VariableInterface*>(doc->qt_cast("KTextEditor::VariableInterface"));
+ return dynamic_cast<KTextEditor::VariableInterface*>(doc);
}
diff --git a/interfaces/ktexteditor/viewcursorinterface.cpp b/interfaces/ktexteditor/viewcursorinterface.cpp
index 0c834be42..58cea6289 100644
--- a/interfaces/ktexteditor/viewcursorinterface.cpp
+++ b/interfaces/ktexteditor/viewcursorinterface.cpp
@@ -70,5 +70,5 @@ ViewCursorInterface *KTextEditor::viewCursorInterface (View *view)
if (!view)
return 0;
- return static_cast<ViewCursorInterface*>(view->qt_cast("KTextEditor::ViewCursorInterface"));
+ return dynamic_cast<KTextEditor::ViewCursorInterface*>(view);
}
diff --git a/interfaces/ktexteditor/viewstatusmsginterface.cpp b/interfaces/ktexteditor/viewstatusmsginterface.cpp
index ff0815c89..af8870c80 100644
--- a/interfaces/ktexteditor/viewstatusmsginterface.cpp
+++ b/interfaces/ktexteditor/viewstatusmsginterface.cpp
@@ -72,5 +72,5 @@ ViewStatusMsgInterface *KTextEditor::viewStatusMsgInterface (View *view)
if (!view)
return 0;
- return static_cast<ViewStatusMsgInterface*>(view->qt_cast("KTextEditor::ViewStatusMsgInterface"));
+ return dynamic_cast<KTextEditor::ViewStatusMsgInterface*>(view);
}
diff --git a/interfaces/ktexteditor/wordwrapinterface.cpp b/interfaces/ktexteditor/wordwrapinterface.cpp
index 3afe5c230..6be76120b 100644
--- a/interfaces/ktexteditor/wordwrapinterface.cpp
+++ b/interfaces/ktexteditor/wordwrapinterface.cpp
@@ -66,5 +66,5 @@ WordWrapInterface *KTextEditor::wordWrapInterface (Document *doc)
if (!doc)
return 0;
- return static_cast<WordWrapInterface*>(doc->qt_cast("KTextEditor::WordWrapInterface"));
+ return dynamic_cast<KTextEditor::WordWrapInterface*>(doc);
}
diff --git a/interfaces/terminal/kde_terminal_interface.h b/interfaces/terminal/kde_terminal_interface.h
index 450d1e27d..c1fc2b9b5 100644
--- a/interfaces/terminal/kde_terminal_interface.h
+++ b/interfaces/terminal/kde_terminal_interface.h
@@ -1,4 +1,4 @@
-// interface.h -*- C++ -*-
+// // interface.h -*- C++ -*-
// Copyright (C) 2002 Dominique Devriese <devriese@kde.org>
// Copyright (C) 2005 Peter Rockai <me@mornfall.net>
@@ -60,7 +60,7 @@ class TQStrList;
* setCentralWidget( p->widget() );
*
* // cast the part to the TerminalInterface..
- * TerminalInterface* t = static_cast<TerminalInterface*>( p->qt_cast( "TerminalInterface" ) );
+ * TerminalInterface* t = ::tqqt_cast<TerminalInterface*>( p );
* if( ! t )
* {
* // This probably happens because the konsole that is installed
diff --git a/interfaces/terminal/test/main.cc b/interfaces/terminal/test/main.cc
index be3f4165e..6161ffc09 100644
--- a/interfaces/terminal/test/main.cc
+++ b/interfaces/terminal/test/main.cc
@@ -20,7 +20,7 @@ Win::Win()
KParts::Part* p = static_cast<KParts::Part*>( factory->create( this, "tralala", "TQObject", "KParts::ReadOnlyPart" ) );
setCentralWidget( p->widget() );
- TerminalInterface* t = static_cast<TerminalInterface*>( p->qt_cast( "TerminalInterface" ) );
+ TerminalInterface* t = ::tqqt_cast<TerminalInterface*>( p );
t->showShellInDir( TQDir::home().path() );
// TQStrList l;
// l.append( "python" );
@@ -46,11 +46,11 @@ int main( int argc, char** argv )
void Win::pythonExited()
{
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 ) );
disconnect(p, TQT_SIGNAL( processExited() ),
this, TQT_SLOT( pythonExited() ));
- TerminalInterface* t = static_cast<TerminalInterface*>( p->qt_cast( "TerminalInterface" ) );
+ TerminalInterface* t = ::tqqt_cast<TerminalInterface*>( p );
TQStrList l;
l.append( "echo" );
l.append( "hello world" );
diff --git a/kate/interfaces/interfaces.cpp b/kate/interfaces/interfaces.cpp
index ad20959b6..9cbb58977 100644
--- a/kate/interfaces/interfaces.cpp
+++ b/kate/interfaces/interfaces.cpp
@@ -100,7 +100,7 @@ Document *document (KTextEditor::Document *doc)
if (!doc)
return 0;
- return static_cast<Document*>(doc->qt_cast("Kate::Document"));
+ return ::tqqt_cast<Kate::Document*>(doc);
}
DocumentExt *documentExt (KTextEditor::Document *doc)
@@ -108,7 +108,7 @@ DocumentExt *documentExt (KTextEditor::Document *doc)
if (!doc)
return 0;
- return static_cast<DocumentExt*>(doc->qt_cast("Kate::DocumentExt"));
+ return dynamic_cast<Kate::DocumentExt*>(doc);
}
Document *createDocument ( TQObject *parent, const char *name )
@@ -121,7 +121,7 @@ View *view (KTextEditor::View *view)
if (!view)
return 0;
- return static_cast<View*>(view->qt_cast("Kate::View"));
+ return ::tqqt_cast<Kate::View*>(view);
}
}
diff --git a/kate/plugins/autobookmarker/autobookmarker.cpp b/kate/plugins/autobookmarker/autobookmarker.cpp
index c03fcefe0..a0e61f3d0 100644
--- a/kate/plugins/autobookmarker/autobookmarker.cpp
+++ b/kate/plugins/autobookmarker/autobookmarker.cpp
@@ -113,8 +113,7 @@ void AutoBookmarker::slotCompleted()
{
// get the document info
KTextEditor::DocumentInfoInterface *di =
- static_cast<KTextEditor::DocumentInfoInterface*>(document()->
- qt_cast("KTextEditor::DocumentInfoInterface"));
+ ::tqqt_cast<KTextEditor::DocumentInfoInterface*>(document());
TQString mt;
if ( di ) // we can still try match the URL otherwise
mt = di->mimeType();
diff --git a/kdecore/kaccelmanager.cpp b/kdecore/kaccelmanager.cpp
index 3447803d1..4dc00f6aa 100644
--- a/kdecore/kaccelmanager.cpp
+++ b/kdecore/kaccelmanager.cpp
@@ -47,6 +47,7 @@
#include "kaccelmanager_private.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) ||
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;
// now treat 'ordinary' widgets
diff --git a/kdecore/kgenericfactory.tcc b/kdecore/kgenericfactory.tcc
index 22fbd7371..3d8737635 100644
--- a/kdecore/kgenericfactory.tcc
+++ b/kdecore/kgenericfactory.tcc
@@ -151,7 +151,7 @@ namespace KDEPrivate
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 )
return 0;
return new Product( p, name, args );
@@ -161,7 +161,7 @@ namespace KDEPrivate
TQObject *parent, const char *name,
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 )
return 0;
return new Product( p, name, args );
diff --git a/kdecore/kkeynative_x11.cpp b/kdecore/kkeynative_x11.cpp
index 7733d3de7..8fed59deb 100644
--- a/kdecore/kkeynative_x11.cpp
+++ b/kdecore/kkeynative_x11.cpp
@@ -181,7 +181,7 @@ int KKeyNative::keyCodeQt() const
{
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 0;
diff --git a/kdecore/kkeyserver_x11.cpp b/kdecore/kkeyserver_x11.cpp
index 96bd7d67d..8263d2735 100644
--- a/kdecore/kkeyserver_x11.cpp
+++ b/kdecore/kkeyserver_x11.cpp
@@ -490,7 +490,7 @@ int Sym::qt() const
if( g_rgQtToSymX[i].keySymX == m_sym )
return g_rgQtToSymX[i].keySymQt;
#endif
- return Qt::Key_unknown;
+ return TQt::Key_unknown;
}
TQString Sym::toString( bool bUserSpace ) const
@@ -646,7 +646,7 @@ bool symToKeyQt( uint keySym, int& keyQt )
{
Sym sym( keySym );
keyQt = sym.qt();
- return (keyQt != Qt::Key_unknown);
+ return (keyQt != TQt::Key_unknown);
}
bool modToModQt( uint mod, int& modQt )
diff --git a/kdefx/kstyle.cpp b/kdefx/kstyle.cpp
index 9e0546a87..a7602e50f 100644
--- a/kdefx/kstyle.cpp
+++ b/kdefx/kstyle.cpp
@@ -1825,8 +1825,8 @@ TQPixmap KStyle::stylePixmap( StylePixmap stylepixmap,
}
-int KStyle::tqstyleHint( StyleHint sh, const TQWidget* w,
- const TQStyleOption &opt, QStyleHintReturn* shr) const
+int KStyle::tqstyleHint( TQ_StyleHint sh, const TQWidget* w,
+ const TQStyleOption &opt, TQStyleHintReturn* shr) const
{
switch (sh)
{
diff --git a/kdefx/kstyle.h b/kdefx/kstyle.h
index c39e5e53f..93a3419d0 100644
--- a/kdefx/kstyle.h
+++ b/kdefx/kstyle.h
@@ -331,10 +331,10 @@ class KDEFX_EXPORT KStyle: public TQCommonStyle
const TQWidget* widget = 0,
const TQStyleOption& = TQStyleOption::SO_Default ) const;
- int tqstyleHint( StyleHint sh,
+ int tqstyleHint( TQ_StyleHint sh,
const TQWidget* w = 0,
const TQStyleOption &opt = TQStyleOption::SO_Default,
- QStyleHintReturn* shr = 0 ) const;
+ TQStyleHintReturn* shr = 0 ) const;
protected:
bool eventFilter( TQObject* object, TQEvent* event );
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");
/*****************************************************/
diff --git a/kmdi/kmdi/dockcontainer.cpp b/kmdi/kmdi/dockcontainer.cpp
index 017d8a02a..eb8518a4a 100644
--- a/kmdi/kmdi/dockcontainer.cpp
+++ b/kmdi/kmdi/dockcontainer.cpp
@@ -119,7 +119,7 @@ DockContainer::~DockContainer()
it = m_map.begin();
KDockWidget *w=it.key();
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_map.remove(w);
@@ -148,8 +148,8 @@ void DockContainer::init()
// try to restore splitter size
if ( parentDockWidget() && parentDockWidget()->parent() )
{
- KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()->
- tqparent()->qt_cast("KDockSplitter"));
+ KDockSplitter *sp= ::tqqt_cast<KDockSplitter*>(parentDockWidget()->
+ tqparent());
if ( sp )
sp->setSeparatorPosX( m_separatorPos );
}
@@ -184,12 +184,11 @@ void DockContainer::insertWidget (KDockWidget *dwdg, TQPixmap pixmap, const TQSt
if (((KDockWidget*)tqparentWidget())->mayBeShow())
((KDockWidget*)tqparentWidget())->dockBack();
- if (w->getHeader()->qt_cast("KDockWidgetHeader"))
+ if (::tqqt_cast<KDockWidgetHeader*>(w->getHeader()))
{
kdDebug(760)<<"*** KDockWidgetHeader has been found"<<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" );
@@ -256,8 +255,7 @@ bool DockContainer::eventFilter( TQObject *obj, TQEvent *event )
kdDebug()<<"NO HEADER"<<endl;
break;
}
- KDockWidgetHeader *hdr=static_cast<KDockWidgetHeader*>(w->getHeader()->
- qt_cast("KDockWidgetHeader"));
+ KDockWidgetHeader *hdr=::tqqt_cast<KDockWidgetHeader*>(w->getHeader());
if (!hdr) {
kdDebug()<<"Wrong header type in DockContainer::eventFilter"<<endl;
break;
@@ -357,7 +355,7 @@ void DockContainer::removeWidget(KDockWidget* dwdg)
m_map.remove(w);
m_revMap.remove(id);
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);
}
KDockContainer::removeWidget(w);
@@ -405,7 +403,7 @@ void DockContainer::tabClicked(int t)
}
m_ws->raiseWidget(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->getWidget()) tmpDw->getWidget()->setFocus();
} else kdDebug(760)<<"Something really weird is going on"<<endl;
@@ -422,8 +420,8 @@ void DockContainer::tabClicked(int t)
// try save splitter position
if ( parentDockWidget() && parentDockWidget()->parent() )
{
- KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()->
- tqparent()->qt_cast("KDockSplitter"));
+ KDockSplitter *sp= ::tqqt_cast<KDockSplitter*>(parentDockWidget()->
+ tqparent());
if ( sp )
m_separatorPos = sp->separatorPos();
}
@@ -475,8 +473,8 @@ void DockContainer::save(KConfig* cfg,const TQString& group_or_prefix)
// try to save the splitter position
if ( parentDockWidget() && parentDockWidget()->parent() )
{
- KDockSplitter *sp= static_cast<KDockSplitter*>(parentDockWidget()->
- tqparent()->qt_cast("KDockSplitter"));
+ KDockSplitter *sp= ::tqqt_cast<KDockSplitter*>(parentDockWidget()->
+ tqparent());
if ( sp )
cfg->writeEntry( "separatorPosition", m_separatorPos );
}
diff --git a/kmdi/kmdi/guiclient.cpp b/kmdi/kmdi/guiclient.cpp
index c5d2ab115..6d61f16e3 100644
--- a/kmdi/kmdi/guiclient.cpp
+++ b/kmdi/kmdi/guiclient.cpp
@@ -201,8 +201,8 @@ void ToggleToolViewAction::anDWChanged()
else if ((!isChecked()) && m_dw->mayBeHide())
setChecked(true);
else if (isChecked() && (m_dw->parentDockTabGroup() &&
- ((static_cast<KDockWidget*>(m_dw->parentDockTabGroup()->
- tqparent()->qt_cast("KDockWidget")))->mayBeShow())))
+ ((::tqqt_cast<KDockWidget*>(m_dw->parentDockTabGroup()->
+ tqparent()))->mayBeShow())))
setChecked(false);
}
diff --git a/kmdi/kmdi/mainwindow.cpp b/kmdi/kmdi/mainwindow.cpp
index 4b643e3d4..26044879e 100644
--- a/kmdi/kmdi/mainwindow.cpp
+++ b/kmdi/kmdi/mainwindow.cpp
@@ -311,16 +311,16 @@ void MainWindow::setToolViewStyle(int flag)
{
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);
- DockContainer *tmpR=(DockContainer*) (m_rightContainer->getWidget()->qt_cast("KMDI::DockContainer"));
+ DockContainer *tmpR=::tqqt_cast<KMDI::DockContainer*>(m_rightContainer->getWidget());
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);
- DockContainer *tmpB=(DockContainer*) (m_bottomContainer->getWidget()->qt_cast("KMDI::DockContainer"));
+ DockContainer *tmpB=::tqqt_cast<KMDI::DockContainer*>(m_bottomContainer->getWidget());
if (tmpB) tmpB->setStyle(flag);
d->m_toolviewStyle = flag;
diff --git a/kmdi/kmdidockcontainer.cpp b/kmdi/kmdidockcontainer.cpp
index e14d826e4..8198541fe 100644
--- a/kmdi/kmdidockcontainer.cpp
+++ b/kmdi/kmdidockcontainer.cpp
@@ -140,7 +140,7 @@ KMdiDockContainer::~KMdiDockContainer()
KDockWidget *w = it.key();
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_map.remove( w );
@@ -172,7 +172,7 @@ void KMdiDockContainer::init()
// try to restore splitter size
if ( parentDockWidget() && parentDockWidget()->tqparent() )
{
- KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget()->tqparent()->qt_cast( "KDockSplitter" ) );
+ KDockSplitter * sp = ::tqqt_cast<KDockSplitter*>( parentDockWidget()->tqparent() );
if ( sp )
sp->setSeparatorPosX( m_separatorPos );
}
@@ -207,12 +207,12 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, TQPixmap pixmap, const
if ( ( ( KDockWidget* ) tqparentWidget() ) ->mayBeShow() )
( ( 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 << "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" );
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;
}
- KDockWidgetHeader *hdr = static_cast<KDockWidgetHeader*>( w->getHeader()->qt_cast( "KDockWidgetHeader" ) );
+ KDockWidgetHeader *hdr = ::tqqt_cast<KDockWidgetHeader*>( w->getHeader() );
if ( !hdr )
{
kdDebug(760) << "Wrong header type in KMdiDockContainer::eventFilter" << endl;
@@ -387,7 +387,7 @@ void KMdiDockContainer::removeWidget( KDockWidget* dwdg )
m_revMap.remove( id );
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 );
}
KDockContainer::removeWidget( w );
@@ -442,7 +442,7 @@ void KMdiDockContainer::tabClicked( int t )
if ( m_ws->widget( 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->getWidget() )
@@ -467,7 +467,7 @@ void KMdiDockContainer::tabClicked( int t )
// try save splitter position
if ( parentDockWidget() && parentDockWidget()->tqparent() )
{
- KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget()->tqparent()->qt_cast( "KDockSplitter" ) );
+ KDockSplitter * sp = ::tqqt_cast<KDockSplitter*>( parentDockWidget()->tqparent() );
if ( sp )
m_separatorPos = sp->separatorPos();
}
@@ -638,8 +638,7 @@ void KMdiDockContainer::save( KConfig* cfg, const TQString& group_or_prefix )
// try to save the splitter position
if ( parentDockWidget() && parentDockWidget() ->tqparent() )
{
- KDockSplitter * sp = static_cast<KDockSplitter*>( parentDockWidget() ->
- tqparent() ->qt_cast( "KDockSplitter" ) );
+ KDockSplitter * sp = ::tqqt_cast<KDockSplitter*>( parentDockWidget() -> tqparent() );
if ( sp )
cfg->writeEntry( "separatorPosition", m_separatorPos );
}
diff --git a/kmdi/kmdiguiclient.cpp b/kmdi/kmdiguiclient.cpp
index c99c05b01..cebeafc4f 100644
--- a/kmdi/kmdiguiclient.cpp
+++ b/kmdi/kmdiguiclient.cpp
@@ -83,8 +83,8 @@ void ToggleToolViewAction::anDWChanged()
else if ( ( !isChecked() ) && m_dw->mayBeHide() )
setChecked( true );
else if ( isChecked() && ( m_dw->parentDockTabGroup() &&
- ( ( static_cast<KDockWidget*>( m_dw->parentDockTabGroup() ->
- tqparent() ->qt_cast( "KDockWidget" ) ) ) ->mayBeShow() ) ) )
+ ( ( ::tqqt_cast<KDockWidget*>( m_dw->parentDockTabGroup() ->
+ tqparent() ) ) ->mayBeShow() ) ) )
setChecked( false );
}
diff --git a/kmdi/kmdimainfrm.cpp b/kmdi/kmdimainfrm.cpp
index 107c4d982..fe6c374f1 100644
--- a/kmdi/kmdimainfrm.cpp
+++ b/kmdi/kmdimainfrm.cpp
@@ -1739,28 +1739,28 @@ void KMdiMainFrm::setIDEAlModeStyle( int flags )
d->m_styleIDEAlMode = flags; // see KMultiTabBar for the first 3 bits
if ( m_leftContainer )
{
- KMdiDockContainer * tmpL = ( KMdiDockContainer* ) ( m_leftContainer->getWidget()->qt_cast( "KMdiDockContainer" ) );
+ KMdiDockContainer * tmpL = ::tqqt_cast<KMdiDockContainer*>( m_leftContainer->getWidget() );
if ( tmpL )
tmpL->setStyle( flags );
}
if ( m_rightContainer )
{
- KMdiDockContainer * tmpR = ( KMdiDockContainer* ) ( m_rightContainer->getWidget()->qt_cast( "KMdiDockContainer" ) );
+ KMdiDockContainer * tmpR = ::tqqt_cast<KMdiDockContainer*>( m_rightContainer->getWidget() );
if ( tmpR )
tmpR->setStyle( flags );
}
if ( m_topContainer )
{
- KMdiDockContainer * tmpT = ( KMdiDockContainer* ) ( m_topContainer->getWidget()->qt_cast( "KMdiDockContainer" ) );
+ KMdiDockContainer * tmpT = ::tqqt_cast<KMdiDockContainer*>( m_topContainer->getWidget() );
if ( tmpT )
tmpT->setStyle( flags );
}
if ( m_bottomContainer )
{
- KMdiDockContainer * tmpB = ( KMdiDockContainer* ) ( m_bottomContainer->getWidget()->qt_cast( "KMdiDockContainer" ) );
+ KMdiDockContainer * tmpB = ::tqqt_cast<KMdiDockContainer*>( m_bottomContainer->getWidget() );
if ( tmpB )
tmpB->setStyle( flags );
}
diff --git a/kparts/componentfactory.h b/kparts/componentfactory.h
index 82dd0ab9f..80661b191 100644
--- a/kparts/componentfactory.h
+++ b/kparts/componentfactory.h
@@ -66,7 +66,7 @@ namespace KParts
T::tqstaticMetaObject()->className(),
args );
- T *result = dynamic_cast<T *>( object );
+ T *result = dynamic_cast<T *>( static_cast<TQT_BASE_OBJECT_NAME*>(object) );
if ( !result )
delete object;
return result;
diff --git a/kstyles/light/lightstyle-v2.cpp b/kstyles/light/lightstyle-v2.cpp
index 94ba6c058..133b309d4 100644
--- a/kstyles/light/lightstyle-v2.cpp
+++ b/kstyles/light/lightstyle-v2.cpp
@@ -1586,10 +1586,10 @@ TQSize LightStyleV2::tqsizeFromContents( ContentsType contents,
return ret;
}
-int LightStyleV2::tqstyleHint( StyleHint stylehint,
+int LightStyleV2::tqstyleHint( TQ_StyleHint stylehint,
const TQWidget *widget,
const TQStyleOption &option,
- QStyleHintReturn* returnData ) const
+ TQStyleHintReturn* returnData ) const
{
int ret;
diff --git a/kstyles/light/lightstyle-v2.h b/kstyles/light/lightstyle-v2.h
index 83a5f46f1..9b54e5427 100644
--- a/kstyles/light/lightstyle-v2.h
+++ b/kstyles/light/lightstyle-v2.h
@@ -72,9 +72,9 @@ public:
TQSize tqsizeFromContents(ContentsType, const TQWidget *, const TQSize &,
const TQStyleOption & = TQStyleOption::Default ) const;
- int tqstyleHint(StyleHint, const TQWidget * = 0,
+ int tqstyleHint(TQ_StyleHint, const TQWidget * = 0,
const TQStyleOption & = TQStyleOption::Default,
- QStyleHintReturn * = 0 ) const;
+ TQStyleHintReturn * = 0 ) const;
TQPixmap stylePixmap( StylePixmap stylepixmap,
const TQWidget* widget = 0,
diff --git a/kstyles/light/lightstyle-v3.cpp b/kstyles/light/lightstyle-v3.cpp
index b05517248..98e5c555d 100644
--- a/kstyles/light/lightstyle-v3.cpp
+++ b/kstyles/light/lightstyle-v3.cpp
@@ -1817,10 +1817,10 @@ TQSize LightStyleV3::tqsizeFromContents( ContentsType contents,
return ret;
}
-int LightStyleV3::tqstyleHint( StyleHint stylehint,
+int LightStyleV3::tqstyleHint( TQ_StyleHint stylehint,
const TQWidget *widget,
const TQStyleOption &option,
- QStyleHintReturn* returnData ) const
+ TQStyleHintReturn* returnData ) const
{
int ret;
diff --git a/kstyles/light/lightstyle-v3.h b/kstyles/light/lightstyle-v3.h
index 2bc7b65a5..a76279bfa 100644
--- a/kstyles/light/lightstyle-v3.h
+++ b/kstyles/light/lightstyle-v3.h
@@ -76,9 +76,9 @@ public:
TQSize tqsizeFromContents(ContentsType, const TQWidget *, const TQSize &,
const TQStyleOption & = TQStyleOption::Default ) const;
- int tqstyleHint(StyleHint, const TQWidget * = 0,
+ int tqstyleHint(TQ_StyleHint, const TQWidget * = 0,
const TQStyleOption & = TQStyleOption::Default,
- QStyleHintReturn * = 0 ) const;
+ TQStyleHintReturn * = 0 ) const;
TQPixmap stylePixmap( StylePixmap stylepixmap,
const TQWidget* widget = 0,
diff --git a/kstyles/plastik/plastik.cpp b/kstyles/plastik/plastik.cpp
index dcc826819..1b5f68596 100644
--- a/kstyles/plastik/plastik.cpp
+++ b/kstyles/plastik/plastik.cpp
@@ -3433,10 +3433,10 @@ TQSize PlastikStyle::tqsizeFromContents(ContentsType t,
return KStyle::tqsizeFromContents (t, widget, s, opt);
}
-int PlastikStyle::tqstyleHint( StyleHint stylehint,
+int PlastikStyle::tqstyleHint( TQ_StyleHint stylehint,
const TQWidget *widget,
const TQStyleOption &option,
- QStyleHintReturn* returnData ) const
+ TQStyleHintReturn* returnData ) const
{
switch (stylehint) {
case SH_PopupMenu_SubMenuPopupDelay:
diff --git a/kstyles/plastik/plastik.h b/kstyles/plastik/plastik.h
index 45e734aef..6fa325db9 100644
--- a/kstyles/plastik/plastik.h
+++ b/kstyles/plastik/plastik.h
@@ -123,9 +123,9 @@ public:
const TQSize &s,
const TQStyleOption &o) const;
- int tqstyleHint(StyleHint, const TQWidget * = 0,
+ int tqstyleHint(TQ_StyleHint, const TQWidget * = 0,
const TQStyleOption & = TQStyleOption::Default,
- QStyleHintReturn * = 0 ) const;
+ TQStyleHintReturn * = 0 ) const;
protected:
enum TabPosition
diff --git a/kutils/kcmultidialog.cpp b/kutils/kcmultidialog.cpp
index 3efdbf5b8..d9ea63d9e 100644
--- a/kutils/kcmultidialog.cpp
+++ b/kutils/kcmultidialog.cpp
@@ -358,8 +358,7 @@ void KCMultiDialog::slotAboutToShow(TQWidget *page)
if( ! obj )
return;
- KCModuleProxy * module = ( KCModuleProxy* )obj->qt_cast(
- "KCModuleProxy" );
+ KCModuleProxy * module = ::tqqt_cast<KCModuleProxy*>(obj);
if( ! module )
return;
d->currentModule = module;
diff --git a/kutils/kfinddialog.cpp b/kutils/kfinddialog.cpp
index bd5401c06..d27a50ff8 100644
--- a/kutils/kfinddialog.cpp
+++ b/kutils/kfinddialog.cpp
@@ -429,7 +429,7 @@ void KFindDialog::showPatterns()
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 );
iface->setRegExp( pattern() );
diff --git a/kutils/kpluginselector.cpp b/kutils/kpluginselector.cpp
index a9ff9db9b..81e158c67 100644
--- a/kutils/kpluginselector.cpp
+++ b/kutils/kpluginselector.cpp
@@ -696,8 +696,7 @@ void KPluginSelector::defaults()
// tabwidget - defaults() will be called for all of them)
TQWidget * pluginconfig = d->widgetstack->visibleWidget();
- KCModuleProxy * kcm = ( KCModuleProxy* )pluginconfig->qt_cast(
- "KCModuleProxy" );
+ KCModuleProxy * kcm = ::tqqt_cast<KCModuleProxy*>(pluginconfig);
if( kcm )
{
kdDebug( 702 ) << "call KCModule::defaults() for the plugins KCM"