From be7145d1a512e270ca2a4cf58c107d03b0ed9097 Mon Sep 17 00:00:00 2001 From: warwick Date: Wed, 13 Mar 2002 06:04:53 +0000 Subject: [PATCH] Workaround bug in SHARP SL5500 ROM. (not essential for 3.4.0, since the SL5500 port still needs more work anyway) --- win/Qt/qt_win.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/win/Qt/qt_win.cpp b/win/Qt/qt_win.cpp index 63f6dcfca..105fb96e4 100644 --- a/win/Qt/qt_win.cpp +++ b/win/Qt/qt_win.cpp @@ -4533,10 +4533,24 @@ void NetHackQtBind::qt_get_nh_event() { } +#if defined(QWS) +// Kludge to access lastWindowClosed() signal. +class TApp : public QApplication { +public: + TApp(int& c, char**v) : QApplication(c,v) {} + void lwc() { emit lastWindowClosed(); } +}; +#endif + void NetHackQtBind::qt_exit_nhwindows(const char *) { - delete instance; - delete qApp; +#if defined(QWS) + // Avoids bug in SHARP SL5500 + ((TApp*)qApp)->lwc(); + qApp->quit(); +#endif + + delete instance; // ie. qApp } void NetHackQtBind::qt_suspend_nhwindows(const char *)