From a09e518f6589fff7789ad7224badf24593240711 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 1 Jul 2022 09:25:29 +0200 Subject: rhi: Make it possible to query the backend name beforehand The goal is to make it possible to implement QSGRhiSupport::backendName() in Qt Quick with just a single line: return QString::fromUtf8(QRhi::backendName(m_rhiBackend)); instead of duplicating the strings and the logic. Similarly, QBackingStoreRhiSupport can now drop its apiName() helper entirely. Change-Id: Ia8cbb1f1243539ed4d7a98e71dcc2ed56b017e40 Reviewed-by: Qt CI Bot Reviewed-by: Andy Nichols --- tests/auto/gui/rhi/qrhi/tst_qrhi.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/auto/gui/rhi') diff --git a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp index 6409c43bc4..799cc0743d 100644 --- a/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp +++ b/tests/auto/gui/rhi/qrhi/tst_qrhi.cpp @@ -255,6 +255,7 @@ void tst_QRhi::create() QCOMPARE(rhi->backend(), impl); QVERIFY(strcmp(rhi->backendName(), "")); + QVERIFY(!strcmp(rhi->backendName(), QRhi::backendName(rhi->backend()))); QVERIFY(!rhi->driverInfo().deviceName.isEmpty()); QCOMPARE(rhi->thread(), QThread::currentThread()); -- cgit v1.2.3