libqtxdg-packaging/desktopenvironment_p.cpp
Andrew Lee (李健秋) 8762635176
Adding upstream version 1.2.0.
Signed-off-by: Andrew Lee (李健秋) <ajqlee@debian.org>
2015-08-13 03:54:32 +08:00

12 lines
257 B
C++

#include <QtCore/QByteArray>
static inline QByteArray detectDesktopEnvironment()
{
const QByteArray _desktop = qgetenv("XDG_CURRENT_DESKTOP");
if (!_desktop.isEmpty()) {
return _desktop.toUpper();
}
return QByteArray("UNKNOWN");
}