Changeset View
Changeset View
Standalone View
Standalone View
libs/widgetutils/xmlgui/KisShortcutsEditor_p.cpp
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Line(s) | 105 | { | |||
---|---|---|---|---|---|
111 | QString actionName = action->objectName(); | 111 | QString actionName = action->objectName(); | ||
112 | if (actionName.isEmpty() || actionName.startsWith(QStringLiteral("unnamed-"))) { | 112 | if (actionName.isEmpty() || actionName.startsWith(QStringLiteral("unnamed-"))) { | ||
113 | qCritical() << "Skipping action without name " << action->text() << "," << actionName << "!"; | 113 | qCritical() << "Skipping action without name " << action->text() << "," << actionName << "!"; | ||
114 | return false; | 114 | return false; | ||
115 | } | 115 | } | ||
116 | 116 | | |||
117 | // Construct the actual treeview items. The work happens here. | 117 | // Construct the actual treeview items. The work happens here. | ||
118 | // | 118 | // | ||
119 | // XXX: disentangle the confusing, dire warning left here previously: | 119 | // A warning was left here previously: don't feed the editor raw QActions. | ||
120 | // "This code doesn't allow editing of QAction. It can not distinguish | 120 | // These classes expect the defaultShortcuts property to be set. | ||
121 | // between default and active shortcuts. This breaks many assumptions the | | |||
122 | // editor makes." | | |||
123 | // | 121 | // | ||
124 | // Note: Krita never sets the property "isShortcutConfigurable" so we will | 122 | // Note: Krita never sets the property "isShortcutConfigurable" so we will | ||
125 | // add every action here. | | |||
126 | const QVariant value = action->property("isShortcutConfigurable"); | 123 | const QVariant value = action->property("isShortcutConfigurable"); | ||
127 | if (!value.isValid() || value.toBool()) { | 124 | if (!value.isValid() || value.toBool()) { | ||
128 | new KisShortcutsEditorItem((hier[level]), action); | 125 | new KisShortcutsEditorItem((hier[level]), action); | ||
129 | return true; | 126 | return true; | ||
130 | } | 127 | } | ||
131 | 128 | | |||
132 | return false; | 129 | return false; | ||
133 | } | 130 | } | ||
▲ Show 20 Lines • Show All 239 Lines • Show Last 20 Lines |