From e29ef32ec02e01d51065962e0b0f88c70121b3de Mon Sep 17 00:00:00 2001 From: kh1 Date: Tue, 26 Mar 2013 13:10:09 +0100 Subject: Add strict and relaxed parsing to Settings class. * StrictParseMode -> creating binaries and repositories * RelaxedParseMode -> running the installer/updater itself Introduced parse modes to be able to use old settings (existing ones on user systems) with new binaries. Add and adjust autotest. Change-Id: I3f7c7357325661a1197400d8d8dc2a5ca8bed184 Reviewed-by: Karsten Heimrich --- src/libs/installer/settings.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/libs/installer/settings.h') diff --git a/src/libs/installer/settings.h b/src/libs/installer/settings.h index 8ffbfc004..fcea7cb55 100644 --- a/src/libs/installer/settings.h +++ b/src/libs/installer/settings.h @@ -74,13 +74,19 @@ public: UserDefinedProxy }; + enum ParseMode { + StrictParseMode, + RelaxedParseMode + }; + explicit Settings(); ~Settings(); Settings(const Settings &other); Settings &operator=(const Settings &other); - static Settings fromFileAndPrefix(const QString &path, const QString &prefix); + static Settings fromFileAndPrefix(const QString &path, const QString &prefix, + ParseMode parseMode = StrictParseMode); QString logo() const; QString title() const; -- cgit v1.2.3