libkwineffects: rename major and minor methods

There's "major" and "minor" defines that can get implicitly included, for
example with musl libc. To prevent that from breaking compilation, rename
the methods
master
Xaver Hugl 1 year ago
parent f0c8a0c482
commit 32ae9dd7d1

@ -88,7 +88,7 @@ void DrmTest::initTestCase()
{
// TODO: Remove this when CI is updated to ubuntu 22.04 or something with a newer kernel.
const Version kernelVersion = getKernelVersion();
if (kernelVersion.major() == 5 && kernelVersion.minor() <= 4) {
if (kernelVersion.majorVersion() == 5 && kernelVersion.minorVersion() <= 4) {
QSKIP("drmPrimeFDToHandle() randomly fails");
return;
}

@ -94,7 +94,7 @@ void ScreencastingTest::init()
{
// TODO: Remove this when CI is updated to ubuntu 22.04 or something with a newer kernel.
const Version kernelVersion = linuxKernelVersion();
if (kernelVersion.major() == 5 && kernelVersion.minor() <= 4) {
if (kernelVersion.majorVersion() == 5 && kernelVersion.minorVersion() <= 4) {
QSKIP("drmPrimeFDToHandle() randomly fails");
return;
}

@ -26,17 +26,17 @@ bool Version::isValid() const
return m_major > 0 || m_minor > 0 || m_patch > 0;
}
uint32_t Version::major() const
uint32_t Version::majorVersion() const
{
return m_major;
}
uint32_t Version::minor() const
uint32_t Version::minorVersion() const
{
return m_minor;
}
uint32_t Version::patch() const
uint32_t Version::patchVersion() const
{
return m_patch;
}

@ -23,9 +23,9 @@ public:
auto operator<=>(const Version &other) const = default;
bool isValid() const;
uint32_t major() const;
uint32_t minor() const;
uint32_t patch() const;
uint32_t majorVersion() const;
uint32_t minorVersion() const;
uint32_t patchVersion() const;
QString toString() const;
QByteArray toByteArray() const;

Loading…
Cancel
Save