Skip to content

Commit

Permalink
Fix QT font database initializing (FCGI with IIS)
Browse files Browse the repository at this point in the history
When using FCGI with IIS, environment variables (QT_QPA_FONTDIR in this case) are lost after fcgi_accept().
  • Loading branch information
stefan-pascal authored and nirvn committed Oct 26, 2019
1 parent 6b95d17 commit dd2ee64
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/server/qgis_map_serv.cpp
Expand Up @@ -65,6 +65,13 @@ int main( int argc, char *argv[] )
#ifdef HAVE_SERVER_PYTHON_PLUGINS
server.initPython();
#endif

#ifdef Q_OS_WIN
// Initialize font database before fcgi_accept.
// When using FCGI with IIS, environment variables (QT_QPA_FONTDIR in this case) are lost after fcgi_accept().
QFontDatabase fontDB;
#endif

// Starts FCGI loop
while ( fcgi_accept() >= 0 )
{
Expand Down

0 comments on commit dd2ee64

Please sign in to comment.