summaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/dialogs/messageboxpanel.cpp2
-rw-r--r--tests/manual/dialogs/wizardpanel.cpp2
-rw-r--r--tests/manual/qgraphicslayout/flicker/window.h2
-rw-r--r--tests/manual/rhi/hellominimalcrossgfxtriangle/hellominimalcrossgfxtriangle.cpp6
-rw-r--r--tests/manual/rhi/multiwindow/multiwindow.cpp6
-rw-r--r--tests/manual/rhi/multiwindow_threaded/multiwindow_threaded.cpp6
-rw-r--r--tests/manual/rhi/offscreen/offscreen.cpp6
-rw-r--r--tests/manual/rhi/shared/examplefw.h12
-rw-r--r--tests/manual/rhi/texuploads/texuploads.cpp10
-rw-r--r--tests/manual/rhi/triquadcube/texturedcuberenderer.cpp2
-rw-r--r--tests/manual/rhi/triquadcube/triangleoncuberenderer.cpp2
-rw-r--r--tests/manual/windowflags/controls.cpp2
12 files changed, 29 insertions, 29 deletions
diff --git a/tests/manual/dialogs/messageboxpanel.cpp b/tests/manual/dialogs/messageboxpanel.cpp
index ef6731cd74..07b387f988 100644
--- a/tests/manual/dialogs/messageboxpanel.cpp
+++ b/tests/manual/dialogs/messageboxpanel.cpp
@@ -133,7 +133,7 @@ void MessageBoxPanel::setupMessageBox(QMessageBox &box)
bool ok;
QMessageBox::StandardButtons btns = (QMessageBox::StandardButtons) btnHexText.toUInt(&ok, 16);
box.setStandardButtons((QMessageBox::StandardButtons) btns);
- if (box.standardButtons() == (QMessageBox::StandardButtons) 0)
+ if (box.standardButtons() == QMessageBox::StandardButtons())
box.setStandardButtons(QMessageBox::Ok); // just to have something.
#if QT_VERSION >= 0x050000
diff --git a/tests/manual/dialogs/wizardpanel.cpp b/tests/manual/dialogs/wizardpanel.cpp
index 0e5a18fe8c..8e8af5f556 100644
--- a/tests/manual/dialogs/wizardpanel.cpp
+++ b/tests/manual/dialogs/wizardpanel.cpp
@@ -198,7 +198,7 @@ void WizardOptionsControl::setWizardOptions(int options)
class Wizard : public QWizard {
Q_OBJECT
public:
- explicit Wizard(QWidget *parent = 0, Qt::WindowFlags flags = 0);
+ explicit Wizard(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
public slots:
void changeWizardStyle(int newStyle);
diff --git a/tests/manual/qgraphicslayout/flicker/window.h b/tests/manual/qgraphicslayout/flicker/window.h
index c49b82704e..b2ebe60af4 100644
--- a/tests/manual/qgraphicslayout/flicker/window.h
+++ b/tests/manual/qgraphicslayout/flicker/window.h
@@ -74,7 +74,7 @@ class Window;
class SlowWidget : public QGraphicsWidget {
public:
- SlowWidget(QGraphicsWidget *w = 0, Qt::WindowFlags wFlags = 0) : QGraphicsWidget(w, wFlags)
+ SlowWidget(QGraphicsWidget *w = nullptr, Qt::WindowFlags wFlags = {}) : QGraphicsWidget(w, wFlags)
{
m_window = 0;
}
diff --git a/tests/manual/rhi/hellominimalcrossgfxtriangle/hellominimalcrossgfxtriangle.cpp b/tests/manual/rhi/hellominimalcrossgfxtriangle/hellominimalcrossgfxtriangle.cpp
index ea1fefc308..9b03a48bfe 100644
--- a/tests/manual/rhi/hellominimalcrossgfxtriangle/hellominimalcrossgfxtriangle.cpp
+++ b/tests/manual/rhi/hellominimalcrossgfxtriangle/hellominimalcrossgfxtriangle.cpp
@@ -77,7 +77,7 @@
#include <QtGui/private/qrhid3d11_p.h>
#endif
-#ifdef Q_OS_DARWIN
+#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
#include <QtGui/private/qrhimetal_p.h>
#endif
@@ -283,7 +283,7 @@ void Window::init()
}
#endif
-#ifdef Q_OS_DARWIN
+#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
if (graphicsApi == Metal) {
QRhiMetalInitParams params;
m_r = QRhi::create(QRhi::Metal, &params);
@@ -483,7 +483,7 @@ int main(int argc, char **argv)
// Defaults.
#if defined(Q_OS_WIN)
graphicsApi = D3D11;
-#elif defined(Q_OS_DARWIN)
+#elif defined(Q_OS_MACOS) || defined(Q_OS_IOS)
graphicsApi = Metal;
#elif QT_CONFIG(vulkan)
graphicsApi = Vulkan;
diff --git a/tests/manual/rhi/multiwindow/multiwindow.cpp b/tests/manual/rhi/multiwindow/multiwindow.cpp
index 4d5de16a58..5fb5bb22ab 100644
--- a/tests/manual/rhi/multiwindow/multiwindow.cpp
+++ b/tests/manual/rhi/multiwindow/multiwindow.cpp
@@ -78,7 +78,7 @@
#include <QtGui/private/qrhid3d11_p.h>
#endif
-#ifdef Q_OS_DARWIN
+#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
#include <QtGui/private/qrhimetal_p.h>
#endif
@@ -148,7 +148,7 @@ void createRhi()
}
#endif
-#ifdef Q_OS_DARWIN
+#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
if (graphicsApi == Metal) {
QRhiMetalInitParams params;
r.r = QRhi::create(QRhi::Metal, &params);
@@ -530,7 +530,7 @@ int main(int argc, char **argv)
#if defined(Q_OS_WIN)
graphicsApi = D3D11;
-#elif defined(Q_OS_DARWIN)
+#elif defined(Q_OS_MACOS) || defined(Q_OS_IOS)
graphicsApi = Metal;
#elif QT_CONFIG(vulkan)
graphicsApi = Vulkan;
diff --git a/tests/manual/rhi/multiwindow_threaded/multiwindow_threaded.cpp b/tests/manual/rhi/multiwindow_threaded/multiwindow_threaded.cpp
index 37c6cd04c3..75a1590d94 100644
--- a/tests/manual/rhi/multiwindow_threaded/multiwindow_threaded.cpp
+++ b/tests/manual/rhi/multiwindow_threaded/multiwindow_threaded.cpp
@@ -82,7 +82,7 @@
#include <QtGui/private/qrhid3d11_p.h>
#endif
-#ifdef Q_OS_DARWIN
+#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
#include <QtGui/private/qrhimetal_p.h>
#endif
@@ -376,7 +376,7 @@ void Renderer::createRhi()
}
#endif
-#ifdef Q_OS_DARWIN
+#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
if (graphicsApi == Metal) {
QRhiMetalInitParams params;
r = QRhi::create(QRhi::Metal, &params, rhiFlags);
@@ -730,7 +730,7 @@ int main(int argc, char **argv)
#if defined(Q_OS_WIN)
graphicsApi = D3D11;
-#elif defined(Q_OS_DARWIN)
+#elif defined(Q_OS_MACOS) || defined(Q_OS_IOS)
graphicsApi = Metal;
#elif QT_CONFIG(vulkan)
graphicsApi = Vulkan;
diff --git a/tests/manual/rhi/offscreen/offscreen.cpp b/tests/manual/rhi/offscreen/offscreen.cpp
index 79e50d3dd4..31c0632be1 100644
--- a/tests/manual/rhi/offscreen/offscreen.cpp
+++ b/tests/manual/rhi/offscreen/offscreen.cpp
@@ -72,7 +72,7 @@
#include <QtGui/private/qrhid3d11_p.h>
#endif
-#ifdef Q_OS_DARWIN
+#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
#include <QtGui/private/qrhimetal_p.h>
#endif
@@ -130,7 +130,7 @@ int main(int argc, char **argv)
#if defined(Q_OS_WIN)
graphicsApi = D3D11;
-#elif defined(Q_OS_DARWIN)
+#elif defined(Q_OS_MACOS) || defined(Q_OS_IOS)
graphicsApi = Metal;
#elif QT_CONFIG(vulkan)
graphicsApi = Vulkan;
@@ -217,7 +217,7 @@ int main(int argc, char **argv)
}
#endif
-#ifdef Q_OS_DARWIN
+#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
if (graphicsApi == Metal) {
QRhiMetalInitParams params;
r = QRhi::create(QRhi::Metal, &params);
diff --git a/tests/manual/rhi/shared/examplefw.h b/tests/manual/rhi/shared/examplefw.h
index d28bbea0a8..dc388274d7 100644
--- a/tests/manual/rhi/shared/examplefw.h
+++ b/tests/manual/rhi/shared/examplefw.h
@@ -78,7 +78,7 @@
#include <QtGui/private/qrhid3d11_p.h>
#endif
-#ifdef Q_OS_DARWIN
+#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
#include <QtGui/private/qrhimetal_p.h>
#endif
@@ -123,9 +123,9 @@ QString graphicsApiName()
QRhi::Flags rhiFlags = QRhi::EnableDebugMarkers;
int sampleCount = 1;
-QRhiSwapChain::Flags scFlags = 0;
-QRhi::BeginFrameFlags beginFrameFlags = 0;
-QRhi::EndFrameFlags endFrameFlags = 0;
+QRhiSwapChain::Flags scFlags;
+QRhi::BeginFrameFlags beginFrameFlags;
+QRhi::EndFrameFlags endFrameFlags;
int framesUntilTdr = -1;
bool transparentBackground = false;
@@ -292,7 +292,7 @@ void Window::init()
}
#endif
-#ifdef Q_OS_DARWIN
+#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
if (graphicsApi == Metal) {
QRhiMetalInitParams params;
m_r = QRhi::create(QRhi::Metal, &params, rhiFlags);
@@ -445,7 +445,7 @@ int main(int argc, char **argv)
// Defaults.
#if defined(Q_OS_WIN)
graphicsApi = D3D11;
-#elif defined(Q_OS_DARWIN)
+#elif defined(Q_OS_MACOS) || defined(Q_OS_IOS)
graphicsApi = Metal;
#elif QT_CONFIG(vulkan)
graphicsApi = Vulkan;
diff --git a/tests/manual/rhi/texuploads/texuploads.cpp b/tests/manual/rhi/texuploads/texuploads.cpp
index 4c10a6b965..a6b7d87d3e 100644
--- a/tests/manual/rhi/texuploads/texuploads.cpp
+++ b/tests/manual/rhi/texuploads/texuploads.cpp
@@ -237,11 +237,11 @@ void Window::customRender()
// Exercise texture object export/import.
if (d.testStage == 6) {
- const QRhiNativeHandles *h = d.tex->nativeHandles();
- if (h) {
-#ifdef Q_OS_DARWIN
+ const QRhiTexture::NativeTexture nativeTexture = d.tex->nativeTexture();
+ if (nativeTexture.object) {
+#if defined(Q_OS_MACOS) || defined(Q_OS_IOS)
if (graphicsApi == Metal) {
- qDebug() << "Metal texture: " << static_cast<const QRhiMetalTextureNativeHandles *>(h)->texture;
+ qDebug() << "Metal texture: " << *(void**)nativeTexture.object;
// Now could cast to id<MTLTexture> and do something with
// it, keeping in mind that copy operations are only done
// in beginPass, while rendering into a texture may only
@@ -253,7 +253,7 @@ void Window::customRender()
d.importedTex = m_r->newTexture(QRhiTexture::RGBA8, d.tex->pixelSize());
d.releasePool << d.importedTex;
- if (!d.importedTex->buildFrom(h))
+ if (!d.importedTex->buildFrom(nativeTexture))
qWarning("Texture import failed");
// now d.tex and d.importedTex use the same MTLTexture
diff --git a/tests/manual/rhi/triquadcube/texturedcuberenderer.cpp b/tests/manual/rhi/triquadcube/texturedcuberenderer.cpp
index 8c5845d4fc..d8dea6d91f 100644
--- a/tests/manual/rhi/triquadcube/texturedcuberenderer.cpp
+++ b/tests/manual/rhi/triquadcube/texturedcuberenderer.cpp
@@ -78,7 +78,7 @@ void TexturedCubeRenderer::initResources(QRhiRenderPassDescriptor *rp)
m_ubuf->build();
m_image = QImage(QLatin1String(":/qt256.png")).convertToFormat(QImage::Format_RGBA8888);
- QRhiTexture::Flags texFlags = 0;
+ QRhiTexture::Flags texFlags;
if (MIPMAP)
texFlags |= QRhiTexture::MipMapped;
if (AUTOGENMIPMAP)
diff --git a/tests/manual/rhi/triquadcube/triangleoncuberenderer.cpp b/tests/manual/rhi/triquadcube/triangleoncuberenderer.cpp
index 250ae3a2ee..3a58eed6ce 100644
--- a/tests/manual/rhi/triquadcube/triangleoncuberenderer.cpp
+++ b/tests/manual/rhi/triquadcube/triangleoncuberenderer.cpp
@@ -158,7 +158,7 @@ void TriangleOnCubeRenderer::initResources(QRhiRenderPassDescriptor *rp)
m_ps->build();
- QRhiTextureRenderTarget::Flags rtFlags = 0;
+ QRhiTextureRenderTarget::Flags rtFlags;
if (IMAGE_UNDER_OFFSCREEN_RENDERING)
rtFlags |= QRhiTextureRenderTarget::PreserveColorContents;
diff --git a/tests/manual/windowflags/controls.cpp b/tests/manual/windowflags/controls.cpp
index c167e5f8bf..b999a59abe 100644
--- a/tests/manual/windowflags/controls.cpp
+++ b/tests/manual/windowflags/controls.cpp
@@ -95,7 +95,7 @@ HintControl::HintControl(QWidget *parent)
Qt::WindowFlags HintControl::hints() const
{
- Qt::WindowFlags flags = 0;
+ Qt::WindowFlags flags;
if (msWindowsFixedSizeDialogCheckBox->isChecked())
flags |= Qt::MSWindowsFixedSizeDialogHint;
if (x11BypassWindowManagerCheckBox->isChecked())