Commit aa7b4ff4 authored by Filipe Azevedo's avatar Filipe Azevedo
Browse files

Backport std::get to macOS 10.9

The macOS 10.9 has a limited implementation of C++17.
parent 76a6c137
Pipeline #39061 failed with stage
in 32 minutes and 52 seconds
......@@ -191,10 +191,10 @@ TagSelectionComboBox::TagSelectionComboBox(QWidget *parent)
d->tagModel = std::make_unique<TagModel>(monitor, this);
connect(d->tagModel.get(), &TagModel::populated, this, [this]() {
d->mModelReady = true;
if (std::holds_alternative<Tag::List>(d->mPendingSelection)) {
setSelection(std::get<Tag::List>(d->mPendingSelection));
} else if (std::holds_alternative<QStringList>(d->mPendingSelection)) {
setSelection(std::get<QStringList>(d->mPendingSelection));
if (auto *list = std::get_if<Tag::List>(&d->mPendingSelection)) {
setSelection(*list);
} else if (auto *slist = std::get_if<QStringList>(&d->mPendingSelection)) {
setSelection(*slist);
}
d->mPendingSelection = std::monostate{};
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment