diff --git a/FontBuilder.pro b/FontBuilder.pro index fd4cb2a..ee80a7c 100644 --- a/FontBuilder.pro +++ b/FontBuilder.pro @@ -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 \ @@ -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 \ @@ -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 } diff --git a/src/exporterfactory.cpp b/src/exporterfactory.cpp index 816e429..1c199d2 100644 --- a/src/exporterfactory.cpp +++ b/src/exporterfactory.cpp @@ -30,6 +30,7 @@ #include "exporterfactory.h" +#include extern AbstractExporter* GHLExporterFactoryFunc (QObject*); extern AbstractExporter* ZFIExporterFactoryFunc (QObject* parent); @@ -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) { @@ -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 }