From a219c281f2b644103f635b9d32d230d9ee07cd9c Mon Sep 17 00:00:00 2001 From: leozide Date: Thu, 20 Apr 2017 18:56:35 -0700 Subject: [PATCH] Qt4 fix. --- common/group.cpp | 2 +- common/lc_model.cpp | 2 +- common/lc_partselectionwidget.h | 2 +- qt/lc_qpreferencesdialog.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/group.cpp b/common/group.cpp index 1538f4b2..22a40456 100644 --- a/common/group.cpp +++ b/common/group.cpp @@ -54,7 +54,7 @@ void lcGroup::CreateName(const lcArray& Groups) if (Name.startsWith(Prefix)) { bool Ok = false; - int GroupNumber = Name.midRef(Length).toInt(&Ok); + int GroupNumber = Name.mid(Length).toInt(&Ok); if (Ok && GroupNumber > Max) Max = GroupNumber; } diff --git a/common/lc_model.cpp b/common/lc_model.cpp index 40e5520b..d55fe1f1 100644 --- a/common/lc_model.cpp +++ b/common/lc_model.cpp @@ -1791,7 +1791,7 @@ QString lcModel::GetGroupName(const QString& Prefix) if (Name.startsWith(Prefix)) { bool Ok = false; - int GroupNumber = Name.midRef(Length).toInt(&Ok); + int GroupNumber = Name.mid(Length).toInt(&Ok); if (Ok && GroupNumber > Max) Max = GroupNumber; } diff --git a/common/lc_partselectionwidget.h b/common/lc_partselectionwidget.h index 93622540..d37d7cc1 100644 --- a/common/lc_partselectionwidget.h +++ b/common/lc_partselectionwidget.h @@ -57,7 +57,7 @@ public: virtual QVariant headerData(int Section, Qt::Orientation Orientation, int Role = Qt::DisplayRole) const; virtual Qt::ItemFlags flags(const QModelIndex& Index) const; - PieceInfo* GetPieceInfo(QModelIndex Index) const + PieceInfo* GetPieceInfo(const QModelIndex& Index) const { return Index.isValid() ? mParts[Index.row()].first : nullptr; } diff --git a/qt/lc_qpreferencesdialog.cpp b/qt/lc_qpreferencesdialog.cpp index d78e3ff6..26c6faf9 100644 --- a/qt/lc_qpreferencesdialog.cpp +++ b/qt/lc_qpreferencesdialog.cpp @@ -423,7 +423,7 @@ bool lcQPreferencesDialog::eventFilter(QObject *object, QEvent *event) return true; } - return false; + return QDialog::eventFilter(object, event); } void lcQPreferencesDialog::updateCommandList()