[PATCH] Hex support for calculator runner

Aaron J. Seigo aseigo at kde.org
Tue Jun 3 22:09:48 CEST 2008


On Tuesday 03 June 2008, christian mollekopf wrote:
> The Patch applies to:
> kdebase/workspace/plasma/runners/calculator/calculatorrunner.cpp
> kdebase/workspace/plasma/runners/calculator/calculatorrunner.h

cool idea and thanks for the patch; some comments/questions:

* toHex can just be a local boolean and then passed into calc as a parameter; 
easier to track its value that way between runs

* i'd probably write the run condition something like:

if (cmd.length() < 4) {
     return;
}

bool toHex = cmd.startsWidth("hex=");

if (!toHex && (cmd[0] != '=')) {
    return;
}

* the formatting in your patch needs fixing as well; 4 spaces instead of tabs 
and whitespace around operators. e.g.:

	for(int i=0;i<cmd.size();i++){

should be:

    for (int i = 0; i < cmd.size(); ++i) {

i'll probably just clean up the patch locally here and commit...

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080603/28a11d4c/attachment.pgp 


More information about the Panel-devel mailing list