summaryrefslogtreecommitdiffstats
path: root/interfaces/ktexteditor
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-31 06:26:14 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-31 06:26:14 +0000
commitf007f85c4dc9ed297291c2a209bba73663ecd37b (patch)
treeaf24a01bffa79a5d2006320aed4a3aab0895a8f2 /interfaces/ktexteditor
parentc6ea5f2c665bbc4b9c512d3d1fee3a7b58040f5d (diff)
downloadtdelibs-f007f85c4dc9ed297291c2a209bba73663ecd37b.tar.gz
tdelibs-f007f85c4dc9ed297291c2a209bba73663ecd37b.zip
Convert qt_cast() to ::qt_cast<>
This should fix some random segfaults It needs to be tested to make sure that interfaces still work, e.g. kate/kwrite interfaces in interface/ktexteditor git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1218078 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'interfaces/ktexteditor')
-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
27 files changed, 33 insertions, 33 deletions
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);
}