Browse Source

Migrate away from enums deprecated going from Qt5.12 to Qt5.15

In some instances (touched by this commit) QGC has been using enums deprecated
in Qt5.15. Enum deprecation itself appears to be a new thing (there in C++14, but
seemingly not there in C++11). We have since formally upgraded to C++17
(https://github.com/mavlink/qgroundcontrol/pull/9760), but presumably nobody
recompiled against Qt5.15 until I did, saw the errors and found myself needing
to propose this change.

The change itself is trivial and simply follows the migration notes found against
individual deprecated enums.
QGC4.4
Remek Zajac 4 years ago committed by Patrick José Pereira
parent
commit
5aa27b5ba5
  1. 2
      src/Camera/QGCCameraControl.cc
  2. 2
      src/QGCApplication.cc
  3. 2
      src/Vehicle/MAVLinkLogManager.cc
  4. 2
      src/VideoManager/SubtitleWriter.cc

2
src/Camera/QGCCameraControl.cc

@ -1994,7 +1994,7 @@ QGCCameraControl::_httpRequest(const QString &url) @@ -1994,7 +1994,7 @@ QGCCameraControl::_httpRequest(const QString &url)
tempProxy.setType(QNetworkProxy::DefaultProxy);
_netManager->setProxy(tempProxy);
QNetworkRequest request(url);
request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
request.setAttribute(QNetworkRequest::RedirectPolicyAttribute, true);
QSslConfiguration conf = request.sslConfiguration();
conf.setPeerVerifyMode(QSslSocket::VerifyNone);
request.setSslConfiguration(conf);

2
src/QGCApplication.cc

@ -423,7 +423,7 @@ void QGCApplication::setLanguage() @@ -423,7 +423,7 @@ void QGCApplication::setLanguage()
_locale = QLocale(QLocale::Korean);
break;
case 13:
_locale = QLocale(QLocale::Norwegian);
_locale = QLocale(QLocale::NorwegianBokmal);
break;
case 14:
_locale = QLocale(QLocale::Polish);

2
src/Vehicle/MAVLinkLogManager.cc

@ -743,7 +743,7 @@ MAVLinkLogManager::_sendLog(const QString& logFile) @@ -743,7 +743,7 @@ MAVLinkLogManager::_sendLog(const QString& logFile)
file->setParent(multiPart);
QNetworkRequest request(_uploadURL);
#if QT_VERSION > 0x050600
request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
request.setAttribute(QNetworkRequest::RedirectPolicyAttribute, true);
#endif
QNetworkReply* reply = _nam->post(request, multiPart);
connect(reply, &QNetworkReply::finished, this, &MAVLinkLogManager::_uploadFinished);

2
src/VideoManager/SubtitleWriter.cc

@ -166,7 +166,7 @@ void SubtitleWriter::_captureTelemetry() @@ -166,7 +166,7 @@ void SubtitleWriter::_captureTelemetry()
stringColumns << QStringLiteral("Dialogue: 0,%1,%2,Default,,0,0,0,,{\\pos(10,35)}%3\n")
.arg(start.toString("H:mm:ss.zzz").chopped(2))
.arg(end.toString("H:mm:ss.zzz").chopped(2))
.arg(QDateTime::currentDateTime().toString(Qt::SystemLocaleShortDate));
.arg(QDateTime::currentDateTime().toString(QLocale::system().dateFormat(QLocale::ShortFormat)));
// Write new data
QTextStream stream(&_file);
for (const auto& i : stringColumns) {

Loading…
Cancel
Save