forked from qt-creator/qt-creator
debugger: switch order of item and type specific entries in l&w context menu
On Mr B.'s request.
This commit is contained in:
@@ -319,6 +319,24 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
|
|||||||
const QString spacer = QLatin1String(" ");
|
const QString spacer = QLatin1String(" ");
|
||||||
formatMenu.addSeparator();
|
formatMenu.addSeparator();
|
||||||
QAction *dummy = formatMenu.addAction(
|
QAction *dummy = formatMenu.addAction(
|
||||||
|
tr("Change Display for Object Named \"%1\":").arg(mi0.data().toString()));
|
||||||
|
dummy->setEnabled(false);
|
||||||
|
clearIndividualFormatAction
|
||||||
|
= formatMenu.addAction(spacer + tr("Use Display Format Based on Type"));
|
||||||
|
//clearIndividualFormatAction->setEnabled(individualFormat != -1);
|
||||||
|
clearIndividualFormatAction->setCheckable(true);
|
||||||
|
clearIndividualFormatAction->setChecked(effectiveIndividualFormat == -1);
|
||||||
|
for (int i = 0; i != alternativeFormats.size(); ++i) {
|
||||||
|
const QString format = spacer + alternativeFormats.at(i);
|
||||||
|
QAction *act = new QAction(format, &formatMenu);
|
||||||
|
act->setCheckable(true);
|
||||||
|
if (i == effectiveIndividualFormat)
|
||||||
|
act->setChecked(true);
|
||||||
|
formatMenu.addAction(act);
|
||||||
|
individualFormatActions.append(act);
|
||||||
|
}
|
||||||
|
formatMenu.addSeparator();
|
||||||
|
dummy = formatMenu.addAction(
|
||||||
tr("Change Display for Type \"%1\":").arg(type));
|
tr("Change Display for Type \"%1\":").arg(type));
|
||||||
dummy->setEnabled(false);
|
dummy->setEnabled(false);
|
||||||
clearTypeFormatAction = formatMenu.addAction(spacer + tr("Automatic"));
|
clearTypeFormatAction = formatMenu.addAction(spacer + tr("Automatic"));
|
||||||
@@ -336,24 +354,6 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
|
|||||||
formatMenu.addAction(act);
|
formatMenu.addAction(act);
|
||||||
typeFormatActions.append(act);
|
typeFormatActions.append(act);
|
||||||
}
|
}
|
||||||
formatMenu.addSeparator();
|
|
||||||
dummy = formatMenu.addAction(
|
|
||||||
tr("Change Display for Object Named \"%1\":").arg(mi0.data().toString()));
|
|
||||||
dummy->setEnabled(false);
|
|
||||||
clearIndividualFormatAction
|
|
||||||
= formatMenu.addAction(spacer + tr("Use Display Format Based on Type"));
|
|
||||||
//clearIndividualFormatAction->setEnabled(individualFormat != -1);
|
|
||||||
clearIndividualFormatAction->setCheckable(true);
|
|
||||||
clearIndividualFormatAction->setChecked(effectiveIndividualFormat == -1);
|
|
||||||
for (int i = 0; i != alternativeFormats.size(); ++i) {
|
|
||||||
const QString format = spacer + alternativeFormats.at(i);
|
|
||||||
QAction *act = new QAction(format, &formatMenu);
|
|
||||||
act->setCheckable(true);
|
|
||||||
if (i == effectiveIndividualFormat)
|
|
||||||
act->setChecked(true);
|
|
||||||
formatMenu.addAction(act);
|
|
||||||
individualFormatActions.append(act);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
QAction *dummy = formatMenu.addAction(
|
QAction *dummy = formatMenu.addAction(
|
||||||
tr("Change Display for Type or Item..."));
|
tr("Change Display for Type or Item..."));
|
||||||
|
|||||||
Reference in New Issue
Block a user