Commit 11cb423c authored by David Faure's avatar David Faure
Browse files

Clarify warning

parent 16c07d22
...@@ -387,11 +387,9 @@ void KXMLGUIFactoryPrivate::saveDefaultActionProperties(const QList<QAction *> & ...@@ -387,11 +387,9 @@ void KXMLGUIFactoryPrivate::saveDefaultActionProperties(const QList<QAction *> &
//qDebug() << action->objectName() << "default=" << defaultShortcut.toString() << "active=" << activeShortcut.toString(); //qDebug() << action->objectName() << "default=" << defaultShortcut.toString() << "active=" << activeShortcut.toString();
// Check if we have an empty default shortcut and an non empty // Check if we have an empty default shortcut and an non empty
// custom shortcut. This should only happen if a developer called // custom shortcut. Print out a warning and correct the mistake.
// QAction::setShortcut on an KAction. Print out a warning and
// correct the mistake
if ((!activeShortcut.isEmpty()) && defaultShortcut.isEmpty()) { if ((!activeShortcut.isEmpty()) && defaultShortcut.isEmpty()) {
qCritical() << "Shortcut for KAction " << action->objectName() << action->text() << "set with QShortcut::setShortcut()! See KAction documentation."; qCritical() << "Shortcut for action " << action->objectName() << action->text() << "set with QAction::setShortcut()! Use KActionCollection::setDefaultShortcut(s) instead.";
action->setProperty("_k_DefaultShortcut", QVariant::fromValue(activeShortcut)); action->setProperty("_k_DefaultShortcut", QVariant::fromValue(activeShortcut));
} else { } else {
action->setProperty("_k_DefaultShortcut", QVariant::fromValue(defaultShortcut)); action->setProperty("_k_DefaultShortcut", QVariant::fromValue(defaultShortcut));
......
Supports Markdown
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