Earlier if the user use to invoke filelight with invalid folder name or access rights,
filelight used to throw an information box, upon whose exit, the filelight main window was still displayed.
This patch removes the main window opening if the intended URL can not be opened for some reason or the another.
Details
filelight /path/to/invalid/url
Main window not displayed
Diff Detail
- Repository
- R352 Filelight
- Branch
- close
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 25497 Build 25515: arc lint + arc unit
The user unknowingly misspells while providing the url resulting in an information box being displayed. It makes no sense to me why Filelight would still open up. (Instead the user would invoke with the correct url later on). Does this makes sense to you?@ngraham
I'm a bit thorn, because I like this but it's different from what more or less all other applications do.
@ngraham Now I am a bit on both sides, I will leave it on @sandsmark for the final decision.
If filelight is launched with a path I'm fairly certain it's quicker for the user to just correct the path rather than navigating the open dialog, so go ahead. (I'm almost tempted to just print a warning on the command line).
But this will close the window no matter how the file is opened? Closing the window if the user just selected the wrong path in the open dialog is not good, better to just do it "closer" to where the error happens (I'd suggest nuking the MainWindow::scan(), making MainWindow::slotScanUrl() public, and then call that and quit from main.cpp if that returns false).