-rw-r--r-- | core/launcher/launcher.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index 779fe54..87a54bf 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp @@ -331,32 +331,47 @@ void LauncherTabWidget::styleChange( QStyle & ) } void LauncherTabWidget::setProgressStyle() { if (docLoadingWidgetProgress) { docLoadingWidgetProgress->setFrameShape( QProgressBar::Box ); docLoadingWidgetProgress->setFrameShadow( QProgressBar::Plain ); docLoadingWidgetProgress->setMargin( 1 ); docLoadingWidgetProgress->setLineWidth( 1 ); } } +/* + * FIXME + * The following NULL check is triggered by inserting, then removing a tab on the fly + * as you would if you had removable media (which I do). Without this check + * the first app launched after a tab removal causes qpe to Segfault. + * This obviously has a more sinister cause, but this works around it with no + * obvious adverse effects. Please FIXME + * bkc - 17/6/2004 + * + */ + void LauncherTabWidget::setBusy(bool on) { if ( on ) currentView()->setBusy(TRUE); else { for ( int i = 0; i < categoryBar->count(); i++ ) { - LauncherView *view = ((LauncherTab *)categoryBar->tab(i))->view; - view->setBusy( FALSE ); + if (categoryBar->tab(i)) { + LauncherView *view = ((LauncherTab *)categoryBar->tab(i))->view; + view->setBusy( FALSE ); + } else { + odebug << "Averting Disaster with tab " << i << " == NULL! " << oendl; + } } } } void LauncherTabWidget::setBusyIndicatorType( const QString& str ) { for (int i = 0; i < categoryBar->count(); i++ ) { LauncherView* view = static_cast<LauncherTab*>( categoryBar->tab(i) )->view; view->setBusyIndicatorType( str ); } } LauncherView *LauncherTabWidget::currentView(void) |