remove qapp dependency

graphicssystems are not relevant in any case with qpa, so
we simply use the fallback case.
bb10
Lars Knoll 2011-05-03 10:35:49 +02:00
parent eba9bad431
commit 806e026043
1 changed files with 1 additions and 4 deletions

View File

@ -45,7 +45,6 @@
#include "qvariant.h"
#include <qpainter.h>
#include <private/qgraphicssystem_p.h>
#include <private/qapplication_p.h>
QT_BEGIN_NAMESPACE
@ -275,9 +274,7 @@ QBitmap QBitmap::fromImage(const QImage &image, Qt::ImageConversionFlags flags)
img.setColor(1, c0);
}
QGraphicsSystem* gs = QApplicationPrivate::graphicsSystem();
QScopedPointer<QPixmapData> data(gs ? gs->createPixmapData(QPixmapData::BitmapType)
: QGraphicsSystem::createDefaultPixmapData(QPixmapData::BitmapType));
QScopedPointer<QPixmapData> data(QGraphicsSystem::createDefaultPixmapData(QPixmapData::BitmapType));
data->fromImage(img, flags | Qt::MonoOnly);
return QPixmap(data.take());