src/settingseditor/librarieseditor.cpp

changeset 300
3a4b132b8353
parent 265
b2b7af293c46
child 381
80bea7a6e84f
--- a/src/settingseditor/librarieseditor.cpp	Tue Jun 28 19:43:55 2022 +0300
+++ b/src/settingseditor/librarieseditor.cpp	Tue Jun 28 19:47:34 2022 +0300
@@ -71,7 +71,7 @@
 
 void LibrariesEditor::showContextMenu(const QPoint position)
 {
-	const qsizetype libraryIndex = this->currentLibraryIndex();
+	const index_t libraryIndex = this->currentLibraryIndex();
 	LibrariesModel* model = this->currentModel();
 	if (model != nullptr and model->isValidIndex(libraryIndex))
 	{
@@ -118,7 +118,7 @@
 void LibrariesEditor::setCurrentLibraryRole()
 {
 	if (LibrariesModel* model = this->currentModel()) {
-		const qsizetype libraryIndex = currentLibraryIndex();
+		const index_t libraryIndex = currentLibraryIndex();
 		QObject* senderObject = sender();
 		QAction* senderAction = qobject_cast<QAction*>(senderObject);
 		const Library::Role role = senderAction->data().value<Library::Role>();
@@ -136,7 +136,7 @@
 void LibrariesEditor::moveCurrentLibraryUp()
 {
 	if (LibrariesModel* model = this->currentModel()) {
-		const qsizetype libraryIndex = this->currentLibraryIndex();
+		const index_t libraryIndex = this->currentLibraryIndex();
 		model->moveLibrary(libraryIndex, libraryIndex - 1);
 	}
 }
@@ -144,7 +144,7 @@
 void LibrariesEditor::moveCurrentLibraryDown()
 {
 	if (LibrariesModel* model = this->currentModel()) {
-		const qsizetype libraryIndex = this->currentLibraryIndex();
+		const index_t libraryIndex = this->currentLibraryIndex();
 		model->moveLibrary(libraryIndex + 1, libraryIndex);
 	}
 }
@@ -154,7 +154,7 @@
 	return qobject_cast<LibrariesModel*>(this->ui.librariesTable->model());
 }
 
-qsizetype LibrariesEditor::currentLibraryIndex() const
+index_t LibrariesEditor::currentLibraryIndex() const
 {
 	return this->ui.librariesTable->selectionModel()->currentIndex().row();
 }

mercurial