| 
						
						
							
								
							
						
						
					 | 
					@ -22,7 +22,8 @@ SettingsUiBuilder::SettingsUiBuilder(QObject *parent) : | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						_sectionFilterModel(new MultiFilterProxyModel(this)), | 
					 | 
					 | 
						_sectionFilterModel(new MultiFilterProxyModel(this)), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						_sectionModel(new SettingsSectionModel(this)), | 
					 | 
					 | 
						_sectionModel(new SettingsSectionModel(this)), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						_entryFilterModel(new MultiFilterProxyModel(this)), | 
					 | 
					 | 
						_entryFilterModel(new MultiFilterProxyModel(this)), | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
						_entryModel(new SettingsEntryModel(this)) | 
					 | 
					 | 
						_entryModel(new SettingsEntryModel(this)), | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						_currentSetup() | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					{ | 
					 | 
					 | 
					{ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						_sectionFilterModel->setSourceModel(_sectionModel); | 
					 | 
					 | 
						_sectionFilterModel->setSourceModel(_sectionModel); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						_sectionFilterModel->addFilterRoles(SettingsSectionModel::FilterRoles); | 
					 | 
					 | 
						_sectionFilterModel->addFilterRoles(SettingsSectionModel::FilterRoles); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -82,6 +83,14 @@ void SettingsUiBuilder::restoreDefaults() | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						connect(result, &MessageResult::dialogDone, this, [this](MessageConfig::StandardButton btn) { | 
					 | 
					 | 
						connect(result, &MessageResult::dialogDone, this, [this](MessageConfig::StandardButton btn) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							if(btn != MessageConfig::Yes) | 
					 | 
					 | 
							if(btn != MessageConfig::Yes) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								return; | 
					 | 
					 | 
								return; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							for(auto category : qAsConst(_currentSetup.categories)) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								for(auto section : category.sections) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
									for(auto group : section.groups) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
										for(auto entry : group.entries) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
											_viewModel->resetValue(entry.key); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
									} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							emit closeSettings(); | 
					 | 
					 | 
							emit closeSettings(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						}, Qt::QueuedConnection); | 
					 | 
					 | 
						}, Qt::QueuedConnection); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					} | 
					 | 
					 | 
					} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -107,19 +116,19 @@ void SettingsUiBuilder::startBuildUi() | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						if(!_buildView || !_viewModel) | 
					 | 
					 | 
						if(!_buildView || !_viewModel) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							return; | 
					 | 
					 | 
							return; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
						auto setup = _viewModel->loadSetup(QStringLiteral("quick")); | 
					 | 
					 | 
						_currentSetup = _viewModel->loadSetup(QStringLiteral("quick")); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						//search/restore properties
 | 
					 | 
					 | 
						//search/restore properties
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
						_allowSearch = setup.allowSearch; | 
					 | 
					 | 
						_allowSearch = _currentSetup.allowSearch; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
						emit allowSearchChanged(_allowSearch); | 
					 | 
					 | 
						emit allowSearchChanged(_allowSearch); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
						_allowRestore = setup.allowRestore; | 
					 | 
					 | 
						_allowRestore = _currentSetup.allowRestore; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
						emit allowRestoreChanged(_allowRestore); | 
					 | 
					 | 
						emit allowRestoreChanged(_allowRestore); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
						if(setup.categories.size() == 1 && | 
					 | 
					 | 
						if(_currentSetup.categories.size() == 1 && | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
						   setup.categories.first().sections.size() == 1) | 
					 | 
					 | 
						   _currentSetup.categories.first().sections.size() == 1) | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
							loadSection(setup.categories.first().sections.first()); | 
					 | 
					 | 
							loadSection(_currentSetup.categories.first().sections.first()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
						else { | 
					 | 
					 | 
						else { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
							_sectionModel->setup(setup); | 
					 | 
					 | 
							_sectionModel->setup(_currentSetup); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
							emit presentOverview(_sectionFilterModel, _sectionModel->hasSections()); | 
					 | 
					 | 
							emit presentOverview(_sectionFilterModel, _sectionModel->hasSections()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						} | 
					 | 
					 | 
						} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					} | 
					 | 
					 | 
					} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					
  |