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

Safety 3 #51

Merged
merged 3 commits into from
Nov 12, 2016
Merged

Safety 3 #51

merged 3 commits into from
Nov 12, 2016

Conversation

KubaO
Copy link
Contributor

@KubaO KubaO commented Nov 12, 2016

  1. Use QPointer to track playlistItem lifetime in viewStateHandler. This removes the need for the itemAboutToBeDeleted signal and the slot.

  2. Hold a few other members either by value or by owning smart pointers.

  3. Hold other weak QObject pointers using QPointer. A QPointer tracks the underlying object's lifetime and automatically resets itself to nullptr when the object is destroyed. This prevents dereferencing dangling pointers.

Please test the functionality related to Ctrl-1...8 view state saving. I'm not sure how it's supposed to work and don't want to miss anything important there.

@JensAc JensAc merged commit b7fcc98 into IENT:master Nov 12, 2016
@JensAc
Copy link
Member

JensAc commented Nov 12, 2016

Thank you very much for contributing. Seems stable on Arch Linux / Gnome , but after opening a yuv-file the window scales to a size which is larger than the screen size and maximizing is not possible. Please report whether that is also the case on windows or OS X.

@ChristianFeldmann
Copy link
Member

No I can't reproduce that on windows. This also sounds strange to me becuase I think I removed all the code that actively changes the size of the main window.

KubaO added a commit to KubaO/YUView that referenced this pull request Nov 13, 2016
This merges pull request IENT#51 from KubaO/safety-3

1. Hold playlistItem::propertiesWidget and playlistItemRawFile::video via smart pointer.

2. Hold viewStateHandler's weak QObject pointers in QPointers.

3. Hold other weak QObject pointers in QPointers.
@KubaO KubaO deleted the safety-3 branch November 14, 2016 16:13
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

Successfully merging this pull request may close these issues.

3 participants