summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-03-22 08:01:08 +0100
committerPali Roh├ír <[email protected]>2017-12-22 09:10:21 +0100
commite2c1e05b6e41635050e20309163eac3e08931794 (patch)
tree6b94309d4959476d2a620043bfb24aa49f577d08
parentcfa18ca84ee88a1c2718a376c19dee295afe4df0 (diff)
Port KSharedPtr
-rw-r--r--libkopete/kopetemessagehandlerchain.h8
-rw-r--r--libkopete/kopeteonlinestatus.h4
-rw-r--r--libkopete/kopetepicture.cpp2
-rw-r--r--libkopete/kopetepicture.h4
-rw-r--r--libkopete/kopetestatusmessage.h4
5 files changed, 11 insertions, 11 deletions
diff --git a/libkopete/kopetemessagehandlerchain.h b/libkopete/kopetemessagehandlerchain.h
index 0a8e3e3..aabc018 100644
--- a/libkopete/kopetemessagehandlerchain.h
+++ b/libkopete/kopetemessagehandlerchain.h
@@ -21,7 +21,7 @@
#include <QDebug>
#include <kdemacros.h>
-#include <ksharedptr.h>
+#include <QExplicitlySharedDataPointer>
#include "kopetemessage.h"
#include "kopetetask.h"
#include "libkopete_debug.h"
@@ -44,12 +44,12 @@ class ProcessMessageTask;
*
* @author Richard Smith <[email protected]>
*/
-class MessageHandlerChain : public QObject, private KShared
+class MessageHandlerChain : public QObject, private QSharedData
{
Q_OBJECT
public:
- friend class KSharedPtr<MessageHandlerChain>;
- typedef KSharedPtr<MessageHandlerChain> Ptr;
+ friend class QExplicitlySharedDataPointer<MessageHandlerChain>;
+ typedef QExplicitlySharedDataPointer<MessageHandlerChain> Ptr;
/**
* Create a new MessageHandlerChain object with the appropriate handlers for
diff --git a/libkopete/kopeteonlinestatus.h b/libkopete/kopeteonlinestatus.h
index ef855c5..82236bd 100644
--- a/libkopete/kopeteonlinestatus.h
+++ b/libkopete/kopeteonlinestatus.h
@@ -24,7 +24,7 @@
#include "kopete_export.h"
#include <kdemacros.h>
-#include <ksharedptr.h>
+#include <QExplicitlySharedDataPointer>
#include <kiconloader.h>
#include <QtCore/QObject>
@@ -465,7 +465,7 @@ public:
private:
class Private;
- KSharedPtr<Private> d;
+ QExplicitlySharedDataPointer<Private> d;
QString mimeSource( const QString& icon, int size, QColor color, bool idle) const;
diff --git a/libkopete/kopetepicture.cpp b/libkopete/kopetepicture.cpp
index 56c6e72..327d564 100644
--- a/libkopete/kopetepicture.cpp
+++ b/libkopete/kopetepicture.cpp
@@ -190,7 +190,7 @@ void Picture::setPicture(const KContacts::Picture &picture)
void Picture::detach()
{
// there is no detach in QExplicitlySharedDataPointer.
- if( d.count() == 1 )
+ if( d.data())
return;
// Warning: this only works as long as the private object doesn't contain pointers to allocated objects.
diff --git a/libkopete/kopetepicture.h b/libkopete/kopetepicture.h
index 475e066..c2b2ddf 100644
--- a/libkopete/kopetepicture.h
+++ b/libkopete/kopetepicture.h
@@ -18,7 +18,7 @@
#define KOPETEPICTURE_H
#include <kdemacros.h>
-#include <ksharedptr.h>
+#include <QExplicitlySharedDataPointer>
#include "kopete_export.h"
#include <QImage>
@@ -141,7 +141,7 @@ private:
void detach();
class Private;
- KSharedPtr<Private> d;
+ QExplicitlySharedDataPointer<Private> d;
};
}//END namespace Kopete
diff --git a/libkopete/kopetestatusmessage.h b/libkopete/kopetestatusmessage.h
index 907ed75..2ee3323 100644
--- a/libkopete/kopetestatusmessage.h
+++ b/libkopete/kopetestatusmessage.h
@@ -19,7 +19,7 @@
#include <QtCore/QVariant>
-#include <ksharedptr.h>
+#include <QExplicitlySharedDataPointer>
#include "kopete_export.h"
namespace Kopete
@@ -137,7 +137,7 @@ public:
private:
class Private;
- KSharedPtr<Private> d;
+ QExplicitlySharedDataPointer<Private> d;
};
}