From ae73a3d2d5452dc23ec29a0857109e6bdca0fee2 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Tue, 2 Nov 2021 15:29:05 +0200 Subject: [PATCH] solid: implement graphic interface interface named after graphics subsystem on Linux for reference: https://github.com/fluxer/kde-workspace/blob/2557dbff563014110261c589a4081f4fa21a763e/plasma/applets/system-monitor/hwinfo.cpp#L103 Signed-off-by: Ivailo Monev --- solid/solid/CMakeLists.txt | 4 ++ solid/solid/backends/fakehw/fakecomputer.xml | 8 +++ solid/solid/backends/fakehw/fakedevice.cpp | 4 ++ solid/solid/backends/fakehw/fakegraphic.cpp | 35 ++++++++++ solid/solid/backends/fakehw/fakegraphic.h | 46 +++++++++++++ solid/solid/backends/fakehw/fakemanager.cpp | 3 +- solid/solid/backends/udev/udevdevice.cpp | 11 +++ solid/solid/backends/udev/udevgraphic.cpp | 34 +++++++++ solid/solid/backends/udev/udevgraphic.h | 46 +++++++++++++ solid/solid/backends/udev/udevmanager.cpp | 13 +++- solid/solid/device.cpp | 6 +- solid/solid/deviceinterface.h | 3 +- solid/solid/graphic.cpp | 38 +++++++++++ solid/solid/graphic.h | 72 ++++++++++++++++++++ solid/solid/graphic_p.h | 36 ++++++++++ solid/solid/ifaces/graphic.cpp | 26 +++++++ solid/solid/ifaces/graphic.h | 48 +++++++++++++ solid/tests/solidhwtest.cpp | 1 + 18 files changed, 428 insertions(+), 6 deletions(-) create mode 100644 solid/solid/backends/fakehw/fakegraphic.cpp create mode 100644 solid/solid/backends/fakehw/fakegraphic.h create mode 100644 solid/solid/backends/udev/udevgraphic.cpp create mode 100644 solid/solid/backends/udev/udevgraphic.h create mode 100644 solid/solid/graphic.cpp create mode 100644 solid/solid/graphic.h create mode 100644 solid/solid/graphic_p.h create mode 100644 solid/solid/ifaces/graphic.cpp create mode 100644 solid/solid/ifaces/graphic.h diff --git a/solid/solid/CMakeLists.txt b/solid/solid/CMakeLists.txt index e69f7b80..5ba0015b 100644 --- a/solid/solid/CMakeLists.txt +++ b/solid/solid/CMakeLists.txt @@ -46,6 +46,7 @@ set(solid_LIB_SRCS powermanagement.cpp video.cpp smartcardreader.cpp + graphic.cpp ifaces/acadapter.cpp ifaces/audiointerface.cpp @@ -70,6 +71,7 @@ set(solid_LIB_SRCS ifaces/storageaccess.cpp ifaces/video.cpp ifaces/smartcardreader.cpp + ifaces/graphic.cpp backends/shared/rootdevice.cpp backends/fstab/fstabmanager.cpp @@ -110,6 +112,7 @@ if(ENABLE_TESTING) backends/fakehw/fakevideo.cpp backends/fakehw/fakevolume.cpp backends/fakehw/fakesmartcardreader.cpp + backends/fakehw/fakegraphic.cpp ) endif() @@ -137,6 +140,7 @@ if(UDEV_FOUND) backends/udev/udevstoragedrive.cpp backends/udev/udevbattery.cpp backends/udev/udevacadapter.cpp + backends/udev/udevgraphic.cpp backends/udev/udevqtclient.cpp backends/udev/udevqtdevice.cpp ) diff --git a/solid/solid/backends/fakehw/fakecomputer.xml b/solid/solid/backends/fakehw/fakecomputer.xml index c3d66bfe..e79964af 100644 --- a/solid/solid/backends/fakehw/fakecomputer.xml +++ b/solid/solid/backends/fakehw/fakecomputer.xml @@ -660,4 +660,12 @@ true /media/nfs + + + + GK107 [GeForce GT 640] + GK107 [GeForce GT 640] + NVIDIA Corporation + /org/kde/solid/fakehw/computer + diff --git a/solid/solid/backends/fakehw/fakedevice.cpp b/solid/solid/backends/fakehw/fakedevice.cpp index ff131037..b393b75e 100644 --- a/solid/solid/backends/fakehw/fakedevice.cpp +++ b/solid/solid/backends/fakehw/fakedevice.cpp @@ -38,6 +38,7 @@ #include "fakeaudiointerface.h" #include "fakedvbinterface.h" #include "fakesmartcardreader.h" +#include "fakegraphic.h" #include #include @@ -318,6 +319,9 @@ QObject *FakeDevice::createDeviceInterface(const Solid::DeviceInterface::Type &t case Solid::DeviceInterface::NetworkShare: iface = new FakeNetworkShare(this); break; + case Solid::DeviceInterface::Graphic: + iface = new FakeGraphic(this); + break; case Solid::DeviceInterface::Unknown: break; case Solid::DeviceInterface::Last: diff --git a/solid/solid/backends/fakehw/fakegraphic.cpp b/solid/solid/backends/fakehw/fakegraphic.cpp new file mode 100644 index 00000000..602cb823 --- /dev/null +++ b/solid/solid/backends/fakehw/fakegraphic.cpp @@ -0,0 +1,35 @@ +/* + Copyright 2021 Ivailo Monev + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) version 3, or any + later version accepted by the membership of KDE e.V. (or its + successor approved by the membership of KDE e.V.), which shall + act as a proxy defined in Section 6 of version 3 of the license. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library. If not, see . +*/ + +#include "fakegraphic.h" + +using namespace Solid::Backends::Fake; + +FakeGraphic::FakeGraphic(FakeDevice *device) + : FakeDeviceInterface(device) +{ + +} + +FakeGraphic::~FakeGraphic() +{ + +} +#include "backends/fakehw/moc_fakegraphic.cpp" diff --git a/solid/solid/backends/fakehw/fakegraphic.h b/solid/solid/backends/fakehw/fakegraphic.h new file mode 100644 index 00000000..be29c35c --- /dev/null +++ b/solid/solid/backends/fakehw/fakegraphic.h @@ -0,0 +1,46 @@ +/* + Copyright 2021 Ivailo Monev + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) version 3, or any + later version accepted by the membership of KDE e.V. (or its + successor approved by the membership of KDE e.V.), which shall + act as a proxy defined in Section 6 of version 3 of the license. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library. If not, see . +*/ + +#ifndef SOLID_BACKENDS_FAKEHW_FAKEGRAPHIC_H +#define SOLID_BACKENDS_FAKEHW_FAKEGRAPHIC_H + +#include "fakedeviceinterface.h" +#include + +namespace Solid +{ +namespace Backends +{ +namespace Fake +{ +class FakeGraphic : public FakeDeviceInterface, virtual public Solid::Ifaces::Graphic +{ + Q_OBJECT + Q_INTERFACES(Solid::Ifaces::Graphic) + +public: + explicit FakeGraphic(FakeDevice *device); + ~FakeGraphic(); +}; +} +} +} + +#endif // SOLID_BACKENDS_FAKEHW_FAKEGRAPHIC_H diff --git a/solid/solid/backends/fakehw/fakemanager.cpp b/solid/solid/backends/fakehw/fakemanager.cpp index a16f736a..d44cba20 100644 --- a/solid/solid/backends/fakehw/fakemanager.cpp +++ b/solid/solid/backends/fakehw/fakemanager.cpp @@ -72,7 +72,8 @@ FakeManager::FakeManager(QObject *parent, const QString &xmlFile) << Solid::DeviceInterface::Video << Solid::DeviceInterface::SerialInterface << Solid::DeviceInterface::SmartCardReader - << Solid::DeviceInterface::NetworkShare; + << Solid::DeviceInterface::NetworkShare + << Solid::DeviceInterface::Graphic; } FakeManager::~FakeManager() diff --git a/solid/solid/backends/udev/udevdevice.cpp b/solid/solid/backends/udev/udevdevice.cpp index 6dc4861b..6fed5037 100644 --- a/solid/solid/backends/udev/udevdevice.cpp +++ b/solid/solid/backends/udev/udevdevice.cpp @@ -35,6 +35,7 @@ #include "udevserialinterface.h" #include "udevnetworkinterface.h" #include "udevbutton.h" +#include "udevgraphic.h" #include "udevmanager.h" #include "cpuinfo.h" #include "../shared/pciidstables.h" @@ -288,6 +289,8 @@ QString UDevDevice::icon() const return QLatin1String("modem"); } else if (queryDeviceInterface(Solid::DeviceInterface::Button)) { return QLatin1String("insert-button"); + } else if (queryDeviceInterface(Solid::DeviceInterface::Graphic)) { + return QLatin1String("video-display"); } return QString(); @@ -472,6 +475,8 @@ QString UDevDevice::description() const return QObject::tr("Unknown Button"); } return QString(); + } else if (queryDeviceInterface(Solid::DeviceInterface::Graphic)) { + return QString("Video display"); } return QString(); @@ -526,6 +531,9 @@ bool UDevDevice::queryDeviceInterface(const Solid::DeviceInterface::Type &type) case Solid::DeviceInterface::Button: return deviceProperty("ID_INPUT_KEY").toInt() == 1; + case Solid::DeviceInterface::Graphic: + return deviceProperty("PCI_CLASS").toInt() == 30000; + default: return false; } @@ -590,6 +598,9 @@ QObject *UDevDevice::createDeviceInterface(const Solid::DeviceInterface::Type &t case Solid::DeviceInterface::Button: return new Button(this); + case Solid::DeviceInterface::Graphic: + return new Graphic(this); + default: qFatal("Shouldn't happen"); return 0; diff --git a/solid/solid/backends/udev/udevgraphic.cpp b/solid/solid/backends/udev/udevgraphic.cpp new file mode 100644 index 00000000..dece5afc --- /dev/null +++ b/solid/solid/backends/udev/udevgraphic.cpp @@ -0,0 +1,34 @@ +/* + Copyright 2021 Ivailo Monev + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) version 3, or any + later version accepted by the membership of KDE e.V. (or its + successor approved by the membership of KDE e.V.), which shall + act as a proxy defined in Section 6 of version 3 of the license. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library. If not, see . +*/ + +#include "udevgraphic.h" + +using namespace Solid::Backends::UDev; + +Graphic::Graphic(UDevDevice *device) + : DeviceInterface(device) +{ +} + +Graphic::~Graphic() +{ +} + +#include "moc_udevgraphic.cpp" diff --git a/solid/solid/backends/udev/udevgraphic.h b/solid/solid/backends/udev/udevgraphic.h new file mode 100644 index 00000000..f13ee2d2 --- /dev/null +++ b/solid/solid/backends/udev/udevgraphic.h @@ -0,0 +1,46 @@ +/* + Copyright 2021 Ivailo Monev + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) version 3, or any + later version accepted by the membership of KDE e.V. (or its + successor approved by the membership of KDE e.V.), which shall + act as a proxy defined in Section 6 of version 3 of the license. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library. If not, see . +*/ + +#ifndef SOLID_BACKENDS_UDEV_UDEVGRAPHIC_H +#define SOLID_BACKENDS_UDEV_UDEVGRAPHIC_H + +#include +#include "udevdeviceinterface.h" + +namespace Solid +{ +namespace Backends +{ +namespace UDev +{ +class Graphic : public DeviceInterface, virtual public Solid::Ifaces::Graphic +{ + Q_OBJECT + Q_INTERFACES(Solid::Ifaces::Graphic) + +public: + Graphic(UDevDevice *device); + virtual ~Graphic(); +}; +} +} +} + +#endif // SOLID_BACKENDS_UDEV_UDEVGRAPHIC_H diff --git a/solid/solid/backends/udev/udevmanager.cpp b/solid/solid/backends/udev/udevmanager.cpp index 15cdeb40..3b1d773b 100644 --- a/solid/solid/backends/udev/udevmanager.cpp +++ b/solid/solid/backends/udev/udevmanager.cpp @@ -60,7 +60,8 @@ UDevManager::Private::Private() << "video4linux" << "net" << "usb" - << "input"; + << "input" + << "pci"; m_client = new UdevQt::Client(subsystems); } @@ -111,7 +112,7 @@ bool UDevManager::Private::checkOfInterest(const UdevQt::Device &device) return (sysfsDir.exists("sysdev") || sysfsDir.exists("cpufreq") || sysfsDir.exists("topology/core_id")); } if (device.subsystem() == QLatin1String("sound") && - device.deviceProperty("SOUND_FORM_FACTOR") != "internal") { + device.deviceProperty("SOUND_FORM_FACTOR") != "internal") { return true; } @@ -126,6 +127,11 @@ bool UDevManager::Private::checkOfInterest(const UdevQt::Device &device) } } + if (device.subsystem() == QLatin1String("pci")) { + const QString pciclass = device.deviceProperty("PCI_CLASS"); + return (pciclass == QLatin1String("30000")); // VGA controller + } + if (device.subsystem() == QLatin1String("input")) { const QStringList deviceProperties = device.deviceProperties(); return (device.deviceProperty("ID_INPUT_KEY").toInt() == 1 && (deviceProperties.contains("KEY") || deviceProperties.contains("SW"))); @@ -164,7 +170,8 @@ UDevManager::UDevManager(QObject *parent) << Solid::DeviceInterface::DvbInterface << Solid::DeviceInterface::Block << Solid::DeviceInterface::Video - << Solid::DeviceInterface::Button; + << Solid::DeviceInterface::Button + << Solid::DeviceInterface::Graphic; } UDevManager::~UDevManager() diff --git a/solid/solid/device.cpp b/solid/solid/device.cpp index eae80103..6178cc22 100644 --- a/solid/solid/device.cpp +++ b/solid/solid/device.cpp @@ -68,7 +68,8 @@ #include #include #include - +#include +#include Solid::Device::Device(const QString &udi) { @@ -238,6 +239,9 @@ const Solid::DeviceInterface *Solid::Device::asDeviceInterface(const DeviceInter case DeviceInterface::NetworkShare: iface = deviceinterface_cast(Ifaces::NetworkShare, NetworkShare, dev_iface); break; + case DeviceInterface::Graphic: + iface = deviceinterface_cast(Ifaces::Graphic, Graphic, dev_iface); + break; case DeviceInterface::Unknown: case DeviceInterface::Last: break; diff --git a/solid/solid/deviceinterface.h b/solid/solid/deviceinterface.h index 9402d721..d8d7485b 100644 --- a/solid/solid/deviceinterface.h +++ b/solid/solid/deviceinterface.h @@ -62,6 +62,7 @@ namespace Solid * - SerialInterface: A serial interface * - SmartCardReader: A smart card reader interface * - NetworkShare: A network share interface + * - Graphic: A graphic interface */ enum Type { Unknown = 0, GenericInterface = 1, Processor = 2, Block = 3, StorageAccess = 4, StorageDrive = 5, @@ -70,7 +71,7 @@ namespace Solid NetworkInterface = 11, AcAdapter = 12, Battery = 13, Button = 14, AudioInterface = 15, DvbInterface = 16, Video = 17, SerialInterface = 18, SmartCardReader = 19, NetworkShare = 20, - Last = 0xffff }; + Graphic = 21, Last = 0xffff }; /** * Destroys a DeviceInterface object. diff --git a/solid/solid/graphic.cpp b/solid/solid/graphic.cpp new file mode 100644 index 00000000..a835eda4 --- /dev/null +++ b/solid/solid/graphic.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2021 Ivailo Monev + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) version 3, or any + later version accepted by the membership of KDE e.V. (or its + successor approved by the membership of KDE e.V.), which shall + act as a proxy defined in Section 6 of version 3 of the license. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library. If not, see . +*/ + +#include "graphic.h" +#include "graphic_p.h" + +#include "soliddefs_p.h" +#include + +Solid::Graphic::Graphic(QObject *backendObject) + : DeviceInterface(*new GraphicPrivate(), backendObject) +{ +} + +Solid::Graphic::~Graphic() +{ + +} + +#include "moc_graphic.cpp" + diff --git a/solid/solid/graphic.h b/solid/solid/graphic.h new file mode 100644 index 00000000..0e17f843 --- /dev/null +++ b/solid/solid/graphic.h @@ -0,0 +1,72 @@ +/* + Copyright 2021 Ivailo Monev + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) version 3, or any + later version accepted by the membership of KDE e.V. (or its + successor approved by the membership of KDE e.V.), which shall + act as a proxy defined in Section 6 of version 3 of the license. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library. If not, see . +*/ + +#ifndef SOLID_GRAPHIC_H +#define SOLID_GRAPHIC_H + +#include + +#include + +namespace Solid +{ + class GraphicPrivate; + class Device; + + /** + * This device interface is available on graphic devices. + * + * A graphic device is typically used to render and output data to display. + */ + class SOLID_EXPORT Graphic : public DeviceInterface + { + Q_OBJECT + Q_DECLARE_PRIVATE(Graphic) + friend class Device; + + private: + /** + * Creates a new Graphic object. + * You generally won't need this. It's created when necessary using + * Device::as(). + * + * @param backendObject the device interface object provided by the backend + * @see Solid::Device::as() + */ + explicit Graphic(QObject *backendObject); + + public: + /** + * Destroys a Graphic object. + */ + virtual ~Graphic(); + + + /** + * Get the Solid::DeviceInterface::Type of the Graphic device interface. + * + * @return the Graphic device interface type + * @see Solid::DeviceInterface::Type + */ + static Type deviceInterfaceType() { return DeviceInterface::Graphic; } + }; +} + +#endif diff --git a/solid/solid/graphic_p.h b/solid/solid/graphic_p.h new file mode 100644 index 00000000..c67aeed1 --- /dev/null +++ b/solid/solid/graphic_p.h @@ -0,0 +1,36 @@ +/* + Copyright 2021 Ivailo Monev + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) version 3, or any + later version accepted by the membership of KDE e.V. (or its + successor approved by the membership of KDE e.V.), which shall + act as a proxy defined in Section 6 of version 3 of the license. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library. If not, see . +*/ + +#ifndef SOLID_GRAPHIC_P_H +#define SOLID_GRAPHIC_P_H + +#include "deviceinterface_p.h" + +namespace Solid +{ + class GraphicPrivate : public DeviceInterfacePrivate + { + public: + GraphicPrivate() + : DeviceInterfacePrivate() { } + }; +} + +#endif diff --git a/solid/solid/ifaces/graphic.cpp b/solid/solid/ifaces/graphic.cpp new file mode 100644 index 00000000..53f4eb84 --- /dev/null +++ b/solid/solid/ifaces/graphic.cpp @@ -0,0 +1,26 @@ +/* + Copyright 2021 Ivailo Monev + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) version 3, or any + later version accepted by the membership of KDE e.V. (or its + successor approved by the membership of KDE e.V.), which shall + act as a proxy defined in Section 6 of version 3 of the license. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library. If not, see . +*/ + +#include "graphic.h" + +Solid::Ifaces::Graphic::~Graphic() +{ +} + diff --git a/solid/solid/ifaces/graphic.h b/solid/solid/ifaces/graphic.h new file mode 100644 index 00000000..64dfea17 --- /dev/null +++ b/solid/solid/ifaces/graphic.h @@ -0,0 +1,48 @@ +/* + Copyright 2021 Ivailo Monev + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) version 3, or any + later version accepted by the membership of KDE e.V. (or its + successor approved by the membership of KDE e.V.), which shall + act as a proxy defined in Section 6 of version 3 of the license. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library. If not, see . +*/ + +#ifndef SOLID_IFACES_GRAPHIC_H +#define SOLID_IFACES_GRAPHIC_H + +#include + +namespace Solid +{ +namespace Ifaces +{ + /** + * This device interface is available on graphic devices. + * + * A graphic device is typically used to render and output data to display. + */ + class Graphic : virtual public DeviceInterface + { + public: + /** + * Destroys a Graphic object. + */ + virtual ~Graphic(); + }; +} +} + +Q_DECLARE_INTERFACE(Solid::Ifaces::Graphic, "org.kde.Solid.Ifaces.Graphic/0.1") + +#endif diff --git a/solid/tests/solidhwtest.cpp b/solid/tests/solidhwtest.cpp index 8ce8c613..91397f17 100644 --- a/solid/tests/solidhwtest.cpp +++ b/solid/tests/solidhwtest.cpp @@ -290,6 +290,7 @@ void SolidHwTest::testDeviceInterfaceIntrospection_data() QTest::newRow("DeviceInterface: Battery") << "Battery" << (int)Solid::DeviceInterface::Battery; QTest::newRow("DeviceInterface: Button") << "Button" << (int)Solid::DeviceInterface::Button; QTest::newRow("DeviceInterface: AudioInterface") << "AudioInterface" << (int)Solid::DeviceInterface::AudioInterface; + QTest::newRow("DeviceInterface: Graphic") << "Graphic" << (int)Solid::DeviceInterface::Graphic; } void SolidHwTest::testDeviceInterfaceIntrospection()