diff options
author | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2009-11-05 07:26:06 (GMT) |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2009-11-05 07:26:06 (GMT) |
commit | 7f7d4cdf01409283d32a6799c1f73663b8ec3ea1 (patch) | |
tree | 057102ed546240efc7e5e8054e150fecf0e14001 /src | |
parent | aa58293b57a05cd52b36ba14a05958dceb65c603 (diff) | |
parent | 91c09562ed9c6eb1bd3a4dbd84a8cc64647751ee (diff) | |
download | Qt-7f7d4cdf01409283d32a6799c1f73663b8ec3ea1.zip Qt-7f7d4cdf01409283d32a6799c1f73663b8ec3ea1.tar.gz Qt-7f7d4cdf01409283d32a6799c1f73663b8ec3ea1.tar.bz2 |
Merge branch '4.5' into 4.6
Conflicts:
tests/auto/qsqlquery/tst_qsqlquery.cpp
tests/auto/qtextlayout/tst_qtextlayout.cpp
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/accessible/qaccessible_mac.mm | 5 | ||||
-rw-r--r-- | src/gui/dialogs/qfiledialog_mac.mm | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 6 | ||||
-rw-r--r-- | src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp | 61 | ||||
-rw-r--r-- | src/sql/drivers/psql/qsql_psql.cpp | 2 | ||||
-rw-r--r-- | src/sql/models/qsqltablemodel.cpp | 2 |
6 files changed, 67 insertions, 11 deletions
diff --git a/src/gui/accessible/qaccessible_mac.mm b/src/gui/accessible/qaccessible_mac.mm index 9575ad8..030c1a9 100644 --- a/src/gui/accessible/qaccessible_mac.mm +++ b/src/gui/accessible/qaccessible_mac.mm @@ -504,11 +504,6 @@ QAElement::QAElement(const QAElement &element) } QAElement::QAElement(HIObjectRef object, int child) - :elementRef( -#ifndef QT_MAC_USE_COCOA - AXUIElementCreateWithHIObjectAndIdentifier(object, child) -#endif -) { #ifndef QT_MAC_USE_COCOA if (object == 0) { diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm index 4af5688..b0e6575 100644 --- a/src/gui/dialogs/qfiledialog_mac.mm +++ b/src/gui/dialogs/qfiledialog_mac.mm @@ -830,8 +830,8 @@ void QFileDialogPrivate::qt_mac_filedialog_event_proc(const NavEventCallbackMess || mode == QFileDialog::ExistingFiles){ // When changing directory, the current selection is cleared if // we are supposed to be selecting files only: - fileDialogPrivate->mCurrentSelectionList.clear(); if (!fileDialogPrivate->mCurrentSelection.isEmpty()){ + fileDialogPrivate->mCurrentSelectionList.clear(); fileDialogPrivate->mCurrentSelection.clear(); emit fileDialogPrivate->q_func()->currentChanged(fileDialogPrivate->mCurrentSelection); } diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 9270220..278bd80 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -3787,7 +3787,7 @@ void QWidgetPrivate::stackUnder_sys(QWidget *w) /* Modifies the bounds for a widgets backing HIView during moves and resizes. Also updates the widget, either by scrolling its contents or repainting, depending on the WA_StaticContents - and QWidgetPrivate::isOpaque flags. + flag */ static void qt_mac_update_widget_posisiton(QWidget *q, QRect oldRect, QRect newRect) { @@ -3804,8 +3804,8 @@ static void qt_mac_update_widget_posisiton(QWidget *q, QRect oldRect, QRect newR // Perform a normal (complete repaint) update in some cases: if ( - // move-by-scroll requires QWidgetPrivate::isOpaque set - (isMove && q->testAttribute(Qt::WA_OpaquePaintEvent) == false) || + // always repaint on move. + (isMove) || // limited update on resize requires WA_StaticContents. (isResize && q->testAttribute(Qt::WA_StaticContents) == false) || diff --git a/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp b/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp index 1dec9ea..c1410a6 100644 --- a/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp +++ b/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp @@ -271,6 +271,67 @@ int PvrEglScreen::transformation() const #endif +#ifndef QT_NO_QWS_TRANSFORMED + +static const QScreen *parentScreen + (const QScreen *current, const QScreen *lookingFor) +{ + if (!current) + return 0; + switch (current->classId()) { + case QScreen::ProxyClass: + case QScreen::TransformedClass: { + const QScreen *child = + static_cast<const QProxyScreen *>(current)->screen(); + if (child == lookingFor) + return current; + else + return parentScreen(child, lookingFor); + } + // Not reached. + + case QScreen::MultiClass: { + QList<QScreen *> screens = current->subScreens(); + foreach (QScreen *screen, screens) { + if (screen == lookingFor) + return current; + const QScreen *parent = parentScreen(screen, lookingFor); + if (parent) + return parent; + } + } + break; + + default: break; + } + return 0; +} + +int PvrEglScreen::transformation() const +{ + // We need to search for our parent screen, which is assumed to be + // "Transformed". If it isn't, then there is no transformation. + // There is no direct method to get the parent screen so we need + // to search every screen until we find ourselves. + if (!parent && qt_screen != this) + parent = parentScreen(qt_screen, this); + if (!parent) + return 0; + if (parent->classId() != QScreen::TransformedClass) + return 0; + return 90 * static_cast<const QTransformedScreen *>(parent) + ->transformation(); +} + +#else + +int PvrEglScreen::transformation() const +{ + return 0; +} + +#endif + void PvrEglScreen::sync() { // Put code here to synchronize 2D and 3D operations if necessary. diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp index 1e41571..981b750 100644 --- a/src/sql/drivers/psql/qsql_psql.cpp +++ b/src/sql/drivers/psql/qsql_psql.cpp @@ -1150,7 +1150,7 @@ QString QPSQLDriver::formatValue(const QSqlField &field, bool trimStrings) const case QVariant::Time: #ifndef QT_NO_DATESTRING if (field.value().toTime().isValid()) { - r = QLatin1Char('\'') + field.value().toTime().toString(Qt::ISODate) + QLatin1Char('\''); + r = QLatin1Char('\'') + field.value().toTime().toString(QLatin1String("hh:mm:ss.zzz")) + QLatin1Char('\''); } else #endif { diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp index df94080..e5c6550 100644 --- a/src/sql/models/qsqltablemodel.cpp +++ b/src/sql/models/qsqltablemodel.cpp @@ -406,7 +406,7 @@ bool QSqlTableModel::select() QSqlQuery qu(query, d->db); setQuery(qu); - if (!qu.isActive()) { + if (!qu.isActive() || lastError().isValid()) { // something went wrong - revert to non-select state d->initRecordAndPrimaryIndex(); return false; |