Changeset View
Changeset View
Standalone View
Standalone View
Modules/about-distro/src/Module.cpp
Show First 20 Lines • Show All 172 Lines • ▼ Show 20 Line(s) | 138 | { | |||
---|---|---|---|---|---|
173 | const QString url = cg.readEntry("Website", os.homeUrl); | 173 | const QString url = cg.readEntry("Website", os.homeUrl); | ||
174 | if (url.isEmpty()) { | 174 | if (url.isEmpty()) { | ||
175 | ui->urlLabel->hide(); | 175 | ui->urlLabel->hide(); | ||
176 | } else { | 176 | } else { | ||
177 | ui->urlLabel->setText(QStringLiteral("<a href='%1'>%1</a>").arg(url)); | 177 | ui->urlLabel->setText(QStringLiteral("<a href='%1'>%1</a>").arg(url)); | ||
178 | } | 178 | } | ||
179 | 179 | | |||
180 | // Since Plasma version detection isn't based on a library query it can fail | 180 | // Since Plasma version detection isn't based on a library query it can fail | ||
181 | // in weird cases; instead of admiting defeat we simply hide everything :P | 181 | // in weird cases; instead of admitting defeat we simply hide everything :P | ||
182 | const QString plasma = plasmaVersion(); | 182 | const QString plasma = plasmaVersion(); | ||
183 | if (plasma.isEmpty()) { | 183 | if (plasma.isEmpty()) { | ||
184 | ui->plasma->hide(); | 184 | ui->plasma->hide(); | ||
185 | ui->plasmaLabel->hide(); | 185 | ui->plasmaLabel->hide(); | ||
186 | } else { | 186 | } else { | ||
187 | ui->plasmaLabel->setText(plasma); | 187 | ui->plasmaLabel->setText(plasma); | ||
188 | labelsForClipboard << qMakePair(ui->plasma, ui->plasmaLabel); | 188 | labelsForClipboard << qMakePair(ui->plasma, ui->plasmaLabel); | ||
189 | } | 189 | } | ||
190 | 190 | | |||
191 | const QString qversion = QString::fromLatin1(qVersion()); | | |||
192 | ui->qtLabel->setText(qversion); | | |||
193 | labelsForClipboard << qMakePair(ui->qt, ui->qtLabel); | | |||
194 | | ||||
195 | const QString frameworksVersion = KCoreAddons::versionString(); | 191 | const QString frameworksVersion = KCoreAddons::versionString(); | ||
196 | ui->frameworksLabel->setText(frameworksVersion); | 192 | ui->frameworksLabel->setText(frameworksVersion); | ||
197 | labelsForClipboard << qMakePair(ui->frameworksLabelKey, ui->frameworksLabel); | 193 | labelsForClipboard << qMakePair(ui->frameworksLabelKey, ui->frameworksLabel); | ||
194 | | ||||
195 | const QString qversion = QString::fromLatin1(qVersion()); | ||||
196 | ui->qtLabel->setText(qversion); | ||||
197 | labelsForClipboard << qMakePair(ui->qt, ui->qtLabel); | ||||
198 | } | 198 | } | ||
199 | 199 | | |||
200 | void Module::loadHardware() | 200 | void Module::loadHardware() | ||
201 | { | 201 | { | ||
202 | struct utsname utsName; | 202 | struct utsname utsName; | ||
203 | if(uname(&utsName) != 0) { | 203 | if(uname(&utsName) != 0) { | ||
204 | ui->kernel->hide(); | 204 | ui->kernel->hide(); | ||
205 | ui->kernelLabel->hide(); | 205 | ui->kernelLabel->hide(); | ||
▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines |