From 25cc0dd7bc9f23946e2c33fe729d946f232b028c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 7 Feb 2023 23:14:30 -0800 Subject: qtvirtualkeyboard: Fix build when std=c++17 clang-16 will be defaulting to c++17 across C++ runtime as well, which means auto_ptr is reported as error, make provisions to replace it Signed-off-by: Khem Raj Signed-off-by: Martin Jansa --- ...precated-std-auto_ptr-with-std-unique_ptr.patch | 66 ++++++++++++++++++++++ recipes-qt/qt5/qtvirtualkeyboard_git.bb | 2 + 2 files changed, 68 insertions(+) create mode 100644 recipes-qt/qt5/qtvirtualkeyboard/0001-replace-deprecated-std-auto_ptr-with-std-unique_ptr.patch diff --git a/recipes-qt/qt5/qtvirtualkeyboard/0001-replace-deprecated-std-auto_ptr-with-std-unique_ptr.patch b/recipes-qt/qt5/qtvirtualkeyboard/0001-replace-deprecated-std-auto_ptr-with-std-unique_ptr.patch new file mode 100644 index 00000000..874c079c --- /dev/null +++ b/recipes-qt/qt5/qtvirtualkeyboard/0001-replace-deprecated-std-auto_ptr-with-std-unique_ptr.patch @@ -0,0 +1,66 @@ +From fe4546abf79cf2e93e151fe8cd771901f9b768d3 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 7 Feb 2023 23:11:18 -0800 +Subject: [PATCH] replace deprecated std::auto_ptr with std::unique_ptr + +auto_ptr is gone with c++17 + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + .../lipi-toolkit/src/util/lib/LTKLoggerUtil.cpp | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/src/util/lib/LTKLoggerUtil.cpp b/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/src/util/lib/LTKLoggerUtil.cpp +index 1971a69d..894028e4 100644 +--- a/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/src/util/lib/LTKLoggerUtil.cpp ++++ b/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/src/util/lib/LTKLoggerUtil.cpp +@@ -96,7 +96,7 @@ LTKLoggerUtil::LTKLoggerUtil(){} + int LTKLoggerUtil::createLogger(const string& lipiLibPath) + { + void* functionHandle = NULL; +- auto_ptr a_ptrOSUtil(LTKOSUtilFactory::getInstance()); ++ unique_ptr a_ptrOSUtil(LTKOSUtilFactory::getInstance()); + + int iErrorCode = a_ptrOSUtil->loadSharedLib(lipiLibPath, + LOGGER_MODULE_STR, +@@ -159,7 +159,7 @@ int LTKLoggerUtil::createLogger(const string& lipiLibPath) + *****************************************************************************/ + int LTKLoggerUtil::destroyLogger() + { +- auto_ptr a_ptrOSUtil(LTKOSUtilFactory::getInstance()); ++ unique_ptr a_ptrOSUtil(LTKOSUtilFactory::getInstance()); + + if (module_destroyLogger != NULL ) + { +@@ -196,7 +196,7 @@ int LTKLoggerUtil::configureLogger(const string& logFile, LTKLogger::EDebugLevel + LTKReturnError(ELOGGER_LIBRARY_NOT_LOADED); + } + +- auto_ptr a_ptrOSUtil(LTKOSUtilFactory::getInstance()); ++ unique_ptr a_ptrOSUtil(LTKOSUtilFactory::getInstance()); + + if ( logFile.length() != 0 ) + { +@@ -257,7 +257,7 @@ int LTKLoggerUtil::getAddressLoggerFunctions() + void* functionHandle = NULL; + int returnVal = SUCCESS; + +- auto_ptr a_ptrOSUtil; ++ unique_ptr a_ptrOSUtil; + + //start log + +@@ -323,7 +323,7 @@ ostream& LTKLoggerUtil::logMessage(LTKLogger::EDebugLevel logLevel, string inStr + { + if (m_libHandleLogger == NULL) + { +- auto_ptr a_ptrOSUtil(LTKOSUtilFactory::getInstance()); ++ unique_ptr a_ptrOSUtil(LTKOSUtilFactory::getInstance()); + m_libHandleLogger = a_ptrOSUtil->getLibraryHandle(LOGGER_MODULE_STR); + + if (m_libHandleLogger == NULL) +-- +2.39.1 + diff --git a/recipes-qt/qt5/qtvirtualkeyboard_git.bb b/recipes-qt/qt5/qtvirtualkeyboard_git.bb index 52640ecf..84518dce 100644 --- a/recipes-qt/qt5/qtvirtualkeyboard_git.bb +++ b/recipes-qt/qt5/qtvirtualkeyboard_git.bb @@ -6,6 +6,8 @@ LIC_FILES_CHKSUM = " \ file://LICENSE.GPL3;md5=d32239bcb673463ab874e80d47fae504 \ " +SRC_URI += "file://0001-replace-deprecated-std-auto_ptr-with-std-unique_ptr.patch" + # To enabled Nuance T9 Write support, you need to provide the licensed components # and enable "t9write" in PACKAGECONFIG. This can be done in a separate .bbappend file. # for example: -- cgit v1.2.3