diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index b62b415c22..445f080fe4 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -1663,8 +1663,11 @@ void GuiDocument::updateModuleInfo() //Module description bool const focus_on_selected = selectionManager->selectedFocused(); - QListView const * const lv = - focus_on_selected ? modulesModule->selectedLV : modulesModule->availableLV; + QAbstractItemView * lv; + if (focus_on_selected) + lv = modulesModule->selectedLV; + else + lv= modulesModule->availableLV; if (lv->selectionModel()->selectedIndexes().isEmpty()) { modulesModule->infoML->document()->clear(); return; diff --git a/src/frontends/qt4/GuiSelectionManager.cpp b/src/frontends/qt4/GuiSelectionManager.cpp index 5284d27d6e..c1d33b4178 100644 --- a/src/frontends/qt4/GuiSelectionManager.cpp +++ b/src/frontends/qt4/GuiSelectionManager.cpp @@ -28,7 +28,7 @@ namespace lyx { namespace frontend { GuiSelectionManager::GuiSelectionManager( - QListView * avail, + QAbstractItemView * avail, QListView * sel, QPushButton * add, QPushButton * del, diff --git a/src/frontends/qt4/GuiSelectionManager.h b/src/frontends/qt4/GuiSelectionManager.h index 2e9c747363..ddb7d2c665 100644 --- a/src/frontends/qt4/GuiSelectionManager.h +++ b/src/frontends/qt4/GuiSelectionManager.h @@ -19,6 +19,7 @@ class QModelIndex; class QListView; class QPushButton; class QVariant; +class QAbstractItemView; template class QMap; namespace lyx { @@ -39,7 +40,7 @@ class GuiSelectionManager : public QObject public: /// GuiSelectionManager( - QListView * availableLV, + QAbstractItemView * availableLV, QListView * selectedLV, QPushButton * addPB, QPushButton * delPB, @@ -84,7 +85,7 @@ protected: /// bool insertRowToSelected(int i, QMap const & itemData); /// - QListView * availableLV; + QAbstractItemView * availableLV; /// QListView * selectedLV; ///