From f007f85c4dc9ed297291c2a209bba73663ecd37b Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 31 Jan 2011 06:26:14 +0000 Subject: 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 --- interfaces/terminal/kde_terminal_interface.h | 4 ++-- interfaces/terminal/test/main.cc | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'interfaces/terminal') 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 // Copyright (C) 2005 Peter Rockai @@ -60,7 +60,7 @@ class TQStrList; * setCentralWidget( p->widget() ); * * // cast the part to the TerminalInterface.. - * TerminalInterface* t = static_cast( p->qt_cast( "TerminalInterface" ) ); + * TerminalInterface* t = ::tqqt_cast( 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( factory->create( this, "tralala", "TQObject", "KParts::ReadOnlyPart" ) ); setCentralWidget( p->widget() ); - TerminalInterface* t = static_cast( p->qt_cast( "TerminalInterface" ) ); + TerminalInterface* t = ::tqqt_cast( 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(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( p->qt_cast( "TerminalInterface" ) ); + TerminalInterface* t = ::tqqt_cast( p ); TQStrList l; l.append( "echo" ); l.append( "hello world" ); -- cgit v1.2.1