[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeutils/kgpg
From: Jimmy Gilles <jimmygilles () gmail ! com>
Date: 2007-09-08 19:36:05
Message-ID: 1189280165.196014.5888.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 709979 by jimmygilles:
some little changes
M +0 -1 core/kgpgkey.h
M +6 -6 keyservers.cpp
M +1 -1 keyservers.h
M +35 -29 keysmanager.cpp
--- trunk/KDE/kdeutils/kgpg/core/kgpgkey.h #709978:709979
@@ -14,7 +14,6 @@
#include <QSharedData>
#include <QPointer>
#include <QObject>
-
#include <QList>
#include <QDate>
--- trunk/KDE/kdeutils/kgpg/keyservers.cpp #709978:709979
@@ -141,7 +141,7 @@
}
}
-void KeyServer::refreshKeys(QStringList *keys)
+void KeyServer::refreshKeys(QStringList keys)
{
QApplication::setOverrideCursor(QCursor(Qt::BusyCursor));
@@ -158,7 +158,7 @@
m_importpop = new ConnectionDialog(this);
connect(m_importpop, SIGNAL(cancelClicked()), interface, \
SLOT(downloadKeysAbort()));
- interface->downloadKeys(*keys, keyserv, true, proxy);
+ interface->downloadKeys(keys, keyserv, true, proxy);
}
void KeyServer::slotImport()
@@ -396,10 +396,10 @@
void KeyServer::slotSetExportAttribute(const QString *state)
{
- if (state != NULL)
- expattr = QString(*state);
- else
- expattr = QString();
+ if (state != 0)
+ expattr = QString(*state);
+ else
+ expattr = QString();
}
void KeyServer::slotEnableProxyI(const bool &on)
--- trunk/KDE/kdeutils/kgpg/keyservers.h #709978:709979
@@ -63,7 +63,7 @@
public:
explicit KeyServer(QWidget *parent = 0, const bool &modal = false, const bool \
&autoclose = false);
- void refreshKeys(QStringList *keys);
+ void refreshKeys(QStringList keys);
signals:
void importFinished(QStringList);
--- trunk/KDE/kdeutils/kgpg/keysmanager.cpp #709978:709979
@@ -716,44 +716,50 @@
if (keysList2->currentItem() == NULL)
return;
- QStringList *keyIDS = new QStringList();
+ QStringList keyIDS;
keysList = keysList2->selectedItems();
- for (int i = 0; i < keysList.count(); ++i) {
- KeyListViewItem *item = keysList.at(i);
+ for (int i = 0; i < keysList.count(); ++i)
+ {
+ KeyListViewItem *item = keysList.at(i);
if (item)
{
- if (item->itemType() == KeyListViewItem::Group) {
- KeyListViewItem *cur = item->firstChild();
+ if (item->itemType() == KeyListViewItem::Group)
+ {
+ KeyListViewItem *cur = item->firstChild();
- if (!cur) {
- item->setOpen(true);
- item->setOpen(false);
- cur = item->firstChild();
- }
- while (cur) {
- *keyIDS << cur->keyId();
- cur = cur->nextSibling();
- }
- continue;
- }
- if (item->itemType() & KeyListViewItem::Group)
- continue;
+ if (!cur)
+ {
+ item->setOpen(true);
+ item->setOpen(false);
+ cur = item->firstChild();
+ }
- KgpgKey *key = item->getKey();
+ while (cur)
+ {
+ keyIDS << cur->keyId();
+ cur = cur->nextSibling();
+ }
- if ((item->depth() != 0) || !key) {
- KMessageBox::sorry(this, i18n("You can only refresh primary keys. Please check \
your selection."));
- delete keyIDS;
- return;
- } else {
- *keyIDS << key->fullId();
- }
+ continue;
+ }
+
+ if (item->itemType() & KeyListViewItem::Group)
+ continue;
+
+ KgpgKey *key = item->getKey();
+ if (key && item->depth() == 0)
+ keyIDS << key->fullId();
+ else
+ {
+ KMessageBox::sorry(this, i18n("You can only refresh primary keys. \
Please check your selection.")); + return;
+ }
}
}
- kServer = new KeyServer(0, false);
+ kServer = new KeyServer(this, false);
connect(kServer, SIGNAL(importFinished(QStringList)), this, \
SLOT(refreshFinished(QStringList))); kServer->refreshKeys(keyIDS);
}
@@ -1542,7 +1548,7 @@
QStringList klist;
for (int i = 0; i < exportList.count(); ++i) {
KeyListViewItem *item = static_cast<KeyListViewItem *>(exportList.at(i));
-
+
if (item)
klist.append(item->keyId());
}
@@ -2052,7 +2058,7 @@
for (i = 0; i < sel.count(); i++) {
KeyListViewItem *cur = sel.at(i);
KeyListViewItem *item = cur->firstChild();
-
+
if (item == NULL) {
cur->setOpen(true);
cur->setOpen(false);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic