Skip to content

Commit

Permalink
Use current widget top level widget (#766)
Browse files Browse the repository at this point in the history
IB-6474

Signed-off-by: Raul Metsma <raul@metsma.ee>
  • Loading branch information
metsma authored Jun 12, 2020
1 parent e668204 commit 850d43d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions client/widgets/ContainerPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ using namespace ria::qdigidoc4;
ContainerPage::ContainerPage(QWidget *parent)
: QWidget(parent)
, ui(new Ui::ContainerPage)
, cancelText("CANCEL")
, convertText("ENCRYPT")
{
ui->setupUi( this );
ui->leftPane->init(fileName);
Expand Down Expand Up @@ -102,7 +100,7 @@ void ContainerPage::addError(const SignatureItem* item, QMap<ria::qdigidoc4::War

void ContainerPage::addressSearch()
{
AddRecipients dlg(ui->rightPane, qApp->activeWindow());
AddRecipients dlg(ui->rightPane, topLevelWidget());
if(dlg.exec() && dlg.isUpdated())
emit keysSelected(dlg.keys());
}
Expand Down Expand Up @@ -194,7 +192,7 @@ void ContainerPage::forward(int code)
{
case SignatureMobile:
{
MobileDialog dlg(qApp->activeWindow());
MobileDialog dlg(topLevelWidget());
QString newCode = QSettings().value(QStringLiteral("MobileCode")).toString();
if(dlg.exec() == QDialog::Accepted)
{
Expand All @@ -216,7 +214,7 @@ void ContainerPage::forward(int code)
break;
case SignatureSmartID:
{
SmartIDDialog dlg(qApp->activeWindow());
SmartIDDialog dlg(topLevelWidget());
if(dlg.exec() == QDialog::Accepted)
{
if(checkAction(SignatureMobile, dlg.idCode(), QString()))
Expand Down
4 changes: 2 additions & 2 deletions client/widgets/ContainerPage.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ public slots:
QString fileName;
QString mobileCode;

const char *cancelText;
const char *convertText;
const char *cancelText = "CANCEL";
const char *convertText = "ENCRYPT";
bool canDecrypt = false;
bool seal = false;
bool isExpired = false;
Expand Down

0 comments on commit 850d43d

Please sign in to comment.