mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -9,7 +9,7 @@ from PyQt5.Qt import (
|
||||
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…
x
Reference in New Issue
Block a user