From 8f3c135a5c2bf564e82c2124e77a835abd0cff0a Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 11 Sep 2018 15:50:27 +0200 Subject: [PATCH] minor fixes: make QtCreator happy by removing const & when connecting signal/slots fix typo in comment --- src/Gui/propertyeditor/PropertyEditor.cpp | 4 ++-- src/Gui/propertyeditor/PropertyItemDelegate.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Gui/propertyeditor/PropertyEditor.cpp b/src/Gui/propertyeditor/PropertyEditor.cpp index 09ae4f1043..413a4eb58f 100644 --- a/src/Gui/propertyeditor/PropertyEditor.cpp +++ b/src/Gui/propertyeditor/PropertyEditor.cpp @@ -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() diff --git a/src/Gui/propertyeditor/PropertyItemDelegate.cpp b/src/Gui/propertyeditor/PropertyItemDelegate.cpp index ec6872eb7a..c5f5352869 100644 --- a/src/Gui/propertyeditor/PropertyItemDelegate.cpp +++ b/src/Gui/propertyeditor/PropertyItemDelegate.cpp @@ -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(); }