[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/kword/part
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2009-01-25 9:22:56
Message-ID: 1232875376.571553.3020.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 916373 by zachmann:

o Fix BUG 180759 KWord crashes when opening .ODF file.
  The probem was that the zoom handler already was connected and was
  handling events. Fixed by connecting the signals after setting up
  the status bar.

BUG: 180759



 M  +9 -6      KWView.cpp  


--- trunk/koffice/kword/part/KWView.cpp #916372:916373
@@ -109,6 +109,15 @@
     new KoFind(this, m_canvas->resourceProvider(), actionCollection());
 
     m_zoomController = new KoZoomController(m_gui->canvasController(), \
&m_zoomHandler, actionCollection()); +
+    KWStatisticsDockerFactory statisticsFactory(this);
+    KWStatisticsDocker *docker = dynamic_cast<KWStatisticsDocker \
*>(createDockWidget(&statisticsFactory)); +    if (docker && docker->view() != this) \
docker->setView(this); +
+    new KWStatusBar(statusBar(), this);
+
+    // the zoom controller needs to be initialized after the status bar gets \
initialized as  +    // that resulted in bug 180759
     m_zoomController->setPageSize(m_currentPage.rect().size());
     KoZoomMode::Modes modes = KoZoomMode::ZOOM_WIDTH;
     if (m_canvas->viewMode()->hasPages())
@@ -118,12 +127,6 @@
     m_canvas->updateSize(); // to emit the doc size at least once
     m_zoomController->setZoom(m_document->config().zoomMode(), \
                m_document->config().zoom() / 100.);
     connect(m_zoomController, SIGNAL(zoomChanged(KoZoomMode::Mode, qreal)), this, \
                SLOT(zoomChanged(KoZoomMode::Mode, qreal)));
-
-    KWStatisticsDockerFactory statisticsFactory(this);
-    KWStatisticsDocker *docker = dynamic_cast<KWStatisticsDocker \
                *>(createDockWidget(&statisticsFactory));
-    if (docker && docker->view() != this) docker->setView(this);
-
-    new KWStatusBar(statusBar(), this);
 }
 
 KWView::~KWView()


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic