Hello community, here is the log from the commit of package kgpg for openSUSE:Factory checked in at 2012-03-13 09:33:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kgpg (Old) and /work/SRC/openSUSE:Factory/.kgpg.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kgpg", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/kgpg/kgpg.changes 2012-02-03 10:23:34.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.kgpg.new/kgpg.changes 2012-03-13 09:33:57.000000000 +0100 @@ -1,0 +2,6 @@ +Fri Mar 2 23:17:55 CET 2012 - [email protected] + +- update to 4.8.1 + * see http://kde.org/announcements/changelogs/changelog4_8_0to4_8_1.php for details + +------------------------------------------------------------------- Old: ---- kgpg-4.8.0.tar.bz2 New: ---- kgpg-4.8.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kgpg.spec ++++++ --- /var/tmp/diff_new_pack.7Nl9I3/_old 2012-03-13 09:33:59.000000000 +0100 +++ /var/tmp/diff_new_pack.7Nl9I3/_new 2012-03-13 09:33:59.000000000 +0100 @@ -15,13 +15,14 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: kgpg -Version: 4.8.0 +Version: 4.8.1 Release: 0 -License: GPL-2.0+ Summary: Encryption Tool -Url: http://www.kde.org +License: GPL-2.0+ Group: Productivity/Security +Url: http://www.kde.org Source0: kgpg-%{version}.tar.bz2 Patch0: 4_7_BRANCH.diff Patch1: kgpg-autostart.diff ++++++ kgpg-4.8.0.tar.bz2 -> kgpg-4.8.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kgpg-4.8.0/core/KGpgRootNode.cpp new/kgpg-4.8.1/core/KGpgRootNode.cpp --- old/kgpg-4.8.0/core/KGpgRootNode.cpp 2011-08-22 15:26:11.000000000 +0200 +++ new/kgpg-4.8.1/core/KGpgRootNode.cpp 2012-02-29 23:57:42.000000000 +0100 @@ -1,4 +1,4 @@ -/* Copyright 2008,2009 Rolf Eike Beer <[email protected]> +/* Copyright 2008,2009,2010,2012 Rolf Eike Beer <[email protected]> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -29,7 +29,6 @@ m_deleting(false) { m_model = model; - addGroups(); } KGpgRootNode::~KGpgRootNode() @@ -49,12 +48,10 @@ } void -KGpgRootNode::addGroups() +KGpgRootNode::addGroups(const QStringList &groups) { - const QStringList groups = KgpgInterface::getGpgGroupNames(KGpgSettings::gpgConfigPath()); - - for (QStringList::const_iterator it = groups.begin(); it != groups.end(); ++it) - new KGpgGroupNode(this, QString(*it)); + foreach (const QString &groupName, groups) + new KGpgGroupNode(this, groupName); } void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kgpg-4.8.0/core/KGpgRootNode.h new/kgpg-4.8.1/core/KGpgRootNode.h --- old/kgpg-4.8.0/core/KGpgRootNode.h 2011-08-22 15:26:11.000000000 +0200 +++ new/kgpg-4.8.1/core/KGpgRootNode.h 2012-02-29 23:57:42.000000000 +0100 @@ -55,9 +55,10 @@ virtual KgpgCore::KgpgItemType getType() const; /** - * Read the group definitions from GnuPG config file + * Create new group nodes + * @param groups list of group names to create */ - void addGroups(); + void addGroups(const QStringList &groups); void addKeys(const QStringList &ids = QStringList()); void refreshKeys(KGpgKeyNode::List nodes); /** Files old/kgpg-4.8.0/doc/index.cache.bz2 and new/kgpg-4.8.1/doc/index.cache.bz2 differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kgpg-4.8.0/groupedit.cpp new/kgpg-4.8.1/groupedit.cpp --- old/kgpg-4.8.0/groupedit.cpp 2011-08-22 15:26:11.000000000 +0200 +++ new/kgpg-4.8.1/groupedit.cpp 2012-02-29 23:57:42.000000000 +0100 @@ -90,7 +90,7 @@ for (int i = 0; i < sel.count(); i++) { if (sel.at(i).column() != 0) continue; - KGpgNode *nd = m_out->nodeForIndex(sel.at(i)); + KGpgNode *nd = m_out->nodeForIndex(m_outFilter->mapToSource(sel.at(i))); members->append(nd); } m_in->invalidate(); @@ -119,7 +119,7 @@ void groupEdit::groupAdd(const QModelIndex &index) { - KGpgNode *nd = m_out->nodeForIndex(index); + KGpgNode *nd = m_out->nodeForIndex(m_outFilter->mapToSource(index)); members->append(nd); m_in->invalidate(); m_out->invalidate(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kgpg-4.8.0/keyservers.cpp new/kgpg-4.8.1/keyservers.cpp --- old/kgpg-4.8.0/keyservers.cpp 2011-08-22 15:26:11.000000000 +0200 +++ new/kgpg-4.8.1/keyservers.cpp 2012-02-29 23:57:42.000000000 +0100 @@ -1,10 +1,7 @@ -/*************************************************************************** - keyservers.cpp - description - ------------------- - begin : Tue Nov 26 2002 - copyright : (C) 2002 by Jean-Baptiste Mardelle - email : [email protected] - ***************************************************************************/ +/* + * Copyright (C) 2002 Jean-Baptiste Mardelle <[email protected]> + * Copyright (C) 2006,2007,2008,2009,2010,2012 Rolf Eike Beer <[email protected]> + */ /*************************************************************************** * * @@ -39,8 +36,6 @@ #include "kgpgsendkeys.h" #include "kgpgimport.h" -using namespace KgpgCore; - KeyServer::KeyServer(QWidget *parent, KGpgItemModel *model, const bool autoclose) : KDialog(parent), m_searchproc(NULL), @@ -326,9 +321,9 @@ KMessageBox::sorry(this, i18n("You must choose a key.")); return; } - page->kLEimportid->setText(m_listpop->kLEID->text()); + const QStringList keys = m_listpop->kLEID->text().simplified().split(QLatin1Char(' ')); m_dialogserver->close(); - slotImport(); + startImport(keys, page->kCBimportks->currentText(), page->kLEproxyI->text()); } void KeyServer::slotPreExport() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kgpg-4.8.0/kgpg.desktop new/kgpg-4.8.1/kgpg.desktop --- old/kgpg-4.8.0/kgpg.desktop 2012-01-10 15:18:52.000000000 +0100 +++ new/kgpg-4.8.1/kgpg.desktop 2012-02-29 23:57:42.000000000 +0100 @@ -131,6 +131,7 @@ Comment[tg]=Пешохири GnuPG Comment[th]=ฟร้อนเอนด์ของ GnuPG Comment[tr]=Bir GnuPG arayüzü +Comment[ug]=GnuPG ئالدى ئۇچ پروگراممىسى Comment[uk]=Інтерфейс до GnuPG Comment[uz]=GnuPG uchun grafik interfeys Comment[uz@cyrillic]=GnuPG учун график интерфейс diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kgpg-4.8.0/kgpgfirstassistant.cpp new/kgpg-4.8.1/kgpgfirstassistant.cpp --- old/kgpg-4.8.0/kgpgfirstassistant.cpp 2011-08-22 15:26:11.000000000 +0200 +++ new/kgpg-4.8.1/kgpgfirstassistant.cpp 2012-02-29 23:57:42.000000000 +0100 @@ -1,4 +1,4 @@ -/* Copyright 2008 Rolf Eike Beer <[email protected]> +/* Copyright 2008,2010,2012 Rolf Eike Beer <[email protected]> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -169,7 +169,7 @@ gridLayout->setMargin(11); gridLayout->setContentsMargins(0, 0, 0, 0); - QHBoxLayout *hboxLayout = new QHBoxLayout(page); + QHBoxLayout *hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(6); label = new QLabel(page); label->setText(i18n("Your default key:")); @@ -193,7 +193,7 @@ page_defaultkey = addPage(page, i18n("Default Key")); - page = new QWidget(); + page = new QWidget(this); gridLayout = new QGridLayout(page); gridLayout->setSpacing(6); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kgpg-4.8.0/kgpginterface.cpp new/kgpg-4.8.1/kgpginterface.cpp --- old/kgpg-4.8.0/kgpginterface.cpp 2011-11-04 15:36:50.000000000 +0100 +++ new/kgpg-4.8.1/kgpginterface.cpp 2012-02-29 23:57:42.000000000 +0100 @@ -1,6 +1,7 @@ /* * Copyright (C) 2002 Jean-Baptiste Mardelle <[email protected]> - * Copyright (C) 2007,2008,2009,2010 Rolf Eike Beer <[email protected]> + * Copyright (C) 2007,2008,2009,2010,2011,2012 + * Rolf Eike Beer <[email protected]> */ /*************************************************************************** * * @@ -164,7 +165,7 @@ QStringList groups; QFile qfile(configfile); - if (qfile.open(QIODevice::ReadOnly) && (qfile.exists())) { + if (qfile.exists() && qfile.open(QIODevice::ReadOnly)) { QTextStream t(&qfile); while (!t.atEnd()) { QString result(t.readLine().simplified()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kgpg-4.8.0/main.cpp new/kgpg-4.8.1/main.cpp --- old/kgpg-4.8.0/main.cpp 2012-01-18 19:50:04.000000000 +0100 +++ new/kgpg-4.8.1/main.cpp 2012-02-29 23:57:42.000000000 +0100 @@ -1,10 +1,8 @@ -/*************************************************************************** - main.cpp - description - ------------------- - begin : Mon Jul 8 2002 - copyright : (C) 2002 by Jean-Baptiste Mardelle - email : [email protected] - ***************************************************************************/ +/* + * Copyright (C) 2002 Jean-Baptiste Mardelle <[email protected]> + * Copyright (C) 2007,2008,2009,2010,2011,2012 + * Rolf Eike Beer <[email protected]> + */ /*************************************************************************** * * @@ -27,7 +25,7 @@ static const char description[] = I18N_NOOP("KGpg - simple gui for gpg\n\nKGpg was designed to make gpg very easy to use.\nI tried to make it as secure as possible.\nHope you enjoy it."); -static const char version[] = "2.7.0"; +static const char version[] = "2.7.1"; int main(int argc, char *argv[]) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kgpg-4.8.0/model/kgpgitemmodel.cpp new/kgpg-4.8.1/model/kgpgitemmodel.cpp --- old/kgpg-4.8.0/model/kgpgitemmodel.cpp 2011-12-20 20:15:15.000000000 +0100 +++ new/kgpg-4.8.1/model/kgpgitemmodel.cpp 2012-02-29 23:57:42.000000000 +0100 @@ -1,4 +1,4 @@ -/* Copyright 2008 Rolf Eike Beer <[email protected]> +/* Copyright 2008,2009,2010,2011,2012 Rolf Eike Beer <[email protected]> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -22,12 +22,14 @@ #include "convert.h" #include <KGlobal> #include <KLocale> +#include <QMetaObject> KGpgItemModel::KGpgItemModel(QObject *parent) : QAbstractItemModel(parent), m_root(new KGpgRootNode(this)), m_default(KGpgSettings::defaultKey()) { + QMetaObject::invokeMethod(this, "refreshGroups", Qt::QueuedConnection); } KGpgItemModel::~KGpgItemModel() @@ -221,11 +223,13 @@ KGpgItemModel::addGroup(const QString &name, const KGpgKeyNode::List &keys) { KGpgGroupNode *nd; + const int cIndex = m_root->getChildCount(); // row of the new node - emit layoutAboutToBeChanged(); + beginInsertRows(QModelIndex(), cIndex, cIndex); nd = new KGpgGroupNode(m_root, name, keys); - fixPersistentIndexes(); - emit layoutChanged(); + endInsertRows(); + + Q_ASSERT(m_root->getChildIndex(nd) == cIndex); return nd; } @@ -233,16 +237,15 @@ void KGpgItemModel::delNode(KGpgNode *node) { - emit layoutAboutToBeChanged(); + beginResetModel(); delete node; - fixPersistentIndexes(); - emit layoutChanged(); + endResetModel(); } void KGpgItemModel::changeGroup(KGpgGroupNode *node, const QList<KGpgNode *> &keys) { - emit layoutAboutToBeChanged(); + const QModelIndex gIndex = nodeIndex(node); for (int i = node->getChildCount() - 1; i >= 0; i--) { bool found = false; @@ -253,22 +256,29 @@ } if (found) continue; + + beginRemoveRows(gIndex, i, i); delete node->getChild(i); + endRemoveRows(); } + int cnt = node->getChildCount(); + for (int i = 0; i < keys.count(); i++) { bool found = false; - for (int j = 0; j < node->getChildCount(); j++) { + for (int j = 0; j < cnt; j++) { found = (node->getChild(j)->getId() == keys.at(i)->getId()); if (found) break; } if (found) continue; + + beginInsertRows(gIndex, cnt, cnt); new KGpgGroupMemberNode(node, keys.at(i)->toKeyNode()); + endInsertRows(); + cnt++; } - fixPersistentIndexes(); - emit layoutChanged(); } void @@ -276,10 +286,12 @@ { Q_ASSERT(group == member->getParentKeyNode()); - emit layoutAboutToBeChanged(); + const int childRow = group->getChildIndex(member); + const QModelIndex pIndex = nodeIndex(group); + + beginRemoveRows(pIndex, childRow, childRow); delete member; - fixPersistentIndexes(); - emit layoutChanged(); + endRemoveRows(); } QVariant @@ -365,7 +377,7 @@ void KGpgItemModel::refreshKeyIds(const QStringList &ids) { - emit layoutAboutToBeChanged(); + beginResetModel(); if (ids.isEmpty()) { for (int i = m_root->getChildCount() - 1; i >= 0; i--) { KGpgNode *nd = m_root->getChild(i); @@ -384,8 +396,7 @@ } m_root->addKeys(ids); - fixPersistentIndexes(); - emit layoutChanged(); + endResetModel(); } void @@ -393,25 +404,33 @@ { QStringList ids; - emit layoutAboutToBeChanged(); + beginResetModel(); m_root->refreshKeys(nodes); - fixPersistentIndexes(); - emit layoutChanged(); + endResetModel(); } void KGpgItemModel::refreshGroups() { - emit layoutAboutToBeChanged(); for (int i = m_root->getChildCount() - 1; i >= 0; i--) { KGpgNode *nd = m_root->getChild(i); - if (nd->getType() == ITYPE_GROUP) - delete nd; + if (nd->getType() != ITYPE_GROUP) + continue; + + beginRemoveRows(QModelIndex(), i, i); + delete nd; + endRemoveRows(); } - m_root->addGroups(); - fixPersistentIndexes(); - emit layoutChanged(); + const QStringList groups = KgpgInterface::getGpgGroupNames(KGpgSettings::gpgConfigPath()); + + if (groups.isEmpty()) + return; + + const int oldCount = m_root->getChildCount(); + beginInsertRows(QModelIndex(), oldCount, oldCount + groups.count()); + m_root->addGroups(groups); + endInsertRows(); } bool @@ -421,25 +440,6 @@ } void -KGpgItemModel::fixPersistentIndexes() -{ - foreach (const QModelIndex &idx, persistentIndexList()) { - if (!idx.isValid()) - continue; - - KGpgNode *nd = nodeForIndex(idx); - int j = rowForNode(nd); - if (j == idx.row()) - continue; - - if (j >= 0) - changePersistentIndex(idx, createIndex(j, idx.column(), nd)); - else - changePersistentIndex(idx, QModelIndex()); - } -} - -void KGpgItemModel::invalidateIndexes(KGpgNode *nd) { foreach (const QModelIndex &idx, persistentIndexList()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kgpg-4.8.0/model/kgpgitemmodel.h new/kgpg-4.8.1/model/kgpgitemmodel.h --- old/kgpg-4.8.0/model/kgpgitemmodel.h 2011-08-22 15:26:11.000000000 +0200 +++ new/kgpg-4.8.1/model/kgpgitemmodel.h 2012-02-29 23:57:42.000000000 +0100 @@ -1,4 +1,4 @@ -/* Copyright 2008 Rolf Eike Beer <[email protected]> +/* Copyright 2008,2009,2010,2011,2012 Rolf Eike Beer <[email protected]> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -93,7 +93,6 @@ void refreshKeyIds(const QStringList &id); void refreshKeyIds(KGpgKeyNode::List &nodes); bool isDefaultKey(const KGpgNode *node) const; - void fixPersistentIndexes(); void updateNodeTrustColor(KGpgExpandableNode *node, const KgpgCore::KgpgKeyTrust trust, const QColor &color); }; -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
