1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2025-02-21 22:06:57 +00:00

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.QtNetwork import QLocalSocket, QLocalServer
from PyQt5.QtWidgets import QApplication
from PyQt5.QtCore import pyqtSignal
import sys
class QtSingleApplication(QApplication):
@ -17,6 +18,9 @@ def __init__(self, id, *argv):
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)