diff --git a/CMakeLists.txt b/CMakeLists.txt index 8cdf3b1d02..2ebc4eb500 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -227,7 +227,7 @@ if (NOT MSVC) endif (NOT MSVC) if (APPLE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC -stdlib=libc++ -Wno-inconsistent-missing-override") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC -stdlib=libc++ -Wno-inconsistent-missing-override -Wno-deprecated-register") # This is necessary for genManual to be executed during the build phase, # it needs to be able to get the Qt libs. # TODO: is it still needed? genManual is removed. diff --git a/libmscore/beam.cpp b/libmscore/beam.cpp index 7e351593c6..d9cb7fe308 100644 --- a/libmscore/beam.cpp +++ b/libmscore/beam.cpp @@ -2056,7 +2056,6 @@ void Beam::write(XmlWriter& xml) const void Beam::read(XmlReader& e) { - QPointF p1, p2; qreal _spatium = spatium(); if (score()->mscVersion() < 301) _id = e.intAttribute("id"); diff --git a/libmscore/bend.cpp b/libmscore/bend.cpp index 51055c6ad5..d0110767f6 100644 --- a/libmscore/bend.cpp +++ b/libmscore/bend.cpp @@ -148,7 +148,6 @@ void Bend::layout() int idx = (_points[pt+1].pitch + 12)/25; const char* l = label[idx]; - QRectF r; bb |= fm.boundingRect(QRectF(x2, y2, 0, 0), Qt::AlignHCenter | Qt::AlignBottom | Qt::TextDontClip, QString(l)); } diff --git a/libmscore/box.h b/libmscore/box.h index fd26f93749..ca5e808ee0 100644 --- a/libmscore/box.h +++ b/libmscore/box.h @@ -42,7 +42,6 @@ class Box : public MeasureBase { qreal _topMargin { 0.0 }; qreal _bottomMargin { 0.0 }; bool editMode { false }; - qreal dragX; // used during drag of hbox public: Box(Score*); diff --git a/libmscore/bracketItem.h b/libmscore/bracketItem.h index 5852c78351..7b7d824db7 100644 --- a/libmscore/bracketItem.h +++ b/libmscore/bracketItem.h @@ -26,7 +26,6 @@ class BracketItem final : public ScoreElement { BracketType _bracketType { BracketType::NO_BRACKET }; int _column { 0 }; int _bracketSpan { 0 }; - bool _selected { false }; Staff* _staff { 0 }; public: diff --git a/libmscore/input.h b/libmscore/input.h index 02be572a2b..10e597b446 100644 --- a/libmscore/input.h +++ b/libmscore/input.h @@ -39,7 +39,6 @@ enum class NoteEntryMethod : char { //--------------------------------------------------------- class InputState { - Score* _score; TDuration _duration { TDuration::DurationType::V_INVALID }; // currently duration int _drumNote { -1 }; int _track { 0 }; @@ -58,8 +57,6 @@ class InputState { Segment* nextInputPos() const; public: - InputState(Score* s) : _score(s) {} - ChordRest* cr() const; Fraction tick() const; diff --git a/libmscore/score.cpp b/libmscore/score.cpp index d119fd1a1e..fa25cfcaeb 100644 --- a/libmscore/score.cpp +++ b/libmscore/score.cpp @@ -244,7 +244,7 @@ void MeasureBaseList::change(MeasureBase* ob, MeasureBase* nb) //--------------------------------------------------------- Score::Score() - : ScoreElement(this), _is(this), _selection(this), _selectionFilter(this) + : ScoreElement(this), _selection(this), _selectionFilter(this) { Score::validScores.insert(this); _masterScore = 0; diff --git a/libmscore/undo.cpp b/libmscore/undo.cpp index a984ba2015..62090b04ae 100644 --- a/libmscore/undo.cpp +++ b/libmscore/undo.cpp @@ -413,7 +413,7 @@ Element* UndoMacro::selectedElement(const Selection& sel) } UndoMacro::UndoMacro(Score* s) - : undoInputState(s->inputState()), redoInputState(s), + : undoInputState(s->inputState()), undoSelectedElement(selectedElement(s->selection())), score(s) { } diff --git a/mscore/importptb.h b/mscore/importptb.h index 98f634316e..7ee160a266 100644 --- a/mscore/importptb.h +++ b/mscore/importptb.h @@ -70,9 +70,11 @@ class PowerTab { virtual Type type() { return Empty; }; + + virtual ~ptComponent() {} }; - struct stRhytmSlash : public ptComponent { + struct stRhytmSlash final : public ptComponent { int position {0}; int duration {0}; bool triplet{ false }; @@ -82,39 +84,39 @@ class PowerTab { bool is_rest{ false }; }; - struct ptGuitarIn : public ptComponent { + struct ptGuitarIn final : public ptComponent { int rhytmSlash{ true }; int staff{ 0 }; int trackinfo{ 0 }; int section{ 0 }; int position{ 0 }; - Type type() { + Type type() override { return GuitarIn; } }; - struct ptSymbol : public ptComponent { + struct ptSymbol final : public ptComponent { int value{ 0 }; ptSymbol(int val) : value(val) {} - Type type() { + Type type() override { return Symbol; } }; - struct ptBar : public ptComponent { + struct ptBar final : public ptComponent { int measureNo{ 0 }; int repeatClose{ 0 }; bool repeatStart{ false }; int numerator{ 0 }; int denominator{ 0 }; - Type type() { + Type type() override { return Bar; } }; std::vector bars; - struct ptNote : public ptComponent { + struct ptNote final : public ptComponent { int value{ 0 }; int str{ 0 }; int bend{0}; @@ -122,12 +124,12 @@ class PowerTab { bool dead{ false }; bool hammer{ false }; int slide{ 0 }; - Type type() { + Type type() override { return Note; } }; - struct ptChord : public ptComponent { + struct ptChord final : public ptComponent { int key; int formula; int modification; @@ -136,7 +138,7 @@ class PowerTab { std::vector frets; }; - struct ptChordText : public ptComponent { + struct ptChordText final : public ptComponent { int position; int key; int formula; @@ -144,7 +146,7 @@ class PowerTab { int extra; }; - struct ptBeat : public ptComponent { + struct ptBeat final : public ptComponent { int position{ 0 }; int staff{ 0 }; int voice{ 0 }; @@ -166,12 +168,12 @@ class PowerTab { std::vector notes; ptBeat(int _staff, int _voice) : staff(_staff), voice(_voice) {} - Type type() { + Type type() override { return Beat; } }; - struct ptDirection : public ptComponent { + struct ptDirection final : public ptComponent { enum Direction { DIRECTION_CODA = 0, DIRECTION_DOUBLE_CODA = 1, @@ -207,7 +209,7 @@ class PowerTab { ptDirection(int dir, int sym, int rep) : direction((Direction)dir), activeSymbol((ActiveSym)sym), repeat(rep) {} - Type type() { + Type type() override { return TDirection; } }; diff --git a/mscore/plugin/qmliconview.cpp b/mscore/plugin/qmliconview.cpp index 1ec13d03bc..41f7e629f6 100644 --- a/mscore/plugin/qmliconview.cpp +++ b/mscore/plugin/qmliconview.cpp @@ -44,7 +44,7 @@ void QmlIconView::paint(QPainter* p) void QmlIconView::setIcon(QVariant v) { if (v.canConvert()) - _icon = std::move(v.value()); + _icon = v.value(); else if (v.canConvert()) { _color = v.value(); _icon = QIcon(); diff --git a/mscore/plugin/qmlpluginengine.cpp b/mscore/plugin/qmlpluginengine.cpp index 4d0844a3fa..ea0aab2649 100644 --- a/mscore/plugin/qmlpluginengine.cpp +++ b/mscore/plugin/qmlpluginengine.cpp @@ -26,7 +26,9 @@ namespace Ms { +#ifndef TESTROOT static constexpr int maxCmdCount = 10; // recursion prevention +#endif //--------------------------------------------------------- // QmlPluginEngine diff --git a/mscore/sparkle/autoUpdater.h b/mscore/sparkle/autoUpdater.h index a54599f52e..28c5ad871d 100644 --- a/mscore/sparkle/autoUpdater.h +++ b/mscore/sparkle/autoUpdater.h @@ -20,8 +20,9 @@ namespace Ms virtual void checkUpdates() {} virtual void checkForUpdatesNow() {} virtual void cleanup() {} + virtual ~GeneralAutoUpdater() {} }; } //Ms -#endif //__AUTO_UPDATER_H__ \ No newline at end of file +#endif //__AUTO_UPDATER_H__ diff --git a/mscore/workspace.cpp b/mscore/workspace.cpp index aa556c57f1..0dd2fac991 100644 --- a/mscore/workspace.cpp +++ b/mscore/workspace.cpp @@ -632,7 +632,7 @@ std::unique_ptr Workspace::getPaletteTree() const e.skipCurrentElement(); } }); - return std::move(paletteTree); + return paletteTree; } void Workspace::read(XmlReader& e)