Clean up connection code
This commit is contained in:
@@ -8,6 +8,8 @@ using json = nlohmann::json;
|
||||
|
||||
RPC::RPC(MainWindow* main) {
|
||||
auto cl = new ConnectionLoader(main, this);
|
||||
|
||||
// Show a default no connection message until we can connect.
|
||||
cl->loadConnection();
|
||||
|
||||
this->main = main;
|
||||
@@ -72,6 +74,8 @@ void RPC::setConnection(Connection* c) {
|
||||
delete conn;
|
||||
this->conn = c;
|
||||
|
||||
ui->statusBar->showMessage("Ready!");
|
||||
|
||||
refreshZECPrice();
|
||||
refresh();
|
||||
}
|
||||
@@ -495,6 +499,7 @@ void RPC::getInfoThenRefresh(bool force) {
|
||||
ui->solrate->setText(QString::number(solrate) % " Sol/s");
|
||||
});
|
||||
} else {
|
||||
qDebug() << "removing tab!";
|
||||
ui->tabWidget->removeTab(4);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user