aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/theme/SaveThemeDialog.cpp
diff options
context:
space:
mode:
authorGravatar Fabio Bas2023-10-10 17:58:14 +0200
committerGravatar ctrlaltca2023-10-18 10:26:35 +0200
commit9052018b53ece6c073b57c89665ae693a3f0fb97 (patch)
tree24dd1cba8974439f646a242bc0cb228076fa38b2 /src/modules/theme/SaveThemeDialog.cpp
parentAddress feedback for XmlFunctions.cpp (diff)
downloadKVIrc-9052018b53ece6c073b57c89665ae693a3f0fb97.tar.gz
KVIrc-9052018b53ece6c073b57c89665ae693a3f0fb97.tar.bz2
KVIrc-9052018b53ece6c073b57c89665ae693a3f0fb97.zip
Migrate almost all QMessagebox to qt6-friendly version.
Diffstat (limited to 'src/modules/theme/SaveThemeDialog.cpp')
-rw-r--r--src/modules/theme/SaveThemeDialog.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/modules/theme/SaveThemeDialog.cpp b/src/modules/theme/SaveThemeDialog.cpp
index 00ac0b17f..3043d31ae 100644
--- a/src/modules/theme/SaveThemeDialog.cpp
+++ b/src/modules/theme/SaveThemeDialog.cpp
@@ -226,8 +226,7 @@ void SaveThemeDialog::imageSelectionChanged(const QString & szImagePath)
return;
}
- QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), __tr2qs_ctx("Failed to load the selected image!", "theme"),
- QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton);
+ QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), __tr2qs_ctx("Failed to load the selected image!", "theme"));
m_pImageSelector->setSelection("");
m_pImageLabel->setPixmap(QPixmap());
@@ -248,8 +247,7 @@ void SaveThemeDialog::makeScreenshot()
g_pApp->getTmpFileName(szFileName, "screenshot.png");
if(!ThemeFunctions::makeKVIrcScreenshot(szFileName))
{
- QMessageBox::critical(this, __tr2qs_ctx("Acquire Screenshot - KVIrc", "theme"), __tr2qs_ctx("Failed to make a theme screenshot.", "theme"),
- QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton);
+ QMessageBox::critical(this, __tr2qs_ctx("Acquire Screenshot - KVIrc", "theme"), __tr2qs_ctx("Failed to make a theme screenshot.", "theme"));
return;
}
m_pImageSelector->setSelection(szFileName);
@@ -264,8 +262,7 @@ bool SaveThemeDialog::saveTheme()
sto.setName(m_pThemeNameEdit->text());
if(sto.name().isEmpty())
{
- QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), __tr2qs_ctx("You must choose a theme name.", "theme"), QMessageBox::Ok,
- QMessageBox::NoButton, QMessageBox::NoButton);
+ QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), __tr2qs_ctx("You must choose a theme name.", "theme"));
return false;
}
@@ -286,8 +283,7 @@ bool SaveThemeDialog::saveTheme()
QString szAbsDir = sto.directory();
if(!KviFileUtils::makeDir(szAbsDir))
{
- QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), __tr2qs_ctx("Unable to create theme directory.", "theme"),
- QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton);
+ QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), __tr2qs_ctx("Unable to create theme directory.", "theme"));
return false;
}
@@ -295,8 +291,7 @@ bool SaveThemeDialog::saveTheme()
{
QString szErr = sto.lastError();
QString szMsg2 = QString(__tr2qs_ctx("Unable to save theme: %1", "theme")).arg(szErr);
- QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), szMsg2,
- QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton);
+ QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), szMsg2);
return false;
}
// write down the screenshot, if needed
@@ -305,8 +300,7 @@ bool SaveThemeDialog::saveTheme()
{
if(!KviTheme::saveScreenshots(sto, m_szScreenshotPath))
{
- QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), __tr2qs_ctx("Failed to load the selected screenshot image: please fix it", "theme"),
- QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton);
+ QMessageBox::critical(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), __tr2qs_ctx("Failed to load the selected screenshot image: please fix it", "theme"));
setCurrentPage(m_pImageSelectionPage);
return false;
}
@@ -314,8 +308,7 @@ bool SaveThemeDialog::saveTheme()
QString szMsg = __tr2qs_ctx("Theme saved successfully to %1", "theme").arg(szAbsDir);
- QMessageBox::information(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), szMsg, QMessageBox::Ok,
- QMessageBox::NoButton, QMessageBox::NoButton);
+ QMessageBox::information(this, __tr2qs_ctx("Save Current Theme - KVIrc", "theme"), szMsg);
return true;
}