mirror of https://github.com/axmolengine/axmol.git
Qt 5: Build fixes for Qt 5 platform
Recent changes to the develop branch broke Qt 5 support.
This commit is contained in:
parent
08807cb5f5
commit
6f967fc107
|
@ -158,47 +158,47 @@ Application::getResourceRootPath()
|
||||||
return m_resourceRootPath;
|
return m_resourceRootPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
TargetPlatform
|
Application::Platform
|
||||||
Application::getTargetPlatform()
|
Application::getTargetPlatform()
|
||||||
{
|
{
|
||||||
return kTargetLinux;
|
return Platform::OS_LINUX;
|
||||||
}
|
}
|
||||||
|
|
||||||
ccLanguageType
|
LanguageType
|
||||||
Application::getCurrentLanguage()
|
Application::getCurrentLanguage()
|
||||||
{
|
{
|
||||||
QLocale locale;
|
QLocale locale;
|
||||||
|
|
||||||
switch (locale.language()) {
|
switch (locale.language()) {
|
||||||
case QLocale::English:
|
case QLocale::English:
|
||||||
return kLanguageEnglish;
|
return LanguageType::ENGLISH;
|
||||||
case QLocale::Chinese:
|
case QLocale::Chinese:
|
||||||
return kLanguageChinese;
|
return LanguageType::CHINESE;
|
||||||
case QLocale::French:
|
case QLocale::French:
|
||||||
return kLanguageFrench;
|
return LanguageType::FRENCH;
|
||||||
case QLocale::Italian:
|
case QLocale::Italian:
|
||||||
return kLanguageItalian;
|
return LanguageType::ITALIAN;
|
||||||
case QLocale::German:
|
case QLocale::German:
|
||||||
return kLanguageGerman;
|
return LanguageType::GERMAN;
|
||||||
case QLocale::Spanish:
|
case QLocale::Spanish:
|
||||||
return kLanguageSpanish;
|
return LanguageType::SPANISH;
|
||||||
case QLocale::Russian:
|
case QLocale::Russian:
|
||||||
return kLanguageRussian;
|
return LanguageType::RUSSIAN;
|
||||||
case QLocale::Korean:
|
case QLocale::Korean:
|
||||||
return kLanguageKorean;
|
return LanguageType::KOREAN;
|
||||||
case QLocale::Japanese:
|
case QLocale::Japanese:
|
||||||
return kLanguageJapanese;
|
return LanguageType::JAPANESE;
|
||||||
case QLocale::Hungarian:
|
case QLocale::Hungarian:
|
||||||
return kLanguageHungarian;
|
return LanguageType::HUNGARIAN;
|
||||||
case QLocale::Portuguese:
|
case QLocale::Portuguese:
|
||||||
return kLanguagePortuguese;
|
return LanguageType::PORTUGUESE;
|
||||||
case QLocale::Arabic:
|
case QLocale::Arabic:
|
||||||
return kLanguageArabic;
|
return LanguageType::ARABIC;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return kLanguageEnglish;
|
return LanguageType::ENGLISH;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
|
@ -64,7 +64,7 @@ class Application : public ApplicationProtocol {
|
||||||
CC_DEPRECATED_ATTRIBUTE static Application* sharedApplication();
|
CC_DEPRECATED_ATTRIBUTE static Application* sharedApplication();
|
||||||
|
|
||||||
/* override functions */
|
/* override functions */
|
||||||
virtual ccLanguageType getCurrentLanguage();
|
virtual LanguageType getCurrentLanguage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the Resource root path.
|
* Sets the Resource root path.
|
||||||
|
@ -81,7 +81,7 @@ class Application : public ApplicationProtocol {
|
||||||
/**
|
/**
|
||||||
@brief Get target platform
|
@brief Get target platform
|
||||||
*/
|
*/
|
||||||
virtual TargetPlatform getTargetPlatform();
|
virtual Platform getTargetPlatform();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QGuiApplication *m_application;
|
QGuiApplication *m_application;
|
||||||
|
|
|
@ -68,7 +68,8 @@ Cocos2DQt5OpenGLIntegration::Cocos2DQt5OpenGLIntegration(EGLView *view, int widt
|
||||||
{
|
{
|
||||||
setSurfaceType(QSurface::OpenGLSurface);
|
setSurfaceType(QSurface::OpenGLSurface);
|
||||||
resize(width, height);
|
resize(width, height);
|
||||||
showFullScreen();
|
//showFullScreen();
|
||||||
|
show();
|
||||||
|
|
||||||
m_context = new QOpenGLContext(this);
|
m_context = new QOpenGLContext(this);
|
||||||
m_context->create();
|
m_context->create();
|
||||||
|
|
|
@ -63,7 +63,6 @@ SOURCES += ../actions/CCAction.cpp \
|
||||||
../particle_nodes/CCParticleBatchNode.cpp \
|
../particle_nodes/CCParticleBatchNode.cpp \
|
||||||
../platform/CCSAXParser.cpp \
|
../platform/CCSAXParser.cpp \
|
||||||
../platform/CCThread.cpp \
|
../platform/CCThread.cpp \
|
||||||
../platform/CCImageCommonWebp.cpp \
|
|
||||||
../platform/CCEGLViewProtocol.cpp \
|
../platform/CCEGLViewProtocol.cpp \
|
||||||
../platform/CCFileUtils.cpp \
|
../platform/CCFileUtils.cpp \
|
||||||
../platform/qt5/CCCommon.cpp \
|
../platform/qt5/CCCommon.cpp \
|
||||||
|
@ -102,9 +101,7 @@ SOURCES += ../actions/CCAction.cpp \
|
||||||
../textures/CCTexture2D.cpp \
|
../textures/CCTexture2D.cpp \
|
||||||
../textures/CCTextureAtlas.cpp \
|
../textures/CCTextureAtlas.cpp \
|
||||||
../textures/CCTextureCache.cpp \
|
../textures/CCTextureCache.cpp \
|
||||||
../textures/CCTextureETC.cpp \
|
../platform/third_party/common/etc/etc1.cpp \
|
||||||
../textures/CCTexturePVR.cpp \
|
|
||||||
../textures/etc/etc1.cpp \
|
|
||||||
../tilemap_parallax_nodes/CCParallaxNode.cpp \
|
../tilemap_parallax_nodes/CCParallaxNode.cpp \
|
||||||
../tilemap_parallax_nodes/CCTMXLayer.cpp \
|
../tilemap_parallax_nodes/CCTMXLayer.cpp \
|
||||||
../tilemap_parallax_nodes/CCTMXObjectGroup.cpp \
|
../tilemap_parallax_nodes/CCTMXObjectGroup.cpp \
|
||||||
|
@ -158,6 +155,7 @@ INCLUDEPATH += ../../extensions/GUI/CCControlExtension
|
||||||
INCLUDEPATH += ../../external/chipmunk/include/chipmunk
|
INCLUDEPATH += ../../external/chipmunk/include/chipmunk
|
||||||
INCLUDEPATH += ../../extensions/network
|
INCLUDEPATH += ../../extensions/network
|
||||||
INCLUDEPATH += ../../extensions/Components
|
INCLUDEPATH += ../../extensions/Components
|
||||||
|
INCLUDEPATH += ../platform/third_party/common/etc
|
||||||
|
|
||||||
TARGET = $${LIB_OUTPUT_DIR}/cocos2d
|
TARGET = $${LIB_OUTPUT_DIR}/cocos2d
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,9 @@ DISABLED_WARNINGS = -Wno-ignored-qualifiers -Wno-unused-parameter -Wno-psabi
|
||||||
QMAKE_CXXFLAGS += $${DISABLED_WARNINGS} -Wno-reorder
|
QMAKE_CXXFLAGS += $${DISABLED_WARNINGS} -Wno-reorder
|
||||||
QMAKE_CFLAGS += $${DISABLED_WARNINGS}
|
QMAKE_CFLAGS += $${DISABLED_WARNINGS}
|
||||||
|
|
||||||
# C++11 support (GCC 4.6; for newer versions, change to -std=c++11)
|
# C++11 support (Pick the first one if you have an old GCC version)
|
||||||
QMAKE_CXXFLAGS += -Doverride= -std=c++0x
|
#QMAKE_CXXFLAGS += -Doverride= -std=c++0x
|
||||||
|
CONFIG += c++11
|
||||||
|
|
||||||
OS_TYPE = linux
|
OS_TYPE = linux
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue