ui: Fix Qt depreaction warnings (#4195)
This commit is contained in:
parent
402c09e028
commit
56a51c7834
3 changed files with 6 additions and 6 deletions
|
@ -287,14 +287,14 @@ void AbstractCardItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||||
}
|
}
|
||||||
if (event->button() == Qt::LeftButton)
|
if (event->button() == Qt::LeftButton)
|
||||||
setCursor(Qt::ClosedHandCursor);
|
setCursor(Qt::ClosedHandCursor);
|
||||||
else if (event->button() == Qt::MidButton)
|
else if (event->button() == Qt::MiddleButton)
|
||||||
emit showCardInfoPopup(event->screenPos(), name);
|
emit showCardInfoPopup(event->screenPos(), name);
|
||||||
event->accept();
|
event->accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractCardItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
void AbstractCardItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||||
{
|
{
|
||||||
if (event->button() == Qt::MidButton)
|
if (event->button() == Qt::MiddleButton)
|
||||||
emit deleteCardInfoPopup(name);
|
emit deleteCardInfoPopup(name);
|
||||||
|
|
||||||
// This function ensures the parent function doesn't mess around with our selection.
|
// This function ensures the parent function doesn't mess around with our selection.
|
||||||
|
|
|
@ -127,7 +127,7 @@ void AbstractCounter::setValue(int _value)
|
||||||
void AbstractCounter::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
void AbstractCounter::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||||
{
|
{
|
||||||
if (isUnderMouse() && player->getLocalOrJudge()) {
|
if (isUnderMouse() && player->getLocalOrJudge()) {
|
||||||
if (event->button() == Qt::MidButton || (QApplication::keyboardModifiers() & Qt::ShiftModifier)) {
|
if (event->button() == Qt::MiddleButton || (QApplication::keyboardModifiers() & Qt::ShiftModifier)) {
|
||||||
if (menu)
|
if (menu)
|
||||||
menu->exec(event->screenPos());
|
menu->exec(event->screenPos());
|
||||||
event->accept();
|
event->accept();
|
||||||
|
|
|
@ -529,12 +529,12 @@ void ChatView::mousePressEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
switch (hoveredItemType) {
|
switch (hoveredItemType) {
|
||||||
case HoveredCard: {
|
case HoveredCard: {
|
||||||
if ((event->button() == Qt::MidButton) || (event->button() == Qt::LeftButton))
|
if ((event->button() == Qt::MiddleButton) || (event->button() == Qt::LeftButton))
|
||||||
emit showCardInfoPopup(event->globalPos(), hoveredContent);
|
emit showCardInfoPopup(event->globalPos(), hoveredContent);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case HoveredUser: {
|
case HoveredUser: {
|
||||||
if (event->button() != Qt::MidButton) {
|
if (event->button() != Qt::MiddleButton) {
|
||||||
const int delimiterIndex = hoveredContent.indexOf("_");
|
const int delimiterIndex = hoveredContent.indexOf("_");
|
||||||
const QString userName = hoveredContent.mid(delimiterIndex + 1);
|
const QString userName = hoveredContent.mid(delimiterIndex + 1);
|
||||||
switch (event->button()) {
|
switch (event->button()) {
|
||||||
|
@ -564,7 +564,7 @@ void ChatView::mousePressEvent(QMouseEvent *event)
|
||||||
|
|
||||||
void ChatView::mouseReleaseEvent(QMouseEvent *event)
|
void ChatView::mouseReleaseEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
if ((event->button() == Qt::MidButton) || (event->button() == Qt::LeftButton))
|
if ((event->button() == Qt::MiddleButton) || (event->button() == Qt::LeftButton))
|
||||||
emit deleteCardInfoPopup(QString("_"));
|
emit deleteCardInfoPopup(QString("_"));
|
||||||
|
|
||||||
QTextBrowser::mouseReleaseEvent(event);
|
QTextBrowser::mouseReleaseEvent(event);
|
||||||
|
|
Loading…
Reference in a new issue