Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix compiler warnings (master) #6588

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,7 @@ endif (BUILD_WEBENGINE)

set(SCRIPT_INTERFACE TRUE)
# Look for Qt5
if (SCRIPT_INTERFACE)
SET(QT_MIN_VERSION "5.8.0")
else (SCRIPT_INTERFACE)
SET(QT_MIN_VERSION "5.7.0")
endif (SCRIPT_INTERFACE)
SET(QT_MIN_VERSION "5.15.0")
# Include modules
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build" ${CMAKE_MODULE_PATH})
include (FindQt5)
Expand Down
5 changes: 0 additions & 5 deletions awl/pitchlabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,8 @@ QSize PitchLabel::sizeHint() const
QFontMetrics fm(font());
int fw = style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
int h = fm.height() + fw * 2;
#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
// int w = 2 + fm.horizontalAdvance(QString("A#8")) + fw * 4;
int w = 2 + fm.horizontalAdvance(QString("-9999")) + fw * 4; // must display 14Bit controller values
#else
// int w = 2 + fm.width(QString("A#8")) + fw * 4;
int w = 2 + fm.width(QString("-9999")) + fw * 4; // must display 14Bit controller values
#endif
return QSize(w, h).expandedTo(QApplication::globalStrut());
}

Expand Down
8 changes: 0 additions & 8 deletions awl/poslabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,11 @@ QSize PosLabel::sizeHint() const
int fw = style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
int h = fm.height() + fw * 2;
int w;
#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
if (_smpte) {
w = 2 + fm.horizontalAdvance('9') * 9 + fm.horizontalAdvance(':') * 3 + fw * 4;
} else {
w = 2 + fm.horizontalAdvance('9') * 9 + fm.horizontalAdvance('.') * 2 + fw * 4;
}
#else
if (_smpte) {
w = 2 + fm.width('9') * 9 + fm.width(':') * 3 + fw * 4;
} else {
w = 2 + fm.width('9') * 9 + fm.width('.') * 2 + fw * 4;
}
#endif
return QSize(w, h).expandedTo(QApplication::globalStrut());
}

Expand Down
4 changes: 2 additions & 2 deletions framework/midi/devtools/midiportdevmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void MidiPortDevModel::generateMIDI20()

for (auto& o : opcodes) {
Event e;
e.setMessageType(Event::ChannelVoice20);
e.setMessageType(Event::MessageType::ChannelVoice20);
e.setOpcode(o);
e.setGroup(++group);
e.setChannel(++channel);
Expand Down Expand Up @@ -186,7 +186,7 @@ void MidiPortDevModel::generateMIDI20()
case Event::Opcode::RelativeAssignableController:
e.setBank(++bank);
e.setIndex(++index);
/* no break */
Q_FALLTHROUGH();
case Event::Opcode::ChannelPressure:
case Event::Opcode::PitchBend:
e.setData(++data);
Expand Down
2 changes: 2 additions & 0 deletions framework/midi/internal/zerberus/channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@

#include "zerberus.h"

#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#endif
#include <cmath>

#include "channel.h"
Expand Down
2 changes: 2 additions & 0 deletions framework/midi/internal/zerberus/filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
#include <QDebug>
#include <math.h>

#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#endif
#include <cmath>

#include <functional>
Expand Down
Loading