Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bramtayl committed Nov 22, 2024
1 parent a89d380 commit 2e1854c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ install_executable(Justly)

if (BUILD_TESTS)
qt_add_executable(JustlyTests)
add_subdirectory(tests)
target_sources(JustlyTests PRIVATE tests/test.cpp)
target_include_directories(JustlyTests PRIVATE ${Justly_SOURCE_DIR})

target_link_libraries(JustlyTests PRIVATE
Expand Down
13 changes: 6 additions & 7 deletions src/justly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3166,13 +3166,12 @@ struct PercussionInstrumentEditor : public NamedEditor<PercussionInstrument> {
};

struct AbstractRationalEditor : public QFrame {
QSpinBox &numerator_box;
QSpinBox &denominator_box;
QHBoxLayout &row_layout;
QSpinBox &numerator_box = *(new QSpinBox);
QSpinBox &denominator_box = *(new QSpinBox);
QHBoxLayout &row_layout = *(new QHBoxLayout(this));

explicit AbstractRationalEditor(QWidget *parent_pointer)
: QFrame(parent_pointer), numerator_box(*(new QSpinBox)),
denominator_box(*(new QSpinBox)), row_layout(*(new QHBoxLayout(this))) {
: QFrame(parent_pointer) {
setFrameStyle(QFrame::StyledPanel);
setAutoFillBackground(true);

Expand All @@ -3199,10 +3198,10 @@ struct IntervalEditor : public AbstractRationalEditor {
Q_PROPERTY(Interval interval READ value WRITE setValue USER true)

public:
QSpinBox &octave_box;
QSpinBox &octave_box = *(new QSpinBox);

explicit IntervalEditor(QWidget *parent_pointer)
: AbstractRationalEditor(parent_pointer), octave_box(*(new QSpinBox)) {
: AbstractRationalEditor(parent_pointer) {
octave_box.setMinimum(-MAX_OCTAVE);
octave_box.setMaximum(MAX_OCTAVE);

Expand Down
1 change: 0 additions & 1 deletion tests/CMakeLists.txt

This file was deleted.

0 comments on commit 2e1854c

Please sign in to comment.