[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kcontacts] src: Add Q_DISABLE_COPY on classes with dtor but no copy-ctor
From: Sergio Martins <smartins () kde ! org>
Date: 2015-11-07 20:25:12
Message-ID: E1ZvA2y-0000qg-4B () scm ! kde ! org
[Download RAW message or body]
Git commit b8cadefde483ba130e7098f0895ce664f268ec95 by Sergio Martins.
Committed on 07/11/2015 at 20:24.
Pushed by smartins into branch 'master'.
Add Q_DISABLE_COPY on classes with dtor but no copy-ctor
These classes hold resources (d-pointer) which would lead to a crash
if copied and destroyed twice.
REVIEW: D509
M +5 -0 src/addresseelist.h
M +1 -0 src/converter/vcardconverter.h
M +1 -0 src/vcardparser/vcardparser.h
M +1 -0 src/vcardtool.h
http://commits.kde.org/kcontacts/b8cadefde483ba130e7098f0895ce664f268ec95
diff --git a/src/addresseelist.h b/src/addresseelist.h
index 46b3146..acd7776 100644
--- a/src/addresseelist.h
+++ b/src/addresseelist.h
@@ -81,6 +81,7 @@ public:
static bool lt(const Addressee &a1, const Addressee &a2);
=
private:
+ Q_DISABLE_COPY(Uid)
class Private;
Private *const d;
};
@@ -121,6 +122,7 @@ public:
static bool lt(const Addressee &a1, const Addressee &a2);
=
private:
+ Q_DISABLE_COPY(Name)
class Private;
Private *const d;
};
@@ -161,6 +163,7 @@ public:
static bool lt(const Addressee &a1, const Addressee &a2);
=
private:
+ Q_DISABLE_COPY(FormattedName)
class Private;
Private *const d;
};
@@ -204,6 +207,7 @@ public:
static bool lt(const Addressee &a1, const Addressee &a2);
=
private:
+ Q_DISABLE_COPY(FamilyName)
class Private;
Private *const d;
};
@@ -247,6 +251,7 @@ public:
static bool lt(const Addressee &a1, const Addressee &a2);
=
private:
+ Q_DISABLE_COPY(GivenName)
class Private;
Private *const d;
};
diff --git a/src/converter/vcardconverter.h b/src/converter/vcardconverter.h
index 4d448cc..e3d415a 100644
--- a/src/converter/vcardconverter.h
+++ b/src/converter/vcardconverter.h
@@ -117,6 +117,7 @@ public:
Addressee::List parseVCards(const QByteArray &vcard) const;
=
private:
+ Q_DISABLE_COPY(VCardConverter)
class VCardConverterPrivate;
VCardConverterPrivate *const d;
};
diff --git a/src/vcardparser/vcardparser.h b/src/vcardparser/vcardparser.h
index 83a0236..4fc62a9 100644
--- a/src/vcardparser/vcardparser.h
+++ b/src/vcardparser/vcardparser.h
@@ -37,6 +37,7 @@ public:
static QByteArray createVCards(const VCard::List &list);
=
private:
+ Q_DISABLE_COPY(VCardParser)
class VCardParserPrivate;
VCardParserPrivate *d;
};
diff --git a/src/vcardtool.h b/src/vcardtool.h
index b0b1886..07c4691 100644
--- a/src/vcardtool.h
+++ b/src/vcardtool.h
@@ -90,6 +90,7 @@ private:
QMap<QString, Address::TypeFlag> mAddressTypeMap;
QMap<QString, PhoneNumber::TypeFlag> mPhoneTypeMap;
=
+ Q_DISABLE_COPY(VCardTool)
class VCardToolPrivate;
VCardToolPrivate *d;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic