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
Multimedia
JuK
Commits
25d4fa7c
Commit
25d4fa7c
authored
Jan 21, 2020
by
Laurent Montel
Browse files
Make it compile against qt5.15 without deprecated method
parent
ce7108fe
Pipeline
#13605
passed with stage
in 20 minutes and 40 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lyricswidget.cpp
View file @
25d4fa7c
...
...
@@ -113,7 +113,11 @@ void LyricsWidget::showEvent(QShowEvent *)
void
LyricsWidget
::
receiveListReply
(
QNetworkReply
*
reply
)
{
disconnect
(
m_networkAccessManager
,
SIGNAL
(
finished
(
QNetworkReply
*
)),
this
,
SLOT
(
receiveListReply
(
QNetworkReply
*
)));
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
if
(
reply
->
error
()
!=
QNetworkReply
::
NoError
)
{
#else
if
(
reply
->
networkError
()
!=
QNetworkReply
::
NoError
)
{
#endif
qCWarning
(
JUK_LOG
)
<<
"Error while fetching lyrics: "
<<
reply
->
errorString
();
setHtml
(
i18n
(
"<span style='color:red'>Error while retrieving lyrics!</span>"
));
return
;
...
...
@@ -142,7 +146,11 @@ void LyricsWidget::receiveListReply(QNetworkReply* reply)
void
LyricsWidget
::
receiveLyricsReply
(
QNetworkReply
*
reply
)
{
disconnect
(
m_networkAccessManager
,
SIGNAL
(
finished
(
QNetworkReply
*
)),
this
,
SLOT
(
receiveLyricsReply
(
QNetworkReply
*
)));
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
if
(
reply
->
error
()
!=
QNetworkReply
::
NoError
)
{
#else
if
(
reply
->
networkError
()
!=
QNetworkReply
::
NoError
)
{
#endif
qCWarning
(
JUK_LOG
)
<<
"Error while fetching lyrics: "
<<
reply
->
errorString
();
setHtml
(
i18n
(
"<span style='color:red'>Error while retrieving lyrics!</span>"
));
return
;
...
...
nowplaying.cpp
View file @
25d4fa7c
...
...
@@ -122,7 +122,9 @@ CoverItem::CoverItem(NowPlaying *parent) :
NowPlayingItem
(
parent
)
{
setObjectName
(
QLatin1String
(
"CoverItem"
));
setFixedHeight
(
parent
->
height
()
-
parent
->
layout
()
->
margin
()
*
2
);
const
QMargins
margins
=
parent
->
layout
()
->
contentsMargins
();
setFixedHeight
(
parent
->
height
()
-
(
margins
.
top
()
+
margins
.
bottom
()));
setContentsMargins
(
1
,
1
,
1
,
1
);
setAcceptDrops
(
true
);
}
...
...
@@ -249,7 +251,8 @@ TrackItem::TrackItem(NowPlaying *parent) :
NowPlayingItem
(
parent
)
{
setObjectName
(
QLatin1String
(
"TrackItem"
));
setFixedHeight
(
parent
->
height
()
-
parent
->
layout
()
->
margin
()
*
2
);
const
QMargins
margins
=
parent
->
layout
()
->
contentsMargins
();
setFixedHeight
(
parent
->
height
()
-
(
margins
.
top
()
+
margins
.
bottom
()));
setSizePolicy
(
QSizePolicy
::
Preferred
,
QSizePolicy
::
Fixed
);
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
this
);
...
...
playlist.cpp
View file @
25d4fa7c
...
...
@@ -280,7 +280,7 @@ void Playlist::save()
QStringList
fileList
=
files
();
foreach
(
const
QString
&
file
,
fileList
)
stream
<<
file
<<
endl
;
stream
<<
file
<<
'\n'
;
file
.
close
();
}
...
...
@@ -551,7 +551,7 @@ void Playlist::slotAddCover(bool retrieveLocal)
this
,
i18n
(
"Select Cover Image File"
),
QUrl
::
fromLocalFile
(
QDir
::
home
().
path
()),
i18n
(
"Images (*.png *.jpg)"
),
nullptr
,
0
,
QStringList
()
<<
QStringLiteral
(
"file"
)
{}
,
QStringList
()
<<
QStringLiteral
(
"file"
)
);
if
(
file
.
isEmpty
())
return
;
...
...
scrobbler.cpp
View file @
25d4fa7c
...
...
@@ -187,7 +187,11 @@ void Scrobbler::handleAuthenticationReply()
QNetworkReply
*
reply
=
qobject_cast
<
QNetworkReply
*>
(
sender
());
qCDebug
(
JUK_LOG
)
<<
"got authentication reply"
;
if
(
reply
->
error
()
!=
QNetworkReply
::
NoError
)
{
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
if
(
reply
->
error
()
!=
QNetworkReply
::
NoError
)
{
#else
if
(
reply
->
networkError
()
!=
QNetworkReply
::
NoError
)
{
#endif
emit
invalidAuth
();
qCWarning
(
JUK_LOG
)
<<
"Error while getting authentication reply"
<<
reply
->
errorString
();
return
;
...
...
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