Fix build with -no-feature-menu
Change-Id: I29a230d70a96c3037f4e07dbe23fce13aa869089 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>bb10
parent
b0cb4a80e5
commit
8f26ff0dee
|
|
@ -364,9 +364,11 @@ void QSidebar::setModelAndUrls(QFileSystemModel *model, const QList<QUrl> &newUr
|
|||
#if QT_CONFIG(draganddrop)
|
||||
setDragDropMode(QAbstractItemView::DragDrop);
|
||||
#endif
|
||||
#if QT_CONFIG(menu)
|
||||
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(this, &QSidebar::customContextMenuRequested,
|
||||
this, &QSidebar::showContextMenu);
|
||||
#endif
|
||||
urlModel->setUrls(newUrls);
|
||||
setCurrentIndex(this->model()->index(0,0));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue