Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed broken model instantiated from Qml #102

Merged
merged 1 commit into from Nov 20, 2021
Merged

Fixed broken model instantiated from Qml #102

merged 1 commit into from Nov 20, 2021

Conversation

filcuc
Copy link
Owner

@filcuc filcuc commented Nov 20, 2021

This was due by multiple factors. The most important is that we always registered Models as DosQAbstractItemModelWrappers that is a subclass of QAbstractItemModel. This in turn broke the APIs when the user really instantiated a QAbstractTableModel from the binded language because the cast from DosQAsbstratItemModelWrapper to QAbstractTableModel failed.
The solution is to add different correct subclasses during registration

@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2021

Codecov Report

Merging #102 (4773a8a) into master (a33d839) will increase coverage by 1.77%.
The diff coverage is 11.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #102      +/-   ##
==========================================
+ Coverage   69.35%   71.12%   +1.77%     
==========================================
  Files          20       20              
  Lines        1749     1711      -38     
==========================================
+ Hits         1213     1217       +4     
+ Misses        536      494      -42     
Impacted Files Coverage Δ
...ib/include/DOtherSide/DosIQAbstractItemModelImpl.h 100.00% <ø> (ø)
.../include/DOtherSide/DosQAbstractItemModelWrapper.h 0.00% <0.00%> (ø)
lib/src/DosQAbstractItemModel.cpp 44.31% <ø> (+11.26%) ⬆️
lib/src/DosQMetaObject.cpp 75.23% <0.00%> (ø)
lib/src/DosQQuickImageProvider.cpp 0.00% <0.00%> (ø)
lib/src/DOtherSide.cpp 55.95% <3.84%> (+0.99%) ⬆️
lib/src/DosQDeclarative.cpp 69.56% <57.14%> (-10.44%) ⬇️
lib/include/DOtherSide/DosQObjectWrapper.h 93.54% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2fd6baf...4773a8a. Read the comment docs.

This was due by multiple factors. The most important is that we always registered Models as DosQAbstractItemModelWrappers that is a subclass of QAbstractItemModel. This in turn broke the APIs when the user really instantiated a QAbstractTableModel from the binded language because the cast from DosQAsbstratItemModelWrapper to QAbstractTableModel failed.
The solution is to add different correct subclasses during registration
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.

None yet

2 participants