Mercurial > hg > easyhg
comparison 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 |
comparison
equal
deleted
inserted
replaced
604:98f57888d893 | 605:ab92f695f776 |
---|---|
68 QString workingDir; | 68 QString workingDir; |
69 QStringList params; | 69 QStringList params; |
70 QString executable; // empty for normal Hg, but gets filled in by hgrunner | 70 QString executable; // empty for normal Hg, but gets filled in by hgrunner |
71 void *extraData; | 71 void *extraData; |
72 | 72 |
73 HgAction() : action(ACT_NONE) { } | 73 HgAction() : action(ACT_NONE), extraData(0) { } |
74 | 74 |
75 HgAction(HGACTIONS _action, QString _wd, QStringList _params) : | 75 HgAction(HGACTIONS _action, QString _wd, QStringList _params) : |
76 action(_action), workingDir(_wd), params(_params), extraData(0) { } | 76 action(_action), workingDir(_wd), params(_params), extraData(0) { } |
77 | 77 |
78 HgAction(HGACTIONS _action, QString _wd, QStringList _params, void *_d) : | 78 HgAction(HGACTIONS _action, QString _wd, QStringList _params, void *_d) : |
79 action(_action), workingDir(_wd), params(_params), extraData(_d) { } | 79 action(_action), workingDir(_wd), params(_params), extraData(_d) { } |
80 | 80 |
81 bool operator==(const HgAction &a) { | 81 bool operator==(const HgAction &a) { |
82 return (a.action == action && a.workingDir == workingDir && | 82 bool equal = (a.action == action && a.workingDir == workingDir && |
83 a.params == params && a.executable == executable && | 83 a.params == params && a.executable == executable && |
84 a.extraData == extraData); | 84 a.extraData == extraData); |
85 return equal; | |
85 } | 86 } |
86 | 87 |
87 bool shouldBeFast() const { | 88 bool shouldBeFast() const { |
88 switch (action) { | 89 switch (action) { |
89 case ACT_NONE: | 90 case ACT_NONE: |