diff options
author | Trond Kjernaasen <trond@trolltech.com> | 2009-05-04 14:01:07 +0200 |
---|---|---|
committer | Trond Kjernaasen <trond@trolltech.com> | 2009-05-04 14:05:19 +0200 |
commit | c368a8ed6badab846c8e63c26d48b95788c12163 (patch) | |
tree | 12878ce07a0888fab4e62590fded704ce6093459 /src/gui/painting | |
parent | ea91eb38d81e37bd12d6abc2604f025ac1d254ce (diff) | |
download | qt4-tools-c368a8ed6badab846c8e63c26d48b95788c12163.tar.gz |
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 d61b933589..7d36582d1e 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) |