diff options
author | Trond Kjernaasen <trond@trolltech.com> | 2009-05-04 12:01:07 (GMT) |
---|---|---|
committer | Trond Kjernaasen <trond@trolltech.com> | 2009-05-04 12:05:19 (GMT) |
commit | c368a8ed6badab846c8e63c26d48b95788c12163 (patch) | |
tree | 12878ce07a0888fab4e62590fded704ce6093459 /src/gui/painting | |
parent | ea91eb38d81e37bd12d6abc2604f025ac1d254ce (diff) | |
download | Qt-c368a8ed6badab846c8e63c26d48b95788c12163.zip Qt-c368a8ed6badab846c8e63c26d48b95788c12163.tar.gz Qt-c368a8ed6badab846c8e63c26d48b95788c12163.tar.bz2 |
Added an assert so that QColormap usage without a QApplication asserts.
Task-number: 252668
Reviewed-by: Samuel
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qcolormap_win.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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) |