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
PIM
KTnef
Commits
fbbada84
Commit
fbbada84
authored
Oct 10, 2021
by
Laurent Montel
😁
Browse files
Use std::unique_ptr
parent
51825bde
Pipeline
#87488
passed with stage
in 3 minutes and 41 seconds
Changes
12
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/ktnefattach.cpp
View file @
fbbada84
...
...
@@ -51,10 +51,7 @@ KTNEFAttach::KTNEFAttach()
d
->
index_
=
-
1
;
}
KTNEFAttach
::~
KTNEFAttach
()
{
delete
d
;
}
KTNEFAttach
::~
KTNEFAttach
()
=
default
;
void
KTNEFAttach
::
setTitleParsed
()
{
...
...
src/ktnefattach.h
View file @
fbbada84
...
...
@@ -21,6 +21,7 @@
#include
"ktnef_export.h"
#include
"ktnefpropertyset.h"
#include
<memory>
namespace
KTnef
{
...
...
@@ -211,7 +212,7 @@ public:
private:
//@cond PRIVATE
class
AttachPrivate
;
AttachPrivate
*
const
d
;
std
::
unique_ptr
<
AttachPrivate
>
const
d
;
//@endcond
Q_DISABLE_COPY
(
KTNEFAttach
)
...
...
src/ktnefmessage.cpp
View file @
fbbada84
...
...
@@ -60,10 +60,7 @@ KTNEFMessage::KTNEFMessage()
{
}
KTNEFMessage
::~
KTNEFMessage
()
{
delete
d
;
}
KTNEFMessage
::~
KTNEFMessage
()
=
default
;
const
QList
<
KTNEFAttach
*>
&
KTNEFMessage
::
attachmentList
()
const
{
...
...
src/ktnefmessage.h
View file @
fbbada84
...
...
@@ -21,7 +21,7 @@
#include
"ktnef_export.h"
#include
"ktnefpropertyset.h"
#include
<memory>
namespace
KTnef
{
class
KTNEFAttach
;
...
...
@@ -81,7 +81,7 @@ public:
private:
//@cond PRIVATE
class
MessagePrivate
;
MessagePrivate
*
const
d
;
std
::
unique_ptr
<
MessagePrivate
>
const
d
;
//@endcond
Q_DISABLE_COPY
(
KTNEFMessage
)
...
...
src/ktnefparser.cpp
View file @
fbbada84
...
...
@@ -107,7 +107,6 @@ KTNEFParser::KTNEFParser()
KTNEFParser
::~
KTNEFParser
()
{
d
->
deleteDevice
();
delete
d
;
}
KTNEFMessage
*
KTNEFParser
::
message
()
const
...
...
src/ktnefparser.h
View file @
fbbada84
...
...
@@ -20,6 +20,7 @@
#include
"ktnef_export.h"
#include
<QIODevice>
#include
<QString>
#include
<memory>
namespace
KTnef
{
...
...
@@ -106,7 +107,7 @@ public:
private:
//@cond PRIVATE
class
ParserPrivate
;
ParserPrivate
*
const
d
;
std
::
unique_ptr
<
ParserPrivate
>
const
d
;
//@endcond
Q_DISABLE_COPY
(
KTNEFParser
)
...
...
src/ktnefproperty.cpp
View file @
fbbada84
...
...
@@ -51,10 +51,7 @@ KTNEFProperty::KTNEFProperty(const KTNEFProperty &p)
*
d
=
*
p
.
d
;
}
KTNEFProperty
::~
KTNEFProperty
()
{
delete
d
;
}
KTNEFProperty
::~
KTNEFProperty
()
=
default
;
KTNEFProperty
&
KTNEFProperty
::
operator
=
(
const
KTNEFProperty
&
other
)
{
...
...
src/ktnefproperty.h
View file @
fbbada84
...
...
@@ -17,11 +17,11 @@
#pragma once
#include
"ktnef_export.h"
#include
<QString>
#include
<QVariant>
#include
<memory>
class
KTNEFPropertyPrivate
;
#include
"ktnef_export.h"
namespace
KTnef
{
/**
...
...
@@ -137,7 +137,7 @@ public:
private:
//@cond PRIVATE
KTNEFPropertyPrivate
*
const
d
;
std
::
unique_ptr
<
KTNEFPropertyPrivate
>
const
d
;
//@endcond
};
...
...
src/ktnefpropertyset.cpp
View file @
fbbada84
...
...
@@ -39,8 +39,6 @@ KTNEFPropertySet::KTNEFPropertySet()
KTNEFPropertySet
::~
KTNEFPropertySet
()
{
clear
(
true
);
delete
d
;
}
void
KTNEFPropertySet
::
addProperty
(
int
key
,
int
type
,
const
QVariant
&
value
,
const
QVariant
&
name
,
bool
overwrite
)
...
...
src/ktnefpropertyset.h
View file @
fbbada84
...
...
@@ -17,11 +17,11 @@
#pragma once
#include
"ktnef_export.h"
#include
<QMap>
#include
<QVariant>
#include
<memory>
class
KTNEFPropertySetPrivate
;
#include
"ktnef_export.h"
namespace
KTnef
{
class
KTNEFProperty
;
...
...
@@ -140,7 +140,7 @@ public:
private:
//@cond PRIVATE
KTNEFPropertySetPrivate
*
const
d
;
std
::
unique_ptr
<
KTNEFPropertySetPrivate
>
const
d
;
//@endcond
Q_DISABLE_COPY
(
KTNEFPropertySet
)
...
...
src/ktnefwriter.cpp
View file @
fbbada84
...
...
@@ -67,10 +67,7 @@ KTNEFWriter::KTNEFWriter()
addProperty
(
attOEMCODEPAGE
,
atpBYTE
,
list
);
}
KTNEFWriter
::~
KTNEFWriter
()
{
delete
d
;
}
KTNEFWriter
::~
KTNEFWriter
()
=
default
;
void
KTNEFWriter
::
addProperty
(
int
tag
,
int
type
,
const
QVariant
&
value
)
{
...
...
src/ktnefwriter.h
View file @
fbbada84
...
...
@@ -16,16 +16,17 @@
*/
#pragma once
#include
<QStringList>
#include
"ktnef_export.h"
#include
<memory>
#include
<qglobal.h>
class
QString
;
class
QVariant
;
class
QIODevice
;
class
QDataStream
;
class
QDateTime
;
#include
<QStringList>
#include
"ktnef_export.h"
#include
<qglobal.h>
namespace
KTnef
{
...
...
@@ -273,7 +274,7 @@ public:
private:
//@cond PRIVATE
KTNEFWriterPrivateData
*
const
d
;
std
::
unique_ptr
<
KTNEFWriterPrivateData
>
const
d
;
//@endcond
Q_DISABLE_COPY
(
KTNEFWriter
)
...
...
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