X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiSelectionManager.cpp;h=4d172bc35d890cb52de14e27d6ec9f50f9edcfaf;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=7fe8c8c88c288eb1460ff5047a654e2740fe9b53;hpb=082b4dbb3ff7367328e08a400590b9577f08fa9f;p=lyx.git diff --git a/src/frontends/qt4/GuiSelectionManager.cpp b/src/frontends/qt4/GuiSelectionManager.cpp index 7fe8c8c88c..4d172bc35d 100644 --- a/src/frontends/qt4/GuiSelectionManager.cpp +++ b/src/frontends/qt4/GuiSelectionManager.cpp @@ -23,12 +23,20 @@ #include #include +#ifdef KeyPress +#undef KeyPress +#endif + +#ifdef ControlModifier +#undef ControlModifier +#endif + namespace lyx { namespace frontend { GuiSelectionManager::GuiSelectionManager( - QListView * avail, + QAbstractItemView * avail, QListView * sel, QPushButton * add, QPushButton * del, @@ -144,8 +152,8 @@ bool GuiSelectionManager::isSelected(const QModelIndex & idx) QVariant const & str = availableModel->data(idx, Qt::DisplayRole); QModelIndexList qmil = selectedModel->match(selectedModel->index(0), - Qt::DisplayRole, str, - Qt::MatchExactly | Qt::MatchWrap); + Qt::DisplayRole, str, 1, + Qt::MatchFlags(Qt::MatchExactly | Qt::MatchWrap)); return !qmil.empty(); } @@ -369,4 +377,4 @@ bool GuiSelectionManager::eventFilter(QObject * obj, QEvent * event) } // namespace frontend } // namespace lyx -#include "GuiSelectionManager_moc.cpp" +#include "moc_GuiSelectionManager.cpp"