mirror of https://github.com/borgbase/vorta
Fix "Force-Fusion-Style" (#320)
Prevents getting "Segmentation Fault" when using foreground option"
This commit is contained in:
parent
d48bdba593
commit
329f096fb4
|
@ -40,10 +40,6 @@ def main():
|
||||||
app = VortaApp(sys.argv, single_app=True)
|
app = VortaApp(sys.argv, single_app=True)
|
||||||
app.updater = get_updater()
|
app.updater = get_updater()
|
||||||
|
|
||||||
# Force fusion style on Linux
|
|
||||||
if sys.platform.startswith('linux'):
|
|
||||||
app.setStyle('Fusion')
|
|
||||||
|
|
||||||
sys.exit(app.exec_())
|
sys.exit(app.exec_())
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ from PyQt5.QtCore import QTextStream
|
||||||
from PyQt5.QtNetwork import QLocalSocket, QLocalServer
|
from PyQt5.QtNetwork import QLocalSocket, QLocalServer
|
||||||
from PyQt5.QtWidgets import QApplication
|
from PyQt5.QtWidgets import QApplication
|
||||||
from PyQt5.QtCore import pyqtSignal
|
from PyQt5.QtCore import pyqtSignal
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
class QtSingleApplication(QApplication):
|
class QtSingleApplication(QApplication):
|
||||||
|
@ -17,6 +18,9 @@ class QtSingleApplication(QApplication):
|
||||||
super().__init__(*argv)
|
super().__init__(*argv)
|
||||||
self._id = id
|
self._id = id
|
||||||
|
|
||||||
|
if sys.platform.startswith('linux'):
|
||||||
|
self.setStyle('Fusion')
|
||||||
|
|
||||||
# Is there another instance running?
|
# Is there another instance running?
|
||||||
self._outSocket = QLocalSocket()
|
self._outSocket = QLocalSocket()
|
||||||
self._outSocket.connectToServer(self._id)
|
self._outSocket.connectToServer(self._id)
|
||||||
|
|
Loading…
Reference in New Issue