summaryrefslogtreecommitdiff
path: root/src/plugins/texteditor/snippets/snippet.cpp
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@qt.io>2022-08-19 14:47:59 +0200
committerMarco Bubke <marco.bubke@qt.io>2022-08-23 09:51:43 +0000
commit84c1d6572bce6fc6c1edb5c6246e81bdb841f00a (patch)
treebddfc71e61fa44ed8e77a24935ad1e640f376a70 /src/plugins/texteditor/snippets/snippet.cpp
parent17693bc41518ee1c15d673dfee3c3818057b1895 (diff)
downloadqt-creator-84c1d6572bce6fc6c1edb5c6246e81bdb841f00a.tar.gz
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>
Diffstat (limited to 'src/plugins/texteditor/snippets/snippet.cpp')
-rw-r--r--src/plugins/texteditor/snippets/snippet.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/texteditor/snippets/snippet.cpp b/src/plugins/texteditor/snippets/snippet.cpp
index 885b008026..6dec2efe5e 100644
--- a/src/plugins/texteditor/snippets/snippet.cpp
+++ b/src/plugins/texteditor/snippets/snippet.cpp
@@ -182,10 +182,10 @@ QString Snippet::generateTip() const
{
SnippetParseResult result = Snippet::parse(m_content);
- if (Utils::holds_alternative<SnippetParseError>(result))
- return Utils::get<SnippetParseError>(result).htmlMessage();
- QTC_ASSERT(Utils::holds_alternative<ParsedSnippet>(result), return {});
- const ParsedSnippet parsedSnippet = Utils::get<ParsedSnippet>(result);
+ if (std::holds_alternative<SnippetParseError>(result))
+ return std::get<SnippetParseError>(result).htmlMessage();
+ QTC_ASSERT(std::holds_alternative<ParsedSnippet>(result), return {});
+ const ParsedSnippet parsedSnippet = std::get<ParsedSnippet>(result);
QString tip("<nobr>");
for (const ParsedSnippet::Part &part : parsedSnippet.parts)
@@ -407,11 +407,11 @@ void Internal::TextEditorPlugin::testSnippetParsing()
QFETCH(Parts, parts);
SnippetParseResult result = Snippet::parse(input);
- QCOMPARE(Utils::holds_alternative<ParsedSnippet>(result), success);
+ QCOMPARE(std::holds_alternative<ParsedSnippet>(result), success);
if (!success)
return;
- ParsedSnippet snippet = Utils::get<ParsedSnippet>(result);
+ ParsedSnippet snippet = std::get<ParsedSnippet>(result);
auto rangesCompare = [&](const ParsedSnippet::Part &actual, const SnippetPart &expected) {
QCOMPARE(actual.text, expected.text);