X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/a7692611315065b308cd8243563cc50d40bd0f71..6b1524e4ff115f9cbee93c3c14c09fb347885d56:/src/panels/panel.cpp diff --git a/src/panels/panel.cpp b/src/panels/panel.cpp index 767313445..9e62cc8e3 100644 --- a/src/panels/panel.cpp +++ b/src/panels/panel.cpp @@ -1,25 +1,11 @@ -/*************************************************************************** - * 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), @@ -32,7 +18,7 @@ Panel::~Panel() { } -KUrl Panel::url() const +QUrl Panel::url() const { return m_url; } @@ -57,16 +43,15 @@ 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; } }