> On Sept. 7, 2014, 1:53 nachm., David Edmundson wrote: > > src/qmlcontrols/kcoreaddons/formats.cpp, line 34 > > <https://git.reviewboard.kde.org/r/120087/diff/2/?file=310261#file310261line34> > > > > DurationFormatOption -> DurationFormatOptions ? > > > > as we want the flags not the enum.
I tried with the QFlags but passing it from QML to C++ doesn't work somehow :/ > console.log(KCoreAddons.FormatTypes.HideSeconds) // yields 4 and then in the C++ part I just get an empty QFlags(). I did register the metatype. However, having an int in the signature and then static_cast<KFormat::DurationFormatOption> works but is ugly :( - Kai Uwe ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/120087/#review65989 ----------------------------------------------------------- On Sept. 7, 2014, 1:24 nachm., Kai Uwe Broulik wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/120087/ > ----------------------------------------------------------- > > (Updated Sept. 7, 2014, 1:24 nachm.) > > > Review request for Plasma. > > > Repository: kdeclarative > > > Description > ------- > > This patch exposes the duration format options from KLocale's formatDuration > in KDeclarative. > > This alows to show a time in eg. hh:mm instead of the default hh:mm:ss > > > Diffs > ----- > > src/qmlcontrols/kcoreaddons/kcoreaddonsplugin.cpp 9dc17fa > src/qmlcontrols/kcoreaddons/formats.h 275f351 > src/qmlcontrols/kcoreaddons/formats.cpp c853e97 > > Diff: https://git.reviewboard.kde.org/r/120087/diff/ > > > Testing > ------- > > Adjusted battery monitor, shows proper value. > > > Thanks, > > Kai Uwe Broulik > >
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel