mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
More stupid PyQt enums
This commit is contained in:
parent
885ca7b43a
commit
9a9fcb488a
@ -550,7 +550,7 @@ class WebView(RestartingWebEngineView):
|
||||
|
||||
def url_changed(self, url):
|
||||
if url.hasFragment():
|
||||
frag = url.fragment(url.FullyDecoded)
|
||||
frag = url.fragment(QUrl.ComponentFormattingOption.FullyDecoded)
|
||||
if frag and frag.startswith('bookpos='):
|
||||
cfi = frag[len('bookpos='):]
|
||||
if cfi:
|
||||
|
@ -4,14 +4,13 @@
|
||||
|
||||
|
||||
import weakref
|
||||
|
||||
from PyQt5.Qt import (
|
||||
QApplication, QByteArray, QCalendarWidget, QCheckBox, QColor, QColorDialog,
|
||||
QComboBox, QDate, QDateTime, QDateTimeEdit, QDialog, QDialogButtonBox, QFont,
|
||||
QFontInfo, QFontMetrics, QIcon, QKeySequence, QLabel, QLayout, QMenu,
|
||||
QMimeData, QPalette, QPixmap, QPoint, QPushButton, QRect, QScrollArea, QSize,
|
||||
QSizePolicy, QStyle, QStyledItemDelegate, Qt, QTabWidget, QTextBrowser,
|
||||
QToolButton, QUndoCommand, QUndoStack, QWidget, pyqtSignal
|
||||
QFontInfo, QFontMetrics, QIcon, QKeySequence, QLabel, QLayout, QMenu, QMimeData,
|
||||
QPalette, QPixmap, QPoint, QPushButton, QRect, QScrollArea, QSize, QSizePolicy,
|
||||
QStyle, QStyledItemDelegate, Qt, QTabWidget, QTextBrowser, QToolButton,
|
||||
QUndoCommand, QUndoStack, QUrl, QWidget, pyqtSignal
|
||||
)
|
||||
|
||||
from calibre.ebooks.metadata import rating_to_stars
|
||||
@ -488,7 +487,7 @@ class HTMLDisplay(QTextBrowser):
|
||||
|
||||
def on_anchor_clicked(self, qurl):
|
||||
if not qurl.scheme() and qurl.hasFragment() and qurl.toString().startswith('#'):
|
||||
frag = qurl.fragment(qurl.FullyDecoded)
|
||||
frag = qurl.fragment(QUrl.ComponentFormattingOption.FullyDecoded)
|
||||
if frag:
|
||||
self.scrollToAnchor(frag)
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user