From: warwick Date: Sun, 13 Jan 2002 01:08:41 +0000 (+0000) Subject: isHidden() is not in Qt 2.1. It's only *really* X-Git-Tag: MOVE2GIT~3492 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b31f25cc25038ebf2b59b8fc7dbb3458feaf8618;p=nethack isHidden() is not in Qt 2.1. It's only *really* needed in Qt 3 (it make multi-head displays work better). This patch make that explicit. --- diff --git a/win/Qt/qt_win.cpp b/win/Qt/qt_win.cpp index c9e4302ad..fbdd9c42a 100644 --- a/win/Qt/qt_win.cpp +++ b/win/Qt/qt_win.cpp @@ -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; }