chat: require Qt 6.8 and fix #includes #3498
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The theme of this PR is code simplification and preventative maintenance related to Qt updates.
Users have reported build failures on versions of Qt prior to 6.8. We only ever build against Qt 6.8 and newer, so let's require that explicitly. Otherwise, we would have to put effort towards actually supporting older Qt, which is not worth our time. This allows us to simplify server.cpp, which had some code that only applied to older Qt.
Additionally, fix the #includes based on this Qt version. One of the more notable changes since Qt 6.4 was the split of the <QtGlobal> header (and we no longer support Qt 6.4). But a pass with IWYU shows that there were less cosmetic issues as well. The goal of this change is to be robust to Qt updates by relying only on names documented to be declared in a given header.