[KPhotoAlbum] Please Read - Release procedure started (new snapshot)

Martin Hoeller martin at xss.co.at
Tue Mar 14 15:47:36 CET 2006


Hi!

On 13 Mär 2006, Jesper K. Pedersen wrote:

> On Monday 13 March 2006 15:09, Martin Hoeller wrote:

> | *) Also related to the search dialog is another bug: I doubt the sense of
> |    the "Image Preview" pane, as there will never be any image previewed as
> |    far as I can say. However, clicking the "x" button within the preview
> |    results an a KPhotoAlbum crash!
> Well the dialog is the same as the anotation dialog, which is why you see the 
> preview. It shouldn't crash of course, which I'll look into.

I had a look at it and fixed it by
a) protecting the access to a possible null-pointer
b) disabling the delete button in the search dialog


Here is the patch:

Index: AnnotationDialog/AnnotationDialog.cpp
===================================================================
--- AnnotationDialog/AnnotationDialog.cpp       (revision 518547)
+++ AnnotationDialog/AnnotationDialog.cpp       (working copy)
@@ -475,6 +475,7 @@
         _prevBut->setEnabled( false );
         _rotateLeft->setEnabled( false );
         _rotateRight->setEnabled( false );
+        _delBut->setEnabled( false );
     }
     else {
         _okBut->setGuiItem( KStdGuiItem::ok() );
@@ -487,6 +488,7 @@
         }
         _rotateLeft->setEnabled( true );
         _rotateRight->setEnabled( true );
+        _delBut->setEnabled( true );
     }
     for( QPtrListIterator<ListSelect> it( _optionList ); *it; ++it ) {
         (*it)->setShowMergeCheckbox( _setup == MULTIPLE || _setup == SEARCH );
@@ -712,8 +714,14 @@
     list.append( info );

     QStringList strList;
-    for( ImageInfoListConstIterator it = list.constBegin(); it != list.constEnd(); ++it )
-        strList.append( (*it)->fileName() );
+    for( ImageInfoListConstIterator it = list.constBegin(); it != list.constEnd(); ++it ) {
+        if ( *it )
+            strList.append( (*it)->fileName() );
+    }
+
+    if ( strList.isEmpty() )
+        return;
+
     int ret = dialog.exec( strList );
     if ( ret == Rejected )
         return;


hth,
- martin

-- 
    mailto:martin.hoeller at xss.co.at  | As far as we know, our computer
http://stud3.tuwien.ac.at/~e9926483  | has never had an undetected error.
                       icq:45563199  |                      -- Weisert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /mailman/pipermail/kphotoalbum/attachments/20060314/3aa34fd7/signature-0001.pgp


More information about the KPhotoAlbum mailing list