mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Fix some warnings in ToolWindowManager so we can keep level 4 globally
* Nested foreach() hiding a local variable in the macro definition. * Declarations of 'data' parameters that hide a class member variable.
This commit is contained in:
@@ -194,14 +194,14 @@ QVariantMap ToolWindowManagerArea::saveState() {
|
||||
return result;
|
||||
}
|
||||
|
||||
void ToolWindowManagerArea::restoreState(const QVariantMap &data) {
|
||||
foreach(QVariant object, data["objects"].toList()) {
|
||||
void ToolWindowManagerArea::restoreState(const QVariantMap &savedData) {
|
||||
for(QVariant object : savedData["objects"].toList()) {
|
||||
QVariantMap objectData = object.toMap();
|
||||
if (objectData.isEmpty()) { continue; }
|
||||
QString objectName = objectData["name"].toString();
|
||||
if (objectName.isEmpty()) { continue; }
|
||||
QWidget *t = NULL;
|
||||
foreach(QWidget* toolWindow, m_manager->m_toolWindows) {
|
||||
for(QWidget* toolWindow : m_manager->m_toolWindows) {
|
||||
if (toolWindow->objectName() == objectName) {
|
||||
t = toolWindow;
|
||||
break;
|
||||
@@ -215,7 +215,7 @@ void ToolWindowManagerArea::restoreState(const QVariantMap &data) {
|
||||
qWarning("tool window with name '%s' not found or created", objectName.toLocal8Bit().constData());
|
||||
}
|
||||
}
|
||||
setCurrentIndex(data["currentIndex"].toInt());
|
||||
setCurrentIndex(savedData["currentIndex"].toInt());
|
||||
}
|
||||
|
||||
void ToolWindowManagerArea::check_mouse_move() {
|
||||
|
||||
Reference in New Issue
Block a user