summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qcolormap_win.cpp
diff options
context:
space:
mode:
authorTrond Kjernaasen <trond@trolltech.com>2009-05-04 14:01:07 +0200
committerTrond Kjernaasen <trond@trolltech.com>2009-05-04 14:05:19 +0200
commitc368a8ed6badab846c8e63c26d48b95788c12163 (patch)
tree12878ce07a0888fab4e62590fded704ce6093459 /src/gui/painting/qcolormap_win.cpp
parentea91eb38d81e37bd12d6abc2604f025ac1d254ce (diff)
Added an assert so that QColormap usage without a QApplication asserts.
Task-number: 252668 Reviewed-by: Samuel
Diffstat (limited to 'src/gui/painting/qcolormap_win.cpp')
-rw-r--r--src/gui/painting/qcolormap_win.cpp6
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)