diff options
author | Ivan Komissarov <abbapoh@gmail.com> | 2023-05-05 23:05:10 +0300 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2023-05-10 09:40:29 +0000 |
commit | 99c1fa4037c106d2f5268826ee392e00208bc24e (patch) | |
tree | 3775fdfd3417a72ed0ad87274ecff48ee736bbe2 /src/lib/corelib/corelib.qbs | |
parent | d849e77fd2bc748f04cc3f15faafb8f1c8328670 (diff) |
Implement Pimpl class using std::unique_ptr
... and propagate_const from KDAB tools.
The propagate_const class fixes the issue that d-pointer in const-methods
is not const.
Such Pimpl class has several advantages over the raw pointer.
- the d-tor is trivial and removes the burden for the author/reviewer to
remember to check if pointer is deleted correctly.
- constness is now propageted correctly to the d-pointer in const
methods.
- makes the intention clear that we're using the PIMPL idiom
Change-Id: Ibc42cdaeb6d3303fea81ac6edd63bea0da2ac08d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/corelib.qbs')
-rw-r--r-- | src/lib/corelib/corelib.qbs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/corelib/corelib.qbs b/src/lib/corelib/corelib.qbs index 532148d2c..9f14ca8bd 100644 --- a/src/lib/corelib/corelib.qbs +++ b/src/lib/corelib/corelib.qbs @@ -443,6 +443,7 @@ QbsLibrary { "msvcinfo.cpp", "msvcinfo.h", "pathutils.h", + "pimpl.h", "persistence.cpp", "persistence.h", "porting.h", @@ -457,6 +458,7 @@ QbsLibrary { "progressobserver.cpp", "progressobserver.h", "projectgeneratormanager.cpp", + "propagate_const.h", "qbsassert.cpp", "qbsassert.h", "qbspluginmanager.cpp", |