From ecaf622512756000f3abf9687a0f3bfbadd8c75d Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 7 May 2013 13:45:40 -0500 Subject: Fix slot warnings when no partManager is available This resolves the remainder of Bug 1088 --- tdehtml/tdehtml_part.cpp | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'tdehtml/tdehtml_part.cpp') diff --git a/tdehtml/tdehtml_part.cpp b/tdehtml/tdehtml_part.cpp index 28b15c7d1..b0a075e99 100644 --- a/tdehtml/tdehtml_part.cpp +++ b/tdehtml/tdehtml_part.cpp @@ -1429,8 +1429,10 @@ void TDEHTMLPart::clear() d->m_decoder = 0; // We don't want to change between parts if we are going to delete all of them anyway - disconnect( partManager(), TQT_SIGNAL( activePartChanged( KParts::Part * ) ), + if (partManager()) { + disconnect( partManager(), TQT_SIGNAL( activePartChanged( KParts::Part * ) ), this, TQT_SLOT( slotActiveFrameChanged( KParts::Part * ) ) ); + } if (d->m_frames.count()) { @@ -1462,8 +1464,10 @@ void TDEHTMLPart::clear() } // Listen to part changes again - connect( partManager(), TQT_SIGNAL( activePartChanged( KParts::Part * ) ), + if (partManager()) { + connect( partManager(), TQT_SIGNAL( activePartChanged( KParts::Part * ) ), this, TQT_SLOT( slotActiveFrameChanged( KParts::Part * ) ) ); + } d->m_delayRedirect = 0; d->m_redirectURL = TQString(); @@ -5593,14 +5597,16 @@ void TDEHTMLPart::restoreState( TQDataStream &stream ) if ( (*childFrame)->m_part ) { - if ( (*childFrame)->m_extension ) - if ( (*childFrame)->m_extension && !(*fBufferIt).isEmpty() ) - { - TQDataStream frameStream( *fBufferIt, IO_ReadOnly ); - (*childFrame)->m_extension->restoreState( frameStream ); + if ( (*childFrame)->m_extension ) { + if ( (*childFrame)->m_extension && !(*fBufferIt).isEmpty() ) + { + TQDataStream frameStream( *fBufferIt, IO_ReadOnly ); + (*childFrame)->m_extension->restoreState( frameStream ); + } + else { + (*childFrame)->m_part->openURL( *fURLIt ); + } } - else - (*childFrame)->m_part->openURL( *fURLIt ); } } -- cgit v1.2.1