cout << "Choosing cmap for vID = " << vi->visualid << endl;
#endif
-// TODO (QT5 PORTING) Below is a temporary solution, to allow compiling with Qt 5
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
if ( vi->visualid == XVisualIDFromVisual( (Visual*)QX11Info::appVisual() ) )
{
#endif
return QX11Info::appColormap();
}
+#else
+ if ( vi->visualid == XVisualIDFromVisual( XDefaultVisual( QX11Info::display(), -1 ) ) )
+ {
+#ifdef DEBUG
+ cout << "Using XDefaultColormap" << endl;
+#endif
+ return XDefaultColormap( QX11Info::display(), -1 );
+ }
#endif
if ( mesa_gl )
{
//#ifdef DEBUG
//cout << "Choosing cmap for vID = " << vi->visualid << endl;
//#endif
-// TODO (QT5 PORTING) Below is a temporary solution, to allow compiling with Qt 5
+
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
if ( vi->visualid == XVisualIDFromVisual( (Visual*)QX11Info::appVisual() ) )
{
#endif
return QX11Info::appColormap();
}
+#else
+ if ( vi->visualid == XVisualIDFromVisual( XDefaultVisual( QX11Info::display(), -1 ) ) )
+ {
+#ifdef DEBUG
+// cout << "Using XDefaultColormap" << endl;
+#endif
+ return XDefaultColormap( QX11Info::display(), -1 );
+ }
#endif
if ( mesa_gl )
{