diff options
author | Liang Qi <liang.qi@qt.io> | 2018-11-10 11:36:18 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-11-10 11:38:40 +0100 |
commit | 58437fb125f60c11ba8e97c914fa8db8c89c7373 (patch) | |
tree | f47ed59073984ec76034155bc04d3d987b192d2e /src/widgets | |
parent | 76bb804405f424708fffec502788995ea91206b8 (diff) | |
parent | b20c15f2041205a1cab98fbaf9560a3e2e0d6367 (diff) |
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
src/corelib/serialization/qcborcommon.h
src/corelib/tools/qlocale_data_p.h
tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
Done-with: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: Ibed987f6d77a0294f78f67d78625237616082416
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/doc/images/qgridlayout.png (renamed from src/widgets/doc/images/gridlayout.png) | bin | 1445 -> 1445 bytes | |||
-rw-r--r-- | src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc | 1 | ||||
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 1 | ||||
-rw-r--r-- | src/widgets/kernel/qgridlayout.cpp | 2 | ||||
-rw-r--r-- | src/widgets/kernel/qt_widgets_pch.h | 2 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 6 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetbackingstore.cpp | 14 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetwindow.cpp | 2 | ||||
-rw-r--r-- | src/widgets/styles/qstylesheetstyle.cpp | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qspinbox.cpp | 12 | ||||
-rw-r--r-- | src/widgets/widgets/qtextbrowser.cpp | 4 |
11 files changed, 23 insertions, 23 deletions
diff --git a/src/widgets/doc/images/gridlayout.png b/src/widgets/doc/images/qgridlayout.png Binary files differindex ae76c0487b..ae76c0487b 100644 --- a/src/widgets/doc/images/gridlayout.png +++ b/src/widgets/doc/images/qgridlayout.png diff --git a/src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc b/src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc index 48d8954e60..098eaf4717 100644 --- a/src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc +++ b/src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc @@ -956,6 +956,7 @@ QLineEdit[echoMode="2"] { //! [119] QLineEdit:read-only { background: lightblue; +} //! [119] diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index f8f24d1ff0..40b0af359c 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -58,7 +58,6 @@ #include "qstyle.h" #include "qstyleoption.h" #include "qstylefactory.h" -#include "qtextcodec.h" #include "qtooltip.h" #include "qtranslator.h" #include "qvariant.h" diff --git a/src/widgets/kernel/qgridlayout.cpp b/src/widgets/kernel/qgridlayout.cpp index db8ef89477..f1c6c96a6d 100644 --- a/src/widgets/kernel/qgridlayout.cpp +++ b/src/widgets/kernel/qgridlayout.cpp @@ -1029,7 +1029,7 @@ QRect QGridLayoutPrivate::cellRect(int row, int col) const This illustration shows a fragment of a dialog with a five-column, three-row grid (the grid is shown overlaid in magenta): - \image gridlayout.png A grid layout + \image qgridlayout.png A grid layout Columns 0, 2 and 4 in this dialog fragment are made up of a QLabel, a QLineEdit, and a QListBox. Columns 1 and 3 are diff --git a/src/widgets/kernel/qt_widgets_pch.h b/src/widgets/kernel/qt_widgets_pch.h index 924a68d62e..bec6536637 100644 --- a/src/widgets/kernel/qt_widgets_pch.h +++ b/src/widgets/kernel/qt_widgets_pch.h @@ -63,7 +63,9 @@ #include <qregexp.h> #include <qstring.h> #include <qstringlist.h> +#if QT_CONFIG(textcodec) #include <qtextcodec.h> +#endif #include <qapplication.h> #include <qbitmap.h> diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 4300d83e9c..85a89b717e 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -5861,7 +5861,11 @@ QPixmap QWidgetEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QPoint * pixmapOffset -= effectRect.topLeft(); - const qreal dpr = context->painter->device()->devicePixelRatioF(); + qreal dpr(1.0); + if (const auto *paintDevice = context->painter->device()) + dpr = paintDevice->devicePixelRatioF(); + else + qWarning("QWidgetEffectSourcePrivate::pixmap: Painter not active"); QPixmap pixmap(effectRect.size() * dpr); pixmap.setDevicePixelRatio(dpr); diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp index 53769ef9ed..b40c2d12ad 100644 --- a/src/widgets/kernel/qwidgetbackingstore.cpp +++ b/src/widgets/kernel/qwidgetbackingstore.cpp @@ -1053,20 +1053,8 @@ static QPlatformTextureList *widgetTexturesFor(QWidget *tlw, QWidget *widget) static bool switchableWidgetComposition = QGuiApplicationPrivate::instance()->platformIntegration() ->hasCapability(QPlatformIntegration::SwitchableWidgetComposition); - if (!switchableWidgetComposition -// The Windows compositor handles fullscreen OpenGL window specially. Besides -// having trouble with popups, it also has issues with flip-flopping between -// OpenGL-based and normal flushing. Therefore, stick with GL for fullscreen -// windows (QTBUG-53515). Similary, translucent windows should not switch to -// layered native windows (QTBUG-54734). -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) && !defined(Q_OS_WINCE) - || tlw->windowState().testFlag(Qt::WindowFullScreen) - || tlw->testAttribute(Qt::WA_TranslucentBackground) -#endif - ) - { + if (!switchableWidgetComposition) return qt_dummy_platformTextureList(); - } } return 0; diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index 7292c795b8..0b2d72f330 100644 --- a/src/widgets/kernel/qwidgetwindow.cpp +++ b/src/widgets/kernel/qwidgetwindow.cpp @@ -521,7 +521,7 @@ void QWidgetWindow::handleMouseEvent(QMouseEvent *event) if (activePopupWidget->isEnabled()) { // deliver event qt_replay_popup_mouse_event = false; - QWidget *receiver = activePopupWidget; + QPointer<QWidget> receiver = activePopupWidget; QPoint widgetPos = mapped; if (qt_button_down) receiver = qt_button_down; diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 654bd19d9b..3e397c9e04 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -1644,7 +1644,7 @@ QVector<QCss::StyleRule> QStyleSheetStyle::styleRules(const QObject *obj) const if (!parser.parse(&ss)) { parser.init(QLatin1String("* {") + styleSheet + QLatin1Char('}')); if (Q_UNLIKELY(!parser.parse(&ss))) - qWarning("Could not parse stylesheet of object %p", o); + qWarning() << "Could not parse stylesheet of object" << o; } ss.origin = StyleSheetOrigin_Inline; styleSheetCaches->styleSheetCache.insert(o, ss); diff --git a/src/widgets/widgets/qspinbox.cpp b/src/widgets/widgets/qspinbox.cpp index dcf3906dd7..7624b1ed3c 100644 --- a/src/widgets/widgets/qspinbox.cpp +++ b/src/widgets/widgets/qspinbox.cpp @@ -1134,10 +1134,14 @@ QVariant QSpinBoxPrivate::validateAndInterpret(QString &input, int &pos, num = copy.toInt(&ok, displayIntegerBase); } else { num = locale.toInt(copy, &ok); - if (!ok && copy.contains(locale.groupSeparator()) && (max >= 1000 || min <= -1000)) { - QString copy2 = copy; - copy2.remove(locale.groupSeparator()); - num = locale.toInt(copy2, &ok); + if (!ok && (max >= 1000 || min <= -1000)) { + const QChar sep = locale.groupSeparator(); + const QChar doubleSep[2] = {sep, sep}; + if (copy.contains(sep) && !copy.contains(QString(doubleSep, 2))) { + QString copy2 = copy; + copy2.remove(locale.groupSeparator()); + num = locale.toInt(copy2, &ok); + } } } QSBDEBUG() << __FILE__ << __LINE__<< "num is set to" << num; diff --git a/src/widgets/widgets/qtextbrowser.cpp b/src/widgets/widgets/qtextbrowser.cpp index 1f00adcfe2..bb9a4fed91 100644 --- a/src/widgets/widgets/qtextbrowser.cpp +++ b/src/widgets/widgets/qtextbrowser.cpp @@ -47,7 +47,9 @@ #include <qdebug.h> #include <qabstracttextdocumentlayout.h> #include "private/qtextdocumentlayout_p.h" +#if QT_CONFIG(textcodec) #include <qtextcodec.h> +#endif #include <qpainter.h> #include <qdir.h> #if QT_CONFIG(whatsthis) @@ -293,7 +295,7 @@ void QTextBrowserPrivate::setSource(const QUrl &url) if (data.type() == QVariant::String) { txt = data.toString(); } else if (data.type() == QVariant::ByteArray) { -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) QByteArray ba = data.toByteArray(); QTextCodec *codec = Qt::codecForHtml(ba); txt = codec->toUnicode(ba); |