Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit e2c1e05b authored by Laurent Montel's avatar Laurent Montel 😁 Committed by Pali Rohár

Port KSharedPtr

parent cfa18ca8
......@@ -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 <kde@metafoo.co.uk>
*/
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
......
......@@ -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;
......
......@@ -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.
......
......@@ -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
......
......@@ -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;
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment