ux: change application start
- make the wizard a widget in the mainwindow navstack
- remove findRingAccount, any account present should not invoke the
wizard
Change-Id: I5341d9060e17b74ac253619d70aad6d2d9a93874
Reviewed-by: Isa Nanic <isa.nanic@savoirfairelinux.com>
diff --git a/callwidget.cpp b/callwidget.cpp
index 859d4aa..48e63b5 100644
--- a/callwidget.cpp
+++ b/callwidget.cpp
@@ -108,8 +108,6 @@
ui->spinnerLabel->setMovie(miniSpinner_);
ui->spinnerLabel->hide();
- // set to welcome view
- ui->stackedWidget->setCurrentWidget(ui->welcomePage);
setupOutOfCallIM();
// connections
@@ -155,6 +153,9 @@
connect(&LRCInstance::behaviorController(), &BehaviorController::showChatView,
this, &CallWidget::slotShowChatView);
+
+ // set first view to welcome view
+ ui->stackedWidget->setCurrentWidget(ui->welcomePage);
}
CallWidget::~CallWidget()
@@ -320,36 +321,6 @@
Qt::KeepAspectRatio)));
}
-bool
-CallWidget::findRingAccount()
-{
- bool ringAccountFound = false;
- auto accountList = LRCInstance::accountModel().getAccountList();
- for (int i = 0; i < accountList.size(); ++i) {
- auto accountId = accountList.at(i);
- auto& accountInfo = LRCInstance::accountModel().getAccountInfo(accountId);
- if (accountInfo.profileInfo.type == lrc::api::profile::Type::RING) {
- ringAccountFound = true;
- if (accountInfo.status == lrc::api::account::Status::ERROR_NEED_MIGRATION) {
- WizardDialog dlg(WizardDialog::MIGRATION);
- dlg.exec();
- }
- }
- }
-
- if (!ringAccountFound) {
- WizardDialog wizardDialog;
- wizardDialog.exec();
- if (wizardDialog.result() != QDialog::Accepted) {
- return false;
- }
- }
-
- ui->currentAccountWidget->update();
-
- return true;
-}
-
void
CallWidget::on_smartList_clicked(const QModelIndex& index)
{