Browse Source

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
tags/v3.5.13
tpearson 9 years ago
parent
commit
f007f85c4d
61 changed files with 120 additions and 125 deletions
  1. +1
    -1
      interfaces/khexedit/byteseditinterface.h
  2. +1
    -1
      interfaces/khexedit/charcolumninterface.h
  3. +1
    -1
      interfaces/khexedit/clipboardinterface.h
  4. +1
    -1
      interfaces/khexedit/valuecolumninterface.h
  5. +1
    -1
      interfaces/khexedit/zoominterface.h
  6. +2
    -2
      interfaces/kregexpeditor/kregexpeditorinterface.h
  7. +1
    -1
      interfaces/ktexteditor/blockselectioninterface.cpp
  8. +1
    -1
      interfaces/ktexteditor/clipboardinterface.cpp
  9. +1
    -1
      interfaces/ktexteditor/codecompletioninterface.cpp
  10. +2
    -2
      interfaces/ktexteditor/configinterface.cpp
  11. +2
    -2
      interfaces/ktexteditor/configinterfaceextension.cpp
  12. +1
    -1
      interfaces/ktexteditor/cursorinterface.cpp
  13. +1
    -1
      interfaces/ktexteditor/dynwordwrapinterface.cpp
  14. +1
    -1
      interfaces/ktexteditor/editinterface.cpp
  15. +1
    -1
      interfaces/ktexteditor/editinterfaceext.cpp
  16. +1
    -1
      interfaces/ktexteditor/encodinginterface.cpp
  17. +1
    -1
      interfaces/ktexteditor/highlightinginterface.cpp
  18. +1
    -1
      interfaces/ktexteditor/ktexteditor.cpp
  19. +1
    -1
      interfaces/ktexteditor/markinterface.cpp
  20. +1
    -1
      interfaces/ktexteditor/markinterfaceextension.cpp
  21. +1
    -1
      interfaces/ktexteditor/popupmenuinterface.cpp
  22. +1
    -1
      interfaces/ktexteditor/printinterface.cpp
  23. +1
    -1
      interfaces/ktexteditor/searchinterface.cpp
  24. +2
    -2
      interfaces/ktexteditor/selectioninterface.cpp
  25. +2
    -2
      interfaces/ktexteditor/selectioninterfaceext.cpp
  26. +3
    -3
      interfaces/ktexteditor/sessionconfiginterface.cpp
  27. +1
    -1
      interfaces/ktexteditor/templateinterface.cpp
  28. +1
    -1
      interfaces/ktexteditor/texthintinterface.cpp
  29. +1
    -1
      interfaces/ktexteditor/undointerface.cpp
  30. +1
    -1
      interfaces/ktexteditor/variableinterface.cpp
  31. +1
    -1
      interfaces/ktexteditor/viewcursorinterface.cpp
  32. +1
    -1
      interfaces/ktexteditor/viewstatusmsginterface.cpp
  33. +1
    -1
      interfaces/ktexteditor/wordwrapinterface.cpp
  34. +2
    -2
      interfaces/terminal/kde_terminal_interface.h
  35. +3
    -3
      interfaces/terminal/test/main.cc
  36. +3
    -3
      kate/interfaces/interfaces.cpp
  37. +1
    -2
      kate/plugins/autobookmarker/autobookmarker.cpp
  38. +2
    -1
      kdecore/kaccelmanager.cpp
  39. +2
    -2
      kdecore/kgenericfactory.tcc
  40. +1
    -1
      kdecore/kkeynative_x11.cpp
  41. +2
    -2
      kdecore/kkeyserver_x11.cpp
  42. +2
    -2
      kdefx/kstyle.cpp
  43. +2
    -2
      kdefx/kstyle.h
  44. +9
    -9
      kdeui/kdockwidget.cpp
  45. +2
    -2
      kdeui/tests/kdockwidgettest.cpp
  46. +12
    -14
      kmdi/kmdi/dockcontainer.cpp
  47. +2
    -2
      kmdi/kmdi/guiclient.cpp
  48. +4
    -4
      kmdi/kmdi/mainwindow.cpp
  49. +9
    -10
      kmdi/kmdidockcontainer.cpp
  50. +2
    -2
      kmdi/kmdiguiclient.cpp
  51. +4
    -4
      kmdi/kmdimainfrm.cpp
  52. +1
    -1
      kparts/componentfactory.h
  53. +2
    -2
      kstyles/light/lightstyle-v2.cpp
  54. +2
    -2
      kstyles/light/lightstyle-v2.h
  55. +2
    -2
      kstyles/light/lightstyle-v3.cpp
  56. +2
    -2
      kstyles/light/lightstyle-v3.h
  57. +2
    -2
      kstyles/plastik/plastik.cpp
  58. +2
    -2
      kstyles/plastik/plastik.h
  59. +1
    -2
      kutils/kcmultidialog.cpp
  60. +1
    -1
      kutils/kfinddialog.cpp
  61. +1
    -2
      kutils/kpluginselector.cpp

+ 1
- 1
interfaces/khexedit/byteseditinterface.h View File

@@ -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[])


+ 1
- 1
interfaces/khexedit/charcolumninterface.h View File

@@ -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 );
}

}


+ 1
- 1
interfaces/khexedit/clipboardinterface.h View File

@@ -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 );
}

}


+ 1
- 1
interfaces/khexedit/valuecolumninterface.h View File

@@ -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 );
}

}


+ 1
- 1
interfaces/khexedit/zoominterface.h View File

@@ -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 );
}

}


+ 2
- 2
interfaces/kregexpeditor/kregexpeditorinterface.h View File

