diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2016-09-05 17:45:54 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2016-09-05 17:45:54 -0500 |
commit | 3c8aaa46e757646f1971bc294a5a41a87ec25720 (patch) | |
tree | 7adfb8f55b3e34a37f62d5598b77d779f3b7a776 /kcontrol/hwmanager | |
parent | 6b95715d47d895ad37614a496942e1d554c0af1f (diff) | |
download | tdebase-3c8aaa46e757646f1971bc294a5a41a87ec25720.tar.gz tdebase-3c8aaa46e757646f1971bc294a5a41a87ec25720.zip |
Fix display of unknown attributes in device manager details dialog
Diffstat (limited to 'kcontrol/hwmanager')
-rw-r--r-- | kcontrol/hwmanager/devicepropsdlg.cpp | 26 | ||||
-rw-r--r-- | kcontrol/hwmanager/devicepropsdlgbase.ui | 2 |
2 files changed, 16 insertions, 12 deletions
diff --git a/kcontrol/hwmanager/devicepropsdlg.cpp b/kcontrol/hwmanager/devicepropsdlg.cpp index e4eb87a8f..60dc86477 100644 --- a/kcontrol/hwmanager/devicepropsdlg.cpp +++ b/kcontrol/hwmanager/devicepropsdlg.cpp @@ -363,17 +363,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 @@ -385,7 +389,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()); @@ -402,15 +406,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 504c5acbb..0ea911c71 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> |