aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/utils')
-rw-r--r--src/libs/utils/CMakeLists.txt2
-rw-r--r--src/libs/utils/aspects.cpp20
-rw-r--r--src/libs/utils/aspects.h20
-rw-r--r--src/libs/utils/displayname.cpp4
-rw-r--r--src/libs/utils/displayname.h7
-rw-r--r--src/libs/utils/store.cpp (renamed from src/libs/utils/storage.cpp)2
-rw-r--r--src/libs/utils/store.h (renamed from src/libs/utils/storage.h)2
-rw-r--r--src/libs/utils/utils.qbs4
8 files changed, 31 insertions, 30 deletions
diff --git a/src/libs/utils/CMakeLists.txt b/src/libs/utils/CMakeLists.txt
index 0bce11fcb58..5d9a8ffd442 100644
--- a/src/libs/utils/CMakeLists.txt
+++ b/src/libs/utils/CMakeLists.txt
@@ -161,7 +161,7 @@ add_qtc_library(Utils
sortfiltermodel.h
span.h
statuslabel.cpp statuslabel.h
- storage.cpp storage.h
+ store.cpp store.h
stringtable.cpp stringtable.h
stringutils.cpp stringutils.h
styleanimator.cpp styleanimator.h
diff --git a/src/libs/utils/aspects.cpp b/src/libs/utils/aspects.cpp
index c02bba6a127..a0b7cf6754b 100644
--- a/src/libs/utils/aspects.cpp
+++ b/src/libs/utils/aspects.cpp
@@ -583,7 +583,7 @@ void BaseAspect::saveToMap(QVariantMap &data, const QVariant &value,
/*!
Retrieves the internal value of this BaseAspect from the QVariantMap \a map.
*/
-void BaseAspect::fromMap(const Storage &map)
+void BaseAspect::fromMap(const Store &map)
{
if (settingsKey().isEmpty())
return;
@@ -594,7 +594,7 @@ void BaseAspect::fromMap(const Storage &map)
/*!
Stores the internal value of this BaseAspect into the QVariantMap \a map.
*/
-void BaseAspect::toMap(Storage &map) const
+void BaseAspect::toMap(Store &map) const
{
if (settingsKey().isEmpty())
return;
@@ -692,13 +692,13 @@ public:
class CheckableAspectImplementation
{
public:
- void fromMap(const Storage &map)
+ void fromMap(const Store &map)
{
if (m_checked)
m_checked->fromMap(map);
}
- void toMap(Storage &map)
+ void toMap(Store &map)
{
if (m_checked)
m_checked->toMap(map);
@@ -921,7 +921,7 @@ void StringAspect::setValueAcceptor(StringAspect::ValueAcceptor &&acceptor)
/*!
\reimp
*/
-void StringAspect::fromMap(const Storage &map)
+void StringAspect::fromMap(const Store &map)
{
if (!settingsKey().isEmpty())
setValue(map.value(settingsKey(), defaultValue()).toString(), BeQuiet);
@@ -931,7 +931,7 @@ void StringAspect::fromMap(const Storage &map)
/*!
\reimp
*/
-void StringAspect::toMap(Storage &map) const
+void StringAspect::toMap(Store &map) const
{
saveToMap(map, value(), defaultValue(), settingsKey());
d->m_checkerImpl.toMap(map);
@@ -1440,7 +1440,7 @@ void FilePathAspect::addToLayout(Layouting::LayoutItem &parent)
/*!
\reimp
*/
-void FilePathAspect::fromMap(const Storage &map)
+void FilePathAspect::fromMap(const Store &map)
{
if (!settingsKey().isEmpty())
setValue(map.value(settingsKey(), defaultValue()).toString(), BeQuiet);
@@ -1450,7 +1450,7 @@ void FilePathAspect::fromMap(const Storage &map)
/*!
\reimp
*/
-void FilePathAspect::toMap(Storage &map) const
+void FilePathAspect::toMap(Store &map) const
{
saveToMap(map, value(), defaultValue(), settingsKey());
d->m_checkerImpl.toMap(map);
@@ -2514,7 +2514,7 @@ const QList<BaseAspect *> &AspectContainer::aspects() const
return d->m_items;
}
-void AspectContainer::fromMap(const Storage &map)
+void AspectContainer::fromMap(const Store &map)
{
for (BaseAspect *aspect : std::as_const(d->m_items))
aspect->fromMap(map);
@@ -2523,7 +2523,7 @@ void AspectContainer::fromMap(const Storage &map)
}
-void AspectContainer::toMap(Storage &map) const
+void AspectContainer::toMap(Store &map) const
{
for (BaseAspect *aspect : std::as_const(d->m_items))
aspect->toMap(map);
diff --git a/src/libs/utils/aspects.h b/src/libs/utils/aspects.h
index 7e3b6942a88..00e452e3015 100644
--- a/src/libs/utils/aspects.h
+++ b/src/libs/utils/aspects.h
@@ -8,7 +8,7 @@
#include "infolabel.h"
#include "macroexpander.h"
#include "pathchooser.h"
-#include "storage.h"
+#include "store.h"
#include <functional>
#include <memory>
@@ -101,9 +101,9 @@ public:
AspectContainer *container() const;
- virtual void fromMap(const Utils::Storage &map);
- virtual void toMap(Utils::Storage &map) const;
- virtual void toActiveMap(Utils::Storage &map) const { toMap(map); }
+ virtual void fromMap(const Store &map);
+ virtual void toMap(Store &map) const;
+ virtual void toActiveMap(Store &map) const { toMap(map); }
virtual void addToLayout(Layouting::LayoutItem &parent);
@@ -558,8 +558,8 @@ public:
};
void setDisplayStyle(DisplayStyle style);
- void fromMap(const Utils::Storage &map) override;
- void toMap(Utils::Storage &map) const override;
+ void fromMap(const Utils::Store &map) override;
+ void toMap(Utils::Store &map) const override;
signals:
void validChanged(bool validState);
@@ -627,8 +627,8 @@ public:
void addToLayout(Layouting::LayoutItem &parent) override;
- void fromMap(const Utils::Storage &map) override;
- void toMap(Utils::Storage &map) const override;
+ void fromMap(const Utils::Store &map) override;
+ void toMap(Utils::Store &map) const override;
signals:
void validChanged(bool validState);
@@ -832,8 +832,8 @@ public:
void registerAspect(BaseAspect *aspect, bool takeOwnership = false);
void registerAspects(const AspectContainer &aspects);
- void fromMap(const Utils::Storage &map) override;
- void toMap(Utils::Storage &map) const override;
+ void fromMap(const Utils::Store &map) override;
+ void toMap(Utils::Store &map) const override;
void readSettings() override;
void writeSettings() const override;
diff --git a/src/libs/utils/displayname.cpp b/src/libs/utils/displayname.cpp
index 9758b440c6e..0046b50ae9e 100644
--- a/src/libs/utils/displayname.cpp
+++ b/src/libs/utils/displayname.cpp
@@ -35,13 +35,13 @@ bool DisplayName::usesDefaultValue() const
return m_value.isEmpty();
}
-void DisplayName::toMap(Storage &map, const QString &key) const
+void DisplayName::toMap(Store &map, const QString &key) const
{
if (m_forceSerialization || !usesDefaultValue())
map.insert(key, m_value);
}
-void DisplayName::fromMap(const Storage &map, const QString &key)
+void DisplayName::fromMap(const Store &map, const QString &key)
{
m_value = map.value(key).toString();
}
diff --git a/src/libs/utils/displayname.h b/src/libs/utils/displayname.h
index 71128fd10fb..fd4977c7586 100644
--- a/src/libs/utils/displayname.h
+++ b/src/libs/utils/displayname.h
@@ -4,7 +4,8 @@
#pragma once
#include "utils_global.h"
-#include "storage.h"
+
+#include "store.h"
namespace Utils {
@@ -22,8 +23,8 @@ public:
bool usesDefaultValue() const;
void forceSerialization() { m_forceSerialization = true; }
- void toMap(Utils::Storage &map, const Key &key) const;
- void fromMap(const Utils::Storage &map, const Key &key);
+ void toMap(Store &map, const Key &key) const;
+ void fromMap(const Store &map, const Key &key);
private:
QString m_value;
diff --git a/src/libs/utils/storage.cpp b/src/libs/utils/store.cpp
index c443c48ba63..b343d165fab 100644
--- a/src/libs/utils/storage.cpp
+++ b/src/libs/utils/store.cpp
@@ -1,7 +1,7 @@
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
-#include "storage.h"
+#include "store.h"
namespace Utils {
diff --git a/src/libs/utils/storage.h b/src/libs/utils/store.h
index ddcdd233a94..d692216c301 100644
--- a/src/libs/utils/storage.h
+++ b/src/libs/utils/store.h
@@ -9,6 +9,6 @@ namespace Utils {
using Key = QString;
using Data = QVariant;
-using Storage = QMap<Key, Data>;
+using Store = QMap<Key, Data>;
} // Utils
diff --git a/src/libs/utils/utils.qbs b/src/libs/utils/utils.qbs
index d2f9c814bb5..9e59cc2b86a 100644
--- a/src/libs/utils/utils.qbs
+++ b/src/libs/utils/utils.qbs
@@ -293,8 +293,8 @@ Project {
"../3rdparty/span/span.hpp",
"statuslabel.cpp",
"statuslabel.h",
- "storage.cpp",
- "storage.h",
+ "store.cpp",
+ "store.h",
"stringtable.cpp",
"stringtable.h",
"stringutils.cpp",