Преглед изворни кода

Fix QTime deprecation warnings

Move from QTime::start/elapsed (deprecated in 5.14) to QElapsedTimer
(available since 4.7).
Eivind Uggedal пре 3 година
родитељ
комит
dfaea1d7d2
2 измењених фајлова са 4 додато и 4 уклоњено
  1. 2 2
      src/input/InputComponent.h
  2. 2 2
      src/player/CodecsComponent.h

+ 2 - 2
src/input/InputComponent.h

@@ -7,7 +7,7 @@
 #include <QThread>
 #include <QVariantMap>
 #include <QTimer>
-#include <QTime>
+#include <QElapsedTimer>
 
 #include <functional>
 
@@ -131,7 +131,7 @@ private:
   QStringList m_autoRepeatActions;
 
   QVariantMap m_currentLongPressAction;
-  QTime m_longHoldTimer;
+  QElapsedTimer m_longHoldTimer;
 };
 
 #endif // INPUTADAPTER_H

+ 2 - 2
src/player/CodecsComponent.h

@@ -10,7 +10,7 @@
 #include <QQueue>
 #include <QUrl>
 #include <QVariant>
-#include <QTime>
+#include <QElapsedTimer>
 #include <QSet>
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -89,7 +89,7 @@ private:
   QNetworkAccessManager m_WebCtrl;
   QByteArray m_DownloadedData;
   QVariant m_userData;
-  QTime m_currentStartTime;
+  QElapsedTimer m_currentStartTime;
   int m_lastProgress;
 };