forked from qt-creator/qt-creator
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 224e4eeb59
Change-Id: I5af06fafec48910226fdedf4a15079444cc54b6e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
André Hartmann
parent
78d42d2d54
commit
d3385ebb65
@@ -757,7 +757,7 @@ std::optional<QString> 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;
|
||||
|
||||
Reference in New Issue
Block a user