From c368a8ed6badab846c8e63c26d48b95788c12163 Mon Sep 17 00:00:00 2001 From: Trond Kjernaasen Date: Mon, 4 May 2009 14:01:07 +0200 Subject: Added an assert so that QColormap usage without a QApplication asserts. Task-number: 252668 Reviewed-by: Samuel --- src/gui/painting/qcolormap_win.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/painting/qcolormap_win.cpp b/src/gui/painting/qcolormap_win.cpp index d61b933..7d36582 100644 --- a/src/gui/painting/qcolormap_win.cpp +++ b/src/gui/painting/qcolormap_win.cpp @@ -138,7 +138,11 @@ void QColormap::cleanup() } QColormap QColormap::instance(int) -{ return QColormap(); } +{ + Q_ASSERT_X(screenMap, "QColormap", + "A QApplication object needs to be constructed before QColormap is used."); + return QColormap(); +} QColormap::QColormap() : d(screenMap) -- cgit v0.12