Merge branch 'master' of ssh://github.com/fluxer/kdelibs into devinfo

This commit is contained in:
Ivailo Monev 2021-11-03 16:06:42 +02:00
commit c323c097d9
5 changed files with 29 additions and 2 deletions

View file

@ -31,4 +31,9 @@ Graphic::~Graphic()
{
}
QString Graphic::driver() const
{
return m_device->udevDevice().driver();
}
#include "moc_udevgraphic.cpp"

View file

@ -38,6 +38,8 @@ class Graphic : public DeviceInterface, virtual public Solid::Ifaces::Graphic
public:
Graphic(UDevDevice *device);
virtual ~Graphic();
virtual QString driver() const;
};
}
}

View file

@ -31,8 +31,14 @@ Solid::Graphic::Graphic(QObject *backendObject)
Solid::Graphic::~Graphic()
{
}
QString Solid::Graphic::driver() const
{
Q_D(const Graphic);
return_SOLID_CALL(Ifaces::Graphic *, d->backendObject(), QString(), driver());
}
#include "moc_graphic.cpp"

View file

@ -38,6 +38,7 @@ namespace Solid
class SOLID_EXPORT Graphic : public DeviceInterface
{
Q_OBJECT
Q_PROPERTY(QString driver READ driver)
Q_DECLARE_PRIVATE(Graphic)
friend class Device;
@ -58,7 +59,6 @@ namespace Solid
*/
virtual ~Graphic();
/**
* Get the Solid::DeviceInterface::Type of the Graphic device interface.
*
@ -66,6 +66,13 @@ namespace Solid
* @see Solid::DeviceInterface::Type
*/
static Type deviceInterfaceType() { return DeviceInterface::Graphic; }
/**
* Retrieves the driver used by the device.
*
* @return the driver name
*/
QString driver() const;
};
}

View file

@ -39,6 +39,13 @@ namespace Ifaces
* Destroys a Graphic object.
*/
virtual ~Graphic();
/**
* Retrieves the driver used by the device.
*
* @return the driver name
*/
virtual QString driver() const = 0;
};
}
}