forked from qt-creator/qt-creator
TextEditor: Introduce shortcut for forcing a function hint proposal
... and support it in the ClangCodeModel. This allows users to get function signature(s) displayed regardless of where exactly the cursor is on the function call. Fixes: QTCREATORBUG-19394 Change-Id: I033e8774db93680bfc3ee52610b817e0ef8ccc76 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -33,10 +33,13 @@
|
||||
namespace ClangCodeModel {
|
||||
namespace Internal {
|
||||
|
||||
enum class CompletionType { FunctionHint, Other };
|
||||
|
||||
class ClangCompletionAssistInterface: public TextEditor::AssistInterface
|
||||
{
|
||||
public:
|
||||
ClangCompletionAssistInterface(BackendCommunicator &communicator,
|
||||
CompletionType type,
|
||||
const TextEditor::TextEditorWidget *textEditorWidget,
|
||||
int position,
|
||||
const QString &fileName,
|
||||
@@ -45,6 +48,7 @@ public:
|
||||
const CPlusPlus::LanguageFeatures &features);
|
||||
|
||||
BackendCommunicator &communicator() const;
|
||||
CompletionType type() const { return m_type; }
|
||||
bool objcEnabled() const;
|
||||
const ProjectExplorer::HeaderPaths &headerPaths() const;
|
||||
CPlusPlus::LanguageFeatures languageFeatures() const;
|
||||
@@ -54,6 +58,7 @@ public:
|
||||
|
||||
private:
|
||||
BackendCommunicator &m_communicator;
|
||||
const CompletionType m_type;
|
||||
QStringList m_options;
|
||||
ProjectExplorer::HeaderPaths m_headerPaths;
|
||||
CPlusPlus::LanguageFeatures m_languageFeatures;
|
||||
|
||||
Reference in New Issue
Block a user