forked from qt-creator/qt-creator
Axivion: Fix settings handling
Do not apply settings automatically. Additionally guard against the crash mentioned inside the bugreport. Fixes: QTCREATORBUG-32078 Change-Id: Id8de16171a070672fa18b72eebfef46669874788 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -767,11 +767,17 @@ IssueListSearch IssuesWidget::searchFromUi() const
|
|||||||
{
|
{
|
||||||
IssueListSearch search;
|
IssueListSearch search;
|
||||||
QTC_ASSERT(m_currentTableInfo, return search);
|
QTC_ASSERT(m_currentTableInfo, return search);
|
||||||
|
const int userIndex = m_ownerFilter->currentIndex();
|
||||||
|
QTC_ASSERT(userIndex >= 0 && m_userNames.size() > userIndex, return search);
|
||||||
|
const int versionStartIndex = m_versionStart->currentIndex();
|
||||||
|
QTC_ASSERT(versionStartIndex >= 0 && m_versionDates.size() > versionStartIndex, return search);
|
||||||
|
const int versionEndIndex = m_versionEnd->currentIndex();
|
||||||
|
QTC_ASSERT(versionEndIndex >= 0 && m_versionDates.size() > versionEndIndex, return search);
|
||||||
search.kind = m_currentPrefix; // not really ui.. but anyhow
|
search.kind = m_currentPrefix; // not really ui.. but anyhow
|
||||||
search.owner = m_userNames.at(m_ownerFilter->currentIndex());
|
search.owner = m_userNames.at(userIndex);
|
||||||
search.filter_path = m_pathGlobFilter->text();
|
search.filter_path = m_pathGlobFilter->text();
|
||||||
search.versionStart = m_versionDates.at(m_versionStart->currentIndex());
|
search.versionStart = m_versionDates.at(versionStartIndex);
|
||||||
search.versionEnd = m_versionDates.at(m_versionEnd->currentIndex());
|
search.versionEnd = m_versionDates.at(versionEndIndex);
|
||||||
// different approach: checked means disabling in webview, checked here means explicitly request
|
// different approach: checked means disabling in webview, checked here means explicitly request
|
||||||
// the checked one, having both checked is impossible (having none checked means fetch both)
|
// the checked one, having both checked is impossible (having none checked means fetch both)
|
||||||
// reason for different approach: currently poor reflected inside the ui (TODO)
|
// reason for different approach: currently poor reflected inside the ui (TODO)
|
||||||
|
@@ -225,6 +225,7 @@ AxivionSettings &settings()
|
|||||||
AxivionSettings::AxivionSettings()
|
AxivionSettings::AxivionSettings()
|
||||||
{
|
{
|
||||||
setSettingsGroup("Axivion");
|
setSettingsGroup("Axivion");
|
||||||
|
setAutoApply(false);
|
||||||
|
|
||||||
highlightMarks.setSettingsKey("HighlightMarks");
|
highlightMarks.setSettingsKey("HighlightMarks");
|
||||||
highlightMarks.setLabelText(Tr::tr("Highlight marks"));
|
highlightMarks.setLabelText(Tr::tr("Highlight marks"));
|
||||||
@@ -490,6 +491,7 @@ void AxivionSettingsWidget::apply()
|
|||||||
: servers.at(m_dashboardServers->currentIndex()).id;
|
: servers.at(m_dashboardServers->currentIndex()).id;
|
||||||
if (settings().updateDashboardServers(servers, selected))
|
if (settings().updateDashboardServers(servers, selected))
|
||||||
settings().toSettings();
|
settings().toSettings();
|
||||||
|
settings().apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AxivionSettingsWidget::updateDashboardServers()
|
void AxivionSettingsWidget::updateDashboardServers()
|
||||||
|
Reference in New Issue
Block a user