11 import shutil |
11 import shutil |
12 import sys |
12 import sys |
13 import functools |
13 import functools |
14 import contextlib |
14 import contextlib |
15 |
15 |
16 from PyQt5.QtCore import ( |
16 from PyQt6.QtCore import ( |
17 pyqtSlot, pyqtSignal, Qt, QByteArray, QSize, QTimer, QUrl, QProcess, |
17 pyqtSlot, pyqtSignal, Qt, QByteArray, QSize, QTimer, QUrl, QProcess, |
18 QEvent, QFileInfo |
18 QEvent, QFileInfo |
19 ) |
19 ) |
20 from PyQt5.QtGui import QDesktopServices, QKeySequence, QFont, QFontMetrics |
20 from PyQt6.QtGui import ( |
21 from PyQt5.QtWidgets import ( |
21 QDesktopServices, QKeySequence, QAction, QFont, QFontMetrics |
|
22 ) |
|
23 from PyQt6.QtWidgets import ( |
22 QWidget, QVBoxLayout, QSizePolicy, QDockWidget, QComboBox, QLabel, QMenu, |
24 QWidget, QVBoxLayout, QSizePolicy, QDockWidget, QComboBox, QLabel, QMenu, |
23 QLineEdit, QApplication, QWhatsThis, QDialog, QHBoxLayout, QProgressBar, |
25 QLineEdit, QApplication, QWhatsThis, QDialog, QHBoxLayout, QProgressBar, |
24 QInputDialog, QAction |
26 QInputDialog |
25 ) |
27 ) |
26 from PyQt5.QtWebEngineWidgets import ( |
28 from PyQt6.QtWebEngineWidgets import ( |
27 QWebEngineSettings, QWebEnginePage, QWebEngineProfile, QWebEngineScript |
29 QWebEngineSettings, QWebEnginePage, QWebEngineProfile, QWebEngineScript |
28 ) |
30 ) |
29 try: |
31 try: |
30 from PyQt5.QtHelp import QHelpEngine, QHelpEngineCore, QHelpSearchQuery |
32 from PyQt6.QtHelp import QHelpEngine, QHelpEngineCore |
31 QTHELP_AVAILABLE = True |
33 QTHELP_AVAILABLE = True |
32 except ImportError: |
34 except ImportError: |
33 QTHELP_AVAILABLE = False |
35 QTHELP_AVAILABLE = False |
34 |
36 |
35 from E5Gui.E5Action import E5Action |
37 from E5Gui.E5Action import E5Action |
3525 not self.__indexing and |
3527 not self.__indexing and |
3526 self.__searchWord is not None |
3528 self.__searchWord is not None |
3527 ): |
3529 ): |
3528 self.__searchDock.show() |
3530 self.__searchDock.show() |
3529 self.__searchDock.raise_() |
3531 self.__searchDock.raise_() |
3530 query = QHelpSearchQuery(QHelpSearchQuery.FieldName.DEFAULT, |
3532 self.__searchEngine.search(self.__searchWord) |
3531 [self.__searchWord]) |
|
3532 self.__searchEngine.search([query]) |
|
3533 self.__searchWord = None |
3533 self.__searchWord = None |
3534 |
3534 |
3535 def search(self, word): |
3535 def search(self, word): |
3536 """ |
3536 """ |
3537 Public method to search for a word. |
3537 Public method to search for a word. |