diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-05-07 13:45:40 -0500 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-05-08 01:41:06 +0200 |
commit | 02454576e0020f3a04c353da8d0565980ff53916 (patch) | |
tree | 16b90b508ed82a8c55daad9e3a199c3f50b90818 /khtml/khtml_part.cpp | |
parent | 9d350bb482428492455a6e00b1af3b1819ce615a (diff) | |
download | tdelibs-02454576e0020f3a04c353da8d0565980ff53916.tar.gz tdelibs-02454576e0020f3a04c353da8d0565980ff53916.zip |
Fix slot warnings when no partManager is available
This resolves the remainder of Bug 1088
(cherry picked from commit ecaf622512756000f3abf9687a0f3bfbadd8c75d)
Diffstat (limited to 'khtml/khtml_part.cpp')
-rw-r--r-- | khtml/khtml_part.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/khtml/khtml_part.cpp b/khtml/khtml_part.cpp index 2fecf6c78..4f0a8c232 100644 --- a/khtml/khtml_part.cpp +++ b/khtml/khtml_part.cpp @@ -1429,8 +1429,10 @@ void KHTMLPart::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 KHTMLPart::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 KHTMLPart::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 ); } } |