src/main.cpp

changeset 250
2837b549e616
parent 249
37d3c819cafa
child 251
94b0a30a1886
--- a/src/main.cpp	Wed Jun 22 16:13:15 2022 +0300
+++ b/src/main.cpp	Wed Jun 22 16:53:35 2022 +0300
@@ -272,7 +272,7 @@
 	}
 	ui->actionDrawAxes->setChecked(renderPreferences->drawAxes);
 	ui->actionWireframe->setChecked(renderPreferences->wireframe);
-};
+}
 
 static gl::RenderPreferences loadRenderPreferences()
 {
@@ -353,7 +353,7 @@
 std::vector<int> rows(const QModelIndexList& indexList)
 {
 	std::vector<int> result;
-	result.reserve(indexList.size());
+	result.reserve(unsigned_cast(indexList.size()));
 	for (const QModelIndex& index : indexList)
 	{
 		result.push_back(index.row());
@@ -467,7 +467,7 @@
 				ModelData* data = findModelData(&documents, modelId);
 				if (data != nullptr) {
 					auto resolveIndex = [&data](const QModelIndex& index){
-						return data->model->idAt(index.row());
+						return data->model->idAt(unsigned_cast(index.row()));
 					};
 					const auto selection = data->itemSelectionModel->selection();
 					const auto indices = fn::map<QSet<ModelId>>(selection.indexes(), resolveIndex);
@@ -606,7 +606,7 @@
 			std::vector<int> selectedRows = rows(ui.modelListView->selectionModel()->selectedRows());
 			std::sort(selectedRows.begin(), selectedRows.end(), std::greater<int>{});
 			for (int row : selectedRows) {
-				executeAction(model, DeleteFromModel{.position = row});
+				executeAction(model, DeleteFromModel{.position = unsigned_cast(row)});
 			}
 		}
 	});

mercurial