MCPcopy Create free account
hub / github.com/Skycoder42/QtAutoUpdater / createInfos

Method createInfos

tests/auto/plugins/WebQueryTest/tst_webquery.cpp:103–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103QList<UpdateInfo> WebQueryTest::createInfos(const QVersionNumber &versionFrom, const QVersionNumber &versionTo)
104{
105 if (versionTo > versionFrom) {
106 if (_parser == QStringLiteral("version")) {
107 return {
108 {
109 QCoreApplication::applicationName(),
110 QGuiApplication::applicationDisplayName(),
111 versionTo
112 }
113 };
114 } else {
115 return {
116 {
117 QStringLiteral("test-update"),
118 QStringLiteral("test-update"),
119 versionTo,
120 {
121 {QStringLiteral("arguments"), QStringList {
122 QVariant{true}.toString(),
123 versionTo.toString()
124 }},
125 {QStringLiteral("eulas"), QVariantList {
126 QStringLiteral("EULA 1"),
127 QVariantMap {
128 {QStringLiteral("text"), QStringLiteral("EULA 2")},
129 {QStringLiteral("required"), true},
130 },
131 QVariantMap {
132 {QStringLiteral("text"), QStringLiteral("EULA 3")},
133 {QStringLiteral("required"), false},
134 }
135 }}
136 }
137 }
138 };
139 }
140 } else
141 return {};
142}
143
144bool WebQueryTest::simulateInstall(const QVersionNumber &version)
145{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected