Fix "Force-Fusion-Style" (#320)

Prevents getting "Segmentation Fault" when using foreground option"
This commit is contained in:
Hofer-Julian 2019-06-29 09:10:55 +02:00 committed by GitHub
parent d48bdba593
commit 329f096fb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -40,10 +40,6 @@ def main():
app = VortaApp(sys.argv, single_app=True)
app.updater = get_updater()
# Force fusion style on Linux
if sys.platform.startswith('linux'):
app.setStyle('Fusion')
sys.exit(app.exec_())

View File

@ -2,6 +2,7 @@ from PyQt5.QtCore import QTextStream
from PyQt5.QtNetwork import QLocalSocket, QLocalServer
from PyQt5.QtWidgets import QApplication
from PyQt5.QtCore import pyqtSignal
import sys
class QtSingleApplication(QApplication):
@ -17,6 +18,9 @@ class QtSingleApplication(QApplication):
super().__init__(*argv)
self._id = id
if sys.platform.startswith('linux'):
self.setStyle('Fusion')
# Is there another instance running?
self._outSocket = QLocalSocket()
self._outSocket.connectToServer(self._id)