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

minor changes for better Qt6 compatibility #368

Closed
wants to merge 3 commits into from
Closed

minor changes for better Qt6 compatibility #368

wants to merge 3 commits into from

Commits on Aug 9, 2023

  1. include "backported" std::clamp() implementation only if no C++17

    it seems qmake shipped with Qt6 ignores `CONFIG += c++14` and as
    result no `-std` compiler option is set, hence it falls back to the
    default standard supported by compiler, which is C++17 nowadays in
    many cases (at least since GCC 11)
    
    on macOS it seems C++17 is enforced by Qt (C++98 by default)
    Kolcha committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    5ea631e View commit details
    Browse the repository at this point in the history
  2. modify includes for Qt6 compatibility

    it seems QAction was moved from QtWidgets to QtGUI in Qt6,
    fortunately, required correct header is included into the header
    generated from .ui file, so no need to include it explicitly in .cpp
    
    QActionGroup seems no longer implicitly included with QMenu or
    whatever, so need to include it explicitly
    Kolcha committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    3aaff5e View commit details
    Browse the repository at this point in the history
  3. do not use QStringRef

    QStringRef is no longer a part of Qt API since Qt6 (but still
    available in Qt5Compat module)
    
    there is no particular reason nor significant benefit in its usage
    in this particular (and just single) case, so replace it with
    regular substring operation (aka `QString::mid()`)
    Kolcha committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    192309e View commit details
    Browse the repository at this point in the history