summaryrefslogtreecommitdiffstats
path: root/kcontrol
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2016-09-05 17:45:54 -0500
committerSlávek Banko <[email protected]>2016-09-09 15:37:29 +0200
commite247f8d2e4d922e258b8999e6ae8467d6da9a730 (patch)
tree8bb9884a8d196b219a0718691debabb6da2970c9 /kcontrol
parent3453f5378a05976b2e196ee9ab24d9f1d42c02c0 (diff)
downloadtdebase-e247f8d2e4d922e258b8999e6ae8467d6da9a730.tar.gz
tdebase-e247f8d2e4d922e258b8999e6ae8467d6da9a730.zip
Fix display of unknown attributes in device manager details dialog
(cherry picked from commit 3c8aaa46e757646f1971bc294a5a41a87ec25720)
Diffstat (limited to 'kcontrol')
-rw-r--r--kcontrol/hwmanager/devicepropsdlg.cpp26
-rw-r--r--kcontrol/hwmanager/devicepropsdlgbase.ui2
2 files changed, 16 insertions, 12 deletions
diff --git a/kcontrol/hwmanager/devicepropsdlg.cpp b/kcontrol/hwmanager/devicepropsdlg.cpp
index aaa859c33..f64f35835 100644
--- a/kcontrol/hwmanager/devicepropsdlg.cpp
+++ b/kcontrol/hwmanager/devicepropsdlg.cpp
@@ -341,17 +341,21 @@ TQString assembleSwitchList(TDESwitchType::TDESwitchType switches) {
return (TDEEventDevice::friendlySwitchList(switches).join("<br>"));
}
+static TQString formatDisplayString(TQString input) {
+ return TQStyleSheet::escape(input);
+}
+
void DevicePropertiesDialog::populateDeviceInformation() {
if (m_device) {
base->labelDeviceType->setText(m_device->friendlyDeviceType());
base->iconDeviceType->setPixmap(m_device->icon(TDEIcon::SizeSmall));
- base->labelDeviceName->setText(m_device->friendlyName());
- base->labelDeviceNode->setText((m_device->deviceNode().isNull())?i18n("<none>"):m_device->deviceNode());
- base->labelSystemPath->setText(m_device->systemPath());
- base->labelSubsytemType->setText(m_device->subsystem());
- base->labelDeviceDriver->setText((m_device->deviceDriver().isNull())?i18n("<none>"):m_device->deviceDriver());
- base->labelDeviceClass->setText((m_device->PCIClass().isNull())?i18n("<n/a>"):m_device->PCIClass());
- base->labelModalias->setText((m_device->moduleAlias().isNull())?i18n("<none>"):m_device->moduleAlias());
+ base->labelDeviceName->setText(formatDisplayString(m_device->friendlyName()));
+ base->labelDeviceNode->setText(formatDisplayString((m_device->deviceNode().isNull())?i18n("<none>"):m_device->deviceNode()));
+ base->labelSystemPath->setText(formatDisplayString(m_device->systemPath()));
+ base->labelSubsytemType->setText(formatDisplayString(m_device->subsystem()));
+ base->labelDeviceDriver->setText(formatDisplayString((m_device->deviceDriver().isNull())?i18n("<none>"):m_device->deviceDriver()));
+ base->labelDeviceClass->setText(formatDisplayString((m_device->PCIClass().isNull())?i18n("<n/a>"):m_device->PCIClass()));
+ base->labelModalias->setText(formatDisplayString((m_device->moduleAlias().isNull())?i18n("<none>"):m_device->moduleAlias()));
// These might be redundant
#if 0
@@ -363,7 +367,7 @@ void DevicePropertiesDialog::populateDeviceInformation() {
base->labelVendorModel->hide();
base->stocklabelVendorModel->hide();
#endif
- base->labelSerialNumber->setText((m_device->serialNumber().isNull())?i18n("<unknown>"):m_device->serialNumber());
+ base->labelSerialNumber->setText(formatDisplayString((m_device->serialNumber().isNull())?i18n("<unknown>"):m_device->serialNumber()));
if (m_device->subsystem() == "pci") {
base->labelBusID->setText(m_device->busID());
@@ -380,15 +384,15 @@ void DevicePropertiesDialog::populateDeviceInformation() {
TQString mountPoint = sdevice->mountPath();
if (mountPoint == "") mountPoint = i18n("<none>");
- base->labelDiskMountpoint->setText(mountPoint);
+ base->labelDiskMountpoint->setText(formatDisplayString(mountPoint));
TQString fsName = sdevice->fileSystemName();
if (fsName == "") fsName = i18n("<unknown>");
- base->labelDiskFileSystemType->setText(fsName);
+ base->labelDiskFileSystemType->setText(formatDisplayString(fsName));
TQString volUUID = sdevice->diskUUID();
if (volUUID == "") volUUID = i18n("<none>");
- base->labelDiskUUID->setText(volUUID);
+ base->labelDiskUUID->setText(formatDisplayString(volUUID));
// Show status
TQString status_text = "<qt>";
diff --git a/kcontrol/hwmanager/devicepropsdlgbase.ui b/kcontrol/hwmanager/devicepropsdlgbase.ui
index 6d31c759e..7cfe80b68 100644
--- a/kcontrol/hwmanager/devicepropsdlgbase.ui
+++ b/kcontrol/hwmanager/devicepropsdlgbase.ui
@@ -50,7 +50,7 @@
<cstring>iconDeviceType</cstring>
</property>
</widget>
- <widget class="KActiveLabel" row="0" column="2" colspan="1">
+ <widget class="TQLabel" row="0" column="2" colspan="1">
<property name="name">
<cstring>labelDeviceType</cstring>
</property>