Commit ee9894bf authored by hjk's avatar hjk
Browse files

debugger: disable parts of L&W context menu when no item is selected

parent eb83377f
......@@ -213,10 +213,13 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
int individualFormat =
model()->data(mi0, IndividualFormatRole).toInt();
QMenu typeFormatMenu(tr("Change format for type '%1'").arg(type));
QMenu individualFormatMenu(tr("Change format for expression '%1'").arg(exp));
QMenu typeFormatMenu;
QMenu individualFormatMenu;
QList<QAction *> typeFormatActions;
QList<QAction *> individualFormatActions;
if (idx.isValid()) {
typeFormatMenu.setTitle(tr("Change format for type '%1'").arg(type));
individualFormatMenu.setTitle(tr("Change format for expression '%1'").arg(exp));
for (int i = 0; i != alternativeFormats.size(); ++i) {
const QString format =;
QAction *act = new QAction(format, &typeFormatMenu);
......@@ -232,8 +235,12 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
} else {
typeFormatMenu.setTitle(tr("Change format for type"));
individualFormatMenu.setTitle(tr("Change format for expression"));
QMenu menu;
QAction *act1 = new QAction(tr("Adjust column widths to contents"), &menu);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment