Add the device view container widget to the tabbar

Fixes bugs related to the tabbar and the widgets being unresponsive

Fixes #279
Fixes #321
This commit is contained in:
Jonas Kvinge
2019-12-28 03:13:41 +01:00
parent bb38053cb3
commit 27a2fd298d
2 changed files with 5 additions and 9 deletions

View File

@@ -200,8 +200,7 @@ MainWindow::MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, co
collection_view_(new CollectionViewContainer(this)),
file_view_(new FileView(this)),
#ifndef Q_OS_WIN
device_view_container_(new DeviceViewContainer(this)),
device_view_(device_view_container_->view()),
device_view_(new DeviceViewContainer(this)),
#endif
playlist_list_(new PlaylistListContainer(this)),
queue_view_(new QueueView(this)),
@@ -214,8 +213,6 @@ MainWindow::MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, co
connect(cover_manager, SIGNAL(AddToPlaylist(QMimeData*)), this, SLOT(AddToPlaylist(QMimeData*)));
return cover_manager;
}),
//organise_dialog_(new OrganiseDialog(app_->task_manager())),
equalizer_(new Equalizer),
organise_dialog_([=]() {
OrganiseDialog *dialog = new OrganiseDialog(app->task_manager(), app->collection_backend());
@@ -329,7 +326,7 @@ MainWindow::MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, co
collection_view_->view()->setModel(collection_sort_model_);
collection_view_->view()->SetApplication(app_);
#ifndef Q_OS_WIN
device_view_->SetApplication(app_);
device_view_->view()->SetApplication(app_);
#endif
playlist_list_->SetApplication(app_);
@@ -539,7 +536,7 @@ MainWindow::MainWindow(Application *app, SystemTrayIcon *tray_icon, OSD *osd, co
#ifndef Q_OS_WIN
// Devices connections
connect(device_view_, SIGNAL(AddToPlaylistSignal(QMimeData*)), SLOT(AddToPlaylist(QMimeData*)));
connect(device_view_->view(), SIGNAL(AddToPlaylistSignal(QMimeData*)), SLOT(AddToPlaylist(QMimeData*)));
#endif
// Collection filter widget

View File

@@ -282,7 +282,7 @@ class MainWindow : public QMainWindow, public PlatformInterface {
#endif
Application *app_;
SystemTrayIcon *tray_icon_;
SystemTrayIcon *tray_icon_;
OSD *osd_;
Lazy<About> about_dialog_;
Lazy<EditTagDialog> edit_tag_dialog_;
@@ -294,8 +294,7 @@ class MainWindow : public QMainWindow, public PlatformInterface {
CollectionViewContainer *collection_view_;
FileView *file_view_;
#ifndef Q_OS_WIN
DeviceViewContainer *device_view_container_;
DeviceView *device_view_;
DeviceViewContainer *device_view_;
#endif
PlaylistListContainer *playlist_list_;
QueueView *queue_view_;