KWin
Loading...
Searching...
No Matches
src
utils
kernel.h
Go to the documentation of this file.
1
/*
2
KWin - the KDE window manager
3
This file is part of the KDE project.
4
5
SPDX-FileCopyrightText: 2023 Xaver Hugl <xaver.hugl@gmail.com>
6
7
SPDX-License-Identifier: GPL-2.0-or-later
8
*/
9
#pragma once
10
#include "
utils/version.h
"
11
12
#include <sys/utsname.h>
13
14
namespace
KWin
15
{
16
17
inline
static
Version linuxKernelVersion()
18
{
19
struct
utsname name;
20
uname(&name);
21
22
if
(qstrcmp(name.sysname,
"Linux"
) == 0) {
23
return
Version::parseString
(name.release);
24
}
25
return
Version(0, 0, 0);
26
}
27
28
}
KWin::Version::parseString
static Version parseString(QByteArrayView versionString)
Definition
version.cpp:44
KWin
Definition
activation_test.cpp:20
version.h
Generated on Sat Feb 17 2024 01:42:10 for KWin by
1.10.0