Commit cdb3e432 authored by Heiko Becker's avatar Heiko Becker
Browse files

Rename PAGE_SIZE to ENGINE_PAGE_SIZE to avoid a clash

Fixes the build with musl libc because it clashes with PAGE_SIZE
from limits.h, which according to POSIX [1] should be in there.
Fails with "KNSBackend.cpp:39:18: error: expected unqualified-id
before numeric constant
   39 | static const int PAGE_SIZE = 100;" otherwise.

BUG: 448378
FIXED-IN: 5.24.0

[1] https://pubs.opengroup.org/onlinepubs/009696899/basedefs/limits.h.html
parent 516a2e6a
......@@ -36,7 +36,7 @@
#include "utils.h"
#include <resources/StandardBackendUpdater.h>
static const int PAGE_SIZE = 100;
static const int ENGINE_PAGE_SIZE = 100;
class KNSBackendFactory : public AbstractResourcesBackendFactory
{
......@@ -160,7 +160,7 @@ KNSBackend::KNSBackend(QObject *parent, const QString &iconName, const QString &
}
}
});
m_engine->setPageSize(PAGE_SIZE);
m_engine->setPageSize(ENGINE_PAGE_SIZE);
m_engine->init(m_name);
if (m_hasApplications) {
......@@ -378,7 +378,7 @@ void KNSBackend::receivedEntries(const KNSCore::EntryInternal::List &entries)
}
setResponsePending(false);
if (m_onePage || resources.count() < PAGE_SIZE) {
if (m_onePage || resources.count() < ENGINE_PAGE_SIZE) {
Q_EMIT searchFinished();
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment