https://bugs.kde.org/show_bug.cgi?id=432406

Tusooa Zhu <tus...@vista.aero> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|dolphin-bugs-n...@kde.org   |tus...@vista.aero
             Status|REPORTED                    |ASSIGNED
     Ever confirmed|0                           |1

--- Comment #6 from Tusooa Zhu <tus...@vista.aero> ---
Replacing the 

static QLoggingCategory category("kf.kio.widgets.kdirmodel", QtInfoMsg);

in kdirmodel.cpp with

Q_LOGGING_CATEGORY(category, "kf.kio.widgets.kdirmodel", QtInfoMsg);

resolves this bug.

>From https://doc.qt.io/qt-5/qloggingcategory.html#Q_LOGGING_CATEGORY-1 :
"The implicitly-defined QLoggingCategory object is created on first use, in a
thread-safe manner."

The original way to explicitly define a static QLoggingCategory will lead to a
call to ucnv_getDefaultName() before QApplication constructor (where
setlocale() is called), thus making QTextCodec::codecForLocale() misbehave.
Here we replace the explicit definition with the Q_LOGGING_CATEGORY macro, and
thus avoid this problem.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to