@@ -165,7 +165,7 @@ public:
165165 *
166166 * Throughout the session, the instance is available through
167167 * WApplication::instance() (or through #wApp). The application may be
168- * quited either using the method quit(), or because of a timeout
168+ * exited either using the method quit(), or because of a timeout
169169 * after the user has closed the window, but not because the user does
170170 * not interact: keep-alive messages in the background will keep the
171171 * session around as long as the user has the page opened. In either
@@ -177,7 +177,7 @@ public:
177177 * Throughout the session, the instance is available through the
178178 * static method WApplication::instance(), which uses thread-specific
179179 * storage to keep track of the current session. The application may
180- * be quited either using the method quit(), or because of a timeout
180+ * be exited either using the method quit(), or because of a timeout
181181 * after the user has closed the window, but not because the user does
182182 * not interact: keep-alive messages in the background will keep the
183183 * session around as long as the user has the page opened.
@@ -1762,6 +1762,15 @@ public:
17621762 */
17631763 std::string docType () const ;
17641764
1765+ /* ! \brief Quits the application.
1766+ *
1767+ * This quits the application with a default restart message resolved
1768+ * as WString::tr("Wt.QuittedMessage").
1769+ *
1770+ * \sa quit(const WString&)
1771+ */
1772+ void quit ();
1773+
17651774 /* ! \brief Quits the application.
17661775 *
17671776 * The method returns immediately, but has as effect that the
@@ -1772,28 +1781,27 @@ public:
17721781 * pending and applied during the current event handling) will still
17731782 * be rendered, after which the application is terminated.
17741783 *
1775- * You might want to make sure no more events can be received from
1776- * the user, by not having anything clickable, for example by
1777- * displaying only text. Even better is to redirect() the user to
1778- * another, static, page in conjunction with %quit().
1784+ * If the restart message is not empty, then the user will be
1785+ * offered to restart the application (using the provided message)
1786+ * when further interacting with the application.
17791787 *
17801788 * \sa redirect()
17811789 */
1782- void quit ();
1790+ void quit (const WString& restartMessage );
17831791
17841792 /* ! \brief Returns whether the application has quit. (<b>deprecated</b>)
17851793 *
17861794 * \sa quit()
17871795 *
17881796 * \deprecated hasQuit() is proper English
17891797 */
1790- bool isQuited () const { return quited_ ; }
1798+ bool isQuited () const { return quitted_ ; }
17911799
17921800 /* ! \brief Returns whether the application has quit.
17931801 *
17941802 * \sa quit()
17951803 */
1796- bool hasQuit () const { return quited_ ; }
1804+ bool hasQuit () const { return quitted_ ; }
17971805
17981806 /* ! \brief Returns the current maximum size of a request to the
17991807 * application.
@@ -1921,6 +1929,8 @@ public:
19211929 */
19221930 void setConfirmCloseMessage (const WString& message);
19231931
1932+ /* ! \brief Sets the message for the user when the application was .
1933+ */
19241934 void enableInternalPaths ();
19251935
19261936 // should we move this into an InternalPaths utility class / namespace ?
@@ -2180,7 +2190,8 @@ private:
21802190#endif // WT_TARGET_JAVA
21812191 std::string javaScriptClass_;
21822192 AjaxMethod ajaxMethod_;
2183- bool quited_;
2193+ bool quitted_;
2194+ WString quittedMessage_;
21842195 std::string onePixelGifUrl_;
21852196 bool internalPathsEnabled_;
21862197 WWidget *exposedOnly_;
0 commit comments