Skip to content

Update MSVC compiler options and CMake configuration for 1.5.1#459

Merged
j2doll merged 9 commits into
QtExcel:masterfrom
j2doll:master
Jun 16, 2026
Merged

Update MSVC compiler options and CMake configuration for 1.5.1#459
j2doll merged 9 commits into
QtExcel:masterfrom
j2doll:master

Conversation

@j2doll

@j2doll j2doll commented Jun 16, 2026

Copy link
Copy Markdown
Member

This pull request updates the QXlsx library to improve C++ standard handling, enhance MSVC compatibility, and clean up some legacy code and configuration. The most important changes are grouped below:

Build System and C++ Standard Improvements:

  • Updated the QXlsx library version from 1.5.0 to 1.5.1 in CMakeLists.txt to reflect the new release.
  • Enhanced C++ standard selection in QXlsx.pri: now sets C++11 for Qt 5 and C++17 for Qt 6, with messages for clarity.

MSVC and Cross-Platform Compatibility:

  • Added a workaround in xlsxglobal.h for MSVC to define make_checked_array_iterator and ensure compatibility with MSVC's standard library extensions.
  • For MSVC builds, forced the /permissive compile flag in CMakeLists.txt to override /permissive- and avoid standards compliance issues.

Code and Configuration Cleanup:

  • Removed a hard-coded QXlsx version string from mainwindow.cpp as it is now managed in the build system.
  • Cleaned up the project file by removing unused header and source entries related to xlsxreadsax from QXlsx.pro.

j2doll and others added 9 commits June 17, 2026 02:54
- Disable strict MSVC compliance mode to prevent build errors  caused by standard library ('stdext') changes in newer MSVC compilers with older Qt headers.
Replace MSVC compliance mode disabling with a definition to allow compiler and STL version mismatch.
Updated CMakeLists.txt to modify compiler options for MSVC.
Removed MSVC specific flags for permissive mode.
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@j2doll j2doll merged commit 0216c96 into QtExcel:master Jun 16, 2026
26 of 27 checks passed
@dantti

dantti commented Jun 17, 2026

Copy link
Copy Markdown
Member

@j2doll what do you think about dropping qmake and Qt5 support? It's pretty much EOL

@j2doll

j2doll commented Jun 20, 2026

Copy link
Copy Markdown
Member Author

@j2doll what do you think about dropping qmake and Qt5 support? It's pretty much EOL

Thank you for reporting.

I agree with that. Qt5 seems to have ended. 💀



:copilot: Qt 5.15 LTS Support Lifetime Summary

📅 Support End Dates by License

  • Open Source (Community): December 8, 2020
    (Public patch releases were restricted 6 months after the initial launch).
  • Standard Commercial: May 26, 2023
    (Standard 3-year commercial support window).
  • Commercial Extended Support: May 26, 2025
    (An additional 2-year extension, marking the absolute end of the standard LTS lifecycle).

⚠️ Current Status (As of 2026)

  • End of Life (EoL): All standard and extended support for Qt 5.15 LTS has officially expired. No further regular bug fixes or security patches are being released.
  • Migration Recommended: It is highly recommended to migrate legacy systems to Qt 6 LTS (such as Qt 6.5 LTS or Qt 6.8 LTS) to ensure ongoing security, platform compatibility, and technical support.


If we use Qt 6, There are things to consider.
We need to upload the C++ version with Qt 6.
Currently, QXlsx only uses modern c++ at the C++11 level.


If any one have any opinions on this, please leave a comment. 📫



:copilot: Qt 6 and C++ version

Qt 6 requires C++17 as the minimum baseline for both building the framework itself and developing applications with it.

While the minimum requirement remains C++17 across all minor versions (from Qt 6.0 up to Qt 6.8+), newer minor versions continuously expand support for newer C++ standards ($C++20$ and $C++23$) and introduce stricter requirements for specific modules.

C++ Requirements by Qt 6 Minor Version

Qt Version Minimum C++ Standard Key Changes & Standard Support
Qt 6.0 ~ 6.2 LTS C++17 C++17 became the strict baseline for Qt 6. Started adding partial support for C++20 features (e.g., designated initializers).
Qt 6.3 ~ 6.5 LTS C++17 Enhanced integration with std::chrono and expanded C++20-related macros and helper functions.
Qt 6.6 ~ 6.7 C++17 Improved compatibility with C++20 containers. Active compiler testing for C++23 compatibility.
Qt 6.8 LTS ~ 6.9+ C++17


(C++20 for certain modules) | Qt WebEngine and other Chromium-based modules now strictly require a C++20 compiler. Deeper integration with C++20/C++23 standard library features. |

Key Highlights & Considerations

  • Framework Baseline: You must use a compiler that supports at least C++17 to build or develop with any Qt 6 version (upgraded from the C++11 baseline in Qt 5).
  • The Qt WebEngine Exception: Starting from Qt 6.8 LTS, the Qt WebEngine module requires a C++20 compiler due to upstream Chromium updates. If your project utilizes WebEngine, your build environment must be set to C++20.
  • Using C++20/C++23 in Your Code: Even though Qt 6 is built on C++17, you can freely set CMAKE_CXX_STANDARD to 20 or 23 in your own project's CMakeLists.txt. Qt 6 fully supports this, and newer minor versions (especially Qt 6.5+) offer much smoother type conversions between Qt types and modern C++ types (like QDateTime and std::chrono).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants