Close main window after displaying the information about invalid URL
Needs RevisionPublic

Authored by shubham on Apr 20 2020, 8:02 AM.

Details

Reviewers
sandsmark
ngraham
Summary

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.

Test Plan

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
shubham created this revision.Apr 20 2020, 8:02 AM
Restricted Application added a subscriber: kde-utils-devel. · View Herald TranscriptApr 20 2020, 8:02 AM
shubham requested review of this revision.Apr 20 2020, 8:02 AM
shubham edited the test plan for this revision. (Show Details)Apr 20 2020, 8:02 AM
shubham edited the summary of this revision. (Show Details)

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.

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.

Because then the user could use filelight's main UI to enter the correct URL?

@ngraham Now I am a bit on both sides, I will leave it on @sandsmark for the final decision.

sandsmark requested changes to this revision.May 30 2020, 2:44 PM

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).

This revision now requires changes to proceed.May 30 2020, 2:44 PM