compiler warning fixes

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2019-11-18 23:02:48 +00:00
parent b911a502d1
commit 0e87a02a0b
5 changed files with 21 additions and 22 deletions

View file

@ -1931,7 +1931,6 @@ int QObject::receivers(const char *signal) const
return false; return false;
} }
Q_D(const QObject);
QMutexLocker locker(signalSlotLock(this)); QMutexLocker locker(signalSlotLock(this));
if (d->connectionLists) { if (d->connectionLists) {
if (signal_index < d->connectionLists->count()) { if (signal_index < d->connectionLists->count()) {

View file

@ -240,8 +240,8 @@ class QScopedLoopLevelCounter
{ {
QThreadData *threadData; QThreadData *threadData;
public: public:
inline QScopedLoopLevelCounter(QThreadData *threadData) inline QScopedLoopLevelCounter(QThreadData *threaddata)
: threadData(threadData) : threadData(threaddata)
{ ++threadData->loopLevel; } { ++threadData->loopLevel; }
inline ~QScopedLoopLevelCounter() inline ~QScopedLoopLevelCounter()
{ --threadData->loopLevel; } { --threadData->loopLevel; }

View file

@ -3913,12 +3913,12 @@ bool QDateTimeParser::parseFormat(const QString &newFormat)
QVector<SectionNode> newSectionNodes; QVector<SectionNode> newSectionNodes;
Sections newDisplay = Q_NULLPTR; Sections newDisplay = Q_NULLPTR;
QStringList newSeparators; QStringList newSeparators;
int i, index = 0; int index = 0;
int add = 0; int add = 0;
QChar status(zero); QChar status(zero);
const int max = newFormat.size(); const int max = newFormat.size();
int lastQuote = -1; int lastQuote = -1;
for (i = 0; i<max; ++i) { for (int i = 0; i<max; ++i) {
if (newFormat.at(i) == quote) { if (newFormat.at(i) == quote) {
lastQuote = i; lastQuote = i;
++add; ++add;
@ -5175,12 +5175,12 @@ QString QDateTimeParser::stateName(int s) const
} }
#ifndef QT_NO_DATESTRING #ifndef QT_NO_DATESTRING
bool QDateTimeParser::fromString(const QString &t, QDate *date, QTime *time) const bool QDateTimeParser::fromString(const QString &format, QDate *date, QTime *time) const
{ {
QDateTime val(QDate(1900, 1, 1), QDATETIMEEDIT_TIME_MIN); QDateTime val(QDate(1900, 1, 1), QDATETIMEEDIT_TIME_MIN);
QString text = t; QString formatcopy = format;
int copy = -1; int copy = -1;
const StateNode tmp = parse(text, copy, val, false); const StateNode tmp = parse(formatcopy, copy, val, false);
if (tmp.state != Acceptable || tmp.conflicts) { if (tmp.state != Acceptable || tmp.conflicts) {
return false; return false;
} }

View file

@ -85,23 +85,23 @@ void QBenchmarkGlobalData::setMode(Mode mode)
QBenchmarkMeasurerBase * QBenchmarkGlobalData::createMeasurer() QBenchmarkMeasurerBase * QBenchmarkGlobalData::createMeasurer()
{ {
QBenchmarkMeasurerBase *measurer = 0; QBenchmarkMeasurerBase *m = 0;
if (0) { if (0) {
#ifdef QTESTLIB_USE_VALGRIND #ifdef QTESTLIB_USE_VALGRIND
} else if (mode_ == CallgrindChildProcess || mode_ == CallgrindParentProcess) { } else if (mode_ == CallgrindChildProcess || mode_ == CallgrindParentProcess) {
measurer = new QBenchmarkCallgrindMeasurer; m = new QBenchmarkCallgrindMeasurer;
#endif #endif
#ifdef HAVE_TICK_COUNTER #ifdef HAVE_TICK_COUNTER
} else if (mode_ == TickCounter) { } else if (mode_ == TickCounter) {
measurer = new QBenchmarkTickMeasurer; m = new QBenchmarkTickMeasurer;
#endif #endif
} else if (mode_ == EventCounter) { } else if (mode_ == EventCounter) {
measurer = new QBenchmarkEvent; m = new QBenchmarkEvent;
} else { } else {
measurer = new QBenchmarkTimeMeasurer; m = new QBenchmarkTimeMeasurer;
} }
measurer->init(); m->init();
return measurer; return m;
} }
int QBenchmarkGlobalData::adjustMedianIterationCount() int QBenchmarkGlobalData::adjustMedianIterationCount()

View file

@ -101,13 +101,13 @@ public:
{ } { }
QBenchmarkResult( QBenchmarkResult(
const QBenchmarkContext &context, const qreal value, const int iterations, const QBenchmarkContext &acontext, const qreal avalue, const int aiterations,
QTest::QBenchmarkMetric metric, bool setByMacro) QTest::QBenchmarkMetric ametric, bool asetByMacro)
: context(context) : context(acontext)
, value(value) , value(avalue)
, iterations(iterations) , iterations(aiterations)
, metric(metric) , metric(ametric)
, setByMacro(setByMacro) , setByMacro(asetByMacro)
, valid(true) , valid(true)
{ } { }