setAllocationLimit is Qt6 only

This commit is contained in:
Luis Ángel San Martín 2022-12-12 22:07:30 +01:00
parent 7fed222cb7
commit 250c48848c
3 changed files with 6 additions and 0 deletions

View File

@ -98,7 +98,9 @@ int main(int argc, char *argv[])
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QImageReader::setAllocationLimit(0);
#endif
#if defined(_MSC_VER) && defined(_DEBUG)
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);

View File

@ -131,7 +131,9 @@ int main(int argc, char **argv)
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QImageReader::setAllocationLimit(0);
#endif
QApplication app(argc, argv);

View File

@ -82,7 +82,9 @@ int main(int argc, char **argv)
QCoreApplication app(argc, argv);
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QImageReader::setAllocationLimit(0);
#endif
app.setApplicationName("YACReaderLibrary");
app.setOrganizationName("YACReader");