Fix some coding style issues in FilteredDisplay
This commit is contained in:
parent
ba4f796e24
commit
f119c9470d
2 changed files with 22 additions and 22 deletions
|
@ -21,22 +21,22 @@ public:
|
||||||
FilteredDisplay *q;
|
FilteredDisplay *q;
|
||||||
static bool globalFilterCallback(const wl_client *client, const wl_global *global, void *data)
|
static bool globalFilterCallback(const wl_client *client, const wl_global *global, void *data)
|
||||||
{
|
{
|
||||||
auto t = static_cast<FilteredDisplay::Private*>(data);
|
auto t = static_cast<FilteredDisplay::Private *>(data);
|
||||||
auto clientConnection = t->q->getConnection(const_cast<wl_client*>(client));
|
auto clientConnection = t->q->getConnection(const_cast<wl_client *>(client));
|
||||||
auto interface = wl_global_get_interface(global);
|
auto interface = wl_global_get_interface(global);
|
||||||
auto name = QByteArray::fromRawData(interface->name, strlen(interface->name));
|
auto name = QByteArray::fromRawData(interface->name, strlen(interface->name));
|
||||||
return t->q->allowInterface(clientConnection, name);
|
return t->q->allowInterface(clientConnection, name);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
FilteredDisplay::Private::Private(FilteredDisplay *_q):
|
FilteredDisplay::Private::Private(FilteredDisplay *_q)
|
||||||
q(_q)
|
: q(_q)
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
FilteredDisplay::FilteredDisplay(QObject *parent)
|
||||||
FilteredDisplay::FilteredDisplay(QObject *parent):
|
: Display(parent)
|
||||||
Display(parent),
|
, d(new Private(this))
|
||||||
d(new Private(this))
|
|
||||||
{
|
{
|
||||||
connect(this, &Display::runningChanged, [this](bool running) {
|
connect(this, &Display::runningChanged, [this](bool running) {
|
||||||
if (!running) {
|
if (!running) {
|
||||||
|
|
|
@ -14,25 +14,25 @@ namespace KWaylandServer
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Server Implementation that allows one to restrict which globals are available to which clients
|
* Server Implementation that allows one to restrict which globals are available to which clients
|
||||||
*
|
*
|
||||||
* Users of this class must implement the virtual @method allowInterface method.
|
* Users of this class must implement the virtual @method allowInterface method.
|
||||||
*/
|
*/
|
||||||
class KWAYLANDSERVER_EXPORT FilteredDisplay : public Display
|
class KWAYLANDSERVER_EXPORT FilteredDisplay : public Display
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
FilteredDisplay(QObject *parent);
|
FilteredDisplay(QObject *parent);
|
||||||
~FilteredDisplay();
|
~FilteredDisplay() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return whether the @arg client can see the interface with the given @arg interfaceName
|
* Return whether the @arg client can see the interface with the given @arg interfaceName
|
||||||
*
|
*
|
||||||
* When false will not see these globals for a given interface in the registry,
|
* When false will not see these globals for a given interface in the registry,
|
||||||
* and any manual attempts to bind will fail
|
* and any manual attempts to bind will fail
|
||||||
*
|
*
|
||||||
* @return true if the client should be able to access the global with the following interfaceName
|
* @return true if the client should be able to access the global with the following interfaceName
|
||||||
*/
|
*/
|
||||||
virtual bool allowInterface(ClientConnection *client, const QByteArray &interfaceName) = 0;
|
virtual bool allowInterface(ClientConnection *client, const QByteArray &interfaceName) = 0;
|
||||||
private:
|
private:
|
||||||
class Private;
|
class Private;
|
||||||
|
|
Loading…
Reference in a new issue