Commit 0bcc3c6f authored by Andreas Kling's avatar Andreas Kling

Don't crash with more than one status bar.

BUG: 103457

svn path=/trunk/extragear/utils/filelight/; revision=567466
parent a617755d
......@@ -177,13 +177,11 @@ Part::createAboutData()
bool
Part::start( const KURL &url )
{
static bool b = true; //FIXME do this better! :)
if( b ) {
if( !m_started ) {
m_statusbar->addStatusBarItem( new ProgressBox( statusBar(), this ), 0, true );
connect( m_map, SIGNAL(mouseHover( const QString& )), statusBar(), SLOT(message( const QString& )) );
connect( m_map, SIGNAL(created( const Directory* )), statusBar(), SLOT(clear()) );
b = false;
m_started = true;
}
if( m_manager->start( url ) ) {
......@@ -240,7 +238,10 @@ Part::mapChanged( const Directory *tree )
emit setWindowCaption( prettyURL() );
static_cast<ProgressBox*>(statusBar()->child( "ProgressBox" ))->setText( tree->children() );
ProgressBox *progress = static_cast<ProgressBox *>(statusBar()->child( "ProgressBox" ));
if( progress )
progress->setText( tree->children() );
}
} //namespace Filelight
......
......@@ -76,6 +76,8 @@ namespace Filelight
RadialMap::Widget *m_map;
class ScanManager *m_manager;
bool m_started;
private:
bool start( const KURL& );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment