Skip to content

Commit

Permalink
Fix partial virtual overrides in mythgame settings ui usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-kristjansson committed Sep 11, 2012
1 parent a825dee commit 6c43f0c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mythplugins/mythgame/mythgame/gamesettings.cpp
Expand Up @@ -333,9 +333,9 @@ MythGamePlayerEditor::MythGamePlayerEditor() : listbox(new ListBoxSetting(this))
addChild(listbox);
}

DialogCode MythGamePlayerEditor::exec(void)
DialogCode MythGamePlayerEditor::exec(bool saveOnExec, bool doLoad)
{
while (ConfigurationDialog::exec() == kDialogCodeAccepted)
while (ConfigurationDialog::exec(saveOnExec, doLoad) == kDialogCodeAccepted)
edit();

return kDialogCodeRejected;
Expand Down
7 changes: 5 additions & 2 deletions mythplugins/mythgame/mythgame/gamesettings.h
Expand Up @@ -86,7 +86,9 @@ class MythGamePlayerSettings : public QObject, public ConfigurationWizard
{
if (name)
ConfigurationWizard::Save();
};
}

virtual void Save(QString /*destination*/) { }

private:
class ID : public AutoIncrementDBSetting
Expand Down Expand Up @@ -128,10 +130,11 @@ class MPUBLIC MythGamePlayerEditor : public QObject, public ConfigurationDialog
virtual MythDialog *dialogWidget(MythMainWindow *parent,
const char *widgetName=0);

virtual DialogCode exec(void);
virtual DialogCode exec(bool saveOnExec = true, bool doLoad = true);

virtual void Load(void);
virtual void Save(void) { }
virtual void Save(QString /*destination*/) { }

public slots:
void menu();
Expand Down

0 comments on commit 6c43f0c

Please sign in to comment.