Improve QT_QPA_EGLFS_KMS_CONFIG temporary file handling
- Close it before handing it to the QPA plugin to read - Put the temporary file in TMPDIR instead of the current directory
This commit is contained in:
parent
9d5f25f828
commit
5feb331c46
1 changed files with 3 additions and 2 deletions
|
|
@ -418,9 +418,9 @@ int main(int argc, char *argv[])
|
|||
#endif
|
||||
|
||||
// We keep this at function scope to ensure it stays around while we're running,
|
||||
// becaue the Qt QPA will need to read it. Since the temporary file is only
|
||||
// because the Qt QPA will need to read it. Since the temporary file is only
|
||||
// created when open() is called, this doesn't do any harm for other platforms.
|
||||
QTemporaryFile eglfsConfigFile("eglfs_override_XXXXXX.conf");
|
||||
QTemporaryFile eglfsConfigFile;
|
||||
|
||||
// Avoid using High DPI on EGLFS. It breaks font rendering.
|
||||
// https://bugreports.qt.io/browse/QTBUG-64377
|
||||
|
|
@ -463,6 +463,7 @@ int main(int argc, char *argv[])
|
|||
qInfo() << "Overriding default Qt EGLFS card selection to" << cardOverride;
|
||||
QTextStream(&eglfsConfigFile) << "{ \"device\": \"" << cardOverride << "\" }";
|
||||
qputenv("QT_QPA_EGLFS_KMS_CONFIG", eglfsConfigFile.fileName().toUtf8());
|
||||
eglfsConfigFile.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue