diff --git a/cocos2dx/platform/qt5/CCApplication.cpp b/cocos2dx/platform/qt5/CCApplication.cpp index e4748c0a33..ee3ba271ba 100644 --- a/cocos2dx/platform/qt5/CCApplication.cpp +++ b/cocos2dx/platform/qt5/CCApplication.cpp @@ -158,47 +158,47 @@ Application::getResourceRootPath() return m_resourceRootPath; } -TargetPlatform +Application::Platform Application::getTargetPlatform() { - return kTargetLinux; + return Platform::OS_LINUX; } -ccLanguageType +LanguageType Application::getCurrentLanguage() { QLocale locale; switch (locale.language()) { case QLocale::English: - return kLanguageEnglish; + return LanguageType::ENGLISH; case QLocale::Chinese: - return kLanguageChinese; + return LanguageType::CHINESE; case QLocale::French: - return kLanguageFrench; + return LanguageType::FRENCH; case QLocale::Italian: - return kLanguageItalian; + return LanguageType::ITALIAN; case QLocale::German: - return kLanguageGerman; + return LanguageType::GERMAN; case QLocale::Spanish: - return kLanguageSpanish; + return LanguageType::SPANISH; case QLocale::Russian: - return kLanguageRussian; + return LanguageType::RUSSIAN; case QLocale::Korean: - return kLanguageKorean; + return LanguageType::KOREAN; case QLocale::Japanese: - return kLanguageJapanese; + return LanguageType::JAPANESE; case QLocale::Hungarian: - return kLanguageHungarian; + return LanguageType::HUNGARIAN; case QLocale::Portuguese: - return kLanguagePortuguese; + return LanguageType::PORTUGUESE; case QLocale::Arabic: - return kLanguageArabic; + return LanguageType::ARABIC; default: break; } - return kLanguageEnglish; + return LanguageType::ENGLISH; } NS_CC_END diff --git a/cocos2dx/platform/qt5/CCApplication.h b/cocos2dx/platform/qt5/CCApplication.h index 85f3728603..7ad25e463e 100644 --- a/cocos2dx/platform/qt5/CCApplication.h +++ b/cocos2dx/platform/qt5/CCApplication.h @@ -64,7 +64,7 @@ class Application : public ApplicationProtocol { CC_DEPRECATED_ATTRIBUTE static Application* sharedApplication(); /* override functions */ - virtual ccLanguageType getCurrentLanguage(); + virtual LanguageType getCurrentLanguage(); /** * Sets the Resource root path. @@ -81,7 +81,7 @@ class Application : public ApplicationProtocol { /** @brief Get target platform */ - virtual TargetPlatform getTargetPlatform(); + virtual Platform getTargetPlatform(); protected: QGuiApplication *m_application; diff --git a/cocos2dx/platform/qt5/CCEGLView.cpp b/cocos2dx/platform/qt5/CCEGLView.cpp index aaeee74811..25bc785006 100644 --- a/cocos2dx/platform/qt5/CCEGLView.cpp +++ b/cocos2dx/platform/qt5/CCEGLView.cpp @@ -68,7 +68,8 @@ Cocos2DQt5OpenGLIntegration::Cocos2DQt5OpenGLIntegration(EGLView *view, int widt { setSurfaceType(QSurface::OpenGLSurface); resize(width, height); - showFullScreen(); + //showFullScreen(); + show(); m_context = new QOpenGLContext(this); m_context->create(); diff --git a/cocos2dx/proj.qt5/cocos2dx.pro b/cocos2dx/proj.qt5/cocos2dx.pro index 1cfe811dfb..0c80650f39 100644 --- a/cocos2dx/proj.qt5/cocos2dx.pro +++ b/cocos2dx/proj.qt5/cocos2dx.pro @@ -63,7 +63,6 @@ SOURCES += ../actions/CCAction.cpp \ ../particle_nodes/CCParticleBatchNode.cpp \ ../platform/CCSAXParser.cpp \ ../platform/CCThread.cpp \ -../platform/CCImageCommonWebp.cpp \ ../platform/CCEGLViewProtocol.cpp \ ../platform/CCFileUtils.cpp \ ../platform/qt5/CCCommon.cpp \ @@ -102,9 +101,7 @@ SOURCES += ../actions/CCAction.cpp \ ../textures/CCTexture2D.cpp \ ../textures/CCTextureAtlas.cpp \ ../textures/CCTextureCache.cpp \ -../textures/CCTextureETC.cpp \ -../textures/CCTexturePVR.cpp \ -../textures/etc/etc1.cpp \ +../platform/third_party/common/etc/etc1.cpp \ ../tilemap_parallax_nodes/CCParallaxNode.cpp \ ../tilemap_parallax_nodes/CCTMXLayer.cpp \ ../tilemap_parallax_nodes/CCTMXObjectGroup.cpp \ @@ -158,6 +155,7 @@ INCLUDEPATH += ../../extensions/GUI/CCControlExtension INCLUDEPATH += ../../external/chipmunk/include/chipmunk INCLUDEPATH += ../../extensions/network INCLUDEPATH += ../../extensions/Components +INCLUDEPATH += ../platform/third_party/common/etc TARGET = $${LIB_OUTPUT_DIR}/cocos2d diff --git a/cocos2dx/proj.qt5/common.pri b/cocos2dx/proj.qt5/common.pri index 353e86b448..c9555f4d2a 100644 --- a/cocos2dx/proj.qt5/common.pri +++ b/cocos2dx/proj.qt5/common.pri @@ -8,8 +8,9 @@ DISABLED_WARNINGS = -Wno-ignored-qualifiers -Wno-unused-parameter -Wno-psabi QMAKE_CXXFLAGS += $${DISABLED_WARNINGS} -Wno-reorder QMAKE_CFLAGS += $${DISABLED_WARNINGS} -# C++11 support (GCC 4.6; for newer versions, change to -std=c++11) -QMAKE_CXXFLAGS += -Doverride= -std=c++0x +# C++11 support (Pick the first one if you have an old GCC version) +#QMAKE_CXXFLAGS += -Doverride= -std=c++0x +CONFIG += c++11 OS_TYPE = linux