Changeset View
Changeset View
Standalone View
Standalone View
Modules/about-distro/src/Module.cpp
Show First 20 Lines • Show All 142 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 | const QString logoPath = cg.readEntry("LogoPath", QString()); | 151 | const QString logoPath = cg.readEntry("LogoPath", QStringLiteral("start-here-kde")); | ||
152 | QPixmap logo; | 152 | const QPixmap logo = QIcon::fromTheme(logoPath).pixmap(128, 128); | ||
153 | if (logoPath.isEmpty()) { | | |||
154 | logo = QIcon::fromTheme(QStringLiteral("start-here-kde")).pixmap(128, 128); | | |||
155 | } else { | | |||
156 | logo = QPixmap(logoPath); | | |||
157 | } | | |||
158 | ui->logoLabel->setPixmap(logo); | 153 | ui->logoLabel->setPixmap(logo); | ||
159 | 154 | | |||
160 | OSRelease os; | 155 | OSRelease os; | ||
161 | // We allow overriding of the OS name for branding purposes. | 156 | // We allow overriding of the OS name for branding purposes. | ||
162 | // For example OS Ubuntu may be rebranded as Kubuntu. Also Kubuntu Active | 157 | // For example OS Ubuntu may be rebranded as Kubuntu. Also Kubuntu Active | ||
163 | // as a product brand is different from Kubuntu. | 158 | // as a product brand is different from Kubuntu. | ||
164 | const QString distroName = cg.readEntry("Name", os.name); | 159 | const QString distroName = cg.readEntry("Name", os.name); | ||
165 | const QString versionId = cg.readEntry("Version", os.versionId); | 160 | const QString versionId = cg.readEntry("Version", os.versionId); | ||
▲ Show 20 Lines • Show All 148 Lines • Show Last 20 Lines |