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
KTorrent
Commits
51910056
Commit
51910056
authored
Dec 27, 2021
by
Alexander Lohnau
💬
Browse files
Port away from deprecated QDateTime methods
parent
b6d4fb26
Changes
3
Hide whitespace changes
Inline
Side-by-side
plugins/mediaplayer/mediamodel.cpp
View file @
51910056
...
...
@@ -77,7 +77,7 @@ QVariant MediaModel::data(const QModelIndex &index, int role) const
case
Qt
::
UserRole
:
// user role is for finding out if a torrent is complete
return
mf
->
fullyAvailable
();
case
Qt
::
UserRole
+
1
:
return
QFileInfo
(
mf
->
path
()).
lastModified
().
to
Time_t
();
return
QFileInfo
(
mf
->
path
()).
lastModified
().
to
SecsSinceEpoch
();
default:
return
QVariant
();
}
...
...
plugins/syndication/feedwidget.cpp
View file @
51910056
...
...
@@ -186,7 +186,7 @@ void FeedWidget::selectionChanged(const QItemSelection &sel, const QItemSelectio
Syndication
::
ItemPtr
item
=
model
->
itemForIndex
(
m_item_list
->
selectionModel
()
->
selectedRows
().
front
());
if
(
item
)
{
m_item_view
->
setHtml
(
item_template
.
arg
(
item
->
title
())
.
arg
(
QLocale
().
toString
(
QDateTime
::
from
Time_t
(
item
->
datePublished
()),
QLocale
::
ShortFormat
))
.
arg
(
QLocale
().
toString
(
QDateTime
::
from
SecsSinceEpoch
(
item
->
datePublished
()),
QLocale
::
ShortFormat
))
.
arg
(
item
->
description
())
.
arg
(
QApplication
::
palette
().
text
().
color
().
name
(
QColor
::
NameFormat
::
HexRgb
)),
QUrl
(
feed
->
feedData
()
->
link
()));
...
...
plugins/syndication/feedwidgetmodel.cpp
View file @
51910056
...
...
@@ -96,7 +96,7 @@ QVariant FeedWidgetModel::data(const QModelIndex &index, int role) const
case
0
:
return
item
->
title
();
case
1
:
return
QLocale
().
toString
(
QDateTime
::
from
Time_t
(
item
->
datePublished
()),
QLocale
::
ShortFormat
);
return
QLocale
().
toString
(
QDateTime
::
from
SecsSinceEpoch
(
item
->
datePublished
()),
QLocale
::
ShortFormat
);
case
2
:
return
TorrentUrlFromItem
(
item
);
default:
...
...
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