From 92f86af54dd15e0d0bf28e94d80c1e8f2651e495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Wed, 16 Feb 2011 16:00:42 +0000 Subject: [PATCH] Menus.cpp: QProxyStyle was introduced in Qt 4.6. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@37694 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/Menus.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp index 1cdae2d013..ff6f5dbb37 100644 --- a/src/frontends/qt4/Menus.cpp +++ b/src/frontends/qt4/Menus.cpp @@ -65,7 +65,9 @@ #include #include #include +#if QT_VERSION >= 0x040600 #include +#endif #include #include @@ -1225,7 +1227,7 @@ void Menu::Impl::populate(QMenu & qMenu, MenuDefinition const & menu) } -#ifdef Q_WS_WIN +#if defined(Q_WS_WIN) && (QT_VERSION >= 0x040600) class AlwaysMnemonicStyle : public QProxyStyle { public: int styleHint(StyleHint hint, const QStyleOption *opt = 0, const QWidget *widget = 0, @@ -1246,12 +1248,12 @@ Menu::Menu(GuiView * gv, QString const & name, bool top_level, bool keyboard) : QMenu(gv), d(new Menu::Impl) { - #ifdef Q_WS_WIN +#if defined(Q_WS_WIN) && (QT_VERSION >= 0x040600) if (keyboard) setStyle(new AlwaysMnemonicStyle); - #else +#else (void) keyboard; - #endif +#endif d->top_level_menu = top_level? new MenuDefinition : 0; d->view = gv;