From c587ebf54cecc78e47434670e9d392112670129f Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 14 Jun 2021 14:47:35 +0200 Subject: Port QSettingsPrivate::get() to std::optional ... instead of a bool return and a QVariant out parameter. Change-Id: I9d937668ede668075d1de5bb57f61e4c260aaddc Reviewed-by: Qt CI Bot Reviewed-by: Thiago Macieira --- src/corelib/io/qsettings_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/io/qsettings_p.h') diff --git a/src/corelib/io/qsettings_p.h b/src/corelib/io/qsettings_p.h index 180ac8b2cd..ddcbe0f76c 100644 --- a/src/corelib/io/qsettings_p.h +++ b/src/corelib/io/qsettings_p.h @@ -197,7 +197,7 @@ public: virtual void remove(const QString &key) = 0; virtual void set(const QString &key, const QVariant &value) = 0; - virtual bool get(const QString &key, QVariant *value) const = 0; + virtual std::optional get(const QString &key) const = 0; enum ChildSpec { AllKeys, ChildKeys, ChildGroups }; virtual QStringList children(const QString &prefix, ChildSpec spec) const = 0; @@ -264,7 +264,7 @@ public: void remove(const QString &key) override; void set(const QString &key, const QVariant &value) override; - bool get(const QString &key, QVariant *value) const override; + std::optional get(const QString &key) const override; QStringList children(const QString &prefix, ChildSpec spec) const override; -- cgit v1.2.3