Skip to content

Commit

Permalink
Add support for Qt6 and disable Qt5
Browse files Browse the repository at this point in the history
Required changes to use Qt6 and disable support for Qt5. There are still some adjustments related to Qt6 to be done, but these changes are not required to make Qt6 compile on relevant systems.

* Build system changes Qt6
* Override enterEvent
* Update QKeySequence
* QtChart changes
* Use QScreen to instepct dotsPerInch
* Add app->quit()
* Required updates for code related to QString
* Use RiaQDateTimeTools
* Required changes related to regular expressions
* Support compile on Qt  < 6.5
When version < 6.5 is found, qt_generate_deploy_app_script() is disabled. Compilation of ResInsight will work, but the install target will be incomplete.
* Octave: add missing header.
* Qt Advanced Docking: force Qt6 where both Qt5 and Qt6 is available.

---------

Co-authored-by: magnesj <[email protected]>
Co-authored-by: Kristian Bendiksen <[email protected]>
  • Loading branch information
3 people authored Sep 30, 2024
1 parent 596ab56 commit 212f5bf
Show file tree
Hide file tree
Showing 51 changed files with 499 additions and 530 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/ResInsightWithCache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ jobs:
publish-to-pypi: false,
vcpkg-bootstrap: bootstrap-vcpkg.bat,
vcpkg-triplet: x64-windows-release,
qt-version: 5.12.12,
qt-version: 6.7.0,
ri-unit-test-path: "ResInsight-tests",
}
- {
name: "Ubuntu 22.04 gcc",
Expand All @@ -51,7 +52,8 @@ jobs:
publish-to-pypi: true,
vcpkg-bootstrap: bootstrap-vcpkg.sh,
vcpkg-triplet: x64-linux-release,
qt-version: 5.12.12,
qt-version: 6.7.0,
ri-unit-test-path: "ResInsight-tests",
}
- {
name: "Ubuntu 22.04 clang-16",
Expand All @@ -65,7 +67,8 @@ jobs:
publish-to-pypi: false,
vcpkg-bootstrap: bootstrap-vcpkg.sh,
vcpkg-triplet: x64-linux-release,
qt-version: 5.12.12,
qt-version: 6.7.0,
ri-unit-test-path: "ResInsight-tests",
}
steps:
- name: Checkout
Expand Down Expand Up @@ -95,6 +98,8 @@ jobs:
- name: Use CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.28.0"

- name: Use MSVC (Windows)
uses: ilammy/msvc-dev-cmd@v1
Expand Down Expand Up @@ -178,7 +183,7 @@ jobs:
version: ${{ matrix.config.qt-version }}
dir: "${{ github.workspace }}/Qt/"
cache: true
modules: "qtnetworkauth"
modules: "qtnetworkauth qtcharts qt5compat"

- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
Expand Down Expand Up @@ -226,7 +231,9 @@ jobs:
if: matrix.config.execute-unit-tests
shell: bash
run: |
cmakebuild/ApplicationLibCode/UnitTests/ResInsight-tests
echo "Content of unit test folder "
ls cmakebuild/${{ matrix.config.ri-unit-test-path }}
cmakebuild/${{ matrix.config.ri-unit-test-path }}
- name: (Python) Check types using mypy
if: matrix.config.build-python-module
Expand All @@ -239,7 +246,7 @@ jobs:
- name: Run pytest
if: matrix.config.execute-pytests
env:
RESINSIGHT_EXECUTABLE: ${{ runner.workspace }}/ResInsight/cmakebuild/ApplicationExeCode/ResInsight
RESINSIGHT_EXECUTABLE: ${{ runner.workspace }}/ResInsight/cmakebuild/ResInsight
run: |
cd GrpcInterface/Python
python setup.py sdist
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CMakeCache.txt
cmake_install.cmake
CPack*.cmake
CTest*.cmake
cmakebuild/
cmakebuild*/

#Unit test binaries
*_UnitTests
Expand Down Expand Up @@ -64,7 +64,7 @@ out
build
CMakeSettings.json
enc_temp_folder
CMakePresets.json
CMakeUserPresets.json

#Visual Studio Code files
.vscode
Expand Down
Loading

0 comments on commit 212f5bf

Please sign in to comment.