aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOsmium Sorcerer <os@sof.beauty>2026-03-22 17:59:37 +0000
committerOsmium Sorcerer <os@sof.beauty>2026-03-30 13:07:11 +0000
commit4858f1d4049d514cc99792c7ff13518dfe95398c (patch)
tree564a39113c07308a15a71c1208d60ef6d8abc92c /src
parent4bb7dc795d672ce709bdb2969e6220933d651f6f (diff)
Move image plugin status to "About" page
Remove the error dialog that pops up if an image format is missing. Check AVIF, WebP, and APNG support, and report their status. As it stands, WebP should be supported by Qt itself, and AVIF has yet to be added. The rest (like PNG and JPEG) are on by default.
Diffstat (limited to 'src')
-rw-r--r--src/lobby.cpp10
-rw-r--r--src/main.cpp14
2 files changed, 8 insertions, 16 deletions
diff --git a/src/lobby.cpp b/src/lobby.cpp
index 1acad6f..a283d4e 100644
--- a/src/lobby.cpp
+++ b/src/lobby.cpp
@@ -270,6 +270,8 @@ void Lobby::on_remove_from_fav_released()
void Lobby::on_about_clicked()
{
+ const bool hasAvif = QImageReader::supportedImageFormats().contains("avif");
+ const bool hasWebp = QImageReader::supportedImageFormats().contains("webp");
const bool hasApng = QImageReader::supportedImageFormats().contains("apng");
QString msg = tr("<h2>Attorney Online %1</h2>"
"The courtroom drama simulator."
@@ -306,10 +308,14 @@ void Lobby::on_about_clicked()
"licenses apply. All other assets are the property of their "
"respective owners."
"<p>Running on Qt version %2 with the miniaudio audio engine.<br>"
- "APNG plugin loaded: %3"
- "<p>Built on %4")
+ "<p>AVIF supported: %3<br>"
+ "WebP supported: %4<br>"
+ "APNG supported: %5"
+ "<p>Built on %6")
.arg(ao_app->get_version_string())
.arg(QLatin1String(QT_VERSION_STR))
+ .arg(hasAvif ? tr("Yes") : tr("No"))
+ .arg(hasWebp ? tr("Yes") : tr("No"))
.arg(hasApng ? tr("Yes") : tr("No"))
.arg(QLatin1String(__DATE__));
QMessageBox::about(this, tr("About"), msg);
diff --git a/src/main.cpp b/src/main.cpp
index 0bc4e80..4141fc0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -54,20 +54,6 @@ int main(int argc, char *argv[])
}
}
- QStringList expected_formats{"webp", "apng", "gif"};
- for (const QByteArray &i_format : QImageReader::supportedImageFormats())
- {
- if (expected_formats.contains(i_format, Qt::CaseInsensitive))
- {
- expected_formats.removeAll(i_format.toLower());
- }
- }
-
- if (!expected_formats.isEmpty())
- {
- call_error("Missing image formats: <b>" + expected_formats.join(", ") + "</b>.<br /><br /> Please make sure you have installed the application properly.");
- }
-
QString p_language = Options::getInstance().language();
if (p_language.trimmed().isEmpty())
{