forked from qt-creator/qt-creator
QmlDebug/QmlProfiler: Fix MSVC warnings
qmlprofilertraceclient.cpp:280: warning: C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) qmlprofilertool.cpp:539: warning: C4554: '<<' : check operator precedence for possible error; use parentheses to clarify precedence Change-Id: Ifaa048d42bccf203e6587a474c197c22b0f69fec Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
7aed3d3d76
commit
52574da031
@@ -531,12 +531,12 @@ void QmlProfilerTool::clientsDisconnected()
|
||||
template<QmlDebug::ProfileFeature feature>
|
||||
void QmlProfilerTool::updateFeaturesMenu(quint64 features)
|
||||
{
|
||||
if (features & (1 << feature)) {
|
||||
if (features & (1ULL << (feature))) {
|
||||
QAction *action = d->m_featuresMenu->addAction(tr(QmlProfilerModelManager::featureName(
|
||||
static_cast<QmlDebug::ProfileFeature>(feature))));
|
||||
action->setCheckable(true);
|
||||
action->setData(static_cast<uint>(feature));
|
||||
action->setChecked(d->m_profilerState->recordingFeatures() & (1 << feature));
|
||||
action->setChecked(d->m_profilerState->recordingFeatures() & (1ULL << (feature)));
|
||||
}
|
||||
updateFeaturesMenu<static_cast<QmlDebug::ProfileFeature>(feature + 1)>(features);
|
||||
}
|
||||
@@ -664,10 +664,10 @@ void QmlProfilerTool::toggleRecordingFeature(QAction *action)
|
||||
uint feature = action->data().toUInt();
|
||||
if (action->isChecked())
|
||||
d->m_profilerState->setRecordingFeatures(
|
||||
d->m_profilerState->recordingFeatures() | (1 << feature));
|
||||
d->m_profilerState->recordingFeatures() | (1ULL << feature));
|
||||
else
|
||||
d->m_profilerState->setRecordingFeatures(
|
||||
d->m_profilerState->recordingFeatures() & (~(1 << feature)));
|
||||
d->m_profilerState->recordingFeatures() & (~(1ULL << feature)));
|
||||
|
||||
// Keep the menu open to allow for more features to be toggled
|
||||
d->m_recordButton->showMenu();
|
||||
|
Reference in New Issue
Block a user