Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: mkspecs/macx-ios-clang/features/resolve_config.prf src/testlib/qtestcase.qdoc Change-Id: Icefa63056ffb37106f35299a8f19165535571799
This commit is contained in:
commit
d90b155c60
@ -1,12 +1,9 @@
|
||||
|
||||
defineTest(addExclusiveBuilds) {
|
||||
lessThan(ARGC, 2): \
|
||||
error("addExclusiveBuilds() requires at least two arguments")
|
||||
|
||||
!$$join(ARGS, _and_):!fix_output_dirs: \
|
||||
defineTest(addExclusiveBuildsProper) {
|
||||
!$$1:!fix_output_dirs: \
|
||||
return(true)
|
||||
|
||||
for(build, ARGS) {
|
||||
for(build, 2) {
|
||||
isEmpty($${build}.name) {
|
||||
$${build}.name = $$title($$build)
|
||||
export($${build}.name)
|
||||
@ -20,7 +17,7 @@ defineTest(addExclusiveBuilds) {
|
||||
export($${build}.dir_affix)
|
||||
}
|
||||
|
||||
$${build}.exclusive = $$ARGS
|
||||
$${build}.exclusive = $$2
|
||||
export($${build}.exclusive)
|
||||
|
||||
QMAKE_EXCLUSIVE_BUILDS += $$build
|
||||
@ -33,6 +30,13 @@ defineTest(addExclusiveBuilds) {
|
||||
return(true)
|
||||
}
|
||||
|
||||
defineTest(addExclusiveBuilds) {
|
||||
lessThan(ARGC, 2): \
|
||||
error("addExclusiveBuilds() requires at least two arguments")
|
||||
|
||||
addExclusiveBuildsProper($$join(ARGS, _and_), $$ARGS)
|
||||
}
|
||||
|
||||
# Default directories to process
|
||||
QMAKE_DIR_REPLACE = OBJECTS_DIR MOC_DIR RCC_DIR PRECOMPILED_DIR QGLTF_DIR DESTDIR
|
||||
QMAKE_DIR_REPLACE_SANE += QGLTF_DIR
|
||||
|
@ -32,9 +32,9 @@ macx-xcode {
|
||||
} else {
|
||||
# Switch the order to make sure that the first Makefile target is the right one
|
||||
!contains(QT_CONFIG, simulator_and_device):contains(QMAKE_MAC_SDK, ^$${simulator.sdk}.*): \
|
||||
addExclusiveBuilds(simulator, device)
|
||||
addExclusiveBuildsProper(simulator_and_device, simulator device)
|
||||
else: \
|
||||
addExclusiveBuilds(device, simulator)
|
||||
addExclusiveBuildsProper(simulator_and_device, device simulator)
|
||||
}
|
||||
|
||||
equals(TEMPLATE, subdirs) {
|
||||
|
@ -710,6 +710,10 @@ QMimeXMLProvider::QMimeXMLProvider(QMimeDatabasePrivate *db)
|
||||
initResources();
|
||||
}
|
||||
|
||||
QMimeXMLProvider::~QMimeXMLProvider()
|
||||
{
|
||||
}
|
||||
|
||||
bool QMimeXMLProvider::isValid()
|
||||
{
|
||||
return true;
|
||||
|
@ -138,6 +138,7 @@ class QMimeXMLProvider : public QMimeProviderBase
|
||||
{
|
||||
public:
|
||||
QMimeXMLProvider(QMimeDatabasePrivate *db);
|
||||
~QMimeXMLProvider();
|
||||
|
||||
virtual bool isValid() Q_DECL_OVERRIDE;
|
||||
virtual QMimeType mimeTypeForName(const QString &name) Q_DECL_OVERRIDE;
|
||||
|
@ -1644,9 +1644,11 @@ QString QTime::toString(Qt::DateFormat format) const
|
||||
\row \li z \li the milliseconds without leading zeroes (0 to 999)
|
||||
\row \li zzz \li the milliseconds with leading zeroes (000 to 999)
|
||||
\row \li AP or A
|
||||
\li use AM/PM display. \e A/AP will be replaced by either "AM" or "PM".
|
||||
\li use AM/PM display. \e A/AP will be replaced by either
|
||||
QLocale::amText() or QLocale::pmText().
|
||||
\row \li ap or a
|
||||
\li use am/pm display. \e a/ap will be replaced by either "am" or "pm".
|
||||
\li use am/pm display. \e a/ap will be replaced by a lower-case version of
|
||||
QLocale::amText() or QLocale::pmText().
|
||||
\row \li t \li the timezone (for example "CEST")
|
||||
\endtable
|
||||
|
||||
@ -1655,7 +1657,8 @@ QString QTime::toString(Qt::DateFormat format) const
|
||||
expression. Two consecutive single quotes ("''") are replaced by a singlequote
|
||||
in the output. Formats without separators (e.g. "HHmm") are currently not supported.
|
||||
|
||||
Example format strings (assuming that the QTime is 14:13:09.042)
|
||||
Example format strings (assuming that the QTime is 14:13:09.042 and the system
|
||||
locale is \c{en_US})
|
||||
|
||||
\table
|
||||
\header \li Format \li Result
|
||||
|
@ -41,6 +41,7 @@
|
||||
|
||||
#include <QtCore/qatomic.h>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QOpenGLContext>
|
||||
|
||||
#ifdef major
|
||||
#undef major
|
||||
@ -761,6 +762,13 @@ Q_GLOBAL_STATIC(QSurfaceFormat, qt_default_surface_format)
|
||||
*/
|
||||
void QSurfaceFormat::setDefaultFormat(const QSurfaceFormat &format)
|
||||
{
|
||||
#ifndef QT_NO_OPENGL
|
||||
QOpenGLContext *globalContext = QOpenGLContext::globalShareContext();
|
||||
if (globalContext && globalContext->isValid()) {
|
||||
qWarning("Warning: Setting a new default format with a different version or profile after "
|
||||
"the global shared context is created may cause issues with context sharing.");
|
||||
}
|
||||
#endif
|
||||
*qt_default_surface_format() = format;
|
||||
}
|
||||
|
||||
|
@ -1497,6 +1497,7 @@ bool QOpenGLFramebufferObject::bindDefault()
|
||||
if (ctx) {
|
||||
ctx->functions()->glBindFramebuffer(GL_FRAMEBUFFER, ctx->defaultFramebufferObject());
|
||||
QOpenGLContextPrivate::get(ctx)->qgl_current_fbo_invalid = true;
|
||||
QOpenGLContextPrivate::get(ctx)->qgl_current_fbo = Q_NULLPTR;
|
||||
}
|
||||
#ifdef QT_DEBUG
|
||||
else
|
||||
|
@ -48,6 +48,11 @@
|
||||
|
||||
#include "qnetworkconfigmanager_p.h"
|
||||
|
||||
// for QNetworkSession::interface
|
||||
#ifdef interface
|
||||
# undef interface
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_BEARERMANAGEMENT
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
@ -207,8 +207,8 @@ QIOSScreen::QIOSScreen(UIScreen *screen)
|
||||
else
|
||||
m_depth = 24;
|
||||
|
||||
if (deviceIdentifier.contains(QRegularExpression("^iPhone(7,1|8,2)$"))) {
|
||||
// iPhone 6 Plus or iPhone 6S Plus
|
||||
if (deviceIdentifier.contains(QRegularExpression("^iPhone(7,1|8,2|9,2|9,4)$"))) {
|
||||
// iPhone Plus models
|
||||
m_physicalDpi = 401;
|
||||
} else if (deviceIdentifier.contains(QRegularExpression("^iPad(1,1|2,[1-4]|3,[1-6]|4,[1-3]|5,[3-4]|6,[7-8])$"))) {
|
||||
// All iPads except the iPad Mini series
|
||||
|
@ -124,7 +124,7 @@
|
||||
\relates QTest
|
||||
|
||||
The QTRY_VERIFY_WITH_TIMEOUT() macro is similar to QVERIFY(), but checks the \a condition
|
||||
repeatedly, until either the condition becomes true or the \a timeout is
|
||||
repeatedly, until either the condition becomes true or the \a timeout (in milliseconds) is
|
||||
reached. Between each evaluation, events will be processed. If the timeout
|
||||
is reached, a failure is recorded in the test log and the test won't be
|
||||
executed further.
|
||||
@ -156,7 +156,7 @@
|
||||
|
||||
The QTRY_VERIFY2_WITH_TIMEOUT macro is similar to QTRY_VERIFY_WITH_TIMEOUT()
|
||||
except that it outputs a verbose \a message when \a condition is still false
|
||||
after the specified \a timeout. The \a message is a plain C string.
|
||||
after the specified \a timeout (in milliseconds). The \a message is a plain C string.
|
||||
|
||||
Example:
|
||||
\code
|
||||
@ -196,7 +196,7 @@
|
||||
|
||||
The QTRY_COMPARE_WITH_TIMEOUT() macro is similar to QCOMPARE(), but performs the comparison
|
||||
of the \a actual and \a expected values repeatedly, until either the two values
|
||||
are equal or the \a timeout is reached. Between each comparison, events
|
||||
are equal or the \a timeout (in milliseconds) is reached. Between each comparison, events
|
||||
will be processed. If the timeout is reached, a failure is recorded in the
|
||||
test log and the test won't be executed further.
|
||||
|
||||
|
@ -366,7 +366,7 @@ void QStyledItemDelegate::initStyleOption(QStyleOptionViewItem *option,
|
||||
if it is enabled or selected.
|
||||
|
||||
After painting, you should ensure that the painter is returned to
|
||||
its the state it was supplied in when this function was called.
|
||||
the state it was supplied in when this function was called.
|
||||
For example, it may be useful to call QPainter::save() before
|
||||
painting and QPainter::restore() afterwards.
|
||||
|
||||
|
@ -1684,6 +1684,9 @@ void QComboBox::setIconSize(const QSize &size)
|
||||
By default, this property is \c false. The effect of editing depends
|
||||
on the insert policy.
|
||||
|
||||
\note When disabling the \a editable state, the validator and
|
||||
completer are removed.
|
||||
|
||||
\sa InsertPolicy
|
||||
*/
|
||||
bool QComboBox::isEditable() const
|
||||
@ -1837,6 +1840,8 @@ QLineEdit *QComboBox::lineEdit() const
|
||||
\fn void QComboBox::setValidator(const QValidator *validator)
|
||||
|
||||
Sets the \a validator to use instead of the current validator.
|
||||
|
||||
\note The validator is removed when the editable property becomes \c false.
|
||||
*/
|
||||
|
||||
void QComboBox::setValidator(const QValidator *v)
|
||||
@ -1870,6 +1875,8 @@ const QValidator *QComboBox::validator() const
|
||||
|
||||
By default, for an editable combo box, a QCompleter that
|
||||
performs case insensitive inline completion is automatically created.
|
||||
|
||||
\note The completer is removed when the \a editable property becomes \c false.
|
||||
*/
|
||||
void QComboBox::setCompleter(QCompleter *c)
|
||||
{
|
||||
|
@ -109,6 +109,7 @@ private slots:
|
||||
void vaoCreate();
|
||||
void bufferCreate();
|
||||
void bufferMapRange();
|
||||
void defaultQGLCurrentBuffer();
|
||||
};
|
||||
|
||||
struct SharedResourceTracker
|
||||
@ -1520,6 +1521,33 @@ void tst_QOpenGL::bufferMapRange()
|
||||
ctx->doneCurrent();
|
||||
}
|
||||
|
||||
void tst_QOpenGL::defaultQGLCurrentBuffer()
|
||||
{
|
||||
QScopedPointer<QSurface> surface(createSurface(QSurface::Window));
|
||||
QScopedPointer<QOpenGLContext> ctx(new QOpenGLContext);
|
||||
ctx->create();
|
||||
ctx->makeCurrent(surface.data());
|
||||
|
||||
// Bind default FBO on the current context, and record what's the current QGL FBO. It should
|
||||
// be Q_NULLPTR because the default platform OpenGL FBO is not backed by a
|
||||
// QOpenGLFramebufferObject.
|
||||
QOpenGLFramebufferObject::bindDefault();
|
||||
QOpenGLFramebufferObject *defaultQFBO = QOpenGLContextPrivate::get(ctx.data())->qgl_current_fbo;
|
||||
|
||||
// Create new FBO, bind it, and see that the QGL FBO points to the newly created FBO.
|
||||
QScopedPointer<QOpenGLFramebufferObject> obj(new QOpenGLFramebufferObject(128, 128));
|
||||
obj->bind();
|
||||
QOpenGLFramebufferObject *customQFBO = QOpenGLContextPrivate::get(ctx.data())->qgl_current_fbo;
|
||||
QVERIFY(defaultQFBO != customQFBO);
|
||||
|
||||
// Bind the default FBO, and check that the QGL FBO points to the original FBO object.
|
||||
QOpenGLFramebufferObject::bindDefault();
|
||||
QOpenGLFramebufferObject *finalQFBO = QOpenGLContextPrivate::get(ctx.data())->qgl_current_fbo;
|
||||
QCOMPARE(defaultQFBO, finalQFBO);
|
||||
|
||||
ctx->doneCurrent();
|
||||
}
|
||||
|
||||
void tst_QOpenGL::nullTextureInitializtion()
|
||||
{
|
||||
QScopedPointer<QSurface> surface(createSurface(QSurface::Window));
|
||||
|
@ -154,12 +154,13 @@ QString Environment::msvcVersion()
|
||||
const QString command = QFile::decodeName(qgetenv("ComSpec"))
|
||||
+ QLatin1String(" /c ") + QLatin1String(compilerInfo(CC_MSVC2015)->executable)
|
||||
+ QLatin1String(" /? 2>&1");
|
||||
SetEnvironmentVariable(L"CL", NULL); // May contain /nologo, which suppresses the version.
|
||||
QString version = execute(command, &returnValue);
|
||||
if (returnValue != 0) {
|
||||
cout << "Could not get cl version" << returnValue << qPrintable(version) << '\n';;
|
||||
version.clear();
|
||||
} else {
|
||||
QRegExp versionRegexp(QStringLiteral("^.*Compiler Version ([0-9.]+) for.*$"));
|
||||
QRegExp versionRegexp(QStringLiteral("^.*\\b(\\d{2,2}\\.\\d{2,2}\\.\\d{5,5})\\b.*$"));
|
||||
Q_ASSERT(versionRegexp.isValid());
|
||||
if (versionRegexp.exactMatch(version)) {
|
||||
version = versionRegexp.cap(1);
|
||||
|
Loading…
Reference in New Issue
Block a user