From 0c811510d51ec05f622eac4ece779c84eaed98b7 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 17 May 2016 10:59:28 +0200 Subject: [PATCH 1/3] Changed: Delete SoundMngr to avoid memory leaks --HG-- branch : develop --- code/ryzom/client/src/init.cpp | 3 ++- code/ryzom/client/src/main_loop_utilities.cpp | 3 ++- code/ryzom/client/src/release.cpp | 4 ++-- code/ryzom/client/src/user_entity.cpp | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index a55a09db9..f7a5af7af 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -1555,7 +1555,8 @@ void postlogInit() { nlwarning("init : Error when creating 'SoundMngr' : %s", e.what()); // leak the alocated sound manager... - SoundMngr = 0; + delete SoundMngr; + SoundMngr = NULL; } // Play Music just after the SoundMngr is inited diff --git a/code/ryzom/client/src/main_loop_utilities.cpp b/code/ryzom/client/src/main_loop_utilities.cpp index 81a52b2d3..415764bfa 100644 --- a/code/ryzom/client/src/main_loop_utilities.cpp +++ b/code/ryzom/client/src/main_loop_utilities.cpp @@ -329,7 +329,8 @@ void updateFromClientCfg() catch(const Exception &e) { nlwarning("init : Error when creating 'SoundMngr' : %s", e.what()); - SoundMngr = 0; + delete SoundMngr; + SoundMngr = NULL; } // re-init with good SFX/Music Volume diff --git a/code/ryzom/client/src/release.cpp b/code/ryzom/client/src/release.cpp index e2a96c397..da456fadb 100644 --- a/code/ryzom/client/src/release.cpp +++ b/code/ryzom/client/src/release.cpp @@ -478,7 +478,7 @@ void releaseOutGame() if(SoundMngr) { delete SoundMngr; - SoundMngr = 0; + SoundMngr = NULL; } // Delete the driver. @@ -573,7 +573,7 @@ void release() if(SoundMngr) { delete SoundMngr; - SoundMngr = 0; + SoundMngr = NULL; } // Release the Entities Animation Manager diff --git a/code/ryzom/client/src/user_entity.cpp b/code/ryzom/client/src/user_entity.cpp index 1d0c27570..f5b4b0f42 100644 --- a/code/ryzom/client/src/user_entity.cpp +++ b/code/ryzom/client/src/user_entity.cpp @@ -2381,7 +2381,7 @@ void CUserEntity::updateSound(const TTime &time) H_AUTO_USE ( RZ_Client_Update_Sound ); // no sound manager, no need to update sound - if (SoundMngr == 0) + if (SoundMngr == NULL) return; if (!(StereoHMD && true)) // TODO: ClientCfg.Headphone From de7031ee06225184c496c3a7c38e63ccf9f6340a Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 17 May 2016 11:00:48 +0200 Subject: [PATCH 2/3] Changed: Don't need to use QXcbGlxIntegrationPlugin --HG-- branch : develop --- code/ryzom/tools/client/ryzom_installer/CMakeLists.txt | 2 +- code/ryzom/tools/client/ryzom_installer/src/main.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/code/ryzom/tools/client/ryzom_installer/CMakeLists.txt b/code/ryzom/tools/client/ryzom_installer/CMakeLists.txt index 216347e43..4471628e0 100644 --- a/code/ryzom/tools/client/ryzom_installer/CMakeLists.txt +++ b/code/ryzom/tools/client/ryzom_installer/CMakeLists.txt @@ -42,7 +42,7 @@ ADD_EXECUTABLE(ryzom_installer_qt WIN32 ${SRC} ${CLIENT_INSTALL_MOC_SRC} ${CLIEN NL_DEFAULT_PROPS(ryzom_installer_qt "Ryzom, Tools: Ryzom Installer" ) NL_ADD_RUNTIME_FLAGS(ryzom_installer_qt) NL_ADD_LIB_SUFFIX(ryzom_installer_qt) -TARGET_LINK_LIBRARIES(ryzom_installer_qt nelmisc ryzom_sevenzip ${QT_LIBRARIES} ${OPENGL_gl_LIBRARY}) +TARGET_LINK_LIBRARIES(ryzom_installer_qt nelmisc ryzom_sevenzip ${QT_LIBRARIES}) IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(ryzom_installer_qt ${CMAKE_CURRENT_SOURCE_DIR}/src/stdpch.h ${CMAKE_CURRENT_SOURCE_DIR}/src/stdpch.cpp) diff --git a/code/ryzom/tools/client/ryzom_installer/src/main.cpp b/code/ryzom/tools/client/ryzom_installer/src/main.cpp index fe837335c..580defe49 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/main.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/main.cpp @@ -37,7 +37,6 @@ Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin) #elif defined(Q_OS_UNIX) Q_IMPORT_PLUGIN(QXcbIntegrationPlugin) - Q_IMPORT_PLUGIN(QXcbGlxIntegrationPlugin) #endif Q_IMPORT_PLUGIN(QICOPlugin) From 13dfa25a048a6015a4f38fb643dc93a07404199b Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 17 May 2016 11:01:16 +0200 Subject: [PATCH 3/3] Changed: Added commented QT5_CREATE_TRANSLATION --HG-- branch : develop --- code/ryzom/tools/client/ryzom_installer/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/ryzom/tools/client/ryzom_installer/CMakeLists.txt b/code/ryzom/tools/client/ryzom_installer/CMakeLists.txt index 4471628e0..b096af884 100644 --- a/code/ryzom/tools/client/ryzom_installer/CMakeLists.txt +++ b/code/ryzom/tools/client/ryzom_installer/CMakeLists.txt @@ -26,6 +26,8 @@ ELSE() SET(QT_LIBRARIES Qt5::WinExtras ${QT_LIBRARIES}) ENDIF() +# uncomment this line if you want to update original translations +# QT5_CREATE_TRANSLATION(CLIENT_INSTALL_Q ${CLIENT_INSTALL_UIS} ${SRC} ${CLIENT_INSTALL_TRANS}) QT5_ADD_TRANSLATION(CLIENT_INSTALL_QM ${CLIENT_INSTALL_TRANS}) QT5_ADD_RESOURCES(CLIENT_INSTALL_RC_SRCS ${CLIENT_INSTALL_RCS}) QT5_WRAP_CPP(CLIENT_INSTALL_MOC_SRC ${CLIENT_INSTALL_HDR})