Skip to content

Preserve linked file line endings#63

Open
macevhicz wants to merge 2 commits into
blurstudio:mainfrom
macevhicz:markm/line_endings
Open

Preserve linked file line endings#63
macevhicz wants to merge 2 commits into
blurstudio:mainfrom
macevhicz:markm/line_endings

Conversation

@macevhicz

Copy link
Copy Markdown
Contributor

Checklist

  • I have read the CONTRIBUTING.md document
  • I formatted my changes with black
  • I linted my changes with flake8
  • I have added documentation regarding my changes where necessary
  • Any pre-existing tests continue to pass
  • Additional tests were made covering my changes

Types of Changes

  • Bugfix (change that fixes an issue)
  • New Feature (change that adds functionality)
  • Documentation Update (if none of the other choices apply)

Proposed Changes

@macevhicz

Copy link
Copy Markdown
Contributor Author

Also, discovered a deprecated (removed in Qt6) class property (QDragMoveEvent.pos), and updated it to QDragMoveEvent.position

@macevhicz
macevhicz marked this pull request as draft April 21, 2026 15:28
@macevhicz
macevhicz marked this pull request as ready for review June 1, 2026 16:58
@macevhicz
macevhicz marked this pull request as draft June 1, 2026 17:39
@macevhicz
macevhicz marked this pull request as ready for review July 14, 2026 17:05
@macevhicz
macevhicz marked this pull request as draft July 14, 2026 17:18
@macevhicz
macevhicz force-pushed the markm/line_endings branch from e971de6 to 7520d8e Compare July 14, 2026 17:22
@macevhicz
macevhicz marked this pull request as ready for review July 14, 2026 17:23
if not event.mimeData().hasFormat(self.mime_type):
event.accept()
tab_index = self.tabAt(event.pos())
tab_index = self.tabAt(event.position().toPoint())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change breaks Qt5, here is the error in PyQt5==5.15.2:

Traceback (most recent call last):
  File "C:\blur\dev\preditor\preditor\gui\drag_tab_bar.py", line 315, in dragMoveEvent
    tab_index = self.tabAt(event.position())
AttributeError: 'QDragMoveEvent' object has no attribute 'position'

The newly updated Qt.py QtCompat methods for this, and please update the pip requirements accordingly(Qt.py>=2.0.5).

https://github.com/mottosso/Qt.py#qt-6-transition-guide (see the tooltip in the table hyperlinks that apparently don't work)
mottosso/Qt.py#466

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I don't get that error when I drag a tab in PyQt5.

I think I may have an extra PyQt5 installation.
pip list | findstr /i qt

blur-qt-plugins               5.15.10.4
PyQt5                         5.15.9
pyqt5-plugins                 5.15.9.2.3
PyQt5-Qt5                     5.15.2
PyQt5_sip                     12.17.0
pyqt5-tools                   5.15.9.3.3
qt-material                   2.17
Qt.py                         2.0.5
qt5-applications              5.15.2.2.3
qt5-tools                     5.15.2.1.3
QtSiteConfigBlur              0.8.0
sphinxcontrib-qthelp          1.0.7

I wonder if PyQt5 isn't supposed to be installed? Just PyQt5-Qt5?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, seems correct in PrEditor

>>> Qt.QtCore.qVersion()
5.15.2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to drag the tab to a different group tab to trigger it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants