Remove TODO statement from QWinRegistryKey::stringValue()
QWinRegistryKey::stringValue is more readable than key::value<QString>().value_or(QString()). This patch also adds developer documentation for the function. Change-Id: I6a760db77a50ca9fa810196e14af14068df8aee3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 16ca13e148445b5a18ea768c096dfedfbacce3c4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
8a23001ca6
commit
e04d9276b9
@ -120,6 +120,10 @@ QVariant QWinRegistryKey::value(QStringView subKey) const
|
||||
return {};
|
||||
}
|
||||
|
||||
// Returns the value of the specified subKey as a string, obtained using
|
||||
// qvariant_cast from the underlying QVariant. If that value is not a string,
|
||||
// or the subKey has no value, a string whose isNull() is true is returned.
|
||||
// Otherwise, the resulting string (which may be empty) is returned.
|
||||
QString QWinRegistryKey::stringValue(QStringView subKey) const
|
||||
{
|
||||
return value<QString>(subKey).value_or(QString());
|
||||
|
@ -56,7 +56,6 @@ public:
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
// ### TODO: Remove once all usages are migrated to new interface.
|
||||
QString stringValue(QStringView subKey) const;
|
||||
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user