Merge "Merge remote-tracking branch 'origin/5.15' into dev"
This commit is contained in:
commit
ceaf23b361
@ -4497,6 +4497,14 @@ QDebug operator<<(QDebug dbg, const QObject *o)
|
||||
\c{staticMetaObject} is of type QMetaObject and provides access to the
|
||||
enums declared with Q_ENUM_NS/Q_FLAG_NS.
|
||||
|
||||
For example:
|
||||
|
||||
\code
|
||||
namespace test {
|
||||
Q_NAMESPACE
|
||||
...
|
||||
\endcode
|
||||
|
||||
\sa Q_NAMESPACE_EXPORT
|
||||
*/
|
||||
|
||||
@ -4513,6 +4521,14 @@ QDebug operator<<(QDebug dbg, const QObject *o)
|
||||
is declared with the supplied \a EXPORT_MACRO qualifier. This is
|
||||
useful if the object needs to be exported from a dynamic library.
|
||||
|
||||
For example:
|
||||
|
||||
\code
|
||||
namespace test {
|
||||
Q_NAMESPACE_EXPORT(EXPORT_MACRO)
|
||||
...
|
||||
\endcode
|
||||
|
||||
\sa Q_NAMESPACE, {Creating Shared Libraries}
|
||||
*/
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Copyright (C) 2016 Intel Corporation.
|
||||
** Copyright (C) 2020 Intel Corporation.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtCore module of the Qt Toolkit.
|
||||
|
@ -2631,7 +2631,6 @@ QT_WARNING_POP
|
||||
\row \li ap or a
|
||||
\li Interpret as an am/pm time. \e a/ap will match a lower-case version
|
||||
of either QLocale::amText() or QLocale::pmText().
|
||||
\row \li t \li the timezone (for example "CEST")
|
||||
\endtable
|
||||
|
||||
All other input characters will be treated as text. Any non-empty sequence
|
||||
@ -5554,8 +5553,15 @@ QT_WARNING_POP
|
||||
|
||||
Uses the calendar \a cal if supplied, else Gregorian.
|
||||
|
||||
See QDate::fromString() and QTime::fromString() for the expressions
|
||||
recognized in the format string to represent parts of the date and time.
|
||||
In addition to the expressions, recognized in the format string to represent
|
||||
parts of the date and time, by QDate::fromString() and QTime::fromString(),
|
||||
this method supports:
|
||||
|
||||
\table
|
||||
\header \li Expression \li Output
|
||||
\row \li t \li the timezone (for example "CEST")
|
||||
\endtable
|
||||
|
||||
All other input characters will be treated as text. Any non-empty sequence
|
||||
of characters enclosed in single quotes will also be treated (stripped of
|
||||
the quotes) as text and not be interpreted as expressions.
|
||||
|
@ -525,7 +525,7 @@ bool QDateTimeParser::parseFormat(const QString &newFormat)
|
||||
}
|
||||
break;
|
||||
case 't':
|
||||
if (parserType != QMetaType::QTime) {
|
||||
if (parserType == QMetaType::QDateTime) {
|
||||
const SectionNode sn = { TimeZoneSection, i - add, countRepeat(newFormat, i, 4), 0 };
|
||||
newSectionNodes.append(sn);
|
||||
appendSeparator(&newSeparators, newFormat, index, i - index, lastQuote);
|
||||
|
@ -2122,12 +2122,7 @@ static QImage convertWithPalette(const QImage &src, QImage::Format format,
|
||||
QImage dest(src.size(), format);
|
||||
dest.setColorTable(clut);
|
||||
|
||||
QString textsKeys = src.text();
|
||||
const auto textKeyList = textsKeys.splitRef(QLatin1Char('\n'), Qt::SkipEmptyParts);
|
||||
for (const auto &textKey : textKeyList) {
|
||||
const auto textKeySplitted = textKey.split(QLatin1String(": "));
|
||||
dest.setText(textKeySplitted[0].toString(), textKeySplitted[1].toString());
|
||||
}
|
||||
QImageData::get(dest)->text = QImageData::get(src)->text;
|
||||
|
||||
int h = src.height();
|
||||
int w = src.width();
|
||||
|
@ -320,6 +320,7 @@ private:
|
||||
friend class QRasterPlatformPixmap;
|
||||
friend class QBlittablePlatformPixmap;
|
||||
friend class QPixmapCacheEntry;
|
||||
friend struct QImageData;
|
||||
|
||||
public:
|
||||
typedef QImageData * DataPtr;
|
||||
|
@ -69,6 +69,9 @@ struct Q_GUI_EXPORT QImageData { // internal image data
|
||||
static QImageData *create(const QSize &size, QImage::Format format);
|
||||
static QImageData *create(uchar *data, int w, int h, qsizetype bpl, QImage::Format format, bool readOnly, QImageCleanupFunction cleanupFunction = nullptr, void *cleanupInfo = nullptr);
|
||||
|
||||
static QImageData *get(QImage &img) noexcept { return img.d; }
|
||||
static const QImageData *get(const QImage &img) noexcept { return img.d; }
|
||||
|
||||
QAtomicInt ref;
|
||||
|
||||
int width;
|
||||
|
@ -536,8 +536,10 @@ void QCALayerBackingStore::flush(QWindow *flushedWindow, const QRegion ®ion,
|
||||
flushedView.layer.contentsScale = m_buffers.back()->devicePixelRatio();
|
||||
}
|
||||
|
||||
const bool isSingleBuffered = window()->format().swapBehavior() == QSurfaceFormat::SingleBuffer;
|
||||
|
||||
id backBufferSurface = (__bridge id)m_buffers.back()->surface();
|
||||
if (flushedView.layer.contents == backBufferSurface) {
|
||||
if (!isSingleBuffered && flushedView.layer.contents == backBufferSurface) {
|
||||
// We've managed to paint to the back buffer again before Core Animation had time
|
||||
// to flush the transaction and persist the layer changes to the window server, or
|
||||
// we've been asked to flush without painting anything. The layer already knows about
|
||||
@ -554,7 +556,7 @@ void QCALayerBackingStore::flush(QWindow *flushedWindow, const QRegion ®ion,
|
||||
// with other pending view and layer updates.
|
||||
flushedView.window.viewsNeedDisplay = YES;
|
||||
|
||||
if (window()->format().swapBehavior() == QSurfaceFormat::SingleBuffer) {
|
||||
if (isSingleBuffered) {
|
||||
// The private API [CALayer reloadValueForKeyPath:@"contents"] would be preferable,
|
||||
// but barring any side effects or performance issues we opt for the hammer for now.
|
||||
flushedView.layer.contents = nil;
|
||||
|
Loading…
Reference in New Issue
Block a user