File indexing completed on 2024-05-12 05:17:09
0001 // SPDX-FileCopyrightText: 2023 Claudio Cambra <claudio.cambra@kde.org> 0002 // SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0003 0004 #include "identityutils.h" 0005 0006 #include <QTimer> 0007 0008 namespace KIdentityManagementQuick 0009 { 0010 bool IdentityUtils::removeIdentity(const QString &identityName) 0011 { 0012 if (!mIdentityManager) { 0013 return false; 0014 } 0015 0016 const auto result = mIdentityManager->removeIdentity(identityName); 0017 // Need to run async or will crash the UI if this is called from QML 0018 QTimer::singleShot(0, mIdentityManager, &KIdentityManagementCore::IdentityManager::commit); 0019 return result; 0020 } 0021 0022 } 0023 0024 #include "moc_identityutils.cpp"