Verified Commit 8c900018 authored by Carl Schwan's avatar Carl Schwan 🚴
Browse files

Add isDefaultIdentity to IdentifyCombobox



This is used to determine if the currently selected identity is the
default one.
Signed-off-by: Carl Schwan's avatarCarl Schwan <carl@carlschwan.eu>
parent 5a86412f
Pipeline #71400 failed with stage
in 10 minutes and 29 seconds
......@@ -95,6 +95,11 @@ uint IdentityCombo::currentIdentity() const
return d->mUoidList.at(currentIndex());
}
bool IdentityCombo::isDefaultIdentity() const
{
return d->mUoidList.at(currentIndex()) == d->mIdentityManager->defaultIdentity().uoid();
}
void IdentityCombo::setCurrentIdentity(const Identity &identity)
{
setCurrentIdentity(identity.uoid());
......
......@@ -37,6 +37,7 @@ public:
~IdentityCombo();
Q_REQUIRED_RESULT QString currentIdentityName() const;
Q_REQUIRED_RESULT uint currentIdentity() const;
Q_REQUIRED_RESULT bool isDefaultIdentity() const;
void setCurrentIdentity(const QString &identityName);
void setCurrentIdentity(const Identity &identity);
void setCurrentIdentity(uint uoid);
......
Supports Markdown
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