forked from qt-creator/qt-creator
Debugger: Add action to reset individual/type formats
Task-number: QTCREATORBUG-22922 Change-Id: Ic8d0dd1214c208869bebdd69feb2cca1213d30cd Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
@@ -1910,12 +1910,18 @@ QMenu *WatchModel::createFormatMenu(WatchItem *item, QWidget *parent)
|
||||
});
|
||||
}
|
||||
|
||||
addAction(menu, tr("Reset All Individual Formats"), true, [this]() {
|
||||
theIndividualFormats.clear();
|
||||
saveFormats();
|
||||
m_engine->updateLocals();
|
||||
});
|
||||
|
||||
menu->addSeparator();
|
||||
addAction(menu, tr("Change Display for Type \"%1\":").arg(item->type), false);
|
||||
|
||||
addCheckableAction(menu, spacer + tr("Automatic"), true, typeFormat == AutomaticFormat,
|
||||
[this, item] {
|
||||
//const QModelIndexList active = activeRows();
|
||||
//const QModelIndexList active = activeRows();
|
||||
//for (const QModelIndex &idx : active)
|
||||
// setModelData(LocalsTypeFormatRole, AutomaticFormat, idx);
|
||||
setTypeFormat(item->type, AutomaticFormat);
|
||||
@@ -1925,11 +1931,17 @@ QMenu *WatchModel::createFormatMenu(WatchItem *item, QWidget *parent)
|
||||
for (int format : alternativeFormats) {
|
||||
addCheckableAction(menu, spacer + nameForFormat(format), true, format == typeFormat,
|
||||
[this, format, item] {
|
||||
setTypeFormat(item->type, format);
|
||||
m_engine->updateLocals();
|
||||
setTypeFormat(item->type, format);
|
||||
m_engine->updateLocals();
|
||||
});
|
||||
}
|
||||
|
||||
addAction(menu, tr("Reset All Formats for Types"), true, [this]() {
|
||||
theTypeFormats.clear();
|
||||
saveFormats();
|
||||
m_engine->updateLocals();
|
||||
});
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user