Qt4/Qt5 neutral changes:
connect to commitDataRequest signal for session management
This commit is contained in:
parent
fd1c42b3c3
commit
de9aa48618
|
@ -62,6 +62,8 @@ using namespace Gui;
|
|||
GUIApplication::GUIApplication(int & argc, char ** argv)
|
||||
: GUIApplicationNativeEventAware(argc, argv)
|
||||
{
|
||||
connect(this, SIGNAL(commitDataRequest(QSessionManager &)),
|
||||
SLOT(slotCommitData(QSessionManager &)), Qt::DirectConnection);
|
||||
}
|
||||
|
||||
GUIApplication::~GUIApplication()
|
||||
|
@ -130,7 +132,7 @@ bool GUIApplication::notify (QObject * receiver, QEvent * event)
|
|||
return true;
|
||||
}
|
||||
|
||||
void GUIApplication::commitData(QSessionManager &manager)
|
||||
void GUIApplication::slotCommitData(QSessionManager &manager)
|
||||
{
|
||||
if (manager.allowsInteraction()) {
|
||||
if (!Gui::getMainWindow()->close()) {
|
||||
|
|
|
@ -49,11 +49,13 @@ public:
|
|||
* where an unhandled exception comes from.
|
||||
*/
|
||||
bool notify (QObject * receiver, QEvent * event);
|
||||
void commitData(QSessionManager &manager);
|
||||
|
||||
/// Pointer to exceptions caught in Qt event handler
|
||||
boost::shared_ptr<Base::SystemExitException> caughtException;
|
||||
|
||||
public Q_SLOTS:
|
||||
void slotCommitData(QSessionManager &manager);
|
||||
|
||||
protected:
|
||||
bool event(QEvent * event);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user