mirror of
https://invent.kde.org/network/falkon.git
synced 2024-09-21 17:52:10 +02:00
[Windows] Fixed inserting QUnicodeControlCharacterMenu to contextmenu.
This commit is contained in:
parent
e36697eedf
commit
0b4be9055e
12
src/lib/3rdparty/lineedit.cpp
vendored
12
src/lib/3rdparty/lineedit.cpp
vendored
|
@ -181,20 +181,14 @@ QMenu* LineEdit::createContextMenu(QAction* pasteAndGoAction)
|
|||
|
||||
// Hack to get QUnicodeControlCharacterMenu
|
||||
QMenu* tmp = createStandardContextMenu();
|
||||
tmp->setParent(popup);
|
||||
tmp->hide();
|
||||
QAction* lastAction = !tmp->actions().isEmpty() ? tmp->actions().last() : 0;
|
||||
|
||||
if (lastAction && lastAction->menu() && lastAction->menu()->inherits("QUnicodeControlCharacterMenu")) {
|
||||
tmp->removeAction(lastAction);
|
||||
lastAction->setParent(0);
|
||||
QMenu* m = lastAction->menu();
|
||||
m->setParent(popup);
|
||||
popup->addMenu(m);
|
||||
|
||||
delete lastAction;
|
||||
popup->addAction(lastAction);
|
||||
}
|
||||
|
||||
delete tmp;
|
||||
|
||||
return popup;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user