Browse Source

Fix build with older GCC

tags/1.9.4
falkTX 11 years ago
parent
commit
5cfdc8c7a1
1 changed files with 15 additions and 0 deletions
  1. +15
    -0
      source/widgets/pixmapkeyboard.cpp

+ 15
- 0
source/widgets/pixmapkeyboard.cpp View File

@@ -81,7 +81,11 @@ static const std::map<int, int> kMidiKeyboard2KeyMap = {
{Qt::Key_U, 71}
};

#ifdef HAVE_CPP11_SUPPORT
static const QVector<int> kBlackNotes = {1, 3, 6, 8, 10};
#else
static QVector<int> 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()


Loading…
Cancel
Save