Utils: Remove variant.h

Since we are now requiring macOS 10.14 we can remove our local copy of
std::variant and use for macOS std::variant too.

Change-Id: I589d03b35fc56878b7392ffa7047a439e588fe43
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Marco Bubke
2022-08-19 14:47:59 +02:00
parent 17693bc415
commit 84c1d6572b
67 changed files with 414 additions and 2958 deletions

View File

@@ -399,9 +399,9 @@ void ClangdFollowSymbol::Private::handleGotoImplementationResult(
{
if (const optional<GotoResult> &result = response.result()) {
QList<Link> newLinks;
if (const auto ploc = get_if<Location>(&*result))
if (const auto ploc = std::get_if<Location>(&*result))
newLinks = {ploc->toLink()};
if (const auto plloc = get_if<QList<Location>>(&*result))
if (const auto plloc = std::get_if<QList<Location>>(&*result))
newLinks = transform(*plloc, &Location::toLink);
for (const Link &link : qAsConst(newLinks)) {
if (!allLinks.contains(link)) {
@@ -475,9 +475,9 @@ void ClangdFollowSymbol::Private::handleGotoImplementationResult(
Link newLink;
if (optional<GotoResult> _result = response.result()) {
const GotoResult result = _result.value();
if (const auto ploc = get_if<Location>(&result)) {
if (const auto ploc = std::get_if<Location>(&result)) {
newLink = ploc->toLink();
} else if (const auto plloc = get_if<QList<Location>>(&result)) {
} else if (const auto plloc = std::get_if<QList<Location>>(&result)) {
if (!plloc->isEmpty())
newLink = plloc->value(0).toLink();
}