diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-05-04 20:29:33 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-05-04 20:29:33 +0300 |
commit | 9fbec3793f02f6bb3e692f98f2d86cad12c52190 (patch) | |
tree | 9f375cbb5e46020f172fd01acd92988fe17655bc /launcher/settings/INIFile.h | |
parent | b2ecb9ac09573d13c6edf8f6ea0924c1f7006b4b (diff) | |
parent | 64ba5e4ed1456bed159cfe7b41ed9175b8baf5c4 (diff) | |
download | PrismLauncher-9fbec3793f02f6bb3e692f98f2d86cad12c52190.tar.gz PrismLauncher-9fbec3793f02f6bb3e692f98f2d86cad12c52190.tar.bz2 PrismLauncher-9fbec3793f02f6bb3e692f98f2d86cad12c52190.zip |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into develop
Diffstat (limited to 'launcher/settings/INIFile.h')
-rw-r--r-- | launcher/settings/INIFile.h | 47 |
1 files changed, 34 insertions, 13 deletions
diff --git a/launcher/settings/INIFile.h b/launcher/settings/INIFile.h index 4313e829..0d5c05eb 100644 --- a/launcher/settings/INIFile.h +++ b/launcher/settings/INIFile.h @@ -1,16 +1,37 @@ -/* Copyright 2013-2021 MultiMC Contributors +// SPDX-License-Identifier: GPL-3.0-only +/* + * Prism Launcher - Minecraft Launcher + * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net> + * Copyright (C) 2023 flowln <flowlnlnln@gmail.com> * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 3. * - * http://www.apache.org/licenses/LICENSE-2.0 + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + * + * This file incorporates work covered by the following copyright and + * permission notice: + * + * Copyright 2013-2021 MultiMC Contributors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #pragma once @@ -19,18 +40,18 @@ #include <QVariant> #include <QIODevice> +#include <QJsonDocument> +#include <QJsonArray> + // Sectionless INI parser (for instance config files) class INIFile : public QMap<QString, QVariant> { public: explicit INIFile(); - bool loadFile(QByteArray file); bool loadFile(QString fileName); bool saveFile(QString fileName); QVariant get(QString key, QVariant def) const; void set(QString key, QVariant val); - static QString unescape(QString orig); - static QString escape(QString orig); }; |