]> granicus.if.org Git - nethack/commitdiff
Workaround bug in SHARP SL5500 ROM.
authorwarwick <warwick>
Wed, 13 Mar 2002 06:04:53 +0000 (06:04 +0000)
committerwarwick <warwick>
Wed, 13 Mar 2002 06:04:53 +0000 (06:04 +0000)
(not essential for 3.4.0, since the SL5500 port still needs more work anyway)

win/Qt/qt_win.cpp

index 63f6dcfca133b1f47e7f2a63bfb5ca2ba5a8302c..105fb96e473ee0b6c86821bd22600ad9383e3dcd 100644 (file)
@@ -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 *)