diff options
Diffstat (limited to 'src')
276 files changed, 3046 insertions, 5162 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0708a2a30..a6178841d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -90,6 +90,8 @@ set(dolphinprivate_LIB_SRCS kitemviews/private/kitemlistviewanimation.cpp kitemviews/private/kitemlistviewlayouter.cpp kitemviews/private/kpixmapmodifier.cpp + kitemviews/private/ktwofingerswipe.cpp + kitemviews/private/ktwofingertap.cpp settings/applyviewpropsjob.cpp settings/viewmodes/viewmodesettings.cpp settings/viewpropertiesdialog.cpp @@ -376,22 +378,35 @@ kconfig_add_kcfg_files(kcm_dolphinservices_PART_SRCS kconfig_add_kcfg_files(kcm_dolphingeneral_PART_SRCS settings/dolphin_generalsettings.kcfgc) -add_library(kcm_dolphinviewmodes MODULE ${kcm_dolphinviewmodes_PART_SRCS}) -add_library(kcm_dolphinnavigation MODULE ${kcm_dolphinnavigation_PART_SRCS}) -add_library(kcm_dolphinservices MODULE ${kcm_dolphinservices_PART_SRCS}) -add_library(kcm_dolphingeneral MODULE ${kcm_dolphingeneral_PART_SRCS}) -target_link_libraries(kcm_dolphinviewmodes dolphinprivate) -target_link_libraries(kcm_dolphinnavigation dolphinprivate) -target_link_libraries(kcm_dolphinservices dolphinprivate) -target_link_libraries(kcm_dolphingeneral dolphinprivate) +if(NOT WIN32) + # The settings are still accessible from the hamburger menu + add_library(kcm_dolphinviewmodes MODULE ${kcm_dolphinviewmodes_PART_SRCS}) + add_library(kcm_dolphinnavigation MODULE ${kcm_dolphinnavigation_PART_SRCS}) + add_library(kcm_dolphinservices MODULE ${kcm_dolphinservices_PART_SRCS}) + add_library(kcm_dolphingeneral MODULE ${kcm_dolphingeneral_PART_SRCS}) -install(TARGETS kcm_dolphinviewmodes DESTINATION ${KDE_INSTALL_PLUGINDIR} ) -install(TARGETS kcm_dolphinnavigation DESTINATION ${KDE_INSTALL_PLUGINDIR} ) -install(TARGETS kcm_dolphinservices DESTINATION ${KDE_INSTALL_PLUGINDIR} ) -install(TARGETS kcm_dolphingeneral DESTINATION ${KDE_INSTALL_PLUGINDIR} ) + target_link_libraries(kcm_dolphinviewmodes dolphinprivate) + target_link_libraries(kcm_dolphinnavigation dolphinprivate) + target_link_libraries(kcm_dolphinservices dolphinprivate) + target_link_libraries(kcm_dolphingeneral dolphinprivate) -add_subdirectory(settings/services/servicemenuinstaller) + install( FILES org.kde.dolphin.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} ) + install( FILES settings/kcm/kcmdolphinviewmodes.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) + install( FILES settings/kcm/kcmdolphinnavigation.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) + install( FILES settings/kcm/kcmdolphinservices.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) + install( FILES settings/kcm/kcmdolphingeneral.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) + + install(TARGETS kcm_dolphinviewmodes DESTINATION ${KDE_INSTALL_PLUGINDIR} ) + install(TARGETS kcm_dolphinnavigation DESTINATION ${KDE_INSTALL_PLUGINDIR} ) + install(TARGETS kcm_dolphinservices DESTINATION ${KDE_INSTALL_PLUGINDIR} ) + install(TARGETS kcm_dolphingeneral DESTINATION ${KDE_INSTALL_PLUGINDIR} ) +endif() + +if(NOT WIN32) + add_subdirectory(settings/services/servicemenuinstaller) + install( FILES settings/services/servicemenu.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR} ) +endif() ########### install files ############### @@ -410,12 +425,6 @@ install( FILES settings/dolphin_directoryviewpropertysettings.kcfg settings/dolphin_detailsmodesettings.kcfg settings/dolphin_versioncontrolsettings.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR} ) -install( FILES org.kde.dolphin.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} ) -install( FILES settings/kcm/kcmdolphinviewmodes.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) -install( FILES settings/kcm/kcmdolphinnavigation.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) -install( FILES settings/kcm/kcmdolphinservices.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) -install( FILES settings/kcm/kcmdolphingeneral.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} ) -install( FILES settings/services/servicemenu.knsrc DESTINATION ${KDE_INSTALL_KNSRCDIR} ) if(BUILD_TESTING) find_package(Qt5Test ${QT_MIN_VERSION} CONFIG REQUIRED) diff --git a/src/dbusinterface.cpp b/src/dbusinterface.cpp index abdb3a0fe..cf1ad53ad 100644 --- a/src/dbusinterface.cpp +++ b/src/dbusinterface.cpp @@ -1,20 +1,7 @@ /* - * Copyright 2015 Ashish Bansal<[email protected]> + * SPDX-FileCopyrightText: 2015 Ashish Bansal <[email protected]> * - * 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-License-Identifier: GPL-2.0-or-later */ #include "dbusinterface.h" diff --git a/src/dbusinterface.h b/src/dbusinterface.h index c1029ea23..9b183384d 100644 --- a/src/dbusinterface.h +++ b/src/dbusinterface.h @@ -1,20 +1,7 @@ /* - * Copyright 2015 Ashish Bansal<[email protected]> + * SPDX-FileCopyrightText: 2015 Ashish Bansal <[email protected]> * - * 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-License-Identifier: GPL-2.0-or-later */ #ifndef DBUSINTERFACE_H diff --git a/src/dolphinbookmarkhandler.cpp b/src/dolphinbookmarkhandler.cpp index 0d31b8984..be4f447d8 100644 --- a/src/dolphinbookmarkhandler.cpp +++ b/src/dolphinbookmarkhandler.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2019 by David Hallas <[email protected]> * - * * - * 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: 2019 David Hallas <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinbookmarkhandler.h" #include "dolphinmainwindow.h" diff --git a/src/dolphinbookmarkhandler.h b/src/dolphinbookmarkhandler.h index bafef41f8..854c33534 100644 --- a/src/dolphinbookmarkhandler.h +++ b/src/dolphinbookmarkhandler.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2019 by David Hallas <[email protected]> * - * * - * 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: 2019 David Hallas <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINBOOKMARKHANDLER_H #define DOLPHINBOOKMARKHANDLER_H diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index 912caf859..d4807d3a7 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -1,22 +1,8 @@ - /*************************************************************************** - * Copyright (C) 2006 by Peter Penz ([email protected]) and * - * Cvetoslav Ludmiloff * - * * - * 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 Peter Penz ([email protected]) and Cvetoslav Ludmiloff + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphincontextmenu.h" @@ -392,7 +378,7 @@ void DolphinContextMenu::insertDefaultItemActions(const KFileItemListProperties& { const KActionCollection* collection = m_mainWindow->actionCollection(); - // Insert 'Cut', 'Copy', 'Copy location' and 'Paste' + // Insert 'Cut', 'Copy', 'Copy Location' and 'Paste' addAction(collection->action(KStandardAction::name(KStandardAction::Cut))); addAction(collection->action(KStandardAction::name(KStandardAction::Copy))); QAction* copyPathAction = collection->action(QString("copy_location")); diff --git a/src/dolphincontextmenu.h b/src/dolphincontextmenu.h index 3f36895ec..b93df2b61 100644 --- a/src/dolphincontextmenu.h +++ b/src/dolphincontextmenu.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz <[email protected]> * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINCONTEXTMENU_H #define DOLPHINCONTEXTMENU_H diff --git a/src/dolphindockwidget.cpp b/src/dolphindockwidget.cpp index 32d25702a..16f575583 100644 --- a/src/dolphindockwidget.cpp +++ b/src/dolphindockwidget.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2010 by Peter Penz <[email protected]> * - * * - * 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: 2010 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphindockwidget.h" diff --git a/src/dolphindockwidget.h b/src/dolphindockwidget.h index fd3882612..eaf66e45a 100644 --- a/src/dolphindockwidget.h +++ b/src/dolphindockwidget.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2010 by Peter Penz <[email protected]> * - * * - * 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: 2010 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHIN_DOCK_WIDGET_H #define DOLPHIN_DOCK_WIDGET_H diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index ab5dc4341..0fb953312 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz <[email protected]> * - * Copyright (C) 2006 by Stefan Monov <[email protected]> * - * Copyright (C) 2006 by Cvetoslav Ludmiloff <[email protected]> * - * * - * 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 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2006 Stefan Monov <[email protected]> + * SPDX-FileCopyrightText: 2006 Cvetoslav Ludmiloff <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinmainwindow.h" @@ -57,13 +44,13 @@ #include <KIO/CommandLauncherJob> #include <KIO/JobUiDelegate> #include <KIO/OpenFileManagerWindowJob> +#include <KIO/OpenUrlJob> #include <KJobWidgets> #include <KLocalizedString> #include <KMessageBox> #include <KNS3/KMoreToolsMenuFactory> #include <KProtocolInfo> #include <KProtocolManager> -#include <KRun> #include <KShell> #include <KStandardAction> #include <KStartupInfo> @@ -114,7 +101,7 @@ DolphinMainWindow::DolphinMainWindow() : m_bookmarkHandler(nullptr), m_controlButton(nullptr), m_updateToolBarTimer(nullptr), - m_lastHandleUrlStatJob(nullptr), + m_lastHandleUrlOpenJob(nullptr), m_terminalPanel(nullptr), m_placesPanel(nullptr), m_tearDownFromPlacesRequested(false), @@ -959,18 +946,6 @@ void DolphinMainWindow::toggleShowMenuBar() } } -QString DolphinMainWindow::activeContainerLocalPath() -{ - KIO::StatJob* statJob = KIO::mostLocalUrl(m_activeViewContainer->url()); - KJobWidgets::setWindow(statJob, this); - statJob->exec(); - QUrl url = statJob->mostLocalUrl(); - if (url.isLocalFile()) { - return url.toLocalFile(); - } - return QDir::homePath(); -} - QPointer<QAction> DolphinMainWindow::preferredSearchTool() { m_searchTools.clear(); @@ -1017,7 +992,31 @@ void DolphinMainWindow::openPreferredSearchTool() void DolphinMainWindow::openTerminal() { - KToolInvocation::invokeTerminal(QString(), activeContainerLocalPath()); + const QUrl url = m_activeViewContainer->url(); + + if (url.isLocalFile()) { + KToolInvocation::invokeTerminal(QString(), url.toLocalFile()); + return; + } + + // Not a local file, with protocol Class ":local", try stat'ing + if (KProtocolInfo::protocolClass(url.scheme()) == QLatin1String(":local")) { + KIO::StatJob *job = KIO::mostLocalUrl(url); + KJobWidgets::setWindow(job, this); + connect(job, &KJob::result, this, [job]() { + QUrl statUrl; + if (!job->error()) { + statUrl = job->mostLocalUrl(); + } + + KToolInvocation::invokeTerminal(QString(), statUrl.isLocalFile() ? statUrl.toLocalFile() : QDir::homePath()); + }); + + return; + } + + // Nothing worked, just use $HOME + KToolInvocation::invokeTerminal(QString(), QDir::homePath()); } void DolphinMainWindow::editSettings() @@ -1039,34 +1038,31 @@ void DolphinMainWindow::editSettings() void DolphinMainWindow::handleUrl(const QUrl& url) { - delete m_lastHandleUrlStatJob; - m_lastHandleUrlStatJob = nullptr; + delete m_lastHandleUrlOpenJob; + m_lastHandleUrlOpenJob = nullptr; if (url.isLocalFile() && QFileInfo(url.toLocalFile()).isDir()) { activeViewContainer()->setUrl(url); - } else if (KProtocolManager::supportsListing(url)) { - // stat the URL to see if it is a dir or not - m_lastHandleUrlStatJob = KIO::stat(url, KIO::HideProgressInfo); - if (m_lastHandleUrlStatJob->uiDelegate()) { - KJobWidgets::setWindow(m_lastHandleUrlStatJob, this); - } - connect(m_lastHandleUrlStatJob, &KIO::Job::result, - this, &DolphinMainWindow::slotHandleUrlStatFinished); - } else { - new KRun(url, this); // Automatically deletes itself after being finished - } -} + m_lastHandleUrlOpenJob = new KIO::OpenUrlJob(url); + m_lastHandleUrlOpenJob->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, this)); + m_lastHandleUrlOpenJob->setRunExecutables(true); -void DolphinMainWindow::slotHandleUrlStatFinished(KJob* job) -{ - m_lastHandleUrlStatJob = nullptr; - const KIO::UDSEntry entry = static_cast<KIO::StatJob*>(job)->statResult(); - const QUrl url = static_cast<KIO::StatJob*>(job)->url(); - if (entry.isDir()) { - activeViewContainer()->setUrl(url); - } else { - new KRun(url, this); // Automatically deletes itself after being finished + connect(m_lastHandleUrlOpenJob, &KIO::OpenUrlJob::mimeTypeFound, this, + [this, url](const QString &mimetype) { + if (mimetype == QLatin1String("inode/directory")) { + // If it's a dir, we'll take it from here + m_lastHandleUrlOpenJob->kill(); + m_lastHandleUrlOpenJob = nullptr; + activeViewContainer()->setUrl(url); + } + }); + + connect(m_lastHandleUrlOpenJob, &KIO::OpenUrlJob::result, this, [this]() { + m_lastHandleUrlOpenJob = nullptr; + }); + + m_lastHandleUrlOpenJob->start(); } } @@ -1368,20 +1364,20 @@ void DolphinMainWindow::setupActions() "action they are removed from their old location.") + cutCopyPastePara); QAction* copyToOtherViewAction = actionCollection()->addAction(QStringLiteral("copy_to_inactive_split_view")); - copyToOtherViewAction->setText(i18nc("@action:inmenu", "Copy to inactive split view")); + copyToOtherViewAction->setText(i18nc("@action:inmenu", "Copy to Inactive Split View")); copyToOtherViewAction->setWhatsThis(xi18nc("@info:whatsthis Copy", "This copies the selected items from " "the <emphasis>active</emphasis> view to the inactive split view.")); copyToOtherViewAction->setIcon(QIcon::fromTheme(QStringLiteral("edit-copy"))); - copyToOtherViewAction->setIconText(i18nc("@action:inmenu Edit", "Copy to inactive split view")); + copyToOtherViewAction->setIconText(i18nc("@action:inmenu Edit", "Copy to Inactive Split View")); actionCollection()->setDefaultShortcut(copyToOtherViewAction, Qt::SHIFT + Qt::Key_F5 ); connect(copyToOtherViewAction, &QAction::triggered, m_tabWidget, &DolphinTabWidget::copyToInactiveSplitView); QAction* moveToOtherViewAction = actionCollection()->addAction(QStringLiteral("move_to_inactive_split_view")); - moveToOtherViewAction->setText(i18nc("@action:inmenu", "Move to inactive split view")); + moveToOtherViewAction->setText(i18nc("@action:inmenu", "Move to Inactive Split View")); moveToOtherViewAction->setWhatsThis(xi18nc("@info:whatsthis Move", "This moves the selected items from " "the <emphasis>active</emphasis> view to the inactive split view.")); moveToOtherViewAction->setIcon(QIcon::fromTheme(QStringLiteral("edit-cut"))); - moveToOtherViewAction->setIconText(i18nc("@action:inmenu Edit", "Move to inactive split view")); + moveToOtherViewAction->setIconText(i18nc("@action:inmenu Edit", "Move to Inactive Split View")); actionCollection()->setDefaultShortcut(moveToOtherViewAction, Qt::SHIFT + Qt::Key_F6 ); connect(moveToOtherViewAction, &QAction::triggered, m_tabWidget, &DolphinTabWidget::moveToInactiveSplitView); @@ -1565,7 +1561,6 @@ void DolphinMainWindow::setupActions() actionCollection()->setDefaultShortcut(openPreferredSearchTool, Qt::CTRL + Qt::SHIFT + Qt::Key_F); connect(openPreferredSearchTool, &QAction::triggered, this, &DolphinMainWindow::openPreferredSearchTool); -#ifdef HAVE_TERMINAL if (KAuthorized::authorize(QStringLiteral("shell_access"))) { QAction* openTerminal = actionCollection()->addAction(QStringLiteral("open_terminal")); openTerminal->setText(i18nc("@action:inmenu Tools", "Open Terminal")); @@ -1576,13 +1571,14 @@ void DolphinMainWindow::setupActions() actionCollection()->setDefaultShortcut(openTerminal, Qt::SHIFT + Qt::Key_F4); connect(openTerminal, &QAction::triggered, this, &DolphinMainWindow::openTerminal); +#ifdef HAVE_TERMINAL QAction* focusTerminalPanel = actionCollection()->addAction(QStringLiteral("focus_terminal_panel")); focusTerminalPanel->setText(i18nc("@action:inmenu Tools", "Focus Terminal Panel")); focusTerminalPanel->setIcon(QIcon::fromTheme(QStringLiteral("swap-panels"))); actionCollection()->setDefaultShortcut(focusTerminalPanel, Qt::CTRL + Qt::SHIFT + Qt::Key_F4); connect(focusTerminalPanel, &QAction::triggered, this, &DolphinMainWindow::focusTerminalPanel); - } #endif + } // setup 'Bookmarks' menu KActionMenu *bookmarkMenu = new KActionMenu(i18nc("@title:menu", "&Bookmarks"), this); @@ -2114,6 +2110,8 @@ void DolphinMainWindow::connectViewSignals(DolphinViewContainer* container) this, &DolphinMainWindow::goForward); connect(view, &DolphinView::urlActivated, this, &DolphinMainWindow::handleUrl); + connect(view, &DolphinView::goUpRequested, + this, &DolphinMainWindow::goUp); const KUrlNavigator* navigator = container->urlNavigator(); connect(navigator, &KUrlNavigator::urlChanged, diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index dcd73c6a7..c03eb1be0 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz <[email protected]> * - * Copyright (C) 2006 by Stefan Monov <[email protected]> * - * Copyright (C) 2006 by Cvetoslav Ludmiloff <[email protected]> * - * * - * 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 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2006 Stefan Monov <[email protected]> + * SPDX-FileCopyrightText: 2006 Cvetoslav Ludmiloff <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHIN_MAINWINDOW_H #define DOLPHIN_MAINWINDOW_H @@ -25,7 +12,7 @@ #include "dolphintabwidget.h" #include <config-baloo.h> #include <kio/fileundomanager.h> -#include <ksortablelist.h> +#include <KSortableList> #include <kxmlguiwindow.h> #include <QIcon> @@ -54,6 +41,10 @@ class QIcon; class PlacesPanel; class TerminalPanel; +namespace KIO { + class OpenUrlJob; +} + /** * @short Main window for Dolphin. * @@ -433,12 +424,6 @@ private slots: void handleUrl(const QUrl& url); /** - * handleUrl() can trigger a stat job to see if the url can actually - * be listed. - */ - void slotHandleUrlStatFinished(KJob* job); - - /** * Is invoked when the write state of a folder has been changed and * enables/disables the "Create New..." menu entry. */ @@ -607,12 +592,6 @@ private: /** Adds "What's This?" texts to many widgets and StandardActions. */ void setupWhatsThis(); - /** - * Returns the KIO::StatJob::mostLocalUrl() for the active container URL - * if it's a local file. Otherwise returns the user's home path. - */ - QString activeContainerLocalPath(); - /** Returns preferred search tool as configured in "More Search Tools" menu. */ QPointer<QAction> preferredSearchTool(); @@ -644,7 +623,7 @@ private: QToolButton* m_controlButton; QTimer* m_updateToolBarTimer; - KIO::Job* m_lastHandleUrlStatJob; + KIO::OpenUrlJob *m_lastHandleUrlOpenJob; TerminalPanel* m_terminalPanel; PlacesPanel* m_placesPanel; diff --git a/src/dolphinnewfilemenu.cpp b/src/dolphinnewfilemenu.cpp index e6ad72078..bcfaebd57 100644 --- a/src/dolphinnewfilemenu.cpp +++ b/src/dolphinnewfilemenu.cpp @@ -1,22 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz * - * [email protected] * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinnewfilemenu.h" diff --git a/src/dolphinnewfilemenu.h b/src/dolphinnewfilemenu.h index b741df1c7..5b2cc5e75 100644 --- a/src/dolphinnewfilemenu.h +++ b/src/dolphinnewfilemenu.h @@ -1,23 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz * - * [email protected] * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINNEWFILEMENU_H #define DOLPHINNEWFILEMENU_H diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index 12c361011..5d4188151 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -1,20 +1,7 @@ /* This file is part of the KDE project - Copyright (c) 2007 David Faure <[email protected]> + SPDX-FileCopyrightText: 2007 David Faure <[email protected]> - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. + SPDX-License-Identifier: LGPL-2.0-or-later */ #include "dolphinpart.h" @@ -504,13 +491,38 @@ void DolphinPart::slotUnselectItemsMatchingPattern() void DolphinPart::openSelectionDialog(const QString& title, const QString& text, bool selectItems) { - bool okClicked; - const QString pattern = QInputDialog::getText(m_view, title, text, QLineEdit::Normal, QStringLiteral("*"), &okClicked); + auto *dialog = new QInputDialog(m_view); + dialog->setAttribute(Qt::WA_DeleteOnClose, true); + dialog->setInputMode(QInputDialog::TextInput); + dialog->setWindowTitle(title); + dialog->setLabelText(text); - if (okClicked && !pattern.isEmpty()) { - const QRegularExpression patternRegExp(QRegularExpression::wildcardToRegularExpression(pattern)); - m_view->selectItems(patternRegExp, selectItems); - } + const KConfigGroup group = KSharedConfig::openConfig("dolphinpartrc")->group("Select Dialog"); + dialog->setComboBoxEditable(true); + dialog->setComboBoxItems(group.readEntry("History", QStringList())); + + dialog->setTextValue(QStringLiteral("*")); + + connect(dialog, &QDialog::accepted, this, [=]() { + const QString pattern = dialog->textValue(); + if (!pattern.isEmpty()) { + QStringList items = dialog->comboBoxItems(); + items.removeAll(pattern); + items.prepend(pattern); + + // Need to evaluate this again here, because the captured value is const + // (even if the const were removed from 'const KConfigGroup group =' above). + KConfigGroup group = KSharedConfig::openConfig("dolphinpartrc")->group("Select Dialog"); + // Limit the size of the saved history. + group.writeEntry("History", items.mid(0, 10)); + group.sync(); + + const QRegularExpression patternRegExp(QRegularExpression::wildcardToRegularExpression(pattern)); + m_view->selectItems(patternRegExp, selectItems); + } + }); + + dialog->open(); } void DolphinPart::setCurrentViewMode(const QString& viewModeName) diff --git a/src/dolphinpart.h b/src/dolphinpart.h index fe8f2d14e..3d613c276 100644 --- a/src/dolphinpart.h +++ b/src/dolphinpart.h @@ -1,20 +1,7 @@ /* This file is part of the KDE project - Copyright (c) 2007 David Faure <[email protected]> + SPDX-FileCopyrightText: 2007 David Faure <[email protected]> - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. + SPDX-License-Identifier: LGPL-2.0-or-later */ #ifndef DOLPHINPART_H diff --git a/src/dolphinpart_ext.cpp b/src/dolphinpart_ext.cpp index 83dfddb16..164901483 100644 --- a/src/dolphinpart_ext.cpp +++ b/src/dolphinpart_ext.cpp @@ -1,20 +1,7 @@ /* This file is part of the KDE project - * Copyright (c) 2012 Dawit Alemayehu <[email protected]> + * SPDX-FileCopyrightText: 2012 Dawit Alemayehu <[email protected]> * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. + * SPDX-License-Identifier: LGPL-2.0-or-later */ #include "dolphinpart_ext.h" diff --git a/src/dolphinpart_ext.h b/src/dolphinpart_ext.h index f2e96d3d1..009bba9fe 100644 --- a/src/dolphinpart_ext.h +++ b/src/dolphinpart_ext.h @@ -1,20 +1,7 @@ /* This file is part of the KDE project - * Copyright (c) 2012 Dawit Alemayehu <[email protected]> + * SPDX-FileCopyrightText: 2012 Dawit Alemayehu <[email protected]> * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. + * SPDX-License-Identifier: LGPL-2.0-or-later */ #ifndef DOLPHINPART_EXT_H diff --git a/src/dolphinplacesmodelsingleton.cpp b/src/dolphinplacesmodelsingleton.cpp index 1020ba186..30ec1b9b6 100644 --- a/src/dolphinplacesmodelsingleton.cpp +++ b/src/dolphinplacesmodelsingleton.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2018 Kai Uwe Broulik <[email protected]> * - * * - * 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: 2018 Kai Uwe Broulik <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinplacesmodelsingleton.h" diff --git a/src/dolphinplacesmodelsingleton.h b/src/dolphinplacesmodelsingleton.h index 6bce25d16..645947aaa 100644 --- a/src/dolphinplacesmodelsingleton.h +++ b/src/dolphinplacesmodelsingleton.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2018 Kai Uwe Broulik <[email protected]> * - * * - * 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: 2018 Kai Uwe Broulik <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINPLACESMODELSINGLETON_H #define DOLPHINPLACESMODELSINGLETON_H diff --git a/src/dolphinrecenttabsmenu.cpp b/src/dolphinrecenttabsmenu.cpp index e85cedbf9..0a274fed8 100644 --- a/src/dolphinrecenttabsmenu.cpp +++ b/src/dolphinrecenttabsmenu.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2014 by Emmanuel Pescosta <[email protected]> * - * * - * 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: 2014 Emmanuel Pescosta <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinrecenttabsmenu.h" diff --git a/src/dolphinrecenttabsmenu.h b/src/dolphinrecenttabsmenu.h index 1d052b9b0..610735693 100644 --- a/src/dolphinrecenttabsmenu.h +++ b/src/dolphinrecenttabsmenu.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2014 by Emmanuel Pescosta <[email protected]> * - * * - * 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: 2014 Emmanuel Pescosta <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHIN_RECENT_TABS_MENU_H #define DOLPHIN_RECENT_TABS_MENU_H diff --git a/src/dolphinremoveaction.cpp b/src/dolphinremoveaction.cpp index 078aa3dd4..811ae73c2 100644 --- a/src/dolphinremoveaction.cpp +++ b/src/dolphinremoveaction.cpp @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2013 by Dawit Alemayehu <[email protected]> * - * Copyright (C) 2017 by Elvis Angelaccio <[email protected]> * - * * - * 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: 2013 Dawit Alemayehu <[email protected]> + * SPDX-FileCopyrightText: 2017 Elvis Angelaccio <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinremoveaction.h" diff --git a/src/dolphinremoveaction.h b/src/dolphinremoveaction.h index 9ea3406e8..7c3b49279 100644 --- a/src/dolphinremoveaction.h +++ b/src/dolphinremoveaction.h @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2013 by Dawit Alemayehu <[email protected]> * - * Copyright (C) 2017 by Elvis Angelaccio <[email protected]> * - * * - * 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: 2013 Dawit Alemayehu <[email protected]> + * SPDX-FileCopyrightText: 2017 Elvis Angelaccio <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINREMOVEACTION_H #define DOLPHINREMOVEACTION_H diff --git a/src/dolphintabbar.cpp b/src/dolphintabbar.cpp index fc52afff6..859865022 100644 --- a/src/dolphintabbar.cpp +++ b/src/dolphintabbar.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2014 by Emmanuel Pescosta <[email protected]> * - * * - * 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: 2014 Emmanuel Pescosta <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphintabbar.h" diff --git a/src/dolphintabbar.h b/src/dolphintabbar.h index 02270d0fc..88366c97c 100644 --- a/src/dolphintabbar.h +++ b/src/dolphintabbar.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2014 by Emmanuel Pescosta <[email protected]> * - * * - * 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: 2014 Emmanuel Pescosta <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHIN_TAB_BAR_H #define DOLPHIN_TAB_BAR_H diff --git a/src/dolphintabpage.cpp b/src/dolphintabpage.cpp index 88b4b726e..e9607cc53 100644 --- a/src/dolphintabpage.cpp +++ b/src/dolphintabpage.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2014 by Emmanuel Pescosta <[email protected]> * - * * - * 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: 2014 Emmanuel Pescosta <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphintabpage.h" diff --git a/src/dolphintabpage.h b/src/dolphintabpage.h index 6e3e008ac..74344acd1 100644 --- a/src/dolphintabpage.h +++ b/src/dolphintabpage.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2014 by Emmanuel Pescosta <[email protected]> * - * * - * 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: 2014 Emmanuel Pescosta <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHIN_TAB_PAGE_H #define DOLPHIN_TAB_PAGE_H diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp index 7a431152e..cd023beb2 100644 --- a/src/dolphintabwidget.cpp +++ b/src/dolphintabwidget.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2014 by Emmanuel Pescosta <[email protected]> * - * * - * 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: 2014 Emmanuel Pescosta <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphintabwidget.h" diff --git a/src/dolphintabwidget.h b/src/dolphintabwidget.h index f0ce11ce8..1eca71c5d 100644 --- a/src/dolphintabwidget.h +++ b/src/dolphintabwidget.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2014 by Emmanuel Pescosta <[email protected]> * - * * - * 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: 2014 Emmanuel Pescosta <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHIN_TAB_WIDGET_H #define DOLPHIN_TAB_WIDGET_H diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 4ab34a06a..87c976923 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2007 by Peter Penz <[email protected]> * - * * - * 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: 2007 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinviewcontainer.h" @@ -38,10 +25,11 @@ #include <KFileItemActions> #include <KFilePlacesModel> #include <KIO/PreviewJob> +#include <KIO/OpenUrlJob> +#include <KIO/JobUiDelegate> #include <KLocalizedString> #include <KMessageWidget> #include <KProtocolManager> -#include <KRun> #include <KShell> #include <KUrlComboBox> #include <KUrlNavigator> @@ -645,8 +633,10 @@ void DolphinViewContainer::slotItemActivated(const KFileItem& item) return; } - KRun *run = new KRun(item.targetUrl(), this); - run->setShowScriptExecutionPrompt(true); + KIO::OpenUrlJob *job = new KIO::OpenUrlJob(item.targetUrl()); + job->setUiDelegate(new KIO::JobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, this)); + job->setShowOpenOrExecuteDialog(true); + job->start(); } void DolphinViewContainer::slotItemsActivated(const KFileItemList& items) @@ -720,6 +710,7 @@ void DolphinViewContainer::slotUrlNavigatorLocationChanged(const QUrl& url) redirect(QUrl(), m_urlNavigator->locationUrl(1)); } else { showMessage(i18nc("@info:status", "Invalid protocol"), Error); + m_urlNavigator->goBack(); } } diff --git a/src/dolphinviewcontainer.h b/src/dolphinviewcontainer.h index 52e63cbe0..ee1193f19 100644 --- a/src/dolphinviewcontainer.h +++ b/src/dolphinviewcontainer.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2007 by Peter Penz <[email protected]> * - * * - * 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: 2007 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINVIEWCONTAINER_H #define DOLPHINVIEWCONTAINER_H diff --git a/src/filterbar/filterbar.cpp b/src/filterbar/filterbar.cpp index 93e929c45..7eee08b2e 100644 --- a/src/filterbar/filterbar.cpp +++ b/src/filterbar/filterbar.cpp @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2006-2010 by Peter Penz <[email protected]> * - * Copyright (C) 2006 by Gregor Kališnik <[email protected]> * - * Copyright (C) 2012 by Stuart Citrin <[email protected]> * - * * - * 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-2010 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2006 Gregor Kališnik <[email protected]> + * SPDX-FileCopyrightText: 2012 Stuart Citrin <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "filterbar.h" diff --git a/src/filterbar/filterbar.h b/src/filterbar/filterbar.h index 0c7dcb6cd..74c8457fc 100644 --- a/src/filterbar/filterbar.h +++ b/src/filterbar/filterbar.h @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2006-2010 by Peter Penz <[email protected]> * - * Copyright (C) 2006 by Gregor Kališnik <[email protected]> * - * Copyright (C) 2012 by Stuart Citrin <[email protected]> * - * * - * 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-2010 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2006 Gregor Kališnik <[email protected]> + * SPDX-FileCopyrightText: 2012 Stuart Citrin <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef FILTERBAR_H #define FILTERBAR_H diff --git a/src/global.cpp b/src/global.cpp index 6a702cf43..3d91fbab9 100644 --- a/src/global.cpp +++ b/src/global.cpp @@ -1,20 +1,7 @@ /* - * Copyright 2015 Ashish Bansal<[email protected]> + * SPDX-FileCopyrightText: 2015 Ashish Bansal <[email protected]> * - * 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-License-Identifier: GPL-2.0-or-later */ #include "global.h" diff --git a/src/global.h b/src/global.h index daf86134e..65247351a 100644 --- a/src/global.h +++ b/src/global.h @@ -1,20 +1,7 @@ /* - * Copyright 2015 Ashish Bansal<[email protected]> + * SPDX-FileCopyrightText: 2015 Ashish Bansal <[email protected]> * - * 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-License-Identifier: GPL-2.0-or-later */ #ifndef GLOBAL_H @@ -61,7 +48,7 @@ namespace Dolphin { /** * TODO: Move this somewhere global to all KDE apps, not just Dolphin */ - const int VERTICAL_SPACER_HEIGHT = 18; + const int VERTICAL_SPACER_HEIGHT = 12; const int LAYOUT_SPACING_SMALL = 2; } diff --git a/src/icons/128-system-file-manager.png b/src/icons/128-system-file-manager.png Binary files differindex a199a712f..559247792 100644 --- a/src/icons/128-system-file-manager.png +++ b/src/icons/128-system-file-manager.png diff --git a/src/icons/16-system-file-manager.png b/src/icons/16-system-file-manager.png Binary files differindex 2771c8543..ecc1536f3 100644 --- a/src/icons/16-system-file-manager.png +++ b/src/icons/16-system-file-manager.png diff --git a/src/icons/22-system-file-manager.png b/src/icons/22-system-file-manager.png Binary files differindex ac0c54aca..d6364ff7d 100644 --- a/src/icons/22-system-file-manager.png +++ b/src/icons/22-system-file-manager.png diff --git a/src/icons/32-system-file-manager.png b/src/icons/32-system-file-manager.png Binary files differindex c095d42d5..04a847bbc 100644 --- a/src/icons/32-system-file-manager.png +++ b/src/icons/32-system-file-manager.png diff --git a/src/icons/48-system-file-manager.png b/src/icons/48-system-file-manager.png Binary files differindex a742a7344..597b678c9 100644 --- a/src/icons/48-system-file-manager.png +++ b/src/icons/48-system-file-manager.png diff --git a/src/icons/64-system-file-manager.png b/src/icons/64-system-file-manager.png Binary files differindex 9a7ebdec4..e3239aaeb 100644 --- a/src/icons/64-system-file-manager.png +++ b/src/icons/64-system-file-manager.png diff --git a/src/icons/system-file-manager.svg b/src/icons/system-file-manager.svg new file mode 100644 index 000000000..974ca5590 --- /dev/null +++ b/src/icons/system-file-manager.svg @@ -0,0 +1,433 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="64" + version="1.1" + height="64" + id="svg2" + inkscape:version="0.91 r13725" + sodipodi:docname="system-file-manager.svg"> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="640" + inkscape:window-height="480" + id="namedview17" + showgrid="false" + inkscape:snap-bbox="true" + inkscape:bbox-nodes="true" + inkscape:zoom="1" + inkscape:cx="34.795165" + inkscape:cy="29.005378" + inkscape:current-layer="layer1" + showguides="false" + inkscape:guide-bbox="true" + inkscape:object-nodes="true"> + <inkscape:grid + type="xygrid" + id="grid4145" /> + <sodipodi:guide + position="26,40" + orientation="0.70710678,0.70710678" + id="guide4381" /> + <sodipodi:guide + position="3,35" + orientation="0.70710678,0.70710678" + id="guide4401" /> + </sodipodi:namedview> + <defs + id="defs5455"> + <linearGradient + inkscape:collect="always" + id="linearGradient4393"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop4395" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop4397" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient4291"> + <stop + style="stop-color:#1d5e8c;stop-opacity:1" + offset="0" + id="stop4293" /> + <stop + style="stop-color:#2675a7;stop-opacity:1" + offset="1" + id="stop4295" /> + </linearGradient> + <linearGradient + id="linearGradient4227" + inkscape:collect="always"> + <stop + id="stop4229" + offset="0" + style="stop-color:#f5f5f5;stop-opacity:1" /> + <stop + id="stop4231" + offset="1" + style="stop-color:#f9f9f9;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient4274" + inkscape:collect="always"> + <stop + id="stop4276" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop4278" + offset="1" + style="stop-color:#ffffff;stop-opacity:0.48760331" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4172-5" + id="linearGradient4178" + y1="548.88599" + y2="495.30789" + x2="397.2283" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,0.99967455,-384.57143,-483.62155)" + x1="434.16153" /> + <linearGradient + inkscape:collect="always" + id="linearGradient4172-5"> + <stop + style="stop-color:#127bdc;stop-opacity:1" + id="stop4174-6" /> + <stop + offset="1" + style="stop-color:#64b4f4;stop-opacity:1" + id="stop4176-6" /> + </linearGradient> + <linearGradient + gradientUnits="userSpaceOnUse" + x2="0" + y2="509.8" + y1="543.8" + id="a"> + <stop + id="stop4154" + stop-color="#2f74c8" /> + <stop + id="stop4156" + stop-color="#4699d7" + offset="1" /> + </linearGradient> + <linearGradient + gradientUnits="userSpaceOnUse" + x2="428.57" + y2="531.8" + x1="414.57" + y1="517.8" + id="b"> + <stop + id="stop4159" + stop-color="#383e51" /> + <stop + id="stop4161" + stop-opacity="0" + stop-color="#655c6f" + offset="1" /> + </linearGradient> + <linearGradient + gradientUnits="userSpaceOnUse" + x2="0" + y2="508.8" + y1="519.8" + id="c"> + <stop + id="stop4164" + stop-opacity="0" + stop-color="#60a5e7" /> + <stop + id="stop4166" + stop-opacity=".258" + stop-color="#a6f3fb" + offset="1" /> + </linearGradient> + <linearGradient + gradientTransform="translate(-390.57144,-497.798)" + inkscape:collect="always" + xlink:href="#linearGradient4274" + id="linearGradient4272-3" + x1="390.57144" + y1="498.298" + x2="442.57144" + y2="498.298" + gradientUnits="userSpaceOnUse" /> + <linearGradient + gradientTransform="translate(-390.57144,-501.798)" + inkscape:collect="always" + xlink:href="#linearGradient4274" + id="linearGradient4272-1" + x1="390.57144" + y1="498.298" + x2="442.57144" + y2="498.298" + gradientUnits="userSpaceOnUse" /> + <linearGradient + gradientTransform="translate(-6,-14)" + inkscape:collect="always" + xlink:href="#linearGradient4274" + id="linearGradient4272-36" + x1="390.57144" + y1="498.298" + x2="442.57144" + y2="498.298" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4274" + id="linearGradient4217" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(0,3)" + x1="390.57144" + y1="498.298" + x2="442.57144" + y2="498.298" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4227" + id="linearGradient4225" + gradientUnits="userSpaceOnUse" + x1="396.57144" + y1="498.798" + x2="426.57144" + y2="511.798" + gradientTransform="translate(0,1)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4291" + id="linearGradient4297" + x1="388.57144" + y1="487.798" + x2="416.57144" + y2="507.798" + gradientUnits="userSpaceOnUse" /> + <linearGradient + gradientUnits="userSpaceOnUse" + x2="383.77145" + y2="502.05301" + y1="542.0531" + id="a-2" + x1="383.77145"> + <stop + id="stop4304" + stop-color="#197cf1" /> + <stop + id="stop4306" + stop-color="#20bcfa" + offset="1" /> + </linearGradient> + <linearGradient + gradientUnits="userSpaceOnUse" + x2="39.28" + y2="36.633" + x1="22.285" + y1="18.71" + id="b-9"> + <stop + id="stop4309" + stop-color="#292c2f" /> + <stop + id="stop4311" + stop-opacity="0" + stop-color="#292c2f" + offset="1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4393" + id="linearGradient4399" + x1="443.57144" + y1="510.798" + x2="443.57144" + y2="526.79797" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-23,5)" /> + <linearGradient + gradientTransform="translate(-386.72845,506.21259)" + gradientUnits="userSpaceOnUse" + x2="419.97357" + y2="539.82538" + x1="406.50085" + y1="527.01447" + id="c-1"> + <stop + id="stop17" + stop-color="#292c2f" /> + <stop + id="stop19" + stop-opacity="0" + offset="1" /> + </linearGradient> + <linearGradient + gradientUnits="userSpaceOnUse" + x2="0" + y2="14" + y1="34" + id="b-8" + gradientTransform="translate(-2.1584511,1006.0126)"> + <stop + style="stop-color:#bfc9c9;stop-opacity:1" + id="stop12" + stop-color="#536161" /> + <stop + style="stop-color:#fafafa;stop-opacity:1" + id="stop14" + stop-color="#f4f5f5" + offset="1" /> + </linearGradient> + <linearGradient + x1="428.81628" + gradientTransform="translate(-386.72845,506.21259)" + gradientUnits="userSpaceOnUse" + x2="388.86475" + y2="499.67896" + y1="547.63354" + id="a-7"> + <stop + id="stop7" + stop-color="#2a2c2f" /> + <stop + id="stop9" + stop-color="#536161" + offset="1" /> + </linearGradient> + <linearGradient + gradientTransform="matrix(1.299805,0,0,1.299805,-499.06524,339.52825)" + gradientUnits="userSpaceOnUse" + x2="419.97357" + y2="539.82538" + x1="406.50085" + y1="527.01447" + id="c-7"> + <stop + id="stop17-5" + stop-color="#292c2f" /> + <stop + id="stop19-3" + stop-opacity="0" + offset="1" /> + </linearGradient> + <linearGradient + gradientUnits="userSpaceOnUse" + x2="0" + y2="14" + y1="34" + id="b-5" + gradientTransform="matrix(1.299805,0,0,1.299805,0.8007798,989.17075)"> + <stop + style="stop-color:#bfc9c9;stop-opacity:1" + id="stop12-6" + stop-color="#536161" /> + <stop + style="stop-color:#fbfbfb;stop-opacity:1" + id="stop14-2" + stop-color="#f4f5f5" + offset="1" /> + </linearGradient> + <linearGradient + x1="428.81628" + gradientTransform="matrix(1.299805,0,0,1.299805,-499.06524,339.52825)" + gradientUnits="userSpaceOnUse" + x2="388.86475" + y2="499.67896" + y1="547.63354" + id="a-9"> + <stop + id="stop7-1" + stop-color="#2a2c2f" /> + <stop + id="stop9-2" + stop-color="#536161" + offset="1" /> + </linearGradient> + </defs> + <metadata + id="metadata5458"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Capa 1" + inkscape:groupmode="layer" + id="layer1" + transform="matrix(1 0 0 1 -384.57143 -483.798)"> + <path + inkscape:connector-curvature="0" + style="fill:url(#linearGradient4297);fill-opacity:1" + id="rect4180" + d="m 388.57143,489.79812 0,5 0,22 c 0,0.55373 0.446,1 1,1 l 54,0 c 0.55399,0 1,-0.44627 1,-1 l 0,-21.99023 c 0,-0.003 -0.002,-0.006 -0.002,-0.01 l 0.002,0 0,-1 -28,0 -4,-4 -24,0 z" /> + <rect + ry="0.99999583" + rx="1.0000117" + y="498.798" + x="390.57144" + height="14.999973" + width="52.000011" + id="rect4223" + style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient4225);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" /> + <path + style="fill:url(#linearGradient4178)" + d="M 26 24 L 22 28 L 3 28 L 3 29 L 3.0019531 29 C 3.0019031 29.004 3 29.008019 3 29.011719 L 3 56 L 3 57 C 3 57.554 3.44599 58 4 58 L 60 58 C 60.55401 58 61 57.554 61 57 L 61 56 L 61 29.011719 L 61 29 L 61 24 L 26 24 z " + transform="translate(384.57143,483.798)" + id="rect4113" /> + <path + inkscape:connector-curvature="0" + style="opacity:0.3;fill:#ffffff;fill-opacity:1;fill-rule:evenodd" + id="path4224" + d="m 387.57144,511.79812 0,1 19.99999,0 3,-5 -4,4 z" /> + <path + inkscape:connector-curvature="0" + style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;opacity:0.3" + id="path4196" + d="m 28,6 3,5 2,0 27,0 0,-1 -27,0 -1,0 z" + transform="matrix(1 0 0 1 384.57143 483.798)" /> + <path + inkscape:connector-curvature="0" + id="path4215" + d="m 391.57143,498.798 c -0.55401,0 -1,0.446 -1,1 l 0,1 c 0,-0.554 0.44599,-1 1,-1 l 50,0 c 0.55401,0 1,0.446 1,1 l 0,-1 c 0,-0.554 -0.44599,-1 -1,-1 l -50,0 z" + style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.85;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient4217);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" /> + <path + style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.3;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" + d="m 388.57143,541.798 c -0.55401,0 -1,-0.446 -1,-1 l 0,-1 c 0,0.554 0.44599,1 1,1 l 56,0 c 0.55401,0 1,-0.446 1,-1 l 0,1 c 0,0.554 -0.44599,1 -1,1 z" + id="path4233" + inkscape:connector-curvature="0" + sodipodi:nodetypes="sscsscsss" /> + <path + style="opacity:0.109;fill:url(#linearGradient4399);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 387.57143,512.798 20,0 3,-5 35,0 0,33 -30,0 z" + id="path4383" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccccc" /> + </g> +</svg> diff --git a/src/kitemviews/kfileitemlistview.cpp b/src/kitemviews/kfileitemlistview.cpp index 4fffbcbfd..73d6c72e9 100644 --- a/src/kitemviews/kfileitemlistview.cpp +++ b/src/kitemviews/kfileitemlistview.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kfileitemlistview.h" diff --git a/src/kitemviews/kfileitemlistview.h b/src/kitemviews/kfileitemlistview.h index 92005c2df..43712541a 100644 --- a/src/kitemviews/kfileitemlistview.h +++ b/src/kitemviews/kfileitemlistview.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KFILEITEMLISTVIEW_H #define KFILEITEMLISTVIEW_H diff --git a/src/kitemviews/kfileitemlistwidget.cpp b/src/kitemviews/kfileitemlistwidget.cpp index a495a4c2f..e5b0a4957 100644 --- a/src/kitemviews/kfileitemlistwidget.cpp +++ b/src/kitemviews/kfileitemlistwidget.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kfileitemlistwidget.h" #include "kfileitemmodel.h" diff --git a/src/kitemviews/kfileitemlistwidget.h b/src/kitemviews/kfileitemlistwidget.h index 7ce415dbe..e09808024 100644 --- a/src/kitemviews/kfileitemlistwidget.h +++ b/src/kitemviews/kfileitemlistwidget.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KFILEITEMLISTWIDGET_H #define KFILEITEMLISTWIDGET_H diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index ac3c33e22..28376c5d0 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -1,23 +1,10 @@ -/***************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * Copyright (C) 2013 by Frank Reininghaus <[email protected]> * - * Copyright (C) 2013 by Emmanuel Pescosta <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2013 Frank Reininghaus <[email protected]> + * SPDX-FileCopyrightText: 2013 Emmanuel Pescosta <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kfileitemmodel.h" @@ -247,7 +234,7 @@ QMimeData* KFileItemModel::createMimeData(const KItemSet& indexes) const // The following code has been taken from KDirModel::mimeData() // (kdelibs/kio/kio/kdirmodel.cpp) - // Copyright (C) 2006 David Faure <[email protected]> + // SPDX-FileCopyrightText: 2006 David Faure <[email protected]> QList<QUrl> urls; QList<QUrl> mostLocalUrls; const ItemData* lastAddedItem = nullptr; diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h index 132a76e46..844435434 100644 --- a/src/kitemviews/kfileitemmodel.h +++ b/src/kitemviews/kfileitemmodel.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KFILEITEMMODEL_H #define KFILEITEMMODEL_H diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp index eb2c1b646..02c55fd3e 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.cpp +++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kfileitemmodelrolesupdater.h" @@ -78,6 +65,7 @@ KFileItemModelRolesUpdater::KFileItemModelRolesUpdater(KFileItemModel* model, QO m_roles(), m_resolvableRoles(), m_enabledPlugins(), + m_localFileSizePreviewLimit(0), m_pendingSortRoleItems(), m_pendingIndexes(), m_pendingPreviewItems(), @@ -85,10 +73,9 @@ KFileItemModelRolesUpdater::KFileItemModelRolesUpdater(KFileItemModel* model, QO m_recentlyChangedItemsTimer(nullptr), m_recentlyChangedItems(), m_changedItems(), - m_directoryContentsCounter(nullptr), - m_localFileSizePreviewLimit(0) + m_directoryContentsCounter(nullptr) #ifdef HAVE_BALOO - , m_balooFileMonitor(nullptr) + , m_balooFileMonitor(nullptr) #endif { Q_ASSERT(model); diff --git a/src/kitemviews/kfileitemmodelrolesupdater.h b/src/kitemviews/kfileitemmodelrolesupdater.h index b881b73e4..a71b55c2e 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.h +++ b/src/kitemviews/kfileitemmodelrolesupdater.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KFILEITEMMODELROLESUPDATER_H #define KFILEITEMMODELROLESUPDATER_H @@ -361,5 +348,3 @@ private: }; #endif - - diff --git a/src/kitemviews/kitemlistcontainer.cpp b/src/kitemviews/kitemlistcontainer.cpp index 6279b15a9..77847bcc7 100644 --- a/src/kitemviews/kitemlistcontainer.cpp +++ b/src/kitemviews/kitemlistcontainer.cpp @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * Based on the Itemviews NG project from Trolltech Labs * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * Based on the Itemviews NG project from Trolltech Labs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemlistcontainer.h" @@ -30,6 +17,7 @@ #include <QGraphicsScene> #include <QGraphicsView> #include <QScrollBar> +#include <QScroller> #include <QStyleOption> /** @@ -67,7 +55,8 @@ KItemListContainer::KItemListContainer(KItemListController* controller, QWidget* QAbstractScrollArea(parent), m_controller(controller), m_horizontalSmoothScroller(nullptr), - m_verticalSmoothScroller(nullptr) + m_verticalSmoothScroller(nullptr), + m_scroller(nullptr) { Q_ASSERT(controller); controller->setParent(this); @@ -89,6 +78,13 @@ KItemListContainer::KItemListContainer(KItemListController* controller, QWidget* this, &KItemListContainer::slotModelChanged); connect(controller, &KItemListController::viewChanged, this, &KItemListContainer::slotViewChanged); + + m_scroller = QScroller::scroller(viewport()); + m_scroller->grabGesture(viewport()); + connect(controller, &KItemListController::scrollerStop, + this, &KItemListContainer::stopScroller); + connect(m_scroller, &QScroller::stateChanged, + controller, &KItemListController::slotStateChanged); } KItemListContainer::~KItemListContainer() @@ -176,8 +172,8 @@ void KItemListContainer::wheelEvent(QWheelEvent* event) return; } - const bool scrollHorizontally = (event->orientation() == Qt::Horizontal) || - (event->orientation() == Qt::Vertical && !verticalScrollBar()->isVisible()); + const bool scrollHorizontally = (event->angleDelta().x() != 0) || + (event->angleDelta().y() != 0 && !verticalScrollBar()->isVisible()); KItemListSmoothScroller* smoothScroller = scrollHorizontally ? m_horizontalSmoothScroller : m_verticalSmoothScroller; @@ -338,6 +334,11 @@ void KItemListContainer::updateItemOffsetScrollBar() } } +void KItemListContainer::stopScroller() +{ + m_scroller->stop(); +} + void KItemListContainer::updateGeometries() { QRect rect = geometry(); diff --git a/src/kitemviews/kitemlistcontainer.h b/src/kitemviews/kitemlistcontainer.h index 9fcb88969..537bab142 100644 --- a/src/kitemviews/kitemlistcontainer.h +++ b/src/kitemviews/kitemlistcontainer.h @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * Based on the Itemviews NG project from Trolltech Labs * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * Based on the Itemviews NG project from Trolltech Labs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMLISTCONTAINER_H #define KITEMLISTCONTAINER_H @@ -30,6 +17,7 @@ class KItemListController; class KItemListSmoothScroller; class KItemListView; class KItemModelBase; +class QScroller; /** * @brief Provides a QWidget based scrolling view for a KItemListController. @@ -70,6 +58,7 @@ private slots: void scrollTo(qreal offset); void updateScrollOffsetScrollBar(); void updateItemOffsetScrollBar(); + void stopScroller(); private: void updateGeometries(); @@ -87,6 +76,7 @@ private: KItemListSmoothScroller* m_horizontalSmoothScroller; KItemListSmoothScroller* m_verticalSmoothScroller; + QScroller* m_scroller; }; #endif diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp index 5ddf52e5f..60318047d 100644 --- a/src/kitemviews/kitemlistcontroller.cpp +++ b/src/kitemviews/kitemlistcontroller.cpp @@ -1,24 +1,11 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * Copyright (C) 2012 by Frank Reininghaus <[email protected]> * - * * - * Based on the Itemviews NG project from Trolltech Labs * - * * - * 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: 2011 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2012 Frank Reininghaus <[email protected]> + * + * Based on the Itemviews NG project from Trolltech Labs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemlistcontroller.h" @@ -26,22 +13,32 @@ #include "kitemlistview.h" #include "private/kitemlistkeyboardsearchmanager.h" #include "private/kitemlistrubberband.h" +#include "private/ktwofingerswipe.h" +#include "private/ktwofingertap.h" #include "views/draganddrophelper.h" #include <QAccessible> #include <QApplication> #include <QDrag> +#include <QGesture> #include <QGraphicsScene> #include <QGraphicsSceneEvent> #include <QGraphicsView> #include <QMimeData> #include <QTimer> +#include <QTouchEvent> KItemListController::KItemListController(KItemModelBase* model, KItemListView* view, QObject* parent) : QObject(parent), m_singleClickActivationEnforced(false), m_selectionTogglePressed(false), m_clearSelectionIfItemsAreNotDragged(false), + m_isSwipeGesture(false), + m_dragActionOrRightClick(false), + m_scrollerIsScrolling(false), + m_pinchGestureInProgress(false), + m_mousePress(false), + m_isTouchEvent(false), m_selectionBehavior(NoSelection), m_autoActivationBehavior(ActivationAndExpansion), m_mouseDoubleClickAction(ActivateItemOnly), @@ -52,6 +49,8 @@ KItemListController::KItemListController(KItemModelBase* model, KItemListView* v m_pressedIndex(-1), m_pressedMousePos(), m_autoActivationTimer(nullptr), + m_swipeGesture(Qt::CustomGesture), + m_twoFingerTapGesture(Qt::CustomGesture), m_oldSelection(), m_keyboardAnchorIndex(-1), m_keyboardAnchorPos(0) @@ -70,6 +69,14 @@ KItemListController::KItemListController(KItemModelBase* model, KItemListView* v setModel(model); setView(view); + + m_swipeGesture = QGestureRecognizer::registerRecognizer(new KTwoFingerSwipeRecognizer()); + m_twoFingerTapGesture = QGestureRecognizer::registerRecognizer(new KTwoFingerTapRecognizer()); + view->grabGesture(m_swipeGesture); + view->grabGesture(m_twoFingerTapGesture); + view->grabGesture(Qt::TapGesture); + view->grabGesture(Qt::TapAndHoldGesture); + view->grabGesture(Qt::PinchGesture); } KItemListController::~KItemListController() @@ -530,149 +537,27 @@ bool KItemListController::inputMethodEvent(QInputMethodEvent* event) bool KItemListController::mousePressEvent(QGraphicsSceneMouseEvent* event, const QTransform& transform) { + m_mousePress = true; + + if (event->source() == Qt::MouseEventSynthesizedByQt && m_isTouchEvent) { + return false; + } + if (!m_view) { return false; } m_pressedMousePos = transform.map(event->pos()); m_pressedIndex = m_view->itemAt(m_pressedMousePos); - emit mouseButtonPressed(m_pressedIndex, event->buttons()); - - if (event->buttons() & (Qt::BackButton | Qt::ForwardButton)) { - // Do not select items when clicking the back/forward buttons, see - // https://bugs.kde.org/show_bug.cgi?id=327412. - return true; - } - if (m_view->isAboveExpansionToggle(m_pressedIndex, m_pressedMousePos)) { - m_selectionManager->endAnchoredSelection(); - m_selectionManager->setCurrentItem(m_pressedIndex); - m_selectionManager->beginAnchoredSelection(m_pressedIndex); - return true; - } + const Qt::MouseButtons buttons = event->buttons(); - m_selectionTogglePressed = m_view->isAboveSelectionToggle(m_pressedIndex, m_pressedMousePos); - if (m_selectionTogglePressed) { - m_selectionManager->setSelected(m_pressedIndex, 1, KItemListSelectionManager::Toggle); - // The previous anchored selection has been finished already in - // KItemListSelectionManager::setSelected(). We can safely change - // the current item and start a new anchored selection now. - m_selectionManager->setCurrentItem(m_pressedIndex); - m_selectionManager->beginAnchoredSelection(m_pressedIndex); - return true; - } - - const bool shiftPressed = event->modifiers() & Qt::ShiftModifier; - const bool controlPressed = event->modifiers() & Qt::ControlModifier; - - // The previous selection is cleared if either - // 1. The selection mode is SingleSelection, or - // 2. the selection mode is MultiSelection, and *none* of the following conditions are met: - // a) Shift or Control are pressed. - // b) The clicked item is selected already. In that case, the user might want to: - // - start dragging multiple items, or - // - open the context menu and perform an action for all selected items. - const bool shiftOrControlPressed = shiftPressed || controlPressed; - const bool pressedItemAlreadySelected = m_pressedIndex >= 0 && m_selectionManager->isSelected(m_pressedIndex); - const bool clearSelection = m_selectionBehavior == SingleSelection || - (!shiftOrControlPressed && !pressedItemAlreadySelected); - if (clearSelection) { - m_selectionManager->clearSelection(); - } else if (pressedItemAlreadySelected && !shiftOrControlPressed && (event->buttons() & Qt::LeftButton)) { - // The user might want to start dragging multiple items, but if he clicks the item - // in order to trigger it instead, the other selected items must be deselected. - // However, we do not know yet what the user is going to do. - // -> remember that the user pressed an item which had been selected already and - // clear the selection in mouseReleaseEvent(), unless the items are dragged. - m_clearSelectionIfItemsAreNotDragged = true; - - if (m_selectionManager->selectedItems().count() == 1 && m_view->isAboveText(m_pressedIndex, m_pressedMousePos)) { - emit selectedItemTextPressed(m_pressedIndex); - } - } - - if (!shiftPressed) { - // Finish the anchored selection before the current index is changed - m_selectionManager->endAnchoredSelection(); - } - - if (event->buttons() & Qt::RightButton) { - // Stop rubber band from persisting after right-clicks - KItemListRubberBand* rubberBand = m_view->rubberBand(); - if (rubberBand->isActive()) { - disconnect(rubberBand, &KItemListRubberBand::endPositionChanged, this, &KItemListController::slotRubberBandChanged); - rubberBand->setActive(false); - m_view->setAutoScroll(false); - } - } - - if (m_pressedIndex >= 0) { - m_selectionManager->setCurrentItem(m_pressedIndex); - - switch (m_selectionBehavior) { - case NoSelection: - break; - - case SingleSelection: - m_selectionManager->setSelected(m_pressedIndex); - break; - - case MultiSelection: - if (controlPressed && !shiftPressed) { - m_selectionManager->setSelected(m_pressedIndex, 1, KItemListSelectionManager::Toggle); - m_selectionManager->beginAnchoredSelection(m_pressedIndex); - } else if (!shiftPressed || !m_selectionManager->isAnchoredSelectionActive()) { - // Select the pressed item and start a new anchored selection - m_selectionManager->setSelected(m_pressedIndex, 1, KItemListSelectionManager::Select); - m_selectionManager->beginAnchoredSelection(m_pressedIndex); - } - break; - - default: - Q_ASSERT(false); - break; - } - - if (event->buttons() & Qt::RightButton) { - emit itemContextMenuRequested(m_pressedIndex, event->screenPos()); - } - - return true; - } - - if (event->buttons() & Qt::RightButton) { - const QRectF headerBounds = m_view->headerBoundaries(); - if (headerBounds.contains(event->pos())) { - emit headerContextMenuRequested(event->screenPos()); - } else { - emit viewContextMenuRequested(event->screenPos()); - } - return true; - } - - if (m_selectionBehavior == MultiSelection) { - QPointF startPos = m_pressedMousePos; - if (m_view->scrollOrientation() == Qt::Vertical) { - startPos.ry() += m_view->scrollOffset(); - if (m_view->itemSize().width() < 0) { - // Use a special rubberband for views that have only one column and - // expand the rubberband to use the whole width of the view. - startPos.setX(0); - } - } else { - startPos.rx() += m_view->scrollOffset(); - } - - m_oldSelection = m_selectionManager->selectedItems(); - KItemListRubberBand* rubberBand = m_view->rubberBand(); - rubberBand->setStartPosition(startPos); - rubberBand->setEndPosition(startPos); - rubberBand->setActive(true); - connect(rubberBand, &KItemListRubberBand::endPositionChanged, this, &KItemListController::slotRubberBandChanged); - m_view->setAutoScroll(true); + if (!onPress(event->screenPos(), event->pos(), event->modifiers(), buttons)) { + startRubberBand(); + return false; } - return false; + return true; } bool KItemListController::mouseMoveEvent(QGraphicsSceneMouseEvent* event, const QTransform& transform) @@ -681,6 +566,14 @@ bool KItemListController::mouseMoveEvent(QGraphicsSceneMouseEvent* event, const return false; } + if (m_view->m_tapAndHoldIndicator->isActive()) { + m_view->m_tapAndHoldIndicator->setActive(false); + } + + if (event->source() == Qt::MouseEventSynthesizedByQt && !m_dragActionOrRightClick && m_isTouchEvent) { + return false; + } + if (m_pressedIndex >= 0) { // Check whether a dragging should be started if (event->buttons() & Qt::LeftButton) { @@ -696,8 +589,8 @@ bool KItemListController::mouseMoveEvent(QGraphicsSceneMouseEvent* event, const // -> the selection should not be cleared when the mouse button is released. m_clearSelectionIfItemsAreNotDragged = false; } - startDragging(); + m_mousePress = false; } } } else { @@ -733,75 +626,25 @@ bool KItemListController::mouseMoveEvent(QGraphicsSceneMouseEvent* event, const bool KItemListController::mouseReleaseEvent(QGraphicsSceneMouseEvent* event, const QTransform& transform) { + m_mousePress = false; + m_isTouchEvent = false; + if (!m_view) { return false; } - emit mouseButtonReleased(m_pressedIndex, event->buttons()); - - const bool isAboveSelectionToggle = m_view->isAboveSelectionToggle(m_pressedIndex, m_pressedMousePos); - if (isAboveSelectionToggle) { - m_selectionTogglePressed = false; - return true; + if (m_view->m_tapAndHoldIndicator->isActive()) { + m_view->m_tapAndHoldIndicator->setActive(false); } - if (!isAboveSelectionToggle && m_selectionTogglePressed) { - m_selectionManager->setSelected(m_pressedIndex, 1, KItemListSelectionManager::Toggle); - m_selectionTogglePressed = false; - return true; - } - - const bool shiftOrControlPressed = event->modifiers() & Qt::ShiftModifier || - event->modifiers() & Qt::ControlModifier; - KItemListRubberBand* rubberBand = m_view->rubberBand(); - if (rubberBand->isActive()) { - disconnect(rubberBand, &KItemListRubberBand::endPositionChanged, this, &KItemListController::slotRubberBandChanged); - rubberBand->setActive(false); - m_oldSelection.clear(); - m_view->setAutoScroll(false); + if (event->source() == Qt::MouseEventSynthesizedByQt && !rubberBand->isActive() && m_isTouchEvent) { + return false; } - const QPointF pos = transform.map(event->pos()); - const int index = m_view->itemAt(pos); - - if (index >= 0 && index == m_pressedIndex) { - // The release event is done above the same item as the press event - - if (m_clearSelectionIfItemsAreNotDragged) { - // A selected item has been clicked, but no drag operation has been started - // -> clear the rest of the selection. - m_selectionManager->clearSelection(); - m_selectionManager->setSelected(m_pressedIndex, 1, KItemListSelectionManager::Select); - m_selectionManager->beginAnchoredSelection(m_pressedIndex); - } - - if (event->button() & Qt::LeftButton) { - bool emitItemActivated = true; - if (m_view->isAboveExpansionToggle(index, pos)) { - const bool expanded = m_model->isExpanded(index); - m_model->setExpanded(index, !expanded); - - emit itemExpansionToggleClicked(index); - emitItemActivated = false; - } else if (shiftOrControlPressed) { - // The mouse click should only update the selection, not trigger the item - emitItemActivated = false; - } else if (!(m_view->style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick) || m_singleClickActivationEnforced)) { - emitItemActivated = false; - } - if (emitItemActivated) { - emit itemActivated(index); - } - } else if (event->button() & Qt::MidButton) { - emit itemMiddleClicked(index); - } - } + emit mouseButtonReleased(m_pressedIndex, event->buttons()); - m_pressedMousePos = QPointF(); - m_pressedIndex = -1; - m_clearSelectionIfItemsAreNotDragged = false; - return false; + return onRelease(transform.map(event->pos()), event->modifiers(), event->button(), false); } bool KItemListController::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event, const QTransform& transform) @@ -1014,6 +857,9 @@ bool KItemListController::hoverLeaveEvent(QGraphicsSceneHoverEvent* event, const Q_UNUSED(event) Q_UNUSED(transform) + m_mousePress = false; + m_isTouchEvent = false; + if (!m_model || !m_view) { return false; } @@ -1041,6 +887,211 @@ bool KItemListController::resizeEvent(QGraphicsSceneResizeEvent* event, const QT return false; } +bool KItemListController::gestureEvent(QGestureEvent* event, const QTransform& transform) +{ + if (!m_view) { + return false; + } + + //you can touch on different views at the same time, but only one QWidget gets a mousePressEvent + //we use this to get the right QWidget + //the only exception is a tap gesture with state GestureStarted, we need to reset some variable + if (!m_mousePress) { + if (QGesture* tap = event->gesture(Qt::TapGesture)) { + QTapGesture* tapGesture = static_cast<QTapGesture*>(tap); + if (tapGesture->state() == Qt::GestureStarted) { + tapTriggered(tapGesture, transform); + } + } + return false; + } + + bool accepted = false; + + if (QGesture* tap = event->gesture(Qt::TapGesture)) { + tapTriggered(static_cast<QTapGesture*>(tap), transform); + accepted = true; + } + if (event->gesture(Qt::TapAndHoldGesture)) { + tapAndHoldTriggered(event, transform); + accepted = true; + } + if (event->gesture(Qt::PinchGesture)) { + pinchTriggered(event, transform); + accepted = true; + } + if (event->gesture(m_swipeGesture)) { + swipeTriggered(event, transform); + accepted = true; + } + if (event->gesture(m_twoFingerTapGesture)) { + twoFingerTapTriggered(event, transform); + accepted = true; + } + return accepted; +} + +bool KItemListController::touchBeginEvent(QTouchEvent* event, const QTransform& transform) +{ + Q_UNUSED(event) + Q_UNUSED(transform) + + m_isTouchEvent = true; + return false; +} + +void KItemListController::tapTriggered(QTapGesture* tap, const QTransform& transform) +{ + static bool scrollerWasActive = false; + + if (tap->state() == Qt::GestureStarted) { + m_dragActionOrRightClick = false; + m_isSwipeGesture = false; + m_pinchGestureInProgress = false; + scrollerWasActive = m_scrollerIsScrolling; + } + + if (tap->state() == Qt::GestureFinished) { + m_mousePress = false; + + //if at the moment of the gesture start the QScroller was active, the user made the tap + //to stop the QScroller and not to tap on an item + if (scrollerWasActive) { + return; + } + + if (m_view->m_tapAndHoldIndicator->isActive()) { + m_view->m_tapAndHoldIndicator->setActive(false); + } + + m_pressedMousePos = transform.map(tap->position()); + m_pressedIndex = m_view->itemAt(m_pressedMousePos); + + if (m_dragActionOrRightClick) { + onPress(tap->hotSpot().toPoint(), tap->position().toPoint(), Qt::NoModifier, Qt::RightButton); + onRelease(transform.map(tap->position()), Qt::NoModifier, Qt::RightButton, false); + m_dragActionOrRightClick = false; + } + else { + onPress(tap->hotSpot().toPoint(), tap->position().toPoint(), Qt::NoModifier, Qt::LeftButton); + onRelease(transform.map(tap->position()), Qt::NoModifier, Qt::LeftButton, true); + } + m_isTouchEvent = false; + } +} + +void KItemListController::tapAndHoldTriggered(QGestureEvent* event, const QTransform& transform) +{ + + //the Qt TabAndHold gesture is triggerable with a mouse click, we don't want this + if (!m_isTouchEvent) { + return; + } + + const QTapAndHoldGesture* tap = static_cast<QTapAndHoldGesture*>(event->gesture(Qt::TapAndHoldGesture)); + if (tap->state() == Qt::GestureFinished) { + //if a pinch gesture is in progress we don't want a TabAndHold gesture + if (m_pinchGestureInProgress) { + return; + } + m_pressedMousePos = transform.map(event->mapToGraphicsScene(tap->position())); + m_pressedIndex = m_view->itemAt(m_pressedMousePos); + + if (m_pressedIndex >= 0 && !m_selectionManager->isSelected(m_pressedIndex)) { + m_selectionManager->clearSelection(); + m_selectionManager->setSelected(m_pressedIndex); + } else if (m_pressedIndex == -1) { + m_selectionManager->clearSelection(); + startRubberBand(); + } + + emit scrollerStop(); + + m_view->m_tapAndHoldIndicator->setStartPosition(m_pressedMousePos); + m_view->m_tapAndHoldIndicator->setActive(true); + + m_dragActionOrRightClick = true; + } +} + +void KItemListController::pinchTriggered(QGestureEvent* event, const QTransform& transform) +{ + Q_UNUSED(transform) + + const QPinchGesture* pinch = static_cast<QPinchGesture*>(event->gesture(Qt::PinchGesture)); + const qreal sensitivityModifier = 0.2; + static qreal counter = 0; + + if (pinch->state() == Qt::GestureStarted) { + m_pinchGestureInProgress = true; + counter = 0; + } + if (pinch->state() == Qt::GestureUpdated) { + //if a swipe gesture was recognized or in progress, we don't want a pinch gesture to change the zoom + if (m_isSwipeGesture) { + return; + } + counter = counter + (pinch->scaleFactor() - 1); + if (counter >= sensitivityModifier) { + emit increaseZoom(); + counter = 0; + } else if (counter <= -sensitivityModifier) { + emit decreaseZoom(); + counter = 0; + } + } +} + +void KItemListController::swipeTriggered(QGestureEvent* event, const QTransform& transform) +{ + Q_UNUSED(transform) + + const KTwoFingerSwipe* swipe = static_cast<KTwoFingerSwipe*>(event->gesture(m_swipeGesture)); + + if (!swipe) { + return; + } + if (swipe->state() == Qt::GestureStarted) { + m_isSwipeGesture = true; + } + + if (swipe->state() == Qt::GestureCanceled) { + m_isSwipeGesture = false; + } + + if (swipe->state() == Qt::GestureFinished) { + emit scrollerStop(); + + if (swipe->swipeAngle() <= 20 || swipe->swipeAngle() >= 340) { + emit mouseButtonPressed(m_pressedIndex, Qt::BackButton); + } else if (swipe->swipeAngle() <= 200 && swipe->swipeAngle() >= 160) { + emit mouseButtonPressed(m_pressedIndex, Qt::ForwardButton); + } else if (swipe->swipeAngle() <= 110 && swipe->swipeAngle() >= 60) { + emit swipeUp(); + } + m_isSwipeGesture = true; + } +} + +void KItemListController::twoFingerTapTriggered(QGestureEvent* event, const QTransform& transform) +{ + const KTwoFingerTap* twoTap = static_cast<KTwoFingerTap*>(event->gesture(m_twoFingerTapGesture)); + + if (!twoTap) { + return; + } + + if (twoTap->state() == Qt::GestureStarted) { + m_pressedMousePos = transform.map(twoTap->pos()); + m_pressedIndex = m_view->itemAt(m_pressedMousePos); + if (m_pressedIndex >= 0) { + onPress(twoTap->screenPos().toPoint(), twoTap->pos().toPoint(), Qt::ControlModifier, Qt::LeftButton); + onRelease(transform.map(twoTap->pos()), Qt::ControlModifier, Qt::LeftButton, false); + } + + } +} + bool KItemListController::processEvent(QEvent* event, const QTransform& transform) { if (!event) { @@ -1078,6 +1129,10 @@ bool KItemListController::processEvent(QEvent* event, const QTransform& transfor return hoverLeaveEvent(static_cast<QGraphicsSceneHoverEvent*>(event), QTransform()); case QEvent::GraphicsSceneResize: return resizeEvent(static_cast<QGraphicsSceneResizeEvent*>(event), transform); + case QEvent::Gesture: + return gestureEvent(static_cast<QGestureEvent*>(event), transform); + case QEvent::TouchBegin: + return touchBeginEvent(static_cast<QTouchEvent*>(event), transform); default: break; } @@ -1358,3 +1413,225 @@ void KItemListController::updateExtendedSelectionRegion() } } +bool KItemListController::onPress(const QPoint& screenPos, const QPointF& pos, const Qt::KeyboardModifiers modifiers, const Qt::MouseButtons buttons) +{ + emit mouseButtonPressed(m_pressedIndex, buttons); + + if (buttons & (Qt::BackButton | Qt::ForwardButton)) { + // Do not select items when clicking the back/forward buttons, see + // https://bugs.kde.org/show_bug.cgi?id=327412. + return true; + } + + if (m_view->isAboveExpansionToggle(m_pressedIndex, m_pressedMousePos)) { + m_selectionManager->endAnchoredSelection(); + m_selectionManager->setCurrentItem(m_pressedIndex); + m_selectionManager->beginAnchoredSelection(m_pressedIndex); + return true; + } + + m_selectionTogglePressed = m_view->isAboveSelectionToggle(m_pressedIndex, m_pressedMousePos); + if (m_selectionTogglePressed) { + m_selectionManager->setSelected(m_pressedIndex, 1, KItemListSelectionManager::Toggle); + // The previous anchored selection has been finished already in + // KItemListSelectionManager::setSelected(). We can safely change + // the current item and start a new anchored selection now. + m_selectionManager->setCurrentItem(m_pressedIndex); + m_selectionManager->beginAnchoredSelection(m_pressedIndex); + return true; + } + + const bool shiftPressed = modifiers & Qt::ShiftModifier; + const bool controlPressed = modifiers & Qt::ControlModifier; + + // The previous selection is cleared if either + // 1. The selection mode is SingleSelection, or + // 2. the selection mode is MultiSelection, and *none* of the following conditions are met: + // a) Shift or Control are pressed. + // b) The clicked item is selected already. In that case, the user might want to: + // - start dragging multiple items, or + // - open the context menu and perform an action for all selected items. + const bool shiftOrControlPressed = shiftPressed || controlPressed; + const bool pressedItemAlreadySelected = m_pressedIndex >= 0 && m_selectionManager->isSelected(m_pressedIndex); + const bool clearSelection = m_selectionBehavior == SingleSelection || + (!shiftOrControlPressed && !pressedItemAlreadySelected); + if (clearSelection) { + m_selectionManager->clearSelection(); + } else if (pressedItemAlreadySelected && !shiftOrControlPressed && (buttons & Qt::LeftButton)) { + // The user might want to start dragging multiple items, but if he clicks the item + // in order to trigger it instead, the other selected items must be deselected. + // However, we do not know yet what the user is going to do. + // -> remember that the user pressed an item which had been selected already and + // clear the selection in mouseReleaseEvent(), unless the items are dragged. + m_clearSelectionIfItemsAreNotDragged = true; + + if (m_selectionManager->selectedItems().count() == 1 && m_view->isAboveText(m_pressedIndex, m_pressedMousePos)) { + emit selectedItemTextPressed(m_pressedIndex); + } + } + + if (!shiftPressed) { + // Finish the anchored selection before the current index is changed + m_selectionManager->endAnchoredSelection(); + } + + if (buttons & Qt::RightButton) { + // Stop rubber band from persisting after right-clicks + KItemListRubberBand* rubberBand = m_view->rubberBand(); + if (rubberBand->isActive()) { + disconnect(rubberBand, &KItemListRubberBand::endPositionChanged, this, &KItemListController::slotRubberBandChanged); + rubberBand->setActive(false); + m_view->setAutoScroll(false); + } + } + + if (m_pressedIndex >= 0) { + m_selectionManager->setCurrentItem(m_pressedIndex); + + switch (m_selectionBehavior) { + case NoSelection: + break; + + case SingleSelection: + m_selectionManager->setSelected(m_pressedIndex); + break; + + case MultiSelection: + if (controlPressed && !shiftPressed) { + m_selectionManager->setSelected(m_pressedIndex, 1, KItemListSelectionManager::Toggle); + m_selectionManager->beginAnchoredSelection(m_pressedIndex); + } else if (!shiftPressed || !m_selectionManager->isAnchoredSelectionActive()) { + // Select the pressed item and start a new anchored selection + m_selectionManager->setSelected(m_pressedIndex, 1, KItemListSelectionManager::Select); + m_selectionManager->beginAnchoredSelection(m_pressedIndex); + } + break; + + default: + Q_ASSERT(false); + break; + } + + if (buttons & Qt::RightButton) { + emit itemContextMenuRequested(m_pressedIndex, screenPos); + } + + return true; + } + + if (buttons & Qt::RightButton) { + const QRectF headerBounds = m_view->headerBoundaries(); + if (headerBounds.contains(pos)) { + emit headerContextMenuRequested(screenPos); + } else { + emit viewContextMenuRequested(screenPos); + } + return true; + } + + return false; +} + +bool KItemListController::onRelease(const QPointF& pos, const Qt::KeyboardModifiers modifiers, const Qt::MouseButtons buttons, bool touch) +{ + const bool isAboveSelectionToggle = m_view->isAboveSelectionToggle(m_pressedIndex, m_pressedMousePos); + if (isAboveSelectionToggle) { + m_selectionTogglePressed = false; + return true; + } + + if (!isAboveSelectionToggle && m_selectionTogglePressed) { + m_selectionManager->setSelected(m_pressedIndex, 1, KItemListSelectionManager::Toggle); + m_selectionTogglePressed = false; + return true; + } + + const bool shiftOrControlPressed = modifiers & Qt::ShiftModifier || + modifiers & Qt::ControlModifier; + + KItemListRubberBand* rubberBand = m_view->rubberBand(); + if (rubberBand->isActive()) { + disconnect(rubberBand, &KItemListRubberBand::endPositionChanged, this, &KItemListController::slotRubberBandChanged); + rubberBand->setActive(false); + m_oldSelection.clear(); + m_view->setAutoScroll(false); + } + + const int index = m_view->itemAt(pos); + + if (index >= 0 && index == m_pressedIndex) { + // The release event is done above the same item as the press event + + if (m_clearSelectionIfItemsAreNotDragged) { + // A selected item has been clicked, but no drag operation has been started + // -> clear the rest of the selection. + m_selectionManager->clearSelection(); + m_selectionManager->setSelected(m_pressedIndex, 1, KItemListSelectionManager::Select); + m_selectionManager->beginAnchoredSelection(m_pressedIndex); + } + + if (buttons & Qt::LeftButton) { + bool emitItemActivated = true; + if (m_view->isAboveExpansionToggle(index, pos)) { + const bool expanded = m_model->isExpanded(index); + m_model->setExpanded(index, !expanded); + + emit itemExpansionToggleClicked(index); + emitItemActivated = false; + } else if (shiftOrControlPressed) { + // The mouse click should only update the selection, not trigger the item + emitItemActivated = false; + } else if (!(m_view->style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick) || m_singleClickActivationEnforced)) { + if (touch) { + emitItemActivated = true; + } else { + emitItemActivated = false; + } + } + if (emitItemActivated) { + emit itemActivated(index); + } + } else if (buttons & Qt::MiddleButton) { + emit itemMiddleClicked(index); + } + } + + m_pressedMousePos = QPointF(); + m_pressedIndex = -1; + m_clearSelectionIfItemsAreNotDragged = false; + return false; +} + +void KItemListController::startRubberBand() +{ + if (m_selectionBehavior == MultiSelection) { + QPointF startPos = m_pressedMousePos; + if (m_view->scrollOrientation() == Qt::Vertical) { + startPos.ry() += m_view->scrollOffset(); + if (m_view->itemSize().width() < 0) { + // Use a special rubberband for views that have only one column and + // expand the rubberband to use the whole width of the view. + startPos.setX(0); + } + } else { + startPos.rx() += m_view->scrollOffset(); + } + + m_oldSelection = m_selectionManager->selectedItems(); + KItemListRubberBand* rubberBand = m_view->rubberBand(); + rubberBand->setStartPosition(startPos); + rubberBand->setEndPosition(startPos); + rubberBand->setActive(true); + connect(rubberBand, &KItemListRubberBand::endPositionChanged, this, &KItemListController::slotRubberBandChanged); + m_view->setAutoScroll(true); + } +} + +void KItemListController::slotStateChanged(QScroller::State newState) +{ + if (newState == QScroller::Scrolling) { + m_scrollerIsScrolling = true; + } else if (newState == QScroller::Inactive) { + m_scrollerIsScrolling = false; + } +} diff --git a/src/kitemviews/kitemlistcontroller.h b/src/kitemviews/kitemlistcontroller.h index 6d9b2ac6a..cdbc5b470 100644 --- a/src/kitemviews/kitemlistcontroller.h +++ b/src/kitemviews/kitemlistcontroller.h @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * Based on the Itemviews NG project from Trolltech Labs * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * Based on the Itemviews NG project from Trolltech Labs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMLISTCONTROLLER_H #define KITEMLISTCONTROLLER_H @@ -27,6 +14,7 @@ #include <QObject> #include <QPointF> +#include <QScroller> class QTimer; class KItemModelBase; @@ -34,6 +22,7 @@ class KItemListKeyboardSearchManager; class KItemListSelectionManager; class KItemListView; class KItemListWidget; +class QGestureEvent; class QGraphicsSceneHoverEvent; class QGraphicsSceneDragDropEvent; class QGraphicsSceneMouseEvent; @@ -41,7 +30,9 @@ class QGraphicsSceneResizeEvent; class QGraphicsSceneWheelEvent; class QInputMethodEvent; class QKeyEvent; +class QTapGesture; class QTransform; +class QTouchEvent; /** * @brief Controls the view, model and selection of an item-list. @@ -221,6 +212,14 @@ signals: void selectedItemTextPressed(int index); + void scrollerStop(); + void increaseZoom(); + void decreaseZoom(); + void swipeUp(); + +public slots: + void slotStateChanged(QScroller::State newState); + private slots: void slotViewScrollOffsetChanged(qreal current, qreal previous); @@ -302,11 +301,27 @@ private: bool hoverLeaveEvent(QGraphicsSceneHoverEvent* event, const QTransform& transform); bool wheelEvent(QGraphicsSceneWheelEvent* event, const QTransform& transform); bool resizeEvent(QGraphicsSceneResizeEvent* event, const QTransform& transform); + bool gestureEvent(QGestureEvent* event, const QTransform& transform); + bool touchBeginEvent(QTouchEvent* event, const QTransform& transform); + void tapTriggered(QTapGesture* tap, const QTransform& transform); + void tapAndHoldTriggered(QGestureEvent* event, const QTransform& transform); + void pinchTriggered(QGestureEvent* event, const QTransform& transform); + void swipeTriggered(QGestureEvent* event, const QTransform& transform); + void twoFingerTapTriggered(QGestureEvent* event, const QTransform& transform); + bool onPress(const QPoint& screenPos, const QPointF& pos, const Qt::KeyboardModifiers modifiers, const Qt::MouseButtons buttons); + bool onRelease(const QPointF& pos, const Qt::KeyboardModifiers modifiers, const Qt::MouseButtons buttons, bool touch); + void startRubberBand(); private: bool m_singleClickActivationEnforced; bool m_selectionTogglePressed; bool m_clearSelectionIfItemsAreNotDragged; + bool m_isSwipeGesture; + bool m_dragActionOrRightClick; + bool m_scrollerIsScrolling; + bool m_pinchGestureInProgress; + bool m_mousePress; + bool m_isTouchEvent; SelectionBehavior m_selectionBehavior; AutoActivationBehavior m_autoActivationBehavior; MouseDoubleClickAction m_mouseDoubleClickAction; @@ -319,6 +334,9 @@ private: QTimer* m_autoActivationTimer; + Qt::GestureType m_swipeGesture; + Qt::GestureType m_twoFingerTapGesture; + /** * When starting a rubberband selection during a Shift- or Control-key has been * pressed the current selection should never be deleted. To be able to restore diff --git a/src/kitemviews/kitemlistgroupheader.cpp b/src/kitemviews/kitemlistgroupheader.cpp index 0c495693c..80dd94149 100644 --- a/src/kitemviews/kitemlistgroupheader.cpp +++ b/src/kitemviews/kitemlistgroupheader.cpp @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * Based on the Itemviews NG project from Trolltech Labs * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * Based on the Itemviews NG project from Trolltech Labs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kstandarditemlistgroupheader.h" diff --git a/src/kitemviews/kitemlistgroupheader.h b/src/kitemviews/kitemlistgroupheader.h index 0e5c61f74..4ba469056 100644 --- a/src/kitemviews/kitemlistgroupheader.h +++ b/src/kitemviews/kitemlistgroupheader.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMLISTGROUPHEADER_H #define KITEMLISTGROUPHEADER_H diff --git a/src/kitemviews/kitemlistheader.cpp b/src/kitemviews/kitemlistheader.cpp index a82af44e7..d0a09704e 100644 --- a/src/kitemviews/kitemlistheader.cpp +++ b/src/kitemviews/kitemlistheader.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemlistheader.h" #include "kitemlistview.h" diff --git a/src/kitemviews/kitemlistheader.h b/src/kitemviews/kitemlistheader.h index 95258a592..e8cfc420a 100644 --- a/src/kitemviews/kitemlistheader.h +++ b/src/kitemviews/kitemlistheader.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMLISTHEADER_H #define KITEMLISTHEADER_H diff --git a/src/kitemviews/kitemlistselectionmanager.cpp b/src/kitemviews/kitemlistselectionmanager.cpp index 6bee19414..3cb051a23 100644 --- a/src/kitemviews/kitemlistselectionmanager.cpp +++ b/src/kitemviews/kitemlistselectionmanager.cpp @@ -1,24 +1,11 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * Copyright (C) 2011 by Frank Reininghaus <[email protected]> * - * * - * Based on the Itemviews NG project from Trolltech Labs * - * * - * 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: 2011 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2011 Frank Reininghaus <[email protected]> + * + * Based on the Itemviews NG project from Trolltech Labs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemlistselectionmanager.h" diff --git a/src/kitemviews/kitemlistselectionmanager.h b/src/kitemviews/kitemlistselectionmanager.h index 6b0435139..2be578399 100644 --- a/src/kitemviews/kitemlistselectionmanager.h +++ b/src/kitemviews/kitemlistselectionmanager.h @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * Based on the Itemviews NG project from Trolltech Labs * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * Based on the Itemviews NG project from Trolltech Labs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMLISTSELECTIONMANAGER_H #define KITEMLISTSELECTIONMANAGER_H diff --git a/src/kitemviews/kitemliststyleoption.cpp b/src/kitemviews/kitemliststyleoption.cpp index 84054aaac..6e4aaa96e 100644 --- a/src/kitemviews/kitemliststyleoption.cpp +++ b/src/kitemviews/kitemliststyleoption.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemliststyleoption.h" diff --git a/src/kitemviews/kitemliststyleoption.h b/src/kitemviews/kitemliststyleoption.h index 381f4bbe5..62e462a5d 100644 --- a/src/kitemviews/kitemliststyleoption.h +++ b/src/kitemviews/kitemliststyleoption.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMLISTSTYLEOPTION_H #define KITEMLISTSTYLEOPTION_H diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp index f00805242..4d9bf083f 100644 --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * Based on the Itemviews NG project from Trolltech Labs * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * Based on the Itemviews NG project from Trolltech Labs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemlistview.h" @@ -37,6 +24,7 @@ #include <QElapsedTimer> #include <QGraphicsSceneMouseEvent> #include <QGraphicsView> +#include <QPropertyAnimation> #include <QStyleOptionRubberBand> #include <QTimer> @@ -93,14 +81,17 @@ KItemListView::KItemListView(QGraphicsWidget* parent) : m_oldMaximumItemOffset(0), m_skipAutoScrollForRubberBand(false), m_rubberBand(nullptr), + m_tapAndHoldIndicator(nullptr), m_mousePos(), m_autoScrollIncrement(0), m_autoScrollTimer(nullptr), m_header(nullptr), m_headerWidget(nullptr), + m_indicatorAnimation(nullptr), m_dropIndicator() { setAcceptHoverEvents(true); + setAcceptTouchEvents(true); m_sizeHintResolver = new KItemListSizeHintResolver(this); @@ -118,6 +109,23 @@ KItemListView::KItemListView(QGraphicsWidget* parent) : m_rubberBand = new KItemListRubberBand(this); connect(m_rubberBand, &KItemListRubberBand::activationChanged, this, &KItemListView::slotRubberBandActivationChanged); + m_tapAndHoldIndicator = new KItemListRubberBand(this); + m_indicatorAnimation = new QPropertyAnimation(m_tapAndHoldIndicator, "endPosition", this); + connect(m_tapAndHoldIndicator, &KItemListRubberBand::activationChanged, this, [this](bool active) { + if (active) { + m_indicatorAnimation->setDuration(150); + m_indicatorAnimation->setStartValue(QPointF(1, 1)); + m_indicatorAnimation->setEndValue(QPointF(40, 40)); + m_indicatorAnimation->start(); + } + update(); + }); + connect(m_tapAndHoldIndicator, &KItemListRubberBand::endPositionChanged, this, [this]() { + if (m_tapAndHoldIndicator->isActive()) { + update(); + } + }); + m_headerWidget = new KItemListHeaderWidget(this); m_headerWidget->setVisible(false); @@ -671,6 +679,18 @@ void KItemListView::paint(QPainter* painter, const QStyleOptionGraphicsItem* opt style()->drawControl(QStyle::CE_RubberBand, &opt, painter); } + if (m_tapAndHoldIndicator->isActive()) { + const QPointF indicatorSize = m_tapAndHoldIndicator->endPosition(); + const QRectF rubberBandRect = QRectF(m_tapAndHoldIndicator->startPosition() - indicatorSize, + (m_tapAndHoldIndicator->startPosition()) + indicatorSize).normalized(); + QStyleOptionRubberBand opt; + initStyleOption(&opt); + opt.shape = QRubberBand::Rectangle; + opt.opaque = false; + opt.rect = rubberBandRect.toRect(); + style()->drawControl(QStyle::CE_RubberBand, &opt, painter); + } + if (!m_dropIndicator.isEmpty()) { const QRectF r = m_dropIndicator.toRect(); diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h index 2a3b7ada2..df582aad0 100644 --- a/src/kitemviews/kitemlistview.h +++ b/src/kitemviews/kitemlistview.h @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * Based on the Itemviews NG project from Trolltech Labs * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * Based on the Itemviews NG project from Trolltech Labs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMLISTVIEW_H #define KITEMLISTVIEW_H @@ -44,6 +31,7 @@ class KItemListWidget; class KItemListWidgetInformant; class KItemListWidgetCreatorBase; class QTimer; +class QPropertyAnimation; /** * @brief Represents the view of an item-list. @@ -740,6 +728,7 @@ private: bool m_skipAutoScrollForRubberBand; KItemListRubberBand* m_rubberBand; + KItemListRubberBand* m_tapAndHoldIndicator; QPointF m_mousePos; int m_autoScrollIncrement; @@ -748,6 +737,8 @@ private: KItemListHeader* m_header; KItemListHeaderWidget* m_headerWidget; + QPropertyAnimation* m_indicatorAnimation; + // When dragging items into the view where the sort-role of the model // is empty, a visual indicator should be shown during dragging where // the dropping will happen. This indicator is specified by an index diff --git a/src/kitemviews/kitemlistviewaccessible.cpp b/src/kitemviews/kitemlistviewaccessible.cpp index 0188408a7..5f3753525 100644 --- a/src/kitemviews/kitemlistviewaccessible.cpp +++ b/src/kitemviews/kitemlistviewaccessible.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Amandeep Singh <[email protected]> * - * * - * 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: 2012 Amandeep Singh <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef QT_NO_ACCESSIBILITY diff --git a/src/kitemviews/kitemlistviewaccessible.h b/src/kitemviews/kitemlistviewaccessible.h index 3e39e2399..cdef2ccca 100644 --- a/src/kitemviews/kitemlistviewaccessible.h +++ b/src/kitemviews/kitemlistviewaccessible.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Amandeep Singh <[email protected]> * - * * - * 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: 2012 Amandeep Singh <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMLISTVIEWACCESSIBLE_H #define KITEMLISTVIEWACCESSIBLE_H diff --git a/src/kitemviews/kitemlistwidget.cpp b/src/kitemviews/kitemlistwidget.cpp index 42bf9ebdc..fce06a53f 100644 --- a/src/kitemviews/kitemlistwidget.cpp +++ b/src/kitemviews/kitemlistwidget.cpp @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * Based on the Itemviews NG project from Trolltech Labs * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * Based on the Itemviews NG project from Trolltech Labs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemlistwidget.h" diff --git a/src/kitemviews/kitemlistwidget.h b/src/kitemviews/kitemlistwidget.h index 66b2da069..aad499853 100644 --- a/src/kitemviews/kitemlistwidget.h +++ b/src/kitemviews/kitemlistwidget.h @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * Based on the Itemviews NG project from Trolltech Labs * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * Based on the Itemviews NG project from Trolltech Labs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMLISTWIDGET_H #define KITEMLISTWIDGET_H diff --git a/src/kitemviews/kitemmodelbase.cpp b/src/kitemviews/kitemmodelbase.cpp index faabdbe1d..795a1a2f5 100644 --- a/src/kitemviews/kitemmodelbase.cpp +++ b/src/kitemviews/kitemmodelbase.cpp @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * Based on the Itemviews NG project from Trolltech Labs * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * Based on the Itemviews NG project from Trolltech Labs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemmodelbase.h" diff --git a/src/kitemviews/kitemmodelbase.h b/src/kitemviews/kitemmodelbase.h index a6ba3f7c4..d68eab568 100644 --- a/src/kitemviews/kitemmodelbase.h +++ b/src/kitemviews/kitemmodelbase.h @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * Based on the Itemviews NG project from Trolltech Labs * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * Based on the Itemviews NG project from Trolltech Labs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMMODELBASE_H #define KITEMMODELBASE_H diff --git a/src/kitemviews/kitemrange.h b/src/kitemviews/kitemrange.h index f62305a39..0ea068062 100644 --- a/src/kitemviews/kitemrange.h +++ b/src/kitemviews/kitemrange.h @@ -1,24 +1,11 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * Copyright (C) 2013 by Frank Reininghaus <[email protected]> * - * * - * Based on the Itemviews NG project from Trolltech Labs * - * * - * 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: 2011 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2013 Frank Reininghaus <[email protected]> + * + * Based on the Itemviews NG project from Trolltech Labs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMRANGE_H #define KITEMRANGE_H diff --git a/src/kitemviews/kitemset.cpp b/src/kitemviews/kitemset.cpp index e36829eb5..ea96efd11 100644 --- a/src/kitemviews/kitemset.cpp +++ b/src/kitemviews/kitemset.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2013 by Frank Reininghaus <[email protected]> * - * * - * 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: 2013 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemset.h" diff --git a/src/kitemviews/kitemset.h b/src/kitemviews/kitemset.h index 14aa665a1..e66b47f28 100644 --- a/src/kitemviews/kitemset.h +++ b/src/kitemviews/kitemset.h @@ -1,21 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2013 by Frank Reininghaus <[email protected]> * - * * - * 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: 2013 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + #ifndef KITEMSET_H #define KITEMSET_H diff --git a/src/kitemviews/kstandarditem.cpp b/src/kitemviews/kstandarditem.cpp index b0673236f..39121ab31 100644 --- a/src/kitemviews/kstandarditem.cpp +++ b/src/kitemviews/kstandarditem.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kstandarditem.h" #include "kstandarditemmodel.h" diff --git a/src/kitemviews/kstandarditem.h b/src/kitemviews/kstandarditem.h index 13e61a089..265483d50 100644 --- a/src/kitemviews/kstandarditem.h +++ b/src/kitemviews/kstandarditem.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KSTANDARDITEM_H #define KSTANDARDITEM_H diff --git a/src/kitemviews/kstandarditemlistgroupheader.cpp b/src/kitemviews/kstandarditemlistgroupheader.cpp index 062b20e90..22eefe5ea 100644 --- a/src/kitemviews/kstandarditemlistgroupheader.cpp +++ b/src/kitemviews/kstandarditemlistgroupheader.cpp @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * Based on the Itemviews NG project from Trolltech Labs * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * Based on the Itemviews NG project from Trolltech Labs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kstandarditemlistgroupheader.h" diff --git a/src/kitemviews/kstandarditemlistgroupheader.h b/src/kitemviews/kstandarditemlistgroupheader.h index c420a58b1..ff428c4ea 100644 --- a/src/kitemviews/kstandarditemlistgroupheader.h +++ b/src/kitemviews/kstandarditemlistgroupheader.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KSTANDARDITEMLISTGROUPHEADER_H #define KSTANDARDITEMLISTGROUPHEADER_H diff --git a/src/kitemviews/kstandarditemlistview.cpp b/src/kitemviews/kstandarditemlistview.cpp index 097f681c5..bc766a5dc 100644 --- a/src/kitemviews/kstandarditemlistview.cpp +++ b/src/kitemviews/kstandarditemlistview.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kstandarditemlistview.h" diff --git a/src/kitemviews/kstandarditemlistview.h b/src/kitemviews/kstandarditemlistview.h index cf5ce5fc1..7f0550ec3 100644 --- a/src/kitemviews/kstandarditemlistview.h +++ b/src/kitemviews/kstandarditemlistview.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KSTANDARDITEMLISTVIEW_H #define KSTANDARDITEMLISTVIEW_H diff --git a/src/kitemviews/kstandarditemlistwidget.cpp b/src/kitemviews/kstandarditemlistwidget.cpp index 3faf786c9..3939fd237 100644 --- a/src/kitemviews/kstandarditemlistwidget.cpp +++ b/src/kitemviews/kstandarditemlistwidget.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kstandarditemlistwidget.h" diff --git a/src/kitemviews/kstandarditemlistwidget.h b/src/kitemviews/kstandarditemlistwidget.h index e7f2de2e0..d036aae66 100644 --- a/src/kitemviews/kstandarditemlistwidget.h +++ b/src/kitemviews/kstandarditemlistwidget.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KSTANDARDITEMLISTWIDGET_H #define KSTANDARDITEMLISTWIDGET_H diff --git a/src/kitemviews/kstandarditemmodel.cpp b/src/kitemviews/kstandarditemmodel.cpp index c40050c7e..ceadff257 100644 --- a/src/kitemviews/kstandarditemmodel.cpp +++ b/src/kitemviews/kstandarditemmodel.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kstandarditemmodel.h" diff --git a/src/kitemviews/kstandarditemmodel.h b/src/kitemviews/kstandarditemmodel.h index 8643d2e9e..d92ec5d46 100644 --- a/src/kitemviews/kstandarditemmodel.h +++ b/src/kitemviews/kstandarditemmodel.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KSTANDARDITEMMODEL_H #define KSTANDARDITEMMODEL_H diff --git a/src/kitemviews/private/kbaloorolesprovider.cpp b/src/kitemviews/private/kbaloorolesprovider.cpp index 0f7100faa..d45b06777 100644 --- a/src/kitemviews/private/kbaloorolesprovider.cpp +++ b/src/kitemviews/private/kbaloorolesprovider.cpp @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * Copyright (C) 2013 by Vishesh Handa <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2013 Vishesh Handa <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kbaloorolesprovider.h" diff --git a/src/kitemviews/private/kbaloorolesprovider.h b/src/kitemviews/private/kbaloorolesprovider.h index cd5131df8..99c601e16 100644 --- a/src/kitemviews/private/kbaloorolesprovider.h +++ b/src/kitemviews/private/kbaloorolesprovider.h @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * Copyright (C) 2013 by Vishesh Handa <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2013 Vishesh Handa <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KBALOO_ROLESPROVIDER_H #define KBALOO_ROLESPROVIDER_H diff --git a/src/kitemviews/private/kdirectorycontentscounter.cpp b/src/kitemviews/private/kdirectorycontentscounter.cpp index 608f9f582..df45c4173 100644 --- a/src/kitemviews/private/kdirectorycontentscounter.cpp +++ b/src/kitemviews/private/kdirectorycontentscounter.cpp @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * Copyright (C) 2013 by Frank Reininghaus <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2013 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kdirectorycontentscounter.h" #include "kitemviews/kfileitemmodel.h" diff --git a/src/kitemviews/private/kdirectorycontentscounter.h b/src/kitemviews/private/kdirectorycontentscounter.h index d5baf3462..cc8616ff7 100644 --- a/src/kitemviews/private/kdirectorycontentscounter.h +++ b/src/kitemviews/private/kdirectorycontentscounter.h @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * Copyright (C) 2013 by Frank Reininghaus <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2013 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KDIRECTORYCONTENTSCOUNTER_H #define KDIRECTORYCONTENTSCOUNTER_H diff --git a/src/kitemviews/private/kdirectorycontentscounterworker.cpp b/src/kitemviews/private/kdirectorycontentscounterworker.cpp index 1e4a0b3b4..59ff471ae 100644 --- a/src/kitemviews/private/kdirectorycontentscounterworker.cpp +++ b/src/kitemviews/private/kdirectorycontentscounterworker.cpp @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * Copyright (C) 2013 by Frank Reininghaus <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2013 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kdirectorycontentscounterworker.h" diff --git a/src/kitemviews/private/kdirectorycontentscounterworker.h b/src/kitemviews/private/kdirectorycontentscounterworker.h index fac9978d5..8e6359746 100644 --- a/src/kitemviews/private/kdirectorycontentscounterworker.h +++ b/src/kitemviews/private/kdirectorycontentscounterworker.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2013 by Frank Reininghaus <[email protected]> * - * * - * 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: 2013 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KDIRECTORYCONTENTSCOUNTERWORKER_H #define KDIRECTORYCONTENTSCOUNTERWORKER_H diff --git a/src/kitemviews/private/kfileitemclipboard.cpp b/src/kitemviews/private/kfileitemclipboard.cpp index d6cc87e1d..e1deda3dd 100644 --- a/src/kitemviews/private/kfileitemclipboard.cpp +++ b/src/kitemviews/private/kfileitemclipboard.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kfileitemclipboard.h" diff --git a/src/kitemviews/private/kfileitemclipboard.h b/src/kitemviews/private/kfileitemclipboard.h index 9a727ab9f..7495c32dd 100644 --- a/src/kitemviews/private/kfileitemclipboard.h +++ b/src/kitemviews/private/kfileitemclipboard.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KFILEITEMCLIPBOARD_H #define KFILEITEMCLIPBOARD_H diff --git a/src/kitemviews/private/kfileitemmodeldirlister.cpp b/src/kitemviews/private/kfileitemmodeldirlister.cpp index c690e9fdf..accd200ef 100644 --- a/src/kitemviews/private/kfileitemmodeldirlister.cpp +++ b/src/kitemviews/private/kfileitemmodeldirlister.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006-2012 by Peter Penz <[email protected]> * - * * - * 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-2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kfileitemmodeldirlister.h" diff --git a/src/kitemviews/private/kfileitemmodeldirlister.h b/src/kitemviews/private/kfileitemmodeldirlister.h index 72466d508..c44c136b0 100644 --- a/src/kitemviews/private/kfileitemmodeldirlister.h +++ b/src/kitemviews/private/kfileitemmodeldirlister.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006-2012 by Peter Penz <[email protected]> * - * * - * 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-2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KFILEITEMMODELDIRLISTER_H #define KFILEITEMMODELDIRLISTER_H diff --git a/src/kitemviews/private/kfileitemmodelfilter.cpp b/src/kitemviews/private/kfileitemmodelfilter.cpp index bcd875132..bb695e266 100644 --- a/src/kitemviews/private/kfileitemmodelfilter.cpp +++ b/src/kitemviews/private/kfileitemmodelfilter.cpp @@ -1,22 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Janardhan Reddy * - * <[email protected]> * - * * - * 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: 2011 Janardhan Reddy <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kfileitemmodelfilter.h" diff --git a/src/kitemviews/private/kfileitemmodelfilter.h b/src/kitemviews/private/kfileitemmodelfilter.h index b56e0ad5b..f55a8097d 100644 --- a/src/kitemviews/private/kfileitemmodelfilter.h +++ b/src/kitemviews/private/kfileitemmodelfilter.h @@ -1,22 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Janardhan Reddy * - * <[email protected]> * - * * - * 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: 2011 Janardhan Reddy <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KFILEITEMMODELFILTER_H #define KFILEITEMMODELFILTER_H diff --git a/src/kitemviews/private/kfileitemmodelsortalgorithm.h b/src/kitemviews/private/kfileitemmodelsortalgorithm.h index ff484a7e8..4ee6095ca 100644 --- a/src/kitemviews/private/kfileitemmodelsortalgorithm.h +++ b/src/kitemviews/private/kfileitemmodelsortalgorithm.h @@ -1,23 +1,10 @@ -/***************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * Copyright (C) 2012 by Emmanuel Pescosta <[email protected]> * - * Copyright (C) 2013 by Frank Reininghaus <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2012 Emmanuel Pescosta <[email protected]> + * SPDX-FileCopyrightText: 2013 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KFILEITEMMODELSORTALGORITHM_H #define KFILEITEMMODELSORTALGORITHM_H @@ -31,7 +18,7 @@ * worst-case of O(n * log(n)) and to keep the number of comparisons low. * * The implementation is based on qStableSortHelper() from qalgorithms.h - * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). + * SPDX-FileCopyrightText: 2011 Nokia Corporation and/or its subsidiary(-ies). */ template <typename RandomAccessIterator, typename LessThan> @@ -40,7 +27,7 @@ static void mergeSort(RandomAccessIterator begin, const LessThan& lessThan) { // The implementation is based on qStableSortHelper() from qalgorithms.h - // Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). + // SPDX-FileCopyrightText: 2011 Nokia Corporation and/or its subsidiary(-ies). const int span = end - begin; if (span < 2) { @@ -92,7 +79,7 @@ static void parallelMergeSort(RandomAccessIterator begin, * \a begin and \a end. * * The implementation is based on qMerge() from qalgorithms.h - * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). + * SPDX-FileCopyrightText: 2011 Nokia Corporation and/or its subsidiary(-ies). */ template <typename RandomAccessIterator, typename LessThan> @@ -102,7 +89,7 @@ static void merge(RandomAccessIterator begin, const LessThan& lessThan) { // The implementation is based on qMerge() from qalgorithms.h - // Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). + // SPDX-FileCopyrightText: 2011 Nokia Corporation and/or its subsidiary(-ies). const int len1 = pivot - begin; const int len2 = end - pivot; diff --git a/src/kitemviews/private/kitemlistheaderwidget.cpp b/src/kitemviews/private/kitemlistheaderwidget.cpp index 9263a7de2..c28231e1c 100644 --- a/src/kitemviews/private/kitemlistheaderwidget.cpp +++ b/src/kitemviews/private/kitemlistheaderwidget.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemlistheaderwidget.h" #include "kitemviews/kitemmodelbase.h" @@ -396,7 +383,7 @@ void KItemListHeaderWidget::paintRole(QPainter* painter, QWidget* widget) const { // The following code is based on the code from QHeaderView::paintSection(). - // Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). + // SPDX-FileCopyrightText: 2011 Nokia Corporation and/or its subsidiary(-ies). QStyleOptionHeader option; option.section = orderIndex; option.state = QStyle::State_None | QStyle::State_Raised | QStyle::State_Horizontal; diff --git a/src/kitemviews/private/kitemlistheaderwidget.h b/src/kitemviews/private/kitemlistheaderwidget.h index 350588f00..ca85f2139 100644 --- a/src/kitemviews/private/kitemlistheaderwidget.h +++ b/src/kitemviews/private/kitemlistheaderwidget.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMLISTHEADERWIDGET_H #define KITEMLISTHEADERWIDGET_H diff --git a/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp b/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp index 1fa6f7a7b..97e2b0b32 100644 --- a/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp +++ b/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2011 by Tirtha Chatterjee <[email protected]> * - * * - * Based on the Itemviews NG project from Trolltech Labs * - * * - * 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: 2011 Tirtha Chatterjee <[email protected]> + * + * Based on the Itemviews NG project from Trolltech Labs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemlistkeyboardsearchmanager.h" diff --git a/src/kitemviews/private/kitemlistkeyboardsearchmanager.h b/src/kitemviews/private/kitemlistkeyboardsearchmanager.h index d0161f927..27c9a203f 100644 --- a/src/kitemviews/private/kitemlistkeyboardsearchmanager.h +++ b/src/kitemviews/private/kitemlistkeyboardsearchmanager.h @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2011 by Tirtha Chatterjee <[email protected]> * - * * - * Based on the Itemviews NG project from Trolltech Labs * - * * - * 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: 2011 Tirtha Chatterjee <[email protected]> + * + * Based on the Itemviews NG project from Trolltech Labs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMLISTKEYBOARDSEARCHMANAGER_H #define KITEMLISTKEYBOARDSEARCHMANAGER_H diff --git a/src/kitemviews/private/kitemlistroleeditor.cpp b/src/kitemviews/private/kitemlistroleeditor.cpp index eb6f1de76..75fd6a0c7 100644 --- a/src/kitemviews/private/kitemlistroleeditor.cpp +++ b/src/kitemviews/private/kitemlistroleeditor.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemlistroleeditor.h" diff --git a/src/kitemviews/private/kitemlistroleeditor.h b/src/kitemviews/private/kitemlistroleeditor.h index 7285d62f7..a63680624 100644 --- a/src/kitemviews/private/kitemlistroleeditor.h +++ b/src/kitemviews/private/kitemlistroleeditor.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMLISTROLEEDITOR_H #define KITEMLISTROLEEDITOR_H diff --git a/src/kitemviews/private/kitemlistrubberband.cpp b/src/kitemviews/private/kitemlistrubberband.cpp index 702873126..309a82833 100644 --- a/src/kitemviews/private/kitemlistrubberband.cpp +++ b/src/kitemviews/private/kitemlistrubberband.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemlistrubberband.h" diff --git a/src/kitemviews/private/kitemlistrubberband.h b/src/kitemviews/private/kitemlistrubberband.h index 7d24857a9..7886b1e84 100644 --- a/src/kitemviews/private/kitemlistrubberband.h +++ b/src/kitemviews/private/kitemlistrubberband.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMLISTRUBBERBAND_H #define KITEMLISTRUBBERBAND_H @@ -31,6 +18,7 @@ class DOLPHIN_EXPORT KItemListRubberBand : public QObject { Q_OBJECT + Q_PROPERTY(QPointF endPosition MEMBER m_endPos READ endPosition WRITE setEndPosition) public: explicit KItemListRubberBand(QObject* parent = nullptr); diff --git a/src/kitemviews/private/kitemlistselectiontoggle.cpp b/src/kitemviews/private/kitemlistselectiontoggle.cpp index 48c6854aa..2905e2925 100644 --- a/src/kitemviews/private/kitemlistselectiontoggle.cpp +++ b/src/kitemviews/private/kitemlistselectiontoggle.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemlistselectiontoggle.h" diff --git a/src/kitemviews/private/kitemlistselectiontoggle.h b/src/kitemviews/private/kitemlistselectiontoggle.h index a537a9904..0a592653e 100644 --- a/src/kitemviews/private/kitemlistselectiontoggle.h +++ b/src/kitemviews/private/kitemlistselectiontoggle.h @@ -1,22 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMLISTSELECTIONTOGGLE_H #define KITEMLISTSELECTIONTOGGLE_H diff --git a/src/kitemviews/private/kitemlistsizehintresolver.cpp b/src/kitemviews/private/kitemlistsizehintresolver.cpp index 66784f191..7021c5296 100644 --- a/src/kitemviews/private/kitemlistsizehintresolver.cpp +++ b/src/kitemviews/private/kitemlistsizehintresolver.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemlistsizehintresolver.h" #include "kitemviews/kitemlistview.h" diff --git a/src/kitemviews/private/kitemlistsizehintresolver.h b/src/kitemviews/private/kitemlistsizehintresolver.h index 96a9dd1bc..7878c8c63 100644 --- a/src/kitemviews/private/kitemlistsizehintresolver.h +++ b/src/kitemviews/private/kitemlistsizehintresolver.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMLISTSIZEHINTRESOLVER_H #define KITEMLISTSIZEHINTRESOLVER_H diff --git a/src/kitemviews/private/kitemlistsmoothscroller.cpp b/src/kitemviews/private/kitemlistsmoothscroller.cpp index cdb7f255b..6b475b5f0 100644 --- a/src/kitemviews/private/kitemlistsmoothscroller.cpp +++ b/src/kitemviews/private/kitemlistsmoothscroller.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemlistsmoothscroller.h" diff --git a/src/kitemviews/private/kitemlistsmoothscroller.h b/src/kitemviews/private/kitemlistsmoothscroller.h index a5aca82e6..c0e02491e 100644 --- a/src/kitemviews/private/kitemlistsmoothscroller.h +++ b/src/kitemviews/private/kitemlistsmoothscroller.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMLISTSMOOTHSCROLLER_H #define KITEMLISTSMOOTHSCROLLER_H diff --git a/src/kitemviews/private/kitemlistviewanimation.cpp b/src/kitemviews/private/kitemlistviewanimation.cpp index ccc387529..67b9cc113 100644 --- a/src/kitemviews/private/kitemlistviewanimation.cpp +++ b/src/kitemviews/private/kitemlistviewanimation.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemlistviewanimation.h" #include "kitemviews/kitemlistview.h" diff --git a/src/kitemviews/private/kitemlistviewanimation.h b/src/kitemviews/private/kitemlistviewanimation.h index f73ea7fb7..3f6772b8b 100644 --- a/src/kitemviews/private/kitemlistviewanimation.h +++ b/src/kitemviews/private/kitemlistviewanimation.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMLISTVIEWANIMATION_H #define KITEMLISTVIEWANIMATION_H diff --git a/src/kitemviews/private/kitemlistviewlayouter.cpp b/src/kitemviews/private/kitemlistviewlayouter.cpp index 56e0f338f..6de83ca87 100644 --- a/src/kitemviews/private/kitemlistviewlayouter.cpp +++ b/src/kitemviews/private/kitemlistviewlayouter.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemlistviewlayouter.h" #include "dolphindebug.h" diff --git a/src/kitemviews/private/kitemlistviewlayouter.h b/src/kitemviews/private/kitemlistviewlayouter.h index 6cdce666f..d5dc6dae1 100644 --- a/src/kitemviews/private/kitemlistviewlayouter.h +++ b/src/kitemviews/private/kitemlistviewlayouter.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KITEMLISTVIEWLAYOUTER_H #define KITEMLISTVIEWLAYOUTER_H diff --git a/src/kitemviews/private/kpixmapmodifier.cpp b/src/kitemviews/private/kpixmapmodifier.cpp index 402fccfde..5bcb3b8f5 100644 --- a/src/kitemviews/private/kpixmapmodifier.cpp +++ b/src/kitemviews/private/kpixmapmodifier.cpp @@ -2,34 +2,15 @@ /* This file is a part of the KDE project - Copyright © 2006 Zack Rusin <[email protected]> - Copyright © 2006-2007, 2008 Fredrik Höglund <[email protected]> + SPDX-FileCopyrightText: 2006 Zack Rusin <[email protected]> + SPDX-FileCopyrightText: 2006-2007, 2008 Fredrik Höglund <[email protected]> The stack blur algorithm was invented by Mario Klingemann <[email protected]> This implementation is based on the version in Anti-Grain Geometry Version 2.4, - Copyright © 2002-2005 Maxim Shemanarev (http://www.antigrain.com) + SPDX-FileCopyrightText: 2002-2005 Maxim Shemanarev (http://www.antigrain.com) - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + SPDX-License-Identifier: BSD-2-Clause */ #include "kpixmapmodifier.h" diff --git a/src/kitemviews/private/kpixmapmodifier.h b/src/kitemviews/private/kpixmapmodifier.h index 3f7747b55..d8d7f2394 100644 --- a/src/kitemviews/private/kpixmapmodifier.h +++ b/src/kitemviews/private/kpixmapmodifier.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KPIXMAPMODIFIER_H #define KPIXMAPMODIFIER_H diff --git a/src/kitemviews/private/ktwofingerswipe.cpp b/src/kitemviews/private/ktwofingerswipe.cpp new file mode 100644 index 000000000..6d0e18e65 --- /dev/null +++ b/src/kitemviews/private/ktwofingerswipe.cpp @@ -0,0 +1,139 @@ +/* + * SPDX-FileCopyrightText: 2020 Steffen Hartleib <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +// Self +#include "ktwofingerswipe.h" + +// Qt +#include <QTouchEvent> +#include <QLineF> + +KTwoFingerSwipeRecognizer::KTwoFingerSwipeRecognizer() : + QGestureRecognizer(), + m_touchBeginnTimestamp(0), + m_gestureAlreadyTriggered(false) +{ +} + +KTwoFingerSwipeRecognizer::~KTwoFingerSwipeRecognizer() +{ +} + +QGesture* KTwoFingerSwipeRecognizer::create(QObject*) +{ + return static_cast<QGesture*>(new KTwoFingerSwipe()); +} + +QGestureRecognizer::Result KTwoFingerSwipeRecognizer::recognize(QGesture* gesture, QObject* watched, QEvent* event) +{ + Q_UNUSED(watched) + + KTwoFingerSwipe* const kTwoFingerSwipe = static_cast<KTwoFingerSwipe*>(gesture); + const QTouchEvent* touchEvent = static_cast<const QTouchEvent*>(event); + + const int maxTimeFrameForSwipe = 90; + const int minDistanceForSwipe = 30; + + switch (event->type()) { + case QEvent::TouchBegin: { + m_touchBeginnTimestamp = touchEvent->timestamp(); + m_gestureAlreadyTriggered = false; + kTwoFingerSwipe->setHotSpot(touchEvent->touchPoints().first().startScreenPos()); + kTwoFingerSwipe->setPos(touchEvent->touchPoints().first().startPos()); + kTwoFingerSwipe->setScreenPos(touchEvent->touchPoints().first().startScreenPos()); + kTwoFingerSwipe->setScenePos(touchEvent->touchPoints().first().startScenePos()); + return MayBeGesture; + } + + case QEvent::TouchUpdate: { + const qint64 now = touchEvent->timestamp(); + const qint64 elapsedTime = now - m_touchBeginnTimestamp; + const QPointF distance = touchEvent->touchPoints().first().startPos() - touchEvent->touchPoints().first().pos(); + kTwoFingerSwipe->setHotSpot(touchEvent->touchPoints().first().startScreenPos()); + kTwoFingerSwipe->setPos(touchEvent->touchPoints().first().startPos()); + kTwoFingerSwipe->setScreenPos(touchEvent->touchPoints().first().startScreenPos()); + kTwoFingerSwipe->setScenePos(touchEvent->touchPoints().first().startScenePos()); + const QLineF ql = QLineF(touchEvent->touchPoints().first().startPos(), touchEvent->touchPoints().first().pos()); + kTwoFingerSwipe->setSwipeAngle(ql.angle()); + + if (touchEvent->touchPoints().size() > 2) { + return CancelGesture; + } + + if (touchEvent->touchPoints().size() == 2) { + if ((elapsedTime) > maxTimeFrameForSwipe) { + return CancelGesture; + } + + if (distance.manhattanLength() >= minDistanceForSwipe && + (elapsedTime) <= maxTimeFrameForSwipe && !m_gestureAlreadyTriggered) { + m_gestureAlreadyTriggered = true; + return FinishGesture; + } else if ((elapsedTime) <= maxTimeFrameForSwipe && !m_gestureAlreadyTriggered) { + return TriggerGesture; + } + } + break; + } + + default: + return Ignore; + } + return Ignore; +} + +KTwoFingerSwipe::KTwoFingerSwipe(QObject* parent) : + QGesture(parent), + m_pos(QPointF(-1, -1)), + m_screenPos(QPointF(-1, -1)), + m_scenePos(QPointF(-1, -1)), + m_swipeAngle(0.0) +{ +} + +KTwoFingerSwipe::~KTwoFingerSwipe() +{ +} + +QPointF KTwoFingerSwipe::pos() const +{ + return m_pos; +} + +void KTwoFingerSwipe::setPos(QPointF _pos) +{ + m_pos = _pos; +} + +QPointF KTwoFingerSwipe::screenPos() const +{ + return m_screenPos; +} + +void KTwoFingerSwipe::setScreenPos(QPointF _screenPos) +{ + m_screenPos = _screenPos; +} + +QPointF KTwoFingerSwipe::scenePos() const +{ + return m_scenePos; +} + +void KTwoFingerSwipe::setScenePos(QPointF _scenePos) +{ + m_scenePos = _scenePos; +} + +qreal KTwoFingerSwipe::swipeAngle() const +{ + return m_swipeAngle; +} + void KTwoFingerSwipe::setSwipeAngle(qreal _swipeAngle) +{ + m_swipeAngle = _swipeAngle; +} + diff --git a/src/kitemviews/private/ktwofingerswipe.h b/src/kitemviews/private/ktwofingerswipe.h new file mode 100644 index 000000000..27d9d75d9 --- /dev/null +++ b/src/kitemviews/private/ktwofingerswipe.h @@ -0,0 +1,54 @@ +/* + * SPDX-FileCopyrightText: 2020 Steffen Hartleib <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef KTWOFINGERSWIPE_H +#define KTWOFINGERSWIPE_H + +#include "dolphin_export.h" +// Qt +#include <QGesture> +#include <QGestureRecognizer> + +class DOLPHIN_EXPORT KTwoFingerSwipe : public QGesture +{ + Q_OBJECT + Q_PROPERTY(QPointF pos READ pos WRITE setPos) + Q_PROPERTY(QPointF screenPos READ screenPos WRITE setScreenPos) + Q_PROPERTY(QPointF scenePos READ scenePos WRITE setScenePos) + Q_PROPERTY(qreal swipeAngle READ swipeAngle WRITE setSwipeAngle) +public: + explicit KTwoFingerSwipe(QObject* parent = nullptr); + ~KTwoFingerSwipe(); + QPointF pos() const; + void setPos(QPointF pos); + QPointF screenPos() const; + void setScreenPos(QPointF screenPos); + QPointF scenePos() const; + void setScenePos(QPointF scenePos); + qreal swipeAngle() const; + void setSwipeAngle(qreal swipeAngle); +private: + QPointF m_pos; + QPointF m_screenPos; + QPointF m_scenePos; + qreal m_swipeAngle; +}; + +class DOLPHIN_EXPORT KTwoFingerSwipeRecognizer : public QGestureRecognizer +{ +public: + explicit KTwoFingerSwipeRecognizer(); + ~KTwoFingerSwipeRecognizer(); + QGesture* create(QObject*) override; + Result recognize(QGesture*, QObject*, QEvent*) override; +private: + Q_DISABLE_COPY( KTwoFingerSwipeRecognizer ) + qint64 m_touchBeginnTimestamp; + bool m_gestureAlreadyTriggered; +}; + +#endif /* KTWOFINGERSWIPE_H */ + diff --git a/src/kitemviews/private/ktwofingertap.cpp b/src/kitemviews/private/ktwofingertap.cpp new file mode 100644 index 000000000..edd9d1d35 --- /dev/null +++ b/src/kitemviews/private/ktwofingertap.cpp @@ -0,0 +1,122 @@ +/* + * SPDX-FileCopyrightText: 2020 Steffen Hartleib <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +// Self +#include "ktwofingertap.h" + +// Qt +#include <QTouchEvent> +#include <QApplication> +#include <QGraphicsWidget> + +KTwoFingerTapRecognizer::KTwoFingerTapRecognizer() : + QGestureRecognizer(), + m_gestureTriggered(false) +{ +} + +KTwoFingerTapRecognizer::~KTwoFingerTapRecognizer() +{ +} + +QGesture* KTwoFingerTapRecognizer::create(QObject*) +{ + return static_cast<QGesture*>(new KTwoFingerTap()); +} + +QGestureRecognizer::Result KTwoFingerTapRecognizer::recognize(QGesture* gesture, QObject* watched, QEvent* event) +{ + if (qobject_cast<QGraphicsWidget*>(watched)) { + return Ignore; + } + + KTwoFingerTap* const kTwoFingerTap = static_cast<KTwoFingerTap*>(gesture); + const QTouchEvent* touchEvent = static_cast<const QTouchEvent*>(event); + + switch (event->type()) { + case QEvent::TouchBegin: { + kTwoFingerTap->setHotSpot(touchEvent->touchPoints().first().startScreenPos()); + kTwoFingerTap->setPos(touchEvent->touchPoints().first().startPos()); + kTwoFingerTap->setScreenPos(touchEvent->touchPoints().first().startScreenPos()); + kTwoFingerTap->setScenePos(touchEvent->touchPoints().first().startScenePos()); + m_gestureTriggered = false; + return MayBeGesture; + } + + case QEvent::TouchUpdate: { + + if (touchEvent->touchPoints().size() > 2) { + m_gestureTriggered = false; + return CancelGesture; + } + + if (touchEvent->touchPoints().size() == 2) { + if ((touchEvent->touchPoints().first().startPos() - touchEvent->touchPoints().first().pos()).manhattanLength() >= QApplication::startDragDistance()) { + m_gestureTriggered = false; + return CancelGesture; + } + if ((touchEvent->touchPoints().at(1).startPos() - touchEvent->touchPoints().at(1).pos()).manhattanLength() >= QApplication::startDragDistance()) { + m_gestureTriggered = false; + return CancelGesture; + } + if (touchEvent->touchPointStates() & Qt::TouchPointPressed) { + m_gestureTriggered = true; + } + if (touchEvent->touchPointStates() & Qt::TouchPointReleased && m_gestureTriggered) { + m_gestureTriggered = false; + return FinishGesture; + } + } + break; + } + + default: + return Ignore; + } + return Ignore; +} + +KTwoFingerTap::KTwoFingerTap(QObject* parent) : + QGesture(parent), + m_pos(QPointF(-1, -1)), + m_screenPos(QPointF(-1, -1)), + m_scenePos(QPointF(-1, -1)) +{ +} + +KTwoFingerTap::~KTwoFingerTap() +{ +} + +QPointF KTwoFingerTap::pos() const +{ + return m_pos; +} + +void KTwoFingerTap::setPos(QPointF _pos) +{ + m_pos = _pos; +} + +QPointF KTwoFingerTap::screenPos() const +{ + return m_screenPos; +} + +void KTwoFingerTap::setScreenPos(QPointF _screenPos) +{ + m_screenPos = _screenPos; +} + +QPointF KTwoFingerTap::scenePos() const +{ + return m_scenePos; +} + +void KTwoFingerTap::setScenePos(QPointF _scenePos) +{ + m_scenePos = _scenePos; +} diff --git a/src/kitemviews/private/ktwofingertap.h b/src/kitemviews/private/ktwofingertap.h new file mode 100644 index 000000000..614df2424 --- /dev/null +++ b/src/kitemviews/private/ktwofingertap.h @@ -0,0 +1,48 @@ +/* + * SPDX-FileCopyrightText: 2020 Steffen Hartleib <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef KTWOFINGERTAP_H +#define KTWOFINGERTAP_H + +#include <dolphin_export.h> +// Qt +#include <QGesture> +#include <QGestureRecognizer> + +class DOLPHIN_EXPORT KTwoFingerTap : public QGesture +{ + Q_OBJECT + Q_PROPERTY(QPointF pos READ pos WRITE setPos) + Q_PROPERTY(QPointF screenPos READ screenPos WRITE setScreenPos) + Q_PROPERTY(QPointF scenePos READ scenePos WRITE setScenePos) +public: + explicit KTwoFingerTap(QObject* parent = nullptr); + ~KTwoFingerTap(); + QPointF pos() const; + void setPos(QPointF pos); + QPointF screenPos() const; + void setScreenPos(QPointF screenPos); + QPointF scenePos() const; + void setScenePos(QPointF scenePos); +private: + QPointF m_pos; + QPointF m_screenPos; + QPointF m_scenePos; +}; + +class DOLPHIN_EXPORT KTwoFingerTapRecognizer : public QGestureRecognizer +{ +public: + explicit KTwoFingerTapRecognizer(); + ~KTwoFingerTapRecognizer(); + QGesture* create(QObject*) override; + Result recognize(QGesture*, QObject*, QEvent*) override; +private: + Q_DISABLE_COPY(KTwoFingerTapRecognizer) + bool m_gestureTriggered; +}; + +#endif /* KTWOFINGERTAP_H */ diff --git a/src/main.cpp b/src/main.cpp index f0336f628..8b3121d22 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz <[email protected]> * - * Copyright (C) 2006 by Stefan Monov <[email protected]> * - * Copyright (C) 2015 by Mathieu Tarral <[email protected]> * - * * - * 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 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2006 Stefan Monov <[email protected]> + * SPDX-FileCopyrightText: 2015 Mathieu Tarral <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dbusinterface.h" #include "dolphin_generalsettings.h" diff --git a/src/middleclickactioneventfilter.cpp b/src/middleclickactioneventfilter.cpp index 293e16e0c..c3634551d 100644 --- a/src/middleclickactioneventfilter.cpp +++ b/src/middleclickactioneventfilter.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2017 Kai Uwe Broulik <[email protected]> * - * * - * 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: 2017 Kai Uwe Broulik <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "middleclickactioneventfilter.h" diff --git a/src/middleclickactioneventfilter.h b/src/middleclickactioneventfilter.h index e88eabc8a..6943b53ce 100644 --- a/src/middleclickactioneventfilter.h +++ b/src/middleclickactioneventfilter.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2017 Kai Uwe Broulik <[email protected]> * - * * - * 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: 2017 Kai Uwe Broulik <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #pragma once diff --git a/src/org.kde.dolphin.appdata.xml b/src/org.kde.dolphin.appdata.xml index 0f87ec962..c252aca79 100644 --- a/src/org.kde.dolphin.appdata.xml +++ b/src/org.kde.dolphin.appdata.xml @@ -2,7 +2,7 @@ <component type="desktop"> <id>org.kde.dolphin.desktop</id> <metadata_license>CC0-1.0</metadata_license> - <project_license>GPL-2.0+</project_license> + <project_license>GPL-2.0-or-later</project_license> <name>Dolphin</name> <name xml:lang="ar">دولفين</name> <name xml:lang="ast">Dolphin</name> @@ -573,7 +573,7 @@ <li xml:lang="zh-TW">復原支援</li> </ul> </description> - <url type="homepage">https://kde.org/applications/system/dolphin</url> + <url type="homepage">https://kde.org/applications/en/dolphin</url> <url type="bugtracker">https://bugs.kde.org/enter_bug.cgi?format=guided&product=dolphin</url> <url type="help">https://docs.kde.org/?application=dolphin</url> <url type="donation">https://www.kde.org/community/donations/?app=dolphin&source=appdata</url> @@ -603,6 +603,7 @@ <caption xml:lang="ml">ഡോൾഫിനിലെ ഫയൽ കൈകാര്യം ചെയ്യൽ</caption> <caption xml:lang="nl">Bestandsbeheer in Dolphin</caption> <caption xml:lang="nn">Filhandsaming i Dolphin</caption> + <caption xml:lang="pa">ਡਾਲਫਿਨ ਵਿੱਚ ਫਾਇਲ ਇੰਤਜ਼ਾਮ</caption> <caption xml:lang="pl">Zarządzanie plikami w Dolphinie</caption> <caption xml:lang="pt">Gestão de ficheiros no Dolphin</caption> <caption xml:lang="pt-BR">Gerenciamento de arquivos no Dolphin</caption> diff --git a/src/panels/folders/foldersitemlistwidget.cpp b/src/panels/folders/foldersitemlistwidget.cpp index 5b2b20698..5d5fcbff6 100644 --- a/src/panels/folders/foldersitemlistwidget.cpp +++ b/src/panels/folders/foldersitemlistwidget.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Emmanuel Pescosta <[email protected]>* - * * - * 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: 2012 Emmanuel Pescosta <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "foldersitemlistwidget.h" diff --git a/src/panels/folders/foldersitemlistwidget.h b/src/panels/folders/foldersitemlistwidget.h index ef4cf7242..5e437cd95 100644 --- a/src/panels/folders/foldersitemlistwidget.h +++ b/src/panels/folders/foldersitemlistwidget.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Emmanuel Pescosta <[email protected]>* - * * - * 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: 2012 Emmanuel Pescosta <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef FOLDERSITEMLISTWIDGET_H #define FOLDERSITEMLISTWIDGET_H diff --git a/src/panels/folders/folderspanel.cpp b/src/panels/folders/folderspanel.cpp index 2e7e4dc28..73c3137d3 100644 --- a/src/panels/folders/folderspanel.cpp +++ b/src/panels/folders/folderspanel.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006-2010 by Peter Penz <[email protected]> * - * * - * 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-2010 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "folderspanel.h" diff --git a/src/panels/folders/folderspanel.h b/src/panels/folders/folderspanel.h index 5b9dc3b15..3ece6d3d4 100644 --- a/src/panels/folders/folderspanel.h +++ b/src/panels/folders/folderspanel.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz <[email protected]> * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef FOLDERSPANEL_H #define FOLDERSPANEL_H diff --git a/src/panels/folders/treeviewcontextmenu.cpp b/src/panels/folders/treeviewcontextmenu.cpp index 6c4adf883..e6cef5441 100644 --- a/src/panels/folders/treeviewcontextmenu.cpp +++ b/src/panels/folders/treeviewcontextmenu.cpp @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2006-2010 by Peter Penz <[email protected]> * - * Copyright (C) 2006 by Cvetoslav Ludmiloff <[email protected]> * - * * - * 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-2010 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2006 Cvetoslav Ludmiloff <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "treeviewcontextmenu.h" diff --git a/src/panels/folders/treeviewcontextmenu.h b/src/panels/folders/treeviewcontextmenu.h index 245b7d6b0..519e3a0ef 100644 --- a/src/panels/folders/treeviewcontextmenu.h +++ b/src/panels/folders/treeviewcontextmenu.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz <[email protected]> * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef TREEVIEWCONTEXTMENU_H #define TREEVIEWCONTEXTMENU_H diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp index 4f0e4e5eb..f843e7f46 100644 --- a/src/panels/information/informationpanel.cpp +++ b/src/panels/information/informationpanel.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006-2009 by Peter Penz <[email protected]> * - * * - * 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-2009 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "informationpanel.h" @@ -418,6 +405,7 @@ void InformationPanel::init() m_content = new InformationPanelContent(this); connect(m_content, &InformationPanelContent::urlActivated, this, &InformationPanel::urlActivated); connect(m_content, &InformationPanelContent::configurationFinished, this, [this]() { m_inConfigurationMode = false; }); + connect(m_content, &InformationPanelContent::contextMenuRequested, this, &InformationPanel::showContextMenu); QVBoxLayout* layout = new QVBoxLayout(this); layout->setContentsMargins(0, 0, 0, 0); diff --git a/src/panels/information/informationpanel.h b/src/panels/information/informationpanel.h index 321827c5b..31a48332b 100644 --- a/src/panels/information/informationpanel.h +++ b/src/panels/information/informationpanel.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006-2009 by Peter Penz <[email protected]> * - * * - * 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-2009 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef INFORMATIONPANEL_H #define INFORMATIONPANEL_H diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp index 9db7f8bb7..ded88bd96 100644 --- a/src/panels/information/informationpanelcontent.cpp +++ b/src/panels/information/informationpanelcontent.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009 by Peter Penz <[email protected]> * - * * - * 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: 2009 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "informationpanelcontent.h" @@ -46,11 +33,13 @@ #include <QTextLayout> #include <QTimer> #include <QVBoxLayout> +#include <QScroller> #include <QStyle> #include <QPainter> #include <QBitmap> #include <QLinearGradient> #include <QPolygon> +#include <QGesture> #include "dolphin_informationpanelsettings.h" #include "phononwidget.h" @@ -147,6 +136,7 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) : m_metaDataArea->setFrameShape(QFrame::NoFrame); QWidget* viewport = m_metaDataArea->viewport(); + QScroller::grabGesture(viewport, QScroller::TouchGesture); viewport->installEventFilter(this); layout->addWidget(m_preview); @@ -157,6 +147,8 @@ InformationPanelContent::InformationPanelContent(QWidget* parent) : layout->addWidget(m_metaDataArea); layout->addWidget(m_configureButtons); + grabGesture(Qt::TapAndHoldGesture); + m_placesItemModel = new PlacesItemModel(this); } @@ -351,6 +343,33 @@ bool InformationPanelContent::eventFilter(QObject* obj, QEvent* event) return QWidget::eventFilter(obj, event); } +bool InformationPanelContent::event(QEvent* event) +{ + if (event->type() == QEvent::Gesture) { + gestureEvent(static_cast<QGestureEvent*>(event)); + return true; + } + return QWidget::event(event); +} + +bool InformationPanelContent::gestureEvent(QGestureEvent* event) +{ + if (!underMouse()) { + return false; + } + + QTapAndHoldGesture* tap = static_cast<QTapAndHoldGesture*>(event->gesture(Qt::TapAndHoldGesture)); + + if (tap) { + if (tap->state() == Qt::GestureFinished) { + emit contextMenuRequested(tap->position().toPoint()); + } + event->accept(); + return true; + } + return false; +} + void InformationPanelContent::showIcon(const KFileItem& item) { m_outdatedPreviewTimer->stop(); diff --git a/src/panels/information/informationpanelcontent.h b/src/panels/information/informationpanelcontent.h index 8daeb95b0..abdfdeb35 100644 --- a/src/panels/information/informationpanelcontent.h +++ b/src/panels/information/informationpanelcontent.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009-2010 by Peter Penz <[email protected]> * - * * - * 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: 2009-2010 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef INFORMATIONPANELCONTENT_H #define INFORMATIONPANELCONTENT_H @@ -36,6 +23,7 @@ class QDialogButtonBox; class QString; class QLabel; class QScrollArea; +class QGestureEvent; namespace KIO { class PreviewJob; @@ -91,6 +79,7 @@ public: signals: void urlActivated( const QUrl& url ); void configurationFinished(); + void contextMenuRequested(const QPoint& pos); public slots: /** @@ -103,6 +92,8 @@ protected: /** @see QObject::eventFilter() */ bool eventFilter(QObject* obj, QEvent* event) override; + bool event(QEvent * event) override; + private slots: /** * Is invoked if no preview is available for the item. In this @@ -144,6 +135,8 @@ private: */ void refreshPixmapView(); + bool gestureEvent(QGestureEvent* event); + private: KFileItem m_item; diff --git a/src/panels/information/phononwidget.cpp b/src/panels/information/phononwidget.cpp index f815b4bd0..fa4b9e226 100644 --- a/src/panels/information/phononwidget.cpp +++ b/src/panels/information/phononwidget.cpp @@ -1,21 +1,7 @@ -/* This file is part of the KDE project - Copyright (C) 2007 Matthias Kretz <[email protected]> - - 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: 2007 Matthias Kretz <[email protected]> + SPDX-License-Identifier: GPL-2.0-or-later */ #include "phononwidget.h" diff --git a/src/panels/information/phononwidget.h b/src/panels/information/phononwidget.h index 961443d2e..b21b0cdc7 100644 --- a/src/panels/information/phononwidget.h +++ b/src/panels/information/phononwidget.h @@ -1,21 +1,7 @@ -/* This file is part of the KDE project - Copyright (C) 2007 Matthias Kretz <[email protected]> - - 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: 2007 Matthias Kretz <[email protected]> + SPDX-License-Identifier: GPL-2.0-or-later */ #ifndef PHONONWIDGET_H diff --git a/src/panels/information/pixmapviewer.cpp b/src/panels/information/pixmapviewer.cpp index 39fedb1a1..ddf264982 100644 --- a/src/panels/information/pixmapviewer.cpp +++ b/src/panels/information/pixmapviewer.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz <[email protected]> * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "pixmapviewer.h" diff --git a/src/panels/information/pixmapviewer.h b/src/panels/information/pixmapviewer.h index c231b590d..6e0fa3e67 100644 --- a/src/panels/information/pixmapviewer.h +++ b/src/panels/information/pixmapviewer.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz <[email protected]> * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef PIXMAPVIEWER_H #define PIXMAPVIEWER_H diff --git a/src/panels/panel.cpp b/src/panels/panel.cpp index 40f816158..9e62cc8e3 100644 --- a/src/panels/panel.cpp +++ b/src/panels/panel.cpp @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2006 by Cvetoslav Ludmiloff <[email protected]> * - * Copyright (C) 2006-2010 by Peter Penz <[email protected]> * - * * - * 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 <[email protected]> + * SPDX-FileCopyrightText: 2006-2010 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "panel.h" diff --git a/src/panels/panel.h b/src/panels/panel.h index ec3405ad2..3a61a41f0 100644 --- a/src/panels/panel.h +++ b/src/panels/panel.h @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2006 by Cvetoslav Ludmiloff <[email protected]> * - * Copyright (C) 2006-2010 by Peter Penz <[email protected]> * - * * - * 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 <[email protected]> + * SPDX-FileCopyrightText: 2006-2010 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef PANEL_H #define PANEL_H diff --git a/src/panels/places/placesitem.cpp b/src/panels/places/placesitem.cpp index b1f24e401..9cac01f91 100644 --- a/src/panels/places/placesitem.cpp +++ b/src/panels/places/placesitem.cpp @@ -1,25 +1,12 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * Copyright (C) 2018 by Elvis Angelaccio <[email protected]> * - * * - * Based on KFilePlacesItem from kdelibs: * - * Copyright (C) 2007 Kevin Ottens <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2018 Elvis Angelaccio <[email protected]> + * + * Based on KFilePlacesItem from kdelibs: + * SPDX-FileCopyrightText: 2007 Kevin Ottens <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "placesitem.h" #include "trash/dolphintrash.h" diff --git a/src/panels/places/placesitem.h b/src/panels/places/placesitem.h index 1eff7a380..832592302 100644 --- a/src/panels/places/placesitem.h +++ b/src/panels/places/placesitem.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef PLACESITEM_H #define PLACESITEM_H diff --git a/src/panels/places/placesitemlistgroupheader.cpp b/src/panels/places/placesitemlistgroupheader.cpp index dbd055f36..76fd670b3 100644 --- a/src/panels/places/placesitemlistgroupheader.cpp +++ b/src/panels/places/placesitemlistgroupheader.cpp @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * Based on the Itemviews NG project from Trolltech Labs * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * Based on the Itemviews NG project from Trolltech Labs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "placesitemlistgroupheader.h" diff --git a/src/panels/places/placesitemlistgroupheader.h b/src/panels/places/placesitemlistgroupheader.h index ef14b5c9d..dfb91f847 100644 --- a/src/panels/places/placesitemlistgroupheader.h +++ b/src/panels/places/placesitemlistgroupheader.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef PLACESITEMLISTGROUPHEADER_H #define PLACESITEMLISTGROUPHEADER_H diff --git a/src/panels/places/placesitemlistwidget.cpp b/src/panels/places/placesitemlistwidget.cpp index b0b3fb2aa..0551829af 100644 --- a/src/panels/places/placesitemlistwidget.cpp +++ b/src/panels/places/placesitemlistwidget.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "placesitemlistwidget.h" diff --git a/src/panels/places/placesitemlistwidget.h b/src/panels/places/placesitemlistwidget.h index ab78564c3..82372d622 100644 --- a/src/panels/places/placesitemlistwidget.h +++ b/src/panels/places/placesitemlistwidget.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef PLACESITEMLISTWIDGET_H #define PLACESITEMLISTWIDGET_H diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp index a1223b5fd..de858389b 100644 --- a/src/panels/places/placesitemmodel.cpp +++ b/src/panels/places/placesitemmodel.cpp @@ -1,25 +1,12 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * Based on KFilePlacesModel from kdelibs: * - * Copyright (C) 2007 Kevin Ottens <[email protected]> * - * Copyright (C) 2007 David Faure <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * Based on KFilePlacesModel from kdelibs: + * SPDX-FileCopyrightText: 2007 Kevin Ottens <[email protected]> + * SPDX-FileCopyrightText: 2007 David Faure <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "placesitemmodel.h" diff --git a/src/panels/places/placesitemmodel.h b/src/panels/places/placesitemmodel.h index dde3f3d7b..91f017cec 100644 --- a/src/panels/places/placesitemmodel.h +++ b/src/panels/places/placesitemmodel.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef PLACESITEMMODEL_H #define PLACESITEMMODEL_H diff --git a/src/panels/places/placesitemsignalhandler.cpp b/src/panels/places/placesitemsignalhandler.cpp index 1341b7413..b5c7ebcec 100644 --- a/src/panels/places/placesitemsignalhandler.cpp +++ b/src/panels/places/placesitemsignalhandler.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "placesitemsignalhandler.h" diff --git a/src/panels/places/placesitemsignalhandler.h b/src/panels/places/placesitemsignalhandler.h index 1d0cf9ccd..d0e236af4 100644 --- a/src/panels/places/placesitemsignalhandler.h +++ b/src/panels/places/placesitemsignalhandler.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef PLACESITEMSIGNALHANDLER_H #define PLACESITEMSIGNALHANDLER_H diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index d90a20fa6..413d346b6 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -1,25 +1,12 @@ -/*************************************************************************** - * Copyright (C) 2008-2012 by Peter Penz <[email protected]> * - * * - * Based on KFilePlacesView from kdelibs: * - * Copyright (C) 2007 Kevin Ottens <[email protected]> * - * Copyright (C) 2007 David Faure <[email protected]> * - * * - * 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: 2008-2012 Peter Penz <[email protected]> + * + * Based on KFilePlacesView from kdelibs: + * SPDX-FileCopyrightText: 2007 Kevin Ottens <[email protected]> + * SPDX-FileCopyrightText: 2007 David Faure <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "placespanel.h" diff --git a/src/panels/places/placespanel.h b/src/panels/places/placespanel.h index 9d9624ff8..8ea4d0831 100644 --- a/src/panels/places/placespanel.h +++ b/src/panels/places/placespanel.h @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2008-2012 by Peter Penz <[email protected]> * - * Copyright (C) 2010 by Christian Muehlhaeuser <[email protected]> * - * * - * 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: 2008-2012 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2010 Christian Muehlhaeuser <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef PLACESPANEL_H #define PLACESPANEL_H diff --git a/src/panels/places/placesview.cpp b/src/panels/places/placesview.cpp index d755d46b5..50446d44d 100644 --- a/src/panels/places/placesview.cpp +++ b/src/panels/places/placesview.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Frank Reininghaus <[email protected]> * - * * - * 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: 2012 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "placesview.h" diff --git a/src/panels/places/placesview.h b/src/panels/places/placesview.h index ffafa30b7..6005e8b48 100644 --- a/src/panels/places/placesview.h +++ b/src/panels/places/placesview.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Frank Reininghaus <[email protected]> * - * * - * 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: 2012 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef PLACESVIEW_H #define PLACESVIEW_H diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp index ac0bcd0fe..714431c71 100644 --- a/src/panels/terminal/terminalpanel.cpp +++ b/src/panels/terminal/terminalpanel.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2007-2010 by Peter Penz <[email protected]> * - * * - * 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: 2007-2010 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "terminalpanel.h" #include "kiofuse_interface.h" @@ -30,6 +17,7 @@ #include <KParts/ReadOnlyPart> #include <KPluginFactory> #include <KPluginLoader> +#include <KProtocolInfo> #include <KService> #include <KShell> #include <kde_terminal_interface.h> @@ -199,13 +187,21 @@ void TerminalPanel::changeDir(const QUrl& url) if (url.isLocalFile()) { sendCdToTerminal(url.toLocalFile()); - } else { + return; + } + + // Try stat'ing the url; note that mostLocalUrl only works with ":local" protocols + if (KProtocolInfo::protocolClass(url.scheme()) == QLatin1String(":local")) { m_mostLocalUrlJob = KIO::mostLocalUrl(url, KIO::HideProgressInfo); if (m_mostLocalUrlJob->uiDelegate()) { KJobWidgets::setWindow(m_mostLocalUrlJob, this); } connect(m_mostLocalUrlJob, &KIO::StatJob::result, this, &TerminalPanel::slotMostLocalUrlResult); + return; } + + // Last chance, try KIOFuse + sendCdToTerminalKIOFuse(url); } void TerminalPanel::sendCdToTerminal(const QString& dir, HistoryPolicy addToHistory) @@ -243,6 +239,21 @@ void TerminalPanel::sendCdToTerminal(const QString& dir, HistoryPolicy addToHist } } +void TerminalPanel::sendCdToTerminalKIOFuse(const QUrl &url) { + // URL isn't local, only hope for the terminal to be in sync with the + // DolphinView is to mount the remote URL in KIOFuse and point to it. + // If we can't do that for any reason, silently fail. + auto reply = m_kiofuseInterface.mountUrl(url.toString()); + QDBusPendingCallWatcher * watcher = new QDBusPendingCallWatcher(reply, this); + QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, [=] (QDBusPendingCallWatcher* watcher) { + watcher->deleteLater(); + if (!reply.isError()) { + // Successfully mounted, point to the KIOFuse equivalent path. + sendCdToTerminal(reply.value()); + } + }); +} + void TerminalPanel::slotMostLocalUrlResult(KJob* job) { KIO::StatJob* statJob = static_cast<KIO::StatJob *>(job); @@ -250,18 +261,7 @@ void TerminalPanel::slotMostLocalUrlResult(KJob* job) if (url.isLocalFile()) { sendCdToTerminal(url.toLocalFile()); } else { - // URL isn't local, only hope for the terminal to be in sync with the - // DolphinView is to mount the remote URL in KIOFuse and point to it. - // If we can't do that for any reason, silently fail. - auto reply = m_kiofuseInterface.mountUrl(url.toString()); - QDBusPendingCallWatcher * watcher = new QDBusPendingCallWatcher(reply, this); - QObject::connect(watcher, &QDBusPendingCallWatcher::finished, this, [=] (QDBusPendingCallWatcher* watcher) { - watcher->deleteLater(); - if (!reply.isError()) { - // Successfully mounted, point to the KIOFuse equivalent path. - sendCdToTerminal(reply.value()); - } - }); + sendCdToTerminalKIOFuse(url); } m_mostLocalUrlJob = nullptr; diff --git a/src/panels/terminal/terminalpanel.h b/src/panels/terminal/terminalpanel.h index 661fee4d4..35de108df 100644 --- a/src/panels/terminal/terminalpanel.h +++ b/src/panels/terminal/terminalpanel.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2007-2010 by Peter Penz <[email protected]> * - * * - * 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: 2007-2010 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef TERMINALPANEL_H #define TERMINALPANEL_H @@ -90,7 +77,7 @@ private: void changeDir(const QUrl& url); void sendCdToTerminal(const QString& path, HistoryPolicy addToHistory = HistoryPolicy::AddToHistory); - + void sendCdToTerminalKIOFuse(const QUrl &url); private: bool m_clearTerminal; KIO::StatJob* m_mostLocalUrlJob; diff --git a/src/search/dolphinfacetswidget.cpp b/src/search/dolphinfacetswidget.cpp index 8bae83887..a0003f6bd 100644 --- a/src/search/dolphinfacetswidget.cpp +++ b/src/search/dolphinfacetswidget.cpp @@ -1,22 +1,9 @@ -/*************************************************************************** -* Copyright (C) 2012 by Peter Penz <[email protected]> * -* Copyright (C) 2019 by Ismael Asensio <[email protected]> * -* * -* 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: 2012 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2019 Ismael Asensio <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinfacetswidget.h" diff --git a/src/search/dolphinfacetswidget.h b/src/search/dolphinfacetswidget.h index 2e91bcc96..21eb47360 100644 --- a/src/search/dolphinfacetswidget.h +++ b/src/search/dolphinfacetswidget.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINFACETSWIDGET_H #define DOLPHINFACETSWIDGET_H diff --git a/src/search/dolphinquery.cpp b/src/search/dolphinquery.cpp index 663ed9909..0e69cbf65 100644 --- a/src/search/dolphinquery.cpp +++ b/src/search/dolphinquery.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2019 by Ismael Asensio <[email protected]> * - * * - * 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: 2019 Ismael Asensio <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinquery.h" @@ -73,6 +60,14 @@ namespace { return textParts; } #endif + + QString trimChar(const QString& text, const QLatin1Char aChar) + { + const int start = text.startsWith(aChar) ? 1 : 0; + const int end = (text.length() > 1 && text.endsWith(aChar)) ? 1 : 0; + + return text.mid(start, text.length() - start - end); + } } @@ -83,6 +78,10 @@ DolphinQuery DolphinQuery::fromSearchUrl(const QUrl& searchUrl) if (searchUrl.scheme() == QLatin1String("baloosearch")) { model.parseBalooQuery(); + } else if (searchUrl.scheme() == QLatin1String("tags")) { + // tags can contain # symbols or slashes within the Url + QString tag = trimChar(searchUrl.toString(QUrl::RemoveScheme), QLatin1Char('/')); + model.m_searchTerms << QStringLiteral("tag:%1").arg(tag); } return model; @@ -92,6 +91,7 @@ bool DolphinQuery::supportsScheme(const QString& urlScheme) { static const QStringList supportedSchemes = { QStringLiteral("baloosearch"), + QStringLiteral("tags"), }; return supportedSchemes.contains(urlScheme); diff --git a/src/search/dolphinquery.h b/src/search/dolphinquery.h index 5032621a9..a620e95d8 100644 --- a/src/search/dolphinquery.h +++ b/src/search/dolphinquery.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2019 by Ismael Asensio <[email protected]> * - * * - * 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: 2019 Ismael Asensio <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINQUERY_H #define DOLPHINQUERY_H diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp index 20a527ff4..11ddc4bf2 100644 --- a/src/search/dolphinsearchbox.cpp +++ b/src/search/dolphinsearchbox.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** -* Copyright (C) 2010 by Peter Penz <[email protected]> * -* * -* 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: 2010 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "global.h" #include "dolphinsearchbox.h" diff --git a/src/search/dolphinsearchbox.h b/src/search/dolphinsearchbox.h index 4afd752bc..f0fe2a424 100644 --- a/src/search/dolphinsearchbox.h +++ b/src/search/dolphinsearchbox.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2010 by Peter Penz <[email protected]> * - * * - * 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: 2010 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINSEARCHBOX_H #define DOLPHINSEARCHBOX_H diff --git a/src/settings/applyviewpropsjob.cpp b/src/settings/applyviewpropsjob.cpp index 183c85225..c6468792f 100644 --- a/src/settings/applyviewpropsjob.cpp +++ b/src/settings/applyviewpropsjob.cpp @@ -1,24 +1,11 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz <[email protected]> * - * * - * The code is based on kdelibs/kio/directorysizejob.* * - * (C) 2006 by David Faure <[email protected]> * - * * - * 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 Peter Penz <[email protected]> + * + * The code is based on kdelibs/kio/directorysizejob: + * SPDX-FileCopyrightText: 2006 David Faure <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "applyviewpropsjob.h" diff --git a/src/settings/applyviewpropsjob.h b/src/settings/applyviewpropsjob.h index 5c38c1667..e1e9c9488 100644 --- a/src/settings/applyviewpropsjob.h +++ b/src/settings/applyviewpropsjob.h @@ -1,24 +1,11 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz <[email protected]> * - * * - * The code is based on kdelibs/kio/kio/directorysizejob.* * - * (C) 2006 by David Faure <[email protected]> * - * * - * 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 Peter Penz <[email protected]> + * + * The code is based on kdelibs/kio/directorysizejob: + * SPDX-FileCopyrightText: 2006 David Faure <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef APPLYVIEWPROPSJOB_H #define APPLYVIEWPROPSJOB_H diff --git a/src/settings/dolphinsettingsdialog.cpp b/src/settings/dolphinsettingsdialog.cpp index 87bc95a7f..0650e3d24 100644 --- a/src/settings/dolphinsettingsdialog.cpp +++ b/src/settings/dolphinsettingsdialog.cpp @@ -1,22 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz * - * [email protected] * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinsettingsdialog.h" @@ -94,7 +80,10 @@ DolphinSettingsDialog::DolphinSettingsDialog(const QUrl& url, QWidget* parent) : connect(servicesSettingsPage, &ServicesSettingsPage::changed, this, &DolphinSettingsDialog::enableApply); // Trash - auto* trashSettingsPage = createTrashSettingsPage(this); + SettingsPageBase* trashSettingsPage = nullptr; +#ifndef Q_OS_WIN + trashSettingsPage = createTrashSettingsPage(this); +#endif if (trashSettingsPage) { KPageWidgetItem* trashSettingsFrame = addPage(trashSettingsPage, i18nc("@title:group", "Trash")); diff --git a/src/settings/dolphinsettingsdialog.h b/src/settings/dolphinsettingsdialog.h index 85871b12d..7749a3ad8 100644 --- a/src/settings/dolphinsettingsdialog.h +++ b/src/settings/dolphinsettingsdialog.h @@ -1,27 +1,13 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz * - * [email protected] * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINSETTINGSDIALOG_H #define DOLPHINSETTINGSDIALOG_H -#include <kpagedialog.h> +#include <KPageDialog> class QUrl; class SettingsPageBase; diff --git a/src/settings/general/behaviorsettingspage.cpp b/src/settings/general/behaviorsettingspage.cpp index 30883c5da..5ca0566a9 100644 --- a/src/settings/general/behaviorsettingspage.cpp +++ b/src/settings/general/behaviorsettingspage.cpp @@ -1,22 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz ([email protected]) and * - * and Patrice Tremblay * - * * - * 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 Peter Penz ([email protected]) and Patrice Tremblay + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "behaviorsettingspage.h" diff --git a/src/settings/general/behaviorsettingspage.h b/src/settings/general/behaviorsettingspage.h index d26a709d3..b054e6d35 100644 --- a/src/settings/general/behaviorsettingspage.h +++ b/src/settings/general/behaviorsettingspage.h @@ -1,22 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz * - * [email protected] * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef BEHAVIORSETTINGSPAGE_H #define BEHAVIORSETTINGSPAGE_H diff --git a/src/settings/general/configurepreviewplugindialog.cpp b/src/settings/general/configurepreviewplugindialog.cpp index bc3cca706..d29b63b7d 100644 --- a/src/settings/general/configurepreviewplugindialog.cpp +++ b/src/settings/general/configurepreviewplugindialog.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "configurepreviewplugindialog.h" diff --git a/src/settings/general/configurepreviewplugindialog.h b/src/settings/general/configurepreviewplugindialog.h index e54fb464a..d6a28f53f 100644 --- a/src/settings/general/configurepreviewplugindialog.h +++ b/src/settings/general/configurepreviewplugindialog.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef CONFIGUREPREVIEWPLUGINDIALOG_H #define CONFIGUREPREVIEWPLUGINDIALOG_H diff --git a/src/settings/general/confirmationssettingspage.cpp b/src/settings/general/confirmationssettingspage.cpp index 6a72824d9..66a2bb9bf 100644 --- a/src/settings/general/confirmationssettingspage.cpp +++ b/src/settings/general/confirmationssettingspage.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "confirmationssettingspage.h" diff --git a/src/settings/general/confirmationssettingspage.h b/src/settings/general/confirmationssettingspage.h index c15afdc38..20473c838 100644 --- a/src/settings/general/confirmationssettingspage.h +++ b/src/settings/general/confirmationssettingspage.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef CONFIRMATIONSSETTINGSPAGE_H #define CONFIRMATIONSSETTINGSPAGE_H diff --git a/src/settings/general/generalsettingspage.cpp b/src/settings/general/generalsettingspage.cpp index 6e0a1d474..29472c40d 100644 --- a/src/settings/general/generalsettingspage.cpp +++ b/src/settings/general/generalsettingspage.cpp @@ -1,22 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz * - * [email protected] * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "generalsettingspage.h" diff --git a/src/settings/general/generalsettingspage.h b/src/settings/general/generalsettingspage.h index 1324e9e93..5e79216d5 100644 --- a/src/settings/general/generalsettingspage.h +++ b/src/settings/general/generalsettingspage.h @@ -1,22 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz * - * [email protected] * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef GENERALSETTINGSPAGE_H #define GENERALSETTINGSPAGE_H diff --git a/src/settings/general/previewssettingspage.cpp b/src/settings/general/previewssettingspage.cpp index 80ff8938a..a41515c25 100644 --- a/src/settings/general/previewssettingspage.cpp +++ b/src/settings/general/previewssettingspage.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz <[email protected]> * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "previewssettingspage.h" @@ -32,6 +19,7 @@ #include <QLabel> #include <QListView> #include <QPainter> +#include <QScroller> #include <QShowEvent> #include <QSortFilterProxyModel> #include <QSpinBox> @@ -55,6 +43,7 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) : QLabel* showPreviewsLabel = new QLabel(i18nc("@title:group", "Show previews in the view for:"), this); m_listView = new QListView(this); + QScroller::grabGesture(m_listView->viewport(), QScroller::TouchGesture); ServiceItemDelegate* delegate = new ServiceItemDelegate(m_listView, m_listView); connect(delegate, &ServiceItemDelegate::requestServiceConfiguration, @@ -69,6 +58,7 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) : m_listView->setModel(proxyModel); m_listView->setItemDelegate(delegate); m_listView->setVerticalScrollMode(QListView::ScrollPerPixel); + m_listView->setUniformItemSizes(true); QLabel* localFileSizeLabel = new QLabel(i18n("Skip previews for local files above:"), this); diff --git a/src/settings/general/previewssettingspage.h b/src/settings/general/previewssettingspage.h index a7f54f601..606b43cba 100644 --- a/src/settings/general/previewssettingspage.h +++ b/src/settings/general/previewssettingspage.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz <[email protected]> * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef PREVIEWSSETTINGSPAGE_H #define PREVIEWSSETTINGSPAGE_H diff --git a/src/settings/general/statusbarsettingspage.cpp b/src/settings/general/statusbarsettingspage.cpp index 58c570f9d..ddefa1a40 100644 --- a/src/settings/general/statusbarsettingspage.cpp +++ b/src/settings/general/statusbarsettingspage.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009 by Peter Penz <[email protected]> * - * * - * 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: 2009 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "statusbarsettingspage.h" diff --git a/src/settings/general/statusbarsettingspage.h b/src/settings/general/statusbarsettingspage.h index 99e4bbe58..3c5e7c2ad 100644 --- a/src/settings/general/statusbarsettingspage.h +++ b/src/settings/general/statusbarsettingspage.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009 by Peter Penz <[email protected]> * - * * - * 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: 2009 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef STATUSBARSETTINGSPAGE_H #define STATUSBARSETTINGSPAGE_H diff --git a/src/settings/kcm/kcmdolphingeneral.cpp b/src/settings/kcm/kcmdolphingeneral.cpp index 39eccff76..f2fb604b2 100644 --- a/src/settings/kcm/kcmdolphingeneral.cpp +++ b/src/settings/kcm/kcmdolphingeneral.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009 by Peter Penz <[email protected]> * - * * - * 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: 2009 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kcmdolphingeneral.h" diff --git a/src/settings/kcm/kcmdolphingeneral.h b/src/settings/kcm/kcmdolphingeneral.h index 2b60c7591..d4040cc8d 100644 --- a/src/settings/kcm/kcmdolphingeneral.h +++ b/src/settings/kcm/kcmdolphingeneral.h @@ -1,26 +1,13 @@ -/*************************************************************************** - * Copyright (C) 2009 by Peter Penz <[email protected]> * - * * - * 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: 2009 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KCMDOLPHINGENERAL_H #define KCMDOLPHINGENERAL_H -#include <kcmodule.h> +#include <KCModule> #include <QList> diff --git a/src/settings/kcm/kcmdolphinnavigation.cpp b/src/settings/kcm/kcmdolphinnavigation.cpp index f8de4eed2..725fc83f0 100644 --- a/src/settings/kcm/kcmdolphinnavigation.cpp +++ b/src/settings/kcm/kcmdolphinnavigation.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009 by Peter Penz <[email protected]> * - * * - * 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: 2009 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kcmdolphinnavigation.h" diff --git a/src/settings/kcm/kcmdolphinnavigation.h b/src/settings/kcm/kcmdolphinnavigation.h index 7eb6b26e7..97d7bff85 100644 --- a/src/settings/kcm/kcmdolphinnavigation.h +++ b/src/settings/kcm/kcmdolphinnavigation.h @@ -1,26 +1,13 @@ -/*************************************************************************** - * Copyright (C) 2009 by Peter Penz <[email protected]> * - * * - * 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: 2009 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KCMDOLPHINNAVIGATION_H #define KCMDOLPHINNAVIGATION_H -#include <kcmodule.h> +#include <KCModule> class NavigationSettingsPage; diff --git a/src/settings/kcm/kcmdolphinservices.cpp b/src/settings/kcm/kcmdolphinservices.cpp index 92e71bae0..2a411f96a 100644 --- a/src/settings/kcm/kcmdolphinservices.cpp +++ b/src/settings/kcm/kcmdolphinservices.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009 by Peter Penz <[email protected]> * - * * - * 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: 2009 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kcmdolphinservices.h" diff --git a/src/settings/kcm/kcmdolphinservices.h b/src/settings/kcm/kcmdolphinservices.h index a567450ca..ea94a98d4 100644 --- a/src/settings/kcm/kcmdolphinservices.h +++ b/src/settings/kcm/kcmdolphinservices.h @@ -1,26 +1,13 @@ -/*************************************************************************** - * Copyright (C) 2009 by Peter Penz <[email protected]> * - * * - * 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: 2009 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KCMDOLPHINSERVICES_H #define KCMDOLPHINSERVICES_H -#include <kcmodule.h> +#include <KCModule> class ServicesSettingsPage; diff --git a/src/settings/kcm/kcmdolphinviewmodes.cpp b/src/settings/kcm/kcmdolphinviewmodes.cpp index 7077bac8a..5ab53e9b9 100644 --- a/src/settings/kcm/kcmdolphinviewmodes.cpp +++ b/src/settings/kcm/kcmdolphinviewmodes.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2008 by Peter Penz <[email protected]> * - * * - * 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: 2008 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kcmdolphinviewmodes.h" diff --git a/src/settings/kcm/kcmdolphinviewmodes.h b/src/settings/kcm/kcmdolphinviewmodes.h index 40965b0e6..ea61bcf89 100644 --- a/src/settings/kcm/kcmdolphinviewmodes.h +++ b/src/settings/kcm/kcmdolphinviewmodes.h @@ -1,26 +1,13 @@ -/*************************************************************************** - * Copyright (C) 2008 by Peter Penz <[email protected]> * - * * - * 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: 2008 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef KCMDOLPHINVIEWMODES_H #define KCMDOLPHINVIEWMODES_H -#include <kcmodule.h> +#include <KCModule> class ViewSettingsTab; diff --git a/src/settings/navigation/navigationsettingspage.cpp b/src/settings/navigation/navigationsettingspage.cpp index aeb8019a5..41a39a537 100644 --- a/src/settings/navigation/navigationsettingspage.cpp +++ b/src/settings/navigation/navigationsettingspage.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009 by Peter Penz <[email protected]> * - * * - * 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: 2009 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "navigationsettingspage.h" diff --git a/src/settings/navigation/navigationsettingspage.h b/src/settings/navigation/navigationsettingspage.h index d7dd4de22..8b4781b44 100644 --- a/src/settings/navigation/navigationsettingspage.h +++ b/src/settings/navigation/navigationsettingspage.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009 by Peter Penz <[email protected]> * - * * - * 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: 2009 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef NAVIGATIONSETTINGSPAGE_H #define NAVIGATIONSETTINGSPAGE_H diff --git a/src/settings/serviceitemdelegate.cpp b/src/settings/serviceitemdelegate.cpp index fa0b306c1..a15e8220d 100644 --- a/src/settings/serviceitemdelegate.cpp +++ b/src/settings/serviceitemdelegate.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "serviceitemdelegate.h" diff --git a/src/settings/serviceitemdelegate.h b/src/settings/serviceitemdelegate.h index 7b0d216db..dc810e3a8 100644 --- a/src/settings/serviceitemdelegate.h +++ b/src/settings/serviceitemdelegate.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef SERVICEITEMDELEGATE_H #define SERVICEITEMDELEGATE_H diff --git a/src/settings/servicemodel.cpp b/src/settings/servicemodel.cpp index 2dd0097bb..41c00a958 100644 --- a/src/settings/servicemodel.cpp +++ b/src/settings/servicemodel.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "servicemodel.h" @@ -105,3 +92,10 @@ int ServiceModel::rowCount(const QModelIndex& parent) const return m_items.count(); } +void ServiceModel::clear() +{ + beginRemoveRows(QModelIndex(), 0, m_items.count()); + m_items.clear(); + endRemoveRows(); +} + diff --git a/src/settings/servicemodel.h b/src/settings/servicemodel.h index a08844b82..150159137 100644 --- a/src/settings/servicemodel.h +++ b/src/settings/servicemodel.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef SERVICEMODEL_H #define SERVICEMODEL_H @@ -51,6 +38,7 @@ public: bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override; QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; int rowCount(const QModelIndex& parent = QModelIndex()) const override; + void clear(); private: struct ServiceItem diff --git a/src/settings/services/servicemenuinstaller/servicemenuinstaller.cpp b/src/settings/services/servicemenuinstaller/servicemenuinstaller.cpp index 89f2545f8..459c57fed 100644 --- a/src/settings/services/servicemenuinstaller/servicemenuinstaller.cpp +++ b/src/settings/services/servicemenuinstaller/servicemenuinstaller.cpp @@ -1,22 +1,8 @@ -/*************************************************************************** - * Copyright © 2019 Alexander Potashev <[email protected]> * - * * - * 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) version 3 or any later version * - * accepted by the membership of KDE e.V. (or its successor approved * - * by the membership of KDE e.V.), which shall act as a proxy * - * defined in Section 14 of version 3 of the license. * - * * - * 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, see <http://www.gnu.org/licenses/>. * - ***************************************************************************/ +/* + * SPDX-FileCopyrightText: 2019 Alexander Potashev <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL + */ #include <QDebug> #include <QProcess> diff --git a/src/settings/services/servicessettingspage.cpp b/src/settings/services/servicessettingspage.cpp index e18bfb09e..fa064d8a1 100644 --- a/src/settings/services/servicessettingspage.cpp +++ b/src/settings/services/servicessettingspage.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009-2010 by Peter Penz <[email protected]> * - * * - * 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: 2009-2010 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "servicessettingspage.h" @@ -31,11 +18,12 @@ #include <KPluginMetaData> #include <KService> #include <KServiceTypeTrader> -#include <kdesktopfileactions.h> +#include <KDesktopFileActions> #include <QGridLayout> #include <QLabel> #include <QListWidget> +#include <QScroller> #include <QShowEvent> #include <QSortFilterProxyModel> #include <QLineEdit> @@ -69,6 +57,8 @@ ServicesSettingsPage::ServicesSettingsPage(QWidget* parent) : }); m_listView = new QListView(this); + QScroller::grabGesture(m_listView->viewport(), QScroller::TouchGesture); + auto *delegate = new ServiceItemDelegate(m_listView, m_listView); m_serviceModel = new ServiceModel(this); m_sortModel = new QSortFilterProxyModel(this); @@ -82,15 +72,25 @@ ServicesSettingsPage::ServicesSettingsPage(QWidget* parent) : m_listView->setVerticalScrollMode(QListView::ScrollPerPixel); connect(m_listView, &QListView::clicked, this, &ServicesSettingsPage::changed); +#ifndef Q_OS_WIN auto *downloadButton = new KNS3::Button(i18nc("@action:button", "Download New Services..."), QStringLiteral("servicemenu.knsrc"), this); - connect(downloadButton, &KNS3::Button::dialogFinished, this, &ServicesSettingsPage::loadServices); + connect(downloadButton, &KNS3::Button::dialogFinished, this, [this](const KNS3::Entry::List &changedEntries) { + if (!changedEntries.isEmpty()) { + m_serviceModel->clear(); + loadServices(); + } + }); + +#endif topLayout->addWidget(label); topLayout->addWidget(m_searchLineEdit); topLayout->addWidget(m_listView); +#ifndef Q_OS_WIN topLayout->addWidget(downloadButton); +#endif m_enabledVcsPlugins = VersionControlSettings::enabledPlugins(); std::sort(m_enabledVcsPlugins.begin(), m_enabledVcsPlugins.end()); diff --git a/src/settings/services/servicessettingspage.h b/src/settings/services/servicessettingspage.h index 8f507407b..b569852ae 100644 --- a/src/settings/services/servicessettingspage.h +++ b/src/settings/services/servicessettingspage.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009-2010 by Peter Penz <[email protected]> * - * * - * 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: 2009-2010 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef SERVICESSETTINGSPAGE_H #define SERVICESSETTINGSPAGE_H diff --git a/src/settings/services/test/service_menu_deinstallation_test.rb b/src/settings/services/test/service_menu_deinstallation_test.rb index 4017e8ee0..bf44b7b7f 100644 --- a/src/settings/services/test/service_menu_deinstallation_test.rb +++ b/src/settings/services/test/service_menu_deinstallation_test.rb @@ -1,21 +1,8 @@ #!/usr/bin/env ruby -# Copyright (C) 2019 Harald Sitter <[email protected]> +# SPDX-FileCopyrightText: 2019 Harald Sitter <[email protected]> # -# 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-License-Identifier: GPL-2.0-or-later require_relative 'test_helper' diff --git a/src/settings/services/test/service_menu_installation_test.rb b/src/settings/services/test/service_menu_installation_test.rb index 01bf65b23..7c05a40e3 100644 --- a/src/settings/services/test/service_menu_installation_test.rb +++ b/src/settings/services/test/service_menu_installation_test.rb @@ -1,21 +1,8 @@ #!/usr/bin/env ruby -# Copyright (C) 2019 Harald Sitter <[email protected]> +# SPDX-FileCopyrightText: 2019 Harald Sitter <[email protected]> # -# 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-License-Identifier: GPL-2.0-or-later require_relative 'test_helper' diff --git a/src/settings/services/test/test_helper.rb b/src/settings/services/test/test_helper.rb index 35b5d19eb..b4e4dded2 100644 --- a/src/settings/services/test/test_helper.rb +++ b/src/settings/services/test/test_helper.rb @@ -1,19 +1,6 @@ -# Copyright (C) 2019 Harald Sitter <[email protected]> +# SPDX-FileCopyrightText: 2019 Harald Sitter <[email protected]> # -# 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-License-Identifier: GPL-2.0-or-later $LOAD_PATH.unshift(File.absolute_path('../', __dir__)) # ../ diff --git a/src/settings/services/test/test_run.rb b/src/settings/services/test/test_run.rb index b2149bbe0..ab298a0b0 100755 --- a/src/settings/services/test/test_run.rb +++ b/src/settings/services/test/test_run.rb @@ -1,21 +1,8 @@ #!/usr/bin/env ruby -# Copyright (C) 2019 Harald Sitter <[email protected]> +# SPDX-FileCopyrightText: 2019 Harald Sitter <[email protected]> # -# 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-License-Identifier: GPL-2.0-or-later # This is a fancy wrapper around test_helper to prevent the collector from # loading the helper twice as it would occur if we ran the helper directly. diff --git a/src/settings/settingspagebase.cpp b/src/settings/settingspagebase.cpp index 70549fd2c..963966a4e 100644 --- a/src/settings/settingspagebase.cpp +++ b/src/settings/settingspagebase.cpp @@ -1,22 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz * - * [email protected] * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "settingspagebase.h" diff --git a/src/settings/settingspagebase.h b/src/settings/settingspagebase.h index 2bc1dfaaa..8b230a9c7 100644 --- a/src/settings/settingspagebase.h +++ b/src/settings/settingspagebase.h @@ -1,22 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz * - * [email protected] * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef SETTINGSPAGEBASE_H #define SETTINGSPAGEBASE_H diff --git a/src/settings/startup/startupsettingspage.cpp b/src/settings/startup/startupsettingspage.cpp index eb1495746..f0c2d53cf 100644 --- a/src/settings/startup/startupsettingspage.cpp +++ b/src/settings/startup/startupsettingspage.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2008 by Peter Penz <[email protected]> * - * * - * 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: 2008 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "startupsettingspage.h" diff --git a/src/settings/startup/startupsettingspage.h b/src/settings/startup/startupsettingspage.h index d1c937f1f..ff3ffcb12 100644 --- a/src/settings/startup/startupsettingspage.h +++ b/src/settings/startup/startupsettingspage.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2008 by Peter Penz <[email protected]> * - * * - * 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: 2008 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef STARTUPSETTINGSPAGE_H #define STARTUPSETTINGSPAGE_H diff --git a/src/settings/trash/trashsettingspage.cpp b/src/settings/trash/trashsettingspage.cpp index dd6038fb6..df627fa1c 100644 --- a/src/settings/trash/trashsettingspage.cpp +++ b/src/settings/trash/trashsettingspage.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009 by Shaun Reich [email protected] * - * * - * 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: 2009 Shaun Reich <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "trashsettingspage.h" diff --git a/src/settings/trash/trashsettingspage.h b/src/settings/trash/trashsettingspage.h index 53ac5f598..0a158fb08 100644 --- a/src/settings/trash/trashsettingspage.h +++ b/src/settings/trash/trashsettingspage.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009 by Shaun Reich [email protected] * - * * - * 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: 2009 Shaun Reich <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef TRASHSETTINGSPAGE_H #define TRASHSETTINGSPAGE_H diff --git a/src/settings/viewmodes/dolphinfontrequester.cpp b/src/settings/viewmodes/dolphinfontrequester.cpp index 09aacc3df..70969a2a3 100644 --- a/src/settings/viewmodes/dolphinfontrequester.cpp +++ b/src/settings/viewmodes/dolphinfontrequester.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2008 by Peter Penz <[email protected]> * - * * - * 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: 2008 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinfontrequester.h" diff --git a/src/settings/viewmodes/dolphinfontrequester.h b/src/settings/viewmodes/dolphinfontrequester.h index ac7ef222a..1613184b2 100644 --- a/src/settings/viewmodes/dolphinfontrequester.h +++ b/src/settings/viewmodes/dolphinfontrequester.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2008 by Peter Penz <[email protected]> * - * * - * 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: 2008 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINFONTREQUESTER_H #define DOLPHINFONTREQUESTER_H diff --git a/src/settings/viewmodes/viewmodesettings.cpp b/src/settings/viewmodes/viewmodesettings.cpp index 6625cfb81..2ea843f3b 100644 --- a/src/settings/viewmodes/viewmodesettings.cpp +++ b/src/settings/viewmodes/viewmodesettings.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "viewmodesettings.h" diff --git a/src/settings/viewmodes/viewmodesettings.h b/src/settings/viewmodes/viewmodesettings.h index 8bc9b562e..2e5299792 100644 --- a/src/settings/viewmodes/viewmodesettings.h +++ b/src/settings/viewmodes/viewmodesettings.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef VIEWMODESETTINGS_H #define VIEWMODESETTINGS_H diff --git a/src/settings/viewmodes/viewsettingspage.cpp b/src/settings/viewmodes/viewsettingspage.cpp index d2e291a3b..8c56efcdd 100644 --- a/src/settings/viewmodes/viewsettingspage.cpp +++ b/src/settings/viewmodes/viewsettingspage.cpp @@ -1,22 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz * - * [email protected] * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "viewsettingspage.h" diff --git a/src/settings/viewmodes/viewsettingspage.h b/src/settings/viewmodes/viewsettingspage.h index 3350e1c86..1016527e0 100644 --- a/src/settings/viewmodes/viewsettingspage.h +++ b/src/settings/viewmodes/viewsettingspage.h @@ -1,22 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz * - * [email protected] * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef VIEWSETTINGSPAGE_H #define VIEWSETTINGSPAGE_H diff --git a/src/settings/viewmodes/viewsettingstab.cpp b/src/settings/viewmodes/viewsettingstab.cpp index 184c060ff..cf8cd2810 100644 --- a/src/settings/viewmodes/viewsettingstab.cpp +++ b/src/settings/viewmodes/viewsettingstab.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2008-2011 by Peter Penz <[email protected]> * - * * - * 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: 2008-2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "viewsettingstab.h" diff --git a/src/settings/viewmodes/viewsettingstab.h b/src/settings/viewmodes/viewsettingstab.h index 4d459fca2..41b40b95e 100644 --- a/src/settings/viewmodes/viewsettingstab.h +++ b/src/settings/viewmodes/viewsettingstab.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2008-2011 by Peter Penz <[email protected]> * - * * - * 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: 2008-2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef VIEWSETTINGSTAB_H #define VIEWSETTINGSTAB_H diff --git a/src/settings/viewpropertiesdialog.cpp b/src/settings/viewpropertiesdialog.cpp index c3078d5df..860e01596 100644 --- a/src/settings/viewpropertiesdialog.cpp +++ b/src/settings/viewpropertiesdialog.cpp @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz <[email protected]> * - * Copyright (C) 2018 by Elvis Angelaccio <[email protected]> * - * * - * 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 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2018 Elvis Angelaccio <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "viewpropertiesdialog.h" diff --git a/src/settings/viewpropertiesdialog.h b/src/settings/viewpropertiesdialog.h index aabf21c90..b03d3c75a 100644 --- a/src/settings/viewpropertiesdialog.h +++ b/src/settings/viewpropertiesdialog.h @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz <[email protected]> * - * Copyright (C) 2018 by Elvis Angelaccio <[email protected]> * - * * - * 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 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2018 Elvis Angelaccio <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef VIEWPROPERTIESDIALOG_H #define VIEWPROPERTIESDIALOG_H diff --git a/src/settings/viewpropsprogressinfo.cpp b/src/settings/viewpropsprogressinfo.cpp index 44b7a4c8c..57a00c2b1 100644 --- a/src/settings/viewpropsprogressinfo.cpp +++ b/src/settings/viewpropsprogressinfo.cpp @@ -1,22 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz * - * [email protected] * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "viewpropsprogressinfo.h" diff --git a/src/settings/viewpropsprogressinfo.h b/src/settings/viewpropsprogressinfo.h index 05eafa6f5..262b5a9ed 100644 --- a/src/settings/viewpropsprogressinfo.h +++ b/src/settings/viewpropsprogressinfo.h @@ -1,22 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz * - * [email protected] * - * * - * 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 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef VIEWPROPSPROGRESSINFO_H #define VIEWPROPSPROGRESSINFO_H diff --git a/src/statusbar/dolphinstatusbar.cpp b/src/statusbar/dolphinstatusbar.cpp index 6b72af694..ecdb8f0fa 100644 --- a/src/statusbar/dolphinstatusbar.cpp +++ b/src/statusbar/dolphinstatusbar.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006-2012 by Peter Penz <[email protected]> * - * * - * 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-2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinstatusbar.h" diff --git a/src/statusbar/dolphinstatusbar.h b/src/statusbar/dolphinstatusbar.h index 2474732f5..b34f80203 100644 --- a/src/statusbar/dolphinstatusbar.h +++ b/src/statusbar/dolphinstatusbar.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006-2012 by Peter Penz <[email protected]> * - * * - * 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-2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINSTATUSBAR_H #define DOLPHINSTATUSBAR_H diff --git a/src/statusbar/mountpointobserver.cpp b/src/statusbar/mountpointobserver.cpp index 0be0f7173..f8b4a811d 100644 --- a/src/statusbar/mountpointobserver.cpp +++ b/src/statusbar/mountpointobserver.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2014 by Frank Reininghaus <[email protected]> * - * * - * 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: 2014 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "mountpointobserver.h" diff --git a/src/statusbar/mountpointobserver.h b/src/statusbar/mountpointobserver.h index ea24c4eea..30d5f8f7d 100644 --- a/src/statusbar/mountpointobserver.h +++ b/src/statusbar/mountpointobserver.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2014 by Frank Reininghaus <[email protected]> * - * * - * 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: 2014 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef MOUNTPOINTOBSERVER_H #define MOUNTPOINTOBSERVER_H diff --git a/src/statusbar/mountpointobservercache.cpp b/src/statusbar/mountpointobservercache.cpp index b39e26e3a..9bab3d5f2 100644 --- a/src/statusbar/mountpointobservercache.cpp +++ b/src/statusbar/mountpointobservercache.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2014 by Frank Reininghaus <[email protected]> * - * * - * 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: 2014 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "mountpointobservercache.h" diff --git a/src/statusbar/mountpointobservercache.h b/src/statusbar/mountpointobservercache.h index 74cef0674..aeb117cbb 100644 --- a/src/statusbar/mountpointobservercache.h +++ b/src/statusbar/mountpointobservercache.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2014 by Frank Reininghaus <[email protected]> * - * * - * 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: 2014 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef MOUNTPOINTOBSERVERCACHE_H #define MOUNTPOINTOBSERVERCACHE_H diff --git a/src/statusbar/spaceinfoobserver.cpp b/src/statusbar/spaceinfoobserver.cpp index 0d8f5f2fe..6012f9696 100644 --- a/src/statusbar/spaceinfoobserver.cpp +++ b/src/statusbar/spaceinfoobserver.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2014 by Frank Reininghaus <[email protected]> * - * * - * 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: 2014 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "spaceinfoobserver.h" diff --git a/src/statusbar/spaceinfoobserver.h b/src/statusbar/spaceinfoobserver.h index 67dbf15ec..ac55a9f49 100644 --- a/src/statusbar/spaceinfoobserver.h +++ b/src/statusbar/spaceinfoobserver.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2014 by Frank Reininghaus <[email protected]> * - * * - * 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: 2014 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef SPACEINFOOBSERVER_H #define SPACEINFOOBSERVER_H diff --git a/src/statusbar/statusbarspaceinfo.cpp b/src/statusbar/statusbarspaceinfo.cpp index acffcf69d..bb7f85842 100644 --- a/src/statusbar/statusbarspaceinfo.cpp +++ b/src/statusbar/statusbarspaceinfo.cpp @@ -1,22 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz ([email protected]) and * - * and Patrice Tremblay * - * * - * 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 Peter Penz ([email protected]) and Patrice Tremblay + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "statusbarspaceinfo.h" diff --git a/src/statusbar/statusbarspaceinfo.h b/src/statusbar/statusbarspaceinfo.h index 0b0d787dd..7cc5c49e2 100644 --- a/src/statusbar/statusbarspaceinfo.h +++ b/src/statusbar/statusbarspaceinfo.h @@ -1,22 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2006 by Peter Penz ([email protected]) and * - * and Patrice Tremblay * - * * - * 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 Peter Penz ([email protected]) and Patrice Tremblay + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef STATUSBARSPACEINFO_H #define STATUSBARSPACEINFO_H diff --git a/src/tests/dolphinmainwindowtest.cpp b/src/tests/dolphinmainwindowtest.cpp index e57c79b02..a307eb495 100644 --- a/src/tests/dolphinmainwindowtest.cpp +++ b/src/tests/dolphinmainwindowtest.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2017 by Elvis Angelaccio <[email protected]> * - * * - * 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: 2017 Elvis Angelaccio <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinmainwindow.h" #include "dolphinnewfilemenu.h" diff --git a/src/tests/dolphinquerytest.cpp b/src/tests/dolphinquerytest.cpp index 25bd26b81..464404058 100644 --- a/src/tests/dolphinquerytest.cpp +++ b/src/tests/dolphinquerytest.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2019 by Ismael Asensio <[email protected]> * - * * - * 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: 2019 Ismael Asensio <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "search/dolphinquery.h" @@ -150,6 +137,15 @@ void DolphinSearchBoxTest::testBalooSearchParsing_data() QTest::newRow("allTerms/space") << balooQueryUrl(textS + " " + filenameS + " " + rating + " AND " + modified + " AND " + tagS) << textS + " " + filenameS << QStringList({modified, rating, tagR}) << true << true; + + // Test tags:/ URL scheme + const auto tagUrl = [](const QString &tag) { return QUrl(QStringLiteral("tags:/%1/").arg(tag)); }; + const auto tagTerms = [](const QString &tag) { return QStringList{QStringLiteral("tag:%1").arg(tag)}; }; + + QTest::newRow("tagsUrl") << tagUrl("tagA") << "" << tagTerms("tagA") << false << false; + QTest::newRow("tagsUrl/space") << tagUrl("tagB with spaces") << "" << tagTerms("tagB with spaces") << false << false; + QTest::newRow("tagsUrl/hash") << tagUrl("tagC#hash") << "" << tagTerms("tagC#hash") << false << false; + QTest::newRow("tagsUrl/slash") << tagUrl("tagD/with/slash") << "" << tagTerms("tagD/with/slash") << false << false; } /** diff --git a/src/tests/dolphinsearchboxtest.cpp b/src/tests/dolphinsearchboxtest.cpp index 862a398a5..1210679f1 100644 --- a/src/tests/dolphinsearchboxtest.cpp +++ b/src/tests/dolphinsearchboxtest.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "search/dolphinsearchbox.h" diff --git a/src/tests/draganddrophelpertest.cpp b/src/tests/draganddrophelpertest.cpp index 8166b5bf2..584b7098b 100644 --- a/src/tests/draganddrophelpertest.cpp +++ b/src/tests/draganddrophelpertest.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2017 by Emirald Mateli <[email protected]> * - * * - * 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: 2017 Emirald Mateli <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include <QTest> #include <views/draganddrophelper.h> diff --git a/src/tests/kfileitemlistviewtest.cpp b/src/tests/kfileitemlistviewtest.cpp index 775602f9f..8d6a49c6b 100644 --- a/src/tests/kfileitemlistviewtest.cpp +++ b/src/tests/kfileitemlistviewtest.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemviews/kfileitemlistview.h" #include "kitemviews/kfileitemmodel.h" diff --git a/src/tests/kfileitemmodelbenchmark.cpp b/src/tests/kfileitemmodelbenchmark.cpp index 8dfb4f622..75f81678d 100644 --- a/src/tests/kfileitemmodelbenchmark.cpp +++ b/src/tests/kfileitemmodelbenchmark.cpp @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * Copyright (C) 2013 by Frank Reininghaus <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2013 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include <QTest> #include <QSignalSpy> diff --git a/src/tests/kfileitemmodeltest.cpp b/src/tests/kfileitemmodeltest.cpp index 7e949c34f..8fd1883ac 100644 --- a/src/tests/kfileitemmodeltest.cpp +++ b/src/tests/kfileitemmodeltest.cpp @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * Copyright (C) 2011 by Frank Reininghaus <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2011 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include <QRandomGenerator> #include <QTest> diff --git a/src/tests/kitemlistcontrollertest.cpp b/src/tests/kitemlistcontrollertest.cpp index 4cb1256e3..7bc6b5d99 100644 --- a/src/tests/kitemlistcontrollertest.cpp +++ b/src/tests/kitemlistcontrollertest.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Frank Reininghaus <[email protected]> * - * * - * 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: 2012 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemviews/kitemlistcontainer.h" #include "kitemviews/kfileitemlistview.h" diff --git a/src/tests/kitemlistkeyboardsearchmanagertest.cpp b/src/tests/kitemlistkeyboardsearchmanagertest.cpp index 53ef9ec3c..10cf3ab1c 100644 --- a/src/tests/kitemlistkeyboardsearchmanagertest.cpp +++ b/src/tests/kitemlistkeyboardsearchmanagertest.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Frank Reininghaus <[email protected]> * - * * - * 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: 2011 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemviews/private/kitemlistkeyboardsearchmanager.h" diff --git a/src/tests/kitemlistselectionmanagertest.cpp b/src/tests/kitemlistselectionmanagertest.cpp index 99313ff80..d6e0e2c96 100644 --- a/src/tests/kitemlistselectionmanagertest.cpp +++ b/src/tests/kitemlistselectionmanagertest.cpp @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * Copyright (C) 2011 by Frank Reininghaus <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2011 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemviews/kitemmodelbase.h" #include "kitemviews/kitemlistselectionmanager.h" diff --git a/src/tests/kitemrangetest.cpp b/src/tests/kitemrangetest.cpp index ee569a4d4..023f180f5 100644 --- a/src/tests/kitemrangetest.cpp +++ b/src/tests/kitemrangetest.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2014 by Frank Reininghaus <[email protected]> * - * * - * 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: 2014 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemviews/kitemrange.h" diff --git a/src/tests/kitemsettest.cpp b/src/tests/kitemsettest.cpp index ca2c16b27..880d9d966 100644 --- a/src/tests/kitemsettest.cpp +++ b/src/tests/kitemsettest.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2013 by Frank Reininghaus <[email protected]> * - * * - * 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: 2013 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemviews/kitemset.h" diff --git a/src/tests/kstandarditemmodeltest.cpp b/src/tests/kstandarditemmodeltest.cpp index daa8f1e56..c263c0128 100644 --- a/src/tests/kstandarditemmodeltest.cpp +++ b/src/tests/kstandarditemmodeltest.cpp @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * Copyright (C) 2011 by Frank Reininghaus <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2011 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphindebug.h" diff --git a/src/tests/placesitemmodeltest.cpp b/src/tests/placesitemmodeltest.cpp index ef8d265f9..ac7b6900b 100644 --- a/src/tests/placesitemmodeltest.cpp +++ b/src/tests/placesitemmodeltest.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2017 by Renato Araujo Oliveira <[email protected]> * - * * - * 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: 2017 Renato Araujo Oliveira <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include <QTest> #include <QSignalSpy> diff --git a/src/tests/testdir.cpp b/src/tests/testdir.cpp index de81378d8..29bb3ad78 100644 --- a/src/tests/testdir.cpp +++ b/src/tests/testdir.cpp @@ -1,21 +1,8 @@ -/***************************************************************************** - * Copyright (C) 2010-2011 by Frank Reininghaus ([email protected]) * - * * - * 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: 2010-2011 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "testdir.h" diff --git a/src/tests/testdir.h b/src/tests/testdir.h index 3f244448c..d537f9574 100644 --- a/src/tests/testdir.h +++ b/src/tests/testdir.h @@ -1,21 +1,8 @@ -/***************************************************************************** - * Copyright (C) 2010-2011 by Frank Reininghaus ([email protected]) * - * * - * 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: 2010-2011 Frank Reininghaus <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef TESTDIR_H #define TESTDIR_H diff --git a/src/tests/viewpropertiestest.cpp b/src/tests/viewpropertiestest.cpp index 6e0452209..a9588cb19 100644 --- a/src/tests/viewpropertiestest.cpp +++ b/src/tests/viewpropertiestest.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphin_generalsettings.h" #include "views/viewproperties.h" diff --git a/src/trash/dolphintrash.cpp b/src/trash/dolphintrash.cpp index 957091e54..35c5bbdfb 100644 --- a/src/trash/dolphintrash.cpp +++ b/src/trash/dolphintrash.cpp @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * Copyright (C) 2018 by Roman Inflianskas <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2018 Roman Inflianskas <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphintrash.h" diff --git a/src/trash/dolphintrash.h b/src/trash/dolphintrash.h index 76da4a5e0..2120059ef 100644 --- a/src/trash/dolphintrash.h +++ b/src/trash/dolphintrash.h @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * Copyright (C) 2018 by Roman Inflianskas <[email protected]> * - * * - * 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: 2012 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2018 Roman Inflianskas <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINTRASH_H #define DOLPHINTRASH_H diff --git a/src/views/dolphinfileitemlistwidget.cpp b/src/views/dolphinfileitemlistwidget.cpp index 3a1572de9..c3a15ea6f 100644 --- a/src/views/dolphinfileitemlistwidget.cpp +++ b/src/views/dolphinfileitemlistwidget.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinfileitemlistwidget.h" diff --git a/src/views/dolphinfileitemlistwidget.h b/src/views/dolphinfileitemlistwidget.h index 5c2d17eec..dc9e27585 100644 --- a/src/views/dolphinfileitemlistwidget.h +++ b/src/views/dolphinfileitemlistwidget.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINFILEITEMLISTWIDGET_H #define DOLPHINFILEITEMLISTWIDGET_H diff --git a/src/views/dolphinitemlistview.cpp b/src/views/dolphinitemlistview.cpp index 9e8fda650..df28a0858 100644 --- a/src/views/dolphinitemlistview.cpp +++ b/src/views/dolphinitemlistview.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinitemlistview.h" diff --git a/src/views/dolphinitemlistview.h b/src/views/dolphinitemlistview.h index b8e3ab7de..283b22400 100644 --- a/src/views/dolphinitemlistview.h +++ b/src/views/dolphinitemlistview.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * 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: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINITEMLISTVIEW_H #define DOLPHINITEMLISTVIEW_H diff --git a/src/views/dolphinnewfilemenuobserver.cpp b/src/views/dolphinnewfilemenuobserver.cpp index 6379adb31..1c91282df 100644 --- a/src/views/dolphinnewfilemenuobserver.cpp +++ b/src/views/dolphinnewfilemenuobserver.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009 by Peter Penz <[email protected]> * - * * - * 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: 2009 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinnewfilemenuobserver.h" diff --git a/src/views/dolphinnewfilemenuobserver.h b/src/views/dolphinnewfilemenuobserver.h index 6bb42ed82..b95bdac46 100644 --- a/src/views/dolphinnewfilemenuobserver.h +++ b/src/views/dolphinnewfilemenuobserver.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009 by Peter Penz <[email protected]> * - * * - * 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: 2009 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINNEWFILEMENUOBSERVER_H #define DOLPHINNEWFILEMENUOBSERVER_H diff --git a/src/views/dolphinremoteencoding.cpp b/src/views/dolphinremoteencoding.cpp index 269cc3085..4f006df59 100644 --- a/src/views/dolphinremoteencoding.cpp +++ b/src/views/dolphinremoteencoding.cpp @@ -1,25 +1,12 @@ -/*************************************************************************** - * Copyright (C) 2009 by Rahman Duran <[email protected]> * - * * - * 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: 2009 Rahman Duran <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ /* * This code is largely based on the kremoteencodingplugin - * Copyright (c) 2003 Thiago Macieira <[email protected]> + * SPDX-FileCopyrightText: 2003 Thiago Macieira <[email protected]> * Distributed under the same terms. */ diff --git a/src/views/dolphinremoteencoding.h b/src/views/dolphinremoteencoding.h index bcb0d7901..ae1d78b6d 100644 --- a/src/views/dolphinremoteencoding.h +++ b/src/views/dolphinremoteencoding.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009 by Rahman Duran <[email protected]> * - * * - * 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: 2009 Rahman Duran <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINREMOTEENCODING_H #define DOLPHINREMOTEENCODING_H diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 54f2f721d..167f88c39 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2006-2009 by Peter Penz <[email protected]> * - * Copyright (C) 2006 by Gregor Kališnik <[email protected]> * - * * - * 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-2009 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2006 Gregor Kališnik <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinview.h" @@ -147,6 +134,9 @@ DolphinView::DolphinView(const QUrl& url, QWidget* parent) : connect(controller, &KItemListController::escapePressed, this, &DolphinView::stopLoading); connect(controller, &KItemListController::modelChanged, this, &DolphinView::slotModelChanged); connect(controller, &KItemListController::selectedItemTextPressed, this, &DolphinView::slotSelectedItemTextPressed); + connect(controller, &KItemListController::increaseZoom, this, &DolphinView::slotIncreaseZoom); + connect(controller, &KItemListController::decreaseZoom, this, &DolphinView::slotDecreaseZoom); + connect(controller, &KItemListController::swipeUp, this, &DolphinView::slotSwipeUp); connect(m_model, &KFileItemModel::directoryLoadingStarted, this, &DolphinView::slotDirectoryLoadingStarted); connect(m_model, &KFileItemModel::directoryLoadingCompleted, this, &DolphinView::slotDirectoryLoadingCompleted); @@ -1511,6 +1501,8 @@ void DolphinView::hideToolTip(const ToolTipManager::HideBehavior behavior) if (GeneralSettings::showToolTips()) { m_toolTipManager->hideToolTip(behavior); } +#else + Q_UNUSED(behavior) #endif } @@ -1967,3 +1959,18 @@ void DolphinView::copyPathToClipboard() } clipboard->setText(path); } + +void DolphinView::slotIncreaseZoom() +{ + setZoomLevel(zoomLevel() + 1); +} + +void DolphinView::slotDecreaseZoom() +{ + setZoomLevel(zoomLevel() - 1); +} + +void DolphinView::slotSwipeUp() +{ + emit goUpRequested(); +} diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h index 91203b8e0..1d0ebe0fe 100644 --- a/src/views/dolphinview.h +++ b/src/views/dolphinview.h @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2006-2009 by Peter Penz <[email protected]> * - * Copyright (C) 2006 by Gregor Kališnik <[email protected]> * - * * - * 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-2009 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2006 Gregor Kališnik <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINVIEW_H #define DOLPHINVIEW_H @@ -595,6 +582,8 @@ signals: */ void urlActivated(const QUrl& url); + void goUpRequested(); + protected: /** Changes the zoom level if Control is pressed during a wheel event. */ void wheelEvent(QWheelEvent* event) override; @@ -624,6 +613,9 @@ private slots: void slotRenameDialogRenamingFinished(const QList<QUrl>& urls); void slotSelectedItemTextPressed(int index); void slotCopyingDone(KIO::Job *, const QUrl &, const QUrl &to); + void slotIncreaseZoom(); + void slotDecreaseZoom(); + void slotSwipeUp(); /* * Is called when new items get pasted or dropped. diff --git a/src/views/dolphinviewactionhandler.cpp b/src/views/dolphinviewactionhandler.cpp index 29bd530b4..a63263bf5 100644 --- a/src/views/dolphinviewactionhandler.cpp +++ b/src/views/dolphinviewactionhandler.cpp @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2008 by David Faure <[email protected]> * - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2008 David Faure <[email protected]> + * SPDX-FileCopyrightText: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinviewactionhandler.h" @@ -156,7 +143,7 @@ void DolphinViewActionHandler::createActions() connect(propertiesAction, &QAction::triggered, this, &DolphinViewActionHandler::slotProperties); QAction *copyPathAction = m_actionCollection->addAction( QStringLiteral("copy_location") ); - copyPathAction->setText(i18nc("@action:incontextmenu", "Copy location")); + copyPathAction->setText(i18nc("@action:incontextmenu", "Copy Location")); copyPathAction->setWhatsThis(i18nc("@info:whatsthis copy_location", "This will copy the path of the first selected item into the clipboard." )); @@ -285,8 +272,8 @@ void DolphinViewActionHandler::createActions() connect(showInGroups, &KToggleAction::triggered, this, &DolphinViewActionHandler::toggleGroupedSorting); KToggleAction* showHiddenFiles = m_actionCollection->add<KToggleAction>(QStringLiteral("show_hidden_files")); + showHiddenFiles->setIcon(QIcon::fromTheme(QStringLiteral("view-visible"))); showHiddenFiles->setText(i18nc("@action:inmenu View", "Show Hidden Files")); - showHiddenFiles->setToolTip(i18nc("@info", "Visibility of hidden files and folders")); showHiddenFiles->setWhatsThis(xi18nc("@info:whatsthis", "<para>When " "this is enabled <emphasis>hidden</emphasis> files and folders " "are visible. They will be displayed semi-transparent.</para>" @@ -565,14 +552,6 @@ void DolphinViewActionHandler::slotHiddenFilesShownChanged(bool shown) { QAction* showHiddenFilesAction = m_actionCollection->action(QStringLiteral("show_hidden_files")); showHiddenFilesAction->setChecked(shown); - - // #374508: don't overwrite custom icons. - const QString iconName = showHiddenFilesAction->icon().name(); - if (!iconName.isEmpty() && iconName != QLatin1String("view-visible") && iconName != QLatin1String("view-hidden")) { - return; - } - - showHiddenFilesAction->setIcon(QIcon::fromTheme(shown ? QStringLiteral("view-visible") : QStringLiteral("view-hidden"))); } void DolphinViewActionHandler::slotWriteStateChanged(bool isFolderWritable) @@ -633,14 +612,14 @@ void DolphinViewActionHandler::slotSortRoleChanged(const QByteArray& role) descending->setText(i18nc("Sort descending", "Z-A")); ascending->setText(i18nc("Sort ascending", "A-Z")); } else if (role == "size") { - descending->setText(i18nc("Sort descending", "Largest first")); - ascending->setText(i18nc("Sort ascending", "Smallest first")); + descending->setText(i18nc("Sort descending", "Largest First")); + ascending->setText(i18nc("Sort ascending", "Smallest First")); } else if (role == "modificationtime" || role == "creationtime" || role == "accesstime") { - descending->setText(i18nc("Sort descending", "Newest first")); - ascending->setText(i18nc("Sort ascending", "Oldest first")); + descending->setText(i18nc("Sort descending", "Newest First")); + ascending->setText(i18nc("Sort ascending", "Oldest First")); } else if (role == "rating") { - descending->setText(i18nc("Sort descending", "Highest first")); - ascending->setText(i18nc("Sort ascending", "Lowest first")); + descending->setText(i18nc("Sort descending", "Highest First")); + ascending->setText(i18nc("Sort ascending", "Lowest First")); } else { descending->setText(i18nc("Sort descending", "Descending")); ascending->setText(i18nc("Sort ascending", "Ascending")); diff --git a/src/views/dolphinviewactionhandler.h b/src/views/dolphinviewactionhandler.h index d6b0d3b84..23b4e5f1a 100644 --- a/src/views/dolphinviewactionhandler.h +++ b/src/views/dolphinviewactionhandler.h @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2008 by David Faure <[email protected]> * - * Copyright (C) 2012 by Peter Penz <[email protected]> * - * * - * 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: 2008 David Faure <[email protected]> + * SPDX-FileCopyrightText: 2012 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINVIEWACTIONHANDLER_H diff --git a/src/views/draganddrophelper.cpp b/src/views/draganddrophelper.cpp index d248d00eb..2466b2ab7 100644 --- a/src/views/draganddrophelper.cpp +++ b/src/views/draganddrophelper.cpp @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2007-2011 by Peter Penz <[email protected]> * - * Copyright (C) 2007 by David Faure <[email protected]> * - * * - * 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: 2007-2011 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2007 David Faure <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "draganddrophelper.h" diff --git a/src/views/draganddrophelper.h b/src/views/draganddrophelper.h index 1a6b5900e..5f9d3754b 100644 --- a/src/views/draganddrophelper.h +++ b/src/views/draganddrophelper.h @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2007-2011 by Peter Penz <[email protected]> * - * Copyright (C) 2007 by David Faure <[email protected]> * - * * - * 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: 2007-2011 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2007 David Faure <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DRAGANDDROPHELPER_H #define DRAGANDDROPHELPER_H diff --git a/src/views/tooltips/dolphinfilemetadatawidget.cpp b/src/views/tooltips/dolphinfilemetadatawidget.cpp index f4a688ea8..fdbf19ccd 100644 --- a/src/views/tooltips/dolphinfilemetadatawidget.cpp +++ b/src/views/tooltips/dolphinfilemetadatawidget.cpp @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2010 by Peter Penz <[email protected]> * - * Copyright (C) 2008 by Fredrik Höglund <[email protected]> * - * Copyright (C) 2012 by Mark Gaiser <[email protected]> * - * * - * 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: 2010 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2008 Fredrik Höglund <[email protected]> + * SPDX-FileCopyrightText: 2012 Mark Gaiser <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphinfilemetadatawidget.h" diff --git a/src/views/tooltips/dolphinfilemetadatawidget.h b/src/views/tooltips/dolphinfilemetadatawidget.h index b9dbd98a1..87ee87a58 100644 --- a/src/views/tooltips/dolphinfilemetadatawidget.h +++ b/src/views/tooltips/dolphinfilemetadatawidget.h @@ -1,23 +1,10 @@ -/*************************************************************************** - * Copyright (C) 2010 by Peter Penz <[email protected]> * - * Copyright (C) 2008 by Fredrik Höglund <[email protected]> * - * Copyright (C) 2012 by Mark Gaiser <[email protected]> * - * * - * 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: 2010 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2008 Fredrik Höglund <[email protected]> + * SPDX-FileCopyrightText: 2012 Mark Gaiser <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef DOLPHINFILEMETADATAWIDGET_H #define DOLPHINFILEMETADATAWIDGET_H diff --git a/src/views/tooltips/tooltipmanager.cpp b/src/views/tooltips/tooltipmanager.cpp index eaa785987..7e901bfcd 100644 --- a/src/views/tooltips/tooltipmanager.cpp +++ b/src/views/tooltips/tooltipmanager.cpp @@ -1,21 +1,8 @@ -/******************************************************************************* - * Copyright (C) 2008 by Konstantin Heil <[email protected]> * - * * - * 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: 2008 Konstantin Heil <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "tooltipmanager.h" diff --git a/src/views/tooltips/tooltipmanager.h b/src/views/tooltips/tooltipmanager.h index c09a40d31..6dfc750a9 100644 --- a/src/views/tooltips/tooltipmanager.h +++ b/src/views/tooltips/tooltipmanager.h @@ -1,21 +1,8 @@ -/******************************************************************************* - * Copyright (C) 2008 by Konstantin Heil <[email protected]> * - * * - * 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: 2008 Konstantin Heil <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef TOOLTIPMANAGER_H #define TOOLTIPMANAGER_H diff --git a/src/views/versioncontrol/kversioncontrolplugin.cpp b/src/views/versioncontrol/kversioncontrolplugin.cpp index 2c0632878..2e1a4468b 100644 --- a/src/views/versioncontrol/kversioncontrolplugin.cpp +++ b/src/views/versioncontrol/kversioncontrolplugin.cpp @@ -1,21 +1,9 @@ -/***************************************************************************** - * Copyright (C) 2011 by Vishesh Yadav <[email protected]> * - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License version 2 as published by the Free Software Foundation. * - * * - * This library 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 * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public License * - * along with this library; see the file COPYING.LIB. If not, write to * - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301, USA. * - *****************************************************************************/ +/* + * SPDX-FileCopyrightText: 2011 Vishesh Yadav <[email protected]> + * SPDX-FileCopyrightText: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: LGPL-2.0-only + */ #include "kversioncontrolplugin.h" diff --git a/src/views/versioncontrol/kversioncontrolplugin.h b/src/views/versioncontrol/kversioncontrolplugin.h index 0d94a3fc8..0de305d14 100644 --- a/src/views/versioncontrol/kversioncontrolplugin.h +++ b/src/views/versioncontrol/kversioncontrolplugin.h @@ -1,21 +1,9 @@ -/***************************************************************************** - * Copyright (C) 2011 by Vishesh Yadav <[email protected]> * - * Copyright (C) 2011 by Peter Penz <[email protected]> * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License version 2 as published by the Free Software Foundation. * - * * - * This library 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 * - * Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public License * - * along with this library; see the file COPYING.LIB. If not, write to * - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * - * Boston, MA 02110-1301, USA. * - *****************************************************************************/ +/* + * SPDX-FileCopyrightText: 2011 Vishesh Yadav <[email protected]> + * SPDX-FileCopyrightText: 2011 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: LGPL-2.0-only + */ #ifndef KVERSIONCONTROLPLUGIN_H #define KVERSIONCONTROLPLUGIN_H diff --git a/src/views/versioncontrol/updateitemstatesthread.cpp b/src/views/versioncontrol/updateitemstatesthread.cpp index 0a183b4a5..cf45bbff1 100644 --- a/src/views/versioncontrol/updateitemstatesthread.cpp +++ b/src/views/versioncontrol/updateitemstatesthread.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009 by Peter Penz <[email protected]> * - * * - * 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: 2009 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "updateitemstatesthread.h" diff --git a/src/views/versioncontrol/updateitemstatesthread.h b/src/views/versioncontrol/updateitemstatesthread.h index 92563faa5..eac28bb78 100644 --- a/src/views/versioncontrol/updateitemstatesthread.h +++ b/src/views/versioncontrol/updateitemstatesthread.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009 by Peter Penz <[email protected]> * - * * - * 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: 2009 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef UPDATEITEMSTATESTHREAD_H #define UPDATEITEMSTATESTHREAD_H diff --git a/src/views/versioncontrol/versioncontrolobserver.cpp b/src/views/versioncontrol/versioncontrolobserver.cpp index 2f0632243..7cf78c8aa 100644 --- a/src/views/versioncontrol/versioncontrolobserver.cpp +++ b/src/views/versioncontrol/versioncontrolobserver.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009 by Peter Penz <[email protected]> * - * * - * 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: 2009 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "versioncontrolobserver.h" diff --git a/src/views/versioncontrol/versioncontrolobserver.h b/src/views/versioncontrol/versioncontrolobserver.h index 648c9d6fd..89c047148 100644 --- a/src/views/versioncontrol/versioncontrolobserver.h +++ b/src/views/versioncontrol/versioncontrolobserver.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2009 by Peter Penz <[email protected]> * - * * - * 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: 2009 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef VERSIONCONTROLOBSERVER_H #define VERSIONCONTROLOBSERVER_H diff --git a/src/views/viewmodecontroller.cpp b/src/views/viewmodecontroller.cpp index 28f9ea472..baad21a65 100644 --- a/src/views/viewmodecontroller.cpp +++ b/src/views/viewmodecontroller.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2010 by Peter Penz <[email protected]> * - * * - * 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: 2010 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "viewmodecontroller.h" diff --git a/src/views/viewmodecontroller.h b/src/views/viewmodecontroller.h index 2cc5c6c91..9f5104c57 100644 --- a/src/views/viewmodecontroller.h +++ b/src/views/viewmodecontroller.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2010 by Peter Penz <[email protected]> * - * * - * 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: 2010 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef VIEWMODECONTROLLER_H #define VIEWMODECONTROLLER_H diff --git a/src/views/viewproperties.cpp b/src/views/viewproperties.cpp index e5f3a82c4..69ab19bb5 100644 --- a/src/views/viewproperties.cpp +++ b/src/views/viewproperties.cpp @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2006-2010 by Peter Penz <[email protected]> * - * Copyright (C) 2006 by Aaron J. Seigo <[email protected]> * - * * - * 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-2010 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2006 Aaron J. Seigo <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "viewproperties.h" diff --git a/src/views/viewproperties.h b/src/views/viewproperties.h index 6a3f18e6b..a9daafc87 100644 --- a/src/views/viewproperties.h +++ b/src/views/viewproperties.h @@ -1,22 +1,9 @@ -/*************************************************************************** - * Copyright (C) 2006-2010 by Peter Penz <[email protected]> * - * Copyright (C) 2006 by Aaron J. Seigo <[email protected]> * - * * - * 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-2010 Peter Penz <[email protected]> + * SPDX-FileCopyrightText: 2006 Aaron J. Seigo <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef VIEWPROPERTIES_H #define VIEWPROPERTIES_H diff --git a/src/views/zoomlevelinfo.cpp b/src/views/zoomlevelinfo.cpp index d64974d29..6e499967a 100644 --- a/src/views/zoomlevelinfo.cpp +++ b/src/views/zoomlevelinfo.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2008 by Peter Penz <[email protected]> * - * * - * 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: 2008 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "zoomlevelinfo.h" diff --git a/src/views/zoomlevelinfo.h b/src/views/zoomlevelinfo.h index 4a26f754b..956584826 100644 --- a/src/views/zoomlevelinfo.h +++ b/src/views/zoomlevelinfo.h @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2008 by Peter Penz <[email protected]> * - * * - * 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: 2008 Peter Penz <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #ifndef ZOOMLEVELINFO_H #define ZOOMLEVELINFO_H |
