Spreadsheet: [skip ci] Fix several clazy issues:

* Mixing iterators with const_iterators [-Wclazy-strict-iterators]
* Q_PROPERTY should have either NOTIFY or CONSTANT [-Wclazy-qproperty-without-notify]
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
* Missing emit keyword on signal call SpreadsheetGui::SheetViewHeader::resizeFinished [-Wclazy-incorrect-emit]
* Missing emit keyword on signal call QAbstractItemModel::dataChanged [-Wclazy-incorrect-emit]
* c++11 range-loop might detach Qt container (QStringList) [-Wclazy-range-loop-detach]
This commit is contained in:
wmayer
2022-07-25 11:23:27 +02:00
parent 96ac382805
commit e2f1452cb8
5 changed files with 15 additions and 15 deletions

View File

@@ -626,7 +626,7 @@ void CmdSpreadsheetStyleBold::activated(int iMsg)
if (selection.size() > 0) {
bool allBold = true;
for (QModelIndexList::const_iterator it = selection.begin(); it != selection.end(); ++it) {
for (QModelIndexList::const_iterator it = selection.cbegin(); it != selection.cend(); ++it) {
const Cell * cell = sheet->getCell(CellAddress((*it).row(), (*it).column()));
if (cell) {
@@ -700,7 +700,7 @@ void CmdSpreadsheetStyleItalic::activated(int iMsg)
if (selection.size() > 0) {
bool allItalic = true;
for (QModelIndexList::const_iterator it = selection.begin(); it != selection.end(); ++it) {
for (QModelIndexList::const_iterator it = selection.cbegin(); it != selection.cend(); ++it) {
const Cell * cell = sheet->getCell(CellAddress((*it).row(), (*it).column()));
if (cell) {
@@ -774,7 +774,7 @@ void CmdSpreadsheetStyleUnderline::activated(int iMsg)
if (selection.size() > 0) {
bool allUnderline = true;
for (QModelIndexList::const_iterator it = selection.begin(); it != selection.end(); ++it) {
for (QModelIndexList::const_iterator it = selection.cbegin(); it != selection.cend(); ++it) {
const Cell * cell = sheet->getCell(CellAddress((*it).row(), (*it).column()));
if (cell) {