forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.6'
Change-Id: I724da8f761275865e735e7dce10c3b2b2d99fe94
This commit is contained in:
@@ -70,11 +70,9 @@ static QString backendProcessPath()
|
||||
namespace ClangCodeModel {
|
||||
namespace Internal {
|
||||
|
||||
class DummyBackendSender : public BackendSender
|
||||
class DummyBackendSender : public ClangBackEnd::ClangCodeModelServerInterface
|
||||
{
|
||||
public:
|
||||
DummyBackendSender() : BackendSender(nullptr) {}
|
||||
|
||||
void end() override {}
|
||||
void registerTranslationUnitsForEditor(const RegisterTranslationUnitForEditorMessage &) override {}
|
||||
void updateTranslationUnitsForEditor(const UpdateTranslationUnitsForEditorMessage &) override {}
|
||||
@@ -87,10 +85,10 @@ public:
|
||||
void requestDocumentAnnotations(const RequestDocumentAnnotationsMessage &) override {}
|
||||
void requestReferences(const RequestReferencesMessage &) override {}
|
||||
void requestFollowSymbol(const RequestFollowSymbolMessage &) override {}
|
||||
void requestToolTip(const RequestToolTipMessage &) override {}
|
||||
void updateVisibleTranslationUnits(const UpdateVisibleTranslationUnitsMessage &) override {}
|
||||
};
|
||||
|
||||
|
||||
BackendCommunicator::BackendCommunicator()
|
||||
: m_connection(&m_receiver)
|
||||
, m_sender(new DummyBackendSender())
|
||||
@@ -521,20 +519,6 @@ void BackendCommunicator::initializeBackendWithCurrentData()
|
||||
registerCurrentCodeModelUiHeaders();
|
||||
restoreCppEditorDocuments();
|
||||
updateTranslationUnitVisiblity();
|
||||
|
||||
emit backendReinitialized();
|
||||
}
|
||||
|
||||
BackendSender *BackendCommunicator::setBackendSender(BackendSender *sender)
|
||||
{
|
||||
BackendSender *previousSender = m_sender.take();
|
||||
m_sender.reset(sender);
|
||||
return previousSender;
|
||||
}
|
||||
|
||||
void BackendCommunicator::killBackendProcess()
|
||||
{
|
||||
m_connection.processForTestOnly()->kill();
|
||||
}
|
||||
|
||||
void BackendCommunicator::registerTranslationUnitsForEditor(const FileContainers &fileContainers)
|
||||
|
||||
@@ -113,13 +113,6 @@ public:
|
||||
|
||||
bool isNotWaitingForCompletion() const;
|
||||
|
||||
public: // for tests
|
||||
BackendSender *setBackendSender(BackendSender *sender);
|
||||
void killBackendProcess();
|
||||
|
||||
signals: // for tests
|
||||
void backendReinitialized();
|
||||
|
||||
private:
|
||||
void initializeBackend();
|
||||
void initializeBackendWithCurrentData();
|
||||
@@ -147,7 +140,7 @@ private:
|
||||
BackendReceiver m_receiver;
|
||||
ClangBackEnd::ClangCodeModelConnectionClient m_connection;
|
||||
QTimer m_backendStartTimeOut;
|
||||
QScopedPointer<BackendSender> m_sender;
|
||||
QScopedPointer<ClangBackEnd::ClangCodeModelServerInterface> m_sender;
|
||||
int m_connectedCount = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -141,10 +141,5 @@ void BackendSender::updateVisibleTranslationUnits(const UpdateVisibleTranslation
|
||||
m_connection->serverProxy().updateVisibleTranslationUnits(message);
|
||||
}
|
||||
|
||||
bool BackendSender::isConnected() const
|
||||
{
|
||||
return m_connection && m_connection->isConnected();
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ClangCodeModel
|
||||
|
||||
@@ -52,9 +52,6 @@ public:
|
||||
void requestFollowSymbol(const ClangBackEnd::RequestFollowSymbolMessage &message) override;
|
||||
void updateVisibleTranslationUnits(const ClangBackEnd::UpdateVisibleTranslationUnitsMessage &message) override;
|
||||
|
||||
private:
|
||||
bool isConnected() const;
|
||||
|
||||
private:
|
||||
ClangBackEnd::ClangCodeModelConnectionClient *m_connection = nullptr;
|
||||
};
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
#include <utils/textutils.h>
|
||||
#include <utils/mimetypes/mimedatabase.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcfallthrough.h>
|
||||
|
||||
#include <QDirIterator>
|
||||
#include <QTextDocument>
|
||||
@@ -242,7 +243,7 @@ IAssistProposal *ClangCompletionAssistProcessor::startCompletionHelper()
|
||||
case ClangCompletionContextAnalyzer::CompleteSlot:
|
||||
modifiedFileContent = modifyInput(m_interface->textDocument(),
|
||||
analyzer.positionEndOfExpression());
|
||||
// Fall through!
|
||||
Q_FALLTHROUGH();
|
||||
case ClangCompletionContextAnalyzer::PassThroughToLibClang: {
|
||||
m_addSnippets = m_completionOperator == T_EOF_SYMBOL;
|
||||
m_sentRequestType = NormalCompletion;
|
||||
|
||||
Reference in New Issue
Block a user