Commit fb71ced9 authored by Méven Car's avatar Méven Car

Remove use of deprecated KDialog, fix two warnings

Test Plan: No UI changes

Reviewers: #plasma, ervin

Reviewed By: ervin

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26970
parent 962ac2d8
......@@ -44,7 +44,6 @@
#include <QDebug>
#include <kprocess.h>
#include <kmessagebox.h>
#include <kdialog.h>
#include <kconfig.h>
#include <kcolorscheme.h>
#include <ksystemtimezone.h>
......@@ -93,7 +92,7 @@ Dtime::Dtime(QWidget * parent, bool haveTimeDated):
kclock->setMinimumSize(150,150);
v2->addWidget( kclock );
v2->addSpacing( KDialog::spacingHint() );
v2->addSpacing( style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing) );
QHBoxLayout *v3 = new QHBoxLayout( );
v2->addLayout( v3 );
......@@ -427,7 +426,7 @@ void Kclock::paintInterface(QPainter *p, const QRect &rect)
// paint face and glass cache
QRect faceRect = m_faceCache.rect();
QRect targetRect = QRect(QPoint(0, 0), QSize(m_faceCache.width() / devicePixelRatioF(), m_faceCache.height() / devicePixelRatioF()));
QRect targetRect = QRect(QPoint(0, 0), QSize(qRound(m_faceCache.width() / devicePixelRatioF()), qRound(m_faceCache.height() / devicePixelRatioF())));
if (m_repaintCache == RepaintAll) {
m_faceCache.fill(Qt::transparent);
......
......@@ -29,7 +29,6 @@
#include <QDBusConnection>
#include <kaboutdata.h>
#include <kdialog.h>
#include <kpluginfactory.h>
#include <kpluginloader.h>
#include <kmessagebox.h>
......@@ -76,7 +75,7 @@ KclockModule::KclockModule(QWidget *parent, const QVariantList &)
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(KDialog::spacingHint());
layout->setSpacing(style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing) );
dtime = new Dtime(this, m_haveTimedated);
layout->addWidget(dtime);
......
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