[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:05:08 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=5d1a798

The following commit has been merged in the master branch:
commit 5d1a798c31e16950b55b3af0e81bbbe493f25f2a
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date:   Thu Feb 24 15:49:15 2011 +0100

    Unify licence text, remove Tpy namespace and fix some compile warnings.
---
 accountbutton.cpp          | 37 +++++++++++++++++++------------------
 accountbutton.h            | 44 ++++++++++++++++++++++----------------------
 accounts-model-item.cpp    | 11 ++++-------
 accounts-model-item.h      | 17 +++++++----------
 accounts-model.cpp         | 11 ++++-------
 accounts-model.h           | 15 ++++++---------
 contact-model-item.cpp     | 13 +++++--------
 contact-model-item.h       | 15 ++++++---------
 contactdelegateoverlay.cpp |  6 ++++--
 contactdelegateoverlay.h   |  5 +++--
 contactoverlays.cpp        | 13 +++++++------
 contactoverlays.h          |  5 +++--
 contactviewhoverbutton.cpp | 45 ++++++++++++++++++++++-----------------------
 contactviewhoverbutton.h   |  1 +
 main-widget.cpp            | 20 +++++++++++---------
 main-widget.h              |  7 ++-----
 tree-node.cpp              | 11 ++++-------
 tree-node.h                | 19 ++++++++-----------
 18 files changed, 138 insertions(+), 157 deletions(-)

diff --git a/accountbutton.cpp b/accountbutton.cpp
index 4a34694..024eca6 100644
--- a/accountbutton.cpp
+++ b/accountbutton.cpp
@@ -1,21 +1,22 @@
 /*
-    Tool button which controls account's presence
-    Copyright (C) 2011 Martin Klapetek <martin.klapetek at gmail.com>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ * Tool button which controls account's presence
+ * 
+ * Copyright (C) 2011 Martin Klapetek <martin dot klapetek at gmail dot com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
 
 #include <QAction>
 #include <QPainter>
@@ -117,5 +118,5 @@ void AccountButton::setAccountStatus(QAction *action)
     
     Q_ASSERT(!m_account.isNull());
     
-    Tp::PendingOperation* presenceRequest = m_account->setRequestedPresence(presence);
+    m_account->setRequestedPresence(presence);
 }
\ No newline at end of file
diff --git a/accountbutton.h b/accountbutton.h
index 276f868..3f590fe 100644
--- a/accountbutton.h
+++ b/accountbutton.h
@@ -1,25 +1,25 @@
 /*
-    Tool button which controls account's presence
-    Copyright (C) 2011 Martin Klapetek <martin.klapetek at gmail.com>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License along
-    with this program; if not, write to the Free Software Foundation, Inc.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-
-#ifndef ACCOUNTBUTTON_H
-#define ACCOUNTBUTTON_H
+ * Tool button which controls account's presence
+ * 
+ * Copyright (C) 2011 Martin Klapetek <martin dot klapetek at gmail dot com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef TELEPATHY_ACCOUNTBUTTON_H
+#define TELEPATHY_ACCOUNTBUTTON_H
 
 #include <QToolButton>
 #include <QLineEdit>
@@ -42,4 +42,4 @@ private:
     Tp::AccountPtr m_account;
 };
 
-#endif // ACCOUNTBUTTON_H
+#endif // TELEPATHY_ACCOUNTBUTTON_H
diff --git a/accounts-model-item.cpp b/accounts-model-item.cpp
index 8cc907c..7334b06 100644
--- a/accounts-model-item.cpp
+++ b/accounts-model-item.cpp
@@ -1,7 +1,9 @@
 /*
- * This file is part of TelepathyQt4
+ * Accounts model item, represents an account in the contactlist tree
+ * This file is based on TelepathyQt4Yell Models
  *
  * Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/>
+ * Copyright (C) 2011 Martin Klapetek <martin dot klapetek at gmail dot com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -25,9 +27,6 @@
 #include "accounts-model.h"
 #include "contact-model-item.h"
 
-namespace Tpy
-{
-
 struct AccountsModelItem::Private
 {
     Private(const Tp::AccountPtr &account)
@@ -364,6 +363,4 @@ void AccountsModelItem::addKnownContacts()
     if (newNodes.count() > 0) {
         emit childrenAdded(this, newNodes);
     }
-}
-
-}
+}
\ No newline at end of file
diff --git a/accounts-model-item.h b/accounts-model-item.h
index 901317a..edcc30e 100644
--- a/accounts-model-item.h
+++ b/accounts-model-item.h
@@ -1,8 +1,10 @@
 /*
- * This file is part of TelepathyQt4
+ * Accounts model item, represents an account in the contactlist tree
+ * This file is based on TelepathyQt4Yell Models
  *
  * Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/>
- *
+ * Copyright (C) 2011 Martin Klapetek <martin dot klapetek at gmail dot com>
+ * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
@@ -18,8 +20,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _TelepathyQt4Yell_Models_accounts_model_item_h_HEADER_GUARD_
-#define _TelepathyQt4Yell_Models_accounts_model_item_h_HEADER_GUARD_
+#ifndef TELEPATHY_ACCOUNTS_MODEL_ITEM_H
+#define TELEPATHY_ACCOUNTS_MODEL_ITEM_H
 
 #include <TelepathyQt4/Constants>
 #include <TelepathyQt4/Contact>
@@ -27,9 +29,6 @@
 
 #include "tree-node.h"
 
-namespace Tpy
-{
-
 class AccountsModelItem : public TreeNode
 {
     Q_OBJECT
@@ -73,6 +72,4 @@ private:
     Private *mPriv;
 };
 
-}
-
-#endif // _TelepathyQt4Yell_Models_accounts_model_item_h_HEADER_GUARD_
+#endif // TELEPATHY_ACCOUNTS_MODEL_ITEM_H
\ No newline at end of file
diff --git a/accounts-model.cpp b/accounts-model.cpp
index 800646a..1747d7e 100644
--- a/accounts-model.cpp
+++ b/accounts-model.cpp
@@ -1,7 +1,9 @@
 /*
- * This file is part of TelepathyQt4
+ * Accounts and contacts model
+ * This file is based on TelepathyQt4Yell Models
  *
  * Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/>
+ * Copyright (C) 2011 Martin Klapetek <martin dot klapetek at gmail dot com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -25,9 +27,6 @@
 #include "accounts-model-item.h"
 #include "contact-model-item.h"
 
-namespace Tpy
-{
-
 struct AccountsModel::Private
 {
     Private(const Tp::AccountManagerPtr &am)
@@ -304,6 +303,4 @@ QModelIndex AccountsModel::parent(const QModelIndex &index) const
         // no parent: return root node
         return QModelIndex();
     }
-}
-
-}
+}
\ No newline at end of file
diff --git a/accounts-model.h b/accounts-model.h
index ac985ba..99d23cd 100644
--- a/accounts-model.h
+++ b/accounts-model.h
@@ -1,7 +1,9 @@
 /*
- * This file is part of TelepathyQt4
+ * Accounts and contacts model
+ * This file is based on TelepathyQt4Yell Models
  *
  * Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/>
+ * Copyright (C) 2011 Martin Klapetek <martin dot klapetek at gmail dot com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -18,8 +20,8 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _TelepathyQt4Yell_Models_accounts_model_h_HEADER_GUARD_
-#define _TelepathyQt4Yell_Models_accounts_model_h_HEADER_GUARD_
+#ifndef TELEPATHY_ACCOUNTS_MODEL_H
+#define TELEPATHY_ACCOUNTS_MODEL_H
 
 #include <QAbstractListModel>
 
@@ -30,9 +32,6 @@
 
 #include "accounts-model-item.h"
 
-namespace Tpy
-{
-
 class AccountsModel : public QAbstractItemModel
 {
     Q_OBJECT
@@ -125,6 +124,4 @@ private:
     Private *mPriv;
 };
 
-}
-
-#endif // _TelepathyQt4Yell_Models_accounts_model_h_HEADER_GUARD_
+#endif // TELEPATHY_ACCOUNTS_MODEL_H
\ No newline at end of file
diff --git a/contact-model-item.cpp b/contact-model-item.cpp
index 34f596b..8136f3f 100644
--- a/contact-model-item.cpp
+++ b/contact-model-item.cpp
@@ -1,8 +1,10 @@
 /*
- * This file is part of TelepathyQt4
+ * Contacts model item, represents a contact in the contactlist tree
+ * This file is based on TelepathyQt4Yell Models
  *
  * Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/>
- *
+ * Copyright (C) 2011 Martin Klapetek <martin dot klapetek at gmail dot com>
+ * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
@@ -28,9 +30,6 @@
 #include "accounts-model.h"
 #include "contact-model-item.h"
 
-namespace Tpy
-{
-
 struct ContactModelItem::Private
 {
     Private(const Tp::ContactPtr &contact)
@@ -175,6 +174,4 @@ void ContactModelItem::onChanged()
 Tp::ContactPtr ContactModelItem::contact() const
 {
     return mPriv->mContact;
-}
-
-}
+}
\ No newline at end of file
diff --git a/contact-model-item.h b/contact-model-item.h
index 1a5302e..2bf3f51 100644
--- a/contact-model-item.h
+++ b/contact-model-item.h
@@ -1,7 +1,9 @@
 /*
- * This file is part of TelepathyQt4
+ * Contacts model item, represents a contact in the contactlist tree
+ * This file is based on TelepathyQt4Yell Models
  *
  * Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/>
+ * Copyright (C) 2011 Martin Klapetek <martin dot klapetek at gmail dot com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -18,16 +20,13 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _TelepathyQt4Yell_Models_contact_model_item_h_HEADER_GUARD_
-#define _TelepathyQt4Yell_Models_contact_model_item_h_HEADER_GUARD_
+#ifndef TELEPATHY_CONTACT_MODEL_ITEM_H
+#define TELEPATHY_CONTACT_MODEL_ITEM_H
 
 #include <TelepathyQt4/Types>
 
 #include "tree-node.h"
 
-namespace Tpy
-{
-
 class ContactModelItem : public TreeNode
 {
     Q_OBJECT
@@ -51,6 +50,4 @@ private:
     Private *mPriv;
 };
 
-}
-
-#endif // _TelepathyQt4Yell_Models_contact_model_item_h_HEADER_GUARD_
+#endif // TELEPATHY_CONTACT_MODEL_ITEM_H
\ No newline at end of file
diff --git a/contactdelegateoverlay.cpp b/contactdelegateoverlay.cpp
index 5a2b007..63efa3b 100644
--- a/contactdelegateoverlay.cpp
+++ b/contactdelegateoverlay.cpp
@@ -1,7 +1,8 @@
 /*
 *  Qt item view for images - delegate additions
-*  Copyright (C) 2009  Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
-*  Copyright (C) 2011  Martin Klapetek <martin dot klapetek at gmail dot com>
+* 
+*  Copyright (C) 2009 Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+*  Copyright (C) 2011 Martin Klapetek <martin dot klapetek at gmail dot com>
 * 
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
@@ -197,6 +198,7 @@ void AbstractWidgetDelegateOverlay::slotEntered(const QModelIndex& index)
 
 void AbstractWidgetDelegateOverlay::slotWidgetAboutToShow(const QModelIndex& index)
 {
+    Q_UNUSED(index);
     m_widget->show();
     
 }
diff --git a/contactdelegateoverlay.h b/contactdelegateoverlay.h
index 6af1917..4d73579 100644
--- a/contactdelegateoverlay.h
+++ b/contactdelegateoverlay.h
@@ -1,7 +1,8 @@
 /*
  *  Qt item view for images - delegate additions
- *  Copyright (C) 2009  Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
- *  Copyright (C) 2011  Martin Klapetek <martin dot klapetek at gmail dot com>
+ * 
+ *  Copyright (C) 2009 Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+ *  Copyright (C) 2011 Martin Klapetek <martin dot klapetek at gmail dot com>
  * 
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/contactoverlays.cpp b/contactoverlays.cpp
index 9e8a1c5..d5b2c1d 100644
--- a/contactoverlays.cpp
+++ b/contactoverlays.cpp
@@ -1,7 +1,8 @@
 /*
  *  Contact overlay buttons
- *  Copyright (C) 2009  Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
- *  Copyright (C) 2011  Martin Klapetek <martin dot klapetek at gmail dot com>
+ * 
+ *  Copyright (C) 2009 Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+ *  Copyright (C) 2011 Martin Klapetek <martin dot klapetek at gmail dot com>
  * 
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -122,7 +123,7 @@ void TextChannelContactOverlay::slotClicked(bool checked)
 
 bool TextChannelContactOverlay::checkIndex(const QModelIndex& index) const
 {
-    if(index.data(Tpy::AccountsModel::TextChatCapabilityRole).toBool()) {
+    if(index.data(AccountsModel::TextChatCapabilityRole).toBool()) {
         return true;
     }
     
@@ -228,7 +229,7 @@ void AudioChannelContactOverlay::slotClicked(bool checked)
 
 bool AudioChannelContactOverlay::checkIndex(const QModelIndex& index) const
 {
-    if(index.data(Tpy::AccountsModel::AudioCallCapabilityRole).toBool()) {
+    if(index.data(AccountsModel::AudioCallCapabilityRole).toBool()) {
         return true;
     }
     
@@ -333,7 +334,7 @@ void VideoChannelContactOverlay::slotClicked(bool checked)
 
 bool VideoChannelContactOverlay::checkIndex(const QModelIndex& index) const
 {
-    if(index.data(Tpy::AccountsModel::VideoCallCapabilityRole).toBool()) {
+    if(index.data(AccountsModel::VideoCallCapabilityRole).toBool()) {
         return true;
     }
     
@@ -438,7 +439,7 @@ void FileTransferContactOverlay::slotClicked(bool checked)
 
 bool FileTransferContactOverlay::checkIndex(const QModelIndex& index) const
 {
-    if(index.data(Tpy::AccountsModel::FileTransferCapabilityRole).toBool()) {
+    if(index.data(AccountsModel::FileTransferCapabilityRole).toBool()) {
         return true;
     }
     
diff --git a/contactoverlays.h b/contactoverlays.h
index 7197bfd..67a2d78 100644
--- a/contactoverlays.h
+++ b/contactoverlays.h
@@ -1,7 +1,8 @@
 /*
  *  Contact overlay buttons
- *  Copyright (C) 2009  Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
- *  Copyright (C) 2011  Martin Klapetek <martin dot klapetek at gmail dot com>
+ * 
+ *  Copyright (C) 2009 Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+ *  Copyright (C) 2011 Martin Klapetek <martin dot klapetek at gmail dot com>
  * 
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
diff --git a/contactviewhoverbutton.cpp b/contactviewhoverbutton.cpp
index 519b321..0a2fc30 100644
--- a/contactviewhoverbutton.cpp
+++ b/contactviewhoverbutton.cpp
@@ -1,26 +1,25 @@
-/* ============================================================
- *
- * This file is a part of digiKam project
- * http://www.digikam.org
- *
- * Date        : 2009-04-30
- * Description : Qt item view mouse hover button
- *
- * Copyright (C) 2008 by Peter Penz <peter.penz at gmx.at>
- * Copyright (C) 2009 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
- *
- * This program is free software; you can redistribute it
- * and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * ============================================================ */
+/*
+ *  Qt item view mouse hover button
+ * 
+ *  Copyright (C) 2008 Peter Penz <peter dot penz at gmx dot at>
+ *  Copyright (C) 2009 Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+ *  Copyright (C) 2011 Martin Klapetek <martin dot klapetek at gmail dot com>
+ * 
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ * 
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ * 
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
 #include "contactviewhoverbutton.moc"
 
 // Qt includes
diff --git a/contactviewhoverbutton.h b/contactviewhoverbutton.h
index 7dcd178..8c71cf1 100644
--- a/contactviewhoverbutton.h
+++ b/contactviewhoverbutton.h
@@ -1,5 +1,6 @@
 /*
  *  Qt item view mouse hover button
+ * 
  *  Copyright (C) 2009  Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
  *  Copyright (C) 2011  Martin Klapetek <martin dot klapetek at gmail dot com>
  * 
diff --git a/main-widget.cpp b/main-widget.cpp
index 92575df..da6f255 100644
--- a/main-widget.cpp
+++ b/main-widget.cpp
@@ -87,9 +87,9 @@ void ContactDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opt
     QStyle *style = QApplication::style();
     style->drawPrimitive(QStyle::PE_PanelItemViewItem, &option, painter);
     
-//     kDebug() << index.data(Tpy::AccountsModel::PresenceTypeRole);
+//     kDebug() << index.data(AccountsModel::PresenceTypeRole);
     
-    bool isContact = !index.data(Tpy::AccountsModel::AliasRole).toString().isEmpty();
+    bool isContact = !index.data(AccountsModel::AliasRole).toString().isEmpty();
 
     if(isContact)
     {
@@ -98,7 +98,7 @@ void ContactDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opt
         iconRect.setSize(QSize(32, 32));
         iconRect.moveTo(QPoint(iconRect.x() + SPACING, iconRect.y() + SPACING));
 
-        QPixmap avatar = QPixmap::fromImage(QImage(index.data(Tpy::AccountsModel::AvatarRole).toString()));
+        QPixmap avatar = QPixmap::fromImage(QImage(index.data(AccountsModel::AvatarRole).toString()));
         
         if(avatar.isNull()) {
             avatar = SmallIcon("im-user", KIconLoader::SizeMedium);
@@ -108,7 +108,7 @@ void ContactDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opt
         
         QPixmap icon;
         
-        switch(index.data(Tpy::AccountsModel::PresenceTypeRole).toInt())
+        switch(index.data(AccountsModel::PresenceTypeRole).toInt())
         {
             case Tp::ConnectionPresenceTypeAvailable:
                 icon = SmallIcon("user-online", KIconLoader::SizeSmallMedium);
@@ -162,12 +162,12 @@ void ContactDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opt
         }
         
         painter->setFont(statusFont);        
-        painter->drawText(statusMsgRect, index.data(Tpy::AccountsModel::PresenceMessageRole).toString());
+        painter->drawText(statusMsgRect, index.data(AccountsModel::PresenceMessageRole).toString());
         
     }
     else
     {
-        painter->drawText(optV4.rect, index.data(Tpy::AccountsModel::DisplayNameRole).toString());
+        painter->drawText(optV4.rect, index.data(AccountsModel::DisplayNameRole).toString());
         /*QRect groupRect = optV4.rect;
         
         QRect accountGroupRect = groupRect;
@@ -214,10 +214,11 @@ void ContactDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opt
 
 QSize ContactDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
 {   
+    Q_UNUSED(option);
 //     if(option.state & QStyle::State_Selected)
 //         kDebug() << index.data(ModelRoles::UserNameRole).toString();
     
-    if(!index.data(Tpy::AccountsModel::AliasRole).toString().isEmpty()) {
+    if(!index.data(AccountsModel::AliasRole).toString().isEmpty()) {
         return QSize(0, 32 + 4 * SPACING);
     }
     else return QSize(0,20);   
@@ -381,7 +382,7 @@ void MainWidget::onAccountManagerReady(Tp::PendingOperation* op)
 
             m_accountButtonsLayout->addWidget(bt);
             
-            m_model = new Tpy::AccountsModel(m_accountManager, this);
+            m_model = new AccountsModel(m_accountManager, this);
             m_contactsListView->setModel(m_model);            
         }
     }
@@ -443,6 +444,7 @@ void MainWidget::onAccountConnectionStatusChanged(Tp::ConnectionStatus status)
 
 void MainWidget::onConnectionChanged(const Tp::ConnectionPtr& connection)
 {
+    Q_UNUSED(connection);
     m_contactsListView->expandAll();
     //Tp::AccountPtr account(qobject_cast<Tp::Account*>(sender()));
     kDebug();
@@ -454,7 +456,7 @@ void MainWidget::onContactListDoubleClick(const QModelIndex& index)
         return;
     }
     
-    if(index.data(Tpy::AccountsModel::AliasRole).toString().isEmpty()) {
+    if(index.data(AccountsModel::AliasRole).toString().isEmpty()) {
         if(m_contactsListView->isExpanded(index))
             m_contactsListView->collapse(index);
         else m_contactsListView->expand(index);
diff --git a/main-widget.h b/main-widget.h
index 5e8cec0..5ff8649 100644
--- a/main-widget.h
+++ b/main-widget.h
@@ -33,10 +33,7 @@
 
 class KMenu;
 class KSelectAction;
-
-namespace Tpy {
-    class AccountsModel;
-}
+class AccountsModel;
 
 class ContactDelegate : public QStyledItemDelegate, public ContactDelegateOverlayContainer
 {
@@ -126,7 +123,7 @@ public Q_SLOTS:
     void onGroupContacts(bool);
     
 private:
-    Tpy::AccountsModel*     m_model;
+    AccountsModel*          m_model;
     Tp::AccountManagerPtr   m_accountManager;
     KMenu*                  m_accountMenu;
     KSelectAction*          m_setStatusAction;
diff --git a/tree-node.cpp b/tree-node.cpp
index 9e9f1ee..8d7a912 100644
--- a/tree-node.cpp
+++ b/tree-node.cpp
@@ -1,7 +1,9 @@
 /*
- * This file is part of TelepathyQt4
+ * Tree model node
+ * This file is based on TelepathyQt4Yell Models
  *
  * Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/>
+ * Copyright (C) 2011 Martin Klapetek <martin dot klapetek at gmail dot com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -20,9 +22,6 @@
 
 #include "tree-node.h"
 
-namespace Tpy
-{
-
 struct TreeNode::Private
 {
     Private() :
@@ -120,6 +119,4 @@ void TreeNode::remove()
                    SIGNAL(childrenRemoved(TreeNode*,int,int)));
     }
     deleteLater();
-}
-
-}
+}
\ No newline at end of file
diff --git a/tree-node.h b/tree-node.h
index 5206971..64bcc27 100644
--- a/tree-node.h
+++ b/tree-node.h
@@ -1,8 +1,10 @@
-/*
- * This file is part of TelepathyQt4
+/*                                                                         *
+ * Tree model node
+ * This file is based on TelepathyQt4Yell Models
  *
  * Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/>
- *
+ * Copyright (C) 2011 Martin Klapetek <martin dot klapetek at gmail dot com>
+ * 
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
@@ -18,15 +20,12 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _TelepathyQt4Yell_Models_tree_node_h_HEADER_GUARD_
-#define _TelepathyQt4Yell_Models_tree_node_h_HEADER_GUARD_
+#ifndef TELEPATHY_TREE_NODE_H
+#define TELEPATHY_TREE_NODE_H
 
 #include <QObject>
 #include <QVariant>
 
-namespace Tpy
-{
-
 class TreeNode : public QObject
 {
     Q_OBJECT
@@ -62,6 +61,4 @@ private:
     Private *mPriv;
 };
 
-}
-
-#endif // _TelepathyQt4Yell_Models_tree_node_h_HEADER_GUARD_
+#endif // TELEPATHY_TREE_NODE_H

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list