@@ -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.


+ 1
- 1
interfaces/ktexteditor/blockselectioninterface.cpp View File

@@ -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);
}

+ 1
- 1
interfaces/ktexteditor/clipboardinterface.cpp View File

@@ -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);
}

+ 1
- 1
interfaces/ktexteditor/codecompletioninterface.cpp View File

@@ -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);
}



+ 2
- 2
interfaces/ktexteditor/configinterface.cpp View File

@@ -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);
}

+ 2
- 2
interfaces/ktexteditor/configinterfaceextension.cpp View File

@@ -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);
}

+ 1
- 1
interfaces/ktexteditor/cursorinterface.cpp View File

@@ -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);
}

+ 1
- 1
interfaces/ktexteditor/dynwordwrapinterface.cpp View File

@@ -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);
}

+ 1
- 1
interfaces/ktexteditor/editinterface.cpp View File

@@ -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);
}

+ 1
- 1
interfaces/ktexteditor/editinterfaceext.cpp View File

@@ -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);
}


+ 1
- 1
interfaces/ktexteditor/encodinginterface.cpp View File

@@ -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);
}

+ 1
- 1
interfaces/ktexteditor/highlightinginterface.cpp View File

@@ -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);
}

+ 1
- 1
interfaces/ktexteditor/ktexteditor.cpp View File

@@ -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);
}


+ 1
- 1
interfaces/ktexteditor/markinterface.cpp View File

@@ -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()


+ 1
- 1
interfaces/ktexteditor/markinterfaceextension.cpp View File

@@ -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);
}

+ 1
- 1
interfaces/ktexteditor/popupmenuinterface.cpp View File

@@ -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);
}

+ 1
- 1
interfaces/ktexteditor/printinterface.cpp View File

@@ -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);
}

+ 1
- 1
interfaces/ktexteditor/searchinterface.cpp View File

@@ -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);
}

+ 2
- 2
interfaces/ktexteditor/selectioninterface.cpp View File

@@ -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);
}


+ 2
- 2
interfaces/ktexteditor/selectioninterfaceext.cpp View File

@@ -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


+ 3
- 3
interfaces/ktexteditor/sessionconfiginterface.cpp View File

@@ -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);
}

+ 1
- 1
interfaces/ktexteditor/templateinterface.cpp View File

@@ -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 );
}


+ 1
- 1
interfaces/ktexteditor/texthintinterface.cpp View File

@@ -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);
}




+ 1
- 1
interfaces/ktexteditor/undointerface.cpp View File

@@ -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);
}

+ 1
- 1
interfaces/ktexteditor/variableinterface.cpp View File

@@ -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);
}

+ 1
- 1
interfaces/ktexteditor/viewcursorinterface.cpp View File

@@ -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);
}

+ 1
- 1
interfaces/ktexteditor/viewstatusmsginterface.cpp View File

@@ -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);
}

+ 1
- 1
interfaces/ktexteditor/wordwrapinterface.cpp View File

@@ -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);
}

+ 2
- 2
interfaces/terminal/kde_terminal_interface.h View File

@@ -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


+ 3
- 3
interfaces/terminal/test/main.cc View File

@@ -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" );


+ 3
- 3
kate/interfaces/interfaces.cpp View File

@@ -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);
}

}

+ 1
- 2
kate/plugins/autobookmarker/autobookmarker.cpp View File

@@ -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();


+ 2
- 1
kdecore/kaccelmanager.cpp View File

@@ -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


+ 2
- 2
kdecore/kgenericfactory.tcc View File

@@ -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 );


+ 1
- 1
kdecore/kkeynative_x11.cpp View File

@@ -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;


+ 2
- 2
kdecore/kkeyserver_x11.cpp View File

@@ -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 )


+ 2
- 2
kdefx/kstyle.cpp View File

@@ -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)
{


+ 2
- 2
kdefx/kstyle.h View File

@@ -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 );


+ 9
- 9
kdeui/kdockwidget.cpp View File

@@ -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;


+ 2
- 2
kdeui/tests/kdockwidgettest.cpp View File

@@ -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");
/*****************************************************/




+ 12
- 14
kmdi/kmdi/dockcontainer.cpp View File

@@ -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 );
}


+ 2
- 2
kmdi/kmdi/guiclient.cpp View File

@@ -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);
}



+ 4
- 4
kmdi/kmdi/mainwindow.cpp View File

@@ -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;


+ 9
- 10
kmdi/kmdidockcontainer.cpp View File

@@ -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 );
}


+ 2
- 2
kmdi/kmdiguiclient.cpp View File

@@ -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 );
}



+ 4
- 4
kmdi/kmdimainfrm.cpp View File

@@ -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 );
}


+ 1
- 1
kparts/componentfactory.h View File

@@ -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;


+ 2
- 2
kstyles/light/lightstyle-v2.cpp View File

@@ -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;



+ 2
- 2
kstyles/light/lightstyle-v2.h View File

@@ -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,


+ 2
- 2
kstyles/light/lightstyle-v3.cpp View File

@@ -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;



+ 2
- 2
kstyles/light/lightstyle-v3.h View File

@@ -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,


+ 2
- 2
kstyles/plastik/plastik.cpp View File

@@ -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:


+ 2
- 2
kstyles/plastik/plastik.h View File

@@ -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


+ 1
- 2
kutils/kcmultidialog.cpp View File

@@ -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;


+ 1
- 1
kutils/kfinddialog.cpp View File

@@ -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() );


+ 1
- 2
kutils/kpluginselector.cpp View File

@@ -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"


Loading…
Cancel
Save