Qt 6.4 build compat, Windows VFS dedupe fix, scrollbar UX#1959
Merged
Conversation
* Replace QtTypes (Qt 6.5+) with QtGlobal in oxygine ShaderProgram.h and the ai/*.h selectors so headers parse on Qt 6.0+. * Wrap QDomDocument::setContent() in a Qt-version branch in Resources.cpp, fontmanager.cpp, audiomanager.cpp, and uifactory.cpp so the pre-6.5 out-parameter form is used on older Qt. * Replace QString::removeFirst() (Qt 6.5+) loop with QString::remove(0, n) in globalutils.cpp; one in-place call beats N single-char removes anyway. * Add 'add_compile_definitions(Qt_6_5=Qt_6_4)' for Qt < 6.5 in CMakeLists.txt so QDataStream::Version::Qt_6_5 references compile against the older save format constant. No-ops on Qt 6.5+; all version-guarded. Verified by full Commander_Wars build against Debian's Qt 6.4 in a sandbox.
VirtualPaths::setSearchPath() compared cwd vs userPath using QFileInfo's string equality, which is case-sensitive on Windows even though NTFS is not. Add a normalizedPath() helper using canonicalFilePath()/cleanPath() and lowercase-on-Windows, and use it for the existing dedupe check.
* Tap on the bare V_Scrollbar / H_Scrollbar track now jumps the slider to the click position; continued hold keeps tracking the cursor. * Destructors detach the global Stage move listener if one was registered, closing a leak on scrollbar disposal. * TOUCH_UP guards added on arrows and slider so spurious sigEndEditValue signals stop firing when the scrollbar wasn't active. * stopPropagation() added so scrollbar clicks don't bleed through to UI beneath them. * Panel skips auto-syncing scrollbar value while the user is actively sliding it, and adds a div > 0 guard to the V scrollbar value calc.
Robosturm
reviewed
May 4, 2026
|
|
||
| namespace | ||
| { | ||
| QString normalizedPath(const QFileInfo& info) |
Owner
There was a problem hiding this comment.
Make this a static function of the class as the rest instead of putting it in a private namespace
| } | ||
| } | ||
| else | ||
| else if (!m_VScrollbar->getVisible()) |
Owner
There was a problem hiding this comment.
Either this condition is wrong or it's missing for the HScrollbar
TheMasterCreed
added a commit
to TheMasterCreed/Commander_Wars
that referenced
this pull request
May 4, 2026
Robosturm review feedback on PR Robosturm#1959: relocate the helper out of the anonymous namespace so it matches the existing private-static convention used by processName, createSearchPathInternal, and findAllInternal.
TheMasterCreed
added a commit
to TheMasterCreed/Commander_Wars
that referenced
this pull request
May 4, 2026
Robosturm review feedback on PR Robosturm#1959: the V-axis branch was tightened to reset content X only when the scrollbar is hidden, but the H-axis branch kept a bare else that snapped Y to 0 every frame the scrollbar was visible but div<=0. Apply the same !getVisible() guard to H so both axes behave symmetrically.
GameMenue::doDespawnSlave and Multiplayermenu::doSaveLobbyState constructed the SLAVEINFODESPAWNING JSON manually and never inserted versionMajor / versionMinor / versionRevision / versionSufix. MainServer::onSlaveInfoDespawning called NetworkGameData::fromJson on the message, which read those missing keys as 0 and the empty string, so each suspended-slave entry in m_runningSlaves and m_runningLobbies got stamped 0.0.0- as its game version. When a player tried to rejoin from the My Games view, LobbyMenu::checkGameVersion compared 0.0.0- against GameVersion() (the live binary) and refused the join with "Game has a different version. Game version: 0.0.0-". Insert the four version keys at both call sites, mirroring NetworkGameData:: toJson, so suspended games carry their actual version through the despawn / relaunch round trip.
Robosturm review feedback on PR Robosturm#1959: relocate the helper out of the anonymous namespace so it matches the existing private-static convention used by processName, createSearchPathInternal, and findAllInternal.
Robosturm review feedback on PR Robosturm#1959: the V-axis branch was tightened to reset content X only when the scrollbar is hidden, but the H-axis branch kept a bare else that snapped Y to 0 every frame the scrollbar was visible but div<=0. Apply the same !getVisible() guard to H so both axes behave symmetrically.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Three independent fixes from building this fork against Debian's Qt 6.4
toolchain. Happy to split into separate PRs if preferred; commits are
already organized one-per-topic.
Restore Qt 6.4 build compatibility (commit 1)
The repo has a few Qt 6.5+-only API uses that block compilation on Qt 6.4
systems (Debian stable, several CI sandboxes, older distros).
ai/*.h selectors.
fontmanager.cpp, audiomanager.cpp, and uifactory.cpp; older Qt uses the
out-parameter form, 6.5+ keeps the ParseResult struct.
in globalutils.cpp; one in-place call beats N single-char removes anyway.
add_compile_definitions(Qt_6_5=Qt_6_4)for Qt < 6.5 inCMakeLists.txt so QDataStream::Version::Qt_6_5 references map to the
older save format constant.
All paths are version-guarded; no-ops on Qt 6.5+. Verified by full
Commander_Wars build against Debian's Qt 6.4 in a sandbox.
Compare canonical paths in VFS dedupe (commit 2)
VirtualPaths::setSearchPath() compared cwd vs userPath using QFileInfo's
string equality, which is case-sensitive on Windows even though NTFS is
not. Two paths pointing at the same directory (C:\Game vs c:\game) were
treated as different and the cwd entry was added redundantly.
Add a normalizedPath() helper using canonicalFilePath() (with
absoluteFilePath() fallback), cleanPath(), and lowercase-on-Windows. Use
it for the existing dedupe check. No search paths added or removed.
Click-to-scroll on scrollbar tracks, plus panel sync fixes (commit 3)
V_Scrollbar and H_Scrollbar only responded to the slider thumb and arrow
buttons; clicking on the bare track did nothing.
Scrollbar changes:
the cursor (m_trackSliding state).