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