diff options
-rwxr-xr-x | fileencryptiondialog.cpp | 4 | ||||
-rwxr-xr-x | fileencryptiondialog.h | 2 | ||||
-rw-r--r-- | gpgwin.cpp | 6 | ||||
-rw-r--r-- | keylist.cpp | 3 |
4 files changed, 10 insertions, 5 deletions
diff --git a/fileencryptiondialog.cpp b/fileencryptiondialog.cpp index 25db7f0..138a8b4 100755 --- a/fileencryptiondialog.cpp +++ b/fileencryptiondialog.cpp @@ -34,7 +34,7 @@ #include "fileencryptiondialog.h" -FileEncryptionDialog::FileEncryptionDialog(GpgME::Context *ctx, QString iconPath, QWidget *parent) +FileEncryptionDialog::FileEncryptionDialog(GpgME::Context *ctx, QString iconPath, QStringList keyList, QWidget *parent) : QDialog(parent) { @@ -76,7 +76,7 @@ FileEncryptionDialog::FileEncryptionDialog(GpgME::Context *ctx, QString iconPath mKeyList->hide(); mKeyList->setColumnWidth(2, 150); mKeyList->setColumnWidth(3, 150); - + mKeyList->setChecked(&keyList); /* Setup Action */ radioEnc = new QRadioButton(tr("&Encrypt")); connect(radioEnc, SIGNAL(clicked()), this, SLOT(showKeyList())); diff --git a/fileencryptiondialog.h b/fileencryptiondialog.h index 44ad9de..bba1280 100755 --- a/fileencryptiondialog.h +++ b/fileencryptiondialog.h @@ -34,7 +34,7 @@ class FileEncryptionDialog : public QDialog Q_OBJECT public: - FileEncryptionDialog(GpgME::Context *ctx, QString iconPath, QWidget *parent = 0); + FileEncryptionDialog(GpgME::Context *ctx, QString iconPath, QStringList keyList , QWidget *parent = 0); public slots: void selectInputFile(); @@ -718,9 +718,11 @@ void GpgWin::appendSelectedKeys() void GpgWin::fileEncryption() { - new FileEncryptionDialog(mCtx, iconPath, this); - + QStringList *keyList; + keyList = mKeyList->getChecked(); + new FileEncryptionDialog(mCtx, iconPath, *keyList, this); } + void GpgWin::openSettingsDialog() { new SettingsDialog(this); diff --git a/keylist.cpp b/keylist.cpp index b26bd78..92481b8 100644 --- a/keylist.cpp +++ b/keylist.cpp @@ -63,6 +63,8 @@ KeyList::KeyList(GpgME::Context *ctx, QString iconpath, QWidget *parent) void KeyList::refresh() { + QStringList *keyList; + keyList = getChecked(); // while filling the table, sort enabled causes errors mKeyList->setSortingEnabled(false); mKeyList->clearContents(); @@ -95,6 +97,7 @@ void KeyList::refresh() ++row; } mKeyList->setSortingEnabled(true); + setChecked(keyList); } |