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.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38995 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2011-06-08 19:45:52 +00:00
parent 995d343ec6
commit c29440131a
2 changed files with 6 additions and 2 deletions

View File

@ -22,6 +22,7 @@ namespace frontend {
class FancyLineEditPrivate; class FancyLineEditPrivate;
#if QT_VERSION >= 0x040600
class IconButton: public QAbstractButton class IconButton: public QAbstractButton
{ {
Q_OBJECT Q_OBJECT
@ -44,7 +45,7 @@ private:
bool m_autoHide; bool m_autoHide;
QPixmap m_pixmap; QPixmap m_pixmap;
}; };
#endif
/* A line edit with an embedded pixmap on one side that is connected to /* 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") * a menu. Additionally, it can display a grayed hintText (like "Type Here to")

View File

@ -16,9 +16,12 @@ ui_%.h: ui/%.ui
MOCEDFILES = $(MOCHEADER:%.h=moc_%.cpp) 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 # The moc_%.cpp pattern must match the filter in ../../../po/Rules-lyx
moc_%.cpp: %.h moc_%.cpp: %.h
$(AM_V_GEN)$(MOC4) -o $@ $< $(AM_V_GEN)$(MOC4) -DQT_VERSION=$(QT_VERSION) -o $@ $<
Resources.qrc: Makefile Resources.qrc: Makefile
$(AM_V_GEN)echo "<!DOCTYPE RCC><RCC version='1.0'><qresource>" > $@ ; \ $(AM_V_GEN)echo "<!DOCTYPE RCC><RCC version='1.0'><qresource>" > $@ ; \