Minor fixes when reporting T141

* user authenticated must be enabled/valid
* Read only: BlackMisc::CDataReadOnly<BlackCore::Data::TAuthenticatedDbUser>
* clear user fields when not authenticated
This commit is contained in:
Klaus Basan
2017-08-27 23:01:39 +02:00
committed by Mathew Sutcliffe
parent 2dfc56dc39
commit 0dfe6f69fe
7 changed files with 13 additions and 9 deletions

View File

@@ -155,6 +155,8 @@ namespace BlackGui
}
else
{
ui->le_Name->clear();
ui->te_Roles->clear();
this->setModeLogin(true);
}
}

View File

@@ -51,7 +51,7 @@ namespace BlackGui
private:
QScopedPointer<Ui::CDbLoginComponent> ui;
BlackCore::Db::CDatabaseAuthenticationService m_loginService {this}; //!< login service
BlackCore::Db::CDatabaseAuthenticationService m_loginService { this }; //!< login service
//! Overlay messages
void displayOverlayMessages(const BlackMisc::CStatusMessageList &msgs);

View File

@@ -135,9 +135,6 @@ namespace BlackGui
// vPilot
this->initVPilotLoading();
// user changes
m_swiftDbUser.setNotifySlot(&CDbMappingComponent::ps_userChanged);
}
CDbMappingComponent::~CDbMappingComponent()

View File

@@ -316,7 +316,7 @@ namespace BlackGui
QScopedPointer<CDbModelMappingModifyComponent> m_modelModifyDialog; //!< dialog when modifying models
BlackMisc::Simulation::FsCommon::CVPilotRulesReader m_vPilotReader; //!< read vPilot rules
BlackMisc::CDigestSignal m_dsStashedModelsChanged { this, &CDbMappingComponent::ps_digestStashedModelsChanged, &CDbMappingComponent::ps_onStashedModelsChangedDigest, 750, 25 };
BlackMisc::CData<BlackCore::Data::TAuthenticatedDbUser> m_swiftDbUser { this };
BlackMisc::CDataReadOnly<BlackCore::Data::TAuthenticatedDbUser> m_swiftDbUser { this, &CDbMappingComponent::ps_userChanged };
const bool vPilotSupport = true; //!< vPilot support (will be removed in future)
bool m_vPilot1stInit = true; //!< vPilot extensions initalized?
bool m_vPilotEnabled = false; //!< use vPilot extensions