aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-02-07 23:14:30 -0800
committerMartin Jansa <Martin.Jansa@gmail.com>2023-02-11 09:05:40 +0100
commita7b4c5a5f6d00c246093294423aa67873523e6d5 (patch)
tree91dcd48983a020735647a1f12549f451511aa4e6
parent2c7ddcefe58099578094c91ed9a2f48f755e2dfa (diff)
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 <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--recipes-qt/qt5/qtvirtualkeyboard/0001-replace-deprecated-std-auto_ptr-with-std-unique_ptr.patch66
-rw-r--r--recipes-qt/qt5/qtvirtualkeyboard_git.bb2
2 files changed, 68 insertions, 0 deletions
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 <raj.khem@gmail.com>
+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 <raj.khem@gmail.com>
+---
+ .../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<LTKOSUtil> a_ptrOSUtil(LTKOSUtilFactory::getInstance());
++ unique_ptr<LTKOSUtil> 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<LTKOSUtil> a_ptrOSUtil(LTKOSUtilFactory::getInstance());
++ unique_ptr<LTKOSUtil> 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<LTKOSUtil> a_ptrOSUtil(LTKOSUtilFactory::getInstance());
++ unique_ptr<LTKOSUtil> a_ptrOSUtil(LTKOSUtilFactory::getInstance());
+
+ if ( logFile.length() != 0 )
+ {
+@@ -257,7 +257,7 @@ int LTKLoggerUtil::getAddressLoggerFunctions()
+ void* functionHandle = NULL;
+ int returnVal = SUCCESS;
+
+- auto_ptr<LTKOSUtil> a_ptrOSUtil;
++ unique_ptr<LTKOSUtil> a_ptrOSUtil;
+
+ //start log
+
+@@ -323,7 +323,7 @@ ostream& LTKLoggerUtil::logMessage(LTKLogger::EDebugLevel logLevel, string inStr
+ {
+ if (m_libHandleLogger == NULL)
+ {
+- auto_ptr<LTKOSUtil> a_ptrOSUtil(LTKOSUtilFactory::getInstance());
++ unique_ptr<LTKOSUtil> 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: