summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-04-18 20:41:06 +0000
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-04-18 20:41:06 +0000
commit142e058e79d37ea387aaf7b469cee7383ee35556 (patch)
tree57fdc51f870befb1d3d8eb6828d33cf394b1f36d /tdecore/tdehw
parent206f7c6eab92b1052bfecee42305ad9d3739b4ce (diff)
downloadtdelibs-142e058e79d37ea387aaf7b469cee7383ee35556.tar.gz
tdelibs-142e058e79d37ea387aaf7b469cee7383ee35556.zip
Add detailedFriendlyName methods to the TDE hardware manager
This breaks the ABI and relates to Bug 1666
Diffstat (limited to 'tdecore/tdehw')
-rw-r--r--tdecore/tdehw/tdegenericdevice.cpp4
-rw-r--r--tdecore/tdehw/tdegenericdevice.h8
-rw-r--r--tdecore/tdehw/tdestoragedevice.cpp4
-rw-r--r--tdecore/tdehw/tdestoragedevice.h7
4 files changed, 23 insertions, 0 deletions
diff --git a/tdecore/tdehw/tdegenericdevice.cpp b/tdecore/tdehw/tdegenericdevice.cpp
index 4e67ed6d6..8662e5e8e 100644
--- a/tdecore/tdehw/tdegenericdevice.cpp
+++ b/tdecore/tdehw/tdegenericdevice.cpp
@@ -334,4 +334,8 @@ TQString TDEGenericDevice::friendlyName() {
return m_friendlyName;
}
+TQString TDEGenericDevice::detailedFriendlyName() {
+ return friendlyName();
+}
+
#include "tdegenericdevice.moc"
diff --git a/tdecore/tdehw/tdegenericdevice.h b/tdecore/tdehw/tdegenericdevice.h
index f2abd5582..7536b44a7 100644
--- a/tdecore/tdehw/tdegenericdevice.h
+++ b/tdecore/tdehw/tdegenericdevice.h
@@ -78,6 +78,14 @@ class TDECORE_EXPORT TDEGenericDevice : public TQObject
virtual TQString friendlyName();
/**
+ * @return a TQString with a detailed friendly name
+ *
+ * In most cases this will return exactly the same string as friendlyName(), however
+ * for certain devices (e.g. disks) this method will provide additional information
+ */
+ virtual TQString detailedFriendlyName();
+
+ /**
* @return a TQString with the device bus name, if any
*/
TQString deviceBus();
diff --git a/tdecore/tdehw/tdestoragedevice.cpp b/tdecore/tdehw/tdestoragedevice.cpp
index 36712cb1e..b22996b88 100644
--- a/tdecore/tdehw/tdestoragedevice.cpp
+++ b/tdecore/tdehw/tdestoragedevice.cpp
@@ -538,6 +538,10 @@ TQString TDEStorageDevice::friendlyName() {
return friendlyDeviceType();
}
+TQString TDEStorageDevice::detailedFriendlyName() {
+ return TQString("%1 [%2]").arg(friendlyName()).arg(deviceNode());
+}
+
TQString TDEStorageDevice::friendlyDeviceType() {
TQString ret = i18n("Hard Disk Drive");
diff --git a/tdecore/tdehw/tdestoragedevice.h b/tdecore/tdehw/tdestoragedevice.h
index 1199510a4..b3a70763b 100644
--- a/tdecore/tdehw/tdestoragedevice.h
+++ b/tdecore/tdehw/tdestoragedevice.h
@@ -252,6 +252,13 @@ class TDECORE_EXPORT TDEStorageDevice : public TDEGenericDevice
TQString friendlyName();
/**
+ * @return a TQString with a detailed friendly name
+ *
+ * This method overrides TDEGenericDevice::detailedFriendlyName()
+ */
+ TQString detailedFriendlyName();
+
+ /**
* @return a TQString containing the friendly type name
*
* This method overrides TDEGenericDevice::friendlyDeviceType()