Skip to content
Permalink
Browse files

message log: fix crash on exit

  • Loading branch information
jef-n committed May 25, 2012
1 parent b8bf86b commit d208b29c22c0041a859b7db1bd7f6de2b984c341
Showing with 7 additions and 0 deletions.
  1. +6 −0 src/gui/qgsmessagelogviewer.cpp
  2. +1 −0 src/gui/qgsmessagelogviewer.h
@@ -60,6 +60,7 @@ QgsMessageLogViewer::QgsMessageLogViewer( QStatusBar *statusBar, QWidget *parent
mButton->setCheckable( true );
mButton->hide();
connect( mButton, SIGNAL( toggled( bool ) ), this, SLOT( buttonToggled( bool ) ) );
connect( mButton, SIGNAL( destroyed() ), this, SLOT( buttonDestroyed() ) );
statusBar->addPermanentWidget( mButton, 0 );
}

@@ -100,6 +101,11 @@ void QgsMessageLogViewer::buttonToggled( bool checked )
w->hide();
}

void QgsMessageLogViewer::buttonDestroyed()
{
mButton = 0;
}

void QgsMessageLogViewer::logMessage( QString message, QString tag, int level )
{
mButton->setToolTip( tr( "%1 message(s) logged." ).arg( mCount++ ) );
@@ -52,6 +52,7 @@ class GUI_EXPORT QgsMessageLogViewer: public QDialog, private Ui::QgsMessageLogV
private slots:
void closeTab( int index );
void buttonToggled( bool checked );
void buttonDestroyed();
};

#endif

0 comments on commit d208b29

Please sign in to comment.
You can’t perform that action at this time.