[Digikam-devel] [Bug 132081] New: Critical: ShowFoto silently aborts saving image when closed

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 132081] New: Critical: ShowFoto silently aborts saving image when closed

Dik Takken
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=132081         
           Summary: Critical: ShowFoto silently aborts saving image when
                    closed
           Product: showfoto
           Version: unspecified
          Platform: unspecified
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: digikam-devel kde org
        ReportedBy: d.h.j.takken phys uu nl


Version:           0.4.0 (using KDE KDE 3.5.3)
OS:                Linux

When you hit the 'save' button and close ShowFoto, the image is not always saved. The save operation is aborted when the user closes the application before the save is complete.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 132081] Critical: ShowFoto silently aborts saving image when closed

Marcel Wiesweg
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=132081         




------- Additional Comments From marcel.wiesweg gmx de  2006-08-08 23:57 -------
SVN commit 571245 by mwiesweg:

First part of a fix: Properly delete thread.

CCBUG: 132081


 M  +1 -0      dimginterface.cpp  


--- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/dimginterface.cpp #571244:571245
 @ -167,6 +167,7  @
 DImgInterface::~DImgInterface()
 {
     delete d->undoMan;
+    delete d->thread;
     delete d;
     m_instance = 0;
 }
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 132081] Critical: ShowFoto silently aborts saving image when closed

Marcel Wiesweg
In reply to this post by Dik Takken
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=132081         




------- Additional Comments From marcel.wiesweg gmx de  2006-08-09 23:17 -------
SVN commit 571560 by mwiesweg:

When a save operation is runnnig, wait, show a message box and enter a loop.

- it would be better if the dialog shown does not have a OK button,
  but queuedMessageBox comes in very handy
- fix still missing for ImageWindow (IE), interfering with other local changes here

CCBUG: 132081



 M  +4 -0      showfoto/showfoto.cpp  
 M  +21 -2     utilities/imageeditor/editor/editorwindow.cpp  
 M  +1 -0      utilities/imageeditor/editor/editorwindow.h  


--- trunk/extragear/graphics/digikam/showfoto/showfoto.cpp #571559:571560
 @ -217,6 +217,10  @
     if (!e)
         return;
 
+    // wait if a save operation is currently running
+    if (!waitForSavingToComplete())
+        return;
+
     if (m_currentItem && !promptUserSave(m_currentItem->url()))
         return;
 
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/editorwindow.cpp #571559:571560
 @ -257,7 +257,7  @
                                     actionCollection(), "editorwindow_print");
 
     m_fileDeleteAction = new KAction(i18n("Delete File"), "editdelete",
-                                     SHIFT+Key_Delete,
+                                     Key_Delete,
                                      this, SLOT(slotDeleteCurrentItem()),
                                      actionCollection(), "editorwindow_delete");
 
 @ -1025,7 +1025,7  @
             // In this case, do not call enter_loop because exit_loop will not be called.
             if (saving)
             {
-                // Waiting asynchronous image file saving operation runing in separate thread.
+                // Waiting for asynchronous image file saving operation runing in separate thread.
                 m_savingContext->synchronizingState = SavingContextContainer::SynchronousSaving;
                 enter_loop();
                 m_savingContext->synchronizingState = SavingContextContainer::NormalSaving;
 @ -1050,6 +1050,25  @
     return true;
 }
 
+bool EditorWindow::waitForSavingToComplete()
+{
+    // avoid reentrancy - return false means we have reentered the loop already.
+    if (m_savingContext->synchronizingState == SavingContextContainer::SynchronousSaving)
+        return false;
+
+    if (m_savingContext->savingState != SavingContextContainer::SavingStateNone)
+    {
+        // Waiting for asynchronous image file saving operation runing in separate thread.
+        m_savingContext->synchronizingState = SavingContextContainer::SynchronousSaving;
+        KMessageBox::queuedMessageBox(this,
+                                      KMessageBox::Information,
+                                      i18n("Please wait while the image is being saved..."));
+        enter_loop();
+        m_savingContext->synchronizingState = SavingContextContainer::NormalSaving;
+    }
+    return true;
+}
+
 void EditorWindow::enter_loop()
 {
     QWidget dummy(0, 0, WType_Dialog | WShowModal);
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/editorwindow.h #571559:571560
 @ -126,6 +126,7  @
     void loadImagePlugins();
 
     bool promptUserSave(const KURL& url);
+    bool waitForSavingToComplete();
     void startingSave(const KURL& url);
     bool startingSaveAs(const KURL& url);
     bool checkPermissions(const KURL& url);
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] [Bug 132081] Critical: ShowFoto silently aborts saving image when closed

Marcel Wiesweg
In reply to this post by Dik Takken
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=132081         
marcel.wiesweg gmx de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From marcel.wiesweg gmx de  2006-08-13 14:52 -------
SVN commit 572636 by mwiesweg:

Wait for saving to complete in ImageWindow as well

BUG: 132081


 M  +4 -0      imagewindow.cpp  


--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/imagewindow.cpp #572635:572636
 @ -161,6 +161,10  @
     if (!e)
         return;
 
+    // wait if a save operation is currently running
+    if (!waitForSavingToComplete())
+        return;
+
     if (!promptUserSave(m_urlCurrent))
         return;
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel