Commit 9b207261 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

[kstyle] Drop Helper::connection()

Summary:
Since Qt 4 style plugin had been dropped, we can use QX11Info::connection()
directly.

Reviewers: hpereiradacosta

Reviewed By: hpereiradacosta

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D27000
parent e7e84c6d
......@@ -28,6 +28,10 @@
#include <QApplication>
#include <QPainter>
#if BREEZE_HAVE_X11
#include <QX11Info>
#endif
#include <algorithm>
namespace Breeze
......@@ -1575,8 +1579,8 @@ namespace Breeze
if( isX11() )
{
// direct call to X
xcb_get_selection_owner_cookie_t cookie( xcb_get_selection_owner( connection(), _compositingManagerAtom ) );
ScopedPointer<xcb_get_selection_owner_reply_t> reply( xcb_get_selection_owner_reply( connection(), cookie, nullptr ) );
xcb_get_selection_owner_cookie_t cookie( xcb_get_selection_owner( QX11Info::connection(), _compositingManagerAtom ) );
ScopedPointer<xcb_get_selection_owner_reply_t> reply( xcb_get_selection_owner_reply( QX11Info::connection(), cookie, nullptr ) );
return reply && reply->owner;
}
......@@ -1608,20 +1612,13 @@ namespace Breeze
#if BREEZE_HAVE_X11
//____________________________________________________________________
xcb_connection_t* Helper::connection()
{
return QX11Info::connection();
}
//____________________________________________________________________
xcb_atom_t Helper::createAtom( const QString& name ) const
{
if( isX11() )
{
xcb_connection_t* connection( Helper::connection() );
xcb_connection_t* connection( QX11Info::connection() );
xcb_intern_atom_cookie_t cookie( xcb_intern_atom( connection, false, name.size(), qPrintable( name ) ) );
ScopedPointer<xcb_intern_atom_reply_t> reply( xcb_intern_atom_reply( connection, cookie, nullptr) );
return reply ? reply->atom:0;
......
......@@ -32,7 +32,6 @@
#include <QWidget>
#if BREEZE_HAVE_X11
#include <QX11Info>
#include <xcb/xcb.h>
#endif
......@@ -294,9 +293,6 @@ namespace Breeze
#if BREEZE_HAVE_X11
//* get xcb connection
static xcb_connection_t* connection();
//* create xcb atom
xcb_atom_t createAtom( const QString& ) const;
......
......@@ -846,7 +846,7 @@ namespace Breeze
{
#if BREEZE_HAVE_X11
// connection
auto connection( Helper::connection() );
auto connection( QX11Info::connection() );
auto net_connection = connection;
const qreal dpiRatio = window->devicePixelRatio();
......
Markdown is supported
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