diff options
| author | 2023-10-10 17:58:14 +0200 | |
|---|---|---|
| committer | 2023-10-18 10:26:35 +0200 | |
| commit | 9052018b53ece6c073b57c89665ae693a3f0fb97 (patch) | |
| tree | 24dd1cba8974439f646a242bc0cb228076fa38b2 /src/modules/options | |
| parent | Address feedback for XmlFunctions.cpp (diff) | |
| download | KVIrc-9052018b53ece6c073b57c89665ae693a3f0fb97.tar.gz KVIrc-9052018b53ece6c073b57c89665ae693a3f0fb97.tar.bz2 KVIrc-9052018b53ece6c073b57c89665ae693a3f0fb97.zip | |
Migrate almost all QMessagebox to qt6-friendly version.
Diffstat (limited to 'src/modules/options')
| -rw-r--r-- | src/modules/options/OptionsWidget_identity.cpp | 10 | ||||
| -rw-r--r-- | src/modules/options/OptionsWidget_nickserv.cpp | 11 | ||||
| -rw-r--r-- | src/modules/options/OptionsWidget_servers.cpp | 4 | ||||
| -rw-r--r-- | src/modules/options/OptionsWidget_textEncoding.cpp | 2 |
4 files changed, 12 insertions, 15 deletions
diff --git a/src/modules/options/OptionsWidget_identity.cpp b/src/modules/options/OptionsWidget_identity.cpp index 49496729b..cf5821705 100644 --- a/src/modules/options/OptionsWidget_identity.cpp +++ b/src/modules/options/OptionsWidget_identity.cpp @@ -566,8 +566,7 @@ void OptionsWidget_identityAvatar::chooseAvatar() __tr2qs_ctx("Failed to load the avatar image.<br>" "It may be an inaccessible file or an " "unsupported image format.", - "options"), - QMessageBox::Ok, QMessageBox::NoButton); + "options")); } // else loaded! } else @@ -577,7 +576,7 @@ void OptionsWidget_identityAvatar::chooseAvatar() "<b>%1</b>", "options")) .arg(dlg.errorMessage()); - QMessageBox::warning(this, __tr2qs_ctx("Avatar Download Failed - KVIrc", "options"), szTmp, QMessageBox::Ok, QMessageBox::NoButton); + QMessageBox::warning(this, __tr2qs_ctx("Avatar Download Failed - KVIrc", "options"), szTmp); szCurrent = ""; m_pLocalAvatar->setNull(); } @@ -616,8 +615,7 @@ void OptionsWidget_identityAvatar::chooseAvatar() __tr2qs_ctx("Failed to load the avatar image.<br>" "It may be an inaccessible file or an " "unsupported image format.", - "options"), - QMessageBox::Ok, QMessageBox::NoButton); + "options")); szCurrent = ""; } } @@ -867,7 +865,7 @@ void OptionsWidget_identityProfile::editProfileOkPressed() { if(m_pEditor->m_pNameEdit->text() == m_pTreeWidget->topLevelItem(i)->text(0) && i != m_iCurrentEditedProfile) { - QMessageBox::warning(this, __tr2qs_ctx("Invalid Profile Rule - KVIrc", "options"), __tr2qs_ctx("There is already a profile with that name", "options"), __tr2qs_ctx("OK", "options")); + QMessageBox::warning(this, __tr2qs_ctx("Invalid Profile Rule - KVIrc", "options"), __tr2qs_ctx("There is already a profile with that name", "options")); return; } } diff --git a/src/modules/options/OptionsWidget_nickserv.cpp b/src/modules/options/OptionsWidget_nickserv.cpp index 016aa69a5..471aba36b 100644 --- a/src/modules/options/OptionsWidget_nickserv.cpp +++ b/src/modules/options/OptionsWidget_nickserv.cpp @@ -145,17 +145,16 @@ bool NickServRuleEditor::validate() QString s = m_pRegisteredNickEdit->text(); QString m = __tr2qs_ctx("Invalid NickServ Rule - KVIrc", "options"); - QString o = __tr2qs_ctx("OK", "options"); if(s.isEmpty()) { - QMessageBox::warning(this, m, __tr2qs_ctx("The nickname field can't be empty!", "options"), o); + QMessageBox::warning(this, m, __tr2qs_ctx("The nickname field can't be empty!", "options")); return false; } if(s.indexOf(QChar(' ')) != -1) { - QMessageBox::warning(this, m, __tr2qs_ctx("The nickname field can't contain spaces!", "options"), o); + QMessageBox::warning(this, m, __tr2qs_ctx("The nickname field can't contain spaces!", "options")); return false; } @@ -163,7 +162,7 @@ bool NickServRuleEditor::validate() if(s.isEmpty()) { - QMessageBox::warning(this, m, __tr2qs_ctx("The NickServ mask can't be empty!<br>You must put at least * there.", "options"), o); + QMessageBox::warning(this, m, __tr2qs_ctx("The NickServ mask can't be empty!<br>You must put at least * there.", "options")); return false; } @@ -171,7 +170,7 @@ bool NickServRuleEditor::validate() if(s.isEmpty()) { - QMessageBox::warning(this, m, __tr2qs_ctx("The message regexp can't be empty!<br>You must put at least * there.", "options"), o); + QMessageBox::warning(this, m, __tr2qs_ctx("The message regexp can't be empty!<br>You must put at least * there.", "options")); return false; } @@ -179,7 +178,7 @@ bool NickServRuleEditor::validate() if(s.isEmpty()) { - QMessageBox::warning(this, m, __tr2qs_ctx("The IDENTIFY command can't be empty!", "options"), o); + QMessageBox::warning(this, m, __tr2qs_ctx("The IDENTIFY command can't be empty!", "options")); return false; } diff --git a/src/modules/options/OptionsWidget_servers.cpp b/src/modules/options/OptionsWidget_servers.cpp index 3230a3bf1..828e92a80 100644 --- a/src/modules/options/OptionsWidget_servers.cpp +++ b/src/modules/options/OptionsWidget_servers.cpp @@ -2161,8 +2161,8 @@ void OptionsWidget_servers::clearList() QString txt = __tr2qs_ctx("If you click <b>Yes</b>, all of your saved networks, servers, settings, and passwords will be lost.<br>" "Would you like to continue?", "options"); - if(QMessageBox::question(this,__tr2qs_ctx("Confirm Clearing Server List - KVIrc", "options"), txt, - __tr2qs_ctx("Yes", "options"), __tr2qs_ctx("No", "options"), nullptr, 1) != 0) return; + if(QMessageBox::question(this,__tr2qs_ctx("Confirm Clearing Server List - KVIrc", "options"), txt) != QMessageBox::Yes) + return; m_pTreeWidget->clear(); m_pLastEditedItem = nullptr; diff --git a/src/modules/options/OptionsWidget_textEncoding.cpp b/src/modules/options/OptionsWidget_textEncoding.cpp index 249e14784..d23416d8b 100644 --- a/src/modules/options/OptionsWidget_textEncoding.cpp +++ b/src/modules/options/OptionsWidget_textEncoding.cpp @@ -222,7 +222,7 @@ void OptionsWidget_textEncoding::commit() g_szPrevSetLocale = m_pForcedLocaleCombo->itemText(idx); if(!KviFileUtils::writeFile(szLangFile, m_pForcedLocaleCombo->itemText(idx))) { - QMessageBox::critical(this, "Writing to File Failed - KVIrc", __tr2qs_ctx("Unable to write language information to", "options") + "\n" + szLangFile, __tr2qs_ctx("OK", "options")); + QMessageBox::critical(this, "Writing to File Failed - KVIrc", __tr2qs_ctx("Unable to write language information to", "options") + "\n" + szLangFile); } } |
