OSDN Git Service

[libcalamares] Rename cPointerSetter
authorAdriaan de Groot <groot@kde.org>
Wed, 22 Sep 2021 09:26:28 +0000 (11:26 +0200)
committerAdriaan de Groot <groot@kde.org>
Wed, 22 Sep 2021 09:29:52 +0000 (11:29 +0200)
commit8f65a644a9fe67a8d387f73e18a7627e8895fafe
treebe635f8d42aac73933f95e2649acf323bd1416a9
parentbba5b21873969587edabc6b8c18c16a834754d4b
[libcalamares] Rename cPointerSetter

This class doesn't really set a pointer -- it is a scoped assignment
through a pointer, which **can** set a value on destruction (when
it leaves scope). Rename it.

While here, extend the API so that it can do an assignment to the
underlying object **now**, while also doing a scoped assignment
later when it leaves scope. This makes some code a bit easier
to read ("in this scope, X is now <v> and then it becomes <v'>")
src/libcalamares/PythonJobApi.cpp
src/libcalamares/utils/RAII.h
src/libcalamares/utils/Tests.cpp
src/modules/keyboard/Config.cpp
src/modules/locale/LocalePage.cpp
src/modules/partition/core/PartUtils.cpp