mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 06:45:37 +08:00
Fixed most Qt 5.14 deprecation warnings
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
#include <QStringList>
|
||||
#include <QStringBuilder>
|
||||
#include <QTextStream>
|
||||
#include <QTime>
|
||||
#include <QElapsedTimer>
|
||||
#include <QVector>
|
||||
#include <Qt>
|
||||
#include <algorithm>
|
||||
@@ -58,7 +58,7 @@ namespace BlackSample
|
||||
{
|
||||
int CSamplesPerformance::samplesMisc(QTextStream &out)
|
||||
{
|
||||
QTime timer;
|
||||
QElapsedTimer timer;
|
||||
int ms, number;
|
||||
CSamplesPerformance::copy10kStations(1); // init
|
||||
|
||||
@@ -194,7 +194,7 @@ namespace BlackSample
|
||||
|
||||
qint64 halfTime = baseTimeEpoch + DeltaTime * numberOfTimes / 2;
|
||||
|
||||
QTime timer;
|
||||
QElapsedTimer timer;
|
||||
timer.start();
|
||||
for (int cs = 0; cs < numberOfCallsigns; cs++)
|
||||
{
|
||||
@@ -245,7 +245,7 @@ namespace BlackSample
|
||||
|
||||
int CSamplesPerformance::samplesJson(QTextStream &out)
|
||||
{
|
||||
QTime timer;
|
||||
QElapsedTimer timer;
|
||||
auto situations = createSituations(0, 10000, 10);
|
||||
auto models = createModels(10000, 100);
|
||||
|
||||
@@ -297,7 +297,7 @@ namespace BlackSample
|
||||
|
||||
// DB format, all models denormalized in DB JSON format
|
||||
CDatabaseReader::JsonDatastoreResponse response;
|
||||
QTime timer;
|
||||
QElapsedTimer timer;
|
||||
|
||||
CDatabaseReader::stringToDatastoreResponse(liveryData, response);
|
||||
timer.start();
|
||||
@@ -345,7 +345,7 @@ namespace BlackSample
|
||||
|
||||
int CSamplesPerformance::samplesStringUtilsVsRegEx(QTextStream &out)
|
||||
{
|
||||
QTime timer;
|
||||
QElapsedTimer timer;
|
||||
static const QString chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789~_-=+!\"@#$%^&*()[]{} \t;:\\/?,.<>";
|
||||
QStringList strings;
|
||||
std::generate_n(std::back_inserter(strings), 100000, []
|
||||
@@ -438,7 +438,7 @@ namespace BlackSample
|
||||
const QString x8 = "88-1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
const QString x9 = "99-1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
|
||||
QTime time;
|
||||
QElapsedTimer time;
|
||||
time.start();
|
||||
for (int i = 0; i < loop; i++)
|
||||
{
|
||||
@@ -510,7 +510,7 @@ namespace BlackSample
|
||||
int CSamplesPerformance::samplesStringLiteralVsConstQString(QTextStream &out)
|
||||
{
|
||||
const int loop = 1e7;
|
||||
QTime time;
|
||||
QElapsedTimer time;
|
||||
QString x;
|
||||
time.start();
|
||||
for (int i = 0; i < loop; i++)
|
||||
@@ -597,7 +597,7 @@ namespace BlackSample
|
||||
Q_ASSERT(cs_25_100_rnd.size() == 100);
|
||||
Q_ASSERT(cs_50_100_rnd.size() == 100);
|
||||
|
||||
QTime time;
|
||||
QElapsedTimer time;
|
||||
time.start();
|
||||
for (int i = 1; i < 10000; ++i)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QString>
|
||||
#include <QTextStream>
|
||||
#include <QTime>
|
||||
#include <QElapsedTimer>
|
||||
#include <QtGlobal>
|
||||
|
||||
using namespace BlackMisc;
|
||||
@@ -41,7 +41,7 @@ int main(int argc, char *argv[])
|
||||
QTextStream streamOut(stdout);
|
||||
|
||||
bool run = true;
|
||||
QTime t;
|
||||
QElapsedTimer t;
|
||||
while (run)
|
||||
{
|
||||
streamOut << "Run samples:" << endl;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <QString>
|
||||
#include <QTemporaryFile>
|
||||
#include <QTextStream>
|
||||
#include <QTime>
|
||||
#include <QElapsedTimer>
|
||||
#include <QDir>
|
||||
#include <QtGlobal>
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace BlackSample
|
||||
Q_UNUSED(input);
|
||||
|
||||
streamOut << "reading directly" << endl;
|
||||
QTime time;
|
||||
QElapsedTimer time;
|
||||
time.start();
|
||||
streamOut << "reading " << parser.getFirstModelDirectoryOrDefault() << endl;
|
||||
parser.startLoading();
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace BlackSample
|
||||
const QSet<QString> configFiles = CFsCommonUtil::findP3dAddOnConfigFiles("v4");
|
||||
streamOut << BlackMisc::joinStringSet(configFiles, ", ") << endl;
|
||||
|
||||
const QSet<QString> addOnPaths = CFsCommonUtil::allConfigFilesPathValues(configFiles.toList(), false, {});
|
||||
const QSet<QString> addOnPaths = CFsCommonUtil::allConfigFilesPathValues(configFiles.values(), false, {});
|
||||
streamOut << BlackMisc::joinStringSet(addOnPaths, ", ") << endl;
|
||||
|
||||
const QSet<QString> simObjectPaths = CFsCommonUtil::fsxSimObjectsPaths("B:/fsx.cfg", false);
|
||||
|
||||
Reference in New Issue
Block a user