annoying warnings from Qt on the console

Lubomir I. Ivanov neolit123 at gmail.com
Mon Aug 18 11:37:05 PDT 2014


On 18 August 2014 19:34, Dirk Hohndel <dirk at hohndel.org> wrote:
> Dear Qt Experts...
>
> I had seen those on Windows (but no one starts things from the console
> there), and now that I have switched my Linux builds to be Qt5 by default
> as well I get them on Linux and it's rather annoying.
>
> Simply starting Subsurface without any data file gives me >100
>
> QFSFileEngine::open: No file name specified
>
> warnings.
>
> My guess is that this could be related to my hacked version of Marble
> (that throws away large parts of Marble code), but I wonder how to track
> down WHERE these messages are coming from. I ran things under the debugger
> (but I don't have built Qt5 from source here on Linux) and tracked the
> first few of them down to being caused by Marble trying to set up its
> styles... but without Qt5 source / ability to step through its functions I
> didn't get very far.
>
> But fundamentally I wonder if there's an easy way to turn the warnings off
> - they seem kinda pointless.
>

it's caused by marble.

i very much suspect that it's a stupid lack of empty string checks in
their code base in multiple locations.
we've already seen examples of the code quality in there, yet any good
alternatives are absent.

something in the lines of:
QString emptyString;
QFile f(emptyString);
f.open(QFile::ReadOnly);

trying to copy all files from marblesource/marbledata to
susbsurface/marbledata doesn't solve it for me.
the actual warning cannot be removed either since it always triggers
from QFSFileEngine::open(), and that's fine because it targets not
users but developers to improve their code (e.g. fopen(NULL...) a sane
thing?).

the Windows user will not see it anyway as we don't have the console
for the regular release build.
to what exact areas of marble it's related and why it only possibly
happens on Windows(?) - no idea.

lubomir
--


More information about the subsurface mailing list