diff options
Diffstat (limited to 'src/plugins')
37 files changed, 519 insertions, 196 deletions
diff --git a/src/plugins/codecs/cn/cn.pro b/src/plugins/codecs/cn/cn.pro index a7b8b60..b0a8a91 100644 --- a/src/plugins/codecs/cn/cn.pro +++ b/src/plugins/codecs/cn/cn.pro @@ -12,3 +12,5 @@ SOURCES = qgb18030codec.cpp \ target.path += $$[QT_INSTALL_PLUGINS]/codecs INSTALLS += target + +symbian:TARGET.UID3=0x2001E615 diff --git a/src/plugins/codecs/jp/jp.pro b/src/plugins/codecs/jp/jp.pro index 8626912..6480e43 100644 --- a/src/plugins/codecs/jp/jp.pro +++ b/src/plugins/codecs/jp/jp.pro @@ -23,3 +23,5 @@ unix { target.path += $$[QT_INSTALL_PLUGINS]/codecs INSTALLS += target + +symbian:TARGET.UID3=0x2001E614 diff --git a/src/plugins/codecs/jp/qeucjpcodec.cpp b/src/plugins/codecs/jp/qeucjpcodec.cpp index 19b259c..7776201 100644 --- a/src/plugins/codecs/jp/qeucjpcodec.cpp +++ b/src/plugins/codecs/jp/qeucjpcodec.cpp @@ -79,7 +79,6 @@ QT_BEGIN_NAMESPACE #ifndef QT_NO_TEXTCODEC -static const uchar Esc = 0x1b; static const uchar Ss2 = 0x8e; // Single Shift 2 static const uchar Ss3 = 0x8f; // Single Shift 3 diff --git a/src/plugins/codecs/jp/qjiscodec.cpp b/src/plugins/codecs/jp/qjiscodec.cpp index a495dae..3e4d5a0 100644 --- a/src/plugins/codecs/jp/qjiscodec.cpp +++ b/src/plugins/codecs/jp/qjiscodec.cpp @@ -41,7 +41,7 @@ // Most of the code here was originally written by Serika Kurusugawa, // a.k.a. Junji Takagi, and is included in Qt with the author's permission -// and the grateful thanks of the Trolltech team. +// and the grateful thanks of the Qt team. /*! \class QJisCodec \reentrant diff --git a/src/plugins/codecs/kr/kr.pro b/src/plugins/codecs/kr/kr.pro index 9199e33..1cc28d8 100644 --- a/src/plugins/codecs/kr/kr.pro +++ b/src/plugins/codecs/kr/kr.pro @@ -16,3 +16,5 @@ wince*: { target.path += $$[QT_INSTALL_PLUGINS]/codecs INSTALLS += target + +symbian:TARGET.UID3=0x2001B2E5 diff --git a/src/plugins/codecs/tw/tw.pro b/src/plugins/codecs/tw/tw.pro index 8039f4b..2ebb94f 100644 --- a/src/plugins/codecs/tw/tw.pro +++ b/src/plugins/codecs/tw/tw.pro @@ -12,3 +12,5 @@ SOURCES = qbig5codec.cpp \ target.path += $$[QT_INSTALL_PLUGINS]/codecs INSTALLS += target + +symbian:TARGET.UID3=0x2001B2E4 diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index ba715c3..e63a628 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -532,7 +532,7 @@ void QDirectFBPaintEngine::drawImage(const QRectF &r, const QImage &image, d->unlock(); bool release; IDirectFBSurface *imgSurface = d->getSurface(image, &release); - d->prepareForBlit(QDirectFBScreen::hasAlpha(imgSurface)); + d->prepareForBlit(QDirectFBScreen::hasAlphaChannel(imgSurface)); CLIPPED_PAINT(d->blit(r, imgSurface, sr)); if (release) { #if (Q_DIRECTFB_VERSION >= 0x010000) @@ -559,7 +559,9 @@ void QDirectFBPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pixmap, QRasterPaintEngine::drawPixmap(r, pixmap, sr); } else if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedBlits) || (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_BlitsUnsupported) - || d->clipType == QDirectFBPaintEnginePrivate::ComplexClip) { + || d->clipType == QDirectFBPaintEnginePrivate::ComplexClip + || (state()->renderHints & QPainter::SmoothPixmapTransform + && state()->matrix.mapRect(r).size() != sr.size())) { RASTERFALLBACK(DRAW_PIXMAP, r, pixmap.size(), sr); const QImage *img = static_cast<QDirectFBPixmapData*>(pixmap.pixmapData())->buffer(DSLF_READ); d->lock(); @@ -593,7 +595,8 @@ void QDirectFBPaintEngine::drawTiledPixmap(const QRectF &r, QRasterPaintEngine::drawTiledPixmap(r, pixmap, offset); } else if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedBlits) || (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_BlitsUnsupported) - || d->clipType == QDirectFBPaintEnginePrivate::ComplexClip) { + || d->clipType == QDirectFBPaintEnginePrivate::ComplexClip + || (state()->renderHints & QPainter::SmoothPixmapTransform && state()->matrix.isScaling())) { RASTERFALLBACK(DRAW_TILED_PIXMAP, r, pixmap.size(), offset); const QImage *img = static_cast<QDirectFBPixmapData*>(pixmap.pixmapData())->buffer(DSLF_READ); d->lock(); @@ -709,7 +712,8 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush) case Qt::TexturePattern: { if (!(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_SupportedBlits) - || (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_BlitsUnsupported)) { + || (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_BlitsUnsupported) + || (state()->renderHints & QPainter::SmoothPixmapTransform && state()->matrix.isScaling())) { break; } @@ -843,6 +847,13 @@ void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode m { if (!surface) return; + + static const bool forceRasterFallBack = qgetenv("QT_DIRECTFB_FORCE_RASTER").toInt() > 0; + if (forceRasterFallBack) { + compositionModeStatus = 0; + return; + } + compositionModeStatus = PorterDuff_SupportedBlits; switch (mode) { case QPainter::CompositionMode_Clear: @@ -928,9 +939,9 @@ void QDirectFBPaintEnginePrivate::setDFBColor(const QColor &color) IDirectFBSurface *QDirectFBPaintEnginePrivate::getSurface(const QImage &img, bool *release) { -#ifndef QT_DIRECTFB_IMAGECACHE +#ifdef QT_NO_DIRECTFB_IMAGECACHE *release = true; - return QDirectFBScreen::instance()->createDFBSurface(img, QDirectFBScreen::DontTrackSurface); + return QDirectFBScreen::instance()->createDFBSurface(img, img.format(), QDirectFBScreen::DontTrackSurface); #else const qint64 key = img.cacheKey(); *release = false; @@ -944,7 +955,7 @@ IDirectFBSurface *QDirectFBPaintEnginePrivate::getSurface(const QImage &img, boo const QImage::Format format = (img.format() == screen->alphaPixmapFormat() || QDirectFBPixmapData::hasAlphaChannel(img) ? screen->alphaPixmapFormat() : screen->pixelFormat()); - IDirectFBSurface *surface = screen->copyToDFBSurface(img, format, + IDirectFBSurface *surface = screen->createDFBSurface(img, format, cache ? QDirectFBScreen::TrackSurface : QDirectFBScreen::DontTrackSurface); @@ -1122,7 +1133,7 @@ IDirectFBSurface *SurfaceCache::getSurface(const uint *buf, int size) clear(); const DFBSurfaceDescription description = QDirectFBScreen::getSurfaceDescription(buf, size); - surface = QDirectFBScreen::instance()->createDFBSurface(description, QDirectFBScreen::TrackSurface); + surface = QDirectFBScreen::instance()->createDFBSurface(description, QDirectFBScreen::TrackSurface, 0); if (!surface) qWarning("QDirectFBPaintEngine: SurfaceCache: Unable to create surface"); diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp index 0afb8a8..7cacdd9 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp @@ -169,16 +169,17 @@ bool QDirectFBPixmapData::hasAlphaChannel(const QImage &img) } -void QDirectFBPixmapData::fromImage(const QImage &i, +void QDirectFBPixmapData::fromImage(const QImage &image, Qt::ImageConversionFlags flags) { -#ifdef QT_NO_DIRECTFB_OPAQUE_DETECTION - Q_UNUSED(flags); -#endif - const QImage img = (i.depth() == 1 ? i.convertToFormat(screen->alphaPixmapFormat()) : i); - if (img.hasAlphaChannel() + if (image.depth() == 1) { + fromImage(image.convertToFormat(screen->alphaPixmapFormat()), flags); + return; + } + + if (image.hasAlphaChannel() #ifndef QT_NO_DIRECTFB_OPAQUE_DETECTION - && (flags & Qt::NoOpaqueDetection || QDirectFBPixmapData::hasAlphaChannel(img)) + && (flags & Qt::NoOpaqueDetection || QDirectFBPixmapData::hasAlphaChannel(image)) #endif ) { alpha = true; @@ -187,18 +188,21 @@ void QDirectFBPixmapData::fromImage(const QImage &i, alpha = false; format = screen->pixelFormat(); } - dfbSurface = screen->copyToDFBSurface(img, format, - QDirectFBScreen::TrackSurface); + + dfbSurface = screen->createDFBSurface(image, format, QDirectFBScreen::TrackSurface|QDirectFBScreen::NoPreallocated); if (!dfbSurface) { qWarning("QDirectFBPixmapData::fromImage()"); invalidate(); return; } - w = img.width(); - h = img.height(); + w = image.width(); + h = image.height(); is_null = (w <= 0 || h <= 0); d = metric(QPaintDevice::PdmDepth); setSerialNumber(++global_ser_no); +#ifdef QT_NO_DIRECTFB_OPAQUE_DETECTION + Q_UNUSED(flags); +#endif } void QDirectFBPixmapData::copy(const QPixmapData *data, const QRect &rect) @@ -399,9 +403,14 @@ QImage * QDirectFBPixmapData::buffer(DFBSurfaceLockFlags lockFlags) void QDirectFBPixmapData::invalidate() { + if (dfbSurface) { + screen->releaseDFBSurface(dfbSurface); + dfbSurface = 0; + } setSerialNumber(0); alpha = false; d = w = h = 0; + is_null = true; format = QImage::Format_Invalid; } diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index dc53847..bb614a2 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -150,64 +150,77 @@ QDirectFBScreenPrivate::~QDirectFBScreenPrivate() dfb->Release(dfb); } - - -// creates a preallocated surface with the same format as the image if -// possible. - -IDirectFBSurface *QDirectFBScreen::createDFBSurface(const QImage &img, SurfaceCreationOptions options) +IDirectFBSurface *QDirectFBScreen::createDFBSurface(const QImage &image, QImage::Format format, SurfaceCreationOptions options, DFBResult *resultPtr) { - if (img.isNull()) // assert? + if (image.isNull()) // assert? return 0; - if (QDirectFBScreen::getSurfacePixelFormat(img.format()) == DSPF_UNKNOWN) { - QImage image = img.convertToFormat(img.hasAlphaChannel() - ? d_ptr->alphaPixmapFormat - : pixelFormat()); - IDirectFBSurface *tmp = createDFBSurface(image, false); - if (!tmp) { - qWarning("Couldn't create surface createDFBSurface(QImage, bool)"); - return 0; - } - IDirectFBSurface *surface = copyDFBSurface(tmp, image.format(), options); - tmp->Release(tmp); - return surface; + if (QDirectFBScreen::getSurfacePixelFormat(format) == DSPF_UNKNOWN) { + format = QDirectFBPixmapData::hasAlphaChannel(image) ? d_ptr->alphaPixmapFormat : pixelFormat(); + } + if (image.format() != format) { + return createDFBSurface(image.convertToFormat(format), format, options | NoPreallocated, resultPtr); } - IDirectFBSurface *surface = createDFBSurface(QDirectFBScreen::getSurfaceDescription(img), options); -#ifdef QT_NO_DIRECTFB_PREALLOCATED - if (surface) { - int bpl; - uchar *mem = QDirectFBScreen::lockSurface(surface, DSLF_WRITE, &bpl); + DFBSurfaceDescription description; + memset(&description, 0, sizeof(DFBSurfaceDescription)); + description.width = image.width(); + description.height = image.height(); + description.flags = DSDESC_WIDTH|DSDESC_HEIGHT|DSDESC_PIXELFORMAT; + initSurfaceDescriptionPixelFormat(&description, format); + bool doMemCopy = true; +#ifdef QT_DIRECTFB_PREALLOCATED + if (!(options & NoPreallocated)) { + doMemCopy = false; + description.flags |= DSDESC_PREALLOCATED; + description.preallocated[0].data = const_cast<uchar*>(image.bits()); + description.preallocated[0].pitch = image.bytesPerLine(); + description.preallocated[1].data = 0; + description.preallocated[1].pitch = 0; + } +#endif + DFBResult result; + IDirectFBSurface *surface = createDFBSurface(description, options, &result); + if (resultPtr) + *resultPtr = result; + if (!surface) { + DirectFBError("Couldn't create surface createDFBSurface(QImage, QImage::Format, SurfaceCreationOptions)", result); + return 0; + } + if (doMemCopy) { + int bplDFB; + uchar *mem = QDirectFBScreen::lockSurface(surface, DSLF_WRITE, &bplDFB); if (mem) { - const int h = img.height(); - const int w = img.width() * img.depth() / 8; - for (int i = 0; i < h; ++i) { - memcpy(mem, img.scanLine(i), w); - mem += bpl; + const int height = image.height(); + const int bplQt = image.bytesPerLine(); + if (bplQt == bplDFB && bplQt == (image.width() * image.depth() / 8)) { + memcpy(mem, image.bits(), image.numBytes()); + } else { + for (int i=0; i<height; ++i) { + memcpy(mem, image.scanLine(i), bplQt); + mem += bplDFB; + } } surface->Unlock(surface); } } -#endif -#ifndef QT_NO_DIRECTFB_PALETTE - if (img.numColors() != 0 && surface) - QDirectFBScreen::setSurfaceColorTable(surface, img); +#ifdef QT_DIRECTFB_PALETTE + if (image.numColors() != 0 && surface) + QDirectFBScreen::setSurfaceColorTable(surface, image); #endif return surface; } IDirectFBSurface *QDirectFBScreen::copyDFBSurface(IDirectFBSurface *src, QImage::Format format, - SurfaceCreationOptions options) + SurfaceCreationOptions options, + DFBResult *result) { Q_ASSERT(src); QSize size; src->GetSize(src, &size.rwidth(), &size.rheight()); - IDirectFBSurface *surface = createDFBSurface(size, format, options); - DFBSurfacePixelFormat dspf; - src->GetPixelFormat(src, &dspf); - DFBSurfaceBlittingFlags flags = QDirectFBScreen::hasAlpha(dspf) + IDirectFBSurface *surface = createDFBSurface(size, format, options, result); + DFBSurfaceBlittingFlags flags = QDirectFBScreen::hasAlphaChannel(surface) ? DSBLIT_BLEND_ALPHACHANNEL : DSBLIT_NOFX; if (flags & DSBLIT_BLEND_ALPHACHANNEL) @@ -223,7 +236,8 @@ IDirectFBSurface *QDirectFBScreen::copyDFBSurface(IDirectFBSurface *src, IDirectFBSurface *QDirectFBScreen::createDFBSurface(const QSize &size, QImage::Format format, - SurfaceCreationOptions options) + SurfaceCreationOptions options, + DFBResult *result) { DFBSurfaceDescription desc; memset(&desc, 0, sizeof(DFBSurfaceDescription)); @@ -232,12 +246,14 @@ IDirectFBSurface *QDirectFBScreen::createDFBSurface(const QSize &size, return 0; desc.width = size.width(); desc.height = size.height(); - return createDFBSurface(desc, options); + return createDFBSurface(desc, options, result); } -IDirectFBSurface *QDirectFBScreen::createDFBSurface(DFBSurfaceDescription desc, SurfaceCreationOptions options) +IDirectFBSurface *QDirectFBScreen::createDFBSurface(DFBSurfaceDescription desc, SurfaceCreationOptions options, DFBResult *resultPtr) { - DFBResult result = DFB_OK; + DFBResult tmp; + DFBResult &result = (resultPtr ? *resultPtr : tmp); + result = DFB_OK; IDirectFBSurface *newSurface = 0; if (!d_ptr->dfb) { @@ -299,68 +315,6 @@ IDirectFBSurface *QDirectFBScreen::createDFBSurface(DFBSurfaceDescription desc, return newSurface; } -IDirectFBSurface *QDirectFBScreen::copyToDFBSurface(const QImage &img, - QImage::Format pixmapFormat, - SurfaceCreationOptions options) -{ - QImage image = img; - if (QDirectFBScreen::getSurfacePixelFormat(image.format()) == DSPF_UNKNOWN -#ifdef QT_NO_DIRECTFB_PREALLOCATED - || image.format() != pixmapFormat -#endif -#ifdef QT_NO_DIRECTFB_PALETTE - || image.numColors() != 0 -#endif - ) { - image = image.convertToFormat(pixmapFormat); - } - - IDirectFBSurface *dfbSurface = createDFBSurface(image.size(), pixmapFormat, options); - if (!dfbSurface) { - qWarning("QDirectFBScreen::copyToDFBSurface() Couldn't create surface"); - return 0; - } - -#ifndef QT_NO_DIRECTFB_PREALLOCATED - IDirectFBSurface *imgSurface = createDFBSurface(image, DontTrackSurface); - if (!imgSurface) { - qWarning("QDirectFBScreen::copyToDFBSurface()"); - QDirectFBScreen::releaseDFBSurface(dfbSurface); - return 0; - } - - Q_ASSERT(imgSurface); - DFBSurfaceBlittingFlags flags = img.hasAlphaChannel() - ? DSBLIT_BLEND_ALPHACHANNEL - : DSBLIT_NOFX; - if (flags & DSBLIT_BLEND_ALPHACHANNEL) - dfbSurface->Clear(dfbSurface, 0, 0, 0, 0); - - dfbSurface->SetBlittingFlags(dfbSurface, flags); - DFBResult result = dfbSurface->Blit(dfbSurface, imgSurface, 0, 0, 0); - if (result != DFB_OK) - DirectFBError("QDirectFBScreen::copyToDFBSurface()", result); - imgSurface->Release(imgSurface); -#if (Q_DIRECTFB_VERSION >= 0x010000) - dfbSurface->ReleaseSource(dfbSurface); -#endif -#else // QT_NO_DIRECTFB_PREALLOCATED - Q_ASSERT(image.format() == pixmapFormat); - int bpl; - uchar *mem = QDirectFBScreen::lockSurface(dfbSurface, DSLF_WRITE, &bpl); - if (mem) { - const int h = image.height(); - const int w = image.width() * image.depth() / 8; - for (int i=0; i<h; ++i) { - memcpy(mem, image.scanLine(i), w); - mem += bpl; - } - dfbSurface->Unlock(dfbSurface); - } -#endif - return dfbSurface; -} - void QDirectFBScreen::releaseDFBSurface(IDirectFBSurface *surface) { Q_ASSERT(QDirectFBScreen::instance()); @@ -474,36 +428,6 @@ QImage::Format QDirectFBScreen::getImageFormat(IDirectFBSurface *surface) return QImage::Format_Invalid; } -DFBSurfaceDescription QDirectFBScreen::getSurfaceDescription(const QImage &image) -{ - DFBSurfaceDescription description; - memset(&description, 0, sizeof(DFBSurfaceDescription)); - - const DFBSurfacePixelFormat format = getSurfacePixelFormat(image.format()); - - if (format == DSPF_UNKNOWN || image.isNull()) { - description.flags = DSDESC_NONE; - return description; - } - - description.flags = DSDESC_WIDTH|DSDESC_HEIGHT|DSDESC_PIXELFORMAT; - QDirectFBScreen::initSurfaceDescriptionPixelFormat(&description, image.format()); - description.width = image.width(); - description.height = image.height(); -#ifndef QT_NO_DIRECTFB_PREALLOCATED - description.flags |= DSDESC_PREALLOCATED; - description.preallocated[0].data = (void*)(image.bits()); - description.preallocated[0].pitch = image.bytesPerLine(); - description.preallocated[1].data = 0; - description.preallocated[1].pitch = 0; -#endif - - if (QDirectFBScreen::isPremultiplied(image.format())) - description.caps = DSCAPS_PREMULTIPLIED; - - return description; -} - DFBSurfaceDescription QDirectFBScreen::getSurfaceDescription(const uint *buffer, int length) { @@ -519,7 +443,7 @@ DFBSurfaceDescription QDirectFBScreen::getSurfaceDescription(const uint *buffer, description.preallocated[0].pitch = length * sizeof(uint); description.preallocated[1].data = 0; description.preallocated[1].pitch = 0; -return description; + return description; } #ifndef QT_NO_DIRECTFB_PALETTE @@ -652,12 +576,14 @@ void QDirectFBScreenCursor::set(const QImage &image, int hotx, int hoty) cursor = image.convertToFormat(screen->alphaPixmapFormat()); size = cursor.size(); hotspot = QPoint(hotx, hoty); - IDirectFBSurface *surface = screen->createDFBSurface(cursor, QDirectFBScreen::DontTrackSurface); + DFBResult result = DFB_OK; + IDirectFBSurface *surface = screen->createDFBSurface(cursor, screen->alphaPixmapFormat(), + QDirectFBScreen::DontTrackSurface, &result); if (!surface) { - qWarning("QDirectFBScreenCursor::set: Unable to create surface"); + DirectFBError("QDirectFBScreenCursor::set: Unable to create surface", result); return; } - DFBResult result = layer->SetCooperativeLevel(layer, DLSCL_ADMINISTRATIVE); + result = layer->SetCooperativeLevel(layer, DLSCL_ADMINISTRATIVE); if (result != DFB_OK) { DirectFBError("QDirectFBScreenCursor::show: " "Unable to set cooperative level", result); @@ -1015,7 +941,7 @@ bool QDirectFBScreen::connect(const QString &displaySpec) } // We don't track the primary surface as it's released in disconnect - d_ptr->primarySurface = createDFBSurface(description, DontTrackSurface); + d_ptr->primarySurface = createDFBSurface(description, DontTrackSurface, &result); if (!d_ptr->primarySurface) { DirectFBError("QDirectFBScreen: error creating primary surface", result); @@ -1026,13 +952,17 @@ bool QDirectFBScreen::connect(const QString &displaySpec) #else description.flags = DSDESC_WIDTH|DSDESC_HEIGHT; description.width = description.height = 1; - surface = createDFBSurface(description, DontTrackSurface); + surface = createDFBSurface(description, DontTrackSurface, &result); + if (!surface) { + DirectFBError("QDirectFBScreen: error creating surface", result); + return false; + } #endif // Work out what format we're going to use for surfaces with an alpha channel - d_ptr->alphaPixmapFormat = QDirectFBScreen::getImageFormat(surface); + QImage::Format pixelFormat = QDirectFBScreen::getImageFormat(surface); + d_ptr->alphaPixmapFormat = pixelFormat; - setPixelFormat(d_ptr->alphaPixmapFormat); - switch (d_ptr->alphaPixmapFormat) { + switch (pixelFormat) { case QImage::Format_RGB666: d_ptr->alphaPixmapFormat = QImage::Format_ARGB6666_Premultiplied; break; @@ -1040,9 +970,9 @@ bool QDirectFBScreen::connect(const QString &displaySpec) d_ptr->alphaPixmapFormat = QImage::Format_ARGB4444_Premultiplied; break; case QImage::Format_RGB32: - qWarning("QDirectFBScreen::connect(). Qt/DirectFB does not work with the RGB32 pixelformat. " - "We recommmend using ARGB instead"); - return false; + pixelFormat = d_ptr->alphaPixmapFormat = QImage::Format_ARGB32_Premultiplied; + // ### Format_RGB32 doesn't work so well with Qt. Force ARGB32 for windows/pixmaps + break; case QImage::Format_Indexed8: qWarning("QDirectFBScreen::connect(). Qt/DirectFB does not work with the LUT8 pixelformat."); return false; @@ -1064,8 +994,8 @@ bool QDirectFBScreen::connect(const QString &displaySpec) // works already break; } - - QScreen::d = ::depth(pixelFormat()); + setPixelFormat(pixelFormat); + QScreen::d = ::depth(pixelFormat); data = 0; lstep = 0; size = 0; @@ -1295,7 +1225,7 @@ void QDirectFBScreen::exposeRegion(QRegion r, int changing) const QRect cursorRectangle = cursor->boundingRect(); if (cursor->isVisible() && !cursor->isAccelerated() && cursorRectangle.intersects(brect)) { const QImage image = cursor->image(); - IDirectFBSurface *surface = createDFBSurface(image, QDirectFBScreen::DontTrackSurface); + IDirectFBSurface *surface = createDFBSurface(image, image.format(), QDirectFBScreen::DontTrackSurface); d_ptr->primarySurface->SetBlittingFlags(d_ptr->primarySurface, DSBLIT_BLEND_ALPHACHANNEL); d_ptr->primarySurface->Blit(d_ptr->primarySurface, surface, 0, cursorRectangle.x(), cursorRectangle.y()); surface->Release(surface); diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h index 3f9248e..4cae076 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.h @@ -74,6 +74,9 @@ QT_MODULE(Gui) #if !defined QT_NO_DIRECTFB_OPAQUE_DETECTION && !defined QT_DIRECTFB_OPAQUE_DETECTION #define QT_DIRECTFB_OPAQUE_DETECTION #endif +#if defined QT_NO_DIRECTFB_LAYER && defined QT_DIRECTFB_WM +#error QT_NO_DIRECTFB_LAYER requires QT_NO_DIRECTFB_WM +#endif #define Q_DIRECTFB_VERSION ((DIRECTFB_MAJOR_VERSION << 16) | (DIRECTFB_MINOR_VERION << 8) | DIRECTFB_MICRO_VERSION) @@ -142,21 +145,23 @@ public: // Track surface creation/release so we can release all on exit enum SurfaceCreationOption { - DontTrackSurface = 0, - TrackSurface = 1 + DontTrackSurface = 0x1, + TrackSurface = 0x2, + NoPreallocated = 0x4 }; Q_DECLARE_FLAGS(SurfaceCreationOptions, SurfaceCreationOption); IDirectFBSurface *createDFBSurface(const QImage &image, - SurfaceCreationOptions options); + QImage::Format format, + SurfaceCreationOptions options, + DFBResult *result = 0); IDirectFBSurface *createDFBSurface(const QSize &size, QImage::Format format, - SurfaceCreationOptions options); + SurfaceCreationOptions options, + DFBResult *result = 0); IDirectFBSurface *copyDFBSurface(IDirectFBSurface *src, QImage::Format format, - SurfaceCreationOptions options); - IDirectFBSurface *copyToDFBSurface(const QImage &image, - QImage::Format format, - SurfaceCreationOptions options); + SurfaceCreationOptions options, + DFBResult *result = 0); void flipSurface(IDirectFBSurface *surface, DFBSurfaceFlipFlags flipFlags, const QRegion ®ion, const QPoint &offset); void releaseDFBSurface(IDirectFBSurface *surface); @@ -166,14 +171,13 @@ public: static int depth(DFBSurfacePixelFormat format); static DFBSurfacePixelFormat getSurfacePixelFormat(QImage::Format format); - static DFBSurfaceDescription getSurfaceDescription(const QImage &image); static DFBSurfaceDescription getSurfaceDescription(const uint *buffer, int length); static QImage::Format getImageFormat(IDirectFBSurface *surface); static bool initSurfaceDescriptionPixelFormat(DFBSurfaceDescription *description, QImage::Format format); static inline bool isPremultiplied(QImage::Format format); - static inline bool hasAlpha(DFBSurfacePixelFormat format); - static inline bool hasAlpha(IDirectFBSurface *surface); + static inline bool hasAlphaChannel(DFBSurfacePixelFormat format); + static inline bool hasAlphaChannel(IDirectFBSurface *surface); QImage::Format alphaPixmapFormat() const; #ifndef QT_NO_DIRECTFB_PALETTE @@ -184,7 +188,8 @@ public: static uchar *lockSurface(IDirectFBSurface *surface, uint flags, int *bpl = 0); private: IDirectFBSurface *createDFBSurface(DFBSurfaceDescription desc, - SurfaceCreationOptions options); + SurfaceCreationOptions options, + DFBResult *result); QDirectFBScreenPrivate *d_ptr; friend class SurfaceCache; }; @@ -207,7 +212,7 @@ inline bool QDirectFBScreen::isPremultiplied(QImage::Format format) return false; } -inline bool QDirectFBScreen::hasAlpha(DFBSurfacePixelFormat format) +inline bool QDirectFBScreen::hasAlphaChannel(DFBSurfacePixelFormat format) { switch (format) { case DSPF_ARGB1555: @@ -232,12 +237,12 @@ inline bool QDirectFBScreen::hasAlpha(DFBSurfacePixelFormat format) } } -inline bool QDirectFBScreen::hasAlpha(IDirectFBSurface *surface) +inline bool QDirectFBScreen::hasAlphaChannel(IDirectFBSurface *surface) { Q_ASSERT(surface); DFBSurfacePixelFormat format; surface->GetPixelFormat(surface, &format); - return QDirectFBScreen::hasAlpha(format); + return QDirectFBScreen::hasAlphaChannel(format); } QT_END_HEADER diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp index 441bac9..7569a18 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp @@ -119,9 +119,6 @@ bool QDirectFBWindowSurface::isValid() const #ifndef QT_NO_DIRECTFB_WM void QDirectFBWindowSurface::createWindow() { -#ifdef QT_NO_DIRECTFB_LAYER -#error QT_NO_DIRECTFB_LAYER requires QT_NO_DIRECTFB_WM -#else IDirectFBDisplayLayer *layer = screen->dfbDisplayLayer(); if (!layer) qFatal("QDirectFBWindowSurface: Unable to get primary display layer!"); @@ -147,7 +144,6 @@ void QDirectFBWindowSurface::createWindow() dfbSurface->Release(dfbSurface); dfbWindow->GetSurface(dfbWindow, &dfbSurface); -#endif } #endif // QT_NO_DIRECTFB_WM @@ -392,7 +388,7 @@ void QDirectFBWindowSurface::flush(QWidget *, const QRegion ®ion, && region.intersects(cursorRectangle.translated(-(offset + windowGeometry.topLeft())))) { const QImage image = cursor->image(); - IDirectFBSurface *surface = screen->createDFBSurface(image, QDirectFBScreen::DontTrackSurface); + IDirectFBSurface *surface = screen->createDFBSurface(image, image.format(), QDirectFBScreen::DontTrackSurface); primarySurface->SetBlittingFlags(primarySurface, DSBLIT_BLEND_ALPHACHANNEL); primarySurface->Blit(primarySurface, surface, 0, cursorRectangle.x(), cursorRectangle.y()); surface->Release(surface); diff --git a/src/plugins/iconengines/svgiconengine/svgiconengine.pro b/src/plugins/iconengines/svgiconengine/svgiconengine.pro index 2e105ee..5c5a31e 100644 --- a/src/plugins/iconengines/svgiconengine/svgiconengine.pro +++ b/src/plugins/iconengines/svgiconengine/svgiconengine.pro @@ -9,3 +9,5 @@ QT += xml svg QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/iconengines target.path += $$[QT_INSTALL_PLUGINS]/iconengines INSTALLS += target + +symbian:TARGET.UID3=0x2001B2E3 diff --git a/src/plugins/imageformats/gif/gif.pro b/src/plugins/imageformats/gif/gif.pro index 74586b2..8a5c51a 100644 --- a/src/plugins/imageformats/gif/gif.pro +++ b/src/plugins/imageformats/gif/gif.pro @@ -8,3 +8,5 @@ SOURCES += main.cpp \ QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/imageformats target.path += $$[QT_INSTALL_PLUGINS]/imageformats INSTALLS += target + +symbian:TARGET.UID3=0x2001E61A diff --git a/src/plugins/imageformats/ico/ico.pro b/src/plugins/imageformats/ico/ico.pro index 73665cd..eadff41 100644 --- a/src/plugins/imageformats/ico/ico.pro +++ b/src/plugins/imageformats/ico/ico.pro @@ -10,3 +10,5 @@ SOURCES += main.cpp \ QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/imageformats target.path += $$[QT_INSTALL_PLUGINS]/imageformats INSTALLS += target + +symbian:TARGET.UID3=0x2001E616 diff --git a/src/plugins/imageformats/jpeg/jpeg.pro b/src/plugins/imageformats/jpeg/jpeg.pro index f310902..ebc79cc 100644 --- a/src/plugins/imageformats/jpeg/jpeg.pro +++ b/src/plugins/imageformats/jpeg/jpeg.pro @@ -13,6 +13,12 @@ wince*: { contains(CE_ARCH,x86):CONFIG += exceptions_off } +symbian: { + #Disable warnings in 3rdparty code due to unused arguments + QMAKE_CXXFLAGS.CW += -W nounusedarg + TARGET.UID3=0x2001E61B +} + contains(QT_CONFIG, system-jpeg) { unix:LIBS += -ljpeg win32:LIBS += libjpeg.lib @@ -71,3 +77,4 @@ contains(QT_CONFIG, system-jpeg) { QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/imageformats target.path += $$[QT_INSTALL_PLUGINS]/imageformats INSTALLS += target + diff --git a/src/plugins/imageformats/mng/mng.pro b/src/plugins/imageformats/mng/mng.pro index f0943f5..de7dfa7 100644 --- a/src/plugins/imageformats/mng/mng.pro +++ b/src/plugins/imageformats/mng/mng.pro @@ -7,6 +7,12 @@ HEADERS += qmnghandler.h SOURCES += main.cpp \ qmnghandler.cpp +symbian: { + #Disable warnings in 3rdparty code due to unused variables and arguments + QMAKE_CXXFLAGS.CW += -W nounused + TARGET.UID3=0x2001E619 +} + contains(QT_CONFIG, system-mng) { unix:LIBS += -lmng win32:LIBS += libmng.lib @@ -47,3 +53,4 @@ contains(QT_CONFIG, system-zlib) { QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/imageformats target.path += $$[QT_INSTALL_PLUGINS]/imageformats INSTALLS += target + diff --git a/src/plugins/imageformats/mng/qmnghandler.cpp b/src/plugins/imageformats/mng/qmnghandler.cpp index d459e505..b2c3f69 100644 --- a/src/plugins/imageformats/mng/qmnghandler.cpp +++ b/src/plugins/imageformats/mng/qmnghandler.cpp @@ -375,8 +375,6 @@ QMngHandler::QMngHandler() QMngHandler::~QMngHandler() { - Q_D(QMngHandler); - delete d; } /*! \reimp */ diff --git a/src/plugins/imageformats/mng/qmnghandler.h b/src/plugins/imageformats/mng/qmnghandler.h index 8f85f6f..4352597 100644 --- a/src/plugins/imageformats/mng/qmnghandler.h +++ b/src/plugins/imageformats/mng/qmnghandler.h @@ -42,6 +42,7 @@ #ifndef QMNGHANDLER_H #define QMNGHANDLER_H +#include <QtCore/qscopedpointer.h> #include <QtGui/qimageiohandler.h> QT_BEGIN_NAMESPACE @@ -74,7 +75,7 @@ class QMngHandler : public QImageIOHandler private: Q_DECLARE_PRIVATE(QMngHandler) - QMngHandlerPrivate *d_ptr; + QScopedPointer<QMngHandlerPrivate> d_ptr; }; QT_END_NAMESPACE diff --git a/src/plugins/imageformats/svg/svg.pro b/src/plugins/imageformats/svg/svg.pro index 747d556..bcf4c21 100644 --- a/src/plugins/imageformats/svg/svg.pro +++ b/src/plugins/imageformats/svg/svg.pro @@ -9,3 +9,5 @@ QT += xml svg QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/imageformats target.path += $$[QT_INSTALL_PLUGINS]/imageformats INSTALLS += target + +symbian:TARGET.UID3=0x2001E618 diff --git a/src/plugins/imageformats/tiff/tiff.pro b/src/plugins/imageformats/tiff/tiff.pro index 8930cf3..312f99c 100644 --- a/src/plugins/imageformats/tiff/tiff.pro +++ b/src/plugins/imageformats/tiff/tiff.pro @@ -56,6 +56,9 @@ contains(QT_CONFIG, system-tiff) { wince*: { SOURCES += ../../../corelib/kernel/qfunctions_wince.cpp } + symbian*: { + SOURCES += ../../../3rdparty/libtiff/port/lfind.c + } } contains(QT_CONFIG, system-zlib) { @@ -68,3 +71,5 @@ contains(QT_CONFIG, system-zlib) { QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/imageformats target.path += $$[QT_INSTALL_PLUGINS]/imageformats INSTALLS += target + +symbian:TARGET.UID3=0x2001E617 diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index 45669e4..004b816 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -1,13 +1,14 @@ TEMPLATE = subdirs SUBDIRS *= accessible imageformats sqldrivers iconengines script -unix { +unix:!symbian { contains(QT_CONFIG,iconv)|contains(QT_CONFIG,gnu-libiconv):SUBDIRS *= codecs } else { SUBDIRS *= codecs } !embedded:SUBDIRS *= graphicssystems embedded:SUBDIRS *= gfxdrivers decorations mousedrivers kbddrivers -!win32:!embedded:!mac:SUBDIRS *= inputmethods +!win32:!embedded:!mac:!symbian:SUBDIRS *= inputmethods +symbian:SUBDIRS += s60 contains(QT_CONFIG, phonon): SUBDIRS *= phonon contains(QT_CONFIG, multimedia): SUBDIRS *= audio diff --git a/src/plugins/qpluginbase.pri b/src/plugins/qpluginbase.pri index 82a1459..10563c1 100644 --- a/src/plugins/qpluginbase.pri +++ b/src/plugins/qpluginbase.pri @@ -13,3 +13,9 @@ contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols include(../qt_targets.pri) wince*:LIBS += $$QMAKE_LIBS_GUI + +symbian: { + TARGET.EPOCALLOWDLLDATA=1 + TARGET.CAPABILITY = All -Tcb + load(armcc_warnings) +} diff --git a/src/plugins/s60/3_1/3_1.pro b/src/plugins/s60/3_1/3_1.pro new file mode 100644 index 0000000..568a33c --- /dev/null +++ b/src/plugins/s60/3_1/3_1.pro @@ -0,0 +1,8 @@ +include(../s60pluginbase.pri) + +TARGET = qts60plugin_3_1 + +SOURCES += ../src/qlocale_3_1.cpp \ + ../src/qdesktopservices_3_1.cpp + +TARGET.UID3=0x2001E620 diff --git a/src/plugins/s60/3_2/3_2.pro b/src/plugins/s60/3_2/3_2.pro new file mode 100644 index 0000000..97409d3 --- /dev/null +++ b/src/plugins/s60/3_2/3_2.pro @@ -0,0 +1,15 @@ +include(../s60pluginbase.pri) + +TARGET = qts60plugin_3_2 + +contains(S60_VERSION, 3.1) { + SOURCES += ../src/qlocale_3_1.cpp \ + ../src/qdesktopservices_3_1.cpp +} else { + SOURCES += ../src/qlocale_3_2.cpp \ + ../src/qdesktopservices_3_2.cpp + LIBS += -ldirectorylocalizer + INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE +} + +TARGET.UID3=0x2001E621 diff --git a/src/plugins/s60/5_0/5_0.pro b/src/plugins/s60/5_0/5_0.pro new file mode 100644 index 0000000..d7c3cb2 --- /dev/null +++ b/src/plugins/s60/5_0/5_0.pro @@ -0,0 +1,15 @@ +include(../s60pluginbase.pri) + +TARGET = qts60plugin_5_0 + +contains(S60_VERSION, 3.1) { + SOURCES += ../src/qlocale_3_1.cpp \ + ../src/qdesktopservices_3_1.cpp +} else { + SOURCES += ../src/qlocale_3_2.cpp \ + ../src/qdesktopservices_3_2.cpp + LIBS += -ldirectorylocalizer + INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE +} + +TARGET.UID3=0x2001E622 diff --git a/src/plugins/s60/bwins/qts60pluginu.def b/src/plugins/s60/bwins/qts60pluginu.def new file mode 100644 index 0000000..a082262 --- /dev/null +++ b/src/plugins/s60/bwins/qts60pluginu.def @@ -0,0 +1,6 @@ +EXPORTS + ?defaultFormatL@@YAXAAVTTime@@AAVTDes16@@ABVTDesC16@@ABVTLocale@@@Z @ 1 NONAME ; void defaultFormatL(class TTime &, class TDes16 &, class TDesC16 const &, class TLocale const &) + ?defaultGetTimeFormatSpec@@YA?AVTPtrC16@@AAVTExtendedLocale@@@Z @ 2 NONAME ; class TPtrC16 defaultGetTimeFormatSpec(class TExtendedLocale &) + ?defaultGetLongDateFormatSpec@@YA?AVTPtrC16@@AAVTExtendedLocale@@@Z @ 3 NONAME ; class TPtrC16 defaultGetLongDateFormatSpec(class TExtendedLocale &) + ?defaultGetShortDateFormatSpec@@YA?AVTPtrC16@@AAVTExtendedLocale@@@Z @ 4 NONAME ; class TPtrC16 defaultGetShortDateFormatSpec(class TExtendedLocale &) + ?localizedDirectoryName@@YA?AVQString@@AAV1@@Z @ 5 NONAME ; class QString localizedDirectoryName(class QString &) diff --git a/src/plugins/s60/eabi/qts60pluginu.def b/src/plugins/s60/eabi/qts60pluginu.def new file mode 100644 index 0000000..d768436 --- /dev/null +++ b/src/plugins/s60/eabi/qts60pluginu.def @@ -0,0 +1,6 @@ +EXPORTS + _Z14defaultFormatLR5TTimeR6TDes16RK7TDesC16RK7TLocale @ 1 NONAME + _Z24defaultGetTimeFormatSpecR15TExtendedLocale @ 2 NONAME + _Z28defaultGetLongDateFormatSpecR15TExtendedLocale @ 3 NONAME + _Z29defaultGetShortDateFormatSpecR15TExtendedLocale @ 4 NONAME + _Z22localizedDirectoryNameR7QString @ 5 NONAME diff --git a/src/plugins/s60/s60.pro b/src/plugins/s60/s60.pro new file mode 100644 index 0000000..8ae639c --- /dev/null +++ b/src/plugins/s60/s60.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs + +symbian:SUBDIRS = 3_1 3_2 5_0 diff --git a/src/plugins/s60/s60pluginbase.pri b/src/plugins/s60/s60pluginbase.pri new file mode 100644 index 0000000..29e8eb3 --- /dev/null +++ b/src/plugins/s60/s60pluginbase.pri @@ -0,0 +1,16 @@ +# Note: These version based 'plugins' are not an actual Qt plugins, +# they are just regular runtime loaded libraries +include(../../qpluginbase.pri) + +CONFIG -= plugin + +MMP_RULES += NOEXPORTLIBRARY + +defBlock = \ + "$${LITERAL_HASH}ifdef WINSCW" \ + "DEFFILE ../bwins/qts60plugin.def" \ + "$${LITERAL_HASH}else" \ + "DEFFILE ../eabi/qts60plugin.def" \ + "$${LITERAL_HASH}endif" + +MMP_RULES += defBlock
\ No newline at end of file diff --git a/src/plugins/s60/src/qdesktopservices_3_1.cpp b/src/plugins/s60/src/qdesktopservices_3_1.cpp new file mode 100644 index 0000000..a651c03 --- /dev/null +++ b/src/plugins/s60/src/qdesktopservices_3_1.cpp @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <qglobal.h> +#include <qstring.h> + +EXPORT_C QString localizedDirectoryName(QString&) +{ + qWarning("QDesktopServices::displayName() not implemented for this platform version"); + return QString(); +} diff --git a/src/plugins/s60/src/qdesktopservices_3_2.cpp b/src/plugins/s60/src/qdesktopservices_3_2.cpp new file mode 100644 index 0000000..fab1237 --- /dev/null +++ b/src/plugins/s60/src/qdesktopservices_3_2.cpp @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <private/qcore_symbian_p.h> +#include <qstring.h> +#include <qdir.h> + +#ifdef Q_WS_S60 +#include <e32base.h> // CBase -> Required by cdirectorylocalizer.h +#include <cdirectorylocalizer.h> // CDirectoryLocalizer + +EXPORT_C QString localizedDirectoryName(QString& rawPath) +{ + QString ret; + + TRAPD(err, + QT_TRYCATCH_LEAVING( + CDirectoryLocalizer* localizer = CDirectoryLocalizer::NewL(); + CleanupStack::PushL(localizer); + localizer->SetFullPath(qt_QString2TPtrC(QDir::toNativeSeparators(rawPath))); + if(localizer->IsLocalized()){ + TPtrC locName(localizer->LocalizedName()); + ret = qt_TDesC2QString(locName); + } + CleanupStack::PopAndDestroy(localizer); + ) + ) + + if (err != KErrNone) + ret = QString(); + + return ret; +} +#else + +EXPORT_C QString localizedDirectoryName(QString& /* rawPath */) +{ + qWarning("QDesktopServices::displayName() not implemented for this platform version"); + return QString(); +} +#endif diff --git a/src/plugins/s60/src/qlocale_3_1.cpp b/src/plugins/s60/src/qlocale_3_1.cpp new file mode 100644 index 0000000..ed3c8ce --- /dev/null +++ b/src/plugins/s60/src/qlocale_3_1.cpp @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <e32std.h> + +EXPORT_C void defaultFormatL(TTime&, TDes& des, const TDesC&, const TLocale&) +{ + des.Zero(); +} + +EXPORT_C TPtrC defaultGetTimeFormatSpec(TExtendedLocale&) +{ + return TPtrC(KNullDesC); +} + +EXPORT_C TPtrC defaultGetLongDateFormatSpec(TExtendedLocale&) +{ + return TPtrC(KNullDesC); +} + +EXPORT_C TPtrC defaultGetShortDateFormatSpec(TExtendedLocale&) +{ + return TPtrC(KNullDesC); +} diff --git a/src/plugins/s60/src/qlocale_3_2.cpp b/src/plugins/s60/src/qlocale_3_2.cpp new file mode 100644 index 0000000..835f46b --- /dev/null +++ b/src/plugins/s60/src/qlocale_3_2.cpp @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <exception> +#include <e32std.h> +#include <e32base.h> + +EXPORT_C TPtrC defaultGetLongDateFormatSpec(TExtendedLocale& locale) +{ + return locale.GetLongDateFormatSpec(); +} + +EXPORT_C TPtrC defaultGetShortDateFormatSpec(TExtendedLocale& locale) +{ + return locale.GetShortDateFormatSpec(); +} + +EXPORT_C TPtrC defaultGetTimeFormatSpec(TExtendedLocale& locale) +{ + return locale.GetTimeFormatSpec(); +} + +EXPORT_C void defaultFormatL(TTime& time, TDes& des, const TDesC& format, const TLocale& locale) +{ + time.FormatL(des, format, locale); +} diff --git a/src/plugins/script/script.pro b/src/plugins/script/script.pro index dbcecea..eaae56b 100644 --- a/src/plugins/script/script.pro +++ b/src/plugins/script/script.pro @@ -1,2 +1,2 @@ TEMPLATE = subdirs -contains(QT_CONFIG, dbus):SUBDIRS += qtdbus +contains(QT_CONFIG, script):contains(QT_CONFIG, dbus):SUBDIRS += qtdbus diff --git a/src/plugins/sqldrivers/sqldrivers.pro b/src/plugins/sqldrivers/sqldrivers.pro index 39c58d4..2bd5f2c 100644 --- a/src/plugins/sqldrivers/sqldrivers.pro +++ b/src/plugins/sqldrivers/sqldrivers.pro @@ -9,3 +9,7 @@ contains(sql-plugins, db2) : SUBDIRS += db2 contains(sql-plugins, sqlite) : SUBDIRS += sqlite contains(sql-plugins, sqlite2) : SUBDIRS += sqlite2 contains(sql-plugins, ibase) : SUBDIRS += ibase + +contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) { + symbian:contains(CONFIG, system-sqlite): SUBDIRS += sqlite_symbian + } diff --git a/src/plugins/sqldrivers/sqlite_symbian/SQLite3_v9.2.zip b/src/plugins/sqldrivers/sqlite_symbian/SQLite3_v9.2.zip Binary files differnew file mode 100644 index 0000000..923cca4 --- /dev/null +++ b/src/plugins/sqldrivers/sqlite_symbian/SQLite3_v9.2.zip diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro new file mode 100644 index 0000000..4734144 --- /dev/null +++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro @@ -0,0 +1,5 @@ +# Use subdirs template to suppress generation of unnecessary files +TEMPLATE = subdirs + +# We just want to extract the zip file containing sqlite binaries for Symbian +BLD_INF_RULES.prj_exports += ":zip SQLite3_v9.2.zip" |