open_iA 2024.7
Loading...
Searching...
No Matches
Functions
iASettingsFileHelper.cpp File Reference
#include "iASettingsFileHelper.h"
#include <QFile>
#include <QTextStream>
#include <stdexcept>

Functions

QMap< QString, QString > readSettingsFile (QString const &fileName)
 Reads a file containing key-value pairs, separated by colon (:); with one pair per line, and optional end-line comments (everything after the first '' character in the line is ignored).
 

Function Documentation

◆ readSettingsFile()

QMap< QString, QString > readSettingsFile ( QString const & fileName)

Reads a file containing key-value pairs, separated by colon (:); with one pair per line, and optional end-line comments (everything after the first '' character in the line is ignored).

Keys and values are trimmed (i.e. leading and trailing whitespace is removed)

Parameters
fileNamethe name of the file to read
Returns
a map of key-value pairs