From 5cfdc8c7a18ae59d81feefa53ac02fbdc2324eef Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 19 Mar 2013 00:18:01 +0000 Subject: [PATCH] Fix build with older GCC --- source/widgets/pixmapkeyboard.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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()