void MainWin::showPasswordChangeDlg()
{
if (Client::isCoreFeatureEnabled(Quassel::Feature::PasswordChange)) {
- PasswordChangeDlg{}.exec();
+ PasswordChangeDlg{this}.exec();
}
else {
QMessageBox box(QMessageBox::Warning,
void MainWin::showNotificationsDlg()
{
- SettingsPageDlg{new NotificationsSettingsPage{}}.exec();
+ SettingsPageDlg{new NotificationsSettingsPage{}, this}.exec();
}
void MainWin::onConfigureNetworksTriggered()
{
- SettingsPageDlg{new NetworksSettingsPage{}}.exec();
+ SettingsPageDlg{new NetworksSettingsPage{}, this}.exec();
}
void MainWin::onConfigureViewsTriggered()
{
- SettingsPageDlg{new BufferViewSettingsPage{}}.exec();
+ SettingsPageDlg{new BufferViewSettingsPage{}, this}.exec();
}
void MainWin::onLockLayoutToggled(bool lock)
void MainWin::userAuthenticationRequired(CoreAccount* account, bool* valid, const QString& errorMessage)
{
Q_UNUSED(errorMessage)
- CoreConnectAuthDlg dlg(account);
+ CoreConnectAuthDlg dlg(account, this);
*valid = (dlg.exec() == QDialog::Accepted);
}
void MainWin::handleSslErrors(const QSslSocket* socket, bool* accepted, bool* permanently)
{
QString errorString = "<ul>";
- foreach (const QSslError error, socket->sslErrors())
+
+#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
+ for (const auto& error : socket->sslErrors()) {
+#else
+ for (const auto& error : socket->sslHandshakeErrors()) {
+#endif
errorString += QString("<li>%1</li>").arg(error.errorString());
+ }
errorString += "</ul>";
QMessageBox box(QMessageBox::Warning,
box.exec();
role = box.buttonRole(box.clickedButton());
if (role == QMessageBox::HelpRole) {
- SslInfoDlg dlg(socket);
+ SslInfoDlg dlg(socket, this);
dlg.exec();
}
} while (role == QMessageBox::HelpRole);
void MainWin::showCoreConnectionDlg()
{
- CoreConnectDlg dlg;
+ CoreConnectDlg dlg{this};
if (dlg.exec() == QDialog::Accepted) {
AccountId accId = dlg.selectedAccount();
if (accId.isValid())
void MainWin::showNetworkConfig(NetworkId netId)
{
- SettingsPageDlg dlg{new NetworksSettingsPage{}};
+ SettingsPageDlg dlg{new NetworksSettingsPage{}, this};
if (netId.isValid())
qobject_cast<NetworksSettingsPage*>(dlg.currentPage())->bufferList_Open(netId);
dlg.exec();
void MainWin::showIgnoreList(QString newRule)
{
- SettingsPageDlg dlg{new IgnoreListSettingsPage{}};
+ SettingsPageDlg dlg{new IgnoreListSettingsPage{}, this};
// prepare config dialog for new rule
if (!newRule.isEmpty())
qobject_cast<IgnoreListSettingsPage*>(dlg.currentPage())->editIgnoreRule(newRule);
void MainWin::showCoreInfoDlg()
{
- CoreInfoDlg{}.exec();
+ CoreInfoDlg{this}.exec();
}
void MainWin::showAwayLog()
void MainWin::showSettingsDlg()
{
- auto dlg = new SettingsDlg();
+ auto dlg = new SettingsDlg(this);
// Category: Interface
dlg->registerSettingsPage(new AppearanceSettingsPage(dlg));
void MainWin::showAboutDlg()
{
- AboutDlg{}.exec();
+ AboutDlg{this}.exec();
}
void MainWin::showShortcutsDlg()
}
dlg.configure(true);
#else
- SettingsPageDlg{new ShortcutsSettingsPage{QtUi::actionCollections()}}.exec();
+ SettingsPageDlg{new ShortcutsSettingsPage{QtUi::actionCollections()}, this}.exec();
#endif
}