From 4e50eb0a09d4b188e59bf966b168b1b84cb1dc30 Mon Sep 17 00:00:00 2001 From: ptv Date: Wed, 21 Dec 2005 06:49:59 +0000 Subject: [PATCH] compilation on Linux RH8 --- src/GLViewer/GLViewer_Drawer.cxx | 11 +++++++---- src/GLViewer/GLViewer_ViewPort.cxx | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/GLViewer/GLViewer_Drawer.cxx b/src/GLViewer/GLViewer_Drawer.cxx index 59173b3bd..a87052ef9 100644 --- a/src/GLViewer/GLViewer_Drawer.cxx +++ b/src/GLViewer/GLViewer_Drawer.cxx @@ -337,6 +337,8 @@ int GLViewer_TexFont::getStringHeight() //! function for generation list base for bitmap fonts static GLuint displayListBase( QFont* theFont ) { + if ( !theFont ) + return 0; GLuint aList = 0; //static QMap fontCache; GLViewer_TexFindId aFindFont; @@ -409,16 +411,17 @@ static GLuint displayListBase( QFont* theFont ) //glXUseXFont( (Font)(theFont->handle()), 0, 256, listBase ); int aFontCont = 0; - char** xFontList = XListFonts( aDisp, aFindFont.myFontString.data(), 1, &aFontCont ); + QString aFontDef = theFont->toString(); + char** xFontList = XListFonts( aDisp, aFontDef.latin1()/*aFindFont.myFontString.data()*/, 1, &aFontCont ); if( !theFont->handle() ) { #ifdef _DEBUG_ - printf( "Can't load font %s. loading default font....\n", aFindFont.myFontString.data() ); + printf( "Can't load font %s. loading default font....\n", aFontDef.latin1()/*aFindFont.myFontString.data()*/ ); #endif QString aFontMask ("-*-*-*-r-*-*-"); - aFontMask += aFindFont.myFontString.section( ',', 1, 1 ); + aFontMask += aFontDef/*aFindFont.myFontString*/.section( ',', 1, 1 ); #ifdef _DEBUG_ - printf( "Height of Default font: %s\n", aFindFont.myFontString.section( ',', 1, 1 ).data() ); + printf( "Height of Default font: %s\n", aFontDef/*aFindFont.myFontString*/.section( ',', 1, 1 ).data() ); #endif aFontMask += "-*-*-*-m-*-*-*"; xFontList = XListFonts( aDisp, aFontMask.data()/*"-*-*-*-r-*-*-12-*-*-*-m-*-*-*"*/, 1, &aFontCont ); diff --git a/src/GLViewer/GLViewer_ViewPort.cxx b/src/GLViewer/GLViewer_ViewPort.cxx index 973342f84..78767afa1 100644 --- a/src/GLViewer/GLViewer_ViewPort.cxx +++ b/src/GLViewer/GLViewer_ViewPort.cxx @@ -31,7 +31,7 @@ //#include -#if !defined WNT +#if !(defined WNT) && !(defined QT_CLEAN_NAMESPACE) #define QT_CLEAN_NAMESPACE /* avoid definition of INT32 and INT8 */ #endif -- 2.39.2