mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-04-26 00:43:08 +02:00
Remove all Qt4 imports.
This commit is contained in:
parent
b2b56e6366
commit
c97407ae56
6 changed files with 20 additions and 52 deletions
|
|
@ -9,10 +9,7 @@ __docformat__ = 'restructuredtext en'
|
|||
|
||||
import re
|
||||
|
||||
try:
|
||||
from PyQt5.Qt import (Qt, QSyntaxHighlighter, QTextCharFormat, QBrush)
|
||||
except ImportError as e:
|
||||
from PyQt4.Qt import (Qt, QSyntaxHighlighter, QTextCharFormat, QBrush)
|
||||
from PyQt5.Qt import (Qt, QSyntaxHighlighter, QTextCharFormat, QBrush)
|
||||
|
||||
from fanficfare.six import string_types
|
||||
|
||||
|
|
|
|||
|
|
@ -10,18 +10,11 @@ __docformat__ = 'restructuredtext en'
|
|||
|
||||
import os
|
||||
from contextlib import contextmanager
|
||||
try:
|
||||
from PyQt5 import QtWidgets as QtGui
|
||||
from PyQt5.Qt import (QApplication, Qt, QIcon, QPixmap, QLabel, QDialog, QHBoxLayout,
|
||||
QTableWidgetItem, QFont, QLineEdit, QComboBox,
|
||||
QVBoxLayout, QDialogButtonBox, QStyledItemDelegate, QDateTime,
|
||||
QTextEdit, QListWidget, QAbstractItemView, QCursor)
|
||||
except ImportError as e:
|
||||
from PyQt4 import QtGui
|
||||
from PyQt4.Qt import (QApplication, Qt, QIcon, QPixmap, QLabel, QDialog, QHBoxLayout,
|
||||
QTableWidgetItem, QFont, QLineEdit, QComboBox,
|
||||
QVBoxLayout, QDialogButtonBox, QStyledItemDelegate, QDateTime,
|
||||
QTextEdit, QListWidget, QAbstractItemView, QCursor)
|
||||
from PyQt5 import QtWidgets as QtGui
|
||||
from PyQt5.Qt import (QApplication, Qt, QIcon, QPixmap, QLabel, QDialog, QHBoxLayout,
|
||||
QTableWidgetItem, QFont, QLineEdit, QComboBox,
|
||||
QVBoxLayout, QDialogButtonBox, QStyledItemDelegate, QDateTime,
|
||||
QTextEdit, QListWidget, QAbstractItemView, QCursor)
|
||||
|
||||
from calibre.constants import iswindows, DEBUG
|
||||
from calibre.gui2 import UNDEFINED_QDATETIME, gprefs, info_dialog
|
||||
|
|
|
|||
|
|
@ -15,18 +15,11 @@ import re
|
|||
import threading
|
||||
from collections import OrderedDict
|
||||
|
||||
try:
|
||||
from PyQt5 import QtWidgets as QtGui
|
||||
from PyQt5.Qt import (QWidget, QVBoxLayout, QHBoxLayout, QGridLayout, QLabel,
|
||||
QLineEdit, QComboBox, QCheckBox, QPushButton, QTabWidget,
|
||||
QScrollArea, QGroupBox, QButtonGroup, QRadioButton,
|
||||
Qt)
|
||||
except ImportError as e:
|
||||
from PyQt4 import QtGui
|
||||
from PyQt4.Qt import (QWidget, QVBoxLayout, QHBoxLayout, QGridLayout, QLabel,
|
||||
QLineEdit, QComboBox, QCheckBox, QPushButton, QTabWidget,
|
||||
QScrollArea, QGroupBox, QButtonGroup, QRadioButton,
|
||||
Qt)
|
||||
from PyQt5 import QtWidgets as QtGui
|
||||
from PyQt5.Qt import (QWidget, QVBoxLayout, QHBoxLayout, QGridLayout, QLabel,
|
||||
QLineEdit, QComboBox, QCheckBox, QPushButton, QTabWidget,
|
||||
QScrollArea, QGroupBox, QButtonGroup, QRadioButton,
|
||||
Qt)
|
||||
try:
|
||||
from calibre.gui2 import QVariant
|
||||
del QVariant
|
||||
|
|
|
|||
|
|
@ -16,22 +16,13 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
from datetime import datetime
|
||||
|
||||
try:
|
||||
from PyQt5 import QtWidgets as QtGui
|
||||
from PyQt5 import QtCore
|
||||
from PyQt5.Qt import (QApplication, QDialog, QWidget, QTableWidget, QVBoxLayout, QHBoxLayout,
|
||||
QGridLayout, QPushButton, QFont, QLabel, QCheckBox, QIcon,
|
||||
QLineEdit, QComboBox, QProgressDialog, QTimer, QDialogButtonBox,
|
||||
QScrollArea, QPixmap, Qt, QAbstractItemView, QTextEdit,
|
||||
pyqtSignal, QGroupBox, QFrame)
|
||||
except ImportError as e:
|
||||
from PyQt4 import QtGui
|
||||
from PyQt4 import QtCore
|
||||
from PyQt4.Qt import (QApplication, QDialog, QWidget, QTableWidget, QVBoxLayout, QHBoxLayout,
|
||||
QGridLayout, QPushButton, QFont, QLabel, QCheckBox, QIcon,
|
||||
QLineEdit, QComboBox, QProgressDialog, QTimer, QDialogButtonBox,
|
||||
QScrollArea, QPixmap, Qt, QAbstractItemView, QTextEdit,
|
||||
pyqtSignal, QGroupBox, QFrame)
|
||||
from PyQt5 import QtWidgets as QtGui
|
||||
from PyQt5 import QtCore
|
||||
from PyQt5.Qt import (QApplication, QDialog, QWidget, QTableWidget, QVBoxLayout, QHBoxLayout,
|
||||
QGridLayout, QPushButton, QFont, QLabel, QCheckBox, QIcon,
|
||||
QLineEdit, QComboBox, QProgressDialog, QTimer, QDialogButtonBox,
|
||||
QScrollArea, QPixmap, Qt, QAbstractItemView, QTextEdit,
|
||||
pyqtSignal, QGroupBox, QFrame)
|
||||
|
||||
try:
|
||||
from calibre.gui2 import QVariant
|
||||
|
|
|
|||
|
|
@ -40,10 +40,7 @@ from string import Template
|
|||
import traceback
|
||||
from collections import defaultdict
|
||||
|
||||
try:
|
||||
from PyQt5.Qt import (QApplication, QMenu, QTimer, QToolButton)
|
||||
except ImportError as e:
|
||||
from PyQt4.Qt import (QApplication, QMenu, QTimer, QToolButton)
|
||||
from PyQt5.Qt import (QApplication, QMenu, QTimer, QToolButton)
|
||||
|
||||
from calibre.constants import numeric_version as calibre_version
|
||||
|
||||
|
|
|
|||
|
|
@ -12,10 +12,7 @@ import re
|
|||
import logging
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
try:
|
||||
from PyQt5.Qt import (QApplication, Qt, QColor, QSyntaxHighlighter, QTextCharFormat, QBrush, QFont)
|
||||
except ImportError as e:
|
||||
from PyQt4.Qt import (QApplication, Qt, QColor, QSyntaxHighlighter, QTextCharFormat, QBrush, QFont)
|
||||
from PyQt5.Qt import (QApplication, Qt, QColor, QSyntaxHighlighter, QTextCharFormat, QBrush, QFont)
|
||||
|
||||
from fanficfare.six import string_types
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue