Beispiel #1
0
bool VerifyServiceTask::checkFiles()
{
	if (HasAnyFlags(m_uiOldStatus, UserCore::Item::ItemInfoI::STATUS_DOWNLOADING))
	{
		gcString path;

		if (checkMcfDownload(path))
			finishVerify(UserCore::Misc::VerifyComplete::V_DOWNLOAD, path.c_str());
		else
			finishVerify(UserCore::Misc::VerifyComplete::V_DOWNLOAD);

		return false;
	}
	else if (HasAnyFlags(m_uiOldStatus, (UserCore::Item::ItemInfoI::STATUS_INSTALLED|UserCore::Item::ItemInfoI::STATUS_INSTALLING)))
	{
		m_hMcf->getProgEvent() += delegate(this, &VerifyServiceTask::onProgress);
		m_hMcf->getErrorEvent() += delegate(this, &VerifyServiceTask::onError);

		bool completeMcf = false;

		if (m_McfBuild == 0)
			m_McfBuild = getItemInfo()->getInstalledBuild();

		setTier(VERIFYMCF);

		if (!checkMcf(completeMcf))
			return false;

		setTier(VERIFYINSTALL);

		if (!checkInstall(completeMcf))
			return false;

		setTier(DOWNLOADMISSINGFILES);

		if (completeMcf == false && !downloadMissingFiles())
			return false;

		setTier(INSTALLMISSINGFILES);

		if (!installMissingFiles())
			return false;
	}
	else
	{
		getItemInfo()->delSFlag(UserCore::Item::ItemInfoI::STATUS_READY);
		finishVerify(UserCore::Misc::VerifyComplete::V_RESET);
		return false;
	}

	return true;
}
Beispiel #2
0
void TrainerMenu::setTiers(const QStringList &tiers) {
    QCompleter *m_completer = new QCompleter(tiers);
    m_completer->setCaseSensitivity(Qt::CaseInsensitive);
    m_completer->setCompletionMode(QCompleter::PopupCompletion);
    ui->teamTier->setCompleter(m_completer);

    connect(m_completer, SIGNAL(highlighted(QString)), this, SLOT(setTier(QString)));
}
TierRatingButton::TierRatingButton(const QString &tier, int rating)
    : ui(new Ui::TierRatingButton)
{
    ui->setupUi(this);

    setTier(tier);
    setRating(rating);
}