forked from qt-creator/qt-creator
Clang: Remove unused messages
Change-Id: Ibe2678de726a867308fac16c6a14b0eff10cbacb Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -44,12 +44,6 @@ void ClangCodeModelClientInterface::dispatch(const MessageEnvelop &messageEnvelo
|
||||
case MessageType::CodeCompletedMessage:
|
||||
codeCompleted(messageEnvelop.message<CodeCompletedMessage>());
|
||||
break;
|
||||
case MessageType::TranslationUnitDoesNotExistMessage:
|
||||
translationUnitDoesNotExist(messageEnvelop.message<TranslationUnitDoesNotExistMessage>());
|
||||
break;
|
||||
case MessageType::ProjectPartsDoNotExistMessage:
|
||||
projectPartsDoNotExist(messageEnvelop.message<ProjectPartsDoNotExistMessage>());
|
||||
break;
|
||||
case MessageType::DocumentAnnotationsChangedMessage:
|
||||
documentAnnotationsChanged(messageEnvelop.message<DocumentAnnotationsChangedMessage>());
|
||||
break;
|
||||
|
@@ -35,7 +35,6 @@ class CodeCompletedMessage;
|
||||
class CompleteCodeMessage;
|
||||
class DocumentAnnotationsChangedMessage;
|
||||
class EchoMessage;
|
||||
class ProjectPartsDoNotExistMessage;
|
||||
class ReferencesMessage;
|
||||
class FollowSymbolMessage;
|
||||
class RegisterProjectPartsForEditorMessage;
|
||||
@@ -44,7 +43,6 @@ class RegisterUnsavedFilesForEditorMessage;
|
||||
class RequestDocumentAnnotationsMessage;
|
||||
class RequestReferencesMessage;
|
||||
class RequestFollowSymbolMessage;
|
||||
class TranslationUnitDoesNotExistMessage;
|
||||
class UnregisterProjectPartsForEditorMessage;
|
||||
class UnregisterTranslationUnitsForEditorMessage;
|
||||
class UnregisterUnsavedFilesForEditorMessage;
|
||||
@@ -59,8 +57,6 @@ public:
|
||||
virtual void alive() = 0;
|
||||
virtual void echo(const EchoMessage &message) = 0;
|
||||
virtual void codeCompleted(const CodeCompletedMessage &message) = 0;
|
||||
virtual void translationUnitDoesNotExist(const TranslationUnitDoesNotExistMessage &message) = 0;
|
||||
virtual void projectPartsDoNotExist(const ProjectPartsDoNotExistMessage &message) = 0;
|
||||
virtual void documentAnnotationsChanged(const DocumentAnnotationsChangedMessage &message) = 0;
|
||||
virtual void references(const ReferencesMessage &message) = 0;
|
||||
virtual void followSymbol(const FollowSymbolMessage &message) = 0;
|
||||
|
@@ -29,7 +29,5 @@
|
||||
#include "cmbcodecompletedmessage.h"
|
||||
#include "cmbechomessage.h"
|
||||
#include "documentannotationschangedmessage.h"
|
||||
#include "projectpartsdonotexistmessage.h"
|
||||
#include "referencesmessage.h"
|
||||
#include "followsymbolmessage.h"
|
||||
#include "translationunitdoesnotexistmessage.h"
|
||||
|
@@ -80,16 +80,6 @@ void ClangCodeModelClientProxy::codeCompleted(const CodeCompletedMessage &messag
|
||||
m_writeMessageBlock.write(message);
|
||||
}
|
||||
|
||||
void ClangCodeModelClientProxy::translationUnitDoesNotExist(const TranslationUnitDoesNotExistMessage &message)
|
||||
{
|
||||
m_writeMessageBlock.write(message);
|
||||
}
|
||||
|
||||
void ClangCodeModelClientProxy::projectPartsDoNotExist(const ProjectPartsDoNotExistMessage &message)
|
||||
{
|
||||
m_writeMessageBlock.write(message);
|
||||
}
|
||||
|
||||
void ClangCodeModelClientProxy::documentAnnotationsChanged(const DocumentAnnotationsChangedMessage &message)
|
||||
{
|
||||
m_writeMessageBlock.write(message);
|
||||
|
@@ -54,8 +54,6 @@ public:
|
||||
void alive() override;
|
||||
void echo(const EchoMessage &message) override;
|
||||
void codeCompleted(const CodeCompletedMessage &message) override;
|
||||
void translationUnitDoesNotExist(const TranslationUnitDoesNotExistMessage &message) override;
|
||||
void projectPartsDoNotExist(const ProjectPartsDoNotExistMessage &message) override;
|
||||
void documentAnnotationsChanged(const DocumentAnnotationsChangedMessage &message) override;
|
||||
void references(const ReferencesMessage &message) override;
|
||||
void followSymbol(const FollowSymbolMessage &message) override;
|
||||
|
@@ -53,7 +53,6 @@ SOURCES += \
|
||||
$$PWD/projectpartcontainer.cpp \
|
||||
$$PWD/projectpartcontainerv2.cpp \
|
||||
$$PWD/projectpartpch.cpp \
|
||||
$$PWD/projectpartsdonotexistmessage.cpp \
|
||||
$$PWD/readmessageblock.cpp \
|
||||
$$PWD/refactoringclientinterface.cpp \
|
||||
$$PWD/refactoringclientproxy.cpp \
|
||||
@@ -79,7 +78,6 @@ SOURCES += \
|
||||
$$PWD/sourcerangescontainer.cpp \
|
||||
$$PWD/sourcerangesforquerymessage.cpp \
|
||||
$$PWD/sourcerangewithtextcontainer.cpp \
|
||||
$$PWD/translationunitdoesnotexistmessage.cpp \
|
||||
$$PWD/unregisterunsavedfilesforeditormessage.cpp \
|
||||
$$PWD/updatepchprojectpartsmessage.cpp \
|
||||
$$PWD/updatetranslationunitsforeditormessage.cpp \
|
||||
@@ -138,7 +136,6 @@ HEADERS += \
|
||||
$$PWD/projectpartcontainer.h \
|
||||
$$PWD/projectpartcontainerv2.h \
|
||||
$$PWD/projectpartpch.h \
|
||||
$$PWD/projectpartsdonotexistmessage.h \
|
||||
$$PWD/readmessageblock.h \
|
||||
$$PWD/refactoringclientinterface.h \
|
||||
$$PWD/refactoringclientproxy.h \
|
||||
@@ -165,7 +162,6 @@ HEADERS += \
|
||||
$$PWD/sourcerangesforquerymessage.h \
|
||||
$$PWD/sourcerangewithtextcontainer.h \
|
||||
$$PWD/stringcache.h \
|
||||
$$PWD/translationunitdoesnotexistmessage.h \
|
||||
$$PWD/unregisterunsavedfilesforeditormessage.h \
|
||||
$$PWD/updatepchprojectpartsmessage.h \
|
||||
$$PWD/updatetranslationunitsforeditormessage.h \
|
||||
|
@@ -124,9 +124,6 @@ enum class MessageType : quint8 {
|
||||
CompleteCodeMessage,
|
||||
CodeCompletedMessage,
|
||||
|
||||
TranslationUnitDoesNotExistMessage,
|
||||
ProjectPartsDoNotExistMessage,
|
||||
|
||||
SourceLocationsForRenamingMessage,
|
||||
RequestSourceLocationsForRenamingMessage,
|
||||
|
||||
|
@@ -83,12 +83,6 @@ QDebug operator<<(QDebug debug, const MessageEnvelop &messageEnvelop)
|
||||
case MessageType::ReferencesMessage:
|
||||
qDebug() << messageEnvelop.message<ReferencesMessage>();
|
||||
break;
|
||||
case MessageType::TranslationUnitDoesNotExistMessage:
|
||||
qDebug() << messageEnvelop.message<TranslationUnitDoesNotExistMessage>();
|
||||
break;
|
||||
case MessageType::ProjectPartsDoNotExistMessage:
|
||||
qDebug() << messageEnvelop.message<ProjectPartsDoNotExistMessage>();
|
||||
break;
|
||||
case MessageType::DocumentAnnotationsChangedMessage:
|
||||
qDebug() << messageEnvelop.message<DocumentAnnotationsChangedMessage>();
|
||||
break;
|
||||
|
@@ -1,55 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "projectpartsdonotexistmessage.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
QDebug operator<<(QDebug debug, const ProjectPartsDoNotExistMessage &message)
|
||||
{
|
||||
debug.nospace() << "ProjectPartDoesNotExistMessage(";
|
||||
|
||||
debug.nospace() << message.projectPartIds();
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
||||
return debug;
|
||||
}
|
||||
|
||||
std::ostream &operator<<(std::ostream &os, const ProjectPartsDoNotExistMessage &message)
|
||||
{
|
||||
os << "("
|
||||
<< message.projectPartIds()
|
||||
<< ")";
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace ClangBackEnd
|
||||
|
@@ -1,77 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "clangsupport_global.h"
|
||||
|
||||
#include <utf8stringvector.h>
|
||||
|
||||
#include <QDataStream>
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class ProjectPartsDoNotExistMessage
|
||||
{
|
||||
public:
|
||||
ProjectPartsDoNotExistMessage() = default;
|
||||
ProjectPartsDoNotExistMessage(const Utf8StringVector &projectPartIds)
|
||||
: m_projectPartIds(projectPartIds)
|
||||
{
|
||||
}
|
||||
|
||||
const Utf8StringVector &projectPartIds() const
|
||||
{
|
||||
return m_projectPartIds;
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const ProjectPartsDoNotExistMessage &message)
|
||||
{
|
||||
out << message.m_projectPartIds;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, ProjectPartsDoNotExistMessage &message)
|
||||
{
|
||||
in >> message.m_projectPartIds;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const ProjectPartsDoNotExistMessage &first, const ProjectPartsDoNotExistMessage &second)
|
||||
{
|
||||
return first.m_projectPartIds == second.m_projectPartIds;
|
||||
}
|
||||
|
||||
private:
|
||||
Utf8StringVector m_projectPartIds;
|
||||
};
|
||||
|
||||
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const ProjectPartsDoNotExistMessage &message);
|
||||
std::ostream &operator<<(std::ostream &os, const ProjectPartsDoNotExistMessage &message);
|
||||
|
||||
DECLARE_MESSAGE(ProjectPartsDoNotExistMessage)
|
||||
} // namespace ClangBackEnd
|
@@ -1,55 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "translationunitdoesnotexistmessage.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
QDebug operator<<(QDebug debug, const TranslationUnitDoesNotExistMessage &message)
|
||||
{
|
||||
debug.nospace() << "TranslationUnitDoesNotExistMessage(";
|
||||
|
||||
debug.nospace() << message.fileContainer();
|
||||
|
||||
debug.nospace() << ")";
|
||||
|
||||
return debug;
|
||||
}
|
||||
|
||||
std::ostream &operator<<(std::ostream &os, const TranslationUnitDoesNotExistMessage &message)
|
||||
{
|
||||
os << "("
|
||||
<< message.fileContainer()
|
||||
<< ")";
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace ClangBackEnd
|
||||
|
@@ -1,88 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "filecontainer.h"
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
class TranslationUnitDoesNotExistMessage
|
||||
{
|
||||
public:
|
||||
TranslationUnitDoesNotExistMessage() = default;
|
||||
TranslationUnitDoesNotExistMessage(const FileContainer &fileContainer)
|
||||
: m_fileContainer(fileContainer)
|
||||
{
|
||||
}
|
||||
|
||||
TranslationUnitDoesNotExistMessage(const Utf8String &filePath, const Utf8String &projectPartId)
|
||||
: m_fileContainer(filePath, projectPartId)
|
||||
{
|
||||
}
|
||||
|
||||
const FileContainer &fileContainer() const
|
||||
{
|
||||
return m_fileContainer;
|
||||
}
|
||||
|
||||
const Utf8String &filePath() const
|
||||
{
|
||||
return m_fileContainer.filePath();
|
||||
}
|
||||
|
||||
const Utf8String &projectPartId() const
|
||||
{
|
||||
return m_fileContainer.projectPartId();
|
||||
}
|
||||
|
||||
friend QDataStream &operator<<(QDataStream &out, const TranslationUnitDoesNotExistMessage &message)
|
||||
{
|
||||
out << message.m_fileContainer;
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
friend QDataStream &operator>>(QDataStream &in, TranslationUnitDoesNotExistMessage &message)
|
||||
{
|
||||
in >> message.m_fileContainer;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
friend bool operator==(const TranslationUnitDoesNotExistMessage &first, const TranslationUnitDoesNotExistMessage &second)
|
||||
{
|
||||
return first.m_fileContainer == second.m_fileContainer;
|
||||
}
|
||||
|
||||
private:
|
||||
FileContainer m_fileContainer;
|
||||
};
|
||||
|
||||
CMBIPC_EXPORT QDebug operator<<(QDebug debug, const TranslationUnitDoesNotExistMessage &message);
|
||||
std::ostream &operator<<(std::ostream &os, const TranslationUnitDoesNotExistMessage &message);
|
||||
|
||||
DECLARE_MESSAGE(TranslationUnitDoesNotExistMessage)
|
||||
} // namespace ClangBackEnd
|
@@ -94,9 +94,6 @@ private:
|
||||
void references(const ClangBackEnd::ReferencesMessage &message) override;
|
||||
void followSymbol(const ClangBackEnd::FollowSymbolMessage &message) override;
|
||||
|
||||
void translationUnitDoesNotExist(const ClangBackEnd::TranslationUnitDoesNotExistMessage &) override {}
|
||||
void projectPartsDoNotExist(const ClangBackEnd::ProjectPartsDoNotExistMessage &) override {}
|
||||
|
||||
private:
|
||||
AliveHandler m_aliveHandler;
|
||||
QHash<quint64, ClangCompletionAssistProcessor *> m_assistProcessorsTable;
|
||||
|
@@ -30,7 +30,6 @@
|
||||
|
||||
#include <clangcodemodelclientproxy.h>
|
||||
#include <clangcodemodelserverproxy.h>
|
||||
#include <projectpartsdonotexistmessage.h>
|
||||
|
||||
#include <clangcodemodelservermessages.h>
|
||||
|
||||
@@ -226,29 +225,6 @@ TEST_F(ClientServerInProcess, UpdateVisibleTranslationUnitsMessage)
|
||||
scheduleServerMessages();
|
||||
}
|
||||
|
||||
TEST_F(ClientServerInProcess, SendTranslationUnitDoesNotExistMessage)
|
||||
{
|
||||
ClangBackEnd::TranslationUnitDoesNotExistMessage message(fileContainer);
|
||||
|
||||
EXPECT_CALL(mockClangCodeModelClient, translationUnitDoesNotExist(message))
|
||||
.Times(1);
|
||||
|
||||
clientProxy.translationUnitDoesNotExist(message);
|
||||
scheduleClientMessages();
|
||||
}
|
||||
|
||||
|
||||
TEST_F(ClientServerInProcess, SendProjectPartDoesNotExistMessage)
|
||||
{
|
||||
ClangBackEnd::ProjectPartsDoNotExistMessage message({Utf8StringLiteral("projectId")});
|
||||
|
||||
EXPECT_CALL(mockClangCodeModelClient, projectPartsDoNotExist(message))
|
||||
.Times(1);
|
||||
|
||||
clientProxy.projectPartsDoNotExist(message);
|
||||
scheduleClientMessages();
|
||||
}
|
||||
|
||||
TEST_F(ClientServerInProcess, SendDocumentAnnotationsChangedMessage)
|
||||
{
|
||||
ClangBackEnd::HighlightingMarkContainer highlightingMark(1, 1, 1, ClangBackEnd::HighlightingType::Keyword);
|
||||
|
@@ -35,8 +35,6 @@ public:
|
||||
void alive() override {}
|
||||
void echo(const ClangBackEnd::EchoMessage &) override {}
|
||||
void codeCompleted(const ClangBackEnd::CodeCompletedMessage &) override {}
|
||||
void translationUnitDoesNotExist(const ClangBackEnd::TranslationUnitDoesNotExistMessage &) override {}
|
||||
void projectPartsDoNotExist(const ClangBackEnd::ProjectPartsDoNotExistMessage &) override {}
|
||||
void documentAnnotationsChanged(const ClangBackEnd::DocumentAnnotationsChangedMessage &) override {}
|
||||
void references(const ClangBackEnd::ReferencesMessage &) override {}
|
||||
void followSymbol(const ClangBackEnd::FollowSymbolMessage &) override {}
|
||||
|
@@ -39,10 +39,6 @@ public:
|
||||
void(const ClangBackEnd::EchoMessage &message));
|
||||
MOCK_METHOD1(codeCompleted,
|
||||
void(const ClangBackEnd::CodeCompletedMessage &message));
|
||||
MOCK_METHOD1(translationUnitDoesNotExist,
|
||||
void(const ClangBackEnd::TranslationUnitDoesNotExistMessage &message));
|
||||
MOCK_METHOD1(projectPartsDoNotExist,
|
||||
void(const ClangBackEnd::ProjectPartsDoNotExistMessage &message));
|
||||
MOCK_METHOD1(documentAnnotationsChanged,
|
||||
void(const ClangBackEnd::DocumentAnnotationsChangedMessage &message));
|
||||
MOCK_METHOD1(references,
|
||||
|
Reference in New Issue
Block a user