D18019: [Digital Clock] Add ability to set a custom date format string

Chris Holland noreply at phabricator.kde.org
Sat Jan 12 15:36:00 GMT 2019


Zren added a comment.


  > D18155 <https://phabricator.kde.org/D18155>
  
  Looking at the alternative patch, I've renamed the config key variable to `customDateFormat`. Most of the differences stem from not using a "variant" data type for `DigitalClock.qml`'s `dateFormat` variable. The `string formatDate(datetime date, variant format)` (qt doc link <http://doc.qt.io/qt-5/qml-qtqml-qt.html#formatDate-method>) accepts a variant type.
  
  In D18019#390579 <https://phabricator.kde.org/D18019#390579>, @davidedmundson wrote:
  
  > So for those reasons, I'm inclined to say +1.
  
  
  Assuming there's no objection to this, I'll merge this Sunday night. The beta is Thurs, so I assume that's the cutoff date?
  
  > I don't think the answers to the same question apply to the "First Day of the Week" patch.
  
  Fair enough. With that setting, the user sort of expects every date selection calendar popup (Qt/Gtk) to follow that setting. Where as with this setting, the user's expectation is that it should only change the panel's clock widget.
  
  > I don't think we need the colour formatting link. It's a niche within a niche. Removing it "solves" the escaping issue as it means the user is doing something undocumented in the first place.
  
  Sounds good. Until there's an embedded list of examples (D18168 <https://phabricator.kde.org/D18168>) it could just overwhelm the user with 2 different syntaxes.
  
  -----
  
  Final note. We're using `Qt.formatDate()`, which means the "time formats" `hh`, `mm`, `ss`, `t` (time zone), and `zzz` (millis) are not replaced with their value. Implementing that would require duplicating the "sizehelper timeMetrics" code for the date format though, which I can't guarantee a bugless patch this soon before the 5.15 Beta. If I finish D18168 <https://phabricator.kde.org/D18168>, then it might help suggest to the user that only the "date variables" are accepted.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D18019

To: Zren, #plasma, #vdg
Cc: karpenyamichael, davidedmundson, abetts, cfeck, ngraham, mart, ndavis, rooty, plasma-devel, kvanton, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, sebas, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190112/0e8e8311/attachment.html>


More information about the Plasma-devel mailing list