Bug 320199 - File dialogs print warnings on stdout
Summary: File dialogs print warnings on stdout
Status: RESOLVED INTENTIONAL
Alias: None
Product: kfile
Classification: Unmaintained
Component: general (show other bugs)
Version: 4.10.80
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-24 07:47 UTC by Nikos Chantziaras
Modified: 2017-07-23 04:28 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Fix for warnings (265 bytes, patch)
2014-01-14 10:59 UTC, nikos.giotis
Details
Attached correct .patch (440 bytes, patch)
2014-01-14 11:04 UTC, nikos.giotis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikos Chantziaras 2013-05-24 07:47:36 UTC
The first time I open a file dialog in any application (KDE or Qt), I get several warning messages:

"/org/freedesktop/UDisks2/drives/ST2000DM001_9YN164_W1F0FBWM" : property "Drive" does not exist 
"/org/freedesktop/UDisks2/drives/ST3500320AS_9QM24RWC" : property "Drive" does not exist 
"/org/freedesktop/UDisks2/drives/WDC_WD5000AAKS_00V1A0_WD_WCAWF0121751" : property "Drive" does not exist 
"/org/freedesktop/UDisks2/drives/HL_DT_ST_DVDRAM_GH20LS15_K6L83SE5031" : property "Drive" does not exist 
"/org/freedesktop/UDisks2/drives/ST3500320AS_9QM24RWC" : property "DeviceNumber" does not exist 
"/org/freedesktop/UDisks2/drives/ST3500320AS_9QM24RWC" : property "Device" does not exist 
kfilemodule(4325) KSambaSharePrivate::findSmbConf: KSambaShare: Could not find smb.conf!

I don't know what the first messages are about, but the last one seems to assume I'm using Samba, which I don't (I don't even have it installed.)

Furthermore, every time I open a file dialog again in the same application, the above aren't printed anymore, but the below is:

kfilemodule(4467)/kio (KDirModel) KDirModelPrivate::_k_slotDeleteItems: No node found for item that was just removed: KUrl("file:///path/to/some/file")

This last one doesn't happen with all apps, but only with those that pass an existing initial directory to QFileDialog::getOpenFileName() *and* a filter string. For example, this triggers the message:

QFileDialog::getOpenFileName(0, tr("Open File"), "/etc", "Text files (*.txt)");

Subsequent calls of the above result in:

kfilemodule(4700)/kio (KDirModel) KDirModelPrivate::_k_slotDeleteItems: No node found for item that was just removed: KUrl("file:///etc/slsh.rc")

While this doesn't print the warning at all:

QFileDialog::getOpenFileName(0, tr("Open File"), "/etc");

Reproducible: Always

Steps to Reproduce:
Write a program that calls:

  QFileDialog::getOpenFileName(0, tr("Open File"), "/etc", "Text files (*.txt)");
  QFileDialog::getOpenFileName(0, tr("Open File"), "/etc", "Text files (*.txt)");

and run it.
Actual Results:  
Warnings are printed.

Expected Results:  
No warnings.

KDE 4.10.3
Qt 4.8.4
Gentoo Linux AMD64
DBus 1.6.10
UDisks 2.1.0
X.Org server 1.14.1
Comment 1 Nikos Chantziaras 2013-05-24 07:48:36 UTC
Oops, I forgot to mention that in "kdebugdialog", the "Disable all debug output" checkbox is enabled.
Comment 2 Cory F Cohen 2013-10-12 17:59:08 UTC
This problem can be demonstrated easily with "kdialog --getopenfilename ."  It occurs in a wide variety of tools including okular, dolphin, gwenview, etc.  This behavior is very annoying if you routinely run GUI commands from a shell window. Additionally, it obscures real errors and complicates debugging for problems in which these errors are "normal".
Comment 3 nikos.giotis 2014-01-14 10:59:35 UTC
Created attachment 84642 [details]
Fix for warnings

This patch fixes the warnings coming from KSambaSharePrivate::testparmParamValue:
It was tested against kde 4.10.5 on slackware 14.1, with samba 4.1.1
The fix works with samba stopped, started as well as when smb.conf is removed
Here, the warning I got on many programs that used the file dialogs was
kdialog(4949) KSambaSharePrivate::testparmParamValue: Running testparm ("-d0", "-s", "--parameter-name", "usershare path")
The fix in the patch is to place the parameterName inside "", so testparm can operate with arguements that contain white space.
Comment 4 nikos.giotis 2014-01-14 11:04:08 UTC
Created attachment 84643 [details]
Attached correct .patch

The previous attachment was a .patch inside a .gz archive, sorry for my ignorance (this is my first patch here)
Comment 5 Antony Lee 2015-10-12 05:31:22 UTC
Actually the messages get printed on stderr, but it's still quite annoying.  Kindly bumping the issue.
Comment 6 Antony Lee 2016-01-17 00:24:39 UTC
Note that the issue regarding samba is still present as of KDE Applications 15.12.  Please reopen.
Comment 7 Nikos Chantziaras 2016-01-17 00:31:27 UTC
Oh, OK. Reopening.
Comment 8 Nikos Chantziaras 2017-07-23 04:28:33 UTC
Closing. I don't care anymore.