Commit f1a8205b authored by Lasath Fernando's avatar Lasath Fernando Committed by David Edmundson
Browse files

Changed target property back to type ConversationTarget*. It turns out all I...

Changed target property back to type ConversationTarget*. It turns out all I had to do was call qmlRegisterType() with no arguments.
parent ac7b88c0
......@@ -32,7 +32,7 @@ public:
// Tp::AccountPtr account;
};
Conversation::Conversation(Tp::TextChannelPtr channel, Tp::AccountPtr account, QObject* parent) :
Conversation::Conversation(const Tp::TextChannelPtr& channel, const Tp::AccountPtr& account, QObject* parent) :
QObject(parent),
d (new ConversationPrivate)
{
......
......@@ -28,21 +28,21 @@
// #include "conversation-model.h"
#include <KIcon>
#include "conversation-que-manager.h"
#include "conversation-target.h"
// #include "conversation-target.h"
// class ConversationTarget;
class ConversationTarget;
class MessagesModel;
class KDE_TELEPATHY_CHAT_EXPORT Conversation : public QObject
{
Q_OBJECT
// Q_PROPERTY(ConversationTarget* target READ target CONSTANT);
Q_PROPERTY(QObject* target READ target CONSTANT);
Q_PROPERTY(ConversationTarget* target READ target CONSTANT);
//TODO: rename this to messages
Q_PROPERTY(MessagesModel* model READ model CONSTANT);
public:
Conversation(Tp::TextChannelPtr channel, Tp::AccountPtr account, QObject* parent = 0);
Conversation(const Tp::TextChannelPtr &channel, const Tp::AccountPtr &account, QObject* parent = 0);
Conversation(QObject* parent = 0);
virtual ~Conversation();
......
......@@ -47,7 +47,8 @@ int ConversationsModel::rowCount(const QModelIndex& parent) const
return d->conversations.count();
}
ConversationsModel::ConversationsModel() :
ConversationsModel::ConversationsModel(QObject* parent) :
QAbstractListModel(parent),
d(new ConversationsModelPrivate)
{
QHash<int, QByteArray> roles;
......
......@@ -31,7 +31,7 @@ class KDE_TELEPATHY_CHAT_EXPORT ConversationsModel : public QAbstractListModel
{
Q_OBJECT
public:
ConversationsModel();
explicit ConversationsModel(QObject* parent = 0);
virtual ~ConversationsModel();
virtual QVariant data ( const QModelIndex& index, int role = Qt::DisplayRole ) const;
......
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