diff --git a/src/Mod/Spreadsheet/Gui/LineEdit.cpp b/src/Mod/Spreadsheet/Gui/LineEdit.cpp index 3116dcc6f7..f5b5f5b7d6 100644 --- a/src/Mod/Spreadsheet/Gui/LineEdit.cpp +++ b/src/Mod/Spreadsheet/Gui/LineEdit.cpp @@ -35,13 +35,13 @@ using namespace SpreadsheetGui; LineEdit::LineEdit(QWidget *parent) : Gui::ExpressionLineEdit(parent, false, true) , lastKeyPressed(0) - , lastModifiers(0) { setFocusPolicy(Qt::FocusPolicy::ClickFocus); } bool LineEdit::eventFilter(QObject* object, QEvent* event) { + Q_UNUSED(object); if (event && event->type() == QEvent::KeyPress) { QKeyEvent* keyEvent = static_cast(event); if (keyEvent->key() == Qt::Key_Tab) { diff --git a/src/Mod/Spreadsheet/Gui/SheetTableView.h b/src/Mod/Spreadsheet/Gui/SheetTableView.h index fb0f260a23..828856fd4f 100644 --- a/src/Mod/Spreadsheet/Gui/SheetTableView.h +++ b/src/Mod/Spreadsheet/Gui/SheetTableView.h @@ -83,8 +83,8 @@ protected: void mousePressEvent(QMouseEvent* event); QModelIndex currentEditIndex; - int tabCounter; Spreadsheet::Sheet * sheet; + int tabCounter; boost::signals2::scoped_connection cellSpanChangedConnection; }; diff --git a/src/Mod/Spreadsheet/Gui/SpreadsheetDelegate.cpp b/src/Mod/Spreadsheet/Gui/SpreadsheetDelegate.cpp index 682e22b0c4..6ced58e311 100644 --- a/src/Mod/Spreadsheet/Gui/SpreadsheetDelegate.cpp +++ b/src/Mod/Spreadsheet/Gui/SpreadsheetDelegate.cpp @@ -46,6 +46,7 @@ QWidget *SpreadsheetDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &index) const { + Q_UNUSED(index) SpreadsheetGui::LineEdit *editor = new SpreadsheetGui::LineEdit(parent); editor->setDocumentObject(sheet); connect(editor, &SpreadsheetGui::LineEdit::finishedWithKey, this, &SpreadsheetDelegate::on_editorFinishedWithKey); diff --git a/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp b/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp index 5addb23b96..3d2056cb3f 100644 --- a/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp +++ b/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp @@ -352,7 +352,7 @@ void SheetView::confirmAliasChanged(const QString& text) void SheetView::confirmContentChanged(const QString& text) { QModelIndex i = ui->cells->currentIndex(); - ui->cells->model()->setData(i, QVariant(ui->cellContent->text()), Qt::EditRole); + ui->cells->model()->setData(i, QVariant(text), Qt::EditRole); ui->cells->setFocus(); }