Compare commits

..

2 Commits

Author SHA1 Message Date
8333f17199
chore(CI): add portable mode to qmake build
Resolve https://github.com/BLumia/pineapple-pictures/issues/148

This change is sponsored by @EdgarHartel.
2025-04-11 12:54:29 +08:00
30eb06cba7
chore: make use of the showMessageAndExit api in Qt 6.9 2025-04-09 19:24:27 +08:00
2 changed files with 9 additions and 0 deletions

View File

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

View File

@ -9,6 +9,10 @@ TARGET = ppic
TEMPLATE = app TEMPLATE = app
DEFINES += PPIC_VERSION_STRING=\\\"x.y.z\\\" DEFINES += PPIC_VERSION_STRING=\\\"x.y.z\\\"
win32 {
DEFINES += FLAG_PORTABLE_MODE_SUPPORT=1
}
# The following define makes your compiler emit warnings if you use # The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings # any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the # depend on your compiler). Please consult the documentation of the