diff options
author | Samuel Gaist <samuel.gaist@edeltech.ch> | 2014-07-02 16:46:24 +0200 |
---|---|---|
committer | David Faure <david.faure@kdab.com> | 2014-07-10 21:54:19 +0200 |
commit | 50c04d631858639c630e85456e7e003a80e33493 (patch) | |
tree | 21dd2c6cb9026395bfdf10056dfe35eca0f641b9 /src/plugins/platforms/cocoa/qcocoaintegration.h | |
parent | 53ed4de02278b17708199891f9b56c6e6e04103b (diff) |
Session management for OS X
This patch aims to implement the session management available on OS X.
Currently applicationShouldTerminate is just a go through that closes
everything and ends the application. The new implementation calls
first appCommitData and cancels the termination properly if required.
This means that if a user wishes to logout, Qt applications can now
cancel that like e.g. answering to Safari asking whether it is ok to
close because of a number of opened tab/window.
Task-number: QTBUG-33034
Change-Id: Icedc8590a1c0934d9bc87d3a43d6702a9903bfb8
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaintegration.h')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaintegration.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.h b/src/plugins/platforms/cocoa/qcocoaintegration.h index 5ca2ccc571..9942ac09cc 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.h +++ b/src/plugins/platforms/cocoa/qcocoaintegration.h @@ -141,6 +141,14 @@ public: void setToolbar(QWindow *window, NSToolbar *toolbar); NSToolbar *toolbar(QWindow *window) const; void clearToolbars(); + + void setWindow(NSWindow* nsWindow, QCocoaWindow *window); + QCocoaWindow *window(NSWindow *window); + +#ifndef QT_NO_SESSIONMANAGER + QPlatformSessionManager *createPlatformSessionManager(const QString &id, const QString &key) const; +#endif + private: static QCocoaIntegration *mInstance; |