minor fixes:

make QtCreator happy by removing const & when connecting signal/slots
fix typo in comment
This commit is contained in:
wmayer
2018-09-11 15:50:27 +02:00
parent 652e9314bd
commit 8f3c135a5c
2 changed files with 6 additions and 6 deletions

View File

@@ -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()

View File

@@ -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();
}