]> granicus.if.org Git - nethack/commitdiff
Qt 2.1 support again
authorcohrs <cohrs>
Sat, 12 Jan 2002 07:56:49 +0000 (07:56 +0000)
committercohrs <cohrs>
Sat, 12 Jan 2002 07:56:49 +0000 (07:56 +0000)
Fix the Qt code so it compiles wth Qt 2.1 again (Install.Qt still claims
the code works on Qt 2.0 and above).  One or more of the changes made this
week broke compilation on my RedHat Linux 6.2 system.  Qt 2.1 is still the
most recent Qt shipped by RedHat for this version.

win/Qt/Install.Qt
win/Qt/qt_win.cpp

index a92d13bf2a555b011a85f1c7749140103063c41c..19a643e59244d98258f99fb7658b617667babd2c 100644 (file)
@@ -21,6 +21,10 @@ To use this code:
         interfaces (in which case be sure you have the right curses
         libraries etc. required for that interface).
 
+       If you are using Qt 2.1 or earlier, you will need to undefine
+       USER_SOUNDS as these versions of Qt do no include the necessary
+       library support.
+
    3. ../../src/Makefile
 
        ensure your QTDIR environment variable was set correctly when
index 848a3d64c8ee49ffea0b6e47a1d45f80a0758772..5aba22bf35dd56cffab1138f502afee5ceb562eb 100644 (file)
@@ -2028,7 +2028,8 @@ void NetHackQtLabelledIcon::setFont(const QFont& f)
 }
 void NetHackQtLabelledIcon::show()
 {
-    if (isHidden()) highlight(hl_bad);
+    // Note: use of isHidden does not work with Qt 2.1
+    if (!isVisible()) highlight(hl_bad);
     QWidget::show();
 }
 void NetHackQtLabelledIcon::highlightWhenChanging()
@@ -4538,7 +4539,8 @@ winid NetHackQtBind::qt_create_nhwindow(int type)
        window=new NetHackQtTextWindow(keybuffer);
     }
 
-    if ( splash && !main->isHidden() ) {
+    // Note: use of isHidden does not work with Qt 2.1
+    if (splash && main->isVisible()) {
        delete splash;
        splash = 0;
     }