From 2f2cfd603c2520b169138bd15b31ec49ddb47334 Mon Sep 17 00:00:00 2001 From: fyf <57135698+1250890838@users.noreply.github.com> Date: Sat, 9 Nov 2024 01:07:27 +0800 Subject: [PATCH] remove redundant type conversion (#726) --- src/mainwindow.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index adb54b27..fdac2e1f 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1743,18 +1743,17 @@ void MainWindow::setupModelView() m_listView->setModel(m_listModel); m_listViewLogic = new ListViewLogic(m_listView, m_listModel, m_searchEdit, m_clearButton, m_tagPool, m_dbManager, this); - m_treeView = static_cast(ui->treeView); + m_treeView = ui->treeView; m_treeView->setModel(m_treeModel); m_treeViewLogic = new TreeViewLogic(m_treeView, m_treeModel, m_dbManager, m_listView, this); #if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0) - m_noteEditorLogic = new NoteEditorLogic( - m_textEdit, m_editorDateLabel, m_searchEdit, m_kanbanWidget, - static_cast(ui->tagListView), m_tagPool, m_dbManager, this); + m_noteEditorLogic = + new NoteEditorLogic(m_textEdit, m_editorDateLabel, m_searchEdit, m_kanbanWidget, + ui->tagListView, m_tagPool, m_dbManager, this); m_kanbanQuickView.rootContext()->setContextProperty("noteEditorLogic", m_noteEditorLogic); #else m_noteEditorLogic = new NoteEditorLogic(m_textEdit, m_editorDateLabel, m_searchEdit, - static_cast(ui->tagListView), m_tagPool, - m_dbManager, this); + ui->tagListView, m_tagPool, m_dbManager, this); #endif m_editorSettingsQuickView.rootContext()->setContextProperty("noteEditorLogic", m_noteEditorLogic);