QAction *showUnprintableOctal = 0;
QAction *showUnprintableHexadecimal = 0;
formatMenu.setTitle(tr("Change Display Format..."));
- if (true /*idx.isValid() && !alternativeFormats.isEmpty() */) {
- showUnprintableUnicode =
- formatMenu.addAction(tr("Treat All Characters as Printable"));
- showUnprintableUnicode->setCheckable(true);
- showUnprintableUnicode->setChecked(unprintableBase == 0);
- showUnprintableOctal =
- formatMenu.addAction(tr("Show Unprintable Characters as Octal"));
- showUnprintableOctal->setCheckable(true);
- showUnprintableOctal->setChecked(unprintableBase == 8);
- showUnprintableHexadecimal =
- formatMenu.addAction(tr("Show Unprintable Characters as Hexadecimal"));
- showUnprintableHexadecimal->setCheckable(true);
- showUnprintableHexadecimal->setChecked(unprintableBase == 16);
+ showUnprintableUnicode =
+ formatMenu.addAction(tr("Treat All Characters as Printable"));
+ showUnprintableUnicode->setCheckable(true);
+ showUnprintableUnicode->setChecked(unprintableBase == 0);
+ showUnprintableOctal =
+ formatMenu.addAction(tr("Show Unprintable Characters as Octal"));
+ showUnprintableOctal->setCheckable(true);
+ showUnprintableOctal->setChecked(unprintableBase == 8);
+ showUnprintableHexadecimal =
+ formatMenu.addAction(tr("Show Unprintable Characters as Hexadecimal"));
+ showUnprintableHexadecimal->setCheckable(true);
+ showUnprintableHexadecimal->setChecked(unprintableBase == 16);
+ if (idx.isValid() /*&& !alternativeFormats.isEmpty() */) {
+ const QString spacer = QLatin1String(" ");
formatMenu.addSeparator();
QAction *dummy = formatMenu.addAction(
- tr("Change Display for Type \"%1\"").arg(type));
+ tr("Change Display for Type \"%1\":").arg(type));
dummy->setEnabled(false);
- formatMenu.addSeparator();
- clearTypeFormatAction = formatMenu.addAction(tr("Automatic"));
+ clearTypeFormatAction = formatMenu.addAction(spacer + tr("Automatic"));
//clearTypeFormatAction->setEnabled(typeFormat != -1);
//clearTypeFormatAction->setEnabled(individualFormat != -1);
clearTypeFormatAction->setCheckable(true);
clearTypeFormatAction->setChecked(typeFormat == -1);
- formatMenu.addSeparator();
for (int i = 0; i != alternativeFormats.size(); ++i) {
- const QString format = alternativeFormats.at(i);
+ const QString format = spacer + alternativeFormats.at(i);
QAction *act = new QAction(format, &formatMenu);
act->setCheckable(true);
//act->setEnabled(individualFormat != -1);
}
formatMenu.addSeparator();
dummy = formatMenu.addAction(
- tr("Change Display for Object Named \"%1\"").arg(mi0.data().toString()));
+ tr("Change Display for Object Named \"%1\":").arg(mi0.data().toString()));
dummy->setEnabled(false);
- formatMenu.addSeparator();
clearIndividualFormatAction
- = formatMenu.addAction(tr("Use Display Format Based on Type"));
+ = formatMenu.addAction(spacer + tr("Use Display Format Based on Type"));
//clearIndividualFormatAction->setEnabled(individualFormat != -1);
clearIndividualFormatAction->setCheckable(true);
clearIndividualFormatAction->setChecked(effectiveIndividualFormat == -1);
- formatMenu.addSeparator();
for (int i = 0; i != alternativeFormats.size(); ++i) {
- const QString format = alternativeFormats.at(i);
+ const QString format = spacer + alternativeFormats.at(i);
QAction *act = new QAction(format, &formatMenu);
act->setCheckable(true);
if (i == effectiveIndividualFormat)
individualFormatActions.append(act);
}
} else {
- formatMenu.setEnabled(false);
+ QAction *dummy = formatMenu.addAction(
+ tr("Change Display for Type or Item..."));
+ dummy->setEnabled(false);
}
const bool actionsEnabled = engine->debuggerActionsEnabled();