Fix some warnings

This commit is contained in:
Méven Car 2021-09-01 19:26:46 +02:00
parent ca92dccbd8
commit 84dd746a2a
2 changed files with 5 additions and 2 deletions

View file

@ -581,8 +581,8 @@ void TestDataDevice::testReplaceSource()
// try to crash by destroying the data source, then requesting data
dataSource4.reset();
int pipeFds[2];
Q_ASSERT(pipe(pipeFds) == 0);
int pipeFds[2] = {0, 0};
QVERIFY(pipe(pipeFds) == 0);
dataOffer->receive(QStringLiteral("text/plain"), pipeFds[1]);
close(pipeFds[1]);

View file

@ -189,6 +189,9 @@ public:
case ZWP_TEXT_INPUT_V1_TEXT_DIRECTION_AUTO:
qtDirection = Qt::LayoutDirectionAuto;
break;
default:
Q_UNREACHABLE();
break;
}
Q_EMIT q->textDirection(serial, qtDirection);
}