Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update LogLocale.cpp #599

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

aa5sh
Copy link

@aa5sh aa5sh commented Feb 15, 2025

On MacOS at least the time had a +0000 at the end not sure if that was intentional. It looked like you had a regex to try and remove some stuff at the end of the time format. I added another case to remove that.
Time on

@foldynl
Copy link
Owner

foldynl commented Feb 16, 2025

thanks. to be honest, every platform has it differently even if you use QT and what's worse is that every version of QT has it differently. I'll have to release this as a hotfix.

@foldynl
Copy link
Owner

foldynl commented Feb 16, 2025

Which version of Qt are you using?

@aa5sh
Copy link
Author

aa5sh commented Feb 16, 2025 via email

@foldynl
Copy link
Owner

foldynl commented Feb 16, 2025

I think that we will do it better. I received another bug report with a different format, which is caused by Qt 6.8. Please, can you somehow run this piece of code (for example, add this to the constructor of the LogLocale class) and send me what it looks like on macOS? The output for Windows 6.8 is attached.

What's confusing is that your timeformat contains tt. That should no longer appear in the logformat in QT 6.8.

Locale_QT68_Windows.log

QSet<QString> uniqueFormats;

    QList<QLocale> locales = QLocale::matchingLocales(QLocale::AnyLanguage, QLocale::AnyScript, QLocale::AnyCountry);

    for (const QLocale &locale : locales) 
   {
        QString longFormat = locale.timeFormat(QLocale::LongFormat);
        if ( !uniqueFormats.contains(longFormat))
        {
            qInfo() << "  LongFormat:   " <<longFormat;
            uniqueFormats.insert(longFormat);
        }
    }

@aa5sh
Copy link
Author

aa5sh commented Feb 16, 2025

Locale_QT682_MacOS.log

Here you go.

@foldynl
Copy link
Owner

foldynl commented Feb 21, 2025

thank you. It seems that we will have to expand the regexp.

@foldynl
Copy link
Owner

foldynl commented Feb 21, 2025

just for completeness - flatpak QT 6.8.2

LocaleQT682_Flatpak.log

@aa5sh
Copy link
Author

aa5sh commented Feb 21, 2025

I combined the three log files and it looks like something like this grabs all of the t's and surrounding () and [] I see on some.
tttt|\(t\)|\bt\b|\btt\b|\(tttt\)|\[tttt\]

@foldynl
Copy link
Owner

foldynl commented Feb 21, 2025

Branch testing_0.42.1 contains the fix. Please, could you check it on Mac. Now I am checking Flatpak and Windows

@aa5sh
Copy link
Author

aa5sh commented Feb 21, 2025

Looks good in a quick check:
image

@foldynl
Copy link
Owner

foldynl commented Feb 21, 2025

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants