Author: forenr
Date: Wed Jun 8 21:45:52 2011
New Revision: 38995
URL: http://www.lyx.org/trac/changeset/38995
Log:
Compile fix for Qt 4.5 and earlier. The other build systems should update
the moc invocation to add the proper define for QT_VERSION.
Modified:
lyx-devel/trunk/src/frontends/qt4/FancyLineEdit.h
lyx-devel/trunk/src/frontends/qt4/Makefile.am
Modified: lyx-devel/trunk/src/frontends/qt4/FancyLineEdit.h
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/FancyLineEdit.h Wed Jun 8 19:17:25
2011 (r38994)
+++ lyx-devel/trunk/src/frontends/qt4/FancyLineEdit.h Wed Jun 8 21:45:52
2011 (r38995)
@@ -22,6 +22,7 @@
class FancyLineEditPrivate;
+#if QT_VERSION >= 0x040600
class IconButton: public QAbstractButton
{
Q_OBJECT
@@ -44,7 +45,7 @@
bool m_autoHide;
QPixmap m_pixmap;
};
-
+#endif
/* A line edit with an embedded pixmap on one side that is connected to
* a menu. Additionally, it can display a grayed hintText (like "Type Here to")
Modified: lyx-devel/trunk/src/frontends/qt4/Makefile.am
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/Makefile.am Wed Jun 8 19:17:25
2011 (r38994)
+++ lyx-devel/trunk/src/frontends/qt4/Makefile.am Wed Jun 8 21:45:52
2011 (r38995)
@@ -16,9 +16,12 @@
MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp)
+QT_VERSION = $(shell IFS=.; set -- `echo $(QT4_VERSION)`; \
+ echo 0x0`echo "obase=16; $$1*65536+$$2*256+$$3" | bc`)
+
# The moc_%.cpp pattern must match the filter in ../../../po/Rules-lyx
moc_%.cpp: %.h
- $(AM_V_GEN)$(MOC4) -o $@ $<
+ $(AM_V_GEN)$(MOC4) -DQT_VERSION=$(QT_VERSION) -o $@ $<
Resources.qrc: Makefile
$(AM_V_GEN)echo "<!DOCTYPE RCC><RCC version='1.0'><qresource>" > $@ ; \