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

crash when loading a lot of photos #89

Closed
Kicer86 opened this issue Dec 19, 2014 · 2 comments
Closed

crash when loading a lot of photos #89

Kicer86 opened this issue Dec 19, 2014 · 2 comments
Assignees
Labels

Comments

@Kicer86
Copy link
Owner

Kicer86 commented Dec 19, 2014

When nodes are expanded and huge directory is added - PhotoBroom crashes at some point

@Kicer86 Kicer86 added the bug label Dec 19, 2014
@Kicer86 Kicer86 added this to the version 1.0 requirements milestone Dec 19, 2014
@Kicer86 Kicer86 self-assigned this Dec 20, 2014
@Kicer86
Copy link
Owner Author

Kicer86 commented Dec 25, 2014

The problem is with Qt's view model architecture:
it is not easy to create reliable link between view's and model's item (http://qt-project.org/forums/viewthread/51259/).

Ideas for fixing it:

  • using QPersistentModelIndex. drawbacks: It looks that each model change will case update of all QPersistenModelIndex objects.
  • introduce own model - view architecture. Model can inherit from QAbstractItemModel, but will have to introduce two funcitons: IndexFromId and IdFromIndex where Index would be QModelIndex and Id some uniq id of item (pointer for example). Such approch would allow model to be used by default views, but the ImagesTreeView used in PhotoBrooum would have to introduce brand new view class (not inheriting from QAbstractItemView)

Kicer86 added a commit that referenced this issue Dec 27, 2014
…n ModelIndexInfo (potential fix for issue #89)

It may happend to QModelIndex to be invalid when stored outside of Model
@Kicer86
Copy link
Owner Author

Kicer86 commented Dec 27, 2014

Approach no 1 used.

@Kicer86 Kicer86 closed this as completed Dec 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant