Replace Qt::MidButton with Qt::MiddleButton
This commit is contained in:
parent
1ae4938da3
commit
d23da7a612
|
@ -130,7 +130,7 @@ void PlaylistTabBar::contextMenuEvent(QContextMenuEvent *e) {
|
||||||
|
|
||||||
void PlaylistTabBar::mouseReleaseEvent(QMouseEvent *e) {
|
void PlaylistTabBar::mouseReleaseEvent(QMouseEvent *e) {
|
||||||
|
|
||||||
if (e->button() == Qt::MidButton) {
|
if (e->button() == Qt::MiddleButton) {
|
||||||
// Update menu index
|
// Update menu index
|
||||||
menu_index_ = tabAt(e->pos());
|
menu_index_ = tabAt(e->pos());
|
||||||
Close();
|
Close();
|
||||||
|
@ -145,7 +145,7 @@ void PlaylistTabBar::mouseDoubleClickEvent(QMouseEvent *e) {
|
||||||
int index = tabAt(e->pos());
|
int index = tabAt(e->pos());
|
||||||
|
|
||||||
// Discard a double click with the middle button
|
// Discard a double click with the middle button
|
||||||
if (e->button() != Qt::MidButton) {
|
if (e->button() != Qt::MiddleButton) {
|
||||||
if (index == -1) {
|
if (index == -1) {
|
||||||
new_->activate(QAction::Trigger);
|
new_->activate(QAction::Trigger);
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,7 +126,7 @@ void AutoExpandingTreeView::mousePressEvent(QMouseEvent *event) {
|
||||||
QTreeView::mousePressEvent(event);
|
QTreeView::mousePressEvent(event);
|
||||||
|
|
||||||
//enqueue to playlist with middleClick
|
//enqueue to playlist with middleClick
|
||||||
if (event->button() == Qt::MidButton) {
|
if (event->button() == Qt::MiddleButton) {
|
||||||
QMimeData *q_mimedata = model()->mimeData(selectedIndexes());
|
QMimeData *q_mimedata = model()->mimeData(selectedIndexes());
|
||||||
if (MimeData *mimedata = qobject_cast<MimeData*>(q_mimedata)) {
|
if (MimeData *mimedata = qobject_cast<MimeData*>(q_mimedata)) {
|
||||||
mimedata->enqueue_now_ = true;
|
mimedata->enqueue_now_ = true;
|
||||||
|
|
|
@ -178,7 +178,7 @@ void FileViewList::mousePressEvent(QMouseEvent *e) {
|
||||||
emit Forward();
|
emit Forward();
|
||||||
break;
|
break;
|
||||||
// enqueue to playlist with middleClick
|
// enqueue to playlist with middleClick
|
||||||
case Qt::MidButton: {
|
case Qt::MiddleButton: {
|
||||||
QListView::mousePressEvent(e);
|
QListView::mousePressEvent(e);
|
||||||
|
|
||||||
// we need to update the menu selection
|
// we need to update the menu selection
|
||||||
|
|
|
@ -62,8 +62,8 @@ void TrackSliderSlider::mousePressEvent(QMouseEvent* e) {
|
||||||
int abs_buttons = style()->styleHint(QStyle::SH_Slider_AbsoluteSetButtons);
|
int abs_buttons = style()->styleHint(QStyle::SH_Slider_AbsoluteSetButtons);
|
||||||
if (abs_buttons & Qt::LeftButton)
|
if (abs_buttons & Qt::LeftButton)
|
||||||
new_button = Qt::LeftButton;
|
new_button = Qt::LeftButton;
|
||||||
else if (abs_buttons & Qt::MidButton)
|
else if (abs_buttons & Qt::MiddleButton)
|
||||||
new_button = Qt::MidButton;
|
new_button = Qt::MiddleButton;
|
||||||
else if (abs_buttons & Qt::RightButton)
|
else if (abs_buttons & Qt::RightButton)
|
||||||
new_button = Qt::RightButton;
|
new_button = Qt::RightButton;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue