std::unique_ptr<RS_EventHandler> eventHandler;

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

std::unique_ptr<RS_EventHandler> eventHandler;

ravas
rs_graphicview.h
...
std::unique_ptr<RS_EventHandler> eventHandler;

Why do we need std::unique_ptr?
It breaks right-click → "follow symbol under cursor"
Reply | Threaded
Open this post in threaded view
|

Re: std::unique_ptr<RS_EventHandler> eventHandler;

dxli
unique_ptr is nothing more than an object there.

Upgrade your qt-creator to at least 3.5.0, it should support c++11 better.


ravas wrote
rs_graphicview.h
...
std::unique_ptr<RS_EventHandler> eventHandler;

Why do we need std::unique_ptr?
It breaks right-click → "follow symbol under cursor"
Reply | Threaded
Open this post in threaded view
|

Re: std::unique_ptr<RS_EventHandler> eventHandler;

ravas
I just upgraded but there was no change.
Reply | Threaded
Open this post in threaded view
|

Re: std::unique_ptr<RS_EventHandler> eventHandler;

LordOfBikes
Administrator
Works fine for me with Qt Creator 3.3.1/Qt 5.4.1 on Windows.
Context menu and F2.
investing less than half an hour into Search function can save hours or days of waiting for a solution
Reply | Threaded
Open this post in threaded view
|

Re: std::unique_ptr<RS_EventHandler> eventHandler;

ravas
For example:

void RS_GraphicView::keyPressEvent(QKeyEvent* e) {
        if (eventHandler) {
                eventHandler->keyPressEvent(e);
        }
}
Try to follow keyPressEvent:
eventHandler->keyPressEvent(e);

Nothing happens.