mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 14:04:12 +02:00
Linux binary: Fix calibre not starting on systems where QT_QPA_PLATFORM is set to use wayland
This commit is contained in:
parent
025fd69202
commit
66aac30872
1 changed files with 3 additions and 1 deletions
|
|
@ -9,7 +9,7 @@
|
|||
QFileInfo, QObject, QBuffer, Qt, QByteArray, QTranslator, QSocketNotifier,
|
||||
QCoreApplication, QThread, QEvent, QTimer, pyqtSignal, QDateTime, QFontMetrics,
|
||||
QDesktopServices, QFileDialog, QFileIconProvider, QSettings, QIcon, QStringListModel,
|
||||
QApplication, QDialog, QUrl, QFont, QFontDatabase, QLocale, QFontInfo)
|
||||
QApplication, QDialog, QUrl, QFont, QFontDatabase, QLocale, QFontInfo, QT_VERSION)
|
||||
|
||||
from calibre import prints, as_unicode
|
||||
from calibre.constants import (islinux, iswindows, isbsd, isfrozen, isosx, is_running_from_develop,
|
||||
|
|
@ -785,6 +785,8 @@ class Application(QApplication):
|
|||
|
||||
def __init__(self, args, force_calibre_style=False, override_program_name=None, headless=False, color_prefs=gprefs):
|
||||
self.file_event_hook = None
|
||||
if isfrozen and QT_VERSION <= 0x050700 and 'wayland' in os.environ.get('QT_QPA_PLATFORM', ''):
|
||||
os.environ['QT_QPA_PLATFORM'] = 'xcb'
|
||||
if override_program_name:
|
||||
args = [override_program_name] + args[1:]
|
||||
if headless:
|
||||
|
|
|
|||
Loading…
Reference in a new issue