mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix crash in headless backend with Qt 6.7.0
This commit is contained in:
parent
cc9afd6371
commit
589d926507
@ -127,12 +127,10 @@ HeadlessIntegration *HeadlessIntegration::instance()
|
||||
return static_cast<HeadlessIntegration *>(QGuiApplicationPrivate::platformIntegration());
|
||||
}
|
||||
|
||||
static QString themeName() { return QStringLiteral("headless"); }
|
||||
|
||||
QStringList HeadlessIntegration::themeNames() const
|
||||
{
|
||||
return QStringList(themeName());
|
||||
}
|
||||
#define THEME_NAME "headless"
|
||||
|
||||
QStringList HeadlessIntegration::themeNames() const { return QStringList(THEME_NAME); }
|
||||
|
||||
// Restrict the styles to "fusion" to prevent native styles requiring native
|
||||
// window handles (eg Windows Vista style) from being used.
|
||||
@ -155,7 +153,7 @@ public:
|
||||
|
||||
QPlatformTheme *HeadlessIntegration::createPlatformTheme(const QString &name) const
|
||||
{
|
||||
return name == themeName() ? new HeadlessTheme() : nullptr;
|
||||
return name == THEME_NAME ? new HeadlessTheme() : nullptr;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
Loading…
x
Reference in New Issue
Block a user