From 376aae271132b39664d381f00bdcd45856acbd73 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Wed, 3 Jul 2019 17:57:43 +0200 Subject: Clang: Remove old code We maybe bring back the clang query interface but the local rename is better served by other plugins. Change-Id: I97bedcb20870632b7dd50977794a65b2b09ededb Reviewed-by: Tim Jenssen --- .../clangsupport/clangrefactoringclientmessages.h | 1 - .../clangsupport/clangrefactoringservermessages.h | 1 - src/libs/clangsupport/clangsupport-lib.pri | 5 - .../clangsupport/refactoringclientinterface.cpp | 3 - src/libs/clangsupport/refactoringclientinterface.h | 2 - src/libs/clangsupport/refactoringclientproxy.cpp | 5 - src/libs/clangsupport/refactoringclientproxy.h | 3 - .../clangsupport/refactoringserverinterface.cpp | 3 - src/libs/clangsupport/refactoringserverinterface.h | 2 - src/libs/clangsupport/refactoringserverproxy.cpp | 5 - src/libs/clangsupport/refactoringserverproxy.h | 1 - .../requestsourcelocationforrenamingmessage.cpp | 41 -------- .../requestsourcelocationforrenamingmessage.h | 108 --------------------- .../sourcelocationsforrenamingmessage.cpp | 39 -------- .../sourcelocationsforrenamingmessage.h | 87 ----------------- 15 files changed, 306 deletions(-) delete mode 100644 src/libs/clangsupport/requestsourcelocationforrenamingmessage.cpp delete mode 100644 src/libs/clangsupport/requestsourcelocationforrenamingmessage.h delete mode 100644 src/libs/clangsupport/sourcelocationsforrenamingmessage.cpp delete mode 100644 src/libs/clangsupport/sourcelocationsforrenamingmessage.h (limited to 'src/libs') diff --git a/src/libs/clangsupport/clangrefactoringclientmessages.h b/src/libs/clangsupport/clangrefactoringclientmessages.h index 012ca0431d..87b61b4c6b 100644 --- a/src/libs/clangsupport/clangrefactoringclientmessages.h +++ b/src/libs/clangsupport/clangrefactoringclientmessages.h @@ -27,6 +27,5 @@ #include "alivemessage.h" #include "progressmessage.h" -#include "sourcelocationsforrenamingmessage.h" #include "sourcerangesanddiagnosticsforquerymessage.h" #include "sourcerangesforquerymessage.h" diff --git a/src/libs/clangsupport/clangrefactoringservermessages.h b/src/libs/clangsupport/clangrefactoringservermessages.h index dd1cb3a6d7..8a79518c7e 100644 --- a/src/libs/clangsupport/clangrefactoringservermessages.h +++ b/src/libs/clangsupport/clangrefactoringservermessages.h @@ -27,7 +27,6 @@ #include "cancelmessage.h" #include "endmessage.h" -#include "requestsourcelocationforrenamingmessage.h" #include "requestsourcerangesanddiagnosticsforquerymessage.h" #include "requestsourcerangesforquerymessage.h" #include "removegeneratedfilesmessage.h" diff --git a/src/libs/clangsupport/clangsupport-lib.pri b/src/libs/clangsupport/clangsupport-lib.pri index 1705be3c26..18896c0ea0 100644 --- a/src/libs/clangsupport/clangsupport-lib.pri +++ b/src/libs/clangsupport/clangsupport-lib.pri @@ -56,14 +56,12 @@ SOURCES += \ $$PWD/requestannotationsmessage.cpp \ $$PWD/requestfollowsymbolmessage.cpp \ $$PWD/requestreferencesmessage.cpp \ - $$PWD/requestsourcelocationforrenamingmessage.cpp \ $$PWD/requestsourcerangesanddiagnosticsforquerymessage.cpp \ $$PWD/requestsourcerangesforquerymessage.cpp \ $$PWD/requesttooltipmessage.cpp \ $$PWD/sourcelocationcontainer.cpp \ $$PWD/sourcelocationcontainerv2.cpp \ $$PWD/sourcelocationscontainer.cpp \ - $$PWD/sourcelocationsforrenamingmessage.cpp \ $$PWD/sourcerangecontainer.cpp \ $$PWD/processcreator.cpp \ $$PWD/processexception.cpp \ @@ -120,7 +118,6 @@ HEADERS += \ $$PWD/projectpartid.h \ $$PWD/projectpartsstorage.h \ $$PWD/projectpartsstorageinterface.h \ - $$PWD/projectsourcechunk.h \ $$PWD/requestcompletionsmessage.h \ $$PWD/echomessage.h \ $$PWD/endmessage.h \ @@ -164,14 +161,12 @@ HEADERS += \ $$PWD/requestannotationsmessage.h \ $$PWD/requestfollowsymbolmessage.h \ $$PWD/requestreferencesmessage.h \ - $$PWD/requestsourcelocationforrenamingmessage.h \ $$PWD/requestsourcerangesanddiagnosticsforquerymessage.h \ $$PWD/requestsourcerangesforquerymessage.h \ $$PWD/requesttooltipmessage.h \ $$PWD/sourcelocationcontainer.h \ $$PWD/sourcelocationcontainerv2.h \ $$PWD/sourcelocationscontainer.h \ - $$PWD/sourcelocationsforrenamingmessage.h \ $$PWD/sourcerangecontainer.h \ $$PWD/filepath.h \ $$PWD/processcreator.h \ diff --git a/src/libs/clangsupport/refactoringclientinterface.cpp b/src/libs/clangsupport/refactoringclientinterface.cpp index 5e3b98df66..e862e4e4d9 100644 --- a/src/libs/clangsupport/refactoringclientinterface.cpp +++ b/src/libs/clangsupport/refactoringclientinterface.cpp @@ -38,9 +38,6 @@ void RefactoringClientInterface::dispatch(const MessageEnvelop &messageEnvelop) case MessageType::AliveMessage: alive(); break; - case MessageType::SourceLocationsForRenamingMessage: - sourceLocationsForRenamingMessage(messageEnvelop.message()); - break; case MessageType::SourceRangesAndDiagnosticsForQueryMessage: sourceRangesAndDiagnosticsForQueryMessage(messageEnvelop.message()); break; diff --git a/src/libs/clangsupport/refactoringclientinterface.h b/src/libs/clangsupport/refactoringclientinterface.h index c1127592d6..c7d2fcf7d0 100644 --- a/src/libs/clangsupport/refactoringclientinterface.h +++ b/src/libs/clangsupport/refactoringclientinterface.h @@ -47,10 +47,8 @@ public: void dispatch(const MessageEnvelop &messageEnvelop) override; virtual void alive() = 0; - virtual void sourceLocationsForRenamingMessage(SourceLocationsForRenamingMessage &&message) = 0; virtual void sourceRangesAndDiagnosticsForQueryMessage(SourceRangesAndDiagnosticsForQueryMessage &&message) = 0; virtual void sourceRangesForQueryMessage(SourceRangesForQueryMessage &&message) = 0; - virtual void setLocalRenamingCallback(RenameCallback &&localRenamingCallback) = 0; virtual void progress(ProgressMessage &&message) = 0; protected: diff --git a/src/libs/clangsupport/refactoringclientproxy.cpp b/src/libs/clangsupport/refactoringclientproxy.cpp index 646cb0e161..b2d30d7bfb 100644 --- a/src/libs/clangsupport/refactoringclientproxy.cpp +++ b/src/libs/clangsupport/refactoringclientproxy.cpp @@ -66,11 +66,6 @@ void RefactoringClientProxy::alive() writeMessageBlock.write(AliveMessage()); } -void RefactoringClientProxy::sourceLocationsForRenamingMessage(SourceLocationsForRenamingMessage &&message) -{ - writeMessageBlock.write(message); -} - void RefactoringClientProxy::sourceRangesAndDiagnosticsForQueryMessage(SourceRangesAndDiagnosticsForQueryMessage &&message) { writeMessageBlock.write(message); diff --git a/src/libs/clangsupport/refactoringclientproxy.h b/src/libs/clangsupport/refactoringclientproxy.h index 07cba05e8d..371ae91f82 100644 --- a/src/libs/clangsupport/refactoringclientproxy.h +++ b/src/libs/clangsupport/refactoringclientproxy.h @@ -50,13 +50,10 @@ public: void readMessages(); void alive() override; - void sourceLocationsForRenamingMessage(SourceLocationsForRenamingMessage &&message) override; void sourceRangesAndDiagnosticsForQueryMessage(SourceRangesAndDiagnosticsForQueryMessage &&message) override; void sourceRangesForQueryMessage(SourceRangesForQueryMessage &&message) override; void progress(ProgressMessage &&message) override; - void setLocalRenamingCallback(RenameCallback &&) final {} - private: ClangBackEnd::WriteMessageBlock writeMessageBlock; ClangBackEnd::ReadMessageBlock readMessageBlock; diff --git a/src/libs/clangsupport/refactoringserverinterface.cpp b/src/libs/clangsupport/refactoringserverinterface.cpp index a95837f80a..6fcaa0f054 100644 --- a/src/libs/clangsupport/refactoringserverinterface.cpp +++ b/src/libs/clangsupport/refactoringserverinterface.cpp @@ -38,9 +38,6 @@ void RefactoringServerInterface::dispatch(const MessageEnvelop &messageEnvelop) case MessageType::EndMessage: end(); break; - case MessageType::RequestSourceLocationsForRenamingMessage: - requestSourceLocationsForRenamingMessage(messageEnvelop.message()); - break; case MessageType::RequestSourceRangesAndDiagnosticsForQueryMessage: requestSourceRangesAndDiagnosticsForQueryMessage(messageEnvelop.message()); break; diff --git a/src/libs/clangsupport/refactoringserverinterface.h b/src/libs/clangsupport/refactoringserverinterface.h index 2dcc503860..a8a677427c 100644 --- a/src/libs/clangsupport/refactoringserverinterface.h +++ b/src/libs/clangsupport/refactoringserverinterface.h @@ -32,7 +32,6 @@ namespace ClangBackEnd { class RefactoringClientInterface; -class RequestSourceLocationsForRenamingMessage; class RequestSourceRangesAndDiagnosticsForQueryMessage; class RequestSourceRangesForQueryMessage; class CancelMessage; @@ -46,7 +45,6 @@ public: void dispatch(const MessageEnvelop &messageEnvelop) override; virtual void end() = 0; - virtual void requestSourceLocationsForRenamingMessage(RequestSourceLocationsForRenamingMessage &&message) = 0; virtual void requestSourceRangesAndDiagnosticsForQueryMessage(RequestSourceRangesAndDiagnosticsForQueryMessage &&message) = 0; virtual void requestSourceRangesForQueryMessage(RequestSourceRangesForQueryMessage &&message) = 0; virtual void cancel() = 0; diff --git a/src/libs/clangsupport/refactoringserverproxy.cpp b/src/libs/clangsupport/refactoringserverproxy.cpp index 2208f3a0ce..a206a2531b 100644 --- a/src/libs/clangsupport/refactoringserverproxy.cpp +++ b/src/libs/clangsupport/refactoringserverproxy.cpp @@ -50,11 +50,6 @@ void RefactoringServerProxy::end() m_writeMessageBlock.write(EndMessage()); } -void RefactoringServerProxy::requestSourceLocationsForRenamingMessage(RequestSourceLocationsForRenamingMessage &&message) -{ - m_writeMessageBlock.write(message); -} - void RefactoringServerProxy::requestSourceRangesAndDiagnosticsForQueryMessage(RequestSourceRangesAndDiagnosticsForQueryMessage &&message) { m_writeMessageBlock.write(message); diff --git a/src/libs/clangsupport/refactoringserverproxy.h b/src/libs/clangsupport/refactoringserverproxy.h index 34861767d8..4b91036c46 100644 --- a/src/libs/clangsupport/refactoringserverproxy.h +++ b/src/libs/clangsupport/refactoringserverproxy.h @@ -52,7 +52,6 @@ public: explicit RefactoringServerProxy(RefactoringClientInterface *client, QIODevice *ioDevice); void end() override; - void requestSourceLocationsForRenamingMessage(RequestSourceLocationsForRenamingMessage &&message) override; void requestSourceRangesAndDiagnosticsForQueryMessage(RequestSourceRangesAndDiagnosticsForQueryMessage &&message) override; void requestSourceRangesForQueryMessage(RequestSourceRangesForQueryMessage &&message) override; void updateProjectParts(UpdateProjectPartsMessage &&message) override; diff --git a/src/libs/clangsupport/requestsourcelocationforrenamingmessage.cpp b/src/libs/clangsupport/requestsourcelocationforrenamingmessage.cpp deleted file mode 100644 index dd25a3ebae..0000000000 --- a/src/libs/clangsupport/requestsourcelocationforrenamingmessage.cpp +++ /dev/null @@ -1,41 +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 "requestsourcelocationforrenamingmessage.h" - -namespace ClangBackEnd { - -QDebug operator<<(QDebug debug, const RequestSourceLocationsForRenamingMessage &message) -{ - debug.nospace() << "RequestSourceLocationsForRenamingMessage(" - << message.filePath << ", " - << message.line << ", " - << message.column << ", " - << message.unsavedContent << ")"; - - return debug; -} - -} // namespace ClangBackEnd diff --git a/src/libs/clangsupport/requestsourcelocationforrenamingmessage.h b/src/libs/clangsupport/requestsourcelocationforrenamingmessage.h deleted file mode 100644 index 9082e0dfaf..0000000000 --- a/src/libs/clangsupport/requestsourcelocationforrenamingmessage.h +++ /dev/null @@ -1,108 +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 "filepath.h" - -#include - -namespace ClangBackEnd { - -class CLANGSUPPORT_EXPORT RequestSourceLocationsForRenamingMessage -{ -public: - RequestSourceLocationsForRenamingMessage() = default; - RequestSourceLocationsForRenamingMessage(FilePath &&filePath, - uint line, - uint column, - Utils::SmallString &&unsavedContent, - Utils::SmallStringVector &&commandLine, - int textDocumentRevision) - : filePath(std::move(filePath)), - unsavedContent(std::move(unsavedContent)), - commandLine(std::move(commandLine)), - line(line), - column(column), - textDocumentRevision(textDocumentRevision) - {} - - friend QDataStream &operator<<(QDataStream &out, const RequestSourceLocationsForRenamingMessage &message) - { - out << message.filePath; - out << message.unsavedContent; - out << message.commandLine; - out << message.line; - out << message.column; - out << message.textDocumentRevision; - - return out; - } - - friend QDataStream &operator>>(QDataStream &in, RequestSourceLocationsForRenamingMessage &message) - { - in >> message.filePath; - in >> message.unsavedContent; - in >> message.commandLine; - in >> message.line; - in >> message.column; - in >> message.textDocumentRevision; - - return in; - } - - friend bool operator==(const RequestSourceLocationsForRenamingMessage &first, const RequestSourceLocationsForRenamingMessage &second) - { - return first.filePath == second.filePath - && first.line == second.line - && first.column == second.column - && first.textDocumentRevision == second.textDocumentRevision - && first.unsavedContent == second.unsavedContent - && first.commandLine == second.commandLine; - } - - RequestSourceLocationsForRenamingMessage clone() const - { - return RequestSourceLocationsForRenamingMessage(filePath.clone(), - line, column, - unsavedContent.clone(), - commandLine.clone(), - textDocumentRevision); - } - -public: - FilePath filePath; - Utils::SmallString unsavedContent; - Utils::SmallStringVector commandLine; - uint line = 1; - uint column = 1; - int textDocumentRevision = 1; -}; - -CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const RequestSourceLocationsForRenamingMessage &message); - -DECLARE_MESSAGE(RequestSourceLocationsForRenamingMessage) -} // namespace ClangBackEnd diff --git a/src/libs/clangsupport/sourcelocationsforrenamingmessage.cpp b/src/libs/clangsupport/sourcelocationsforrenamingmessage.cpp deleted file mode 100644 index 3490738531..0000000000 --- a/src/libs/clangsupport/sourcelocationsforrenamingmessage.cpp +++ /dev/null @@ -1,39 +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 "sourcelocationsforrenamingmessage.h" - -namespace ClangBackEnd { - -QDebug operator<<(QDebug debug, const SourceLocationsForRenamingMessage &message) -{ - debug.nospace() << "SourceLocationsForRenamingMessage(" - << message.sourceLocations - << ")"; - - return debug; -} - -} // namespace ClangBackEnd diff --git a/src/libs/clangsupport/sourcelocationsforrenamingmessage.h b/src/libs/clangsupport/sourcelocationsforrenamingmessage.h deleted file mode 100644 index 5be072677c..0000000000 --- a/src/libs/clangsupport/sourcelocationsforrenamingmessage.h +++ /dev/null @@ -1,87 +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 "sourcelocationscontainer.h" - -#include - -namespace ClangBackEnd { - -class SourceLocationsForRenamingMessage -{ -public: - SourceLocationsForRenamingMessage() = default; - SourceLocationsForRenamingMessage(Utils::SmallString &&symbolName, - SourceLocationsContainer &&sourceLocationContainer, - int textDocumentRevision) - : symbolName(std::move(symbolName)), - sourceLocations(std::move(sourceLocationContainer)), - textDocumentRevision(textDocumentRevision) - {} - - friend QDataStream &operator<<(QDataStream &out, const SourceLocationsForRenamingMessage &message) - { - out << message.symbolName; - out << message.sourceLocations; - out << message.textDocumentRevision; - - return out; - } - - friend QDataStream &operator>>(QDataStream &in, SourceLocationsForRenamingMessage &message) - { - in >> message.symbolName; - in >> message.sourceLocations; - in >> message.textDocumentRevision; - - return in; - } - - friend bool operator==(const SourceLocationsForRenamingMessage &first, const SourceLocationsForRenamingMessage &second) - { - return first.textDocumentRevision == second.textDocumentRevision - && first.symbolName == second.symbolName - && first.sourceLocations == second.sourceLocations; - } - - SourceLocationsForRenamingMessage clone() const - { - return SourceLocationsForRenamingMessage(symbolName.clone(), - sourceLocations.clone(), - textDocumentRevision); - } - -public: - Utils::SmallString symbolName; - SourceLocationsContainer sourceLocations; - int textDocumentRevision = 0; -}; - -CLANGSUPPORT_EXPORT QDebug operator<<(QDebug debug, const SourceLocationsForRenamingMessage &message); - -DECLARE_MESSAGE(SourceLocationsForRenamingMessage) -} // namespace ClangBackEnd -- cgit v1.2.3