forked from qt-creator/qt-creator
Utils: Remove Utils::optional
Since we are now requiring macOS 10.14 we can remove our local implementation of optional and use std::optional for macOS too. Change-Id: I2bd018261b68da64f7f031a812045dd7784697e1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -9,10 +9,11 @@
|
||||
#include <cppeditor/cursorineditor.h>
|
||||
#include <languageclient/client.h>
|
||||
#include <utils/link.h>
|
||||
#include <utils/optional.h>
|
||||
|
||||
#include <QVersionNumber>
|
||||
|
||||
#include <optional>
|
||||
|
||||
namespace CppEditor { class CppEditorWidget; }
|
||||
namespace LanguageServerProtocol { class Range; }
|
||||
namespace ProjectExplorer {
|
||||
@@ -48,7 +49,7 @@ public:
|
||||
void closeExtraFile(const Utils::FilePath &filePath);
|
||||
|
||||
void findUsages(TextEditor::TextDocument *document, const QTextCursor &cursor,
|
||||
const Utils::optional<QString> &replacement);
|
||||
const std::optional<QString> &replacement);
|
||||
void followSymbol(TextEditor::TextDocument *document,
|
||||
const QTextCursor &cursor,
|
||||
CppEditor::CppEditorWidget *editorWidget,
|
||||
@@ -85,7 +86,7 @@ public:
|
||||
void switchIssuePaneEntries(const Utils::FilePath &filePath);
|
||||
void addTask(const ProjectExplorer::Task &task);
|
||||
void clearTasks(const Utils::FilePath &filePath);
|
||||
Utils::optional<bool> hasVirtualFunctionAt(TextEditor::TextDocument *doc, int revision,
|
||||
std::optional<bool> hasVirtualFunctionAt(TextEditor::TextDocument *doc, int revision,
|
||||
const LanguageServerProtocol::Range &range);
|
||||
|
||||
using TextDocOrFile = std::variant<const TextEditor::TextDocument *, Utils::FilePath>;
|
||||
@@ -136,7 +137,7 @@ class ClangdDiagnostic : public LanguageServerProtocol::Diagnostic
|
||||
{
|
||||
public:
|
||||
using Diagnostic::Diagnostic;
|
||||
Utils::optional<QList<LanguageServerProtocol::CodeAction>> codeActions() const;
|
||||
std::optional<QList<LanguageServerProtocol::CodeAction>> codeActions() const;
|
||||
QString category() const;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user