Browse Source

Fix build with older GCC

tags/v0.9.0
falkTX 12 years ago
parent
commit
149b373a67
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      c++/widgets/pixmapkeyboard.cpp

+ 13
- 0
c++/widgets/pixmapkeyboard.cpp View File

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

#ifndef Q_COMPILER_LAMBDA
static QVector<int> kBlackNotes;
static struct BlackNotesInit {
BlackNotesInit() {
kBlackNotes << 1;
kBlackNotes << 3;
kBlackNotes << 6;
kBlackNotes << 8;
kBlackNotes << 10;
}
} _blackNotesInit ;
#else
static const QVector<int> kBlackNotes = {1, 3, 6, 8, 10};
#endif

PixmapKeyboard::PixmapKeyboard(QWidget* parent)
: QWidget(parent),


Loading…
Cancel
Save