diff --git a/src/shared/qrceditor/qrceditor.cpp b/src/shared/qrceditor/qrceditor.cpp index ecb0efde45be90a703b795c7a26d0400983d33c5..693faf54c61ebde83d7f16e36a5201b522b9f928 100644 --- a/src/shared/qrceditor/qrceditor.cpp +++ b/src/shared/qrceditor/qrceditor.cpp @@ -61,7 +61,8 @@ QrcEditor::QrcEditor(QWidget *parent) connect(m_treeview, SIGNAL(addPrefixTriggered()), this, SLOT(onAddPrefix())); connect(m_treeview, SIGNAL(addFilesTriggered(QString)), this, SLOT(onAddFiles())); connect(m_treeview, SIGNAL(removeItem()), this, SLOT(onRemove())); - connect(m_treeview, SIGNAL(currentIndexChanged()), this, SLOT(updateCurrent())); + connect(m_treeview->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), + this, SLOT(updateCurrent())); connect(m_treeview, SIGNAL(dirtyChanged(bool)), this, SIGNAL(dirtyChanged(bool))); m_treeview->setFocus(); diff --git a/src/shared/qrceditor/resourceview.cpp b/src/shared/qrceditor/resourceview.cpp index d0b077cc92c80c1faa678eb4b2ffa2e7194e860f..814d044c9bc73cdabb18b7442227f32e4714c15b 100644 --- a/src/shared/qrceditor/resourceview.cpp +++ b/src/shared/qrceditor/resourceview.cpp @@ -203,13 +203,6 @@ ResourceView::~ResourceView() { } -void ResourceView::currentChanged(const QModelIndex ¤t, const QModelIndex &previous) -{ - Q_UNUSED(current) - Q_UNUSED(previous) - emit currentIndexChanged(); -} - bool ResourceView::isDirty() const { return m_qrcModel->dirty(); diff --git a/src/shared/qrceditor/resourceview.h b/src/shared/qrceditor/resourceview.h index a0da7df5977f9241959b99a0a4ab3b9b99be5c38..2e44da25a7f0d0268d1bccf088d707076a25d89d 100644 --- a/src/shared/qrceditor/resourceview.h +++ b/src/shared/qrceditor/resourceview.h @@ -139,14 +139,10 @@ protected: signals: void removeItem(); void dirtyChanged(bool b); - void currentIndexChanged(); void addFilesTriggered(const QString &prefix); void addPrefixTriggered(); -protected slots: - void currentChanged(const QModelIndex ¤t, const QModelIndex &previous); - private slots: void onEditAlias(); void onEditPrefix();