#common #bug #convert: fix command line convertion of PLI for linux (#2657)

Qt documentation for QOffscreenSurface:

Due to the fact that QOffscreenSurface is backed by a QWindow on some
platforms, cross-platform applications must ensure that create() is only
called on the main (GUI) thread. The QOffscreenSurface is then safe to
be used with makeCurrent() on other threads, but the initialization and
destruction must always happen on the main (GUI) thread.
This commit is contained in:
Ivan Mahonin 2019-07-23 14:46:12 +00:00 committed by Jeremy Bullock
parent 8b3dea0166
commit 3316edbab0

View file

@ -29,6 +29,10 @@
#include "tvectorrenderdata.h"
#include "tofflinegl.h"
#if defined(LINUX)
#include <QGuiApplication>
#endif
using namespace std;
using namespace TCli;
@ -355,6 +359,10 @@ void convert(const TFilePath &source, const TFilePath &dest,
//------------------------------------------------------------------------
int main(int argc, char *argv[]) {
#if defined(LINUX)
QGuiApplication app(argc, argv);
#endif
TEnv::setRootVarName(rootVarName);
TEnv::setSystemVarPrefix(systemVarPrefix);
TFilePath fp = TEnv::getStuffDir();