Fix build with Qt 6.10

This commit is contained in:
Ilya Fedin
2025-09-24 02:24:04 +00:00
committed by John Preston
parent 6627de6460
commit 28d19a99e1
3 changed files with 7 additions and 11 deletions

View File

@@ -177,15 +177,10 @@ LinuxIntegration::LinuxIntegration()
QCoreApplication::eventDispatcher(),
&QAbstractEventDispatcher::aboutToBlock,
[] {
static auto timer = [] {
QElapsedTimer timer;
timer.start();
return timer;
}();
if (timer.hasExpired(10000)) {
static auto since = crl::now();
if (crl::now() - since >= 10000) {
malloc_trim(0);
timer.start();
since = crl::now();
}
});
#endif // __GLIBC__