Mercurial > hg > easyhg
diff src/hgaction.h @ 605:ab92f695f776
Expand environmental parameters and executable name in action when it is received rather than when it's executed. This ensures we can correctly compare actions and fixes #141 "Unexpected error if you double-click on a toolbar button"
author | Chris Cannam |
---|---|
date | Tue, 03 Jul 2012 11:22:10 +0100 |
parents | 012ba1b83328 |
children | ae67ea0af696 |
line wrap: on
line diff
--- a/src/hgaction.h Tue Jul 03 10:43:05 2012 +0100 +++ b/src/hgaction.h Tue Jul 03 11:22:10 2012 +0100 @@ -70,7 +70,7 @@ QString executable; // empty for normal Hg, but gets filled in by hgrunner void *extraData; - HgAction() : action(ACT_NONE) { } + HgAction() : action(ACT_NONE), extraData(0) { } HgAction(HGACTIONS _action, QString _wd, QStringList _params) : action(_action), workingDir(_wd), params(_params), extraData(0) { } @@ -79,9 +79,10 @@ action(_action), workingDir(_wd), params(_params), extraData(_d) { } bool operator==(const HgAction &a) { - return (a.action == action && a.workingDir == workingDir && - a.params == params && a.executable == executable && - a.extraData == extraData); + bool equal = (a.action == action && a.workingDir == workingDir && + a.params == params && a.executable == executable && + a.extraData == extraData); + return equal; } bool shouldBeFast() const {