Remove the API duplication from QApplication.
authorStephen Kelly <stephen.kelly@kdab.com>
Tue, 31 Jan 2012 11:17:32 +0000 (12:17 +0100)
committerQt by Nokia <qt-info@nokia.com>
Wed, 1 Feb 2012 15:24:10 +0000 (16:24 +0100)
The quitOnLastWindowClosed API is present in the base
class QGuiApplication.

Change-Id: Ib2f78e48a198aa835302dcb9a31637a2c3655532
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: David Faure <faure@kde.org>
src/widgets/kernel/qapplication.cpp
src/widgets/kernel/qapplication.h

index b0781c2..cb6a8c1 100644 (file)
@@ -2101,29 +2101,6 @@ void QApplication::aboutQt()
 #endif // QT_NO_MESSAGEBOX
 }
 
-
-/*!
-    \fn void QApplication::lastWindowClosed()
-
-    This signal is emitted from QApplication::exec() when the last visible
-    primary window (i.e. window with no parent) with the Qt::WA_QuitOnClose
-    attribute set is closed.
-
-    By default,
-
-    \list
-        \o  this attribute is set for all widgets except transient windows such
-            as splash screens, tool windows, and popup menus
-
-        \o  QApplication implicitly quits when this signal is emitted.
-    \endlist
-
-    This feature can be turned off by setting \l quitOnLastWindowClosed to
-    false.
-
-    \sa QWidget::close()
-*/
-
 /*!
     \since 4.1
     \fn void QApplication::focusChanged(QWidget *old, QWidget *now)
@@ -4598,33 +4575,6 @@ bool QApplicationPrivate::inPopupMode() const
     return QApplicationPrivate::popupWidgets != 0;
 }
 
-/*!
-    \property QApplication::quitOnLastWindowClosed
-
-    \brief whether the application implicitly quits when the last window is
-    closed.
-
-    The default is true.
-
-    If this property is true, the applications quits when the last visible
-    primary window (i.e. window with no parent) with the Qt::WA_QuitOnClose
-    attribute set is closed. By default this attribute is set for all widgets
-    except for sub-windows. Refer to \l{Qt::WindowType} for a detailed list of
-    Qt::Window objects.
-
-    \sa quit(), QWidget::close()
- */
-
-void QApplication::setQuitOnLastWindowClosed(bool quit)
-{
-    QCoreApplication::setQuitLockEnabled(quit);
-}
-
-bool QApplication::quitOnLastWindowClosed()
-{
-    return QCoreApplication::isQuitLockEnabled();
-}
-
 /*! \variable QApplication::NormalColors
     \compat
 
index ee65139..ace557b 100644 (file)
@@ -87,7 +87,6 @@ class Q_WIDGETS_EXPORT QApplication : public QGuiApplication
     Q_PROPERTY(QSize globalStrut READ globalStrut WRITE setGlobalStrut)
     Q_PROPERTY(int startDragTime  READ startDragTime WRITE setStartDragTime)
     Q_PROPERTY(int startDragDistance  READ startDragDistance WRITE setStartDragDistance)
-    Q_PROPERTY(bool quitOnLastWindowClosed  READ quitOnLastWindowClosed WRITE setQuitOnLastWindowClosed)
 #ifndef QT_NO_STYLE_STYLESHEET
     Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
 #endif
@@ -231,10 +230,6 @@ public:
     static int exec();
     bool notify(QObject *, QEvent *);
 
-
-    static void setQuitOnLastWindowClosed(bool quit);
-    static bool quitOnLastWindowClosed();
-
 #ifdef QT_KEYPAD_NAVIGATION
     static Q_DECL_DEPRECATED void setKeypadNavigationEnabled(bool);
     static bool keypadNavigationEnabled();