Fix context menu actions when search bar is enabled

Authored by tcanabrava on Jan 24 2020, 11:52 AM.

Description

Fix context menu actions when search bar is enabled

The actions are destroyed during a focusIn / focusOut, and recreated
with the same content but different memory positions, and that
killed the QActions inside of the menu.

To trigger this is simple, open the search bar, type some url in
konsole, and right click on it: you will not see the actions
to copy and go to url.

moving the related code to QSharedPointer fixes this by delaying
the destruction of the pointer untill the menu is closed.

Details

Committed
hindenburgJan 30 2020, 1:08 AM
Parents
R319:9b51ec79424a: fix: use correct link for AppStream
Branches
Unknown
Tags
Unknown
kossebau added inline comments.
/src/Filter.h
36

This is a C++17 header, from what I can tell: https://en.cppreference.com/w/cpp/header/optional

As a result breaks compilation with slightly older system which are not yet forward compatible and have that header around.

Also conflicts with the claim`set(CMAKE_CXX_STANDARD 11)` in the toplevel CMakeLists.txt.

Please think about aligning things (preferred: make backward-compatibel again).

kossebau added inline comments.Apr 28 2020, 9:10 PM
/src/Filter.h
36

Looking closer, i could not see this header actually needed, And removing it made builds pass, so will do a patch to simply remove it.