Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

...
 
Commits (3)
......@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0)
# KDE Application Version, managed by release script
set (RELEASE_SERVICE_VERSION_MAJOR "20")
set (RELEASE_SERVICE_VERSION_MINOR "07")
set (RELEASE_SERVICE_VERSION_MINOR "11")
set (RELEASE_SERVICE_VERSION_MICRO "70")
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
project(kio-gdrive VERSION ${RELEASE_SERVICE_VERSION})
......
include_directories(${CMAKE_SOURCE_DIR})
include_directories(${CMAKE_BINARY_DIR})
add_subdirectory(integration)
set(kio_gdrive_SRCS
kio_gdrive.cpp
pathcache.cpp
......@@ -43,12 +45,3 @@ target_link_libraries(kio_gdrive
${BACKEND_LIBS})
set_target_properties(kio_gdrive PROPERTIES OUTPUT_NAME "gdrive")
kcoreaddons_add_plugin(copyurlitemaction
SOURCES copyurlitemaction.cpp
JSON copyurlitemaction.json
INSTALL_NAMESPACE "kf5/kfileitemaction")
target_link_libraries(copyurlitemaction
KF5::I18n
KF5::KIOWidgets)
/*
* Copyright 2020 David Barchiesi <david@barchie.si>
*
* This program is free software; you can redistribute it and/or
* modify it under the 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/>.
*/
#ifndef GDRIVEUDSENTRY_H
#define GDRIVEUDSENTRY_H
#include <KIO/UDSEntry>
enum GDriveUDSEntryExtras {
Url = KIO::UDSEntry::UDS_EXTRA,
Id,
Md5,
Owners,
Version,
LastModifyingUser,
Description
};
#endif // GDRIVEUDSENTRY_H
add_subdirectory(copyurlitemaction)
kcoreaddons_add_plugin(gdrivecopyurlitemaction
SOURCES copyurlitemaction.cpp
JSON copyurlitemaction.json
INSTALL_NAMESPACE "kf5/kfileitemaction")
target_link_libraries(gdrivecopyurlitemaction
KF5::I18n
KF5::KIOWidgets)
......@@ -18,6 +18,7 @@
*/
#include "copyurlitemaction.h"
#include "../../gdrive_udsentry.h"
#include <QGuiApplication>
#include <QClipboard>
......@@ -50,7 +51,7 @@ QList<QAction*> CopyUrlItemAction::actions(const KFileItemListProperties& fileIt
}
const KIO::UDSEntry entry = item.entry();
const QString gdriveLink = entry.stringValue(KIO::UDSEntry::UDS_EXTRA);
const QString gdriveLink = entry.stringValue(GDriveUDSEntryExtras::Url);
// Ignore if missing a shareable link
if (gdriveLink.isEmpty()) {
return {};
......
......@@ -23,6 +23,7 @@
#include "gdrivehelper.h"
#include "gdriveurl.h"
#include "gdriveversion.h"
#include "gdrive_udsentry.h"
#include <QApplication>
#include <QMimeDatabase>
......@@ -236,7 +237,7 @@ KIO::UDSEntry KIOGDrive::fileToUDSEntry(const FilePtr &origFile, const QString &
entry.fastInsert(KIO::UDSEntry::UDS_ACCESS, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IXOTH);
}
entry.fastInsert(KIO::UDSEntry::UDS_EXTRA, file->alternateLink().toString());
entry.fastInsert(GDriveUDSEntryExtras::Url, file->alternateLink().toString());
return entry;
}
......