X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/36a816d7a63c58ead01002db59c2cf8862c72c97..be51e7233294263e3c2866e101e1151dbc61ccbe:/src/panels/panel.cpp diff --git a/src/panels/panel.cpp b/src/panels/panel.cpp index 14b7c0230..e13684922 100644 --- a/src/panels/panel.cpp +++ b/src/panels/panel.cpp @@ -1,30 +1,16 @@ -/*************************************************************************** - * Copyright (C) 2006 by Cvetoslav Ludmiloff * - * Copyright (C) 2006-2010 by Peter Penz * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ +/* + * SPDX-FileCopyrightText: 2006 Cvetoslav Ludmiloff + * SPDX-FileCopyrightText: 2006-2010 Peter Penz + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "panel.h" -#include -Panel::Panel(QWidget* parent) : - QWidget(parent), - m_url(), - m_customContextMenuActions() +Panel::Panel(QWidget *parent) + : QWidget(parent) + , m_url() + , m_customContextMenuActions() { } @@ -32,17 +18,17 @@ Panel::~Panel() { } -KUrl Panel::url() const +QUrl Panel::url() const { return m_url; } -void Panel::setCustomContextMenuActions(const QList& actions) +void Panel::setCustomContextMenuActions(const QList &actions) { m_customContextMenuActions = actions; } -QList Panel::customContextMenuActions() const +QList Panel::customContextMenuActions() const { return m_customContextMenuActions; } @@ -57,23 +43,21 @@ QSize Panel::sizeHint() const return QSize(180, 180); } -void Panel::setUrl(const KUrl& url) +void Panel::setUrl(const QUrl &url) { - if (url.equals(m_url, KUrl::CompareWithoutTrailingSlash)) { + if (url.matches(m_url, QUrl::StripTrailingSlash)) { return; } - const KUrl oldUrl = m_url; + const QUrl oldUrl = m_url; m_url = url; - const bool accepted = urlChanged(); - if (!accepted) { + if (!urlChanged()) { m_url = oldUrl; } } void Panel::readSettings() { - } -#include "panel.moc" +#include "moc_panel.cpp"