Review Request: Clock: cleaning tool tip code
Aaron Seigo
aseigo at kde.org
Thu Sep 4 21:37:27 CEST 2008
> On 2008-09-03 10:15:20, Aaron Seigo wrote:
> > /trunk/KDE/kdebase/workspace/plasma/applets/digital-clock/clock.h, line 59
> > <http://reviewboard.vidsolbach.de/r/169/diff/1/?file=829#file829line59>
> >
> > perhaps it could either return a Plasma::ToolTipManager::ToolTipContent instead? that would make the API a bit clearer, no?
>
> Rafa? Mi?ecki wrote:
> Aaron: I simply made what you suggested in http://mail.kde.org/pipermail/plasma-devel/2008-September/000740.html . If you want toolTipContent() to return ToolTipContent what for will we have updateToolTipContent()?
> I simply made what you suggested
well, actually i suggested returning just one string; but as you need more than one (i agree with that) it makes more sense to use the actual ToolTipContent class: it's more readable than QPair<QString, QString> and will let this code adjust as ToolTipContent does (if it does, anyways)
> If you want toolTipContent() to return ToolTipContent what for will we have updateToolTipContent()?
ClockApplet::toolTipContent() would return the tooltip content *specific to that clock*. so the analog clock might not add anything, but the fuzzy clock might add a clever saying for the time of the day (for instance) or the binary clock might add the actual time in the usual decimal format.
updateToolTipContent will then add the *standardized* content to the ToolTipContent, such as the listing of timezones.
- Aaron
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.vidsolbach.de/r/169/#review147
-----------------------------------------------------------
On 2008-09-03 09:58:33, Rafa? Mi?ecki wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.vidsolbach.de/r/169/
> -----------------------------------------------------------
>
> (Updated 2008-09-03 09:58:33)
>
>
> Review request for Plasma.
>
>
> Summary
> -------
>
> This patch makes little cleaning in tool tip code and prepare for next changes. For now new function
> QPair<> toolTipContent()
> was created. The next step will be to move updateToolTipContent() into libplasmaclock.
>
>
> Diffs
> -----
>
> /trunk/KDE/kdebase/workspace/plasma/applets/digital-clock/clock.h
> /trunk/KDE/kdebase/workspace/plasma/applets/digital-clock/clock.cpp
> /trunk/KDE/kdebase/workspace/plasma/applets/libplasmaclock/clockapplet.h
> /trunk/KDE/kdebase/workspace/plasma/applets/libplasmaclock/clockapplet.cpp
>
> Diff: http://reviewboard.vidsolbach.de/r/169/diff
>
>
> Testing
> -------
>
> Tool tip for digital clock still works, analog clock doesn't crash (it doesn't have tool tip).
>
>
> Thanks,
>
> Rafa?
>
>
More information about the Plasma-devel
mailing list