Skip to content
GitLab
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
6c8de22b
Commit
6c8de22b
authored
Sep 18, 2022
by
Elvis Angelaccio
Browse files
Add sharedWithMeDate to property tab
CCBUG: 385388
parent
70a42997
Pipeline
#236066
passed with stage
in 38 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/gdrive_udsentry.h
View file @
6c8de22b
...
...
@@ -17,7 +17,8 @@ enum GDriveUDSEntryExtras {
Owners
,
Version
,
LastModifyingUser
,
Description
Description
,
SharedWithMeDate
};
#endif // GDRIVEUDSENTRY_H
src/integration/propertiesplugin/gdrivepropertiesplugin.cpp
View file @
6c8de22b
...
...
@@ -58,6 +58,15 @@ void GDrivePropertiesPlugin::showEntryDetails(const KIO::UDSEntry &entry)
const
QString
lastViewedByMe
=
m_item
.
timeString
(
KFileItem
::
AccessTime
);
m_ui
.
lastViewedByMeValue
->
setText
(
lastViewedByMe
);
if
(
entry
.
contains
(
GDriveUDSEntryExtras
::
SharedWithMeDate
))
{
m_ui
.
sharedWithMeValue
->
setText
(
entry
.
stringValue
(
GDriveUDSEntryExtras
::
SharedWithMeDate
));
m_ui
.
sharedWithMeLabel
->
show
();
m_ui
.
sharedWithMeValue
->
show
();
}
else
{
m_ui
.
sharedWithMeLabel
->
hide
();
m_ui
.
sharedWithMeValue
->
hide
();
}
const
QString
version
=
entry
.
stringValue
(
GDriveUDSEntryExtras
::
Version
);
m_ui
.
versionValue
->
setText
(
version
);
...
...
src/integration/propertiesplugin/gdrivepropertiesplugin.ui
View file @
6c8de22b
...
...
@@ -131,10 +131,10 @@
</property>
</widget>
</item>
<item
row=
"
5
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"last
Modifi
edByLabel"
>
<item
row=
"
6
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"last
View
edBy
Me
Label"
>
<property
name=
"text"
>
<string>
Last
modifi
ed by:
</string>
<string>
Last
view
ed by
me
:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
...
...
@@ -144,20 +144,20 @@
</property>
</widget>
</item>
<item
row=
"
5
"
column=
"1"
>
<widget
class=
"QLabel"
name=
"last
Modifi
edByValue"
>
<item
row=
"
6
"
column=
"1"
>
<widget
class=
"QLabel"
name=
"last
View
edBy
Me
Value"
>
<property
name=
"text"
>
<string
notr=
"true"
>
last
Modifi
edByValue
</string>
<string
notr=
"true"
>
last
View
edBy
Me
Value
</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=
"
lastViewedByMe
Label"
>
<item
row=
"
8
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"
version
Label"
>
<property
name=
"text"
>
<string>
Last viewed by me
:
</string>
<string>
Version
:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
...
...
@@ -167,20 +167,20 @@
</property>
</widget>
</item>
<item
row=
"
6
"
column=
"1"
>
<widget
class=
"QLabel"
name=
"
lastViewedByMe
Value"
>
<item
row=
"
8
"
column=
"1"
>
<widget
class=
"QLabel"
name=
"
version
Value"
>
<property
name=
"text"
>
<string
notr=
"true"
>
lastViewedByMe
Value
</string>
<string
notr=
"true"
>
version
Value
</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=
"
version
Label"
>
<item
row=
"
9
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"
md5
Label"
>
<property
name=
"text"
>
<string>
Version
:
</string>
<string>
MD5 checksum
:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
...
...
@@ -190,20 +190,20 @@
</property>
</widget>
</item>
<item
row=
"
7
"
column=
"1"
>
<widget
class=
"QLabel"
name=
"
version
Value"
>
<item
row=
"
9
"
column=
"1"
>
<widget
class=
"QLabel"
name=
"
md5
Value"
>
<property
name=
"text"
>
<string
notr=
"true"
>
version
Value
</string>
<string
notr=
"true"
>
md5
Value
</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=
"
md5
Label"
>
<item
row=
"
5
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"
lastModifiedBy
Label"
>
<property
name=
"text"
>
<string>
MD5 checksum
:
</string>
<string>
Last modified by
:
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
</set>
...
...
@@ -213,16 +213,30 @@
</property>
</widget>
</item>
<item
row=
"
8
"
column=
"1"
>
<widget
class=
"QLabel"
name=
"
md5
Value"
>
<item
row=
"
5
"
column=
"1"
>
<widget
class=
"QLabel"
name=
"
lastModifiedBy
Value"
>
<property
name=
"text"
>
<string
notr=
"true"
>
md5
Value
</string>
<string
notr=
"true"
>
lastModifiedBy
Value
</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=
"sharedWithMeLabel"
>
<property
name=
"text"
>
<string>
Shared with me:
</string>
</property>
</widget>
</item>
<item
row=
"7"
column=
"1"
>
<widget
class=
"QLabel"
name=
"sharedWithMeValue"
>
<property
name=
"text"
>
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item>
...
...
src/kio_gdrive.cpp
View file @
6c8de22b
...
...
@@ -229,6 +229,9 @@ KIO::UDSEntry KIOGDrive::fileToUDSEntry(const FilePtr &origFile, const QString &
entry
.
fastInsert
(
GDriveUDSEntryExtras
::
Md5
,
file
->
md5Checksum
());
entry
.
fastInsert
(
GDriveUDSEntryExtras
::
LastModifyingUser
,
file
->
lastModifyingUserName
());
entry
.
fastInsert
(
GDriveUDSEntryExtras
::
Owners
,
file
->
ownerNames
().
join
(
QStringLiteral
(
", "
)));
if
(
file
->
sharedWithMeDate
().
isValid
())
{
entry
.
fastInsert
(
GDriveUDSEntryExtras
::
SharedWithMeDate
,
QLocale
::
system
().
toString
(
file
->
sharedWithMeDate
(),
QLocale
::
LongFormat
));
}
return
entry
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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