[Kstars-devel] KDE/kdeedu/kstars/kstars

Akarsh Simha akarshsimha at gmail.com
Sun Oct 4 01:05:55 CEST 2009


SVN commit 1031088 by asimha:

Fixing crash that would occur if the image did not download
successfully upon clicking on the image links in the context menu of
objects.

This bug was discovered by Vignesh Raju and Sivaramakrishnan and the
patch was submitted by Sivaramakrishnan along with a lot of help from
maelcum. Thanks a lot, Vignesh, Siva and maelcum!

Congratulations on your first patch, Siva! May it be the first of
many.

CCMAIL: kstars-devel at kde.org



 M  +5 -9      imageviewer.cpp  
 M  +0 -2      imageviewer.h  


--- trunk/KDE/kdeedu/kstars/kstars/imageviewer.cpp #1031087:1031088
@@ -174,8 +174,8 @@
     if ( job->error() )
     {
       static_cast<KIO::Job*>(job)->ui()->showErrorMessage();
-        closeEvent (0);
-        return;		// exit this function
+	close();        
+	return;		// exit this function
     }
 
     file.close(); // to get the newest information from the file and not any information from opening of the file
@@ -185,7 +185,7 @@
         showImage();
         return;
     }
-    closeEvent (0);
+    close();
 }
 
 void ImageViewer::showImage()
@@ -195,8 +195,8 @@
     {
         QString text = i18n ("Loading of the image %1 failed.", m_ImageUrl.prettyUrl());
         KMessageBox::error (this, text);
-        closeEvent (0);
-        return;
+        close();
+	return;
     }
     fileIsImage = true;	// we loaded the file and know now, that it is an image
 
@@ -266,10 +266,6 @@
     }
 }
 
-void ImageViewer::close() {
-    closeEvent(0);
-}
-
 void ImageViewer::checkJob() {
     if ( downloadJob ) {  // if download job is running
         downloadJob->kill( KJob::Quietly );  // close job quietly, without emitting a result
--- trunk/KDE/kdeedu/kstars/kstars/imageviewer.h #1031087:1031088
@@ -103,8 +103,6 @@
     /**Saves. File. To. Disc. */
     void saveFileToDisc( void );
 
-    /**Close the window.*/
-    void close( void );
 };
 
 #endif


More information about the Kstars-devel mailing list