qBound on Qt6 asserts if max > min. numberOfDesktops can be 0 when loading. This patch splits it into two lines to avoid the issue.