mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-02 19:36:57 +03:00
GH-2053 basics of the servers.dat management
This commit is contained in:
parent
6284f070c1
commit
72ff342d63
11 changed files with 1064 additions and 4 deletions
|
|
@ -218,10 +218,9 @@ void PageContainer::currentChanged(const QModelIndex ¤t)
|
|||
|
||||
bool PageContainer::prepareToClose()
|
||||
{
|
||||
for (auto page : m_model->pages())
|
||||
if(!saveAll())
|
||||
{
|
||||
if (!page->apply())
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
if (m_currentPage)
|
||||
{
|
||||
|
|
@ -229,3 +228,13 @@ bool PageContainer::prepareToClose()
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PageContainer::saveAll()
|
||||
{
|
||||
for (auto page : m_model->pages())
|
||||
{
|
||||
if (!page->apply())
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ public:
|
|||
* @return true if everything can be saved, false if there is something that requires attention
|
||||
*/
|
||||
bool prepareToClose();
|
||||
bool saveAll();
|
||||
|
||||
/* request close - used by individual pages */
|
||||
bool requestClose() override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue