Commit 0998d679 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Fix some coding style issues in FilteredDisplay

parent deb00b61
......@@ -21,22 +21,22 @@ public:
FilteredDisplay *q;
static bool globalFilterCallback(const wl_client *client, const wl_global *global, void *data)
{
auto t = static_cast<FilteredDisplay::Private*>(data);
auto clientConnection = t->q->getConnection(const_cast<wl_client*>(client));
auto t = static_cast<FilteredDisplay::Private *>(data);
auto clientConnection = t->q->getConnection(const_cast<wl_client *>(client));
auto interface = wl_global_get_interface(global);
auto name = QByteArray::fromRawData(interface->name, strlen(interface->name));
return t->q->allowInterface(clientConnection, name);
};
};
FilteredDisplay::Private::Private(FilteredDisplay *_q):
q(_q)
{}
FilteredDisplay::Private::Private(FilteredDisplay *_q)
: q(_q)
{
}
FilteredDisplay::FilteredDisplay(QObject *parent):
Display(parent),
d(new Private(this))
FilteredDisplay::FilteredDisplay(QObject *parent)
: Display(parent)
, d(new Private(this))
{
connect(this, &Display::runningChanged, [this](bool running) {
if (!running) {
......
......@@ -14,25 +14,25 @@ namespace KWaylandServer
{
/**
* 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.
*/
* 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.
*/
class KWAYLANDSERVER_EXPORT FilteredDisplay : public Display
{
Q_OBJECT
public:
FilteredDisplay(QObject *parent);
~FilteredDisplay();
/**
* 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,
* and any manual attempts to bind will fail
*
* @return true if the client should be able to access the global with the following interfaceName
*/
~FilteredDisplay() override;
/**
* 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,
* and any manual attempts to bind will fail
*
* @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;
private:
class Private;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment