[Spreadsheet] Clean up compilation warnings
This commit is contained in:
@@ -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<QKeyEvent*>(event);
|
||||
if (keyEvent->key() == Qt::Key_Tab) {
|
||||
|
||||
@@ -83,8 +83,8 @@ protected:
|
||||
void mousePressEvent(QMouseEvent* event);
|
||||
|
||||
QModelIndex currentEditIndex;
|
||||
int tabCounter;
|
||||
Spreadsheet::Sheet * sheet;
|
||||
int tabCounter;
|
||||
|
||||
boost::signals2::scoped_connection cellSpanChangedConnection;
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user