Changeset View
Changeset View
Standalone View
Standalone View
Modules/about-distro/src/Module.cpp
Show All 27 Lines | |||||
28 | 28 | | |||
29 | #include <KAboutData> | 29 | #include <KAboutData> | ||
30 | #include <KCoreAddons> | 30 | #include <KCoreAddons> | ||
31 | #include <KConfig> | 31 | #include <KConfig> | ||
32 | #include <KConfigGroup> | 32 | #include <KConfigGroup> | ||
33 | #include <KDesktopFile> | 33 | #include <KDesktopFile> | ||
34 | #include <KFormat> | 34 | #include <KFormat> | ||
35 | #include <KLocalizedString> | 35 | #include <KLocalizedString> | ||
36 | #include <KOSRelease> | ||||
36 | #include <KSharedConfig> | 37 | #include <KSharedConfig> | ||
37 | 38 | | |||
38 | #include <solid/device.h> | 39 | #include <solid/device.h> | ||
39 | #include <solid/processor.h> | 40 | #include <solid/processor.h> | ||
40 | 41 | | |||
41 | #ifdef Q_OS_LINUX | 42 | #ifdef Q_OS_LINUX | ||
42 | #include <sys/sysinfo.h> | 43 | #include <sys/sysinfo.h> | ||
43 | #elif defined(Q_OS_FREEBSD) | 44 | #elif defined(Q_OS_FREEBSD) | ||
44 | #include <sys/types.h> | 45 | #include <sys/types.h> | ||
45 | #include <sys/sysctl.h> | 46 | #include <sys/sysctl.h> | ||
46 | #endif | 47 | #endif | ||
47 | #include <sys/utsname.h> | 48 | #include <sys/utsname.h> | ||
48 | 49 | | |||
49 | #include "OSRelease.h" | | |||
50 | #include "Version.h" | 50 | #include "Version.h" | ||
51 | 51 | | |||
52 | static qlonglong calculateTotalRam() | 52 | static qlonglong calculateTotalRam() | ||
53 | { | 53 | { | ||
54 | qlonglong ret = -1; | 54 | qlonglong ret = -1; | ||
55 | #ifdef Q_OS_LINUX | 55 | #ifdef Q_OS_LINUX | ||
56 | struct sysinfo info; | 56 | struct sysinfo info; | ||
57 | if (sysinfo(&info) == 0) | 57 | if (sysinfo(&info) == 0) | ||
▲ Show 20 Lines • Show All 85 Lines • ▼ Show 20 Line(s) | |||||
143 | void Module::loadSoftware() | 143 | void Module::loadSoftware() | ||
144 | { | 144 | { | ||
145 | // NOTE: do not include globals, otherwise kdeglobals could provide values | 145 | // NOTE: do not include globals, otherwise kdeglobals could provide values | ||
146 | // even though we only explicitly want them from our own config. | 146 | // even though we only explicitly want them from our own config. | ||
147 | KSharedConfig::Ptr config = KSharedConfig::openConfig(QStringLiteral("kcm-about-distrorc"), | 147 | KSharedConfig::Ptr config = KSharedConfig::openConfig(QStringLiteral("kcm-about-distrorc"), | ||
148 | KConfig::NoGlobals); | 148 | KConfig::NoGlobals); | ||
149 | KConfigGroup cg = KConfigGroup(config, "General"); | 149 | KConfigGroup cg = KConfigGroup(config, "General"); | ||
150 | 150 | | |||
151 | OSRelease os; | 151 | KOSRelease os; | ||
152 | 152 | | |||
153 | QString logoPath = cg.readEntry("LogoPath", os.logo()); | 153 | QString logoPath = cg.readEntry("LogoPath", os.logo()); | ||
154 | if (logoPath.isEmpty()) { | 154 | if (logoPath.isEmpty()) { | ||
155 | logoPath = QStringLiteral("start-here-kde"); | 155 | logoPath = QStringLiteral("start-here-kde"); | ||
156 | } | 156 | } | ||
157 | const QPixmap logo = QIcon::fromTheme(logoPath).pixmap(128, 128); | 157 | const QPixmap logo = QIcon::fromTheme(logoPath).pixmap(128, 128); | ||
158 | ui->logoLabel->setPixmap(logo); | 158 | ui->logoLabel->setPixmap(logo); | ||
159 | 159 | | |||
▲ Show 20 Lines • Show All 156 Lines • Show Last 20 Lines |