Bug 446721

Summary: Figuring out "The file or folder \"\" does not exist" popup
Product: [Frameworks and Libraries] frameworks-kio Reporter: RJVB <rjvbertin>
Component: Open/save dialogsAssignee: KIO Bugs <kio-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: task CC: kdelibs-bugs-null, nate
Priority: NOR    
Version First Reported In: 5.60.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description RJVB 2021-12-09 10:16:50 UTC
SUMMARY
I'm running a utility against 5.60.0 on a machine where I'm blocked on that KF5 version. Everything works fine, but I'm getting a spurious error popup telling me that "File or folder \"\" does not exist" whenever a custom save dialog is opened.

I know this is probably considered an ancient version, so I'd just like to get some suggestions helping me find the source of the problem, i.e. where the code tries to access a file without name. Or a link to the KIO ticket where this issue was fixed, if this is indeed a known problem in earlier KIO version(s).
I've tried setting a breakpoint on SlaveBase::error() which seemed like it should be the place where the corresponding error code is set, but that never got triggered.

As far as I have been able to determine:

STEPS TO REPRODUCE
1. Open the file save dialog with
```
FileDialog::FileDialog(QDialog *parent, Qt::WindowFlags flags)
    : QDialog(parent, flags)
    , m_fileWidget(new KFileWidget(QUrl(QStringLiteral("kfiledialog:///foo")), this))
{
    setLayout(new QVBoxLayout);
    layout()->addWidget(m_fileWidget);
```

OBSERVED RESULT
The aforementioned error message pops up; after clicking it away I get the expected file dialog without any signs of trouble.

EXPECTED RESULT
No popup

KDE Frameworks Version: 5.60.0
Qt Version: 5.9.8

ADDITIONAL INFORMATION
I introduce the `kfiledialog:///` QUrl, the original code passed an empty QUrl which seemed like it could be the source of the problem. It didn't make a difference.
Comment 1 Nate Graham 2021-12-09 19:23:30 UTC
Probably better expressed as a question on kde-devel, as that is indeed a very ancient version. :)