summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authoraavit <qt-info@nokia.com>2011-03-04 13:50:11 (GMT)
committeraavit <qt-info@nokia.com>2011-03-04 13:50:11 (GMT)
commit74a92ce0858b93a9c110c93bd0fb94163d1ee210 (patch)
treeaac7cd421080b3b5cfbdc2aa9d4d2f1492ae3add /src/gui/image
parent5b77390228cfc32a48a34edbc3077f7755b4e7b0 (diff)
parentbfcd2cabf7b5bc15105c968f80f71132efb65759 (diff)
downloadQt-74a92ce0858b93a9c110c93bd0fb94163d1ee210.zip
Qt-74a92ce0858b93a9c110c93bd0fb94163d1ee210.tar.gz
Qt-74a92ce0858b93a9c110c93bd0fb94163d1ee210.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-team
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qpixmap.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index f896572..71fb079 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -112,8 +112,13 @@ void QPixmap::init(int w, int h, Type type)
init(w, h, int(type));
}
+extern QApplication::Type qt_appType;
+
void QPixmap::init(int w, int h, int type)
{
+ if (qt_appType == QApplication::Tty)
+ qFatal("QPixmap: Cannot create a QPixmap when no GUI is being used");
+
if ((w > 0 && h > 0) || type == QPixmapData::BitmapType)
data = QPixmapData::create(w, h, (QPixmapData::PixelType) type);
else