summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-03-09 20:19:33 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-03-09 20:19:33 (GMT)
commiteec2c615443d02ea5d9b2407336218c55956151e (patch)
treec0718c2b03df45f56a3d3536f5780c308ca21067 /src
parent68229f50480f4b3768e64cdba4d5ca0cc9534aa7 (diff)
parentd20a1d3ba89dfb75fec829128b89603f89337624 (diff)
downloadQt-eec2c615443d02ea5d9b2407336218c55956151e.zip
Qt-eec2c615443d02ea5d9b2407336218c55956151e.tar.gz
Qt-eec2c615443d02ea5d9b2407336218c55956151e.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Removed obsolete documentation from QPixmap. Fixed auto-test failures caused by a3a79fefe65ec12. Improved error msg Place cursor at the end of the selected range Fail in a nicer way when QPixmap is used in a non-GUI application. Build fix for shadow built Qt Make updating single baseline work again Updated for new git repo structure Re-added the update-all-baselines command
Diffstat (limited to 'src')
-rw-r--r--src/gui/image/qpixmap.cpp18
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm2
2 files changed, 9 insertions, 11 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index f896572..021f281 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -112,8 +112,16 @@ 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) {
+ qWarning("QPixmap: Cannot create a QPixmap when no GUI is being used");
+ data = 0;
+ return;
+ }
+
if ((w > 0 && h > 0) || type == QPixmapData::BitmapType)
data = QPixmapData::create(w, h, (QPixmapData::PixelType) type);
else
@@ -1636,16 +1644,6 @@ QPixmap QPixmap::transformed(const QMatrix &matrix, Qt::TransformationMode mode)
{Implicit Data Sharing} documentation. QPixmap objects can also be
streamed.
- Depending on the system, QPixmap is stored using a RGB32 or a
- premultiplied alpha format. If the image has an alpha channel, and
- if the system allows, the preferred format is premultiplied alpha.
- Note also that QPixmap, unlike QImage, may be hardware dependent.
- On X11, Mac and Symbian, a QPixmap is stored on the server side while
- a QImage is stored on the client side (on Windows, these two classes
- have an equivalent internal representation, i.e. both QImage and
- QPixmap are stored on the client side and don't use any GDI
- resources).
-
Note that the pixel data in a pixmap is internal and is managed by
the underlying window system. Because QPixmap is a QPaintDevice
subclass, QPainter can be used to draw directly onto pixmaps.
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index ff2dfe7..5e8b37e 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -983,7 +983,7 @@ static int qCocoaViewCount = 0;
QString qtText;
// Cursor position is retrived from the range.
QList<QInputMethodEvent::Attribute> attrs;
- attrs<<QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, selRange.location, 1, QVariant());
+ attrs<<QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, selRange.location + selRange.length, 1, QVariant());
if ([aString isKindOfClass:[NSAttributedString class]]) {
qtText = QCFString::toQString(reinterpret_cast<CFStringRef>([aString string]));
composingLength = qtText.length();