1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-15 15:24:24 +03:00

update to latest panel shadows

This commit is contained in:
Michail Vourlakos 2018-08-30 13:40:34 +03:00
parent 7323068f36
commit 9e53fa727b
2 changed files with 10 additions and 8 deletions

View File

@ -46,7 +46,7 @@ public:
Private(PanelShadows *shadows) Private(PanelShadows *shadows)
: q(shadows) : q(shadows)
#if HAVE_X11 #if HAVE_X11
, _connection(0x0), , _connection(nullptr),
_gc(0x0) _gc(0x0)
, m_isX11(KWindowSystem::isPlatformX11()) , m_isX11(KWindowSystem::isPlatformX11())
#endif #endif
@ -160,7 +160,7 @@ void PanelShadows::removeWindow(const QWindow *window)
} }
d->m_windows.remove(window); d->m_windows.remove(window);
disconnect(window, 0, this, 0); disconnect(window, nullptr, this, nullptr);
d->clearShadow(window); d->clearShadow(window);
if (d->m_windows.isEmpty()) { if (d->m_windows.isEmpty()) {
@ -202,7 +202,7 @@ Qt::HANDLE PanelShadows::Private::createPixmap(const QPixmap &source)
{ {
// do nothing for invalid pixmaps // do nothing for invalid pixmaps
if (source.isNull()) return 0; if (source.isNull()) return nullptr;
/* /*
in some cases, pixmap handle is invalid. This is the case notably in some cases, pixmap handle is invalid. This is the case notably
@ -213,7 +213,7 @@ Qt::HANDLE PanelShadows::Private::createPixmap(const QPixmap &source)
#if HAVE_X11 #if HAVE_X11
if (!m_isX11) { if (!m_isX11) {
return 0; return nullptr;
} }
// check connection // check connection
@ -228,7 +228,7 @@ Qt::HANDLE PanelShadows::Private::createPixmap(const QPixmap &source)
// check gc // check gc
if (!_gc) { if (!_gc) {
_gc = xcb_generate_id(_connection); _gc = xcb_generate_id(_connection);
xcb_create_gc(_connection, _gc, pixmap, 0, 0x0); xcb_create_gc(_connection, _gc, pixmap, 0, nullptr);
} }
// // create explicitly shared QPixmap from it // // create explicitly shared QPixmap from it
@ -752,3 +752,4 @@ void PanelShadows::Private::setupWaylandIntegration()
} }
#include "moc_panelshadows_p.cpp" #include "moc_panelshadows_p.cpp"

View File

@ -16,8 +16,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#ifndef PLASMA_PANELSHADOWS_P_H #ifndef PANELSHADOWS_P_H
#define PLASMA_PANELSHADOWS_P_H #define PANELSHADOWS_P_H
#include <QSet> #include <QSet>
@ -30,7 +30,7 @@ class PanelShadows : public Plasma::Svg
Q_OBJECT Q_OBJECT
public: public:
explicit PanelShadows(QObject *parent = 0, const QString &prefix = QStringLiteral("widgets/panel-background")); explicit PanelShadows(QObject *parent = nullptr, const QString &prefix = QStringLiteral("widgets/panel-background"));
~PanelShadows() override; ~PanelShadows() override;
static PanelShadows *self(); static PanelShadows *self();
@ -51,3 +51,4 @@ private:
}; };
#endif #endif