File tree 1 file changed +2
-4
lines changed
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -278,10 +278,8 @@ public slots:
278
278
void getUrlHeaders (const QString &tId, const QString url)
279
279
{
280
280
QNetworkRequest req (QUrl::fromEncoded (url.toLatin1 ()));
281
- #if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
282
- req.setAttribute (QNetworkRequest::FollowRedirectsAttribute, true );
281
+ req.setAttribute (QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::NoLessSafeRedirectPolicy);
283
282
req.setMaximumRedirectsAllowed (2 );
284
- #endif
285
283
auto reply = _view->d ->account_ ->psi ()->networkAccessManager ()->head (req);
286
284
reply->setProperty (" tranId" , tId);
287
285
connect (reply, SIGNAL (finished ()), SLOT (onUrlHeadersReady ()));
@@ -515,7 +513,7 @@ void ChatView::contextMenuEvent(QContextMenuEvent *e)
515
513
Q_UNUSED (e)
516
514
qDebug (" Can't check menu hit point. Calling default handler" );
517
515
#else
518
- QUrl linkUrl;
516
+ QUrl linkUrl;
519
517
#ifdef WEBENGINE
520
518
QWebEngineContextMenuData cmd = d->webView ->page ()->contextMenuData ();
521
519
linkUrl = cmd.linkUrl ();
You can’t perform that action at this time.
0 commit comments