From cd964c04421042d430ef067608956e30ea5a5b74 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 4 Mar 2016 11:41:36 +0100 Subject: [PATCH] QPdf: replace a hand-written qWarning with Q_UNIMPLEMENTED But keep the 'Implement me' as a comment. Remove default label from the switch to indicate that the warning is only for the conical gradient case, and not for the NoGradient case. Also enables compiler warnings should we ever decide to add another gradient type. Change-Id: I891e652ff0293b4b4c254c7a55ebc6120b4fbcb6 Reviewed-by: Kai Koehne Reviewed-by: Giuseppe D'Angelo --- src/gui/painting/qpdf.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index 10f0fcc21d..8189351bd8 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -2215,8 +2215,10 @@ int QPdfEnginePrivate::generateGradientShader(const QGradient *gradient, const Q case QGradient::RadialGradient: return generateRadialGradientShader(static_cast(gradient), matrix, alpha); case QGradient::ConicalGradient: - default: - qWarning("Implement me!"); + Q_UNIMPLEMENTED(); // ### Implement me! + break; + case QGradient::NoGradient: + break; } return 0; }