[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:52 UTC 2016


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

The following commit has been merged in the master branch:
commit 7b9b8766655667260f997f47c51437b3af08734e
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date:   Thu Apr 7 23:57:37 2011 +0200

    Fix up a rather messed commits. Sorry for that.
    This closes two reviews, both reviewed by David Edmundson.
    REVIEW: 101048
    REVIEW: 101053
---
 main-widget.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/main-widget.cpp b/main-widget.cpp
index d4e3a95..7bde815 100644
--- a/main-widget.cpp
+++ b/main-widget.cpp
@@ -47,7 +47,6 @@
 #include <KSharedConfig>
 #include <KFileDialog>
 #include <KMessageBox>
-#include <KAction>
 
 #include "main-widget.h"
 #include "ui_main-widget.h"
@@ -227,7 +226,7 @@ void MainWidget::onAccountManagerReady(Tp::PendingOperation* op)
     m_accountButtonsLayout->insertStretch(-1);
 
     QList<Tp::AccountPtr> accounts = m_accountManager->allAccounts();
-    foreach (Tp::AccountPtr account, accounts) {
+    foreach (const Tp::AccountPtr account, accounts) {
         onNewAccountAdded(account);
     }
     m_contactsListView->expandAll();
@@ -753,7 +752,7 @@ void MainWidget::selectAvatarFromAccount(const QString &accountUID)
 
     Tp::Avatar avatar = qobject_cast<AccountsModelItem*>(m_model->accountItemForId(accountUID))->data(AccountsModel::AvatarRole).value<Tp::Avatar>();
 
-    foreach (Tp::AccountPtr account, m_accountManager->allAccounts()) {
+    foreach (const Tp::AccountPtr account, m_accountManager->allAccounts()) {
         //don't set the avatar for the account from where it was taken
         if (account->uniqueIdentifier() == accountUID) {
             continue;
@@ -796,7 +795,7 @@ void MainWidget::loadAvatarFromFile()
     }
 
     QFile imageBuffer(file.toLocalFile());
-    imageBuffer.open(QIODevice::ReadWrite);
+    imageBuffer.open(QIODevice::ReadOnly);
     if (!imageBuffer.isOpen() || !imageBuffer.isReadable()) {
         //FIXME: probably should also tell the user what to do, no? but what to do? :)
         KMessageBox::error(this, i18n("Sorry, the image couldn't be processed."));
@@ -808,7 +807,7 @@ void MainWidget::loadAvatarFromFile()
     avatar.avatarData = imageBuffer.readAll();
     avatar.MIMEType = mime->name();
 
-    foreach (Tp::AccountPtr account, m_accountManager->allAccounts()) {
+    foreach (const Tp::AccountPtr account, m_accountManager->allAccounts()) {
         Tp::PendingOperation *op = account->setAvatar(avatar);
 
         //connect for eventual error displaying

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list