From 41fcc8e10dd375be29cb87d22180b60ca807653d Mon Sep 17 00:00:00 2001 From: Jami Kettunen Date: Mon, 22 Jul 2024 16:31:06 +0300 Subject: [PATCH] mimonscreenplugins: Stop using deprecated TR1 headers and namespaces All of this has been standardized since C++11 and these don't compile anymore against LLVM 18.1.8 libc++. src/mimonscreenplugins.cpp:22:10: fatal error: 'tr1/functional' file not found 22 | #include | ^~~~~~~~~~~~~~~~ --- src/mimonscreenplugins.cpp | 10 +++++----- .../ut_mimpluginmanagerconfig.cpp | 2 -- .../ut_mimpluginmanagerconfig.h | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/mimonscreenplugins.cpp b/src/mimonscreenplugins.cpp index cd500f26..aa8f4180 100644 --- a/src/mimonscreenplugins.cpp +++ b/src/mimonscreenplugins.cpp @@ -19,9 +19,9 @@ #include #include -#include +#include -using namespace std::tr1::placeholders; +using namespace std::placeholders; namespace { @@ -116,10 +116,10 @@ bool MImOnScreenPlugins::isEnabled(const QString &plugin) const std::remove_copy_if(mEnabledSubViews.begin(), mEnabledSubViews.end(), std::back_inserter(mEnabledAndAvailableSubViews), - std::tr1::bind(&MImOnScreenPlugins::isSubViewUnavailable, this, _1)); + std::bind(&MImOnScreenPlugins::isSubViewUnavailable, this, _1)); return std::find_if(mEnabledAndAvailableSubViews.begin(), mEnabledAndAvailableSubViews.end(), - std::tr1::bind(equalPlugin, _1, plugin)) != mEnabledAndAvailableSubViews.end(); + std::bind(equalPlugin, _1, plugin)) != mEnabledAndAvailableSubViews.end(); } bool MImOnScreenPlugins::isSubViewEnabled(const SubView &subView) const @@ -136,7 +136,7 @@ QList MImOnScreenPlugins::enabledSubViews(const QSt { QList result; std::remove_copy_if(mEnabledSubViews.begin(), mEnabledSubViews.end(), - std::back_inserter(result), std::tr1::bind(notEqualPlugin, _1, plugin)); + std::back_inserter(result), std::bind(notEqualPlugin, _1, plugin)); return result; } diff --git a/tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.cpp b/tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.cpp index 28a2ef27..252ab58c 100644 --- a/tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.cpp +++ b/tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.cpp @@ -32,8 +32,6 @@ #include "mattributeextensionmanager.h" #include "msharedattributeextensionmanager.h" -using namespace std::tr1; - typedef QSet HandlerStates; Q_DECLARE_METATYPE(HandlerStates); Q_DECLARE_METATYPE(Maliit::HandlerState); diff --git a/tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.h b/tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.h index c313967b..3ce2376b 100644 --- a/tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.h +++ b/tests/ut_mimpluginmanagerconfig/ut_mimpluginmanagerconfig.h @@ -15,7 +15,7 @@ #include "mimserveroptions.h" #include "mimsettingsqsettings.h" -#include +#include #include #include