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

chore: use std::as_const() instead of qAsConst #108

Merged
merged 1 commit into from
Nov 27, 2023
Merged

chore: use std::as_const() instead of qAsConst #108

merged 1 commit into from
Nov 27, 2023

Conversation

wineee
Copy link
Contributor

@wineee wineee commented Nov 24, 2023

Warning: constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = const QList; typename std::add_const<_Tp>::type = const QList]’ is deprecated: Use std::as_const() instead. [-Wdeprecated-declarations]

@BLumia
Copy link
Owner

BLumia commented Nov 25, 2023

Currently this application doesn't require C++ 17 to build, The MinGW version shipped by TQtC also doesn't use C++ 17 by default, thus the Qt 5 builds are failed.

Maybe adding set(CMAKE_CXX_STANDARD 17) and set(CMAKE_CXX_STANDARD_REQUIRED ON) could be a solution but I haven't tested if that can make those existing CI build pass. If adding those could resolve the CI building issue, this can be merged. If not, then maybe this need to be merged after we completely drop Qt 5 support.

The AppVeyor Qt 6 build failure could be ignored currently, I'll try to check why that one is failed. By the way, I fixed the REUSE Compliance Check CI in last commit. If you made a change. Consider also rebase the code so the REUSE check could pas :)

@BLumia
Copy link
Owner

BLumia commented Nov 26, 2023

Seems it works fine. You can rebase again and the remaining Qt 6 CI will also pass. I'll merge the patch after the rebase :)

Waring: constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = const QList<QString>; typename std::add_const<_Tp>::type = const QList<QString>]’ is deprecated: Use std::as_const() instead. [-Wdeprecated-declarations]
@BLumia BLumia merged commit 2d718b0 into BLumia:master Nov 27, 2023
4 checks passed
@wineee wineee deleted the const branch November 27, 2023 01:59
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