COMP: Fix warning.
This commit is contained in:
parent
0ea6a8d1a4
commit
195e1035ab
@ -394,7 +394,7 @@ QWidget* QCMakeCacheModelDelegate::createEditor(QWidget* p,
|
|||||||
return new QLineEdit(p);
|
return new QLineEdit(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QCMakeCacheModelDelegate::editorEvent(QEvent* event, QAbstractItemModel* model,
|
bool QCMakeCacheModelDelegate::editorEvent(QEvent* e, QAbstractItemModel* model,
|
||||||
const QStyleOptionViewItem& option, const QModelIndex& index)
|
const QStyleOptionViewItem& option, const QModelIndex& index)
|
||||||
{
|
{
|
||||||
Qt::ItemFlags flags = model->flags(index);
|
Qt::ItemFlags flags = model->flags(index);
|
||||||
@ -410,19 +410,19 @@ bool QCMakeCacheModelDelegate::editorEvent(QEvent* event, QAbstractItemModel* mo
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((event->type() == QEvent::MouseButtonRelease)
|
if ((e->type() == QEvent::MouseButtonRelease)
|
||||||
|| (event->type() == QEvent::MouseButtonDblClick))
|
|| (e->type() == QEvent::MouseButtonDblClick))
|
||||||
{
|
{
|
||||||
// eat the double click events inside the check rect
|
// eat the double click events inside the check rect
|
||||||
if (event->type() == QEvent::MouseButtonDblClick)
|
if (e->type() == QEvent::MouseButtonDblClick)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (event->type() == QEvent::KeyPress)
|
else if (e->type() == QEvent::KeyPress)
|
||||||
{
|
{
|
||||||
if(static_cast<QKeyEvent*>(event)->key() != Qt::Key_Space &&
|
if(static_cast<QKeyEvent*>(e)->key() != Qt::Key_Space &&
|
||||||
static_cast<QKeyEvent*>(event)->key() != Qt::Key_Select)
|
static_cast<QKeyEvent*>(e)->key() != Qt::Key_Select)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user