Bug 259125 - kleopatra server features should be disabled
Summary: kleopatra server features should be disabled
Status: VERIFIED FIXED
Alias: None
Product: Kleopatra Mobile
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Windows CE Microsoft Windows CE
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-07 15:09 UTC by Marcus Brinkmann
Modified: 2011-02-16 09:05 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Brinkmann 2010-12-07 15:09:23 UTC
Version:           unspecified (using Devel) 
OS:                Windows CE

kleo mobile is not yet used as a server and thus should not minimze itself (or put itself in the background or whatever magic it does), because that makes kleopatra inaccessible to the user (the windows ce device does not have a status icon panel similar to windows).  If you then switch away from the kleopatra window, it disappears and can not be brought back, while kleopatra keeps running in the background.

Also, kleopatra mobile should not ask for confirmation if it should be terminated when chosing exit from the menu, because the question is not relevant for the mobile version.  And while we are at it, the location of the exit menu entry is inconsistent with the other mobile apps (but I will make a separate report on that).


Reproducible: Didn't try
Comment 1 Tobias Koenig 2011-01-04 09:49:30 UTC
commit 3c48683e0db1face527a1bd318e86f7159d38352
branch master
Author: Tobias Koenig <tokoe@kde.org>
Date:   Tue Jan 4 09:48:38 2011 +0100

    Do not ask for 'close or quit' on shutdown.
    
    In the mobile version kleopatra does not act as server, so
    we should always close the application if the user requests it.
    
    CCBUG: 259125

diff --git a/kleopatra/mainwindow_mobile.cpp b/kleopatra/mainwindow_mobile.cpp
index 030e4df..a44fe3e 100644
--- a/kleopatra/mainwindow_mobile.cpp
+++ b/kleopatra/mainwindow_mobile.cpp
@@ -189,19 +189,7 @@ public:
     }
 
     void closeAndQuit() {
-        const QString app = KGlobal::mainComponent().aboutData()->programName();
-        const int rc = KMessageBox::questionYesNoCancel( q,
-                                                         i18n("%1 may be used by other applications as a service.\n"
-                                                              "You may instead want to close this window without exiting %1.", app ),
-                                                         i18n("Really Quit?"), KStandardGuiItem_close(), KStandardGuiItem_quit(), KStandardGuiItem::cancel(),
-                                                         "really-quit-" + app.toLower() );
-        if ( rc == KMessageBox::Cancel )
-            return;
-        if ( !q->close() )
-            return;
-        // WARNING: 'this' might be deleted at this point!
-        if ( rc == KMessageBox::No )
-            qApp->quit();
+        qApp->quit();
     }
 
     void selfTest() {
Comment 2 Tobias Koenig 2011-01-04 09:51:33 UTC
I saw the automatic minimization only once, when I started kleopatra the first time on the desktop. Afterwards it was always started in fullscreen.
Is the minimized start reproducible for you?
Comment 3 Bjoern Ricks 2011-01-14 16:55:57 UTC
Haven't seen this issue ever -> closing
Marcus feel free to reopen it ;-)
Comment 4 Ludwig Reiter 2011-01-17 14:05:33 UTC
test version 20110116 git-4d1bc61

The kleopatra process is still running, after closing the program with x in the process list.

Test:
1. Start kleopatra.
2. Switch to main window.
3. open program list and close kleopatra (x button)
4. Wait for a moment.
5. Look at the process list.
=> kleopatra is still running.

Reopened
Comment 5 Tobias Koenig 2011-01-18 15:54:56 UTC
commit 254268ba5caf227360d4dc67c3c514280c41c06e
branch master
Author: Tobias Koenig <tokoe@kde.org>
Date:   Tue Jan 18 15:53:03 2011 +0100

    Shutdown kleopatra when closed via 'X' button
    
    Really close the kleopatra application on mobile
    devices when the user requested so via the 'X' button.
    
    BUG: 259125

diff --git a/kleopatra/mainwindow_mobile.cpp b/kleopatra/mainwindow_mobile.cpp
index e4cf2ab..9f47a3e 100644
--- a/kleopatra/mainwindow_mobile.cpp
+++ b/kleopatra/mainwindow_mobile.cpp
@@ -334,6 +334,9 @@ void MainWindow::Private::slotConfigCommitted() {
 }
 
 void MainWindow::closeEvent( QCloseEvent * e ) {
+
+    d->closeAndQuit();
+
     // KMainWindow::closeEvent() insists on quitting the application,
     // so do not let it touch the event...
     kDebug();
Comment 6 Marcus Brinkmann 2011-01-19 00:50:44 UTC
I have not seen any problems related to this in a while.

BTW, note that in the future kleo mobile may have a background mode and be used as a UI server.  Just so you know that the code may come back at some time, so it may have been more prudent to define it out rather than delete it.  But that's water under the bridge now...