UserToolBox, more consistent with other such enums
svn path=/trunk/KDE/kdelibs/; revision=1069847
This commit is contained in:
parent
00ffbc6616
commit
b31f9ca8c0
@ -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)
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user