diff --git a/source/widgets/pixmapkeyboard.cpp b/source/widgets/pixmapkeyboard.cpp index 2eda2c255..6c75a00ca 100644 --- a/source/widgets/pixmapkeyboard.cpp +++ b/source/widgets/pixmapkeyboard.cpp @@ -81,7 +81,11 @@ static const std::map kMidiKeyboard2KeyMap = { {Qt::Key_U, 71} }; +#ifdef HAVE_CPP11_SUPPORT static const QVector kBlackNotes = {1, 3, 6, 8, 10}; +#else +static QVector kBlackNotes; +#endif PixmapKeyboard::PixmapKeyboard(QWidget* parent) : QWidget(parent), @@ -98,6 +102,17 @@ PixmapKeyboard::PixmapKeyboard(QWidget* parent) { setCursor(Qt::PointingHandCursor); setMode(HORIZONTAL); + +#ifndef HAVE_CPP11_SUPPORT + if (kBlackNotes.count() == 0) + { + kBlackNotes << 1; + kBlackNotes << 3; + kBlackNotes << 6; + kBlackNotes << 8; + kBlackNotes << 10; + } +#endif } void PixmapKeyboard::allNotesOff()