MCPcopy Create free account
hub / github.com/dail8859/NotepadNext / checkForUpdates

Method checkForUpdates

src/dialogs/MainWindow.cpp:2076–2096  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2074}
2075
2076void MainWindow::checkForUpdates(bool silent)
2077{
2078#ifdef Q_OS_WIN
2079 qInfo(Q_FUNC_INFO);
2080
2081 QString url = "https://github.com/dail8859/NotepadNext/raw/master/updates.json";
2082 QSimpleUpdater::getInstance()->checkForUpdates(url);
2083
2084 if (!silent) {
2085 connect(QSimpleUpdater::getInstance(), &QSimpleUpdater::checkingFinished, this, &MainWindow::checkForUpdatesFinished, Qt::UniqueConnection);
2086 }
2087 else {
2088 disconnect(QSimpleUpdater::getInstance(), &QSimpleUpdater::checkingFinished, this, &MainWindow::checkForUpdatesFinished);
2089 }
2090
2091
2092 app->getSettings()->setValue("App/LastUpdateCheck", QDateTime::currentDateTime());
2093#else
2094 Q_UNUSED(silent);
2095#endif
2096}
2097
2098void MainWindow::checkForUpdatesFinished(QString url)
2099{

Callers

nothing calls this directly

Calls 1

getSettingsMethod · 0.80

Tested by

no test coverage detected