diff options
author | David Robillard <d@drobilla.net> | 2020-12-14 16:39:33 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-12-14 16:39:33 +0100 |
commit | 8c4de381454e1467428b2efa4fa3ac7e22e8dabf (patch) | |
tree | f9a40e366a82329b1e2112d820cafe6a295428b6 | |
parent | df3e9faf1d9f5c095b555b7b91b09d885158f7fe (diff) | |
download | jalv-8c4de381454e1467428b2efa4fa3ac7e22e8dabf.tar.gz jalv-8c4de381454e1467428b2efa4fa3ac7e22e8dabf.tar.bz2 jalv-8c4de381454e1467428b2efa4fa3ac7e22e8dabf.zip |
Don't declare default arguments
-rw-r--r-- | .clang-tidy | 1 | ||||
-rw-r--r-- | src/jalv_qt.cpp | 26 |
2 files changed, 15 insertions, 12 deletions
diff --git a/.clang-tidy b/.clang-tidy index 123abfc..f9e1bee 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -27,7 +27,6 @@ Checks: > -cppcoreguidelines-pro-type-reinterpret-cast, -cppcoreguidelines-pro-type-static-cast-downcast, -fuchsia-default-arguments-calls, - -fuchsia-default-arguments-declarations, -google-readability-todo, -hicpp-multiway-paths-covered, -hicpp-signed-bitwise, diff --git a/src/jalv_qt.cpp b/src/jalv_qt.cpp index a31070e..46ace6a 100644 --- a/src/jalv_qt.cpp +++ b/src/jalv_qt.cpp @@ -71,11 +71,11 @@ class FlowLayout : public QLayout { public: explicit FlowLayout(QWidget* parent, - int margin = -1, - int hSpacing = -1, - int vSpacing = -1); + int margin, + int hSpacing, + int vSpacing); - explicit FlowLayout(int margin = -1, int hSpacing = -1, int vSpacing = -1); + explicit FlowLayout(int margin, int hSpacing, int vSpacing); ~FlowLayout() override; @@ -234,13 +234,17 @@ FlowLayout::doLayout(const QRect &rect, bool testOnly) const if (spaceX == -1) { spaceX = wid->style()->layoutSpacing(QSizePolicy::PushButton, QSizePolicy::PushButton, - Qt::Horizontal); + Qt::Horizontal, + nullptr, + nullptr); } int spaceY = verticalSpacing(); if (spaceY == -1) { spaceY = wid->style()->layoutSpacing(QSizePolicy::PushButton, QSizePolicy::PushButton, - Qt::Vertical); + Qt::Vertical, + nullptr, + nullptr); } int nextX = x + item->sizeHint().width() + spaceX; @@ -277,7 +281,7 @@ FlowLayout::smartSpacing(QStyle::PixelMetric pm) const class PresetAction : public QAction { - Q_OBJECT + Q_OBJECT // NOLINT public: PresetAction(QObject* parent, Jalv* jalv, LilvNode* preset) @@ -305,10 +309,10 @@ typedef struct { class Control : public QGroupBox { - Q_OBJECT + Q_OBJECT // NOLINT public: - explicit Control(PortContainer portContainer, QWidget* parent = nullptr); + explicit Control(PortContainer portContainer, QWidget* parent); Q_SLOT void dialChanged(int value); @@ -647,7 +651,7 @@ build_control_widget(Jalv* jalv) std::sort(portContainers.begin(), portContainers.end(), portGroupLessThan); QWidget* grid = new QWidget(); - FlowLayout* flowLayout = new FlowLayout(); + FlowLayout* flowLayout = new FlowLayout(-1, -1, -1); QLayout* layout = flowLayout; LilvNode* lastGroup = nullptr; @@ -656,7 +660,7 @@ build_control_widget(Jalv* jalv) PortContainer portContainer = portContainers[i]; Port* port = portContainer.port; - Control* control = new Control(portContainer); + Control* control = new Control(portContainer, nullptr); LilvNode* group = lilv_port_get( plugin, port->lilv_port, jalv->nodes.pg_group); if (group) { |