minor fixes:
make QtCreator happy by removing const & when connecting signal/slots fix typo in comment
This commit is contained in:
@@ -54,8 +54,8 @@ PropertyEditor::PropertyEditor(QWidget *parent)
|
||||
this->background = opt.palette.dark();
|
||||
this->groupColor = opt.palette.color(QPalette::BrightText);
|
||||
|
||||
connect(this, SIGNAL(activated(const QModelIndex &)), this, SLOT(onItemActivated(const QModelIndex &)));
|
||||
connect(this, SIGNAL(clicked(const QModelIndex &)), this, SLOT(onItemActivated(const QModelIndex &)));
|
||||
connect(this, SIGNAL(activated(QModelIndex)), this, SLOT(onItemActivated(QModelIndex)));
|
||||
connect(this, SIGNAL(clicked(QModelIndex)), this, SLOT(onItemActivated(QModelIndex)));
|
||||
}
|
||||
|
||||
PropertyEditor::~PropertyEditor()
|
||||
|
||||
@@ -114,7 +114,8 @@ bool PropertyItemDelegate::editorEvent (QEvent * event, QAbstractItemModel* mode
|
||||
return QItemDelegate::editorEvent(event, model, option, index);
|
||||
}
|
||||
|
||||
void PropertyItemDelegate::editorClosed(QWidget *editor) {
|
||||
void PropertyItemDelegate::editorClosed(QWidget *editor)
|
||||
{
|
||||
editor->close();
|
||||
}
|
||||
|
||||
@@ -132,11 +133,10 @@ QWidget * PropertyItemDelegate::createEditor (QWidget * parent, const QStyleOpti
|
||||
editor->setAutoFillBackground(true);
|
||||
if (editor && childItem->isReadOnly())
|
||||
editor->setDisabled(true);
|
||||
// else if (editor && this->pressed)
|
||||
else if(editor) {
|
||||
else if (editor /*&& this->pressed*/) {
|
||||
// We changed the way editor is activated in PropertyEditor (in response
|
||||
// of signal activated and clicked), so now we should grab focus
|
||||
// regardless of "preseed" or not (e.g. when activated by keyboard
|
||||
// regardless of "pressed" or not (e.g. when activated by keyboard
|
||||
// enter)
|
||||
editor->setFocus();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user