File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1269,10 +1269,23 @@ void MainWindow::httpresponse(QNetworkReply *reply)
1269
1269
1270
1270
if (reply->error () == QNetworkReply::NoError)
1271
1271
{
1272
+ // Check for redirect
1273
+ QVariant possibleRedirectUrl =
1274
+ reply->attribute (QNetworkRequest::RedirectionTargetAttribute);
1275
+
1276
+ if (!possibleRedirectUrl.toUrl ().isEmpty ())
1277
+ {
1278
+ m_NetworkManager->get (QNetworkRequest (possibleRedirectUrl.toUrl ()));
1279
+ return ;
1280
+ }
1281
+
1272
1282
// first line of the currentrelease file contains a major.minor.patch version string
1273
1283
QString sversion (reply->readLine ());
1274
1284
1275
1285
QStringList versiontokens = sversion.split (" ." );
1286
+ if (versiontokens.size () < 3 )
1287
+ return ;
1288
+
1276
1289
int major = versiontokens[0 ].toInt ();
1277
1290
int minor = versiontokens[1 ].toInt ();
1278
1291
int patch = versiontokens[2 ].toInt ();
You can’t perform that action at this time.
0 commit comments