mirror of
https://gitlab.com/smart-pattern/valentina.git
synced 2024-09-19 23:34:04 +02:00
Compare commits
13 commits
fe8f126424
...
05ed63c3eb
Author | SHA1 | Date | |
---|---|---|---|
05ed63c3eb | |||
324be6e872 | |||
ef7e8f942c | |||
6721553c53 | |||
0513b46a17 | |||
01fe967da8 | |||
ee5f9d2f06 | |||
b6c610da7f | |||
9ddbb28e33 | |||
80affdba85 | |||
31a0f3d82c | |||
a40ce741ad | |||
e3a8cef544 |
133
.cirrus.yml
133
.cirrus.yml
|
@ -25,6 +25,7 @@ linux_qt6_task_template: &LINUX_QT6_TASK_TEMPLATE
|
||||||
- mkdir -pm 0700 $XDG_RUNTIME_DIR
|
- mkdir -pm 0700 $XDG_RUNTIME_DIR
|
||||||
- Xvfb $DISPLAY -ac -screen 0 1600x1200x24+32 -nolisten tcp -nolisten unix &
|
- Xvfb $DISPLAY -ac -screen 0 1600x1200x24+32 -nolisten tcp -nolisten unix &
|
||||||
- sleep 1
|
- sleep 1
|
||||||
|
- ccache --set-config=sloppiness=pch_defines,time_macros
|
||||||
- echo $PATH
|
- echo $PATH
|
||||||
- which qmake6
|
- which qmake6
|
||||||
- which qbs
|
- which qbs
|
||||||
|
@ -37,8 +38,9 @@ linux_qt6_task_template: &LINUX_QT6_TASK_TEMPLATE
|
||||||
- qbs setup-qt /usr/bin/qmake6 qt6
|
- qbs setup-qt /usr/bin/qmake6 qt6
|
||||||
- qbs config profiles.qt6.baseProfile ${COMPILER}
|
- qbs config profiles.qt6.baseProfile ${COMPILER}
|
||||||
- qbs-config defaultProfile qt6
|
- qbs-config defaultProfile qt6
|
||||||
- qbs build -f valentina.qbs -d build --command-echo-mode command-line profile:qt6 config:release
|
- qbs build -f valentina.qbs -d build --command-echo-mode command-line profile:qt6 config:release modules.buildconfig.enableCcache:${ENABLE_CCACHE}
|
||||||
- qbs -p autotest-runner -d build profile:qt6 config:release
|
- qbs -p autotest-runner -d build profile:qt6 config:release
|
||||||
|
- ccache -s
|
||||||
|
|
||||||
linux_qt5_qmake_task_template: &LINUX_QT5_QMAKE_TASK_TEMPLATE
|
linux_qt5_qmake_task_template: &LINUX_QT5_QMAKE_TASK_TEMPLATE
|
||||||
install_script:
|
install_script:
|
||||||
|
@ -57,6 +59,7 @@ linux_qt5_qmake_task_template: &LINUX_QT5_QMAKE_TASK_TEMPLATE
|
||||||
- make -j$(nproc)
|
- make -j$(nproc)
|
||||||
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$CIRRUS_WORKING_DIR/build/src/libs/vpropertyexplorer/bin:$CIRRUS_WORKING_DIR/build/src/libs/qmuparser/bin"
|
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$CIRRUS_WORKING_DIR/build/src/libs/vpropertyexplorer/bin:$CIRRUS_WORKING_DIR/build/src/libs/qmuparser/bin"
|
||||||
- xvfb-run -a make --silent check TESTARGS="-silent"
|
- xvfb-run -a make --silent check TESTARGS="-silent"
|
||||||
|
- ccache -s
|
||||||
|
|
||||||
linux_qt5_qbs_task_template: &LINUX_QT5_QBS_TASK_TEMPLATE
|
linux_qt5_qbs_task_template: &LINUX_QT5_QBS_TASK_TEMPLATE
|
||||||
install_script:
|
install_script:
|
||||||
|
@ -66,6 +69,7 @@ linux_qt5_qbs_task_template: &LINUX_QT5_QBS_TASK_TEMPLATE
|
||||||
- mkdir -pm 0700 $XDG_RUNTIME_DIR
|
- mkdir -pm 0700 $XDG_RUNTIME_DIR
|
||||||
- Xvfb $DISPLAY -ac -screen 0 1600x1200x24+32 -nolisten tcp -nolisten unix &
|
- Xvfb $DISPLAY -ac -screen 0 1600x1200x24+32 -nolisten tcp -nolisten unix &
|
||||||
- sleep 1
|
- sleep 1
|
||||||
|
- ccache --set-config=sloppiness=pch_defines,time_macros
|
||||||
- echo $PATH
|
- echo $PATH
|
||||||
- which qmake
|
- which qmake
|
||||||
- which qbs
|
- which qbs
|
||||||
|
@ -78,67 +82,11 @@ linux_qt5_qbs_task_template: &LINUX_QT5_QBS_TASK_TEMPLATE
|
||||||
- qbs setup-qt /usr/bin/qmake qt5
|
- qbs setup-qt /usr/bin/qmake qt5
|
||||||
- qbs-config defaultProfile qt5
|
- qbs-config defaultProfile qt5
|
||||||
- qbs config profiles.qt5.baseProfile ${COMPILER}
|
- qbs config profiles.qt5.baseProfile ${COMPILER}
|
||||||
- qbs build -f valentina.qbs -d build --command-echo-mode command-line profile:qt5 config:release
|
- qbs build -f valentina.qbs -d build --command-echo-mode command-line profile:qt5 config:release modules.buildconfig.enableCcache:${ENABLE_CCACHE}
|
||||||
- qbs -p autotest-runner -d build profile:qt5 config:release
|
- qbs -p autotest-runner -d build profile:qt5 config:release
|
||||||
|
- ccache -s
|
||||||
|
|
||||||
#macos_task_template: &MACOS_TASK_TEMPLATE
|
linux_task:
|
||||||
# << : *REGULER_TASK_TEMPLATE
|
|
||||||
# timeout_in: 120m
|
|
||||||
# env:
|
|
||||||
# ACCESS_TOKEN: ENCRYPTED[81e0b2381ffb628b73f5c94f834010e6631191e0ad03cdd0850d440fb2737a74b68131d842030f010c1bf73ab4cdc1ae]
|
|
||||||
# QTDIR: "/usr/local/opt/qt5"
|
|
||||||
# PATH: ${HOME}/.local/bin:$QTDIR/bin:${PATH}
|
|
||||||
# # ^ add user paths
|
|
||||||
# PIP_CACHE_DIR: ${HOME}/.cache/pip
|
|
||||||
# DEPLOY: "true"
|
|
||||||
# LDFLAGS: "-L$QTDIR/lib"
|
|
||||||
# CPPFLAGS: "-I$QTDIR/include"
|
|
||||||
# PKG_CONFIG_PATH: "/usr/local/opt/qt5/lib/pkgconfig"
|
|
||||||
# global_homebrew_cache:
|
|
||||||
# folder: "/usr/local/Homebrew"
|
|
||||||
# local_homebrew_cache:
|
|
||||||
# folder: "$HOME/Library/Caches/Homebrew"
|
|
||||||
# pip_cache:
|
|
||||||
# folder: ${PIP_CACHE_DIR}
|
|
||||||
# install_script:
|
|
||||||
# - brew update > /dev/null
|
|
||||||
# - brew install qt5 coreutils ccache
|
|
||||||
# - chmod -R 755 /usr/local/opt/qt5/*
|
|
||||||
# - python3 --version
|
|
||||||
# - pip3 install --user --upgrade pip dropbox
|
|
||||||
# build_script:
|
|
||||||
# - mkdir build
|
|
||||||
# - cd build
|
|
||||||
# - pwd
|
|
||||||
# - qmake --version
|
|
||||||
# - qmake ../Valentina.pro -r CONFIG+=noDebugSymbols CONFIG+=checkWarnings CONFIG+=noTests
|
|
||||||
# - ${COMPILER} --version
|
|
||||||
# - make -j$(nproc)
|
|
||||||
# deploy_script:
|
|
||||||
# - pwd
|
|
||||||
# - $CIRRUS_WORKING_DIR/scripts/cirrus-deploy.sh
|
|
||||||
# before_cache_script:
|
|
||||||
# - brew cleanup
|
|
||||||
# env:
|
|
||||||
# COMPILER: clang
|
|
||||||
|
|
||||||
#task:
|
|
||||||
# name: 'macOS Catalina 10.15 [no tests]'
|
|
||||||
# macos_instance:
|
|
||||||
# image: catalina-xcode-11.3.1
|
|
||||||
# << : *MACOS_TASK_TEMPLATE
|
|
||||||
# env:
|
|
||||||
# PLATFORM: "macOS_10.14+"
|
|
||||||
|
|
||||||
#task:
|
|
||||||
# name: 'macOS Big Sur 11 [no tests]'
|
|
||||||
# macos_instance:
|
|
||||||
# image: big-sur-xcode-12.4
|
|
||||||
# << : *MACOS_TASK_TEMPLATE
|
|
||||||
# env:
|
|
||||||
# PLATFORM: "macOS_10.15+"
|
|
||||||
|
|
||||||
task:
|
|
||||||
<< : *REGULER_TASK_TEMPLATE
|
<< : *REGULER_TASK_TEMPLATE
|
||||||
env:
|
env:
|
||||||
DEBIAN_FRONTEND: "noninteractive"
|
DEBIAN_FRONTEND: "noninteractive"
|
||||||
|
@ -164,10 +112,12 @@ task:
|
||||||
<< : *LINUX_QT5_QBS_TASK_TEMPLATE
|
<< : *LINUX_QT5_QBS_TASK_TEMPLATE
|
||||||
env:
|
env:
|
||||||
QT_SELECT: "qt5"
|
QT_SELECT: "qt5"
|
||||||
|
ENABLE_CCACHE: false
|
||||||
- name: 'latest Clang [Qt6]'
|
- name: 'latest Clang [Qt6]'
|
||||||
<< : *LINUX_QT6_TASK_TEMPLATE
|
<< : *LINUX_QT6_TASK_TEMPLATE
|
||||||
env:
|
env:
|
||||||
QT_SELECT: "qt6"
|
QT_SELECT: "qt6"
|
||||||
|
ENABLE_CCACHE: false
|
||||||
- container:
|
- container:
|
||||||
image: dismine/gcc-ubuntu:latest
|
image: dismine/gcc-ubuntu:latest
|
||||||
memory: 16G # Set to 16GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-container
|
memory: 16G # Set to 16GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-container
|
||||||
|
@ -185,7 +135,70 @@ task:
|
||||||
<< : *LINUX_QT5_QBS_TASK_TEMPLATE
|
<< : *LINUX_QT5_QBS_TASK_TEMPLATE
|
||||||
env:
|
env:
|
||||||
QT_SELECT: "qt5"
|
QT_SELECT: "qt5"
|
||||||
|
ENABLE_CCACHE: true
|
||||||
- name: 'latest GCC [Qt6]'
|
- name: 'latest GCC [Qt6]'
|
||||||
<< : *LINUX_QT6_TASK_TEMPLATE
|
<< : *LINUX_QT6_TASK_TEMPLATE
|
||||||
env:
|
env:
|
||||||
QT_SELECT: "qt6"
|
QT_SELECT: "qt6"
|
||||||
|
ENABLE_CCACHE: true
|
||||||
|
|
||||||
|
macos_task_template: &MACOS_TASK_TEMPLATE
|
||||||
|
<< : *REGULER_TASK_TEMPLATE
|
||||||
|
timeout_in: 120m
|
||||||
|
env:
|
||||||
|
ACCESS_TOKEN: ENCRYPTED[81e0b2381ffb628b73f5c94f834010e6631191e0ad03cdd0850d440fb2737a74b68131d842030f010c1bf73ab4cdc1ae]
|
||||||
|
QTDIR: "/opt/homebrew/opt/qt6"
|
||||||
|
PATH: ${HOME}/.local/bin:$QTDIR/bin:${PATH}
|
||||||
|
# ^ add user paths
|
||||||
|
PIP_CACHE_DIR: ${HOME}/.cache/pip
|
||||||
|
LDFLAGS: "-L$QTDIR/lib"
|
||||||
|
CPPFLAGS: "-I$QTDIR/include"
|
||||||
|
PKG_CONFIG_PATH: "/opt/homebrew/opt/qt6/lib/pkgconfig"
|
||||||
|
global_homebrew_cache:
|
||||||
|
folder: "/usr/local/Homebrew"
|
||||||
|
local_homebrew_cache:
|
||||||
|
folder: "$HOME/Library/Caches/Homebrew"
|
||||||
|
pip_cache:
|
||||||
|
folder: ${PIP_CACHE_DIR}
|
||||||
|
install_script:
|
||||||
|
- brew update > /dev/null
|
||||||
|
- brew install qt6 coreutils ccache conan qbs
|
||||||
|
- chmod -R 755 /opt/homebrew/opt/qt6/*
|
||||||
|
- python3 --version
|
||||||
|
- pip3 install --user --upgrade pip dropbox
|
||||||
|
- ccache --set-config=sloppiness=pch_defines,time_macros
|
||||||
|
- clang --version
|
||||||
|
- qmake --version
|
||||||
|
- which qmake
|
||||||
|
- qbs --version
|
||||||
|
build_script:
|
||||||
|
- pwd
|
||||||
|
- qbs setup-toolchains --detect
|
||||||
|
- qbs config --list profiles
|
||||||
|
- qbs setup-qt /opt/homebrew/opt/qt6/bin/qmake qt6
|
||||||
|
- qbs-config defaultProfile qt6
|
||||||
|
- qbs config profiles.qt6.baseProfile clang
|
||||||
|
- qbs build -f valentina.qbs -d $CIRRUS_WORKING_DIR/build --command-echo-mode command-line config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:$CIRRUS_WORKING_DIR/build/install-root profile:qt6 project.enableConan:true
|
||||||
|
- ccache -s
|
||||||
|
deploy_script:
|
||||||
|
- pwd
|
||||||
|
- $CIRRUS_WORKING_DIR/scripts/cirrus-deploy.sh
|
||||||
|
before_cache_script:
|
||||||
|
- brew cleanup
|
||||||
|
|
||||||
|
macos_task:
|
||||||
|
macos_instance:
|
||||||
|
image: ghcr.io/cirruslabs/macos-monterey-xcode:13.4.1
|
||||||
|
<< : *MACOS_TASK_TEMPLATE
|
||||||
|
env:
|
||||||
|
DEPLOY: "true"
|
||||||
|
QT_BRANCH: Qt6
|
||||||
|
ARCHITECTURE: arm64
|
||||||
|
PLATFORM: "macOS_11+"
|
||||||
|
matrix:
|
||||||
|
- name: 'macOS Monterey 12 [signle bundle, no tests]'
|
||||||
|
env:
|
||||||
|
MULTI_BUNDLE: true
|
||||||
|
- name: 'macOS Monterey 12 [multi bundle, no tests]'
|
||||||
|
env:
|
||||||
|
MULTI_BUNDLE: false
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
- [smart-pattern/valentina#189] Fix regression in dialog Known measurements.
|
- [smart-pattern/valentina#189] Fix regression in dialog Known measurements.
|
||||||
- New option. Default piece label template for new pieces.
|
- New option. Default piece label template for new pieces.
|
||||||
- Shortcut to quickly enable/disable Interactive tools mode.
|
- Shortcut to quickly enable/disable Interactive tools mode.
|
||||||
|
- Improve labels for V notch.
|
||||||
|
- Fix QT issue on MacOS version 11.0 "Big Sur".
|
||||||
|
|
||||||
# Valentina 0.7.52 September 12, 2022
|
# Valentina 0.7.52 September 12, 2022
|
||||||
- Fix crash when default locale is ru.
|
- Fix crash when default locale is ru.
|
||||||
|
|
|
@ -156,7 +156,9 @@ Module {
|
||||||
return "11.0";
|
return "11.0";
|
||||||
|
|
||||||
// See page https://doc.qt.io/qt-6.4/supported-platforms.html
|
// See page https://doc.qt.io/qt-6.4/supported-platforms.html
|
||||||
return "10.14"; // Qt 6.4 and above
|
// According to the documentation minimal version must be 10.14. But for some reason it requires 10.15 to
|
||||||
|
// build.
|
||||||
|
return "10.15"; // Qt 6.4 and above
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Qt.core.versionMajor >= 5) {
|
if (Qt.core.versionMajor >= 5) {
|
||||||
|
|
|
@ -20,16 +20,32 @@ check_failure() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ "$DEPLOY" == "true" ]]; then
|
if [[ "$DEPLOY" == "true" ]]; then
|
||||||
$CIRRUS_WORKING_DIR/scripts/macfixqtdylibrpath.py $CIRRUS_WORKING_DIR/build/src/app/valentina/bin/Valentina.app;
|
|
||||||
check_failure "Unable to patch the app bundle.";
|
|
||||||
|
|
||||||
print_info "Start compressing.";
|
print_info "Start compressing.";
|
||||||
tar -C $CIRRUS_WORKING_DIR/build/src/app/valentina/bin --exclude "*.DS_Store" -cvJf valentina-${PLATFORM}-${CIRRUS_CHANGE_IN_REPO}.tar.xz Valentina.app/;
|
tar -C $CIRRUS_WORKING_DIR/build/install-root/usr/local/Applications --exclude "*.DS_Store" -cvJf valentina-${PLATFORM}-${QT_BRANCH}-${ARCHITECTURE}-${CIRRUS_CHANGE_IN_REPO}.tar.xz Valentina.app/;
|
||||||
check_failure "Unable to create an archive.";
|
check_failure "Unable to create an archive for Valentina bundle.";
|
||||||
|
|
||||||
|
if [[ "$MULTI_BUNDLE" == "true" ]]; then
|
||||||
|
tar -C $CIRRUS_WORKING_DIR/build/install-root/usr/local/Applications --exclude "*.DS_Store" -cvJf tape-${PLATFORM}-${QT_BRANCH}-${ARCHITECTURE}-${CIRRUS_CHANGE_IN_REPO}.tar.xz Tape.app/;
|
||||||
|
check_failure "Unable to create an archive for Tape bundle.";
|
||||||
|
|
||||||
|
tar -C $CIRRUS_WORKING_DIR/build/install-root/usr/local/Applications --exclude "*.DS_Store" -cvJf puzzle-${PLATFORM}-${QT_BRANCH}-${ARCHITECTURE}-${CIRRUS_CHANGE_IN_REPO}.tar.xz Puzzle.app/;
|
||||||
|
check_failure "Unable to create an archive for Puzzle bundle.";
|
||||||
|
fi
|
||||||
|
|
||||||
print_info "Start uploading.";
|
print_info "Start uploading.";
|
||||||
python3 $CIRRUS_WORKING_DIR/scripts/deploy.py upload $ACCESS_TOKEN $CIRRUS_WORKING_DIR/valentina-${PLATFORM}-${CIRRUS_CHANGE_IN_REPO}.tar.xz "/0.7.x/Mac OS X/valentina-${PLATFORM}-${CIRRUS_CHANGE_IN_REPO}.tar.xz";
|
if [[ "$MULTI_BUNDLE" == "false" ]]; then
|
||||||
check_failure "Unable to upload.";
|
python3 $CIRRUS_WORKING_DIR/scripts/deploy.py upload $ACCESS_TOKEN $CIRRUS_WORKING_DIR/valentina-${PLATFORM}-${QT_BRANCH}-${ARCHITECTURE}-${CIRRUS_CHANGE_IN_REPO}.tar.xz "/0.7.x/Mac OS X/valentina-${PLATFORM}-${QT_BRANCH}-${ARCHITECTURE}-${CIRRUS_CHANGE_IN_REPO}.tar.xz";
|
||||||
|
check_failure "Unable to upload Valentina bundle.";
|
||||||
|
else
|
||||||
|
python3 $CIRRUS_WORKING_DIR/scripts/deploy.py upload $ACCESS_TOKEN $CIRRUS_WORKING_DIR/valentina-${PLATFORM}-${QT_BRANCH}-${ARCHITECTURE}-${CIRRUS_CHANGE_IN_REPO}.tar.xz "/0.7.x/Mac OS X/valentina-${PLATFORM}-${QT_BRANCH}-${ARCHITECTURE}-multibundle-${CIRRUS_CHANGE_IN_REPO}/valentina-${PLATFORM}-${QT_BRANCH}-${ARCHITECTURE}-${CIRRUS_CHANGE_IN_REPO}.tar.xz";
|
||||||
|
check_failure "Unable to upload Valentina bundle.";
|
||||||
|
|
||||||
|
python3 $CIRRUS_WORKING_DIR/scripts/deploy.py upload $ACCESS_TOKEN $CIRRUS_WORKING_DIR/tape-${PLATFORM}-${QT_BRANCH}-${ARCHITECTURE}-${CIRRUS_CHANGE_IN_REPO}.tar.xz "/0.7.x/Mac OS X/valentina-${PLATFORM}-${QT_BRANCH}-${ARCHITECTURE}-multibundle-${CIRRUS_CHANGE_IN_REPO}/tape-${PLATFORM}-${QT_BRANCH}-${ARCHITECTURE}-${CIRRUS_CHANGE_IN_REPO}.tar.xz";
|
||||||
|
check_failure "Unable to upload Tape bundle.";
|
||||||
|
|
||||||
|
python3 $CIRRUS_WORKING_DIR/scripts/deploy.py upload $ACCESS_TOKEN $CIRRUS_WORKING_DIR/puzzle-${PLATFORM}-${QT_BRANCH}-${ARCHITECTURE}-${CIRRUS_CHANGE_IN_REPO}.tar.xz "/0.7.x/Mac OS X/valentina-${PLATFORM}-${QT_BRANCH}-${ARCHITECTURE}-multibundle-${CIRRUS_CHANGE_IN_REPO}/puzzle-${PLATFORM}-${QT_BRANCH}-${ARCHITECTURE}-${CIRRUS_CHANGE_IN_REPO}.tar.xz";
|
||||||
|
check_failure "Unable to upload Tape bundle.";
|
||||||
|
fi
|
||||||
|
|
||||||
print_info "Successfully uploaded.";
|
print_info "Successfully uploaded.";
|
||||||
else
|
else
|
||||||
|
|
|
@ -69,6 +69,12 @@ auto main(int argc, char *argv[]) -> int
|
||||||
|
|
||||||
#ifndef Q_OS_MAC // supports natively
|
#ifndef Q_OS_MAC // supports natively
|
||||||
InitHighDpiScaling(argc, argv);
|
InitHighDpiScaling(argc, argv);
|
||||||
|
#endif //ndef Q_OS_MAC
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
#if MACOS_LAYER_BACKING_AFFECTED
|
||||||
|
MacosEnableLayerBacking();
|
||||||
|
#endif // MACOS_LAYER_BACKING_AFFECTED
|
||||||
#endif // Q_OS_MAC
|
#endif // Q_OS_MAC
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
|
|
@ -75,6 +75,12 @@ auto main(int argc, char *argv[]) -> int
|
||||||
InitHighDpiScaling(argc, argv);
|
InitHighDpiScaling(argc, argv);
|
||||||
#endif //Q_OS_MAC
|
#endif //Q_OS_MAC
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
#if MACOS_LAYER_BACKING_AFFECTED
|
||||||
|
MacosEnableLayerBacking();
|
||||||
|
#endif // MACOS_LAYER_BACKING_AFFECTED
|
||||||
|
#endif // Q_OS_MAC
|
||||||
|
|
||||||
MApplication app(argc, argv);
|
MApplication app(argc, argv);
|
||||||
app.InitOptions();
|
app.InitOptions();
|
||||||
|
|
||||||
|
|
|
@ -81,6 +81,12 @@ auto main(int argc, char *argv[]) -> int
|
||||||
InitHighDpiScaling(argc, argv);
|
InitHighDpiScaling(argc, argv);
|
||||||
#endif //Q_OS_MAC
|
#endif //Q_OS_MAC
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
#if MACOS_LAYER_BACKING_AFFECTED
|
||||||
|
MacosEnableLayerBacking();
|
||||||
|
#endif // MACOS_LAYER_BACKING_AFFECTED
|
||||||
|
#endif // Q_OS_MAC
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
XERCES_CPP_NAMESPACE::XMLPlatformUtils::Initialize();
|
XERCES_CPP_NAMESPACE::XMLPlatformUtils::Initialize();
|
||||||
|
|
||||||
|
|
|
@ -304,6 +304,22 @@ void InitHighDpiScaling(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
#if MACOS_LAYER_BACKING_AFFECTED
|
||||||
|
void MacosEnableLayerBacking()
|
||||||
|
{
|
||||||
|
QOperatingSystemVersion osVer = QOperatingSystemVersion::current();
|
||||||
|
const int majorVer = osVer.majorVersion();
|
||||||
|
const int minorVer = osVer.minorVersion();
|
||||||
|
if (((majorVer == 10 && minorVer >= 16) || majorVer >= 11) && qEnvironmentVariableIsEmpty("QT_MAC_WANTS_LAYER"))
|
||||||
|
{
|
||||||
|
qputenv("QT_MAC_WANTS_LAYER", "1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // MACOS_LAYER_BACKING_AFFECTED
|
||||||
|
#endif // Q_OS_MAC
|
||||||
|
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, strTMark, (QLatin1String("tMark"))) // NOLINT
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, strTMark, (QLatin1String("tMark"))) // NOLINT
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, strVMark, (QLatin1String("vMark"))) // NOLINT
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, strVMark, (QLatin1String("vMark"))) // NOLINT
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, strVMark2, (QLatin1String("vMark2"))) // NOLINT
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, strVMark2, (QLatin1String("vMark2"))) // NOLINT
|
||||||
|
|
|
@ -370,6 +370,35 @@ if (!(cond)) \
|
||||||
bool IsOptionSet(int argc, char *argv[], const char *option);
|
bool IsOptionSet(int argc, char *argv[], const char *option);
|
||||||
void InitHighDpiScaling(int argc, char *argv[]);
|
void InitHighDpiScaling(int argc, char *argv[]);
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
// Fix QT issue on MacOS version 11.0 "Big Sur"
|
||||||
|
// https://bugreports.qt.io/browse/QTBUG-87014
|
||||||
|
// Enables layer backing for Big Sur
|
||||||
|
// Prevents 100% CPU & RAM utilization
|
||||||
|
//
|
||||||
|
// The fix at
|
||||||
|
//
|
||||||
|
// https://codereview.qt-project.org/c/qt/qtbase/+/322228/3/src/plugins/platforms/cocoa/qnsview_drawing.mm
|
||||||
|
//
|
||||||
|
// enables layer backing if we're running on Big Sur OR we're running on
|
||||||
|
// Catalina AND we were built with the Catalina SDK. Enable layer backing
|
||||||
|
// here by setting QT_MAC_WANTS_LAYER=1, but only if we're running on Big
|
||||||
|
// Sur and our version of Qt doesn't have a fix for QTBUG-87014.
|
||||||
|
|
||||||
|
// We'll assume that it will be fixed in 5.12.11, 5.15.3, and 6.0.1.
|
||||||
|
// Feel free to add other versions if needed.
|
||||||
|
#define MACOS_LAYER_BACKING_AFFECTED \
|
||||||
|
(QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) && QT_VERSION < QT_VERSION_CHECK(5, 12, 11) \
|
||||||
|
|| (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) && QT_VERSION < QT_VERSION_CHECK(5, 15, 3)) \
|
||||||
|
|| (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) && QT_VERSION < QT_VERSION_CHECK(6, 0, 1)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
#if MACOS_LAYER_BACKING_AFFECTED
|
||||||
|
#include <QOperatingSystemVersion>
|
||||||
|
void MacosEnableLayerBacking();
|
||||||
|
#endif // MACOS_LAYER_BACKING_AFFECTED
|
||||||
|
#endif // Q_OS_MAC
|
||||||
|
|
||||||
// Don't forget to syncronize with XSD schema.
|
// Don't forget to syncronize with XSD schema.
|
||||||
const int userMaterialPlaceholdersQuantity = 20;
|
const int userMaterialPlaceholdersQuantity = 20;
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>394</width>
|
<width>426</width>
|
||||||
<height>552</height>
|
<height>556</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -24,8 +24,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>374</width>
|
<width>406</width>
|
||||||
<height>532</height>
|
<height>536</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||||
|
@ -167,7 +167,6 @@
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>36</pointsize>
|
<pointsize>36</pointsize>
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
|
@ -348,7 +347,7 @@
|
||||||
<string>Acute angle that looks inside of piece</string>
|
<string>Acute angle that looks inside of piece</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>V mark</string>
|
<string>External V mark</string>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="buttonGroup">
|
<attribute name="buttonGroup">
|
||||||
<string notr="true">buttonGroupLineType</string>
|
<string notr="true">buttonGroupLineType</string>
|
||||||
|
@ -364,7 +363,7 @@
|
||||||
<string>Acute angle that looks outside of piece</string>
|
<string>Acute angle that looks outside of piece</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>V mark 2</string>
|
<string>Internal V mark</string>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="buttonGroup">
|
<attribute name="buttonGroup">
|
||||||
<string notr="true">buttonGroupLineType</string>
|
<string notr="true">buttonGroupLineType</string>
|
||||||
|
@ -574,7 +573,7 @@
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
<buttongroups>
|
<buttongroups>
|
||||||
<buttongroup name="buttonGroupLineType"/>
|
|
||||||
<buttongroup name="buttonGroupAngleType"/>
|
<buttongroup name="buttonGroupAngleType"/>
|
||||||
|
<buttongroup name="buttonGroupLineType"/>
|
||||||
</buttongroups>
|
</buttongroups>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
@ -515,9 +515,9 @@ void VNodePoint::InitPassmarkLineTypeMenu(QMenu *menu, vidtype pieceId, QHash<in
|
||||||
contextMenu.insert(static_cast<int>(ContextMenuOption::TMark),
|
contextMenu.insert(static_cast<int>(ContextMenuOption::TMark),
|
||||||
InitPassmarkLineTypeAction(tr("T mark"), PassmarkLineType::TMark));
|
InitPassmarkLineTypeAction(tr("T mark"), PassmarkLineType::TMark));
|
||||||
contextMenu.insert(static_cast<int>(ContextMenuOption::VMark),
|
contextMenu.insert(static_cast<int>(ContextMenuOption::VMark),
|
||||||
InitPassmarkLineTypeAction(tr("V mark"), PassmarkLineType::VMark));
|
InitPassmarkLineTypeAction(tr("External V mark"), PassmarkLineType::VMark));
|
||||||
contextMenu.insert(static_cast<int>(ContextMenuOption::VMark2),
|
contextMenu.insert(static_cast<int>(ContextMenuOption::VMark2),
|
||||||
InitPassmarkLineTypeAction(tr("V mark 2"), PassmarkLineType::VMark2));
|
InitPassmarkLineTypeAction(tr("Internal V mark"), PassmarkLineType::VMark2));
|
||||||
contextMenu.insert(static_cast<int>(ContextMenuOption::UMark),
|
contextMenu.insert(static_cast<int>(ContextMenuOption::UMark),
|
||||||
InitPassmarkLineTypeAction(tr("U mark"), PassmarkLineType::UMark));
|
InitPassmarkLineTypeAction(tr("U mark"), PassmarkLineType::UMark));
|
||||||
contextMenu.insert(static_cast<int>(ContextMenuOption::BoxMark),
|
contextMenu.insert(static_cast<int>(ContextMenuOption::BoxMark),
|
||||||
|
|
Loading…
Reference in a new issue