-
Notifications
You must be signed in to change notification settings - Fork 688
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
Add a factory class for Directory objects. #6561
base: master
Are you sure you want to change the base?
Conversation
Consider this an RFC. This is a pattern that isn't really used anywhere else in the code base, as far as I can tell. An alternative would be to pass around a non-factory object (DirectoryManager?) that can be queried for this information when a Directory is created. |
9369eb6
to
41a446a
Compare
Also, if you're trying to stabilize a 1.4 release, this is probably 1.4.1. |
0538a7d
to
4e4036e
Compare
Renamed DirectoryFactory -> DirectoryManager to be more general. |
4e4036e
to
13731e0
Compare
13731e0
to
909cac3
Compare
909cac3
to
7a97c8a
Compare
Create a DirectorManager class that is owned by the Library or Device objects and provided to methods that need to create Directory objects. This will allow information to be provided through the Directory object. For example: - If the directory is on a removable device. - A mount point that may change on future uses. - Whether paths should be relative or absolute.
7a97c8a
to
03dae63
Compare
@@ -61,12 +62,12 @@ ConnectedDevice::ConnectedDevice(const QUrl& url, DeviceLister* lister, | |||
model_ = new LibraryModel(backend_, app_, this); | |||
} | |||
|
|||
ConnectedDevice::~ConnectedDevice() {} | |||
ConnectedDevice::~ConnectedDevice() { delete directory_manager_; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not to use the unique_ptr?
Create a DirectoryFactory class that is owned by the Library or Device objects
and provided to methods that need to create Directory objects. This will allow
information to be provided through the Directory object. For example: