[KBear-cvs] kbear/kbear kbearmainwindow.cpp,1.45,1.46
Brought to you by:
kbjorn
From: <fri...@us...> - 2003-10-08 20:44:48
|
Update of /cvsroot/kbear/kbear/kbear In directory sc8-pr-cvs1:/tmp/cvs-serv23876/kbear Modified Files: kbearmainwindow.cpp Log Message: Fixed bug that caused KBear to crash on shutdown. Index: kbearmainwindow.cpp =================================================================== RCS file: /cvsroot/kbear/kbear/kbear/kbearmainwindow.cpp,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** kbearmainwindow.cpp 6 Jul 2003 21:21:40 -0000 1.45 --- kbearmainwindow.cpp 8 Oct 2003 20:44:42 -0000 1.46 *************** *** 59,63 **** //----------------------------------------------- KBearMainWindow::KBearMainWindow() ! : KMdiMainFrm( 0L, "KBear",WDestructiveClose | WStyle_ContextHelp ), m_viewLocal( 0L ), m_viewLocalCaption( i18n("Your Local File System" ) ), --- 59,63 ---- //----------------------------------------------- KBearMainWindow::KBearMainWindow() ! : KMdiMainFrm( 0L, "KBear", KMdi::ChildframeMode, WDestructiveClose | WStyle_ContextHelp ), m_viewLocal( 0L ), m_viewLocalCaption( i18n("Your Local File System" ) ), *************** *** 86,90 **** //----------------------------------------------- KBearMainWindow::~KBearMainWindow() { ! delete m_shared; } //----------------------------------------------- --- 86,90 ---- //----------------------------------------------- KBearMainWindow::~KBearMainWindow() { ! m_shared->deleteLater(); } //----------------------------------------------- *************** *** 150,154 **** if( m_isClosing ) return true; ! QTimer::singleShot( 0, API::getInstance()->core(), SLOT( requestShutDown() ) ); return false; --- 150,154 ---- if( m_isClosing ) return true; ! QTimer::singleShot( 0, API::getInstance()->core(), SLOT( requestShutDown() ) ); return false; *************** *** 200,204 **** m_childViewMap.insert( pMDICover, w ); ! unsigned int mdiFlags = KMdi::StandardAdd | KMdi::UseQextMDISizeHint; addWindow( pMDICover, mdiFlags ); --- 200,204 ---- m_childViewMap.insert( pMDICover, w ); ! unsigned int mdiFlags = KMdi::StandardAdd | KMdi::UseKMdiSizeHint; addWindow( pMDICover, mdiFlags ); *************** *** 222,226 **** QTimer::singleShot( 0, this , SLOT( switchToChildframeMode() ) ); else if( mdiMode() == KMdi::ToplevelMode && m_rememberTopLevelChildPos ) ! readTopChildPositionFromIndex( m_pWinList->count() - 1 ); return w; --- 222,226 ---- QTimer::singleShot( 0, this , SLOT( switchToChildframeMode() ) ); else if( mdiMode() == KMdi::ToplevelMode && m_rememberTopLevelChildPos ) ! readTopChildPositionFromIndex( m_pDocumentViews->count() - 1 ); return w; *************** *** 403,408 **** m_childViewLocal->show(); ! m_pWinList->remove( m_childViewLocal ); ! m_pWinList->prepend( m_childViewLocal ); // we always want the local view to be the first in list activateView( m_childViewLocal ); } --- 403,408 ---- m_childViewLocal->show(); ! m_pDocumentViews->remove( m_childViewLocal ); ! m_pDocumentViews->prepend( m_childViewLocal ); // we always want the local view to be the first in list activateView( m_childViewLocal ); } *************** *** 494,498 **** m_pWindowMenu = static_cast<QPopupMenu*>(guiFactory()->container("window", this)); bool bTabPageMode = (m_mdiMode == KMdi::TabPageMode); ! bool bNoViewOpened = m_pWinList->isEmpty(); action("window_close")->setEnabled( ! bNoViewOpened ); action("window_close_all")->setEnabled( ! bNoViewOpened ); --- 494,498 ---- m_pWindowMenu = static_cast<QPopupMenu*>(guiFactory()->container("window", this)); bool bTabPageMode = (m_mdiMode == KMdi::TabPageMode); ! bool bNoViewOpened = m_pDocumentViews->isEmpty(); action("window_close")->setEnabled( ! bNoViewOpened ); action("window_close_all")->setEnabled( ! bNoViewOpened ); *************** *** 512,516 **** int i = 100; KMdiChildView* pView = 0L; ! QPtrListIterator<KMdiChildView> it(*m_pWinList); --- 512,516 ---- int i = 100; KMdiChildView* pView = 0L; ! QPtrListIterator<KMdiChildView> it(*m_pDocumentViews); *************** *** 783,787 **** config->setGroup( "View Options" ); ! for( KMdiChildView* w = m_pWinList->first(); w; w = m_pWinList->next() ) { QRect rect = w->restoreGeometry(); topChildPositions.append( rect.x() ); --- 783,787 ---- config->setGroup( "View Options" ); ! for( KMdiChildView* w = m_pDocumentViews->first(); w; w = m_pDocumentViews->next() ) { QRect rect = w->restoreGeometry(); topChildPositions.append( rect.x() ); *************** *** 801,805 **** topChildPositions = config->readIntListEntry( QString::fromLatin1("Toplevel Child Positions") ); ! KMdiChildView* child = dynamic_cast<KMdiChildView*>( m_pWinList->at(index) ); if( child ) { --- 801,805 ---- topChildPositions = config->readIntListEntry( QString::fromLatin1("Toplevel Child Positions") ); ! KMdiChildView* child = dynamic_cast<KMdiChildView*>( m_pDocumentViews->at(index) ); if( child ) { *************** *** 817,821 **** //----------------------------------------------- void KBearMainWindow::readAllTopChildPositions() { ! for( unsigned int i = 0; i < m_pWinList->count(); ++i ) readTopChildPositionFromIndex( i ); } --- 817,821 ---- //----------------------------------------------- void KBearMainWindow::readAllTopChildPositions() { ! for( unsigned int i = 0; i < m_pDocumentViews->count(); ++i ) readTopChildPositionFromIndex( i ); } |