1
0
mirror of https://invent.kde.org/network/krdc synced 2024-07-03 08:18:36 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Nicolas Fella
2d6204b1c6 Merge branch 'work/nico/parent-windows' into 'master'
rdp: Add parent widget to dialogs

See merge request network/krdc!81
2024-06-26 11:11:26 +00:00
Nicolas Fella
ac9151c96a rdp: Add parent widget to dialogs
This is needed for proper window management
2024-01-28 16:00:28 +01:00

View File

@ -707,10 +707,10 @@ bool RdpSession::onAuthenticate(char **username, char **password, char **domain)
std::unique_ptr<KPasswordDialog> dialog;
bool hasUsername = qstrlen(*username) != 0;
if (hasUsername) {
dialog = std::make_unique<KPasswordDialog>(nullptr, KPasswordDialog::ShowKeepPassword);
dialog = std::make_unique<KPasswordDialog>(m_view, KPasswordDialog::ShowKeepPassword);
dialog->setPrompt(i18nc("@label", "Access to this system requires a password."));
} else {
dialog = std::make_unique<KPasswordDialog>(nullptr, KPasswordDialog::ShowUsernameLine | KPasswordDialog::ShowKeepPassword);
dialog = std::make_unique<KPasswordDialog>(m_view, KPasswordDialog::ShowUsernameLine | KPasswordDialog::ShowKeepPassword);
dialog->setPrompt(i18nc("@label", "Access to this system requires a username and password."));
}
@ -733,7 +733,7 @@ bool RdpSession::onAuthenticate(char **username, char **password, char **domain)
RdpSession::CertificateResult RdpSession::onVerifyCertificate(const Certificate &certificate)
{
KMessageDialog dialog{KMessageDialog::QuestionTwoActions, i18nc("@label", "The certificate for this system is unknown. Do you wish to continue?")};
KMessageDialog dialog{KMessageDialog::QuestionTwoActions, i18nc("@label", "The certificate for this system is unknown. Do you wish to continue?"), m_view};
dialog.setCaption(i18nc("@title:dialog", "Verify Certificate"));
dialog.setIcon(QIcon::fromTheme(QStringLiteral("view-certficate")));
@ -756,7 +756,7 @@ RdpSession::CertificateResult RdpSession::onVerifyCertificate(const Certificate
RdpSession::CertificateResult RdpSession::onVerifyChangedCertificate(const Certificate &oldCertificate, const Certificate &newCertificate)
{
KMessageDialog dialog{KMessageDialog::QuestionTwoActions, i18nc("@label", "The certificate for this system has changed. Do you wish to continue?")};
KMessageDialog dialog{KMessageDialog::QuestionTwoActions, i18nc("@label", "The certificate for this system has changed. Do you wish to continue?"), m_view};
dialog.setCaption(i18nc("@title:dialog", "Certificate has Changed"));
dialog.setIcon(QIcon::fromTheme(QStringLiteral("view-certficate")));