From ad3e9f5690fae709a724def7717ad87732cbf7f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Ker=C3=A4nen?= Date: Sun, 27 Mar 2016 16:25:39 +0300 Subject: [PATCH] libdoomsday|GameProfiles: Save the "userCreated" property of profiles --- doomsday/apps/libdoomsday/src/gameprofiles.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/doomsday/apps/libdoomsday/src/gameprofiles.cpp b/doomsday/apps/libdoomsday/src/gameprofiles.cpp index 333f037f29..6f966b1f13 100644 --- a/doomsday/apps/libdoomsday/src/gameprofiles.cpp +++ b/doomsday/apps/libdoomsday/src/gameprofiles.cpp @@ -26,8 +26,9 @@ using namespace de; -static String const VAR_GAME ("game"); -static String const VAR_PACKAGES("packages"); +static String const VAR_GAME ("game"); +static String const VAR_PACKAGES ("packages"); +static String const VAR_USER_CREATED("userCreated"); DENG2_PIMPL(GameProfiles) , DENG2_OBSERVES(Games, Addition) @@ -86,6 +87,8 @@ Profiles::AbstractProfile *GameProfiles::profileFromInfoBlock(Info::BlockElement prof->setPackages(ids); } + prof->setUserCreated(!block.keyValue(VAR_USER_CREATED).text.compareWithoutCase("True")); + return prof.release(); } @@ -148,7 +151,8 @@ String GameProfiles::Profile::toInfoSource() const os.setCodec("UTF-8"); os << VAR_GAME << ": " << d->gameId << "\n" - << VAR_PACKAGES << " <" << String::join(d->packages, ", ") << ">"; + << VAR_PACKAGES << " <" << String::join(d->packages, ", ") << ">\n" + << VAR_USER_CREATED << ": " << (d->userCreated? "True" : "False"); return info; }