More const; don't take mutable char *argv[] where const is all we need
QTest::qtest_qParseArgs() takes a needlessly mutable parameter. This needs transient legacy version until qtdeclarative is converted to use the const-qualified variant. Change-Id: I19fad25423f6f1ea7d5fac537815f4f633ac4405 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
This commit is contained in:
parent
e089989bac
commit
35bba2cac5
@ -496,7 +496,7 @@ static void qPrintDataTags(FILE *stream)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int qToInt(char *str)
|
static int qToInt(const char *str)
|
||||||
{
|
{
|
||||||
char *pEnd;
|
char *pEnd;
|
||||||
int l = (int)strtol(str, &pEnd, 10);
|
int l = (int)strtol(str, &pEnd, 10);
|
||||||
@ -507,7 +507,7 @@ static int qToInt(char *str)
|
|||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml)
|
Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, const char *const argv[], bool qml)
|
||||||
{
|
{
|
||||||
QTestLog::LogMode logFormat = QTestLog::Plain;
|
QTestLog::LogMode logFormat = QTestLog::Plain;
|
||||||
const char *logFilename = 0;
|
const char *logFilename = 0;
|
||||||
@ -845,6 +845,11 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml)
|
|||||||
QTestLog::addLogger(logFormat, logFilename);
|
QTestLog::addLogger(logFormat, logFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Temporary, backwards compatibility, until qtdeclarative's use of it is converted
|
||||||
|
Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml) {
|
||||||
|
qtest_qParseArgs(argc, const_cast<const char *const *>(argv), qml);
|
||||||
|
}
|
||||||
|
|
||||||
QBenchmarkResult qMedian(const QVector<QBenchmarkResult> &container)
|
QBenchmarkResult qMedian(const QVector<QBenchmarkResult> &container)
|
||||||
{
|
{
|
||||||
const int count = container.count();
|
const int count = container.count();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user