Commit 32566853 authored by Lasath Fernando's avatar Lasath Fernando Committed by David Edmundson

Code style issue. Changed all pointer declarations

    type* variable;
to
    type *variable;
and
    return_type *method();
to
    return_type* method();
with some bash, sed and regexp magic.
parent dd566165
......@@ -23,7 +23,7 @@
class ConversationQueManager::ConversationQueManagerPrivate {
public:
QList<Queable*> que;
KAction* gloablAction;
KAction *gloablAction;
};
void Queable::enqueSelf()
......@@ -40,7 +40,7 @@ Queable::~Queable()
{
}
Queable::Queable(ConversationQueManager* que)
Queable::Queable(ConversationQueManager *que)
: m_queManager(que)
{
if(!que) {
......@@ -48,9 +48,9 @@ Queable::Queable(ConversationQueManager* que)
}
}
ConversationQueManager* ConversationQueManager::instance()
ConversationQueManager *ConversationQueManager::instance()
{
static ConversationQueManager* m_instance = 0;
static ConversationQueManager *m_instance = 0;
if(!m_instance) {
m_instance = new ConversationQueManager();
......@@ -59,7 +59,7 @@ ConversationQueManager* ConversationQueManager::instance()
return m_instance;
}
ConversationQueManager::ConversationQueManager(QObject* parent):
ConversationQueManager::ConversationQueManager(QObject *parent):
QObject(parent),
d(new ConversationQueManagerPrivate)
{
......@@ -82,14 +82,14 @@ void ConversationQueManager::dequeNext()
}
}
void ConversationQueManager::enque(Queable* item)
void ConversationQueManager::enque(Queable *item)
{
if(!d->que.contains(item)) {
d->que.append(item);
}
}
void ConversationQueManager::remove(Queable* item)
void ConversationQueManager::remove(Queable *item)
{
if(d->que.contains(item)) {
d->que.removeAll(item);
......
......@@ -29,7 +29,7 @@ class Queable
friend class ConversationQueManager;
protected:
Queable(ConversationQueManager* queue = 0);
Queable(ConversationQueManager *queue = 0);
virtual ~Queable();
void enqueSelf();
......@@ -37,7 +37,7 @@ protected:
virtual void selfDequed() = 0;
private:
ConversationQueManager* m_queManager;
ConversationQueManager *m_queManager;
};
......@@ -47,14 +47,14 @@ Q_OBJECT
public:
static ConversationQueManager* instance();
void enque(Queable* item);
void remove(Queable* item);
void enque(Queable *item);
void remove(Queable *item);
public Q_SLOTS:
void dequeNext();
private:
explicit ConversationQueManager(QObject* parent = 0);
explicit ConversationQueManager(QObject *parent = 0);
virtual ~ConversationQueManager();
class ConversationQueManagerPrivate;
......
......@@ -29,7 +29,7 @@ public:
KIcon avatar;
};
ConversationTarget::ConversationTarget(Tp::ContactPtr contact, QObject* parent) :
ConversationTarget::ConversationTarget(Tp::ContactPtr contact, QObject *parent) :
QObject(parent),
d(new ConversationTargetPrivate)
{
......
......@@ -39,7 +39,7 @@ class KDE_TELEPATHY_CHAT_EXPORT ConversationTarget : public QObject
Q_PROPERTY(QString id READ id)
public:
ConversationTarget(Tp::ContactPtr contact, QObject* parent = 0);
ConversationTarget(Tp::ContactPtr contact, QObject *parent = 0);
virtual ~ConversationTarget();
QIcon avatar() const;
......
......@@ -27,12 +27,12 @@
class Conversation::ConversationPrivate
{
public:
MessagesModel* model;
ConversationTarget* target;
MessagesModel *model;
ConversationTarget *target;
// Tp::AccountPtr account;
};
Conversation::Conversation(const Tp::TextChannelPtr& channel, const Tp::AccountPtr& account, QObject* parent) :
Conversation::Conversation(const Tp::TextChannelPtr& channel, const Tp::AccountPtr& account, QObject *parent) :
QObject(parent),
d (new ConversationPrivate)
{
......@@ -47,18 +47,18 @@ Conversation::Conversation(const Tp::TextChannelPtr& channel, const Tp::AccountP
// d->account = account;
}
Conversation::Conversation(QObject* parent) : QObject(parent)
Conversation::Conversation(QObject *parent) : QObject(parent)
{
kError() << "Conversation should not be created directly. Use ConversationWatcher instead.";
Q_ASSERT(false);
}
MessagesModel* Conversation::model() const
MessagesModel *Conversation::model() const
{
return d->model;
}
ConversationTarget* Conversation::target() const
ConversationTarget *Conversation::target() const
{
return d->target;
}
......
......@@ -36,14 +36,14 @@ class KDE_TELEPATHY_CHAT_EXPORT Conversation : public QObject
{
Q_OBJECT
// Q_PROPERTY(ConversationTarget* target READ target CONSTANT);
Q_PROPERTY(ConversationTarget* target READ target CONSTANT);
// Q_PROPERTY(ConversationTarget *target READ target CONSTANT);
Q_PROPERTY(ConversationTarget *target READ target CONSTANT);
//TODO: rename this to messages
Q_PROPERTY(MessagesModel* model READ model CONSTANT);
Q_PROPERTY(MessagesModel *model READ model CONSTANT);
public:
Conversation(const Tp::TextChannelPtr &channel, const Tp::AccountPtr &account, QObject* parent = 0);
Conversation(QObject* parent = 0);
Conversation(const Tp::TextChannelPtr &channel, const Tp::AccountPtr &account, QObject *parent = 0);
Conversation(QObject *parent = 0);
virtual ~Conversation();
//FIXME: rename model to messages
......
......@@ -47,7 +47,7 @@ int ConversationsModel::rowCount(const QModelIndex& parent) const
return d->conversations.count();
}
ConversationsModel::ConversationsModel(QObject* parent) :
ConversationsModel::ConversationsModel(QObject *parent) :
QAbstractListModel(parent),
d(new ConversationsModelPrivate)
{
......@@ -58,7 +58,7 @@ ConversationsModel::ConversationsModel(QObject* parent) :
QObject::connect(&d->watcher, SIGNAL(newConversation(Conversation*)), SLOT(onInconmingConversation(Conversation*)));
}
void ConversationsModel::onInconmingConversation(Conversation* newConvo)
void ConversationsModel::onInconmingConversation(Conversation *newConvo)
{
//check if conversation's channel is already being handled, if so replace it
bool handled = false;
......
......@@ -31,7 +31,7 @@ class KDE_TELEPATHY_CHAT_EXPORT ConversationsModel : public QAbstractListModel
{
Q_OBJECT
public:
explicit ConversationsModel(QObject* parent = 0);
explicit ConversationsModel(QObject *parent = 0);
virtual ~ConversationsModel();
virtual QVariant data ( const QModelIndex& index, int role = Qt::DisplayRole ) const;
......@@ -43,7 +43,7 @@ public:
private:
class ConversationsModelPrivate;
ConversationsModelPrivate* d;
ConversationsModelPrivate *d;
private Q_SLOTS:
void onInconmingConversation(Conversation *convo);
......
......@@ -53,7 +53,7 @@ public:
bool visible;
};
MessagesModel::MessagesModel(QObject* parent):
MessagesModel::MessagesModel(QObject *parent):
QAbstractListModel(parent),
d(new MessagesModelPrivate)
{
......@@ -74,7 +74,7 @@ Tp::TextChannelPtr MessagesModel::textChannel()
return d->textChannel;
}
bool MessagesModel::verifyPendingOperation(Tp::PendingOperation* op)
bool MessagesModel::verifyPendingOperation(Tp::PendingOperation *op)
{
bool operationSucceeded = true;
......@@ -181,7 +181,7 @@ QVariant MessagesModel::data(const QModelIndex& index, int role) const
QVariant result;
if (index.isValid()) {
MessageItem* requestedData = &d->messages[index.row()];
MessageItem *requestedData = &d->messages[index.row()];
switch (role) {
case UserRole:
......
......@@ -34,7 +34,7 @@ class KDE_TELEPATHY_CHAT_EXPORT MessagesModel : public QAbstractListModel, publi
Q_PROPERTY(int unreadCount READ unreadCount NOTIFY unreadCountChanged);
public:
MessagesModel(QObject* parent = 0);
MessagesModel(QObject *parent = 0);
virtual ~MessagesModel();
enum Roles {
......@@ -71,7 +71,7 @@ public Q_SLOTS:
private Q_SLOTS:
void onMessageReceived(Tp::ReceivedMessage);
void onMessageSent(Tp::Message,Tp::MessageSendingFlags,QString);
bool verifyPendingOperation(Tp::PendingOperation* op);
bool verifyPendingOperation(Tp::PendingOperation *op);
private:
void setupChannelSignals(Tp::TextChannelPtr channel);
......
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