mirror of
https://invent.kde.org/utilities/filelight
synced 2024-07-01 06:54:25 +00:00
explicitly construct QUrl for new (local) skipList entries
getExistingDirectory returns a string, which we implicitly constructed a QUrl from without using fromLocalFile() resulting in a QUrl that is isValid && !isEmpty, but when converted toLocalFile() it will be "" as it is !isLocal. To resolve this problem simply construct a QUrl::fromLocalFile explicitly to make sure that the resulting url is valid, !empty and local. Otherwise this will attempt to insert empty strings as paths, rendering the feature defunct. REVIEW: 126985
This commit is contained in:
parent
350e0043ef
commit
95c04b7ee4
|
@ -169,7 +169,8 @@ void SettingsDialog::toggleDontScanRemovableMedia(bool b)
|
|||
|
||||
void SettingsDialog::addFolder()
|
||||
{
|
||||
const QUrl url = QFileDialog::getExistingDirectory(this, i18n("Select path to ignore"), QDir::rootPath());
|
||||
const QString urlString = QFileDialog::getExistingDirectory(this, i18n("Select path to ignore"), QDir::rootPath());
|
||||
const QUrl url = QUrl::fromLocalFile(urlString);
|
||||
|
||||
//TODO error handling!
|
||||
//TODO wrong protocol handling!
|
||||
|
|
Loading…
Reference in New Issue
Block a user