mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 09:33:25 -08:00
[Tutorial] Fix review blockers: null VDS guard, overlay QPointer, bounded fill, upgrade seeding
This commit is contained in:
parent
5c024c6338
commit
86f6098d43
6 changed files with 32 additions and 5 deletions
|
|
@ -5,6 +5,8 @@
|
|||
#include "libcockatrice/utility/playmat_params.h"
|
||||
|
||||
#include <QChar>
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
#include <QList>
|
||||
#include <QVariant>
|
||||
#include <QtGlobal>
|
||||
|
|
@ -248,6 +250,14 @@ QStringList InterfaceSettings::getUserListExpandedSections() const
|
|||
|
||||
bool InterfaceSettings::getTutorialCompleted() const
|
||||
{
|
||||
// Upgrading users have settings files but no tutorial key yet: treat the tutorial as seen so they are
|
||||
// not overlaid on upgrade. Genuinely new installs have no settings files at all, so they still get it.
|
||||
if (!getSettings().contains("interface/tutorialCompleted")) {
|
||||
QDir settingsDir = QFileInfo(settingPath).dir();
|
||||
if (!settingsDir.entryList({"*.ini"}, QDir::Files).isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return getValue("tutorialCompleted", QString(), QString(), false).toBool();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue