From ee72e7e7916d9b166403c74fd3eb8e874176106e Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Wed, 30 Oct 2019 19:23:26 +0100 Subject: kconfig_compiler: Move the KSharedConfig::Ptr when using them Summary: The generated classes of kconfig_compiler take a KSharedConfig::Ptr by value, one possibility would be to make them const & but that is BIC so instead what we do is just move them to the only place the config is used so the cheaper move constructor can be used instead of the copy constructor Reviewers: ervin, apol Reviewed By: ervin, apol Subscribers: kde-frameworks-devel, ervin, apol Tags: #frameworks Differential Revision: https://phabricator.kde.org/D25061 --- autotests/kconfig_compiler/test8c.cpp.ref | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'autotests/kconfig_compiler/test8c.cpp.ref') diff --git a/autotests/kconfig_compiler/test8c.cpp.ref b/autotests/kconfig_compiler/test8c.cpp.ref index e2bd027c..d806ca79 100644 --- a/autotests/kconfig_compiler/test8c.cpp.ref +++ b/autotests/kconfig_compiler/test8c.cpp.ref @@ -41,12 +41,12 @@ void Test8c::instance(KSharedConfig::Ptr config) qDebug() << "Test8c::instance called after the first use - ignoring"; return; } - new Test8c(config); + new Test8c(std::move(config)); s_globalTest8c()->q->read(); } Test8c::Test8c( KSharedConfig::Ptr config, QObject *parent ) - : KConfigSkeleton( config ) + : KConfigSkeleton( std::move( config ) ) { setParent(parent); Q_ASSERT(!s_globalTest8c()->q); -- cgit v1.2.1