diff options
author | Nils Achtergarde <[email protected]> | 2017-12-30 20:07:21 +0000 |
---|---|---|
committer | Nils Achtergarde <[email protected]> | 2017-12-30 20:07:21 +0000 |
commit | ab74a3fee1830311b51972969356ab003b7b6eae (patch) | |
tree | 0548457a24b4ce361b6ef55062ce62390e559d14 /mainwindow.cpp | |
parent | recommit eafa42262813180336ae5e4c4c284d17a4f42e65 (fixed minor cosmetic effects) (diff) | |
download | gpg4usb-ab74a3fee1830311b51972969356ab003b7b6eae.tar.gz gpg4usb-ab74a3fee1830311b51972969356ab003b7b6eae.zip |
recommit of ffc7c45fee1bfa046cd2c605a43c9c5d2cf7eb62 (proof of concept for upload key to server)
Diffstat (limited to 'mainwindow.cpp')
-rw-r--r-- | mainwindow.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp index eeafbbf..e3b802e 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -60,7 +60,8 @@ MainWindow::MainWindow() mKeyList->addMenuAction(copyMailAddressToClipboardAct); mKeyList->addMenuAction(showKeyDetailsAct); mKeyList->addMenuAction(refreshKeysFromKeyserverAct); - + mKeyList->addMenuAction(uploadKeyToServerAct); + restoreSettings(); // open filename if provided as first command line parameter @@ -363,6 +364,9 @@ void MainWindow::createActions() refreshKeysFromKeyserverAct->setToolTip(tr("Refresh key from default keyserver")); connect(refreshKeysFromKeyserverAct, SIGNAL(triggered()), this, SLOT(refreshKeysFromKeyserver())); + uploadKeyToServerAct = new QAction(tr("Upload Key(s) To Server"), this); + uploadKeyToServerAct->setToolTip(tr("Upload The Selected Keys To Server")); + connect(uploadKeyToServerAct, SIGNAL(triggered()), this, SLOT(uploadKeyToServer())); /* Key-Shortcuts for Tab-Switchung-Action */ switchTabUpAct = new QAction(this); @@ -932,6 +936,13 @@ void MainWindow::refreshKeysFromKeyserver() } +void MainWindow::uploadKeyToServer() +{ + QByteArray *keyArray = new QByteArray(); + mCtx->exportKeys(mKeyList->getSelected(), keyArray); + + mKeyList->uploadKeyToServer(keyArray); +} void MainWindow::slotFileEncryption() { |