mirror of
https://gitlab.com/smart-pattern/valentina.git
synced 2024-09-19 23:34:04 +02:00
Compare commits
10 commits
e571a0f1a6
...
24ff2970f3
Author | SHA1 | Date | |
---|---|---|---|
24ff2970f3 | |||
4ed8892dc8 | |||
af6b86fb97 | |||
b6542e989c | |||
d5dbdab24f | |||
131da4387c | |||
a919a3497e | |||
67bcc9ee59 | |||
bd25db3610 | |||
561fca7785 |
21
.cirrus.yml
21
.cirrus.yml
|
@ -19,7 +19,7 @@ regular_task_template: ®ULER_TASK_TEMPLATE
|
|||
|
||||
linux_qt6_task_template: &LINUX_QT6_TASK_TEMPLATE
|
||||
install_script:
|
||||
- bash -c "$PACKAGE_MANAGER_INSTALL -y qbs qt6-base-dev qt6-l10n-tools libqt6svg6-dev qt6-base-dev-tools qmake6 qbs libxerces-c-dev poppler-utils libgl1-mesa-dev"
|
||||
- bash -c "$PACKAGE_MANAGER_INSTALL -y qt6-base-dev qt6-l10n-tools libqt6svg6-dev qt6-base-dev-tools qmake6 libxerces-c-dev poppler-utils libgl1-mesa-dev"
|
||||
build_script:
|
||||
- uname -a
|
||||
- mkdir -pm 0700 $XDG_RUNTIME_DIR
|
||||
|
@ -38,7 +38,7 @@ linux_qt6_task_template: &LINUX_QT6_TASK_TEMPLATE
|
|||
- qbs setup-qt /usr/bin/qmake6 qt6
|
||||
- qbs config profiles.qt6.baseProfile ${COMPILER}
|
||||
- qbs-config defaultProfile qt6
|
||||
- qbs build -f valentina.qbs -d build --jobs $(nproc) profile:qt6 config:release modules.buildconfig.enableCcache:${ENABLE_CCACHE}
|
||||
- qbs build -f valentina.qbs -d build --jobs $(nproc) profile:qt6 config:release modules.buildconfig.enableCcache:${ENABLE_CCACHE} modules.cpp.linkerVariant:mold --force-probe-execution
|
||||
- qbs -p autotest-runner -d build profile:qt6 config:release
|
||||
- ccache -s
|
||||
|
||||
|
@ -64,7 +64,7 @@ linux_qt5_qmake_task_template: &LINUX_QT5_QMAKE_TASK_TEMPLATE
|
|||
|
||||
linux_qt5_qbs_task_template: &LINUX_QT5_QBS_TASK_TEMPLATE
|
||||
install_script:
|
||||
- bash -c "$PACKAGE_MANAGER_INSTALL qbs qtbase5-dev libqt5svg5-dev qttools5-dev-tools libqt5xmlpatterns5-dev libqt5core5a libqt5gui5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5xml5 libqt5xmlpatterns5 poppler-utils"
|
||||
- bash -c "$PACKAGE_MANAGER_INSTALL qtbase5-dev libqt5svg5-dev qttools5-dev-tools libqt5xmlpatterns5-dev libqt5core5a libqt5gui5 libqt5printsupport5 libqt5svg5 libqt5widgets5 libqt5xml5 libqt5xmlpatterns5 poppler-utils"
|
||||
build_script:
|
||||
- uname -a
|
||||
- mkdir -pm 0700 $XDG_RUNTIME_DIR
|
||||
|
@ -83,7 +83,7 @@ linux_qt5_qbs_task_template: &LINUX_QT5_QBS_TASK_TEMPLATE
|
|||
- qbs setup-qt /usr/bin/qmake qt5
|
||||
- qbs-config defaultProfile qt5
|
||||
- qbs config profiles.qt5.baseProfile ${COMPILER}
|
||||
- qbs build -f valentina.qbs -d build --jobs $(nproc) profile:qt5 config:release modules.buildconfig.enableCcache:${ENABLE_CCACHE}
|
||||
- qbs build -f valentina.qbs -d build --jobs $(nproc) profile:qt5 config:release modules.buildconfig.enableCcache:${ENABLE_CCACHE} modules.cpp.linkerVariant:mold --force-probe-execution
|
||||
- qbs -p autotest-runner -d build profile:qt5 config:release
|
||||
- ccache -s
|
||||
|
||||
|
@ -113,7 +113,7 @@ linux_task:
|
|||
<< : *LINUX_QT5_QBS_TASK_TEMPLATE
|
||||
env:
|
||||
QT_SELECT: "qt5"
|
||||
ENABLE_CCACHE: false
|
||||
ENABLE_CCACHE: true
|
||||
container:
|
||||
cpu: 2
|
||||
memory: 6G # Set to 6GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-container
|
||||
|
@ -121,7 +121,7 @@ linux_task:
|
|||
<< : *LINUX_QT6_TASK_TEMPLATE
|
||||
env:
|
||||
QT_SELECT: "qt6"
|
||||
ENABLE_CCACHE: false
|
||||
ENABLE_CCACHE: true
|
||||
container:
|
||||
cpu: 8
|
||||
memory: 8G # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-container
|
||||
|
@ -182,6 +182,7 @@ macos_task_template: &MACOS_TASK_TEMPLATE
|
|||
PIP_CACHE_DIR: ${HOME}/.cache/pip
|
||||
LDFLAGS: "-L$QTDIR/lib"
|
||||
CPPFLAGS: "-I$QTDIR/include"
|
||||
HOMEBREW_NO_AUTO_UPDATE: ""
|
||||
local_homebrew_cache:
|
||||
folder: "$HOME/Library/Caches/Homebrew"
|
||||
global_conan_cache:
|
||||
|
@ -231,7 +232,7 @@ macos_task_template: &MACOS_TASK_TEMPLATE
|
|||
- brew update > /dev/null
|
||||
- brew install qt6 coreutils ccache qbs cmake ninja git openssl@1.1 pkg-config poppler xerces-c
|
||||
- brew outdated
|
||||
- brew upgrade qt6 qbs
|
||||
- brew upgrade qt6
|
||||
- echo $PATH
|
||||
- export PATH="${HOME}/.local/bin:`python3 -m site --user-base`/bin:$PATH"
|
||||
- echo $PATH
|
||||
|
@ -245,10 +246,6 @@ macos_task_template: &MACOS_TASK_TEMPLATE
|
|||
- qmake --version
|
||||
- which qmake
|
||||
- qbs --version
|
||||
# Patch Qbs. Remove after Qbs 2.1.2+.
|
||||
- curl https://gist.githubusercontent.com/dismine/43a20f66f563232e54e02f2e85732e7a/raw/e80a0c827348da3e99310ba4a648c1860bb3a8a6/BundleModule.qbs --output $HOME/BundleModule.qbs --silent
|
||||
- cp -f $HOME/BundleModule.qbs $(brew --prefix qbs)/share/qbs/modules/bundle/BundleModule.qbs
|
||||
- rm $HOME/BundleModule.qbs
|
||||
build_script:
|
||||
- echo $PATH
|
||||
- export PATH="${HOME}/.local/bin:`python3 -m site --user-base`/bin:$PATH"
|
||||
|
@ -300,7 +297,7 @@ macos_task:
|
|||
ARCH: armv8
|
||||
PLATFORM: "macOS_12.4+"
|
||||
MACOS_DEPLOYMENT_TARGET: 12.0
|
||||
ENABLE_CCACHE: false
|
||||
ENABLE_CCACHE: true
|
||||
matrix:
|
||||
- name: 'macOS Monterey 12 [signle bundle, no tests]'
|
||||
env:
|
||||
|
|
20
appveyor.yml
20
appveyor.yml
|
@ -667,7 +667,7 @@ for:
|
|||
|
||||
sudo ln -s /usr/local /opt/local;
|
||||
|
||||
cache_tag=usr_local_3 # this can be modified to rebuild deps
|
||||
cache_tag=usr_local_4 # this can be modified to rebuild deps
|
||||
|
||||
cdir=$HOME/cache_dir
|
||||
cache_tar=$cdir/$cache_tag.tar
|
||||
|
@ -726,10 +726,6 @@ for:
|
|||
- which qmake
|
||||
- which qbs
|
||||
- qbs --version
|
||||
# Patch Qbs. Remove after Qbs 2.1.2+.
|
||||
- /usr/bin/curl https://gist.githubusercontent.com/dismine/43a20f66f563232e54e02f2e85732e7a/raw/e80a0c827348da3e99310ba4a648c1860bb3a8a6/BundleModule.qbs --output $HOME/BundleModule.qbs --silent
|
||||
- cp -f $HOME/BundleModule.qbs $(brew --prefix qbs)/share/qbs/modules/bundle/BundleModule.qbs
|
||||
- rm $HOME/BundleModule.qbs
|
||||
- /usr/bin/curl -LJ https://github.com/dismine/macdeployqt/archive/refs/heads/main.zip --output ${HOME}/macdeployqt-main.zip --silent
|
||||
- unzip ${HOME}/macdeployqt-main.zip -d ${HOME}
|
||||
- cmake ${HOME}/macdeployqt-main -GNinja -S ${HOME}/macdeployqt-main -B ${HOME}/macdeployqt-build-dir -DCMAKE_INSTALL_PREFIX=${HOME}/macdeployqt-install-dir -DCMAKE_BUILD_TYPE=Release
|
||||
|
@ -743,8 +739,8 @@ for:
|
|||
- qbs setup-qt $(brew --prefix qt6)/bin/qmake qt6
|
||||
- qbs config defaultProfile qt6
|
||||
- qbs config profiles.qt6.baseProfile clang
|
||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig,$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:$(brew --prefix qt6)/lib,$(brew --prefix poppler)/lib modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig,$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:$(brew --prefix qt6)/lib,$(brew --prefix poppler)/lib modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:true moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig,$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:$(brew --prefix qt6)/lib,$(brew --prefix poppler)/lib modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt6 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:true moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig,$(brew --prefix qt6)/lib/pkgconfig,$(brew --prefix openssl@1.1)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:$(brew --prefix qt6)/lib,$(brew --prefix poppler)/lib modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
||||
# Store the notarization credentials so that we can prevent a UI password dialog
|
||||
# from blocking the CI
|
||||
- echo "Create keychain profile"
|
||||
|
@ -855,7 +851,7 @@ for:
|
|||
|
||||
sudo ln -s /usr/local /opt/local;
|
||||
|
||||
cache_tag=usr_local_1 # this can be modified to rebuild deps
|
||||
cache_tag=usr_local_2 # this can be modified to rebuild deps
|
||||
|
||||
cdir=$HOME/cache_dir
|
||||
cache_tar=$cdir/$cache_tag.tar
|
||||
|
@ -909,10 +905,6 @@ for:
|
|||
- qmake --version
|
||||
- which qmake
|
||||
- qbs --version
|
||||
# Patch Qbs. Remove after Qbs 2.1.2+.
|
||||
- /usr/bin/curl https://gist.githubusercontent.com/dismine/43a20f66f563232e54e02f2e85732e7a/raw/e80a0c827348da3e99310ba4a648c1860bb3a8a6/BundleModule.qbs --output $HOME/BundleModule.qbs --silent
|
||||
- cp -f $HOME/BundleModule.qbs $(brew --prefix qbs)/share/qbs/modules/bundle/BundleModule.qbs
|
||||
- rm $HOME/BundleModule.qbs
|
||||
- /usr/bin/curl -LJ https://github.com/dismine/macdeployqt/archive/refs/heads/main.zip --output ${HOME}/macdeployqt-main.zip --silent
|
||||
- unzip ${HOME}/macdeployqt-main.zip -d ${HOME}
|
||||
- cmake ${HOME}/macdeployqt-main -S ${HOME}/macdeployqt-main -B ${HOME}/macdeployqt-build-dir -DCMAKE_INSTALL_PREFIX=${HOME}/macdeployqt-install-dir -DCMAKE_BUILD_TYPE=Release
|
||||
|
@ -930,8 +922,8 @@ for:
|
|||
- qbs setup-qt ${QTDIR}/bin/qmake qt5
|
||||
- qbs config defaultProfile qt5
|
||||
- qbs config profiles.qt5.baseProfile clang
|
||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt5 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:${QTDIR}/lib modules.macdeployqt.pluginspath:${QTDIR}/plugins modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt5 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:false moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:${QTDIR}/lib modules.macdeployqt.pluginspath:${QTDIR}/plugins modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt5 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:true moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:${QTDIR}/lib modules.macdeployqt.pluginspath:${QTDIR}/plugins modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
||||
- qbs build -f valentina.qbs -d ${APPVEYOR_BUILD_FOLDER}/build -p 'Valentina DMG' --force-probe-execution --jobs $(nproc) config:release modules.buildconfig.enableUnitTests:false modules.buildconfig.enableMultiBundle:${MULTI_BUNDLE} qbs.installRoot:${APPVEYOR_BUILD_FOLDER}/build/install-root profile:qt5 project.minimumMacosVersion:${MACOS_DEPLOYMENT_TARGET} modules.buildconfig.enableCcache:true moduleProviders.qbspkgconfig.extraPaths:$(brew --prefix xerces-c)/lib/pkgconfig "modules.buildconfig.signingIdentity:$MACOS_CERTIFICATE_NAME" modules.macdeployqt.libpath:${QTDIR}/lib modules.macdeployqt.pluginspath:${QTDIR}/plugins modules.macdeployqt.macdeployqtProgramBinPath:${HOME}/macdeployqt-install-dir
|
||||
# Store the notarization credentials so that we can prevent a UI password dialog
|
||||
# from blocking the CI
|
||||
- echo "Create keychain profile"
|
||||
|
|
|
@ -42,6 +42,8 @@ Module {
|
|||
|
||||
property bool pchSupport
|
||||
|
||||
readonly property bool clangToolchain: product.qbs.toolchain.contains("gcc") && product.qbs.toolchain.contains("clang")
|
||||
|
||||
configure: {
|
||||
var detector = new Process();
|
||||
try {
|
||||
|
@ -49,13 +51,19 @@ Module {
|
|||
var version = detector.readStdOut().trim(); // we can read only one time
|
||||
|
||||
pchSupport = Utilities.versionCompare(version, "3.1.0") >= 0;
|
||||
if (!pchSupport && Utilities.versionCompare(version, "3.1.0") < 0){
|
||||
if (!pchSupport){
|
||||
console.info("ccache is tool old, version >= 3.1.0 required to work with precompiled headers.");
|
||||
pchSupport = false;
|
||||
}else{
|
||||
if (clangToolchain) {
|
||||
if (Utilities.versionCompare(version, "4.6") < 0) {
|
||||
console.info("ccache version < 4.6 is not compatible with Clang and precompiled headers.");
|
||||
pchSupport = false;
|
||||
}
|
||||
} else {
|
||||
console.info("ccache supports compilation with precompiled headers.");
|
||||
}
|
||||
}
|
||||
|
||||
if (pchSupport)
|
||||
console.info("ccache supports compilation with precompiled headers.")
|
||||
}
|
||||
} finally {
|
||||
detector.close();
|
||||
|
|
|
@ -246,8 +246,6 @@ void DialogHistory::FillTable()
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
/**
|
||||
* @brief Record return description for record
|
||||
* @param tool record data
|
||||
|
@ -498,12 +496,10 @@ auto DialogHistory::RecordDescription(const VToolRecord &tool, HistoryRecord rec
|
|||
case Tool::InsertNode:
|
||||
case Tool::DuplicateDetail:
|
||||
return record;
|
||||
}
|
||||
|
||||
default:
|
||||
return record;
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
|
|
|
@ -3476,8 +3476,6 @@ void MainWindow::MouseMove(const QPointF &scenePos)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
/**
|
||||
* @brief CancelTool cancel tool.
|
||||
*/
|
||||
|
@ -3498,6 +3496,10 @@ void MainWindow::CancelTool()
|
|||
currentScene->clearSelection();
|
||||
emit ui->view->itemClicked(nullptr); // Hide visualization to avoid a crash
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (m_currentTool)
|
||||
{
|
||||
case Tool::Arrow:
|
||||
|
@ -3667,6 +3669,8 @@ void MainWindow::CancelTool()
|
|||
break;
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
|
||||
// Crash: using CRTL+Z while using line tool.
|
||||
// related bug report:
|
||||
// https://bitbucket.org/dismine/valentina/issues/454/crash-using-crtl-z-while-using-line-tool
|
||||
|
@ -3739,8 +3743,6 @@ void MainWindow::SetupDrawToolsIcons()
|
|||
ui->actionArcEndPointTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("arc_end.png")));
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief ArrowTool enable arrow tool.
|
||||
|
@ -5477,6 +5479,8 @@ void MainWindow::SetEnableTool(bool enable)
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (VAbstractValApplication::VApp()->GetDrawMode())
|
||||
{
|
||||
case Draw::Calculation:
|
||||
|
@ -5489,6 +5493,7 @@ void MainWindow::SetEnableTool(bool enable)
|
|||
layoutTools = enable;
|
||||
break;
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
|
||||
// This check helps to find missed tools
|
||||
|
@ -5837,8 +5842,6 @@ void MainWindow::CreateMenus()
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
void MainWindow::LastUsedTool()
|
||||
{
|
||||
// This check helps to find missed tools in the switch
|
||||
|
@ -5849,6 +5852,10 @@ void MainWindow::LastUsedTool()
|
|||
return;
|
||||
}
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (m_lastUsedTool)
|
||||
{
|
||||
case Tool::Arrow:
|
||||
|
@ -6055,9 +6062,9 @@ void MainWindow::LastUsedTool()
|
|||
ToolArcEnd(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void MainWindow::AddDocks()
|
||||
|
|
|
@ -4591,9 +4591,6 @@ void VPattern::DrawToolsCommonAttributes(const QDomElement &domElement, quint32
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
|
||||
auto VPattern::ActiveDrawBoundingRect() const -> QRectF
|
||||
{
|
||||
// This check helps to find missed tools in the switch
|
||||
|
@ -4601,9 +4598,8 @@ auto VPattern::ActiveDrawBoundingRect() const -> QRectF
|
|||
|
||||
QRectF rec;
|
||||
|
||||
for (qint32 i = 0; i < history.size(); ++i)
|
||||
for (const auto &tool : history)
|
||||
{
|
||||
const VToolRecord tool = history.at(i);
|
||||
if (tool.getNameDraw() == nameActivPP)
|
||||
{
|
||||
switch (tool.getTypeTool())
|
||||
|
@ -4685,6 +4681,7 @@ auto VPattern::ActiveDrawBoundingRect() const -> QRectF
|
|||
case Tool::InsertNode:
|
||||
case Tool::PlaceLabel:
|
||||
case Tool::DuplicateDetail:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -4692,9 +4689,6 @@ auto VPattern::ActiveDrawBoundingRect() const -> QRectF
|
|||
return rec;
|
||||
}
|
||||
|
||||
// cppcheck-suppress unknownMacro
|
||||
QT_WARNING_POP
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
template <typename T> auto VPattern::ToolBoundingRect(const QRectF &rec, quint32 id) const -> QRectF
|
||||
{
|
||||
|
|
|
@ -197,9 +197,6 @@ auto LineStyleToPenStyle(const QString &typeLine) -> Qt::PenStyle
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto PenStyleToLineStyle(Qt::PenStyle penStyle) -> QString
|
||||
{
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
|
||||
switch (penStyle)
|
||||
{
|
||||
case Qt::NoPen:
|
||||
|
@ -216,9 +213,6 @@ auto PenStyleToLineStyle(Qt::PenStyle penStyle) -> QString
|
|||
break;
|
||||
}
|
||||
|
||||
// cppcheck-suppress unknownMacro
|
||||
QT_WARNING_POP
|
||||
|
||||
return TypeLineLine;
|
||||
}
|
||||
|
||||
|
|
|
@ -685,10 +685,11 @@ auto DRW_MText::parseCode(int code, const std::unique_ptr<dxfReader> &reader) ->
|
|||
case 71:
|
||||
{
|
||||
// Attachment point
|
||||
Attach a = static_cast<Attach>(reader->getInt32());
|
||||
auto a = static_cast<Attach>(reader->getInt32());
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (a)
|
||||
{
|
||||
|
|
|
@ -3563,6 +3563,7 @@ auto dxfRW::processDimension() -> bool
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (type)
|
||||
{
|
||||
|
|
|
@ -742,9 +742,6 @@ auto VDxfEngine::ErrorString() const -> QString
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
|
||||
auto VDxfEngine::FromPixel(double pix, const VarInsunits &unit) const -> double
|
||||
{
|
||||
switch (unit)
|
||||
|
@ -755,9 +752,10 @@ auto VDxfEngine::FromPixel(double pix, const VarInsunits &unit) const -> double
|
|||
return pix / m_resolution * 25.4 / 10.0;
|
||||
case VarInsunits::Inches:
|
||||
return pix / m_resolution;
|
||||
}
|
||||
default:
|
||||
return pix;
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto VDxfEngine::ToPixel(double val, const VarInsunits &unit) const -> double
|
||||
|
@ -770,11 +768,10 @@ auto VDxfEngine::ToPixel(double val, const VarInsunits &unit) const -> double
|
|||
return ((val * 10.0) / 25.4) * m_resolution;
|
||||
case VarInsunits::Inches:
|
||||
return val * m_resolution;
|
||||
}
|
||||
default:
|
||||
return val;
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto VDxfEngine::ExportToAAMA(const QVector<VLayoutPiece> &details) -> bool
|
||||
|
|
|
@ -359,6 +359,8 @@ auto VPatternRecipe::Step(const VToolRecord &tool, const VContainer &data) -> QD
|
|||
{
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (tool.getTypeTool())
|
||||
{
|
||||
case Tool::Arrow:
|
||||
|
@ -461,8 +463,9 @@ auto VPatternRecipe::Step(const VToolRecord &tool, const VContainer &data) -> QD
|
|||
case Tool::PlaceLabel:
|
||||
case Tool::InsertNode:
|
||||
case Tool::DuplicateDetail:
|
||||
return QDomElement();
|
||||
return {};
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
}
|
||||
catch (const VExceptionBadId &e)
|
||||
|
@ -1249,6 +1252,8 @@ auto VPatternRecipe::GroupOperationSource(VAbstractOperation *tool, quint32 id,
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (static_cast<GOType>(obj->getType()))
|
||||
{
|
||||
case GOType::Point:
|
||||
|
@ -1273,6 +1278,7 @@ auto VPatternRecipe::GroupOperationSource(VAbstractOperation *tool, quint32 id,
|
|||
Q_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
|
||||
nodes.appendChild(node);
|
||||
|
|
|
@ -1119,6 +1119,8 @@ auto VAbstractPiece::Equidistant(QVector<VSAPoint> points, qreal width, const QS
|
|||
{
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
// This check helps to find missed angle types in the switch
|
||||
Q_STATIC_ASSERT_X(static_cast<int>(PieceNodeAngle::LAST_ONE_DO_NOT_USE) == 7, "Not all types were handled.");
|
||||
switch (points.constLast().GetAngleType())
|
||||
|
@ -1144,6 +1146,7 @@ auto VAbstractPiece::Equidistant(QVector<VSAPoint> points, qreal width, const QS
|
|||
RollbackBySecondEdgeRightAngle(ekvPoints, points, width);
|
||||
break;
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
}
|
||||
|
||||
|
@ -1307,6 +1310,8 @@ auto VAbstractPiece::EkvPoint(QVector<VRawSAPoint> points, const VSAPoint &p1Lin
|
|||
{ // Regular equdistant case
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
// This check helps to find missed angle types in the switch
|
||||
Q_STATIC_ASSERT_X(static_cast<int>(PieceNodeAngle::LAST_ONE_DO_NOT_USE) == 7,
|
||||
"Not all types were handled.");
|
||||
|
@ -1335,6 +1340,7 @@ auto VAbstractPiece::EkvPoint(QVector<VRawSAPoint> points, const VSAPoint &p1Lin
|
|||
return AngleBySecondRightAngle(points, p1Line1, p2Line1, p1Line2, bigLine1, crosPoint, bigLine2,
|
||||
p2Line1, width, needRollback);
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
}
|
||||
else
|
||||
|
|
|
@ -689,8 +689,6 @@ auto LineColor(const QColor &borderColor, int size, const QString &color) -> QIc
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
auto SegmentAliases(GOType curveType, const QString &alias1, const QString &alias2) -> QPair<QString, QString>
|
||||
{
|
||||
switch (curveType)
|
||||
|
@ -712,11 +710,10 @@ auto SegmentAliases(GOType curveType, const QString &alias1, const QString &alia
|
|||
case GOType::Unknown:
|
||||
Q_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
QT_WARNING_POP
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto GetNodeName(const VContainer *data, const VPieceNode &node, bool showPassmarkDetails) -> QString
|
||||
|
|
|
@ -384,6 +384,8 @@ void DialogPiecePath::ShowContextMenu(const QPoint &pos)
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (selectedOption)
|
||||
{
|
||||
case ContextMenuOption::NoSelection:
|
||||
|
@ -448,6 +450,7 @@ void DialogPiecePath::ShowContextMenu(const QPoint &pos)
|
|||
Q_UNREACHABLE();
|
||||
break;
|
||||
};
|
||||
|
||||
QT_WARNING_POP
|
||||
|
||||
ValidObjects(PathIsValid());
|
||||
|
|
|
@ -1114,6 +1114,8 @@ void DialogSeamAllowance::ShowMainPathContextMenu(const QPoint &pos)
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (selectedOption)
|
||||
{
|
||||
case MainPathContextMenuOption::NoSelection:
|
||||
|
@ -1178,6 +1180,7 @@ void DialogSeamAllowance::ShowMainPathContextMenu(const QPoint &pos)
|
|||
Q_UNREACHABLE();
|
||||
break;
|
||||
};
|
||||
|
||||
QT_WARNING_POP
|
||||
|
||||
ValidObjects(MainPathIsValid());
|
||||
|
@ -1847,6 +1850,8 @@ void DialogSeamAllowance::FancyTabChanged(int index)
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (index) // NOLINT(hicpp-multiway-paths-covered)
|
||||
{
|
||||
case TabOrder::Paths:
|
||||
|
@ -1874,6 +1879,7 @@ void DialogSeamAllowance::FancyTabChanged(int index)
|
|||
Q_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
|
||||
if (index == TabOrder::Pins || index == TabOrder::Grainline ||
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
#include "vabstractflipping.h"
|
||||
#include "../vgeometry/vabstractcurve.h"
|
||||
#include "../vgeometry/varc.h"
|
||||
#include "../vgeometry/vellipticalarc.h"
|
||||
#include "../vgeometry/vcubicbezier.h"
|
||||
#include "../vgeometry/vcubicbezierpath.h"
|
||||
#include "../vgeometry/vellipticalarc.h"
|
||||
#include "../vgeometry/vgobject.h"
|
||||
#include "../vgeometry/vpointf.h"
|
||||
#include "../vgeometry/vspline.h"
|
||||
|
@ -40,7 +40,8 @@
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VAbstractFlipping::VAbstractFlipping(const VAbstractOperationInitData &initData, QGraphicsItem *parent)
|
||||
: VAbstractOperation(initData, parent)
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VAbstractFlipping::CreateDestination(VAbstractOperationInitData &initData, const QPointF &fPoint,
|
||||
|
@ -61,43 +62,44 @@ void VAbstractFlipping::CreateDestination(VAbstractOperationInitData &initData,
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (static_cast<GOType>(obj->getType()))
|
||||
{
|
||||
case GOType::Point:
|
||||
initData.destination.append(CreatePoint(initData.id, object, fPoint, sPoint, initData.suffix,
|
||||
initData.data));
|
||||
initData.destination.append(
|
||||
CreatePoint(initData.id, object, fPoint, sPoint, initData.suffix, initData.data));
|
||||
break;
|
||||
case GOType::Arc:
|
||||
initData.destination.append(CreateArc<VArc>(initData.id, object, fPoint, sPoint, initData.suffix,
|
||||
initData.data));
|
||||
initData.destination.append(
|
||||
CreateArc<VArc>(initData.id, object, fPoint, sPoint, initData.suffix, initData.data));
|
||||
break;
|
||||
case GOType::EllipticalArc:
|
||||
initData.destination.append(CreateArc<VEllipticalArc>(initData.id, object, fPoint, sPoint,
|
||||
initData.suffix, initData.data));
|
||||
initData.destination.append(
|
||||
CreateArc<VEllipticalArc>(initData.id, object, fPoint, sPoint, initData.suffix, initData.data));
|
||||
break;
|
||||
case GOType::Spline:
|
||||
initData.destination.append(CreateCurve<VSpline>(initData.id, object, fPoint, sPoint,
|
||||
initData.suffix, initData.data));
|
||||
initData.destination.append(
|
||||
CreateCurve<VSpline>(initData.id, object, fPoint, sPoint, initData.suffix, initData.data));
|
||||
break;
|
||||
case GOType::SplinePath:
|
||||
initData.destination.append(CreateCurveWithSegments<VSplinePath>(initData.id, object, fPoint,
|
||||
sPoint, initData.suffix,
|
||||
initData.data));
|
||||
initData.destination.append(CreateCurveWithSegments<VSplinePath>(
|
||||
initData.id, object, fPoint, sPoint, initData.suffix, initData.data));
|
||||
break;
|
||||
case GOType::CubicBezier:
|
||||
initData.destination.append(CreateCurve<VCubicBezier>(initData.id, object, fPoint, sPoint,
|
||||
initData.suffix, initData.data));
|
||||
initData.destination.append(
|
||||
CreateCurve<VCubicBezier>(initData.id, object, fPoint, sPoint, initData.suffix, initData.data));
|
||||
break;
|
||||
case GOType::CubicBezierPath:
|
||||
initData.destination.append(CreateCurveWithSegments<VCubicBezierPath>(initData.id, object, fPoint,
|
||||
sPoint, initData.suffix,
|
||||
initData.data));
|
||||
initData.destination.append(CreateCurveWithSegments<VCubicBezierPath>(
|
||||
initData.id, object, fPoint, sPoint, initData.suffix, initData.data));
|
||||
break;
|
||||
case GOType::Unknown:
|
||||
case GOType::PlaceLabel:
|
||||
Q_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
}
|
||||
}
|
||||
|
@ -113,6 +115,8 @@ QT_WARNING_POP
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (static_cast<GOType>(obj->getType()))
|
||||
{
|
||||
case GOType::Point:
|
||||
|
@ -150,6 +154,7 @@ QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
|||
Q_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
}
|
||||
if (initData.parse != Document::FullParse)
|
||||
|
|
|
@ -888,6 +888,8 @@ void VAbstractOperation::InitOperatedObjects()
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (static_cast<GOType>(obj->getType()))
|
||||
{
|
||||
case GOType::Point:
|
||||
|
@ -926,6 +928,7 @@ void VAbstractOperation::InitOperatedObjects()
|
|||
Q_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,8 +70,6 @@ const QString VToolMove::ToolType = QStringLiteral("moving");
|
|||
|
||||
namespace
|
||||
{
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
auto GetOriginPoint(const QVector<SourceItem> &objects, const VContainer *data, qreal calcLength, qreal calcAngle)
|
||||
-> QPointF
|
||||
{
|
||||
|
@ -101,6 +99,8 @@ auto GetOriginPoint(const QVector<SourceItem> &objects, const VContainer *data,
|
|||
case GOType::PlaceLabel:
|
||||
Q_UNREACHABLE();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,6 @@ auto GetOriginPoint(const QVector<SourceItem> &objects, const VContainer *data,
|
|||
move.setAngle(calcAngle);
|
||||
return move.p2();
|
||||
}
|
||||
QT_WARNING_POP
|
||||
} // namespace
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -202,6 +201,8 @@ auto VToolMove::Create(VToolMoveInitData &initData) -> VToolMove *
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (static_cast<GOType>(obj->getType()))
|
||||
{
|
||||
case GOType::Point:
|
||||
|
@ -244,6 +245,7 @@ auto VToolMove::Create(VToolMoveInitData &initData) -> VToolMove *
|
|||
Q_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
}
|
||||
}
|
||||
|
@ -259,6 +261,8 @@ auto VToolMove::Create(VToolMoveInitData &initData) -> VToolMove *
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (static_cast<GOType>(obj->getType()))
|
||||
{
|
||||
case GOType::Point:
|
||||
|
@ -298,6 +302,7 @@ auto VToolMove::Create(VToolMoveInitData &initData) -> VToolMove *
|
|||
Q_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
}
|
||||
if (initData.parse != Document::FullParse)
|
||||
|
|
|
@ -152,6 +152,8 @@ auto VToolRotation::Create(VToolRotationInitData &initData) -> VToolRotation *
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (static_cast<GOType>(obj->getType()))
|
||||
{
|
||||
case GOType::Point:
|
||||
|
@ -187,6 +189,7 @@ auto VToolRotation::Create(VToolRotationInitData &initData) -> VToolRotation *
|
|||
Q_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
}
|
||||
}
|
||||
|
@ -202,6 +205,8 @@ auto VToolRotation::Create(VToolRotationInitData &initData) -> VToolRotation *
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (static_cast<GOType>(obj->getType()))
|
||||
{
|
||||
case GOType::Point:
|
||||
|
@ -239,6 +244,7 @@ auto VToolRotation::Create(VToolRotationInitData &initData) -> VToolRotation *
|
|||
Q_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
}
|
||||
if (initData.parse != Document::FullParse)
|
||||
|
|
|
@ -390,12 +390,15 @@ void VToolSinglePoint::ToolSelectionType(const SelectionType &type)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
|
||||
auto VToolSinglePoint::InitSegments(GOType curveType, qreal segLength, const VPointF *p, quint32 curveId,
|
||||
VContainer *data, const QString &alias1, const QString &alias2)
|
||||
-> QPair<QString, QString>
|
||||
{
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (curveType)
|
||||
{
|
||||
case GOType::EllipticalArc:
|
||||
|
@ -518,7 +521,7 @@ auto VToolSinglePoint::InitSegments(GOType curveType, qreal segLength, const VPo
|
|||
break;
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
|
|
|
@ -591,6 +591,8 @@ void VNodePoint::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
|
|||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (selectedOption)
|
||||
{
|
||||
case ContextMenuOption::LAST_ONE_DO_NOT_USE:
|
||||
|
@ -709,6 +711,7 @@ void VNodePoint::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
|
|||
SelectPassmarkLine(PassmarkLineType::CheckMark);
|
||||
break;
|
||||
};
|
||||
|
||||
QT_WARNING_POP
|
||||
}
|
||||
|
||||
|
|
|
@ -83,8 +83,7 @@ auto VisOperation::GetCurve(quint32 i, VColorRole role) -> VCurvePathItem *
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
|
||||
void VisOperation::RefreshFlippedObjects(quint32 originPointId, const QPointF &firstPoint, const QPointF &secondPoint)
|
||||
{
|
||||
int iPoint = -1;
|
||||
|
@ -96,6 +95,10 @@ void VisOperation::RefreshFlippedObjects(quint32 originPointId, const QPointF &f
|
|||
// This check helps to find missed objects in the switch
|
||||
Q_STATIC_ASSERT_X(static_cast<int>(GOType::Unknown) == 8, "Not all objects were handled.");
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (static_cast<GOType>(obj->getType()))
|
||||
{
|
||||
case GOType::Point:
|
||||
|
@ -150,6 +153,7 @@ void VisOperation::RefreshFlippedObjects(quint32 originPointId, const QPointF &f
|
|||
Q_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
}
|
||||
}
|
||||
|
|
|
@ -280,9 +280,6 @@ auto VisToolMove::GetOriginPoint(const QVector<QGraphicsItem *> &objects) -> QPo
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
|
||||
auto VisToolMove::CreateOriginObjects(int &iPoint, int &iCurve) -> QVector<QGraphicsItem *>
|
||||
{
|
||||
QVector<QGraphicsItem *> originObjects;
|
||||
|
@ -295,6 +292,10 @@ auto VisToolMove::CreateOriginObjects(int &iPoint, int &iCurve) -> QVector<QGrap
|
|||
// This check helps to find missed objects in the switch
|
||||
Q_STATIC_ASSERT_X(static_cast<int>(GOType::Unknown) == 8, "Not all objects were handled.");
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (static_cast<GOType>(obj->getType()))
|
||||
{
|
||||
case GOType::Point:
|
||||
|
@ -331,17 +332,14 @@ auto VisToolMove::CreateOriginObjects(int &iPoint, int &iCurve) -> QVector<QGrap
|
|||
Q_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
}
|
||||
|
||||
return originObjects;
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
|
||||
void VisToolMove::CreateMovedRotatedObjects(int &iPoint, int &iCurve, qreal length, qreal angle, qreal rotationAngle,
|
||||
const QPointF &rotationOrigin)
|
||||
{
|
||||
|
@ -352,6 +350,10 @@ void VisToolMove::CreateMovedRotatedObjects(int &iPoint, int &iCurve, qreal leng
|
|||
// This check helps to find missed objects in the switch
|
||||
Q_STATIC_ASSERT_X(static_cast<int>(GOType::Unknown) == 8, "Not all objects was handled.");
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (static_cast<GOType>(obj->getType()))
|
||||
{
|
||||
case GOType::Point:
|
||||
|
@ -387,7 +389,7 @@ void VisToolMove::CreateMovedRotatedObjects(int &iPoint, int &iCurve, qreal leng
|
|||
Q_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,9 +65,6 @@ VisToolRotation::VisToolRotation(const VContainer *data, QGraphicsItem *parent)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
|
||||
void VisToolRotation::RefreshGeometry()
|
||||
{
|
||||
if (Objects().isEmpty())
|
||||
|
@ -124,6 +121,10 @@ void VisToolRotation::RefreshGeometry()
|
|||
// This check helps to find missed objects in the switch
|
||||
Q_STATIC_ASSERT_X(static_cast<int>(GOType::Unknown) == 8, "Not all objects was handled.");
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_GCC("-Wswitch-default")
|
||||
QT_WARNING_DISABLE_CLANG("-Wswitch-default")
|
||||
|
||||
switch (static_cast<GOType>(obj->getType()))
|
||||
{
|
||||
case GOType::Point:
|
||||
|
@ -178,10 +179,10 @@ void VisToolRotation::RefreshGeometry()
|
|||
Q_UNREACHABLE();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QT_WARNING_POP
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto VisToolRotation::Angle() const -> QString
|
||||
|
|
Loading…
Reference in a new issue