UserToolBox, more consistent with other such enums

svn path=/trunk/KDE/kdelibs/; revision=1069847
This commit is contained in:
Aaron J. Seigo 2010-01-04 10:21:32 +00:00
parent 00ffbc6616
commit b31f9ca8c0
2 changed files with 6 additions and 6 deletions

View File

@ -42,11 +42,11 @@ class PLASMA_EXPORT AbstractToolBox : public QGraphicsWidget
public:
enum ToolType {
AddTool = 0,
ConfigureTool,
ControlTool,
MiscTool,
DestructiveTool,
LastToolType = DestructiveTool + 1
ConfigureTool = 100,
ControlTool = 200,
MiscTool = 300,
DestructiveTool = 400,
UserToolType = DestructiveTool + 1000
};
Q_ENUMS(ToolType)

View File

@ -155,7 +155,7 @@ void InternalToolBox::addTool(QAction *action)
ToolType type = AbstractToolBox::MiscTool;
if (!action->data().isNull() && action->data().type() == QVariant::Int) {
int t = action->data().toInt();
if (t >= 0 && t < AbstractToolBox::LastToolType) {
if (t >= 0 && t < AbstractToolBox::UserToolType) {
type = static_cast<AbstractToolBox::ToolType>(t);
}
}