]> granicus.if.org Git - nethack/commitdiff
isHidden() is not in Qt 2.1. It's only *really*
authorwarwick <warwick>
Sun, 13 Jan 2002 01:08:41 +0000 (01:08 +0000)
committerwarwick <warwick>
Sun, 13 Jan 2002 01:08:41 +0000 (01:08 +0000)
needed in Qt 3 (it make multi-head displays work better). This patch make
that explicit.

win/Qt/qt_win.cpp

index c9e4302ad3a2e915f34f927762dcc30fe80e454a..fbdd9c42ab5d332586e117cec092767774bda893 100644 (file)
@@ -2028,8 +2028,12 @@ void NetHackQtLabelledIcon::setFont(const QFont& f)
 }
 void NetHackQtLabelledIcon::show()
 {
-    // Note: use of isHidden does not work with Qt 2.1
-    if (!isVisible()) highlight(hl_bad);
+#if QT_VERSION >= 300
+    if (isHidden())
+#else
+    if (!isVisible())
+#endif
+       highlight(hl_bad);
     QWidget::show();
 }
 void NetHackQtLabelledIcon::highlightWhenChanging()
@@ -4546,7 +4550,14 @@ winid NetHackQtBind::qt_create_nhwindow(int type)
     }
 
     // Note: use of isHidden does not work with Qt 2.1
-    if (splash && main->isVisible()) {
+    if ( splash 
+#if QT_VERSION >= 300
+        && !main->isHidden()
+#else
+       && main->isVisible()
+#endif
+       )
+    {
        delete splash;
        splash = 0;
     }