| Summary: | QFileDialog don't work if application name contains '/' sign | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Tomasz Meresiński <tomasz.meresinski> |
| Component: | general | Assignee: | David Faure <faure> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | kdelibs-bugs-null |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | http://commits.kde.org/kio/7ce16af2953df10cc191310b2f178967c7b52a93 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
I can fix this, but I think a lot of other code paths in Qt would break with a '/' in the application name, since it's very often used as a folder name (including within QStandardPaths etc.)... Git commit 7ce16af2953df10cc191310b2f178967c7b52a93 by David Faure. Committed on 05/03/2016 at 09:54. Pushed by dfaure into branch 'master'. Fix KIO app-slave connection breaking if appName contains a '/'. + improved error handling when KIO can't set up the socket for app-slave communication. (no point in launching a kioslave with an empty socket as argument, which will then assert with a confusing message about unknown protocol "") M +1 -0 autotests/jobtest.cpp M +1 -0 autotests/kiotesthelper.h M +3 -1 src/core/connectionbackend.cpp M +6 -0 src/core/slave.cpp M +1 -0 src/core/slavebase.cpp http://commits.kde.org/kio/7ce16af2953df10cc191310b2f178967c7b52a93 |
When application has application name containing '/' (for example "dir/subdir") QFileDialog won't work with error "KIO Connection server not listening, could not connect". Reproducible: Always Example code: #include <QApplication> #include <QFileDialog> int main(int argc, char *argv[]) { QApplication app(argc, argv); app.setApplicationName("Dir/Subdir"); QFileDialog::getOpenFileName(); } Most probable explanation: In strace I can see log: "open("/run/user/1000/Dir/SubdirXM5962.2.slave-socket", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = -1 ENOENT (No such file or directory)" so KIO (or something else) doesn't create necessary directory.