Created attachment 102551 [details] sSmall test project that demonstrates the problem. Consider the attached test project that uses QFileDialog. It shows the following in the console: kf5.kio.core: Refilling KProtocolInfoFactory cache in the hope to find "" kf5.kio.core: Refilling KProtocolInfoFactory cache in the hope to find "" Invalid URL: QUrl("abcdefgh.edf") Invalid URL: QUrl("abcdefgh.edf") OS is openSuse Leap 42.2, plasmashell 5.8.3. Sidenote: First, my application crashed two times at the same point but now I can't reproduce it anymore. The output was the following: kf5.kio.core: Refilling KProtocolInfoFactory cache in the hope to find "" Invalid URL: QUrl("waveform.edf") Invalid URL: QUrl("waveform.edf") kf5.kio.core: Refilling KProtocolInfoFactory cache in the hope to find "" kf5.kio.core: Refilling KProtocolInfoFactory cache in the hope to find "" Segmentation fault (core dumped) Output of dmesg: dsremote[2565]: segfault at 7fbfadfd866c ip 00007fbfa19d6cdc sp 00007ffe832e6668 error 7 in libKF5Notifications.so.5.26.0[7fbfa19c1000+49000] Application was compiled with the default Qt5 libs coming from the openSuse repo. Recompiling the same code with Qt4.8.7 does not produce segfaults or any warnings. (Qt4 was compiled from source, downloaded from qt.io)
I reproduced this very annoying bug with Valentina https://bitbucket.org/dismine/valentina The code is String fileName = QFileDialog::getSaveFileName(this, tr("Print to pdf"), qApp->ValentinaSettings()->GetPathLayout()+"/"+FileName()+".pdf", tr("PDF file (*.pdf)")) I receive this message kf5.kio.core: Invalid URL: QUrl("...pdf") before the dialog open and each time I type something in the filename widget. The issue is not in Valentina and Qt, Your are doing something nasty with kf5. Monkey patching ??? Links to relevant issues: https://bitbucket.org/dismine/valentina/issues/613/invalid-url-warning-when-saving-file https://bugreports.qt.io/browse/QTBUG-56626
KF5 is Fedora 25 kf5-kio-core-libs-5.29.0-1.fc25.x86_64
Confirmed also with qpdfview "Save As".
I'm running into this issue with our product on Ubuntu 16.04 as well (KF5 5.18.0 and Qt 5.5.1), though we're only getting the "Invalid URL: QUrl("blahblah")" messages. Our QFileDialog is configured and shown as follows: QFileDialog *dialog = new QFileDialog(this, "Select CSV File Name"); dialog->setModal(true); dialog->setNameFilter("CSV Files (*.csv)"); dialog->setDirectory(QFileInfo(outputFileEdit->text()).dir()); dialog->setLabelText(QFileDialog::Accept, "OK"); dialog->setAttribute(Qt::WA_DeleteOnClose); dialog->setFileMode(QFileDialog::AnyFile); dialog->setAcceptMode(QFileDialog::AcceptSave); dialog->selectFile(outputFileEdit->text()); connect(dialog, &QFileDialog::fileSelected, outputFileEdit, &QLineEdit::setText); dialog->show(); Since we're initially targeting Ubuntu 16.04 exclusively with this product (and using the packaged versions of KF5 and Qt), does anyone know if there's a workaround to quench the messages?
Any news?
I can no longer reproduce with recent versions, so I guess it was fixed in the meantime.
Still present here: guv@cetriolo:/data/guv/c/KDE_bugs> ./test Invalid URL: QUrl("abcdefgh.edf") Invalid URL: QUrl("abcdefgh.edf") guv@cetriolo:/data/guv/c/KDE_bugs> plasmashell --version plasmashell 5.8.6 guv@cetriolo:/data/guv/c/KDE_bugs>
Retracting status according to comment #6. If you can still reproduce with recent versions (e.g. openSUSE Tumbleweed ISO), please add a comment.
when trying to create a new folder in a dolphin or desktop(plasma->view folder) the Invalid URL: QUrl ("") pops up. But in the conqueror folders are created without problems. In the console only: mike [ ~ ]$ dolphin kf5.kio.core: Refilling KProtocolInfoFactory cache in the hope to find "stash" kf5.kio.core: Refilling KProtocolInfoFactory cache in the hope to find "mtp" kf5.kio.core: Refilling KProtocolInfoFactory cache in the hope to find "mtp" kf5.kio.core: Refilling KProtocolInfoFactory cache in the hope to find "mtp" qt.accessibility.core: Cannot create accessible child interface for object: PlacesView(0xfc6740) index: 25 Empty filename passed to function Empty filename passed to function Empty filename passed to function Empty filename passed to function Empty filename passed to function Empty filename passed to function Empty filename passed to function The desktop entry file "/home/mike/.directory" has Type= "Application" but no Exec line kf5.kio.core: Invalid URL: QUrl("") version of qt-5.9.2 frameworks-5.39 plasma-5.11.2 dolphin-17.08.2 all compiling from source(LFS), 66/5000 previously collected versions (qt-5.9.2\5.37,38\17.04...08.0) worked flawlessly, it all started after frameworks-5.39 plasma-5.11.2 dolphin-17.08.2. building with qt5-git(aka 5.10.0)have not changed this situation.
The bug is not in plasma-integration, but the kfiledialog in kio. Proposed patch: https://phabricator.kde.org/D19027
Git commit d8fcc1e8c62c37f122350ce045a4f22e489be855 by Peter Wu. Committed on 03/03/2019 at 19:56. Pushed by peterwu into branch 'master'. Fix "Invalid URL: QUrl("some.txt")" warnings in Save dialog When the Save File dialog is in use with filters, any relative path would trigger warnings due to KIO::stat receiving an invalid URL in KFileWidgetPrivate::updateLocationEditExtension. Fix the warning by ensuring that relative paths are valid file URLs. Add a bunch of tests to check the expected properties while at it. These tests pass regardless of the fix but after the fix, warnings are gone. Differential Revision: https://phabricator.kde.org/D19027 M +119 -0 autotests/kfilewidgettest.cpp M +9 -2 src/filewidgets/kfilewidget.cpp https://commits.kde.org/kio/d8fcc1e8c62c37f122350ce045a4f22e489be855