From d3385ebb653538bd4109ed3fd6d7b0e7ecd66308 Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Mon, 5 Feb 2024 13:25:40 +0100 Subject: [PATCH] Git: Branchmodel: Fix fetching all remotes at once We want to return an empty string when "Remote Branches" is selected, instead of an empty optional. Broken by 224e4eeb59e66848476f4e765cbbd482425dbd4c Change-Id: I5af06fafec48910226fdedf4a15079444cc54b6e Reviewed-by: Orgad Shaneh --- src/plugins/git/branchmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/git/branchmodel.cpp b/src/plugins/git/branchmodel.cpp index bc44cb23914..fa9dee2cb37 100644 --- a/src/plugins/git/branchmodel.cpp +++ b/src/plugins/git/branchmodel.cpp @@ -757,7 +757,7 @@ std::optional BranchModel::remoteName(const QModelIndex &idx) const if (!node) return std::nullopt; if (node == remotesNode) - return {}; + return QString(); // keep QString() as {} might convert to std::nullopt if (node->parent == remotesNode) return node->name; return std::nullopt;