diff options
Diffstat (limited to 'launcher/minecraft')
31 files changed, 269 insertions, 170 deletions
diff --git a/launcher/minecraft/Component.cpp b/launcher/minecraft/Component.cpp index 92821065..385688d4 100644 --- a/launcher/minecraft/Component.cpp +++ b/launcher/minecraft/Component.cpp @@ -85,9 +85,9 @@ std::shared_ptr<class VersionFile> Component::getVersionFile() const std::shared_ptr<class Meta::VersionList> Component::getVersionList() const { // FIXME: what if the metadata index isn't loaded yet? - if(ENV.metadataIndex()->hasUid(m_uid)) + if(ENV->metadataIndex()->hasUid(m_uid)) { - return ENV.metadataIndex()->get(m_uid); + return ENV->metadataIndex()->get(m_uid); } return nullptr; } @@ -192,7 +192,7 @@ bool Component::isRevertible() { if (isCustom()) { - if(ENV.metadataIndex()->hasUid(m_uid)) + if(ENV->metadataIndex()->hasUid(m_uid)) { return true; } @@ -266,7 +266,7 @@ void Component::setVersion(const QString& version) // we don't have a file, therefore we are loaded with metadata m_cachedVersion = version; // see if the meta version is loaded - auto metaVersion = ENV.metadataIndex()->get(m_uid, version); + auto metaVersion = ENV->metadataIndex()->get(m_uid, version); if(metaVersion->isLoaded()) { // if yes, we can continue with that. @@ -350,7 +350,7 @@ bool Component::revert() m_file.reset(); // check local cache for metadata... - auto version = ENV.metadataIndex()->get(m_uid, m_version); + auto version = ENV->metadataIndex()->get(m_uid, m_version); if(version->isLoaded()) { m_metaVersion = version; diff --git a/launcher/minecraft/ComponentUpdateTask.cpp b/launcher/minecraft/ComponentUpdateTask.cpp index 241d9a49..92ba1640 100644 --- a/launcher/minecraft/ComponentUpdateTask.cpp +++ b/launcher/minecraft/ComponentUpdateTask.cpp @@ -102,7 +102,7 @@ static LoadResult loadComponent(ComponentPtr component, shared_qobject_ptr<Task> } else { - auto metaVersion = ENV.metadataIndex()->get(component->m_uid, component->m_version); + auto metaVersion = ENV->metadataIndex()->get(component->m_uid, component->m_version); component->m_metaVersion = metaVersion; if(metaVersion->isLoaded()) { @@ -135,7 +135,7 @@ static LoadResult loadPackProfile(ComponentPtr component, shared_qobject_ptr<Tas } LoadResult result = LoadResult::Failed; - auto metaList = ENV.metadataIndex()->get(component->m_uid); + auto metaList = ENV->metadataIndex()->get(component->m_uid); if(metaList->isLoaded()) { component->m_loaded = true; @@ -154,13 +154,13 @@ static LoadResult loadPackProfile(ComponentPtr component, shared_qobject_ptr<Tas static LoadResult loadIndex(shared_qobject_ptr<Task>& loadTask, Net::Mode netmode) { // FIXME: DECIDE. do we want to run the update task anyway? - if(ENV.metadataIndex()->isLoaded()) + if(ENV->metadataIndex()->isLoaded()) { qDebug() << "Index is already loaded"; return LoadResult::LoadedLocal; } - ENV.metadataIndex()->load(netmode); - loadTask = ENV.metadataIndex()->getCurrentTask(); + ENV->metadataIndex()->load(netmode); + loadTask = ENV->metadataIndex()->getCurrentTask(); if(loadTask) { return LoadResult::RequiresRemote; diff --git a/launcher/minecraft/MinecraftInstance.cpp b/launcher/minecraft/MinecraftInstance.cpp index 2982a340..f755fa6e 100644 --- a/launcher/minecraft/MinecraftInstance.cpp +++ b/launcher/minecraft/MinecraftInstance.cpp @@ -816,7 +816,7 @@ shared_qobject_ptr<LaunchTask> MinecraftInstance::createLaunchTask(AuthSessionPt auto process = LaunchTask::create(std::dynamic_pointer_cast<MinecraftInstance>(shared_from_this())); auto pptr = process.get(); - ENV.icons()->saveIcon(iconKey(), FS::PathCombine(gameRoot(), "icon.png"), "PNG"); + ENV->icons()->saveIcon(iconKey(), FS::PathCombine(gameRoot(), "icon.png"), "PNG"); // print a header { diff --git a/launcher/minecraft/PackProfile.cpp b/launcher/minecraft/PackProfile.cpp index f6918116..f7612719 100644 --- a/launcher/minecraft/PackProfile.cpp +++ b/launcher/minecraft/PackProfile.cpp @@ -481,7 +481,7 @@ bool PackProfile::migratePreComponentConfig() } else if(!intendedVersion.isEmpty()) { - auto metaVersion = ENV.metadataIndex()->get(uid, intendedVersion); + auto metaVersion = ENV->metadataIndex()->get(uid, intendedVersion); component = new Component(this, metaVersion); } else @@ -546,7 +546,7 @@ bool PackProfile::migratePreComponentConfig() auto patchVersion = d->getOldConfigVersion(uid); if(!patchVersion.isEmpty() && !loadedComponents.contains(uid)) { - auto patch = new Component(this, ENV.metadataIndex()->get(uid, patchVersion)); + auto patch = new Component(this, ENV->metadataIndex()->get(uid, patchVersion)); patch->setOrder(order); loadedComponents[uid] = patch; } diff --git a/launcher/minecraft/auth/AccountList.cpp b/launcher/minecraft/auth/AccountList.cpp index 5589cfe9..97ba48f4 100644 --- a/launcher/minecraft/auth/AccountList.cpp +++ b/launcher/minecraft/auth/AccountList.cpp @@ -37,6 +37,8 @@ enum AccountListVersion { AccountList::AccountList(QObject *parent) : QAbstractListModel(parent) { } +AccountList::~AccountList() noexcept {} + int AccountList::findAccountByProfileId(const QString& profileId) const { for (int i = 0; i < count(); i++) { MinecraftAccountPtr account = at(i); @@ -62,6 +64,18 @@ const MinecraftAccountPtr AccountList::at(int i) const return MinecraftAccountPtr(m_accounts.at(i)); } +QStringList AccountList::profileNames() const { + QStringList out; + for(auto & account: m_accounts) { + auto profileName = account->profileName(); + if(profileName.isEmpty()) { + continue; + } + out.append(profileName); + } + return out; +} + void AccountList::addAccount(const MinecraftAccountPtr account) { auto profileId = account->profileId(); @@ -71,8 +85,8 @@ void AccountList::addAccount(const MinecraftAccountPtr account) if(existingAccount != -1) { MinecraftAccountPtr existingAccountPtr = m_accounts[existingAccount]; m_accounts[existingAccount] = account; - if(m_activeAccount == existingAccountPtr) { - m_activeAccount = account; + if(m_defaultAccount == existingAccountPtr) { + m_defaultAccount = account; } emit dataChanged(index(existingAccount), index(existingAccount, columnCount(QModelIndex()) - 1)); onListChanged(); @@ -80,10 +94,11 @@ void AccountList::addAccount(const MinecraftAccountPtr account) } } - // if we don't have this porfileId yet, add the account to the end + // if we don't have this profileId yet, add the account to the end int row = m_accounts.count(); beginInsertRows(QModelIndex(), row, row); - connect(account.get(), SIGNAL(changed()), SLOT(accountChanged())); + connect(account.get(), &MinecraftAccount::changed, this, &AccountList::accountChanged); + connect(account.get(), &MinecraftAccount::activityChanged, this, &AccountList::accountActivityChanged); m_accounts.append(account); endInsertRows(); onListChanged(); @@ -95,10 +110,10 @@ void AccountList::removeAccount(QModelIndex index) if(index.isValid() && row >= 0 && row < m_accounts.size()) { auto & account = m_accounts[row]; - if(account == m_activeAccount) + if(account == m_defaultAccount) { - m_activeAccount = nullptr; - onActiveChanged(); + m_defaultAccount = nullptr; + onDefaultAccountChanged(); } beginRemoveRows(QModelIndex(), row, row); m_accounts.removeAt(index.row()); @@ -107,54 +122,54 @@ void AccountList::removeAccount(QModelIndex index) } } -MinecraftAccountPtr AccountList::activeAccount() const +MinecraftAccountPtr AccountList::defaultAccount() const { - return m_activeAccount; + return m_defaultAccount; } -void AccountList::setActiveAccount(MinecraftAccountPtr newAccount) +void AccountList::setDefaultAccount(MinecraftAccountPtr newAccount) { - if (!newAccount && m_activeAccount) + if (!newAccount && m_defaultAccount) { int idx = 0; - auto prevActiveAcc = m_activeAccount; - m_activeAccount = nullptr; + auto previousDefaultAccount = m_defaultAccount; + m_defaultAccount = nullptr; for (MinecraftAccountPtr account : m_accounts) { - if (account == prevActiveAcc) + if (account == previousDefaultAccount) { - emit dataChanged(index(idx), index(idx)); + emit dataChanged(index(idx), index(idx, columnCount(QModelIndex()) - 1)); } idx ++; } - onActiveChanged(); + onDefaultAccountChanged(); } else { - auto currentActiveAccount = m_activeAccount; - int currentActiveAccountIdx = -1; - auto newActiveAccount = m_activeAccount; - int newActiveAccountIdx = -1; + auto currentDefaultAccount = m_defaultAccount; + int currentDefaultAccountIdx = -1; + auto newDefaultAccount = m_defaultAccount; + int newDefaultAccountIdx = -1; int idx = 0; for (MinecraftAccountPtr account : m_accounts) { if (account == newAccount) { - newActiveAccount = account; - newActiveAccountIdx = idx; + newDefaultAccount = account; + newDefaultAccountIdx = idx; } - if(currentActiveAccount == account) + if(currentDefaultAccount == account) { - currentActiveAccountIdx = idx; + currentDefaultAccountIdx = idx; } idx++; } - if(currentActiveAccount != newActiveAccount) + if(currentDefaultAccount != newDefaultAccount) { - emit dataChanged(index(currentActiveAccountIdx), index(currentActiveAccountIdx)); - emit dataChanged(index(newActiveAccountIdx), index(newActiveAccountIdx)); - m_activeAccount = newActiveAccount; - onActiveChanged(); + emit dataChanged(index(currentDefaultAccountIdx), index(currentDefaultAccountIdx, columnCount(QModelIndex()) - 1)); + emit dataChanged(index(newDefaultAccountIdx), index(newDefaultAccountIdx, columnCount(QModelIndex()) - 1)); + m_defaultAccount = newDefaultAccount; + onDefaultAccountChanged(); } } } @@ -165,6 +180,23 @@ void AccountList::accountChanged() onListChanged(); } +void AccountList::accountActivityChanged(bool active) +{ + MinecraftAccount *account = qobject_cast<MinecraftAccount *>(sender()); + bool found = false; + for (int i = 0; i < count(); i++) { + if (at(i).get() == account) { + emit dataChanged(index(i), index(i, columnCount(QModelIndex()) - 1)); + found = true; + break; + } + } + if(found) { + emit listActivityChanged(); + } +} + + void AccountList::onListChanged() { if (m_autosave) @@ -174,12 +206,12 @@ void AccountList::onListChanged() emit listChanged(); } -void AccountList::onActiveChanged() +void AccountList::onDefaultAccountChanged() { if (m_autosave) saveList(); - emit activeAccountChanged(); + emit defaultAccountChanged(); } int AccountList::count() const @@ -211,6 +243,11 @@ QVariant AccountList::data(const QModelIndex &index, int role) const return typeStr; } + case StatusColumn: { + auto isActive = account->isActive(); + return isActive ? "Working" : "Ready"; + } + case ProfileNameColumn: { return account->profileName(); } @@ -235,13 +272,13 @@ QVariant AccountList::data(const QModelIndex &index, int role) const return account->accountDisplayString(); case PointerRole: - return qVariantFromValue(account); + return QVariant::fromValue(account); case Qt::CheckStateRole: switch (index.column()) { case NameColumn: - return account == m_activeAccount ? Qt::Checked : Qt::Unchecked; + return account == m_defaultAccount ? Qt::Checked : Qt::Unchecked; } default: @@ -260,6 +297,8 @@ QVariant AccountList::headerData(int section, Qt::Orientation orientation, int r return tr("Account"); case TypeColumn: return tr("Type"); + case StatusColumn: + return tr("Status"); case MigrationColumn: return tr("Can Migrate?"); case ProfileNameColumn: @@ -275,6 +314,8 @@ QVariant AccountList::headerData(int section, Qt::Orientation orientation, int r return tr("User name of the account."); case TypeColumn: return tr("Type of the account - Mojang or MSA."); + case StatusColumn: + return tr("Current status of the account."); case MigrationColumn: return tr("Can this account migrate to Microsoft account?"); case ProfileNameColumn: @@ -309,9 +350,9 @@ Qt::ItemFlags AccountList::flags(const QModelIndex &index) const return Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsSelectable; } -bool AccountList::setData(const QModelIndex &index, const QVariant &value, int role) +bool AccountList::setData(const QModelIndex &idx, const QVariant &value, int role) { - if (index.row() < 0 || index.row() >= rowCount(index) || !index.isValid()) + if (idx.row() < 0 || idx.row() >= rowCount(idx) || !idx.isValid()) { return false; } @@ -320,12 +361,12 @@ bool AccountList::setData(const QModelIndex &index, const QVariant &value, int r { if(value == Qt::Checked) { - MinecraftAccountPtr account = at(index.row()); - setActiveAccount(account); + MinecraftAccountPtr account = at(idx.row()); + setDefaultAccount(account); } } - emit dataChanged(index, index); + emit dataChanged(idx, index(idx.row(), columnCount(QModelIndex()) - 1)); return true; } @@ -395,7 +436,7 @@ bool AccountList::loadList() bool AccountList::loadV2(QJsonObject& root) { beginResetModel(); - auto activeUserName = root.value("activeAccount").toString(""); + auto defaultUserName = root.value("activeAccount").toString(""); QJsonArray accounts = root.value("accounts").toArray(); for (QJsonValue accountVal : accounts) { @@ -411,9 +452,10 @@ bool AccountList::loadV2(QJsonObject& root) { continue; } connect(account.get(), &MinecraftAccount::changed, this, &AccountList::accountChanged); + connect(account.get(), &MinecraftAccount::activityChanged, this, &AccountList::accountActivityChanged); m_accounts.append(account); - if (activeUserName.size() && account->mojangUserName() == activeUserName) { - m_activeAccount = account; + if (defaultUserName.size() && account->mojangUserName() == defaultUserName) { + m_defaultAccount = account; } } else @@ -441,9 +483,10 @@ bool AccountList::loadV3(QJsonObject& root) { } } connect(account.get(), &MinecraftAccount::changed, this, &AccountList::accountChanged); + connect(account.get(), &MinecraftAccount::activityChanged, this, &AccountList::accountActivityChanged); m_accounts.append(account); if(accountObj.value("active").toBool(false)) { - m_activeAccount = account; + m_defaultAccount = account; } } else @@ -490,7 +533,7 @@ bool AccountList::saveList() for (MinecraftAccountPtr account : m_accounts) { QJsonObject accountObj = account->saveToJson(); - if(m_activeAccount == account) { + if(m_defaultAccount == account) { accountObj["active"] = true; } accounts.append(accountObj); diff --git a/launcher/minecraft/auth/AccountList.h b/launcher/minecraft/auth/AccountList.h index d6d72cd3..08004628 100644 --- a/launcher/minecraft/auth/AccountList.h +++ b/launcher/minecraft/auth/AccountList.h @@ -42,11 +42,13 @@ public: ProfileNameColumn, MigrationColumn, TypeColumn, + StatusColumn, NUM_COLUMNS }; explicit AccountList(QObject *parent = 0); + virtual ~AccountList() noexcept; const MinecraftAccountPtr at(int i) const; int count() const; @@ -63,6 +65,7 @@ public: void removeAccount(QModelIndex index); int findAccountByProfileId(const QString &profileId) const; MinecraftAccountPtr getAccountByProfileName(const QString &profileName) const; + QStringList profileNames() const; /*! * Sets the path to load/save the list file from/to. @@ -78,13 +81,14 @@ public: bool loadV3(QJsonObject &root); bool saveList(); - MinecraftAccountPtr activeAccount() const; - void setActiveAccount(MinecraftAccountPtr profileId); + MinecraftAccountPtr defaultAccount() const; + void setDefaultAccount(MinecraftAccountPtr profileId); bool anyAccountIsValid(); signals: void listChanged(); - void activeAccountChanged(); + void listActivityChanged(); + void defaultAccountChanged(); public slots: /** @@ -92,6 +96,11 @@ public slots: */ void accountChanged(); + /** + * This is called when a (refresh/login) task involving the account starts or ends + */ + void accountActivityChanged(bool active); + protected: /*! * Called whenever the list changes. @@ -101,13 +110,13 @@ protected: /*! * Called whenever the active account changes. - * Emits the activeAccountChanged() signal and autosaves the list if enabled. + * Emits the defaultAccountChanged() signal and autosaves the list if enabled. */ - void onActiveChanged(); + void onDefaultAccountChanged(); QList<MinecraftAccountPtr> m_accounts; - MinecraftAccountPtr m_activeAccount; + MinecraftAccountPtr m_defaultAccount; //! Path to the account list file. Empty string if there isn't one. QString m_listFilePath; diff --git a/launcher/minecraft/auth/AccountTask.cpp b/launcher/minecraft/auth/AccountTask.cpp index d400ce8d..25d753de 100644 --- a/launcher/minecraft/auth/AccountTask.cpp +++ b/launcher/minecraft/auth/AccountTask.cpp @@ -23,10 +23,6 @@ #include <QNetworkReply> #include <QByteArray> -#include <Env.h> - -#include <BuildConfig.h> - #include <QDebug> AccountTask::AccountTask(AccountData *data, QObject *parent) diff --git a/launcher/minecraft/auth/AuthSession.h b/launcher/minecraft/auth/AuthSession.h index f631a97d..55fbdf39 100644 --- a/launcher/minecraft/auth/AuthSession.h +++ b/launcher/minecraft/auth/AuthSession.h @@ -3,8 +3,10 @@ #include <QString> #include <QMultiMap> #include <memory> +#include "QObjectPtr.h" class MinecraftAccount; +class QNetworkAccessManager; struct AuthSession { @@ -41,7 +43,6 @@ struct AuthSession bool auth_server_online = false; // Did the user request online mode? bool wants_online = true; - std::shared_ptr<MinecraftAccount> m_accountPtr; }; typedef std::shared_ptr<AuthSession> AuthSessionPtr; diff --git a/launcher/minecraft/auth/MinecraftAccount.cpp b/launcher/minecraft/auth/MinecraftAccount.cpp index 8e294443..5cfec49d 100644 --- a/launcher/minecraft/auth/MinecraftAccount.cpp +++ b/launcher/minecraft/auth/MinecraftAccount.cpp @@ -28,11 +28,11 @@ #include <QDebug> #include <QPainter> -#include <minecraft/auth/flows/MSASilent.h> -#include <minecraft/auth/flows/MSAInteractive.h> +#include "flows/MSASilent.h" +#include "flows/MSAInteractive.h" -#include <minecraft/auth/flows/MojangRefresh.h> -#include <minecraft/auth/flows/MojangLogin.h> +#include "flows/MojangRefresh.h" +#include "flows/MojangLogin.h" MinecraftAccountPtr MinecraftAccount::loadFromJsonV2(const QJsonObject& json) { MinecraftAccountPtr account(new MinecraftAccount()); @@ -104,7 +104,7 @@ QPixmap MinecraftAccount::getFace() const { } -std::shared_ptr<AccountTask> MinecraftAccount::login(AuthSessionPtr session, QString password) +shared_qobject_ptr<AccountTask> MinecraftAccount::login(AuthSessionPtr session, QString password) { Q_ASSERT(m_currentTask.get() == nullptr); @@ -140,11 +140,12 @@ std::shared_ptr<AccountTask> MinecraftAccount::login(AuthSessionPtr session, QSt connect(m_currentTask.get(), SIGNAL(succeeded()), SLOT(authSucceeded())); connect(m_currentTask.get(), SIGNAL(failed(QString)), SLOT(authFailed(QString))); + emit activityChanged(true); } return m_currentTask; } -std::shared_ptr<AccountTask> MinecraftAccount::loginMSA(AuthSessionPtr session) { +shared_qobject_ptr<AccountTask> MinecraftAccount::loginMSA(AuthSessionPtr session) { Q_ASSERT(m_currentTask.get() == nullptr); if(accountStatus() == Verified && !session->wants_online) @@ -161,11 +162,12 @@ std::shared_ptr<AccountTask> MinecraftAccount::loginMSA(AuthSessionPtr session) connect(m_currentTask.get(), SIGNAL(succeeded()), SLOT(authSucceeded())); connect(m_currentTask.get(), SIGNAL(failed(QString)), SLOT(authFailed(QString))); + emit activityChanged(true); } return m_currentTask; } -std::shared_ptr<AccountTask> MinecraftAccount::refresh(AuthSessionPtr session) { +shared_qobject_ptr<AccountTask> MinecraftAccount::refresh(AuthSessionPtr session) { Q_ASSERT(m_currentTask.get() == nullptr); // take care of the true offline status @@ -203,6 +205,7 @@ std::shared_ptr<AccountTask> MinecraftAccount::refresh(AuthSessionPtr session) { connect(m_currentTask.get(), SIGNAL(succeeded()), SLOT(authSucceeded())); connect(m_currentTask.get(), SIGNAL(failed(QString)), SLOT(authFailed(QString))); + emit activityChanged(true); } return m_currentTask; } @@ -233,6 +236,7 @@ void MinecraftAccount::authSucceeded() } m_currentTask.reset(); emit changed(); + emit activityChanged(false); } void MinecraftAccount::authFailed(QString reason) @@ -297,6 +301,45 @@ void MinecraftAccount::authFailed(QString reason) } } m_currentTask.reset(); + emit activityChanged(false); +} + +bool MinecraftAccount::isActive() const { + return m_currentTask; +} + +bool MinecraftAccount::shouldRefresh() const { + /* + * Never refresh accounts that are being used by the game, it breaks the game session. + * Always refresh accounts that have not been refreshed yet during this session. + * Don't refresh broken accounts. + * Refresh accounts that would expire in the next 12 hours (fresh token validity is 24 hours). + */ + if(isInUse()) { + return false; + } + switch(data.validity_) { + case Katabasis::Validity::Certain: { + break; + } + case Katabasis::Validity::None: { + return false; + } + case Katabasis::Validity::Assumed: { + return true; + } + } + auto now = QDateTime::currentDateTimeUtc(); + auto issuedTimestamp = data.yggdrasilToken.issueInstant; + auto expiresTimestamp = data.yggdrasilToken.notAfter; + + if(!expiresTimestamp.isValid()) { + expiresTimestamp = issuedTimestamp.addSecs(24 * 3600); + } + if (now.secsTo(expiresTimestamp) < 12 * 3600) { + return true; + } + return false; } void MinecraftAccount::fillSession(AuthSessionPtr session) @@ -322,7 +365,6 @@ void MinecraftAccount::fillSession(AuthSessionPtr session) { session->session = "-"; } - session->m_accountPtr = shared_from_this(); } void MinecraftAccount::decrementUses() diff --git a/launcher/minecraft/auth/MinecraftAccount.h b/launcher/minecraft/auth/MinecraftAccount.h index 5b0c1ec7..928d3742 100644 --- a/launcher/minecraft/auth/MinecraftAccount.h +++ b/launcher/minecraft/auth/MinecraftAccount.h @@ -27,12 +27,13 @@ #include "AuthSession.h" #include "Usable.h" #include "AccountData.h" +#include "QObjectPtr.h" class Task; class AccountTask; class MinecraftAccount; -typedef std::shared_ptr<MinecraftAccount> MinecraftAccountPtr; +typedef shared_qobject_ptr<MinecraftAccount> MinecraftAccountPtr; Q_DECLARE_METATYPE(MinecraftAccountPtr) /** @@ -63,8 +64,7 @@ enum AccountStatus */ class MinecraftAccount : public QObject, - public Usable, - public std::enable_shared_from_this<MinecraftAccount> + public Usable { Q_OBJECT public: /* construction */ @@ -90,11 +90,11 @@ public: /* manipulation */ * Attempt to login. Empty password means we use the token. * If the attempt fails because we already are performing some task, it returns false. */ - std::shared_ptr<AccountTask> login(AuthSessionPtr session, QString password = QString()); + shared_qobject_ptr<AccountTask> login(AuthSessionPtr session, QString password); - std::shared_ptr<AccountTask> loginMSA(AuthSessionPtr session); + shared_qobject_ptr<AccountTask> loginMSA(AuthSessionPtr session); - std::shared_ptr<AccountTask> refresh(AuthSessionPtr session); + shared_qobject_ptr<AccountTask> refresh(AuthSessionPtr session); public: /* queries */ QString accountDisplayString() const { @@ -117,6 +117,8 @@ public: /* queries */ return data.profileName(); } + bool isActiv |
