Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SettingsScope fails to load project settings #38

Open
Shadowigor opened this issue Jul 4, 2017 · 0 comments
Open

SettingsScope fails to load project settings #38

Shadowigor opened this issue Jul 4, 2017 · 0 comments

Comments

@Shadowigor
Copy link
Member

Settings that are saved on a project level, cannot be loaded again.

How to reproduce

Run this code after the item got the proper parentScope() (e.g. in the parentScopeChanged() slot):

qDebug() << "Before: " << this->settingsScope()->parentScope()->allSettings().size();
this->settingsScope()->parentScope()->setValue("Test", "Something");
qDebug() << "After: " << this->settingsScope()->parentScope()->allSettings().size();

Expected Behavior

// Running the application for the first time
Before: 0
After: 1
// Save project, close application

// Running the application for the second time
Before: 1
After: 1

Current Behavior:

// Running the application for the first time
Before: 0
After: 1
// Save project, close application

// Running the application for the second time
Failed to load item from element tagged  "SettingsScope"
Before: 0
After: 1
Shadowigor pushed a commit to Shadowigor/itemframework that referenced this issue Dec 12, 2017
…pe of the project.

The problem was, that the AbstractProject searched for the SettingsScope tag one layer too high. It forgot that it has to enter the project tag first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant