-
Notifications
You must be signed in to change notification settings - Fork 102
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
Port to Qt 6 #96
base: master
Are you sure you want to change the base?
Port to Qt 6 #96
Conversation
var modelValue = testModel.get(i, sorter.roleName); | ||
verify(modelValue === sorter.expectedValues[i], | ||
"Expected testModel value " + sorter.expectedValues[i] + ", actual: " + modelValue); | ||
let actualValues = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This results in clearer error messages:
FAIL! : SortFilterProxyModel::RoleSorterTests::test_roleSorters(mixedCaseStringRole) Compared values are not the same
Actual (): [A,C,D,b,e]
Expected (): [A,b,C,D,e]
Loc: [/Users/mitch/dev/SortFilterProxyModel/tests/tst_rolesorter.qml(67)]
} | ||
compare(actualValues, sorter.expectedValues); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is one failing test that I don't know how to fix:
FAIL! : SortFilterProxyModel::StringSorterTests::test_stringSorters(doNotIgnorePunctuation) Compared values are not the same
Actual (): [a-a,aa,b-b,b-c,b.c,bc]
Expected (): [aa,a-a,b.c,b-b,bc,b-c]
Loc: [/Users/mitch/dev/SortFilterProxyModel/tests/tst_stringsorter.qml(82)]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this test is finnicky, it depends on ICU. I think it passes on Windows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I blacklisted it on macOS.
About the QVariant compare, does it work for bools ? Could you add QDate/QTime/QDateTime support ? |
Not currently, but I can make it. Not sure what it should do though... so I just made false < true. |
The PatternSyntax enum had to be removed as QRegularExpression only supports Perl-compatible regular expressions. As QVariant's comparison operators were removed, a simplified comparison is now done as a starting point, but should probably be extended to support more types. Fixes oKcerG#84 Fixes oKcerG#86
cmake: fix c++17 build requirement for msvc
I was getting the following error: /usr/bin/ld: isle/3rdparty/SortFilterProxyModel/CMakeFiles/SortFilterProxyModel.dir/SortFilterProxyModel_autogen/mocs_compilation.cpp.o: relocation R_X86_64_PC32 against symbol `__asan_option_detect_stack_use_after_return' can not be used when making a shared object; recompile with -fPIC And: /home/mitch/dev/bgv/isle/3rdparty/SortFilterProxyModel/qqmlsortfilterproxymodel.cpp:1: error: In included file: "You must build your code with position independent code if Qt was configured with -reduce-relocations. " "Compile your code with -fPIC (and not with -fPIE)." Initially I fixed this with: set(CMAKE_POSITION_INDEPENDENT_CODE ON) but was told the proper solution is to add the missing target_link_libraries.
Have an additional commit in MenloSystems:qt6 that allows compiling against Qt5 and Qt6 from the same codebase. |
Which implementation is preferable: |
The PatternSyntax enum had to be removed as QRegularExpression only
supports Perl-compatible regular expressions.
As QVariant's comparison operators were removed, a simplified
comparison is now done as a starting point, but should probably
be extended to support more types.
Fixes #84
Fixes #86