Sat, 08 Apr 2023 15:50:38 +0300
Add missing 'static' keywords and deleted unused code
src/main.cpp | file | annotate | diff | comparison | revisions |
--- a/src/main.cpp Sat Apr 08 15:34:32 2023 +0300 +++ b/src/main.cpp Sat Apr 08 15:50:38 2023 +0300 @@ -215,7 +215,7 @@ return result; } -void rebuildRecentFilesMenu(QMenu* menu, const QStringList& strings, QWidget* parent) +static void rebuildRecentFilesMenu(QMenu* menu, const QStringList& strings, QWidget* parent) { menu->clear(); for (const QString& path : strings) { @@ -275,7 +275,7 @@ CircleToolOptionsWidget* circleToolOptions; }; -void initializeTools(Ui_MainWindow* ui, ToolWidgets* toolWidgets, QWidget* parent) +static void initializeTools(Ui_MainWindow* ui, ToolWidgets* toolWidgets, QWidget* parent) { const struct { @@ -322,22 +322,6 @@ } } -constexpr bool sortModelIndexesByRow(const QModelIndex& a, const QModelIndex& b) -{ - return a.row() < b.row(); -} - -std::vector<int> rows(const QModelIndexList& indexList) -{ - std::vector<int> result; - result.reserve(unsigned_cast(indexList.size())); - for (const QModelIndex& index : indexList) - { - result.push_back(index.row()); - } - return result; -} - static void about(QWidget* parent) { QDialog dialog{parent}; @@ -447,7 +431,7 @@ cursor.select(QTextCursor::LineUnderCursor); cursor.insertText(modelElementToString(action.newElement)); } - //model->assignAt(action.position, action.newElement); + //model->assignAt(action.position, actio邉󠄌n.newElement); }, }, action);