Commit 35e5f636 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Modernize code

parent 236327d4
Pipeline #60487 passed with stage
in 3 minutes and 54 seconds
......@@ -47,7 +47,7 @@ Core::Core(QWidget *parent, Qt::WindowFlags f)
: KParts::MainWindow(parent, f)
, d(new Private(this))
{
QTimer *timer = new QTimer(this);
auto timer = new QTimer(this);
connect(timer, &QTimer::timeout, this, [this]() {
d->checkNewDay();
});
......
......@@ -324,7 +324,7 @@ void Plugin::bringToForeground()
#ifdef Q_OS_WIN
activateWindowForProcess(d->executableName);
#else
KIO::CommandLauncherJob *job = new KIO::CommandLauncherJob(d->executableName);
auto job = new KIO::CommandLauncherJob(d->executableName);
job->start();
#endif
}
......
......@@ -68,15 +68,15 @@ int Summary::summaryHeight() const
QWidget *Summary::createHeader(QWidget *parent, const QString &iconname, const QString &heading)
{
QWidget *box = new QWidget(parent);
QHBoxLayout *hbox = new QHBoxLayout(box);
auto box = new QWidget(parent);
auto hbox = new QHBoxLayout(box);
hbox->setContentsMargins(0, 0, 0, 0);
hbox->setSpacing(0);
box->setAutoFillBackground(true);
QIcon icon = QIcon::fromTheme(iconname);
QLabel *label = new QLabel(box);
auto label = new QLabel(box);
hbox->addWidget(label);
label->setPixmap(icon.pixmap(style()->pixelMetric(QStyle::PM_ToolBarIconSize)));
......@@ -116,7 +116,7 @@ void Summary::mousePressEvent(QMouseEvent *event)
void Summary::mouseMoveEvent(QMouseEvent *event)
{
if ((event->buttons() & Qt::LeftButton) && (event->pos() - d->mDragStartPoint).manhattanLength() > 4) {
QDrag *drag = new QDrag(this);
auto drag = new QDrag(this);
drag->setMimeData(new SummaryMimeData());
drag->setObjectName(QStringLiteral("SummaryWidgetDrag"));
......
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