diff --git a/src/app/GUI/Expressions/expressiondialog.cpp b/src/app/GUI/Expressions/expressiondialog.cpp index cbb78a13c..c71644b6c 100755 --- a/src/app/GUI/Expressions/expressiondialog.cpp +++ b/src/app/GUI/Expressions/expressiondialog.cpp @@ -462,7 +462,11 @@ ExpressionDialog::ExpressionDialog(QrealAnimator* const target, tabGroup->addButton(mBindingsButton, 0); tabGroup->addButton(mDefinitionsButon, 1); tabGroup->setExclusive(true); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) + connect(tabGroup, qOverload(&QButtonGroup::idToggled), +#else connect(tabGroup, qOverload(&QButtonGroup::buttonToggled), +#endif this, [this](const int id, const bool checked) { if(checked) setCurrentTabId(id); }); diff --git a/src/app/GUI/flowlayout.cpp b/src/app/GUI/flowlayout.cpp index e493c33b6..7750c80ea 100755 --- a/src/app/GUI/flowlayout.cpp +++ b/src/app/GUI/flowlayout.cpp @@ -82,7 +82,7 @@ QLayoutItem *FlowLayout::takeAt(int index) { } Qt::Orientations FlowLayout::expandingDirections() const { - return 0; + return Qt::Horizontal; } bool FlowLayout::hasHeightForWidth() const { diff --git a/src/cmake/friction-common.cmake b/src/cmake/friction-common.cmake index c970e6878..e91a0654d 100644 --- a/src/cmake/friction-common.cmake +++ b/src/cmake/friction-common.cmake @@ -26,7 +26,7 @@ set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) if(UNIX) - add_compile_options(-Wall -Wextra) + add_compile_options(-Wall -Wextra -Wno-unused-private-field -Wno-deprecated-copy-with-user-provided-copy) if(APPLE) add_compile_options(-frtti) endif() diff --git a/src/core/Animators/complexanimator.cpp b/src/core/Animators/complexanimator.cpp index e711db16b..465b5f9ab 100755 --- a/src/core/Animators/complexanimator.cpp +++ b/src/core/Animators/complexanimator.cpp @@ -331,7 +331,11 @@ void ComplexAnimator::ca_swapChildren(Property * const child1, Property * const child2) { const int id1 = ca_getChildPropertyIndex(child1); const int id2 = ca_getChildPropertyIndex(child2); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0)) + ca_mChildren.swapItemsAt(id1, id2); +#else ca_mChildren.swap(id1, id2); +#endif prp_afterWholeInfluenceRangeChanged(); emit ca_childMoved(child1); emit ca_childMoved(child2); diff --git a/src/core/Private/Tasks/taskque.cpp b/src/core/Private/Tasks/taskque.cpp index 9270f0bdf..2baabba19 100755 --- a/src/core/Private/Tasks/taskque.cpp +++ b/src/core/Private/Tasks/taskque.cpp @@ -55,6 +55,7 @@ void TaskQue::addTask(const stdsptr &task) { case HardwareSupport::cpuOnly: mCpuOnly << task; break; + default:; } break; case AccPreference::gpuSoftPreference: @@ -69,6 +70,7 @@ void TaskQue::addTask(const stdsptr &task) { case HardwareSupport::cpuOnly: mCpuOnly << task; break; + default:; } break; case AccPreference::defaultPreference: @@ -85,6 +87,7 @@ void TaskQue::addTask(const stdsptr &task) { case HardwareSupport::cpuOnly: mCpuOnly << task; break; + default:; } break; case AccPreference::cpuSoftPreference: @@ -99,6 +102,7 @@ void TaskQue::addTask(const stdsptr &task) { case HardwareSupport::cpuOnly: mCpuOnly << task; break; + default:; } break; case AccPreference::cpuStrongPreference: @@ -111,6 +115,7 @@ void TaskQue::addTask(const stdsptr &task) { case HardwareSupport::cpuOnly: mCpuOnly << task; break; + default:; } break; } diff --git a/src/core/Segments/cubiclist.cpp b/src/core/Segments/cubiclist.cpp index 27ab1cc48..24e904821 100755 --- a/src/core/Segments/cubiclist.cpp +++ b/src/core/Segments/cubiclist.cpp @@ -336,6 +336,16 @@ int cubicBezierLine(const qCubicSegment2D& seg, QList& result) { const QRectF segBB = seg.ptsBoundingRect(); if(segBB.contains(line.p1()) || segBB.contains(line.p2())) { +#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) + } else if(line.intersects(QLineF(segBB.topLeft(), segBB.bottomLeft()), + nullptr) == QLineF::BoundedIntersection) { + } else if(line.intersects(QLineF(segBB.topLeft(), segBB.topRight()), + nullptr) == QLineF::BoundedIntersection) { + } else if(line.intersects(QLineF(segBB.topRight(), segBB.bottomRight()), + nullptr) == QLineF::BoundedIntersection) { + } else if(line.intersects(QLineF(segBB.bottomRight(), segBB.bottomLeft()), + nullptr) == QLineF::BoundedIntersection) { +#else } else if(line.intersect(QLineF(segBB.topLeft(), segBB.bottomLeft()), nullptr) == QLineF::BoundedIntersection) { } else if(line.intersect(QLineF(segBB.topLeft(), segBB.topRight()), @@ -344,6 +354,7 @@ int cubicBezierLine(const qCubicSegment2D& seg, nullptr) == QLineF::BoundedIntersection) { } else if(line.intersect(QLineF(segBB.bottomRight(), segBB.bottomLeft()), nullptr) == QLineF::BoundedIntersection) { +#endif } else return 0; const qreal lX1 = line.x1();