[qt] Fix macOS Qt demo app with Qt4.x

This commit is contained in:
Bruno de Oliveira Abinader
2016-10-24 18:57:39 +03:00
parent bc4cf3220c
commit cff5360280

View File

@@ -297,5 +297,15 @@ void MapWindow::resizeGL(int w, int h)
void MapWindow::paintGL()
{
m_frameDraws++;
#if QT_VERSION < 0x050400 && defined(__APPLE__)
// XXX GL framebuffer is valid only after first attempt of painting on
// older versions of Qt on macOS.
// See https://bugreports.qt.io/browse/QTBUG-36802 for details.
static bool first = true;
if (!first) m_map.render();
first = false;
#else
m_map.render();
#endif
}