Added basic version check stub
This commit is contained in:
parent
7f187f4cf8
commit
82a0cdd0cf
@ -1116,7 +1116,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
|||||||
//splashTimer.setSingleShot (true);
|
//splashTimer.setSingleShot (true);
|
||||||
//splashTimer.start (20 * 1000);
|
//splashTimer.start (20 * 1000);
|
||||||
|
|
||||||
// TODO: jsherer - need to remove this eventually...
|
|
||||||
QTimer::singleShot (0, this, SLOT (checkStartupWarnings ()));
|
QTimer::singleShot (0, this, SLOT (checkStartupWarnings ()));
|
||||||
|
|
||||||
if(!ui->cbMenus->isChecked()) {
|
if(!ui->cbMenus->isChecked()) {
|
||||||
@ -1639,8 +1638,23 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
|||||||
if (!m_valid) throw std::runtime_error {"Fatal initialization exception"};
|
if (!m_valid) throw std::runtime_error {"Fatal initialization exception"};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::checkVersion(){
|
||||||
|
auto m = new QNetworkAccessManager(this);
|
||||||
|
connect(m, &QNetworkAccessManager::finished, this, [this](QNetworkReply * reply){
|
||||||
|
if(reply->error()) return;
|
||||||
|
|
||||||
|
QString content = reply->readAll();
|
||||||
|
qDebug() << "version" << content;
|
||||||
|
});
|
||||||
|
|
||||||
|
QUrl url("http://files.js8call.com/version.txt");
|
||||||
|
QNetworkRequest r(url);
|
||||||
|
m->get(r);
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::checkStartupWarnings ()
|
void MainWindow::checkStartupWarnings ()
|
||||||
{
|
{
|
||||||
|
checkVersion();
|
||||||
ensureCallsignSet(false);
|
ensureCallsignSet(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -413,6 +413,7 @@ private slots:
|
|||||||
void on_cbCQTx_toggled(bool b);
|
void on_cbCQTx_toggled(bool b);
|
||||||
void splash_done ();
|
void splash_done ();
|
||||||
void on_measure_check_box_stateChanged (int);
|
void on_measure_check_box_stateChanged (int);
|
||||||
|
void checkVersion();
|
||||||
void checkStartupWarnings ();
|
void checkStartupWarnings ();
|
||||||
void clearCallsignSelected();
|
void clearCallsignSelected();
|
||||||
void refreshTextDisplay();
|
void refreshTextDisplay();
|
||||||
|
Loading…
Reference in New Issue
Block a user