mirror of
https://github.com/overte-org/overte.git
synced 2025-07-22 18:34:56 +02:00
Merge pull request #7586 from zzmp/log/failed-menu
Log failed MenuUserData::forObject
This commit is contained in:
commit
cef599eaed
1 changed files with 5 additions and 0 deletions
|
@ -43,6 +43,11 @@ public:
|
|||
auto result = static_cast<MenuUserData*>(object->userData(USER_DATA_ID));
|
||||
if (!result) {
|
||||
qWarning() << "Unable to find MenuUserData for object " << object;
|
||||
if (auto action = dynamic_cast<QAction*>(object)) {
|
||||
qWarning() << action->text();
|
||||
} else if (auto menu = dynamic_cast<QMenu*>(object)) {
|
||||
qWarning() << menu->title();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
return result;
|
||||
|
|
Loading…
Reference in a new issue