Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Games
libkmahjongg
Commits
f35ca0d4
Commit
f35ca0d4
authored
Jan 11, 2021
by
Friedrich W. H. Kossebau
Browse files
Consistently use std::unique_ptr to life-manage the PIMPL d object
GIT_SILENT
parent
fc5d3a6c
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/kmahjonggbackground.cpp
View file @
f35ca0d4
...
...
@@ -67,10 +67,7 @@ KMahjonggBackground::KMahjonggBackground()
_inited
=
true
;
}
KMahjonggBackground
::~
KMahjonggBackground
()
{
delete
d
;
}
KMahjonggBackground
::~
KMahjonggBackground
()
=
default
;
bool
KMahjonggBackground
::
loadDefault
()
{
...
...
src/kmahjonggbackground.h
View file @
f35ca0d4
...
...
@@ -10,6 +10,8 @@
// Qt
#include
<QBrush>
// Std
#include
<memory>
// LibKMahjongg
#include
"libkmahjongg_export.h"
...
...
@@ -36,8 +38,7 @@ class LIBKMAHJONGG_EXPORT KMahjonggBackground
QString
authorProperty
(
const
QString
&
key
)
const
;
private:
friend
class
KMahjonggBackgroundPrivate
;
KMahjonggBackgroundPrivate
*
const
d
;
std
::
unique_ptr
<
KMahjonggBackgroundPrivate
>
const
d
;
Q_DISABLE_COPY
(
KMahjonggBackground
)
};
...
...
src/kmahjonggconfigdialog.cpp
View file @
f35ca0d4
...
...
@@ -34,10 +34,7 @@ KMahjonggConfigDialog::KMahjonggConfigDialog(QWidget * parent, const QString & n
d
->
m_config
=
config
;
}
KMahjonggConfigDialog
::~
KMahjonggConfigDialog
()
{
delete
d
;
}
KMahjonggConfigDialog
::~
KMahjonggConfigDialog
()
=
default
;
void
KMahjonggConfigDialog
::
addTilesetPage
()
{
...
...
src/kmahjonggconfigdialog.h
View file @
f35ca0d4
...
...
@@ -36,7 +36,7 @@ Q_OBJECT
private:
friend
class
KMahjonggConfigDialogPrivate
;
KMahjonggConfigDialogPrivate
*
const
d
;
std
::
unique_ptr
<
KMahjonggConfigDialogPrivate
>
const
d
;
Q_DISABLE_COPY
(
KMahjonggConfigDialog
)
};
...
...
src/kmahjonggtileset.cpp
View file @
f35ca0d4
...
...
@@ -86,10 +86,7 @@ KMahjonggTileset::KMahjonggTileset()
// ---------------------------------------------------------
KMahjonggTileset
::~
KMahjonggTileset
()
{
delete
d
;
}
KMahjonggTileset
::~
KMahjonggTileset
()
=
default
;
void
KMahjonggTileset
::
updateScaleInfo
(
short
tilew
,
short
tileh
)
{
...
...
src/kmahjonggtileset.h
View file @
f35ca0d4
...
...
@@ -55,7 +55,7 @@ protected:
private:
friend
class
KMahjonggTilesetPrivate
;
KMahjonggTilesetPrivate
*
const
d
;
std
::
unique_ptr
<
KMahjonggTilesetPrivate
>
const
d
;
Q_DISABLE_COPY
(
KMahjonggTileset
)
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment