diff options
author | Sami Merila <sami.merila@nokia.com> | 2010-07-01 08:07:14 (GMT) |
---|---|---|
committer | Sami Merila <sami.merila@nokia.com> | 2010-07-01 08:07:52 (GMT) |
commit | cb2b4a12ac17adf56074d3630efe4feb50ae0e2b (patch) | |
tree | eaa4335e45699cbb698f42a43712039bd63ccf7c /src | |
parent | 30ef2af599f85fef56b975f45fd4edfe817a449a (diff) | |
parent | d3ae6c620876e08ed130606709c208f7352b2f81 (diff) | |
download | Qt-cb2b4a12ac17adf56074d3630efe4feb50ae0e2b.zip Qt-cb2b4a12ac17adf56074d3630efe4feb50ae0e2b.tar.gz Qt-cb2b4a12ac17adf56074d3630efe4feb50ae0e2b.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 22 | ||||
-rw-r--r-- | src/gui/image/image.pri | 4 | ||||
-rw-r--r-- | src/gui/image/qimagereader.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 8 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_win.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/qcombobox.cpp | 5 | ||||
-rw-r--r-- | src/network/ssl/qsslsocket_openssl.cpp | 16 | ||||
-rw-r--r-- | src/plugins/bearer/symbian/qnetworksession_impl.cpp | 5 | ||||
-rw-r--r-- | src/plugins/imageformats/jpeg/jpeg.pro | 10 | ||||
-rw-r--r-- | src/plugins/imageformats/mng/mng.pro | 46 | ||||
-rw-r--r-- | src/plugins/imageformats/tiff/tiff.pro | 98 |
11 files changed, 128 insertions, 90 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index ca3b56f..e5264da 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -885,8 +885,7 @@ void QGraphicsScenePrivate::removePopup(QGraphicsWidget *widget, bool itemIsDyin ungrabKeyboard(static_cast<QGraphicsItem *>(widget), itemIsDying); } if (!itemIsDying && widget->isVisible()) { - widget->hide(); - widget->QGraphicsItem::d_ptr->explicitlyHidden = 0; + widget->QGraphicsItem::d_ptr->setVisibleHelper(false, /* explicit = */ false); } } } @@ -4163,6 +4162,25 @@ void QGraphicsScene::wheelEvent(QGraphicsSceneWheelEvent *wheelEvent) wheelEvent->scenePos(), wheelEvent->widget()); +#ifdef Q_WS_MAC + // On Mac, ignore the event if the first item under the mouse is not the last opened + // popup (or one of its descendant) + if (!d->popupWidgets.isEmpty() && !wheelCandidates.isEmpty() && wheelCandidates.first() != d->popupWidgets.back() && !d->popupWidgets.back()->isAncestorOf(wheelCandidates.first())) { + wheelEvent->accept(); + return; + } +#else + // Find the first popup under the mouse (including the popup's descendants) starting from the last. + // Remove all popups after the one found, or all or them if no popup is under the mouse. + // Then continue with the event. + QList<QGraphicsWidget *>::const_iterator iter = d->popupWidgets.end(); + while (--iter >= d->popupWidgets.begin() && !wheelCandidates.isEmpty()) { + if (wheelCandidates.first() == *iter || (*iter)->isAncestorOf(wheelCandidates.first())) + break; + d->removePopup(*iter); + } +#endif + bool hasSetFocus = false; foreach (QGraphicsItem *item, wheelCandidates) { if (!hasSetFocus && item->isEnabled() diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri index c4eac95..f5f1bc0 100644 --- a/src/gui/image/image.pri +++ b/src/gui/image/image.pri @@ -63,7 +63,7 @@ embedded { } x11 { HEADERS += image/qpixmap_x11_p.h - SOURCES += image/qpixmap_x11.cpp + SOURCES += image/qpixmap_x11.cpp } mac { HEADERS += image/qpixmap_mac_p.h @@ -96,7 +96,7 @@ SOURCES += \ unix|win32-g++*:LIBS_PRIVATE += -lpng win32:!win32-g++*:LIBS += libpng.lib } else { - DEFINES *= QT_USE_BUNDLED_LIBPNG + DEFINES *= QT_USE_BUNDLED_LIBPNG !isEqual(QT_ARCH, i386):!isEqual(QT_ARCH, x86_64):DEFINES += PNG_NO_ASSEMBLER_CODE INCLUDEPATH += ../3rdparty/libpng SOURCES += ../3rdparty/libpng/png.c \ diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp index 93d5cd3..af43e90 100644 --- a/src/gui/image/qimagereader.cpp +++ b/src/gui/image/qimagereader.cpp @@ -301,7 +301,7 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device, if (!handler && !testFormat.isEmpty()) { if (false) { #ifndef QT_NO_IMAGEFORMAT_PNG - } else if (testFormat == "png") { + } else if (testFormat == "png") { handler = new QPngHandler; #endif #ifndef QT_NO_IMAGEFORMAT_BMP diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index a9bb691..e57ec77 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -2861,9 +2861,11 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f) } if (wasWindow) { oldToolbar = [oldWindow toolbar]; - [oldToolbar retain]; - oldToolbarVisible = [oldToolbar isVisible]; - [oldWindow setToolbar:nil]; + if (oldToolbar) { + [oldToolbar retain]; + oldToolbarVisible = [oldToolbar isVisible]; + [oldWindow setToolbar:nil]; + } } #endif } diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp index 9c65aa0..0f05c6b 100644 --- a/src/gui/kernel/qwidget_win.cpp +++ b/src/gui/kernel/qwidget_win.cpp @@ -1167,7 +1167,7 @@ void QWidgetPrivate::show_sys() // This is to resolve the problem where popups are opened from the // system tray and not being implicitly activated if (q->windowType() == Qt::Popup && - (!q->parentWidget() || !q->parentWidget()->isActiveWindow())) + !q->parentWidget() && !qApp->activeWindow()) q->activateWindow(); } diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp index 1504066..dcc328f 100644 --- a/src/gui/widgets/qcombobox.cpp +++ b/src/gui/widgets/qcombobox.cpp @@ -704,6 +704,11 @@ void QComboBoxPrivateContainer::hideEvent(QHideEvent *) { emit resetButton(); combo->update(); + // QGraphicsScenePrivate::removePopup closes the combo box popup, it hides it non-explicitly. + // Hiding/showing the QComboBox after this will unexpectedly show the popup as well. + // Re-hiding the popup container makes sure it is explicitly hidden. + if (QGraphicsProxyWidget *proxy = graphicsProxyWidget()) + proxy->hide(); } void QComboBoxPrivateContainer::mousePressEvent(QMouseEvent *e) diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index fa26fe8..30428ff 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -299,8 +299,20 @@ init_context: } // Add all our CAs to this store. - foreach (const QSslCertificate &caCertificate, q->caCertificates()) + QList<QSslCertificate> expiredCerts; + foreach (const QSslCertificate &caCertificate, q->caCertificates()) { + // add expired certs later, so that the + // valid ones are used before the expired ones + if (! caCertificate.isValid()) { + expiredCerts.append(caCertificate); + } else { + q_X509_STORE_add_cert(ctx->cert_store, (X509 *)caCertificate.handle()); + } + } + // now add the expired certs + foreach (const QSslCertificate &caCertificate, expiredCerts) { q_X509_STORE_add_cert(ctx->cert_store, (X509 *)caCertificate.handle()); + } // Register a custom callback to get all verification errors. X509_STORE_set_verify_cb_func(ctx->cert_store, q_X509Callback); @@ -597,7 +609,7 @@ QList<QSslCertificate> QSslSocketPrivate::systemCaCertificates() if(!pc) break; QByteArray der((const char *)(pc->pbCertEncoded), static_cast<int>(pc->cbCertEncoded)); - QSslCertificate cert(der,QSsl::Der); + QSslCertificate cert(der, QSsl::Der); systemCerts.append(cert); } ptrCertCloseStore(hSystemStore, 0); diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp index b6e11df..f89ed0a 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp +++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp @@ -1303,7 +1303,8 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint #ifdef OCC_FUNCTIONALITY_AVAILABLE // If the retVal is not true here, it means that the status update may apply to an IAP outside of // SNAP (session is based on SNAP but follows IAP outside of it), which may occur on Symbian^3 EasyWlan. - if (retVal == false && activeConfig.d.data() && activeConfig.d.data()->numericId == accessPointId) { + if (retVal == false && activeConfig.isValid() && + toSymbianConfig(privateConfiguration(activeConfig))->numericIdentifier() == accessPointId) { #ifdef QT_BEARERMGMT_SYMBIAN_DEBUG qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "===> EMIT State changed G to: " << state; #endif @@ -1311,7 +1312,7 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint activeConfig = QNetworkConfiguration(); } state = newState; - emit q->stateChanged(state); + emit stateChanged(state); retVal = true; } #endif diff --git a/src/plugins/imageformats/jpeg/jpeg.pro b/src/plugins/imageformats/jpeg/jpeg.pro index 0b5d389..d4b0fef 100644 --- a/src/plugins/imageformats/jpeg/jpeg.pro +++ b/src/plugins/imageformats/jpeg/jpeg.pro @@ -7,10 +7,10 @@ HEADERS += qjpeghandler.h SOURCES += main.cpp \ qjpeghandler.cpp -wince*: { - DEFINES += NO_GETENV - contains(CE_ARCH,x86):CONFIG -= stl exceptions - contains(CE_ARCH,x86):CONFIG += exceptions_off +wince*: { + DEFINES += NO_GETENV + contains(CE_ARCH,x86):CONFIG -= stl exceptions + contains(CE_ARCH,x86):CONFIG += exceptions_off } #Disable warnings in 3rdparty code due to unused arguments @@ -18,7 +18,7 @@ symbian: { QMAKE_CXXFLAGS.CW += -W nounusedarg TARGET.UID3=0x2001E61B } else:contains(QMAKE_CC, gcc): { - QMAKE_CFLAGS_WARN_ON += -Wno-unused-parameter -Wno-main + QMAKE_CFLAGS_WARN_ON += -Wno-unused-parameter -Wno-main } contains(QT_CONFIG, system-jpeg) { diff --git a/src/plugins/imageformats/mng/mng.pro b/src/plugins/imageformats/mng/mng.pro index c188b47..158f41a 100644 --- a/src/plugins/imageformats/mng/mng.pro +++ b/src/plugins/imageformats/mng/mng.pro @@ -17,29 +17,29 @@ contains(QT_CONFIG, system-mng) { unix|win32-g++*:LIBS += -lmng win32:!win32-g++*:LIBS += libmng.lib } else { - DEFINES += MNG_BUILD_SO - DEFINES += MNG_NO_INCLUDE_JNG - INCLUDEPATH += ../../../3rdparty/libmng - SOURCES += \ - ../../../3rdparty/libmng/libmng_callback_xs.c \ - ../../../3rdparty/libmng/libmng_chunk_io.c \ - ../../../3rdparty/libmng/libmng_chunk_descr.c \ - ../../../3rdparty/libmng/libmng_chunk_prc.c \ - ../../../3rdparty/libmng/libmng_chunk_xs.c \ - ../../../3rdparty/libmng/libmng_cms.c \ - ../../../3rdparty/libmng/libmng_display.c \ - ../../../3rdparty/libmng/libmng_dither.c \ - ../../../3rdparty/libmng/libmng_error.c \ - ../../../3rdparty/libmng/libmng_filter.c \ - ../../../3rdparty/libmng/libmng_hlapi.c \ - ../../../3rdparty/libmng/libmng_jpeg.c \ - ../../../3rdparty/libmng/libmng_object_prc.c \ - ../../../3rdparty/libmng/libmng_pixels.c \ - ../../../3rdparty/libmng/libmng_prop_xs.c \ - ../../../3rdparty/libmng/libmng_read.c \ - ../../../3rdparty/libmng/libmng_trace.c \ - ../../../3rdparty/libmng/libmng_write.c \ - ../../../3rdparty/libmng/libmng_zlib.c + DEFINES += MNG_BUILD_SO + DEFINES += MNG_NO_INCLUDE_JNG + INCLUDEPATH += ../../../3rdparty/libmng + SOURCES += \ + ../../../3rdparty/libmng/libmng_callback_xs.c \ + ../../../3rdparty/libmng/libmng_chunk_io.c \ + ../../../3rdparty/libmng/libmng_chunk_descr.c \ + ../../../3rdparty/libmng/libmng_chunk_prc.c \ + ../../../3rdparty/libmng/libmng_chunk_xs.c \ + ../../../3rdparty/libmng/libmng_cms.c \ + ../../../3rdparty/libmng/libmng_display.c \ + ../../../3rdparty/libmng/libmng_dither.c \ + ../../../3rdparty/libmng/libmng_error.c \ + ../../../3rdparty/libmng/libmng_filter.c \ + ../../../3rdparty/libmng/libmng_hlapi.c \ + ../../../3rdparty/libmng/libmng_jpeg.c \ + ../../../3rdparty/libmng/libmng_object_prc.c \ + ../../../3rdparty/libmng/libmng_pixels.c \ + ../../../3rdparty/libmng/libmng_prop_xs.c \ + ../../../3rdparty/libmng/libmng_read.c \ + ../../../3rdparty/libmng/libmng_trace.c \ + ../../../3rdparty/libmng/libmng_write.c \ + ../../../3rdparty/libmng/libmng_zlib.c } contains(QT_CONFIG, system-zlib) { diff --git a/src/plugins/imageformats/tiff/tiff.pro b/src/plugins/imageformats/tiff/tiff.pro index 90868e8..08e471c 100644 --- a/src/plugins/imageformats/tiff/tiff.pro +++ b/src/plugins/imageformats/tiff/tiff.pro @@ -16,55 +16,55 @@ contains(QT_CONFIG, system-tiff) { win32:!win32-g++*:LIBS += libjpeg.lib } } else { - INCLUDEPATH += ../../../3rdparty/libtiff/libtiff - SOURCES += \ - ../../../3rdparty/libtiff/libtiff/tif_aux.c \ - ../../../3rdparty/libtiff/libtiff/tif_close.c \ - ../../../3rdparty/libtiff/libtiff/tif_codec.c \ - ../../../3rdparty/libtiff/libtiff/tif_color.c \ - ../../../3rdparty/libtiff/libtiff/tif_compress.c \ - ../../../3rdparty/libtiff/libtiff/tif_dir.c \ - ../../../3rdparty/libtiff/libtiff/tif_dirinfo.c \ - ../../../3rdparty/libtiff/libtiff/tif_dirread.c \ - ../../../3rdparty/libtiff/libtiff/tif_dirwrite.c \ - ../../../3rdparty/libtiff/libtiff/tif_dumpmode.c \ - ../../../3rdparty/libtiff/libtiff/tif_error.c \ - ../../../3rdparty/libtiff/libtiff/tif_extension.c \ - ../../../3rdparty/libtiff/libtiff/tif_fax3.c \ - ../../../3rdparty/libtiff/libtiff/tif_fax3sm.c \ - ../../../3rdparty/libtiff/libtiff/tif_flush.c \ - ../../../3rdparty/libtiff/libtiff/tif_getimage.c \ - ../../../3rdparty/libtiff/libtiff/tif_luv.c \ - ../../../3rdparty/libtiff/libtiff/tif_lzw.c \ - ../../../3rdparty/libtiff/libtiff/tif_next.c \ - ../../../3rdparty/libtiff/libtiff/tif_open.c \ - ../../../3rdparty/libtiff/libtiff/tif_packbits.c \ - ../../../3rdparty/libtiff/libtiff/tif_pixarlog.c \ - ../../../3rdparty/libtiff/libtiff/tif_predict.c \ - ../../../3rdparty/libtiff/libtiff/tif_print.c \ - ../../../3rdparty/libtiff/libtiff/tif_read.c \ - ../../../3rdparty/libtiff/libtiff/tif_strip.c \ - ../../../3rdparty/libtiff/libtiff/tif_swab.c \ - ../../../3rdparty/libtiff/libtiff/tif_thunder.c \ - ../../../3rdparty/libtiff/libtiff/tif_tile.c \ - ../../../3rdparty/libtiff/libtiff/tif_version.c \ - ../../../3rdparty/libtiff/libtiff/tif_warning.c \ - ../../../3rdparty/libtiff/libtiff/tif_write.c \ - ../../../3rdparty/libtiff/libtiff/tif_zip.c - win32:!wince*: { - SOURCES += ../../../3rdparty/libtiff/libtiff/tif_win32.c - } - unix: { - SOURCES += ../../../3rdparty/libtiff/libtiff/tif_unix.c - } - wince*: { - SOURCES += ../../../corelib/kernel/qfunctions_wince.cpp \ - ../../../3rdparty/libtiff/libtiff/tif_wince.c \ - ../../../3rdparty/libtiff/libtiff/tif_win32.c - } - symbian: { - SOURCES += ../../../3rdparty/libtiff/port/lfind.c - } + INCLUDEPATH += ../../../3rdparty/libtiff/libtiff + SOURCES += \ + ../../../3rdparty/libtiff/libtiff/tif_aux.c \ + ../../../3rdparty/libtiff/libtiff/tif_close.c \ + ../../../3rdparty/libtiff/libtiff/tif_codec.c \ + ../../../3rdparty/libtiff/libtiff/tif_color.c \ + ../../../3rdparty/libtiff/libtiff/tif_compress.c \ + ../../../3rdparty/libtiff/libtiff/tif_dir.c \ + ../../../3rdparty/libtiff/libtiff/tif_dirinfo.c \ + ../../../3rdparty/libtiff/libtiff/tif_dirread.c \ + ../../../3rdparty/libtiff/libtiff/tif_dirwrite.c \ + ../../../3rdparty/libtiff/libtiff/tif_dumpmode.c \ + ../../../3rdparty/libtiff/libtiff/tif_error.c \ + ../../../3rdparty/libtiff/libtiff/tif_extension.c \ + ../../../3rdparty/libtiff/libtiff/tif_fax3.c \ + ../../../3rdparty/libtiff/libtiff/tif_fax3sm.c \ + ../../../3rdparty/libtiff/libtiff/tif_flush.c \ + ../../../3rdparty/libtiff/libtiff/tif_getimage.c \ + ../../../3rdparty/libtiff/libtiff/tif_luv.c \ + ../../../3rdparty/libtiff/libtiff/tif_lzw.c \ + ../../../3rdparty/libtiff/libtiff/tif_next.c \ + ../../../3rdparty/libtiff/libtiff/tif_open.c \ + ../../../3rdparty/libtiff/libtiff/tif_packbits.c \ + ../../../3rdparty/libtiff/libtiff/tif_pixarlog.c \ + ../../../3rdparty/libtiff/libtiff/tif_predict.c \ + ../../../3rdparty/libtiff/libtiff/tif_print.c \ + ../../../3rdparty/libtiff/libtiff/tif_read.c \ + ../../../3rdparty/libtiff/libtiff/tif_strip.c \ + ../../../3rdparty/libtiff/libtiff/tif_swab.c \ + ../../../3rdparty/libtiff/libtiff/tif_thunder.c \ + ../../../3rdparty/libtiff/libtiff/tif_tile.c \ + ../../../3rdparty/libtiff/libtiff/tif_version.c \ + ../../../3rdparty/libtiff/libtiff/tif_warning.c \ + ../../../3rdparty/libtiff/libtiff/tif_write.c \ + ../../../3rdparty/libtiff/libtiff/tif_zip.c + win32:!wince*: { + SOURCES += ../../../3rdparty/libtiff/libtiff/tif_win32.c + } + unix: { + SOURCES += ../../../3rdparty/libtiff/libtiff/tif_unix.c + } + wince*: { + SOURCES += ../../../corelib/kernel/qfunctions_wince.cpp \ + ../../../3rdparty/libtiff/libtiff/tif_wince.c \ + ../../../3rdparty/libtiff/libtiff/tif_win32.c + } + symbian: { + SOURCES += ../../../3rdparty/libtiff/port/lfind.c + } } contains(QT_CONFIG, system-zlib) { |