[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.1/kdelibs/kdecore/kernel
From: Rafael Fernández López <ereslibre () kde ! org>
Date: 2008-08-01 0:18:29
Message-ID: 1217549909.448739.19956.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 840379 by ereslibre:
Ooops, forgot to commit here too
M +17 -0 kglobal.h
--- branches/KDE/4.1/kdelibs/kdecore/kernel/kglobal.h #840378:840379
@@ -409,6 +409,16 @@
* "last window closed" event, but some events should outlive the last \
window closed
* (e.g. a file copy for a file manager, or 'compacting folders on \
exit' for a mail client).
*
+ * We have some use cases that we want to take care of (the format is \
"action refcount"): + * - open window -> setAllowQuit(true) 1 ; close \
window 0 => EXIT + * - job start 1; job end 0 [don't exit yet]; open \
window -> setAllowQuit(true) 1 ; close window 0 => EXIT + * - job start \
1; open window -> setAllowQuit(true) 2; close window 1; job end 0 => EXIT + \
* - job start 1; open window -> setAllowQuit(true) 2; job end 1; close \
window 0 => EXIT + * - open dialog 0; close dialog 0; => DO NOT EXIT
+ * - job start 1; job end 0; create two main objects 2; delete both \
main objects 0 => EXIT + * - open window -> setAllowQuit(true) 1; add \
systray icon 2; close window 1 => DO NOT EXIT + * - open window -> \
setAllowQuit(true) 1; add systray icon 2; remove systray icon 1; close \
window 0 => EXIT + *
* Note that for this to happen you must call \
qApp->setQuitOnLastWindowClosed(false),
* in main() for instance.
*/
@@ -421,6 +431,13 @@
KDECORE_EXPORT void deref();
/**
+ * If refcounting reaches 0 (or less), and @p allowQuit is true, the \
instance of the application + * will automatically be exited. \
Otherwise, the application will not exit automatically. + * @since 4.2
+ */
+ KDECORE_EXPORT void setAllowQuit(bool allowQuit);
+
+ /**
* The component currently active (useful in a multi-component
* application, such as a KParts application).
* Don't use this - it's mainly for KAboutDialog and KBugReport.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic