Skip to content

Commit

Permalink
Fix misc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Dec 8, 2023
1 parent 22922d4 commit 8c3a76c
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/app/GUI/Expressions/expressiondialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int, bool>(&QButtonGroup::idToggled),
#else
connect(tabGroup, qOverload<int, bool>(&QButtonGroup::buttonToggled),
#endif
this, [this](const int id, const bool checked) {
if(checked) setCurrentTabId(id);
});
Expand Down
2 changes: 1 addition & 1 deletion src/app/GUI/flowlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ QLayoutItem *FlowLayout::takeAt(int index) {
}

Qt::Orientations FlowLayout::expandingDirections() const {
return 0;
return Qt::Horizontal;
}

bool FlowLayout::hasHeightForWidth() const {
Expand Down
2 changes: 1 addition & 1 deletion src/cmake/friction-common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 4 additions & 0 deletions src/core/Animators/complexanimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions src/core/Private/Tasks/taskque.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ void TaskQue::addTask(const stdsptr<eTask> &task) {
case HardwareSupport::cpuOnly:
mCpuOnly << task;
break;
default:;
}
break;
case AccPreference::gpuSoftPreference:
Expand All @@ -69,6 +70,7 @@ void TaskQue::addTask(const stdsptr<eTask> &task) {
case HardwareSupport::cpuOnly:
mCpuOnly << task;
break;
default:;
}
break;
case AccPreference::defaultPreference:
Expand All @@ -85,6 +87,7 @@ void TaskQue::addTask(const stdsptr<eTask> &task) {
case HardwareSupport::cpuOnly:
mCpuOnly << task;
break;
default:;
}
break;
case AccPreference::cpuSoftPreference:
Expand All @@ -99,6 +102,7 @@ void TaskQue::addTask(const stdsptr<eTask> &task) {
case HardwareSupport::cpuOnly:
mCpuOnly << task;
break;
default:;
}
break;
case AccPreference::cpuStrongPreference:
Expand All @@ -111,6 +115,7 @@ void TaskQue::addTask(const stdsptr<eTask> &task) {
case HardwareSupport::cpuOnly:
mCpuOnly << task;
break;
default:;
}
break;
}
Expand Down
11 changes: 11 additions & 0 deletions src/core/Segments/cubiclist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,16 @@ int cubicBezierLine(const qCubicSegment2D& seg,
QList<QPointF>& 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()),
Expand All @@ -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();
Expand Down

0 comments on commit 8c3a76c

Please sign in to comment.