chore: make use of the showMessageAndExit api in Qt 6.9

This commit is contained in:
Gary Wang 2025-04-09 19:24:27 +08:00
parent 0a45cd7c22
commit 30eb06cba7
No known key found for this signature in database
GPG Key ID: 5D30A4F15EA78760

View File

@ -52,8 +52,13 @@ int main(int argc, char *argv[])
parser.process(a);
if (parser.isSet(supportedImageFormats)) {
#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
fputs(qPrintable(MainWindow::supportedImageFormats().join(QChar('\n'))), stdout);
::exit(EXIT_SUCCESS);
#else
QCommandLineParser::showMessageAndExit(QCommandLineParser::MessageType::Information,
MainWindow::supportedImageFormats().join(QChar('\n')));
#endif
}
MainWindow w;