From e17289843019c6f726d3853ea5239d6f1f4472e0 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Fri, 8 Feb 2008 08:44:52 +0000 Subject: [PATCH] compil fix for Qt-4.2 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22856 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiSymbols.cpp | 9 ++++++++- src/frontends/qt4/GuiSymbols.h | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt4/GuiSymbols.cpp b/src/frontends/qt4/GuiSymbols.cpp index 52227372a2..ef1d27d038 100644 --- a/src/frontends/qt4/GuiSymbols.cpp +++ b/src/frontends/qt4/GuiSymbols.cpp @@ -22,8 +22,10 @@ #include "support/gettext.h" +#include #include #include +#include using namespace std; @@ -283,7 +285,12 @@ void GuiSymbols::updateSymbolList() SymbolsList::const_iterator const end = symbols.end(); for (SymbolsList::const_iterator it = symbols.begin(); it != end; ++it) { char_type c = *it; - QChar::Category cat = QChar::Category((uint) c); +#if QT_VERSION >= 0x040300 + QChar::Category const cat = QChar::category(uint(c)); +#else + QChar const qc = uint(c); + QChar::Category const cat = qc.category(); +#endif // we do not want control or space characters if (cat == QChar::Other_Control || cat == QChar::Separator_Space) continue; diff --git a/src/frontends/qt4/GuiSymbols.h b/src/frontends/qt4/GuiSymbols.h index c7cc6bfb6a..d18eba6074 100644 --- a/src/frontends/qt4/GuiSymbols.h +++ b/src/frontends/qt4/GuiSymbols.h @@ -35,7 +35,7 @@ public: void dispatchParams(); void enableView(bool enable); bool isBufferDependent() const { return true; } - virtual kb_action getLfun() const { return LFUN_SELF_INSERT; } + virtual kb_action getLfun() const { return LFUN_SELF_INSERT; } //@} public Q_SLOTS: