Skip to content

Commit

Permalink
fix build for Qt4
Browse files Browse the repository at this point in the history
  • Loading branch information
andryblack committed Mar 1, 2019
1 parent f627dcd commit c69ea82
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
10 changes: 6 additions & 4 deletions FontBuilder.pro
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ SOURCES += src/main.cpp \
src/layouters/gridlinelayouter.cpp \
src/exporters/myguiexporter.cpp \
src/exporters/bmfontexporter.cpp \
src/exporters/ageexporter.cpp \
src/exporters/jsonfontexporter.cpp
src/exporters/ageexporter.cpp


HEADERS += src/fontbuilder.h \
src/colorbutton.h \
Expand Down Expand Up @@ -118,8 +118,8 @@ HEADERS += src/fontbuilder.h \
src/layouters/gridlinelayouter.h \
src/exporters/myguiexporter.h \
src/exporters/bmfontexporter.h \
src/exporters/ageexporter.h \
src/exporters/jsonfontexporter.h
src/exporters/ageexporter.h


FORMS += src/fontbuilder.ui \
src/fontselectframe.ui \
Expand All @@ -135,6 +135,8 @@ TRANSLATIONS = fontbuilder_en.ts \
QT += xml

greaterThan(QT_MAJOR_VERSION, 4) {
SOURCES += src/exporters/jsonfontexporter.cpp
HEADERS += src/exporters/jsonfontexporter.h
QT += widgets
}

Expand Down
8 changes: 6 additions & 2 deletions src/exporterfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include "exporterfactory.h"

#include <QtGlobal>

extern AbstractExporter* GHLExporterFactoryFunc (QObject*);
extern AbstractExporter* ZFIExporterFactoryFunc (QObject* parent);
Expand All @@ -42,8 +43,9 @@ extern AbstractExporter* SimpleExporterFactoryFunc (QObject*);
extern AbstractExporter* MyGUIExporterFactoryFunc (QObject*);
extern AbstractExporter* BMFontExporterFactoryFunc (QObject*);
extern AbstractExporter* AGEExporterFactoryFunc (QObject*);
extern AbstractExporter* JSONFontExporterFactoryFunc (QObject*);

#if QT_VERSION >= 0x050000
extern AbstractExporter* JSONFontExporterFactoryFunc (QObject*);
#endif
ExporterFactory::ExporterFactory(QObject *parent) :
QObject(parent)
{
Expand All @@ -58,7 +60,9 @@ ExporterFactory::ExporterFactory(QObject *parent) :
m_factorys["MyGUI"] = &MyGUIExporterFactoryFunc;
m_factorys["BMFont"] = &BMFontExporterFactoryFunc;
m_factorys["AGE"] = &AGEExporterFactoryFunc;
#if QT_VERSION >= 0x050000
m_factorys["JSON"] = &JSONFontExporterFactoryFunc;
#endif
}


Expand Down

0 comments on commit c69ea82

Please sign in to comment.