________________________________________________________________________
r420380 | aacid | 2005_06_01 00:25:54 |0200 (Wed, 01 Jun 2005) | 2 lines

you can open files, but any try to scroll the viewport will make it crash

________________________________________________________________________
Index: core/document.cpp
===================================================================
--- core/document.cpp	(revision 420379)
+++ core/document.cpp	(working copy)
@@ -1173,6 +1173,10 @@
         while ( (pIt != pEnd) && (memoryToFree > 0) )
         {
             AllocatedPixmap * p = *pIt;
+#warning this should NOT be needed
+	    // TODO quick way to avoid crashes
+	    if (!d->observers[ p->id ]) return;
+	    
             if ( d->observers[ p->id ]->canUnloadPixmap( p->page ) )
             {
                 // update internal variables
@@ -1380,7 +1384,7 @@
         QDomElement bookmarkList = doc.createElement( "bookmarkList" );
         root.appendChild( bookmarkList );
 
-        for ( uint i = 0; i < pages_vector.count() ; i++ )
+        for ( int i = 0; i < pages_vector.count() ; i++ )
         {
             if ( pages_vector[i]->hasBookmark() )
             {
Index: core/generator_pdf/generator_pdf.cpp
===================================================================
--- core/generator_pdf/generator_pdf.cpp	(revision 420379)
+++ core/generator_pdf/generator_pdf.cpp	(working copy)
@@ -289,6 +289,7 @@
     if ( request->async )
     {
         // start the generation into the thread
+	generatorThread->wait();
         generatorThread->startGeneration( request );
         return;
     }
Index: ui/pageview.cpp
===================================================================
--- ui/pageview.cpp	(revision 420379)
+++ ui/pageview.cpp	(working copy)
@@ -434,7 +434,8 @@
     // create the screen painter. a pixel painted ar contentsX,contentsY
     // appears to the top-left corner of the scrollview.
     QPainter screenPainter( viewport() );
-    screenPainter.setClipping( true );
+// TODO seems we don't need that in Qt4
+//    screenPainter.setClipping( true );
     screenPainter.translate( -contentsX(), -contentsY() );
 
     // selectionRect is the normalized mouse selection rect
@@ -676,7 +677,7 @@
                 else
                     verticalScrollBar()->addPage();
             }
-            else if ( d->document->currentPage() < d->items.count() - 1 )
+            else if ( (int)d->document->currentPage() < d->items.count() - 1 )
             {
                 // more optmized than document->setNextPage and then move view to top
                 DocumentViewport newViewport = d->document->viewport();
@@ -1136,7 +1137,7 @@
     else if ( delta <= -120 && !Settings::viewContinuous() && vScroll == verticalScrollBar()->maxValue() )
     {
         // go to next page
-        if ( d->document->currentPage() < d->items.count() - 1 )
+        if ( (int)d->document->currentPage() < d->items.count() - 1 )
         {
             // more optmized than document->setNextPage and then move view to top
             DocumentViewport newViewport = d->document->viewport();