Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use only qt5 stuff
  • Loading branch information
falkTX committed Aug 7, 2020
1 parent e81bb64 commit cb7ac03
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 45 deletions.
8 changes: 2 additions & 6 deletions src/clickablelabel.py
Expand Up @@ -19,12 +19,8 @@
# ------------------------------------------------------------------------------------------------------------
# Imports (Global)

if True:
from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QTimer
from PyQt5.QtWidgets import QLabel
else:
from PyQt4.QtCore import pyqtSignal, pyqtSlot, Qt, QTimer
from PyQt4.QtGui import QLabel
from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QTimer
from PyQt5.QtWidgets import QLabel

# ------------------------------------------------------------------------------------------------------------
# Widget Class
Expand Down
20 changes: 5 additions & 15 deletions src/jacksettings.py
Expand Up @@ -21,14 +21,9 @@

from sys import platform, version_info

if True:
from PyQt5.QtCore import pyqtSlot, Qt, QSettings, QTimer
from PyQt5.QtGui import QFontMetrics
from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QMessageBox
else:
from PyQt4.QtCore import pyqtSlot, Qt, QSettings, QTimer
from PyQt4.QtGui import QFontMetrics
from PyQt4.QtGui import QDialog, QDialogButtonBox, QMessageBox
from PyQt5.QtCore import pyqtSlot, Qt, QSettings, QTimer
from PyQt5.QtGui import QFontMetrics
from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QMessageBox

# ------------------------------------------------------------------------------------------------------------
# Imports (Custom Stuff)
Expand Down Expand Up @@ -62,11 +57,7 @@

if "linux" in platform:
LINUX = True

if version_info >= (3, 0):
from subprocess import getoutput
else:
from commands import getoutput
from subprocess import getoutput
else:
LINUX = False

Expand Down Expand Up @@ -196,7 +187,7 @@ def __init__(self, parent):
global gJackctl

if gJackctl is None:
QTimer.singleShot(0, self, SLOT("slot_closeWithError()"))
QTimer.singleShot(0, self.slot_closeWithError)
return

# -------------------------------------------------------------
Expand Down Expand Up @@ -927,7 +918,6 @@ def done(self, r):

if __name__ == '__main__':
# Additional imports
import resources_rc
from sys import argv as sys_argv, exit as sys_exit
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QApplication
Expand Down
11 changes: 3 additions & 8 deletions src/logs.py
Expand Up @@ -19,14 +19,9 @@
# ------------------------------------------------------------------------------------------------------------
# Imports (Global)

if True:
from PyQt5.QtCore import pyqtSlot, Qt, QFile, QIODevice, QMutex, QMutexLocker, QTextStream, QThread, QSettings
from PyQt5.QtGui import QPalette, QSyntaxHighlighter
from PyQt5.QtWidgets import QDialog
else:
from PyQt4.QtCore import pyqtSlot, Qt, QFile, QIODevice, QMutex, QMutexLocker, QTextStream, QThread, QSettings
from PyQt4.QtGui import QPalette, QSyntaxHighlighter
from PyQt4.QtGui import QDialog
from PyQt5.QtCore import pyqtSlot, Qt, QFile, QIODevice, QMutex, QMutexLocker, QTextStream, QThread, QSettings
from PyQt5.QtGui import QPalette, QSyntaxHighlighter
from PyQt5.QtWidgets import QDialog

# ------------------------------------------------------------------------------------------------------------
# Imports (Custom Stuff)
Expand Down
8 changes: 2 additions & 6 deletions src/render.py
Expand Up @@ -21,12 +21,8 @@

from time import sleep

if True:
from PyQt5.QtCore import pyqtSlot, QProcess, QTime, QTimer, QSettings
from PyQt5.QtWidgets import QDialog
else:
from PyQt4.QtCore import pyqtSlot, QProcess, QTime, QTimer, QSettings
from PyQt4.QtGui import QDialog
from PyQt5.QtCore import pyqtSlot, QProcess, QTime, QTimer, QSettings
from PyQt5.QtWidgets import QDialog

# ------------------------------------------------------------------------------------------------------------
# Imports (Custom Stuff)
Expand Down
13 changes: 3 additions & 10 deletions src/shared.py
Expand Up @@ -24,21 +24,14 @@
from codecs import open as codecopen
from unicodedata import normalize

if True:
from PyQt5.QtCore import pyqtSignal, qWarning
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QApplication, QFileDialog, QMessageBox
else:
from PyQt4.QtCore import pyqtSignal, qWarning
from PyQt4.QtGui import QIcon
from PyQt4.QtGui import QApplication, QFileDialog, QMessageBox
from PyQt5.QtCore import pyqtSignal, qWarning
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QApplication, QFileDialog, QMessageBox

# ------------------------------------------------------------------------------------------------------------
# Set Platform

if sys.platform == "darwin":
from PyQt5.QtGui import qt_mac_set_menubar_icons
qt_mac_set_menubar_icons(False)
HAIKU = False
LINUX = False
MACOS = True
Expand Down

0 comments on commit cb7ac03

Please sign in to comment.