MCPcopy Create free account
hub / github.com/cpvrlab/ImagePlay / CheckForUpdates

Method CheckForUpdates

_fervor/fvupdater.cpp:238–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236
237
238bool FvUpdater::CheckForUpdates(bool silentAsMuchAsItCouldGet)
239{
240 if (m_feedURL.isEmpty()) {
241 qCritical() << "Please set feed URL via setFeedURL() before calling CheckForUpdates().";
242 return false;
243 }
244
245 m_silentAsMuchAsItCouldGet = silentAsMuchAsItCouldGet;
246
247 // Check if application's organization name and domain are set, fail otherwise
248 // (nowhere to store QSettings to)
249 if (QApplication::organizationName().isEmpty()) {
250 qCritical() << "QApplication::organizationName is not set. Please do that.";
251 return false;
252 }
253 if (QApplication::organizationDomain().isEmpty()) {
254 qCritical() << "QApplication::organizationDomain is not set. Please do that.";
255 return false;
256 }
257
258 // Set application name / version is not set yet
259 if (QApplication::applicationName().isEmpty()) {
260 QString appName = QString::fromUtf8(FV_APP_NAME);
261 qWarning() << "QApplication::applicationName is not set, setting it to '" << appName << "'";
262 QApplication::setApplicationName(appName);
263 }
264 if (QApplication::applicationVersion().isEmpty()) {
265 QString appVersion = QString::fromUtf8(FV_APP_VERSION);
266 qWarning() << "QApplication::applicationVersion is not set, setting it to '" << appVersion << "'";
267 QApplication::setApplicationVersion(appVersion);
268 }
269
270 cancelDownloadFeed();
271 m_httpRequestAborted = false;
272 startDownloadFeed(m_feedURL);
273
274 return true;
275}
276
277bool FvUpdater::CheckForUpdatesSilent()
278{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected