/* * This file is part of smolbote. It's copyrighted by the contributors recorded * in the version control history of the file, available from its original * location: git://neueland.iserlohn-fortress.net/smolbote.git * * SPDX-License-Identifier: GPL-3.0 */ #include #include "settings/configuration.h" #include int main(int argc, char** argv) { Configuration *settings = new Configuration(); // Use QFile so we can easily access qrc: QFile defaultCfg(":/poi.cfg"); defaultCfg.open(QIODevice::ReadOnly); std::cout << "UserCfg: " << (settings->readUserConfiguration("file.cfg") ? "true" : "false") << std::endl; std::cout << "DefaultCfg: " << (settings->readDefaultConfiguration(defaultCfg.readAll().toStdString()) ? "true" : "false") << std::endl; std::cout << "test = " << settings->value("test").value_or("unknown") << std::endl; return 0; }