You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

27 lines
680 B

/*
SPDX-FileCopyrightText: 2003 Cornelius Schumacher <schumacher@kde.org>
SPDX-License-Identifier: MIT
*/
#include "test1.h"
#include <QGuiApplication>
#include <KConfig>
#include <KConfigGroup>
int main(int argc, char **argv)
{
QGuiApplication app(argc, argv);
Q_UNUSED(app);
{
KConfig initialConfig(QStringLiteral("examplerc"));
KConfigGroup group = initialConfig.group(QStringLiteral("MyOptions"));
group.writeEntry(QStringLiteral("MyString"), QStringLiteral("The String"));
}
Test1 *t = new Test1(QString(), QString());
bool ok = t->myString() == QLatin1String("The String");
delete t;
return ok ? 0 : 1;
}