[dolphin] [Bug 432406] Cannot open file with non-ascii name when LC_ALL is not set

Tusooa Zhu bugzilla_noreply at kde.org
Thu Feb 4 13:14:04 GMT 2021


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

Tusooa Zhu <tusooa at vista.aero> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|dolphin-bugs-null at kde.org   |tusooa at vista.aero
             Status|REPORTED                    |ASSIGNED
     Ever confirmed|0                           |1

--- Comment #6 from Tusooa Zhu <tusooa at 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 on the CC list for the bug.


More information about the kfm-devel mailing list