Skip to content
Commit 97fbbd47 authored by Harald Sitter's avatar Harald Sitter 🐧
Browse files

port to smart pointers

on errors.ubuntu.com and the window partner center there are odd crashes
on bad pointers that I can't quite place. as a short in the dark lets
use smart pointers instead of raw pointers to keep things alive as long
as they need to rather than as long as we think they need to. in
particular duplication was a bit dodgy there. that said, duplication is
why we need shared ptrs, otherwise we'd probably have gotten by with
unique_ptrs.

had the additional advantage of forcing me to revisit the qobject use in
file/folder, which is now gone since it is pointless (qml wouldn't know
what to do with shared_ptr) instead the single use  for it is now part
of the item itself, a bit questionable from an OOP POV but at the same
time it saves us the overhead of N qobjects.

all in all this should improve memory safety substantially.
parent c5c7d2c8
Pipeline #204986 passed with stage
in 2 minutes and 26 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment