summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2011-03-24 16:18:52 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2011-03-24 16:18:52 (GMT)
commitf09b8e7b134c8dfe7e50d64662e943273d721d9a (patch)
tree19b13cbe46a5c676327c3b4098e527f465469523
parent295fbcba490712fe6e6f61926836920366134b55 (diff)
parent660f881f04a0880c83a0b43b4f4d0e89da082d92 (diff)
downloadQt-f09b8e7b134c8dfe7e50d64662e943273d721d9a.zip
Qt-f09b8e7b134c8dfe7e50d64662e943273d721d9a.tar.gz
Qt-f09b8e7b134c8dfe7e50d64662e943273d721d9a.tar.bz2
Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7
Conflicts: src/opengl/qwindowsurface_gl.cpp
-rw-r--r--demos/embedded/qmlflickr/qmlflickr.pro3
-rw-r--r--dist/changes-4.7.347
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp38
-rw-r--r--src/gui/styles/qs60style.cpp13
-rw-r--r--src/gui/styles/qs60style_s60.cpp1
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp4
-rw-r--r--src/opengl/opengl.pro2
-rw-r--r--src/opengl/qgl_symbian.cpp21
-rw-r--r--src/opengl/qgltexturepool.cpp7
-rw-r--r--src/opengl/qwindowsurface_gl.cpp31
-rw-r--r--src/openvg/qpaintengine_vg.cpp101
-rw-r--r--src/plugins/audio/audio.pro3
-rw-r--r--src/plugins/bearer/icd/dbusdispatcher.cpp9
-rw-r--r--src/plugins/bearer/icd/qnetworksession_impl.cpp14
-rw-r--r--src/plugins/plugins.pro1
-rw-r--r--tools/linguist/lconvert/main.cpp2
-rw-r--r--tools/linguist/lupdate/main.cpp71
17 files changed, 283 insertions, 85 deletions
diff --git a/demos/embedded/qmlflickr/qmlflickr.pro b/demos/embedded/qmlflickr/qmlflickr.pro
index 39b316a..8d4e032 100644
--- a/demos/embedded/qmlflickr/qmlflickr.pro
+++ b/demos/embedded/qmlflickr/qmlflickr.pro
@@ -8,5 +8,6 @@ symbian {
TARGET.UID3 = 0x$$qmlflickr_uid3 # defined in deployment.pri
include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri)
TARGET.CAPABILITY = NetworkServices
- TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
+ # Maximum heap size set to 128 MB in order to allow loading large images.
+ TARGET.EPOCHEAPSIZE = 0x20000 0x8000000
}
diff --git a/dist/changes-4.7.3 b/dist/changes-4.7.3
index e69de29..fa8a71e 100644
--- a/dist/changes-4.7.3
+++ b/dist/changes-4.7.3
@@ -0,0 +1,47 @@
+Qt 4.7.3 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.7.0. For more details,
+refer to the online documentation included in this distribution. The
+documentation is also available online:
+
+http://qt.nokia.com/doc/4.7
+
+The Qt version 4.7 series is binary compatible with the 4.6.x series.
+Applications compiled for 4.6 will continue to run with 4.7.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker or the Merge Request queue
+of the public source repository.
+
+Qt Bug Tracker: http://bugreports.qt.nokia.com
+Merge Request: http://qt.gitorious.org
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+Qt for Symbian
+--------------
+
+- Bearer Management
+* [QTBUG-15108] Deadlock between SymbianEngine mutex and
+QNetworkConfigurationPrivate mutex in the symbian bearer code
+* [QTBUG-17627] qnetworksession.h Q_DECLARE_METATYPE breaks building
+QtMobility QtBearer depending applications
+
+- GraphicsView
+* [QTBUG-17966] Major regression in QGraphicsView OpenVG backend
+
+- Declarative
+* [QTBUG-17503] Export qml debugging symbols on Symbian
+
+- Widgets
+* [QTBUG-17786] BC between Qt 4.7.3 and 4.6.3 QTreeView::indexRowSizeHint
+doesn't return correct value on Symbian for row when QPushButton widget is
+inserted in the treeview
+
+- Painting
+* [QTBUG-17907] tst_QGraphicsTransform::rotation3d test case from
+tests/auto/qgraphicstransfor is failed for some rotation angle on
+Symbian^3 devices
+* [QTBUG-18154] Symbian's QPixmap::logicalDpi[X\Y]() incorrectly
+returns MAXINT
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 9d8dd41..41abe95 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -330,6 +330,23 @@ bool QCoeFepInputContext::symbianFilterEvent(QWidget *keyWidget, const QSymbianE
// This should also happen for commands.
reset();
+ if (event->type() == QSymbianEvent::WindowServerEvent
+ && event->windowServerEvent()
+ && event->windowServerEvent()->Type() == EEventWindowVisibilityChanged
+ && S60->splitViewLastWidget) {
+
+ QGraphicsView *gv = qobject_cast<QGraphicsView*>(S60->splitViewLastWidget);
+ const bool alwaysResize = (gv && gv->verticalScrollBarPolicy() != Qt::ScrollBarAlwaysOff);
+
+ if (alwaysResize) {
+ TUint visibleFlags = event->windowServerEvent()->VisibilityChanged()->iFlags;
+ if (visibleFlags & TWsVisibilityChangedEvent::EPartiallyVisible)
+ ensureFocusWidgetVisible(S60->splitViewLastWidget);
+ if (visibleFlags & TWsVisibilityChangedEvent::ENotVisible)
+ resetSplitViewWidget(true);
+ }
+ }
+
return false;
}
@@ -393,8 +410,11 @@ void QCoeFepInputContext::resetSplitViewWidget(bool keepInputWidget)
windowToMove->setUpdatesEnabled(false);
if (!alwaysResize) {
- if (gv->scene()) {
- if (gv->scene()->focusItem())
+ if (gv->scene() && gv->scene()->focusItem()) {
+ // Check if the widget contains cursorPositionChanged signal and disconnect from it.
+ QByteArray signal = QMetaObject::normalizedSignature(SIGNAL(cursorPositionChanged()));
+ int index = gv->scene()->focusItem()->toGraphicsObject()->metaObject()->indexOfSignal(signal.right(signal.length() - 1));
+ if (index != -1)
disconnect(gv->scene()->focusItem()->toGraphicsObject(), SIGNAL(cursorPositionChanged()), this, SLOT(translateInputWidget()));
QGraphicsItem *rootItem;
foreach (QGraphicsItem *item, gv->scene()->items()) {
@@ -484,6 +504,13 @@ void QCoeFepInputContext::ensureFocusWidgetVisible(QWidget *widget)
// states getting changed.
if (!moveWithinVisibleArea) {
+ // Check if the widget contains cursorPositionChanged signal and connect to it.
+ QByteArray signal = QMetaObject::normalizedSignature(SIGNAL(cursorPositionChanged()));
+ if (gv->scene() && gv->scene()->focusItem()) {
+ int index = gv->scene()->focusItem()->toGraphicsObject()->metaObject()->indexOfSignal(signal.right(signal.length() - 1));
+ if (index != -1)
+ connect(gv->scene()->focusItem()->toGraphicsObject(), SIGNAL(cursorPositionChanged()), this, SLOT(translateInputWidget()));
+ }
S60->splitViewLastWidget = widget;
m_splitViewPreviousWindowStates = windowToMove->windowState();
}
@@ -520,13 +547,6 @@ void QCoeFepInputContext::ensureFocusWidgetVisible(QWidget *widget)
}
windowToMove->setUpdatesEnabled(true);
} else {
- if (!moveWithinVisibleArea) {
- // Check if the widget contains cursorPositionChanged signal and connect to it.
- const char *signal = QMetaObject::normalizedSignature(SIGNAL(cursorPositionChanged())).constData();
- int index = gv->scene()->focusItem()->toGraphicsObject()->metaObject()->indexOfSignal(signal + 1);
- if (index != -1)
- connect(gv->scene()->focusItem()->toGraphicsObject(), SIGNAL(cursorPositionChanged()), this, SLOT(translateInputWidget()));
- }
translateInputWidget();
}
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 7a89478..ac897b5 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -3353,9 +3353,9 @@ bool QS60Style::event(QEvent *e)
QIcon QS60Style::standardIconImplementation(StandardPixmap standardIcon,
const QStyleOption *option, const QWidget *widget) const
{
- const int iconDimension = QS60StylePrivate::pixelMetric(PM_ToolBarIconSize);
- const QRect iconSize = (!option) ? QRect(0, 0, iconDimension, iconDimension) : option->rect;
QS60StyleEnums::SkinParts part;
+ qreal iconHeightMultiplier = 1.0;
+ qreal iconWidthMultiplier = 1.0;
QS60StylePrivate::SkinElementFlags adjustedFlags;
if (option)
adjustedFlags = (option->state & State_Enabled || option->state == 0) ?
@@ -3364,15 +3364,20 @@ QIcon QS60Style::standardIconImplementation(StandardPixmap standardIcon,
switch(standardIcon) {
case SP_MessageBoxWarning:
+ // By default, S60 messagebox icons have 4:3 ratio. Value is from S60 LAF documentation.
+ iconHeightMultiplier = 1.33;
part = QS60StyleEnums::SP_QgnNoteWarning;
break;
case SP_MessageBoxInformation:
+ iconHeightMultiplier = 1.33;
part = QS60StyleEnums::SP_QgnNoteInfo;
break;
case SP_MessageBoxCritical:
+ iconHeightMultiplier = 1.33;
part = QS60StyleEnums::SP_QgnNoteError;
break;
case SP_MessageBoxQuestion:
+ iconHeightMultiplier = 1.33;
part = QS60StyleEnums::SP_QgnNoteQuery;
break;
case SP_ArrowRight:
@@ -3427,11 +3432,13 @@ QIcon QS60Style::standardIconImplementation(StandardPixmap standardIcon,
adjustedFlags |= QS60StylePrivate::SF_PointEast;
part = QS60StyleEnums::SP_QgnIndiSubmenu;
break;
-
default:
return QCommonStyle::standardIconImplementation(standardIcon, option, widget);
}
const QS60StylePrivate::SkinElementFlags flags = adjustedFlags;
+ const int iconDimension = QS60StylePrivate::pixelMetric(PM_ToolBarIconSize);
+ const QRect iconSize = (!option) ?
+ QRect(0, 0, iconDimension * iconWidthMultiplier, iconDimension * iconHeightMultiplier) : option->rect;
const QPixmap cachedPixMap(QS60StylePrivate::cachedPart(part, iconSize.size(), 0, flags));
return cachedPixMap.isNull() ?
QCommonStyle::standardIconImplementation(standardIcon, option, widget) : QIcon(cachedPixMap);
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index c5149a3..64d2ad2 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -1402,6 +1402,7 @@ QPixmap QS60StylePrivate::backgroundTexture(bool skipCreation)
if (m_background->width() != applicationRect.Width() ||
m_background->height() != applicationRect.Height()) {
delete m_background;
+ m_background = 0;
createNewBackground = true;
}
}
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index a134078..ad77d7f 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -90,10 +90,6 @@
QT_BEGIN_NAMESPACE
-#if defined(Q_OS_SYMBIAN)
-#define QT_GL_NO_SCISSOR_TEST
-#endif
-
#if defined(Q_WS_WIN)
extern Q_GUI_EXPORT bool qt_cleartype_enabled;
#endif
diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro
index b512146..5774bef 100644
--- a/src/opengl/opengl.pro
+++ b/src/opengl/opengl.pro
@@ -157,7 +157,7 @@ embedded {
}
symbian {
- DEFINES += QGL_USE_TEXTURE_POOL
+ DEFINES += QGL_USE_TEXTURE_POOL QGL_NO_PRESERVED_SWAP
SOURCES -= qpixmapdata_gl.cpp
SOURCES += qgl_symbian.cpp \
qpixmapdata_poolgl.cpp \
diff --git a/src/opengl/qgl_symbian.cpp b/src/opengl/qgl_symbian.cpp
index 78624a2..7caaabd 100644
--- a/src/opengl/qgl_symbian.cpp
+++ b/src/opengl/qgl_symbian.cpp
@@ -228,13 +228,20 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) // almost same as
d->eglSurface = QEgl::createSurface(device(), d->eglContext->config());
-#if !defined(QGL_NO_PRESERVED_SWAP)
- eglGetError(); // Clear error state first.
- eglSurfaceAttrib(QEgl::display(), d->eglSurface,
- EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED);
- if (eglGetError() != EGL_SUCCESS) {
- qWarning("QGLContext: could not enable preserved swap");
- }
+ eglGetError(); // Clear error state first.
+
+#ifdef QGL_NO_PRESERVED_SWAP
+ eglSurfaceAttrib(QEgl::display(), d->eglSurface,
+ EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED);
+
+ if (eglGetError() != EGL_SUCCESS)
+ qWarning("QGLContext: could not enable destroyed swap behaviour");
+#else
+ eglSurfaceAttrib(QEgl::display(), d->eglSurface,
+ EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED);
+
+ if (eglGetError() != EGL_SUCCESS)
+ qWarning("QGLContext: could not enable preserved swap behaviour");
#endif
setWindowCreated(true);
diff --git a/src/opengl/qgltexturepool.cpp b/src/opengl/qgltexturepool.cpp
index 61a88c3..a5472ec 100644
--- a/src/opengl/qgltexturepool.cpp
+++ b/src/opengl/qgltexturepool.cpp
@@ -135,8 +135,11 @@ void QGLTexturePool::releaseTexture(QGLPixmapData *data, GLuint texture)
if (data)
removeFromLRU(data);
- QGLShareContextScope ctx(qt_gl_share_widget()->context());
- glDeleteTextures(1, &texture);
+ QGLWidget *shareWidget = qt_gl_share_widget();
+ if (shareWidget) {
+ QGLShareContextScope ctx(shareWidget->context());
+ glDeleteTextures(1, &texture);
+ }
}
void QGLTexturePool::useTexture(QGLPixmapData *data)
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index 2ccbc50..eae1c9b 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -493,6 +493,14 @@ void QGLWindowSurface::hijackWindow(QWidget *widget)
}
bool swapBehaviourPreserved = (ctx->d_func()->eglContext->configAttrib(EGL_SWAP_BEHAVIOR) != EGL_BUFFER_PRESERVED)
|| (ctx->d_func()->eglContext->configAttrib(EGL_SURFACE_TYPE)&EGL_SWAP_BEHAVIOR_PRESERVED_BIT);
+ if (ctx->d_func()->eglContext->configAttrib(EGL_SURFACE_TYPE)&EGL_SWAP_BEHAVIOR_PRESERVED_BIT) {
+ EGLint swapBehavior;
+ if (eglQuerySurface(ctx->d_func()->eglContext->display(), ctx->d_func()->eglSurface
+ , EGL_SWAP_BEHAVIOR, &swapBehavior)) {
+ swapBehaviourPreserved = (swapBehavior == EGL_BUFFER_PRESERVED);
+ }
+ }
+
if (!swapBehaviourPreserved && !haveNOKSwapRegion)
d_ptr->partialUpdateSupport = false; // Force full-screen updates
else
@@ -541,6 +549,7 @@ static void drawTexture(const QRectF &rect, GLuint tex_id, const QSize &texSize,
void QGLWindowSurface::beginPaint(const QRegion &)
{
d_ptr->did_paint = true;
+ updateGeometry();
if (!context())
return;
@@ -912,14 +921,22 @@ void QGLWindowSurface::updateGeometry() {
ctx->d_func()->eglSurface = QEgl::createSurface(ctx->device(),
ctx->d_func()->eglContext->config());
-#if !defined(QGL_NO_PRESERVED_SWAP)
- eglGetError(); // Clear error state first.
- eglSurfaceAttrib(QEgl::display(), ctx->d_func()->eglSurface,
- EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED);
- if (eglGetError() != EGL_SUCCESS) {
- qWarning("QGLWindowSurface: could not restore preserved swap behaviour");
+ eglGetError(); // Clear error state.
+ if (hasPartialUpdateSupport()) {
+ eglSurfaceAttrib(ctx->d_func()->eglContext->display(),
+ ctx->d_func()->eglSurface,
+ EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED);
+
+ if (eglGetError() != EGL_SUCCESS)
+ qWarning("QGLWindowSurface: could not enable preserved swap behaviour");
+ } else {
+ eglSurfaceAttrib(ctx->d_func()->eglContext->display(),
+ ctx->d_func()->eglSurface,
+ EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED);
+
+ if (eglGetError() != EGL_SUCCESS)
+ qWarning("QGLWindowSurface: could not enable destroyed swap behaviour");
}
-#endif
}
#endif
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index 44dceea..570adfd 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -3071,6 +3071,95 @@ static void drawVGImage(QVGPaintEnginePrivate *d,
vgDrawImage(vgImg);
}
+static void drawImageTiled(QVGPaintEnginePrivate *d,
+ const QRectF &r,
+ const QImage &image,
+ const QRectF &sr = QRectF())
+{
+ const int minTileSize = 16;
+ int tileWidth = 512;
+ int tileHeight = tileWidth;
+
+ VGImageFormat tileFormat = qt_vg_image_to_vg_format(image.format());
+ VGImage tile = VG_INVALID_HANDLE;
+ QVGImagePool *pool = QVGImagePool::instance();
+ while (tile == VG_INVALID_HANDLE && tileWidth >= minTileSize) {
+ tile = pool->createPermanentImage(tileFormat, tileWidth, tileHeight,
+ VG_IMAGE_QUALITY_FASTER);
+ if (tile == VG_INVALID_HANDLE) {
+ tileWidth /= 2;
+ tileHeight /= 2;
+ }
+ }
+ if (tile == VG_INVALID_HANDLE) {
+ qWarning("drawImageTiled: Failed to create %dx%d tile, giving up", tileWidth, tileHeight);
+ return;
+ }
+
+ VGfloat opacityMatrix[20] = {
+ 1.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 1.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 1.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, d->opacity,
+ 0.0f, 0.0f, 0.0f, 0.0f
+ };
+ VGImage tileWithOpacity = VG_INVALID_HANDLE;
+ if (d->opacity != 1) {
+ tileWithOpacity = pool->createPermanentImage(VG_sARGB_8888_PRE,
+ tileWidth, tileHeight, VG_IMAGE_QUALITY_FASTER);
+ if (tileWithOpacity == VG_INVALID_HANDLE)
+ qWarning("drawImageTiled: Failed to create extra tile, ignoring opacity");
+ }
+
+ QRect sourceRect = sr.toRect();
+ if (sourceRect.isNull())
+ sourceRect = QRect(0, 0, image.width(), image.height());
+
+ VGfloat scaleX = r.width() / sourceRect.width();
+ VGfloat scaleY = r.height() / sourceRect.height();
+
+ d->setImageOptions();
+
+ for (int y = sourceRect.y(); y < sourceRect.height(); y += tileHeight) {
+ int h = qMin(tileHeight, sourceRect.height() - y);
+ if (h < 1)
+ break;
+ for (int x = sourceRect.x(); x < sourceRect.width(); x += tileWidth) {
+ int w = qMin(tileWidth, sourceRect.width() - x);
+ if (w < 1)
+ break;
+
+ int bytesPerPixel = image.depth() / 8;
+ const uchar *sptr = image.constBits() + x * bytesPerPixel + y * image.bytesPerLine();
+ vgImageSubData(tile, sptr, image.bytesPerLine(), tileFormat, 0, 0, w, h);
+
+ QTransform transform(d->imageTransform);
+ transform.translate(r.x() + x, r.y() + y);
+ transform.scale(scaleX, scaleY);
+ d->setTransform(VG_MATRIX_IMAGE_USER_TO_SURFACE, transform);
+
+ VGImage actualTile = tile;
+ if (tileWithOpacity != VG_INVALID_HANDLE) {
+ vgColorMatrix(tileWithOpacity, actualTile, opacityMatrix);
+ if (w < tileWidth || h < tileHeight)
+ actualTile = vgChildImage(tileWithOpacity, 0, 0, w, h);
+ else
+ actualTile = tileWithOpacity;
+ } else if (w < tileWidth || h < tileHeight) {
+ actualTile = vgChildImage(tile, 0, 0, w, h);
+ }
+ vgDrawImage(actualTile);
+
+ if (actualTile != tile && actualTile != tileWithOpacity)
+ vgDestroyImage(actualTile);
+ }
+ }
+
+ vgDestroyImage(tile);
+ if (tileWithOpacity != VG_INVALID_HANDLE)
+ vgDestroyImage(tileWithOpacity);
+}
+
// Used by qpixmapfilter_vg.cpp to draw filtered VGImage's.
void qt_vg_drawVGImage(QPainter *painter, const QPointF& pos, VGImage vgImg)
{
@@ -3170,7 +3259,7 @@ void QVGPaintEngine::drawPixmap(const QPointF &pos, const QPixmap &pm)
vgpd->source.beginDataAccess();
drawImage(pos, vgpd->source.imageRef());
- vgpd->source.endDataAccess();
+ vgpd->source.endDataAccess(true);
} else {
drawImage(pos, *(pd->buffer()));
}
@@ -3219,7 +3308,10 @@ void QVGPaintEngine::drawImage
} else {
// Monochrome images need to use the vgChildImage() path.
vgImg = toVGImage(image, flags);
- drawVGImage(d, r, vgImg, image.size(), sr);
+ if (vgImg == VG_INVALID_HANDLE)
+ drawImageTiled(d, r, image, sr);
+ else
+ drawVGImage(d, r, vgImg, image.size(), sr);
}
}
vgDestroyImage(vgImg);
@@ -3246,7 +3338,10 @@ void QVGPaintEngine::drawImage(const QPointF &pos, const QImage &image)
} else {
vgImg = toVGImageWithOpacity(image, d->opacity);
}
- drawVGImage(d, pos, vgImg);
+ if (vgImg == VG_INVALID_HANDLE)
+ drawImageTiled(d, QRectF(pos, image.size()), image);
+ else
+ drawVGImage(d, pos, vgImg);
vgDestroyImage(vgImg);
}
diff --git a/src/plugins/audio/audio.pro b/src/plugins/audio/audio.pro
deleted file mode 100644
index b7a775b..0000000
--- a/src/plugins/audio/audio.pro
+++ /dev/null
@@ -1,3 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS =
-
diff --git a/src/plugins/bearer/icd/dbusdispatcher.cpp b/src/plugins/bearer/icd/dbusdispatcher.cpp
index 13cd8a9..a317cb4 100644
--- a/src/plugins/bearer/icd/dbusdispatcher.cpp
+++ b/src/plugins/bearer/icd/dbusdispatcher.cpp
@@ -194,18 +194,21 @@ static bool appendVariantToDBusMessage(const QVariant& argument,
&int32_data);
break;
- case QVariant::String:
- str_data = argument.toString().toLatin1().data();
+ case QVariant::String: {
+ QByteArray data = argument.toString().toLatin1();
+ str_data = data.data();
dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_STRING,
&str_data);
break;
+ }
case QVariant::StringList:
str_list = argument.toStringList();
dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY,
"s", &array_iter);
for (idx = 0; idx < str_list.size(); idx++) {
- str_data = str_list.at(idx).toLatin1().data();
+ QByteArray data = str_list.at(idx).toLatin1();
+ str_data = data.data();
dbus_message_iter_append_basic(&array_iter,
DBUS_TYPE_STRING,
&str_data);
diff --git a/src/plugins/bearer/icd/qnetworksession_impl.cpp b/src/plugins/bearer/icd/qnetworksession_impl.cpp
index af5d85e..94a6c81 100644
--- a/src/plugins/bearer/icd/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/icd/qnetworksession_impl.cpp
@@ -621,21 +621,21 @@ static QString get_network_interface()
if (ret == 0) {
/* No results */
#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "Cannot get addrinfo from icd, are you connected or is icd running?";
+ qDebug() << "Cannot get addrinfo from icd, are you connected or is icd running?";
#endif
- return iface;
+ return iface;
}
if (addr_results.first().ip_info.isEmpty())
- return QString();
+ return QString();
- const char *address = addr_results.first().ip_info.first().address.toAscii().constData();
+ QByteArray data = addr_results.first().ip_info.first().address.toAscii();
struct in_addr addr;
- if (inet_aton(address, &addr) == 0) {
+ if (inet_aton(data.constData(), &addr) == 0) {
#ifdef BEARER_MANAGEMENT_DEBUG
- qDebug() << "address" << address << "invalid";
+ qDebug() << "address" << data.constData() << "invalid";
#endif
- return iface;
+ return iface;
}
struct ifaddrs *ifaddr, *ifa;
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index 3e7da0e..7479d2f 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -13,6 +13,5 @@ embedded:SUBDIRS *= gfxdrivers decorations mousedrivers kbddrivers
!symbian:!contains(QT_CONFIG, no-gui):SUBDIRS += accessible
symbian:SUBDIRS += s60
contains(QT_CONFIG, phonon): SUBDIRS *= phonon
-contains(QT_CONFIG, multimedia): SUBDIRS *= audio
qpa:SUBDIRS += platforms
contains(QT_CONFIG, declarative): SUBDIRS *= qmltooling
diff --git a/tools/linguist/lconvert/main.cpp b/tools/linguist/lconvert/main.cpp
index a10a42b..a9960fc 100644
--- a/tools/linguist/lconvert/main.cpp
+++ b/tools/linguist/lconvert/main.cpp
@@ -65,7 +65,7 @@ static int usage(const QStringList &args)
foreach (Translator::FileFormat format, Translator::registeredFileFormats())
loaders += line.arg(format.extension, -5).arg(format.description);
- std::cerr << qPrintable(LC::tr("\nUsage:\n"
+ std::cout << qPrintable(LC::tr("\nUsage:\n"
" lconvert [options] <infile> [<infile>...]\n\n"
"lconvert is part of Qt's Linguist tool chain. It can be used as a\n"
"stand-alone tool to convert and filter translation data files.\n"
diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp
index 15583e1..f8e6a90 100644
--- a/tools/linguist/lupdate/main.cpp
+++ b/tools/linguist/lupdate/main.cpp
@@ -61,6 +61,11 @@ static QString m_defaultExtensions;
static void printOut(const QString & out)
{
+ std::cout << qPrintable(out);
+}
+
+static void printErr(const QString & out)
+{
std::cerr << qPrintable(out);
}
@@ -151,23 +156,23 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil
cd.m_sortContexts = !(options & NoSort);
if (QFile(fileName).exists()) {
if (!tor.load(fileName, cd, QLatin1String("auto"))) {
- printOut(cd.error());
+ printErr(cd.error());
*fail = true;
continue;
}
tor.resolveDuplicates();
cd.clearErrors();
if (setCodec && fetchedTor.codec() != tor.codec())
- printOut(LU::tr("lupdate warning: Codec for tr() '%1' disagrees with"
+ printErr(LU::tr("lupdate warning: Codec for tr() '%1' disagrees with"
" existing file's codec '%2'. Expect trouble.\n")
.arg(QString::fromLatin1(fetchedTor.codecName()),
QString::fromLatin1(tor.codecName())));
if (!targetLanguage.isEmpty() && targetLanguage != tor.languageCode())
- printOut(LU::tr("lupdate warning: Specified target language '%1' disagrees with"
+ printErr(LU::tr("lupdate warning: Specified target language '%1' disagrees with"
" existing file's language '%2'. Ignoring.\n")
.arg(targetLanguage, tor.languageCode()));
if (!sourceLanguage.isEmpty() && sourceLanguage != tor.sourceLanguageCode())
- printOut(LU::tr("lupdate warning: Specified source language '%1' disagrees with"
+ printErr(LU::tr("lupdate warning: Specified source language '%1' disagrees with"
" existing file's language '%2'. Ignoring.\n")
.arg(sourceLanguage, tor.sourceLanguageCode()));
} else {
@@ -212,11 +217,11 @@ static void updateTsFiles(const Translator &fetchedTor, const QStringList &tsFil
out.normalizeTranslations(cd);
if (!cd.errors().isEmpty()) {
- printOut(cd.error());
+ printErr(cd.error());
cd.clearErrors();
}
if (!out.save(fileName, cd, QLatin1String("auto"))) {
- printOut(cd.error());
+ printErr(cd.error());
*fail = true;
}
}
@@ -278,7 +283,7 @@ static void processSources(Translator &fetchedTor,
}
loadCPP(fetchedTor, sourceFilesCpp, cd);
if (!cd.error().isEmpty())
- printOut(cd.error());
+ printErr(cd.error());
}
static void processProjects(
@@ -298,7 +303,7 @@ static void processProject(
if (!tmp.isEmpty()) {
codecForSource = tmp.last().toLatin1();
if (!QTextCodec::codecForName(codecForSource)) {
- printOut(LU::tr("lupdate warning: Codec for source '%1' is invalid."
+ printErr(LU::tr("lupdate warning: Codec for source '%1' is invalid."
" Falling back to codec for tr().\n")
.arg(QString::fromLatin1(codecForSource)));
codecForSource.clear();
@@ -365,12 +370,12 @@ static void processProjects(
if (visitor.contains(QLatin1String("TRANSLATIONS"))) {
if (parentTor) {
if (topLevel) {
- std::cerr << qPrintable(LU::tr("lupdate warning: TS files from command line "
- "will override TRANSLATIONS in %1.\n").arg(proFile));
+ printErr(LU::tr("lupdate warning: TS files from command line "
+ "will override TRANSLATIONS in %1.\n").arg(proFile));
goto noTrans;
} else if (nestComplain) {
- std::cerr << qPrintable(LU::tr("lupdate warning: TS files from command line "
- "prevent recursing into %1.\n").arg(proFile));
+ printErr(LU::tr("lupdate warning: TS files from command line "
+ "prevent recursing into %1.\n").arg(proFile));
continue;
}
}
@@ -401,8 +406,8 @@ static void processProjects(
noTrans:
if (!parentTor) {
if (topLevel)
- std::cerr << qPrintable(LU::tr("lupdate warning: no TS files specified. Only diagnostics "
- "will be produced for '%1'.\n").arg(proFile));
+ printErr(LU::tr("lupdate warning: no TS files specified. Only diagnostics "
+ "will be produced for '%1'.\n").arg(proFile));
Translator tor;
processProject(nestComplain, pfi, visitor, options, codecForSource,
targetLanguage, sourceLanguage, &tor, fail);
@@ -471,7 +476,7 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-target-language")) {
++i;
if (i == argc) {
- printOut(LU::tr("The option -target-language requires a parameter.\n"));
+ printErr(LU::tr("The option -target-language requires a parameter.\n"));
return 1;
}
targetLanguage = args[i];
@@ -479,7 +484,7 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-source-language")) {
++i;
if (i == argc) {
- printOut(LU::tr("The option -source-language requires a parameter.\n"));
+ printErr(LU::tr("The option -source-language requires a parameter.\n"));
return 1;
}
sourceLanguage = args[i];
@@ -487,7 +492,7 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-disable-heuristic")) {
++i;
if (i == argc) {
- printOut(LU::tr("The option -disable-heuristic requires a parameter.\n"));
+ printErr(LU::tr("The option -disable-heuristic requires a parameter.\n"));
return 1;
}
arg = args[i];
@@ -498,14 +503,14 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("number")) {
options &= ~HeuristicNumber;
} else {
- printOut(LU::tr("Invalid heuristic name passed to -disable-heuristic.\n"));
+ printErr(LU::tr("Invalid heuristic name passed to -disable-heuristic.\n"));
return 1;
}
continue;
} else if (arg == QLatin1String("-locations")) {
++i;
if (i == argc) {
- printOut(LU::tr("The option -locations requires a parameter.\n"));
+ printErr(LU::tr("The option -locations requires a parameter.\n"));
return 1;
}
if (args[i] == QLatin1String("none")) {
@@ -515,7 +520,7 @@ int main(int argc, char **argv)
} else if (args[i] == QLatin1String("absolute")) {
options |= AbsoluteLocations;
} else {
- printOut(LU::tr("Invalid parameter passed to -locations.\n"));
+ printErr(LU::tr("Invalid parameter passed to -locations.\n"));
return 1;
}
continue;
@@ -541,7 +546,7 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-codecfortr")) {
++i;
if (i == argc) {
- printOut(LU::tr("The -codecfortr option should be followed by a codec name.\n"));
+ printErr(LU::tr("The -codecfortr option should be followed by a codec name.\n"));
return 1;
}
codecForTr = args[i].toLatin1();
@@ -552,7 +557,7 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-extensions")) {
++i;
if (i == argc) {
- printOut(LU::tr("The -extensions option should be followed by an extension list.\n"));
+ printErr(LU::tr("The -extensions option should be followed by an extension list.\n"));
return 1;
}
extensions = args[i];
@@ -560,7 +565,7 @@ int main(int argc, char **argv)
} else if (arg == QLatin1String("-pro")) {
++i;
if (i == argc) {
- printOut(LU::tr("The -pro option should be followed by a filename of .pro file.\n"));
+ printErr(LU::tr("The -pro option should be followed by a filename of .pro file.\n"));
return 1;
}
proFiles += args[i];
@@ -570,7 +575,7 @@ int main(int argc, char **argv)
if (arg.length() == 2) {
++i;
if (i == argc) {
- printOut(LU::tr("The -I option should be followed by a path.\n"));
+ printErr(LU::tr("The -I option should be followed by a path.\n"));
return 1;
}
includePath += args[i];
@@ -579,7 +584,7 @@ int main(int argc, char **argv)
}
continue;
} else if (arg.startsWith(QLatin1String("-")) && arg != QLatin1String("-")) {
- printOut(LU::tr("Unrecognized option '%1'.\n").arg(arg));
+ printErr(LU::tr("Unrecognized option '%1'.\n").arg(arg));
return 1;
}
@@ -587,7 +592,7 @@ int main(int argc, char **argv)
if (arg.startsWith(QLatin1String("@"))) {
QFile lstFile(arg.mid(1));
if (!lstFile.open(QIODevice::ReadOnly)) {
- printOut(LU::tr("lupdate error: List file '%1' is not readable.\n")
+ printErr(LU::tr("lupdate error: List file '%1' is not readable.\n")
.arg(lstFile.fileName()));
return 1;
}
@@ -605,7 +610,7 @@ int main(int argc, char **argv)
if (!fi.exists() || fi.isWritable()) {
tsFileNames.append(QFileInfo(file).absoluteFilePath());
} else {
- printOut(LU::tr("lupdate warning: For some reason, '%1' is not writable.\n")
+ printErr(LU::tr("lupdate warning: For some reason, '%1' is not writable.\n")
.arg(file));
}
found = true;
@@ -613,7 +618,7 @@ int main(int argc, char **argv)
}
}
if (!found) {
- printOut(LU::tr("lupdate error: File '%1' has no recognized extension.\n")
+ printErr(LU::tr("lupdate error: File '%1' has no recognized extension.\n")
.arg(file));
return 1;
}
@@ -623,7 +628,7 @@ int main(int argc, char **argv)
foreach (const QString &file, files) {
QFileInfo fi(file);
if (!fi.exists()) {
- printOut(LU::tr("lupdate error: File '%1' does not exist.\n").arg(file));
+ printErr(LU::tr("lupdate error: File '%1' does not exist.\n").arg(file));
return 1;
}
if (file.endsWith(QLatin1String(".pro"), Qt::CaseInsensitive)
@@ -682,15 +687,15 @@ int main(int argc, char **argv)
}
if (!targetLanguage.isEmpty() && tsFileNames.count() != 1)
- printOut(LU::tr("lupdate warning: -target-language usually only"
+ printErr(LU::tr("lupdate warning: -target-language usually only"
" makes sense with exactly one TS file.\n"));
if (!codecForTr.isEmpty() && tsFileNames.isEmpty())
- printOut(LU::tr("lupdate warning: -codecfortr has no effect without -ts.\n"));
+ printErr(LU::tr("lupdate warning: -codecfortr has no effect without -ts.\n"));
bool fail = false;
if (proFiles.isEmpty()) {
if (tsFileNames.isEmpty())
- printOut(LU::tr("lupdate warning:"
+ printErr(LU::tr("lupdate warning:"
" no TS files specified. Only diagnostics will be produced.\n"));
Translator fetchedTor;
@@ -705,7 +710,7 @@ int main(int argc, char **argv)
sourceLanguage, targetLanguage, options, &fail);
} else {
if (!sourceFiles.isEmpty() || !includePath.isEmpty()) {
- printOut(LU::tr("lupdate error:"
+ printErr(LU::tr("lupdate error:"
" Both project and source files / include paths specified.\n"));
return 1;
}