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

QList::toSet is deprecated #425

Closed
1 task done
Tracked by #446
mmmaisel opened this issue Apr 22, 2022 · 2 comments · Fixed by #497
Closed
1 task done
Tracked by #446

QList::toSet is deprecated #425

mmmaisel opened this issue Apr 22, 2022 · 2 comments · Fixed by #497
Labels
refactor Issues connected with cleaning-up repository

Comments

@mmmaisel
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

There is a compiler warning about deprecation of QList::toSet.

Expected Behavior

No warnings.

Steps To Reproduce

Compile from source.

Environment

- OS: Arch Linux (22. April 2022)
- AntiMicroX version: git 85bbc6bf

Anything else?

QList::toSet is deprecated since Qt 5.14 but the suggested alternative
QSet(list.cbegin(), list.cend()) only exists since Qt 5.14.
This causes compilation errors on Ubuntu 20.4 and earlier if fixed.

@mmmaisel mmmaisel added the bug Something isn't working label Apr 22, 2022
@pktiuk pktiuk added the refactor Issues connected with cleaning-up repository label Apr 22, 2022
@pktiuk
Copy link
Member

pktiuk commented Apr 22, 2022

Linked with: #318

@pktiuk pktiuk mentioned this issue May 8, 2022
10 tasks
@pktiuk
Copy link
Member

pktiuk commented Jul 26, 2022

In this case, the only viable solution looks like this

#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
                        QSet<AutoProfileInfo *> tempSet(templist.begin(), list.end());
#else
                        QSet<AutoProfileInfo *> tempSet;
                        tempSet = getWindowNameProfileAssignments().value(nowWindowName).toSet();
#endif

@pktiuk pktiuk removed the bug Something isn't working label Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Issues connected with cleaning-up repository
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants