Changeset View
Changeset View
Standalone View
Standalone View
language/duchain/navigation/problemnavigationcontext.h
Show All 14 Lines | 1 | /* | |||
---|---|---|---|---|---|
15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
16 | Boston, MA 02110-1301, USA. | 16 | Boston, MA 02110-1301, USA. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | #ifndef KDEVPLATFORM_PROBLEMNAVIGATIONCONTEXT_H | 19 | #ifndef KDEVPLATFORM_PROBLEMNAVIGATIONCONTEXT_H | ||
20 | #define KDEVPLATFORM_PROBLEMNAVIGATIONCONTEXT_H | 20 | #define KDEVPLATFORM_PROBLEMNAVIGATIONCONTEXT_H | ||
21 | 21 | | |||
22 | #include <interfaces/iproblem.h> | 22 | #include <interfaces/iproblem.h> | ||
23 | #include <interfaces/iassistant.h> | ||||
24 | | ||||
23 | #include <language/duchain/navigation/abstractnavigationcontext.h> | 25 | #include <language/duchain/navigation/abstractnavigationcontext.h> | ||
24 | #include <language/languageexport.h> | 26 | #include <language/languageexport.h> | ||
25 | #include <qpointer.h> | 27 | #include <qpointer.h> | ||
26 | 28 | | |||
27 | namespace KDevelop { | 29 | namespace KDevelop { | ||
28 | 30 | | |||
31 | class KDEVPLATFORMLANGUAGE_EXPORT AssistantNavigationContext : public AbstractNavigationContext | ||||
32 | { | ||||
33 | Q_OBJECT | ||||
34 | public: | ||||
35 | explicit AssistantNavigationContext(const IAssistant::Ptr& assistant); | ||||
36 | ~AssistantNavigationContext(); | ||||
37 | | ||||
38 | virtual QString name() const override; | ||||
39 | virtual QString html(bool shorten = false) override; | ||||
40 | | ||||
41 | NavigationContextPointer executeKeyAction(QString key) override; | ||||
mwolff: const& | |||||
kfunk: It's a method override -> can't change signature. Same below. | |||||
mwolff: and also make the method const, if possible | |||||
42 | | ||||
43 | private: | ||||
44 | IAssistant::Ptr m_assistant; | ||||
45 | }; | ||||
46 | | ||||
29 | class KDEVPLATFORMLANGUAGE_EXPORT ProblemNavigationContext : public AbstractNavigationContext | 47 | class KDEVPLATFORMLANGUAGE_EXPORT ProblemNavigationContext : public AbstractNavigationContext | ||
30 | { | 48 | { | ||
31 | Q_OBJECT | 49 | Q_OBJECT | ||
32 | public: | 50 | public: | ||
33 | explicit ProblemNavigationContext(const IProblem::Ptr& problem); | 51 | explicit ProblemNavigationContext(const IProblem::Ptr& problem); | ||
34 | ~ProblemNavigationContext(); | 52 | ~ProblemNavigationContext(); | ||
35 | 53 | | |||
36 | virtual QString name() const override; | 54 | virtual QString name() const override; | ||
37 | virtual QString html(bool shorten = false) override; | 55 | virtual QString html(bool shorten = false) override; | ||
38 | virtual QWidget* widget() const override; | 56 | virtual QWidget* widget() const override; | ||
39 | virtual bool isWidgetMaximized() const override; | 57 | virtual bool isWidgetMaximized() const override; | ||
40 | 58 | | |||
59 | NavigationContextPointer executeKeyAction(QString key) override; | ||||
mwolff: const& | |||||
60 | | ||||
41 | private: | 61 | private: | ||
42 | IProblem::Ptr m_problem; | 62 | IProblem::Ptr m_problem; | ||
43 | 63 | | |||
44 | QPointer<QWidget> m_widget; | 64 | QPointer<QWidget> m_widget; | ||
45 | }; | 65 | }; | ||
46 | 66 | | |||
47 | } | 67 | } | ||
48 | 68 | | |||
49 | #endif // KDEVPLATFORM_PROBLEMNAVIGATIONCONTEXT_H | 69 | #endif // KDEVPLATFORM_PROBLEMNAVIGATIONCONTEXT_H |
const&