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

--- Comment #45 from Jan Ziak (http://atom-symbol.net) 
<0xe2.0x9a.0...@gmail.com> ---
(In reply to Martin Klapetek from comment #44)
> Sure, now how would you make every single Qt app
> out there know which &format to pass there so that
> they all display the same date format? Well, you
> wouldn't because this problem is non-trivial.
> 
> But you're of course welcome to do your research
> and then propose a Qt patch that would allow to
> set custom System Locale formats for datetime.
> Believe me, if it was that simple, it would have
> been done already.

I don't understand what is so complicated about it.

Once I found it is located in qlocale.cpp in
QLocale::dateFormat(FormatType)→QString, I am able to _prefix_ (customize) the
behavior of the function in any way I can rationally imagine.

For example, it shouldn't be that hard for me to implement per-application
(i.e: argv[0]) customization of the FormatType→QString conversion, while having
the conversions stored in file "~/.config/by-argv0/qlocale_dateformats.txt".
Not that I need it - I am just saying it is doable.

Another example: It shouldn't be that hard to enable transient (i.e: time
based) customizations of the FormatType→QString conversion. So for example, if
I wanted to customize the behavior of the conversion function just in the
header/footer when printing a snippet of C++ source code from KDevelop into PDF
file, I can customize the result of the function based on the tuple
(argv[0]=="kdevelop", time==aboutNow).

Another example would be to enable temporary adjustments of the behavior based
on function names in the backtrace obtained by running "gdb --pid" or by using
libunwind.

----

For a dose of creativity, innovation and imagination see for example
https://www.youtube.com/watch?v=WwBaeIw8kSQ - Valgelis, the man and his music
(1984)

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

Reply via email to