| 10 | #include <QTextStream> |
| 11 | |
| 12 | static QString msgActionWarning(QAction *newAction, const QString &id, QAction *oldAction) |
| 13 | { |
| 14 | QString msg; |
| 15 | QTextStream str(&msg); |
| 16 | str << "addOverrideAction " << newAction->objectName() << '/' << newAction->text() |
| 17 | << ": Action "; |
| 18 | if (oldAction) |
| 19 | str << oldAction->objectName() << '/' << oldAction->text(); |
| 20 | str << " is already registered for context " << id << '.'; |
| 21 | return msg; |
| 22 | } |
| 23 | |
| 24 | CommandPrivate::CommandPrivate(const QString &id, Command *qq) |
| 25 | : q(qq), |