Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
KIO GDrive
Commits
5f5ae8dc
Commit
5f5ae8dc
authored
Jul 15, 2020
by
David Barchiesi
Browse files
Add properties plugin for viewing Google Drive related information.
parent
1727aab8
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/integration/CMakeLists.txt
View file @
5f5ae8dc
add_subdirectory
(
copyurlitemaction
)
add_subdirectory
(
propertiesplugin
)
src/integration/propertiesplugin/CMakeLists.txt
0 → 100644
View file @
5f5ae8dc
set
(
gdrivepropertiesplugin_SRCS
gdrivepropertiesplugin.cpp
../../gdrivedebug.cpp
)
ki18n_wrap_ui
(
gdrivepropertiesplugin_UI_SRCS gdrivepropertiesplugin.ui
)
add_library
(
gdrivepropertiesplugin MODULE
${
gdrivepropertiesplugin_UI_SRCS
}
${
gdrivepropertiesplugin_SRCS
}
)
target_link_libraries
(
gdrivepropertiesplugin
KF5::I18n
KF5::KIOWidgets
)
install
(
TARGETS gdrivepropertiesplugin DESTINATION
${
PLUGIN_INSTALL_DIR
}
)
install
(
FILES gdrivepropertiesplugin.desktop DESTINATION
${
SERVICES_INSTALL_DIR
}
)
src/integration/propertiesplugin/gdrivepropertiesplugin.cpp
0 → 100644
View file @
5f5ae8dc
/*
* 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/>.
*/
#include "gdrivepropertiesplugin.h"
#include "../../gdrivedebug.h"
#include "../../gdrive_udsentry.h"
#include <KPluginFactory>
#include <KPluginLoader>
#include <QClipboard>
#include <QDesktopServices>
#include <KIO/StatJob>
K_PLUGIN_FACTORY
(
GDrivePropertiesPluginFactory
,
registerPlugin
<
GDrivePropertiesPlugin
>
();)
GDrivePropertiesPlugin
::
GDrivePropertiesPlugin
(
QObject
*
parent
,
const
QList
<
QVariant
>
&
args
)
:
KPropertiesDialogPlugin
(
qobject_cast
<
KPropertiesDialog
*>
(
parent
))
{
Q_UNUSED
(
args
)
qCDebug
(
GDRIVE
)
<<
"Starting Google Drive properties tab"
;
// Ignore if more than one file is selected
if
(
properties
->
items
().
size
()
!=
1
)
{
qCDebug
(
GDRIVE
)
<<
"Can't show Google Drive properties tab for more than one item"
;
return
;
}
m_item
=
properties
->
items
().
at
(
0
);
// Ignore if not a Google Drive url
if
(
m_item
.
url
().
scheme
()
!=
QLatin1String
(
"gdrive"
))
{
qCDebug
(
GDRIVE
)
<<
"Can't show Google Drive properties for non Google Drive entries"
;
return
;
}
m_ui
.
setupUi
(
&
m_widget
);
// Re stat() the item because the entry is probably lacking required information.
const
KIO
::
StatJob
*
job
=
KIO
::
stat
(
m_item
.
url
(),
KIO
::
HideProgressInfo
);
connect
(
job
,
&
KJob
::
finished
,
this
,
&
GDrivePropertiesPlugin
::
statJobFinished
);
}
void
GDrivePropertiesPlugin
::
showEntryDetails
(
const
KIO
::
UDSEntry
&
entry
)
{
const
QString
id
=
entry
.
stringValue
(
GDriveUDSEntryExtras
::
Id
);
m_ui
.
idValue
->
setText
(
id
);
const
QString
created
=
m_item
.
timeString
(
KFileItem
::
CreationTime
);
m_ui
.
createdValue
->
setText
(
created
);
const
QString
modified
=
m_item
.
timeString
(
KFileItem
::
ModificationTime
);
m_ui
.
modifiedValue
->
setText
(
modified
);
const
QString
lastViewedByMe
=
m_item
.
timeString
(
KFileItem
::
AccessTime
);
m_ui
.
lastViewedByMeValue
->
setText
(
lastViewedByMe
);
const
QString
version
=
entry
.
stringValue
(
GDriveUDSEntryExtras
::
Version
);
m_ui
.
versionValue
->
setText
(
version
);
const
QString
md5
=
entry
.
stringValue
(
GDriveUDSEntryExtras
::
Md5
);
m_ui
.
md5Value
->
setText
(
md5
);
const
QString
lastModifyingUserName
=
entry
.
stringValue
(
GDriveUDSEntryExtras
::
LastModifyingUser
);
m_ui
.
lastModifiedByValue
->
setText
(
lastModifyingUserName
);
const
QString
owners
=
entry
.
stringValue
(
GDriveUDSEntryExtras
::
Owners
);
m_ui
.
ownersValue
->
setText
(
owners
);
const
QString
description
=
entry
.
stringValue
(
KIO
::
UDSEntry
::
UDS_COMMENT
);
m_ui
.
descriptionValue
->
setText
(
description
);
const
QString
gdriveLink
=
entry
.
stringValue
(
GDriveUDSEntryExtras
::
Url
);
connect
(
m_ui
.
urlOpenButton
,
&
QPushButton
::
clicked
,
this
,
[
gdriveLink
]()
{
QDesktopServices
::
openUrl
(
QUrl
(
gdriveLink
));
});
connect
(
m_ui
.
urlCopyButton
,
&
QPushButton
::
clicked
,
this
,
[
gdriveLink
]()
{
QGuiApplication
::
clipboard
()
->
setText
(
gdriveLink
);
});
}
void
GDrivePropertiesPlugin
::
statJobFinished
(
KJob
*
job
)
{
KIO
::
StatJob
*
statJob
=
qobject_cast
<
KIO
::
StatJob
*>
(
job
);
if
(
!
statJob
||
statJob
->
error
())
{
qCDebug
(
GDRIVE
)
<<
"Failed stat()ing"
<<
statJob
->
url
()
<<
statJob
->
errorString
();
qCDebug
(
GDRIVE
)
<<
"Not showing Google Drive properties tab"
;
return
;
}
const
KIO
::
UDSEntry
entry
=
statJob
->
statResult
();
showEntryDetails
(
entry
);
properties
->
addPage
(
&
m_widget
,
"G&oogle Drive"
);
}
#include "gdrivepropertiesplugin.moc"
src/integration/propertiesplugin/gdrivepropertiesplugin.desktop
0 → 100644
View file @
5f5ae8dc
[Desktop Entry]
Type=Service
Icon=folder-gdrive
Name=Google Drive Properties Page
Comment=Properties page showing additional information regarding a Google Drive item
X-KDE-Library=gdrivepropertiesplugin
X-KDE-ServiceTypes=KPropertiesDialog/Plugin
MimeType=inode/directory;application/octet-stream
src/integration/propertiesplugin/gdrivepropertiesplugin.h
0 → 100644
View file @
5f5ae8dc
/*
* 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 GDRIVEPROPERTIESPLUGIN_H
#define GDRIVEPROPERTIESPLUGIN_H
#include <KPropertiesDialog>
#include "ui_gdrivepropertiesplugin.h"
class
GDrivePropertiesPlugin
:
public
KPropertiesDialogPlugin
{
Q_OBJECT
public:
explicit
GDrivePropertiesPlugin
(
QObject
*
parent
,
const
QList
<
QVariant
>
&
args
);
~
GDrivePropertiesPlugin
()
override
=
default
;
private:
QWidget
m_widget
;
Ui
::
GDrivePropertiesWidget
m_ui
;
KFileItem
m_item
;
void
showEntryDetails
(
const
KIO
::
UDSEntry
&
entry
);
private
slots
:
void
statJobFinished
(
KJob
*
job
);
};
#endif // GDRIVEPROPERTIESPLUGIN_H
src/integration/propertiesplugin/gdrivepropertiesplugin.ui
0 → 100644
View file @
5f5ae8dc
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
GDrivePropertiesWidget
</class>
<widget
class=
"QWidget"
name=
"GDrivePropertiesWidget"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
783
</width>
<height>
612
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<layout
class=
"QFormLayout"
name=
"formLayout"
>
<property
name=
"formAlignment"
>
<set>
Qt::AlignHCenter|Qt::AlignTop
</set>
</property>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"idLabel"
>
<property
name=
"text"
>
<string>
Id:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
<property
name=
"textInteractionFlags"
>
<set>
Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
</set>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QLabel"
name=
"idValue"
>
<property
name=
"text"
>
<string
notr=
"true"
>
idValue
</string>
</property>
<property
name=
"textInteractionFlags"
>
<set>
Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
</set>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"descriptionLabel"
>
<property
name=
"text"
>
<string>
Description:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
<property
name=
"textInteractionFlags"
>
<set>
Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
</set>
</property>
</widget>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QLabel"
name=
"descriptionValue"
>
<property
name=
"text"
>
<string
notr=
"true"
>
descriptionValue
</string>
</property>
<property
name=
"textInteractionFlags"
>
<set>
Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
</set>
</property>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<widget
class=
"QLabel"
name=
"ownersLabel"
>
<property
name=
"text"
>
<string>
Owners:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
<property
name=
"textInteractionFlags"
>
<set>
Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
</set>
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<widget
class=
"QLabel"
name=
"ownersValue"
>
<property
name=
"text"
>
<string
notr=
"true"
>
ownersValue
</string>
</property>
<property
name=
"textInteractionFlags"
>
<set>
Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
</set>
</property>
</widget>
</item>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QLabel"
name=
"createdLabel"
>
<property
name=
"text"
>
<string>
Created:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
<property
name=
"textInteractionFlags"
>
<set>
Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
</set>
</property>
</widget>
</item>
<item
row=
"3"
column=
"1"
>
<widget
class=
"QLabel"
name=
"createdValue"
>
<property
name=
"text"
>
<string
notr=
"true"
>
createdValue
</string>
</property>
<property
name=
"textInteractionFlags"
>
<set>
Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
</set>
</property>
</widget>
</item>
<item
row=
"4"
column=
"0"
>
<widget
class=
"QLabel"
name=
"modifiedLabel"
>
<property
name=
"text"
>
<string>
Modified:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
<property
name=
"textInteractionFlags"
>
<set>
Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
</set>
</property>
</widget>
</item>
<item
row=
"4"
column=
"1"
>
<widget
class=
"QLabel"
name=
"modifiedValue"
>
<property
name=
"text"
>
<string
notr=
"true"
>
modifiedValue
</string>
</property>
<property
name=
"textInteractionFlags"
>
<set>
Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
</set>
</property>
</widget>
</item>
<item
row=
"5"
column=
"0"
>
<widget
class=
"QLabel"
name=
"lastModifiedByLabel"
>
<property
name=
"text"
>
<string>
Last modified by:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
<property
name=
"textInteractionFlags"
>
<set>
Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
</set>
</property>
</widget>
</item>
<item
row=
"5"
column=
"1"
>
<widget
class=
"QLabel"
name=
"lastModifiedByValue"
>
<property
name=
"text"
>
<string
notr=
"true"
>
lastModifiedByValue
</string>
</property>
<property
name=
"textInteractionFlags"
>
<set>
Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
</set>
</property>
</widget>
</item>
<item
row=
"6"
column=
"0"
>
<widget
class=
"QLabel"
name=
"lastViewedByMeLabel"
>
<property
name=
"text"
>
<string>
Last viewed by me:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
<property
name=
"textInteractionFlags"
>
<set>
Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
</set>
</property>
</widget>
</item>
<item
row=
"6"
column=
"1"
>
<widget
class=
"QLabel"
name=
"lastViewedByMeValue"
>
<property
name=
"text"
>
<string
notr=
"true"
>
lastViewedByMeValue
</string>
</property>
<property
name=
"textInteractionFlags"
>
<set>
Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
</set>
</property>
</widget>
</item>
<item
row=
"7"
column=
"0"
>
<widget
class=
"QLabel"
name=
"versionLabel"
>
<property
name=
"text"
>
<string>
Version:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
<property
name=
"textInteractionFlags"
>
<set>
Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
</set>
</property>
</widget>
</item>
<item
row=
"7"
column=
"1"
>
<widget
class=
"QLabel"
name=
"versionValue"
>
<property
name=
"text"
>
<string
notr=
"true"
>
versionValue
</string>
</property>
<property
name=
"textInteractionFlags"
>
<set>
Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
</set>
</property>
</widget>
</item>
<item
row=
"8"
column=
"0"
>
<widget
class=
"QLabel"
name=
"md5Label"
>
<property
name=
"text"
>
<string>
MD5 checksum:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
</property>
<property
name=
"textInteractionFlags"
>
<set>
Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
</set>
</property>
</widget>
</item>
<item
row=
"8"
column=
"1"
>
<widget
class=
"QLabel"
name=
"md5Value"
>
<property
name=
"text"
>
<string
notr=
"true"
>
md5Value
</string>
</property>
<property
name=
"textInteractionFlags"
>
<set>
Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse
</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer
name=
"betweenFormAndButtonsSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeType"
>
<enum>
QSizePolicy::Fixed
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
16
</height>
</size>
</property>
</spacer>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<spacer
name=
"horizontalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
<item>
<widget
class=
"QPushButton"
name=
"urlOpenButton"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Fixed"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"text"
>
<string>
Open in browser
</string>
</property>
<property
name=
"icon"
>
<iconset
theme=
"internet-services"
>
<normaloff>
.
</normaloff>
.
</iconset>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"urlCopyButton"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Fixed"
vsizetype=
"Fixed"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"toolTip"
>
<string>
Click to copy the checksum to the clipboard.
</string>
</property>
<property
name=
"text"
>
<string>
Copy URL to Clipboard
</string>
</property>
<property
name=
"icon"
>
<iconset
theme=
"edit-copy"
>
<normaloff>
../../../kio/src/widgets
</normaloff>
../../../kio/src/widgets
</iconset>
</property>
</widget>
</item>
<item>
<spacer
name=
"horizontalSpacer_2"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
40
</width>
<height>
20
</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
src/kio_gdrive.cpp
View file @
5f5ae8dc
...
...
@@ -237,7 +237,12 @@ 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
(
GDriveUDSEntryExtras
::
Id
,
file
->
id
());
entry
.
fastInsert
(
GDriveUDSEntryExtras
::
Url
,
file
->
alternateLink
().
toString
());
entry
.
fastInsert
(
GDriveUDSEntryExtras
::
Version
,
QString
::
number
(
file
->
version
()));
entry
.
fastInsert
(
GDriveUDSEntryExtras
::
Md5
,
file
->
md5Checksum
());
entry
.
fastInsert
(
GDriveUDSEntryExtras
::
LastModifyingUser
,
file
->
lastModifyingUserName
());
entry
.
fastInsert
(
GDriveUDSEntryExtras
::
Owners
,
file
->
ownerNames
().
join
(
QStringLiteral
(
", "
)));
return
entry
;
}
...
...
@@ -528,7 +533,7 @@ QString KIOGDrive::resolveFileIdFromPath(const QString &path, PathFlags flags)
Q_ASSERT
(
!
gdriveUrl
.
isRoot
());
if
(
gdriveUrl
.
isAccountRoot
()
||
gdriveUrl
.
isTrashDir
())
{
qCDebug
(
GDRIVE
)
<<
"Resolved"
<<
path
<<
"to
\"
root
\"
"
;
qCDebug
(
GDRIVE
)
<<
"Resolved"
<<
path
<<
"to
account
root"
;
return
rootFolderId
(
gdriveUrl
.
account
());
}
...
...
@@ -553,6 +558,8 @@ QString KIOGDrive::resolveFileIdFromPath(const QString &path, PathFlags flags)
return
QString
();
}
qCDebug
(
GDRIVE
)
<<
"Getting ID for"
<<
gdriveUrl
.
filename
()
<<
"in parent with ID"
<<
parentId
;
FileSearchQuery
query
;
if
(
flags
!=
KIOGDrive
::
None
)
{
query
.
addQuery
(
FileSearchQuery
::
MimeType
,
...
...
@@ -571,7 +578,6 @@ QString KIOGDrive::resolveFileIdFromPath(const QString &path, PathFlags flags)
}
const
ObjectsList
objects
=
fetchJob
.
items
();
qCDebug
(
GDRIVE
)
<<
objects
;
if
(
objects
.
isEmpty
())
{
qCWarning
(
GDRIVE
)
<<
"Failed to resolve"
<<
path
;
return
QString
();
...
...
@@ -823,7 +829,10 @@ void KIOGDrive::mkdir(const QUrl &url, int permissions)
void
KIOGDrive
::
stat
(
const
QUrl
&
url
)
{
qCDebug
(
GDRIVE
)
<<
"Going to stat()"
<<
url
;
// TODO We should be using StatDetails to limit how we respond to a stat request
// const QString statDetails = metaData(QStringLiteral("statDetails"));
// KIO::StatDetails details = statDetails.isEmpty() ? KIO::StatDefaultDetails : static_cast<KIO::StatDetails>(statDetails.toInt());
// qCDebug(GDRIVE) << "Going to stat()" << url << "for details" << details;
const
auto
gdriveUrl
=
GDriveUrl
(
url
);
if
(
gdriveUrl
.
isRoot
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment