PrEditor 2.7.0__tar.gz → 2.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {preditor-2.7.0 → preditor-2.8.0}/PKG-INFO +1 -1
- {preditor-2.7.0 → preditor-2.8.0}/PrEditor.egg-info/PKG-INFO +1 -1
- preditor-2.8.0/PrEditor.egg-info/scm_version.json +8 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/completer.py +7 -10
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/loggerwindow.py +1 -1
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/workboxwidget.py +1 -1
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/documenteditor.py +3 -3
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/finddialog.py +4 -4
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/ui/finddialog.ui +5 -5
- {preditor-2.7.0 → preditor-2.8.0}/preditor/stream/director.py +48 -11
- {preditor-2.7.0 → preditor-2.8.0}/preditor/version.py +3 -3
- preditor-2.7.0/PrEditor.egg-info/scm_version.json +0 -8
- {preditor-2.7.0 → preditor-2.8.0}/.coveragerc +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/.github/ISSUE_TEMPLATE/BUG_REPORT.md +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/.github/workflows/release.yml +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/.github/workflows/static-analysis-and-test.yml +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/.gitignore +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/.pre-commit-config.yaml +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/CODE_OF_CONDUCT.md +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/CONTRIBUTING.md +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/LICENSE +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/MANIFEST.in +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/PrEditor.egg-info/SOURCES.txt +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/PrEditor.egg-info/dependency_links.txt +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/PrEditor.egg-info/entry_points.txt +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/PrEditor.egg-info/requires.txt +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/PrEditor.egg-info/scm_file_list.json +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/PrEditor.egg-info/top_level.txt +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/README.md +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/examples/add_to_app.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/examples/output_capture_and_show.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/examples/output_console.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/examples/output_console.ui +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/__init__.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/__main__.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/about_module.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/cli.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/config.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/constants.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/contexts.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/cores/__init__.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/cores/core.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/dccs/.hab.json +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/dccs/maya/PrEditor_maya.mod +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/dccs/maya/README.md +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/dccs/maya/plug-ins/PrEditor_maya.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/dccs/studiomax/PackageContents.xml +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/dccs/studiomax/PrEditor-PrEditor_Show.mcr +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/dccs/studiomax/README.md +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/dccs/studiomax/preditor.ms +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/dccs/studiomax/preditor_menu.mnx +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/debug.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/delayable_engine/__init__.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/delayable_engine/delayables.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/enum.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/excepthooks.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/__init__.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/app.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/codehighlighter.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/console.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/console_base.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/dialog.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/drag_tab_bar.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/editor_chooser.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/errordialog.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/find_files.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/fuzzy_search/__init__.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/fuzzy_search/fuzzy_search.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/group_tab_widget/__init__.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/group_tab_widget/group_tab_widget.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/group_tab_widget/grouped_tab_menu.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/group_tab_widget/grouped_tab_models.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/group_tab_widget/grouped_tab_widget.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/group_tab_widget/one_tab_widget.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/level_buttons.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/logger_window_handler.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/logger_window_plugin.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/newtabwidget.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/output_console.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/qtdesigner/__init__.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/qtdesigner/_log_plugin.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/qtdesigner/console_base_plugin.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/qtdesigner/console_predit_plugin.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/set_text_editor_path_dialog.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/status_label.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/suggest_path_quotes_dialog.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/ui/editor_chooser.ui +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/ui/errordialog.ui +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/ui/find_files.ui +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/ui/loggerwindow.ui +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/ui/set_text_editor_path_dialog.ui +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/ui/suggest_path_quotes_dialog.ui +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/window.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/workbox_mixin.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/gui/workbox_text_edit.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/logging_config.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/osystem.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/plugins.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/prefs.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/error_mail.html +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/error_mail_inline.html +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/README.md +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/arrow_forward.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/check-bold.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/chevron-down.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/chevron-up.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/close-thick.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/comment-edit.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/content-copy.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/content-cut.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/content-duplicate.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/content-paste.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/content-save.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/debug_disabled.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/eye-check.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/file-plus.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/file-remove.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/format-align-left.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/format-letter-case-lower.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/format-letter-case-upper.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/format-letter-case.svg +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/information.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/logging_critical.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/logging_custom.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/logging_debug.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/logging_error.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/logging_info.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/logging_not_set.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/logging_warning.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/marker.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/play.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/playlist-play.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/plus-minus-variant.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/preditor.ico +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/preditor.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/preditor.psd +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/preditor.svg +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/regex.svg +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/restart.svg +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/skip-forward-outline.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/skip-next-outline.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/skip-next.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/skip-previous.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/subdirectory-arrow-right.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/text-search-variant.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/img/warning-big.png +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/lang/python.json +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/pref_updates/pref_updates.json +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/settings.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/stylesheet/Bright.css +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/resource/stylesheet/Dark.css +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/__init__.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/delayables/__init__.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/delayables/smart_highlight.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/delayables/spell_check.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/__init__.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/config/bash.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/config/batch.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/config/cpp.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/config/css.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/config/eyeonscript.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/config/html.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/config/javascript.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/config/lua.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/config/maxscript.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/config/mel.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/config/mu.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/config/nsi.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/config/perl.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/config/puppet.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/config/python.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/config/ruby.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/config/sql.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/config/xml.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/config/yaml.ini +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lang/language.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lexers/__init__.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lexers/cpplexer.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lexers/javascriptlexer.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lexers/maxscriptlexer.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lexers/mellexer.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lexers/mulexer.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/scintilla/lexers/pythonlexer.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/settings.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/stream/__init__.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/stream/console_handler.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/stream/manager.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/streamhandler_helper.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/utils/__init__.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/utils/call_stack.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/utils/cute.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/utils/stylesheets.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/utils/text_search.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/preditor/weakref.py +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/pyproject.toml +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/requirements-cli.txt +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/requirements-dev.txt +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/requirements-qsci5.txt +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/requirements-qsci6.txt +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/requirements-shortcut.txt +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/requirements.txt +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/setup.cfg +0 -0
- {preditor-2.7.0 → preditor-2.8.0}/tox.ini +0 -0
|
@@ -5,8 +5,7 @@ import re
|
|
|
5
5
|
import sys
|
|
6
6
|
from enum import Enum
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
from Qt.QtCore import QRegExp, QSortFilterProxyModel, QStringListModel, Qt
|
|
8
|
+
from Qt.QtCore import QRegularExpression, QSortFilterProxyModel, QStringListModel, Qt
|
|
10
9
|
from Qt.QtGui import QCursor, QTextCursor
|
|
11
10
|
from Qt.QtWidgets import QCompleter, QToolTip
|
|
12
11
|
|
|
@@ -160,14 +159,12 @@ class PythonCompleter(QCompleter):
|
|
|
160
159
|
if self._completerMode == CompleterMode.FULL_FUZZY:
|
|
161
160
|
regExStr = ".*".join(prefix)
|
|
162
161
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
regexp = QRegExp(regExStr, self._sensitivity)
|
|
170
|
-
self.filterModel.setFilterRegExp(regexp)
|
|
162
|
+
regexp = QRegularExpression(regExStr)
|
|
163
|
+
if self._sensitivity == Qt.CaseSensitivity.CaseInsensitive:
|
|
164
|
+
regexp.setPatternOptions(
|
|
165
|
+
QRegularExpression.PatternOption.CaseInsensitiveOption
|
|
166
|
+
)
|
|
167
|
+
self.filterModel.setFilterRegularExpression(regexp)
|
|
171
168
|
|
|
172
169
|
def clear(self):
|
|
173
170
|
self.popup().hide()
|
|
@@ -311,7 +311,7 @@ class LoggerWindow(Window):
|
|
|
311
311
|
|
|
312
312
|
# Tooltips - Qt4 doesn't have a ToolTipsVisible method, so we fake it
|
|
313
313
|
regEx = ".*"
|
|
314
|
-
menus = self.findChildren(QtWidgets.QMenu, QtCore.
|
|
314
|
+
menus = self.findChildren(QtWidgets.QMenu, QtCore.QRegularExpression(regEx))
|
|
315
315
|
for menu in menus:
|
|
316
316
|
menu.hovered.connect(handleMenuHovered)
|
|
317
317
|
|
|
@@ -285,7 +285,7 @@ class WorkboxWidget(WorkboxMixin, DocumentEditor):
|
|
|
285
285
|
# refresh the search text unless we are using regular expressions
|
|
286
286
|
if (
|
|
287
287
|
not self._searchDialog.isVisible()
|
|
288
|
-
and not self._searchFlags & SearchOptions.
|
|
288
|
+
and not self._searchFlags & SearchOptions.Regex
|
|
289
289
|
):
|
|
290
290
|
txt = self.selectedText()
|
|
291
291
|
if txt:
|
|
@@ -49,7 +49,7 @@ class SearchOptions(EnumGroup):
|
|
|
49
49
|
Backward = Enum()
|
|
50
50
|
CaseSensitive = Enum()
|
|
51
51
|
WholeWords = Enum()
|
|
52
|
-
|
|
52
|
+
Regex = Enum()
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
@contextmanager
|
|
@@ -649,7 +649,7 @@ class DocumentEditor(QsciScintilla):
|
|
|
649
649
|
self._filename = filename
|
|
650
650
|
|
|
651
651
|
def findNext(self, text, flags):
|
|
652
|
-
re = (flags & SearchOptions.
|
|
652
|
+
re = (flags & SearchOptions.Regex) != 0
|
|
653
653
|
cs = (flags & SearchOptions.CaseSensitive) != 0
|
|
654
654
|
wo = (flags & SearchOptions.WholeWords) != 0
|
|
655
655
|
wrap = True
|
|
@@ -663,7 +663,7 @@ class DocumentEditor(QsciScintilla):
|
|
|
663
663
|
return result
|
|
664
664
|
|
|
665
665
|
def findPrev(self, text, flags):
|
|
666
|
-
re = (flags & SearchOptions.
|
|
666
|
+
re = (flags & SearchOptions.Regex) != 0
|
|
667
667
|
cs = (flags & SearchOptions.CaseSensitive) != 0
|
|
668
668
|
wo = (flags & SearchOptions.WholeWords) != 0
|
|
669
669
|
wrap = True
|
|
@@ -16,13 +16,13 @@ class FindDialog(Dialog):
|
|
|
16
16
|
self.uiFindWholeWordsCHK.setChecked(
|
|
17
17
|
parent.searchFlags() & SearchOptions.WholeWords
|
|
18
18
|
)
|
|
19
|
-
self.
|
|
19
|
+
self.uiRegexCHK.setChecked(parent.searchFlags() & SearchOptions.Regex)
|
|
20
20
|
self.uiSearchTXT.setPlainText(parent.searchText())
|
|
21
21
|
|
|
22
22
|
# update the signals
|
|
23
23
|
self.uiCaseSensitiveCHK.clicked.connect(self.updateSearchTerms)
|
|
24
24
|
self.uiFindWholeWordsCHK.clicked.connect(self.updateSearchTerms)
|
|
25
|
-
self.
|
|
25
|
+
self.uiRegexCHK.clicked.connect(self.updateSearchTerms)
|
|
26
26
|
self.uiSearchTXT.textChanged.connect(self.updateSearchTerms)
|
|
27
27
|
|
|
28
28
|
self.uiFindNextBTN.clicked.connect(parent.uiFindNextACT.triggered.emit)
|
|
@@ -61,8 +61,8 @@ class FindDialog(Dialog):
|
|
|
61
61
|
options |= SearchOptions.CaseSensitive
|
|
62
62
|
if self.uiFindWholeWordsCHK.isChecked():
|
|
63
63
|
options |= SearchOptions.WholeWords
|
|
64
|
-
if self.
|
|
65
|
-
options |= SearchOptions.
|
|
64
|
+
if self.uiRegexCHK.isChecked():
|
|
65
|
+
options |= SearchOptions.Regex
|
|
66
66
|
|
|
67
67
|
parent.setSearchFlags(options)
|
|
68
68
|
parent.setSearchText(self.uiSearchTXT.toPlainText())
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<rect>
|
|
7
7
|
<x>0</x>
|
|
8
8
|
<y>0</y>
|
|
9
|
-
<width>
|
|
9
|
+
<width>421</width>
|
|
10
10
|
<height>170</height>
|
|
11
11
|
</rect>
|
|
12
12
|
</property>
|
|
@@ -115,12 +115,12 @@
|
|
|
115
115
|
</widget>
|
|
116
116
|
</item>
|
|
117
117
|
<item row="3" column="2">
|
|
118
|
-
<widget class="QCheckBox" name="
|
|
118
|
+
<widget class="QCheckBox" name="uiRegexCHK">
|
|
119
119
|
<property name="toolTip">
|
|
120
|
-
<string><html><head/><body><p>
|
|
120
|
+
<string><html><head/><body><p>Find using regular expressions instead of plain text.</p></body></html></string>
|
|
121
121
|
</property>
|
|
122
122
|
<property name="text">
|
|
123
|
-
<string>
|
|
123
|
+
<string>Regex</string>
|
|
124
124
|
</property>
|
|
125
125
|
</widget>
|
|
126
126
|
</item>
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
<tabstop>uiFindPrevBTN</tabstop>
|
|
136
136
|
<tabstop>uiFindWholeWordsCHK</tabstop>
|
|
137
137
|
<tabstop>uiCaseSensitiveCHK</tabstop>
|
|
138
|
-
<tabstop>
|
|
138
|
+
<tabstop>uiRegexCHK</tabstop>
|
|
139
139
|
<tabstop>uiCloseBTN</tabstop>
|
|
140
140
|
</tabstops>
|
|
141
141
|
<resources/>
|
|
@@ -6,6 +6,28 @@ import sys
|
|
|
6
6
|
from ..constants import StreamType
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
def _open_stream(stream):
|
|
10
|
+
"""Returns stream if it is still usable, otherwise None.
|
|
11
|
+
|
|
12
|
+
The old_stream a Director wraps may be closed before the Director is. For
|
|
13
|
+
example pytest closes its capture files at the end of a test run. Using a
|
|
14
|
+
closed stream raises ``ValueError: I/O operation on closed file``, so treat
|
|
15
|
+
a closed stream the same as not having an old_stream at all.
|
|
16
|
+
|
|
17
|
+
Note: It's possible the stream is closed after this call so its recommended to
|
|
18
|
+
use a try/except ValueError when accessing the returned stream.
|
|
19
|
+
"""
|
|
20
|
+
if stream is None:
|
|
21
|
+
return None
|
|
22
|
+
try:
|
|
23
|
+
if stream.closed:
|
|
24
|
+
return None
|
|
25
|
+
except (AttributeError, ValueError):
|
|
26
|
+
# Not all file like objects implement closed, assume it's usable.
|
|
27
|
+
pass
|
|
28
|
+
return stream
|
|
29
|
+
|
|
30
|
+
|
|
9
31
|
class _DirectorBuffer(io.RawIOBase):
|
|
10
32
|
"""Binary buffer that forwards text writes to the manager.
|
|
11
33
|
|
|
@@ -32,8 +54,9 @@ class _DirectorBuffer(io.RawIOBase):
|
|
|
32
54
|
self.name = name
|
|
33
55
|
|
|
34
56
|
def flush(self):
|
|
35
|
-
|
|
36
|
-
|
|
57
|
+
old_stream = _open_stream(self.old_stream)
|
|
58
|
+
if old_stream:
|
|
59
|
+
old_stream.flush()
|
|
37
60
|
super().flush()
|
|
38
61
|
|
|
39
62
|
def writable(self):
|
|
@@ -47,8 +70,9 @@ class _DirectorBuffer(io.RawIOBase):
|
|
|
47
70
|
msg = b.decode("utf-8", errors="replace")
|
|
48
71
|
self.manager.write(msg, self.state)
|
|
49
72
|
|
|
50
|
-
|
|
51
|
-
|
|
73
|
+
old_stream = _open_stream(self.old_stream)
|
|
74
|
+
if old_stream:
|
|
75
|
+
old_stream.write(msg)
|
|
52
76
|
|
|
53
77
|
return len(b)
|
|
54
78
|
|
|
@@ -115,7 +139,7 @@ class Director(io.TextIOWrapper):
|
|
|
115
139
|
|
|
116
140
|
def close(self):
|
|
117
141
|
if (
|
|
118
|
-
self.old_stream
|
|
142
|
+
_open_stream(self.old_stream)
|
|
119
143
|
and not self.std_stream_wrapped
|
|
120
144
|
and self.old_stream is not sys.__stdout__
|
|
121
145
|
and self.old_stream is not sys.__stderr__
|
|
@@ -131,18 +155,31 @@ class Director(io.TextIOWrapper):
|
|
|
131
155
|
|
|
132
156
|
# These methods enable terminal features like color coding etc.
|
|
133
157
|
def isatty(self):
|
|
134
|
-
|
|
135
|
-
|
|
158
|
+
old_stream = _open_stream(self.old_stream)
|
|
159
|
+
if old_stream is not None:
|
|
160
|
+
try:
|
|
161
|
+
return old_stream.isatty()
|
|
162
|
+
except ValueError:
|
|
163
|
+
# The stream was closed after we checked it
|
|
164
|
+
return False
|
|
136
165
|
return False
|
|
137
166
|
|
|
138
167
|
@property
|
|
139
168
|
def encoding(self):
|
|
140
|
-
|
|
141
|
-
|
|
169
|
+
old_stream = _open_stream(self.old_stream)
|
|
170
|
+
if old_stream is not None:
|
|
171
|
+
try:
|
|
172
|
+
return old_stream.encoding
|
|
173
|
+
except ValueError:
|
|
174
|
+
pass
|
|
142
175
|
return super().encoding
|
|
143
176
|
|
|
144
177
|
@property
|
|
145
178
|
def errors(self):
|
|
146
|
-
|
|
147
|
-
|
|
179
|
+
old_stream = _open_stream(self.old_stream)
|
|
180
|
+
if old_stream is not None:
|
|
181
|
+
try:
|
|
182
|
+
return old_stream.errors
|
|
183
|
+
except ValueError:
|
|
184
|
+
pass
|
|
148
185
|
return super().errors
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '2.
|
|
22
|
-
__version_tuple__ = version_tuple = (2,
|
|
21
|
+
__version__ = version = '2.8.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 8, 0)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'ge6dd558d2'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|