Merge remote-tracking branch 'origin/stable' into 5.3
Change-Id: I2a044d44ca991ba20ddd710053b85afb51e362d3
This commit is contained in:
commit
87d15f2c1b
@ -61,14 +61,20 @@ const char msg[] = "==Qt=magic=Qt== Architecture:"
|
|||||||
"x86_64"
|
"x86_64"
|
||||||
#elif defined(Q_PROCESSOR_IA64)
|
#elif defined(Q_PROCESSOR_IA64)
|
||||||
"ia64"
|
"ia64"
|
||||||
|
#elif defined(Q_PROCESSOR_MIPS_64)
|
||||||
|
"mips64"
|
||||||
#elif defined(Q_PROCESSOR_MIPS)
|
#elif defined(Q_PROCESSOR_MIPS)
|
||||||
"mips"
|
"mips"
|
||||||
#elif defined(Q_PROCESSOR_POWER)
|
#elif defined(Q_PROCESSOR_POWER)
|
||||||
"power"
|
"power"
|
||||||
|
#elif defined(Q_PROCESSOR_S390_X)
|
||||||
|
"s390x"
|
||||||
#elif defined(Q_PROCESSOR_S390)
|
#elif defined(Q_PROCESSOR_S390)
|
||||||
"s390"
|
"s390"
|
||||||
#elif defined(Q_PROCESSOR_SH)
|
#elif defined(Q_PROCESSOR_SH)
|
||||||
"sh"
|
"sh"
|
||||||
|
#elif defined(Q_PROCESSORS_SPARC_64)
|
||||||
|
"sparc64"
|
||||||
#elif defined(Q_PROCESSOR_SPARC)
|
#elif defined(Q_PROCESSOR_SPARC)
|
||||||
"sparc"
|
"sparc"
|
||||||
#else
|
#else
|
||||||
|
@ -13,16 +13,11 @@
|
|||||||
*-g++*: QMAKE_CXXFLAGS += -Woverloaded-virtual -Wshadow -Wundef
|
*-g++*: QMAKE_CXXFLAGS += -Woverloaded-virtual -Wshadow -Wundef
|
||||||
|
|
||||||
# Other nice flags
|
# Other nice flags
|
||||||
*-g++*: QMAKE_CXXFLAGS += -Wnon-virtual-dtor -ansi -Wcast-align -Wchar-subscripts -Wpointer-arith -Wformat-security
|
*-g++*: QMAKE_CXXFLAGS += -Wnon-virtual-dtor -ansi -Wchar-subscripts -Wpointer-arith -Wformat-security
|
||||||
|
|
||||||
# Enable pedantic mode, but accept variadic macros and 'long long' usage.
|
# Enable pedantic mode, but accept variadic macros and 'long long' usage.
|
||||||
*-g++*: QMAKE_CXXFLAGS += -Wno-long-long -Wno-variadic-macros -pedantic-errors
|
*-g++*: QMAKE_CXXFLAGS += -Wno-long-long -Wno-variadic-macros -pedantic-errors
|
||||||
|
|
||||||
contains(QT_ARCH,arm)|contains(QT_ARCH,mips) {
|
|
||||||
# There are outstanding alignment issues in some container classes.
|
|
||||||
*-g++*:QMAKE_CXXFLAGS -= -Wcast-align
|
|
||||||
}
|
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += -DQT_NO_CAST_TO_ASCII \
|
QMAKE_CXXFLAGS += -DQT_NO_CAST_TO_ASCII \
|
||||||
-DQT_NO_CAST_FROM_ASCII \
|
-DQT_NO_CAST_FROM_ASCII \
|
||||||
-DQT_STRICT_ITERATORS \
|
-DQT_STRICT_ITERATORS \
|
||||||
|
@ -110,13 +110,19 @@ template <typename T> struct QAtomicOps : QBasicAtomicOps<sizeof(T)>
|
|||||||
template <int size> template <typename T> inline
|
template <int size> template <typename T> inline
|
||||||
void QBasicAtomicOps<size>::acquireMemoryFence(const T &) Q_DECL_NOTHROW
|
void QBasicAtomicOps<size>::acquireMemoryFence(const T &) Q_DECL_NOTHROW
|
||||||
{
|
{
|
||||||
asm volatile ("sync 0x11" ::: "memory");
|
asm volatile (".set push\n"
|
||||||
|
".set mips32\n"
|
||||||
|
"sync 0x11\n"
|
||||||
|
".set pop\n" ::: "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int size> template <typename T> inline
|
template <int size> template <typename T> inline
|
||||||
void QBasicAtomicOps<size>::releaseMemoryFence(const T &) Q_DECL_NOTHROW
|
void QBasicAtomicOps<size>::releaseMemoryFence(const T &) Q_DECL_NOTHROW
|
||||||
{
|
{
|
||||||
asm volatile ("sync 0x12" ::: "memory");
|
asm volatile (".set push\n"
|
||||||
|
".set mips32\n"
|
||||||
|
"sync 0x11\n"
|
||||||
|
".set pop\n" ::: "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int size> template <typename T> inline
|
template <int size> template <typename T> inline
|
||||||
|
@ -294,12 +294,15 @@
|
|||||||
SPARC is big-endian only prior to V9, while V9 is bi-endian with big-endian
|
SPARC is big-endian only prior to V9, while V9 is bi-endian with big-endian
|
||||||
as the default byte order. Assume all SPARC systems are big-endian.
|
as the default byte order. Assume all SPARC systems are big-endian.
|
||||||
*/
|
*/
|
||||||
// #elif defined(__sparc__)
|
#elif defined(__sparc__)
|
||||||
// # define Q_PROCESSOR_SPARC
|
# define Q_PROCESSOR_SPARC
|
||||||
// # if defined(__sparc_v9__)
|
# if defined(__sparc_v9__)
|
||||||
// # define Q_PROCESSOR_SPARC_V9
|
# define Q_PROCESSOR_SPARC_V9
|
||||||
// # endif
|
# endif
|
||||||
// # define Q_BYTE_ORDER Q_BIG_ENDIAN
|
# if defined(__sparc64__)
|
||||||
|
# define Q_PROCESSOR_SPARC_64
|
||||||
|
# endif
|
||||||
|
# define Q_BYTE_ORDER Q_BIG_ENDIAN
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -96,6 +96,10 @@
|
|||||||
#include <QtGui/QClipboard>
|
#include <QtGui/QClipboard>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef QT_NO_LIBRARY
|
||||||
|
#include <QtCore/QLibrary>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MAC)
|
||||||
# include "private/qcore_mac_p.h"
|
# include "private/qcore_mac_p.h"
|
||||||
#elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
|
#elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
|
||||||
@ -1187,6 +1191,7 @@ void QGuiApplicationPrivate::init()
|
|||||||
QCoreApplicationPrivate::is_app_running = false; // Starting up.
|
QCoreApplicationPrivate::is_app_running = false; // Starting up.
|
||||||
|
|
||||||
bool doGrabUnderDebugger = false;
|
bool doGrabUnderDebugger = false;
|
||||||
|
bool loadTestability = false;
|
||||||
QList<QByteArray> pluginList;
|
QList<QByteArray> pluginList;
|
||||||
// Get command line params
|
// Get command line params
|
||||||
#ifndef QT_NO_SESSIONMANAGER
|
#ifndef QT_NO_SESSIONMANAGER
|
||||||
@ -1237,6 +1242,8 @@ void QGuiApplicationPrivate::init()
|
|||||||
is_session_restored = true;
|
is_session_restored = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
} else if (arg == "-testability") {
|
||||||
|
loadTestability = true;
|
||||||
} else {
|
} else {
|
||||||
argv[j++] = argv[i];
|
argv[j++] = argv[i];
|
||||||
}
|
}
|
||||||
@ -1297,6 +1304,22 @@ void QGuiApplicationPrivate::init()
|
|||||||
session_manager = new QSessionManager(q, session_id, session_key);
|
session_manager = new QSessionManager(q, session_id, session_key);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef QT_NO_LIBRARY
|
||||||
|
if (loadTestability) {
|
||||||
|
QLibrary testLib(QStringLiteral("qttestability"));
|
||||||
|
if (testLib.load()) {
|
||||||
|
typedef void (*TasInitialize)(void);
|
||||||
|
TasInitialize initFunction = (TasInitialize)testLib.resolve("qt_testability_init");
|
||||||
|
if (initFunction) {
|
||||||
|
initFunction();
|
||||||
|
} else {
|
||||||
|
qCritical() << "Library qttestability resolve failed!";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
qCritical() << "Library qttestability load failed:" << testLib.errorString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // QT_NO_LIBRARY
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void qt_cleanupFontDatabase();
|
extern void qt_cleanupFontDatabase();
|
||||||
|
@ -545,7 +545,7 @@ xcb_cursor_t QXcbCursor::createFontCursor(int cshape)
|
|||||||
|
|
||||||
// Try Xcursor first
|
// Try Xcursor first
|
||||||
#ifdef XCB_USE_XLIB
|
#ifdef XCB_USE_XLIB
|
||||||
if (cshape >= 0 && cshape < Qt::LastCursor) {
|
if (cshape >= 0 && cshape <= Qt::LastCursor) {
|
||||||
void *dpy = connection()->xlib_display();
|
void *dpy = connection()->xlib_display();
|
||||||
// special case for non-standard dnd-* cursors
|
// special case for non-standard dnd-* cursors
|
||||||
cursor = loadCursor(dpy, cshape);
|
cursor = loadCursor(dpy, cshape);
|
||||||
|
@ -146,6 +146,15 @@ void QFileInfoGatherer::fetchExtendedInformation(const QString &path, const QStr
|
|||||||
this->path.push(path);
|
this->path.push(path);
|
||||||
this->files.push(files);
|
this->files.push(files);
|
||||||
condition.wakeAll();
|
condition.wakeAll();
|
||||||
|
|
||||||
|
#ifndef QT_NO_FILESYSTEMWATCHER
|
||||||
|
if (files.isEmpty()
|
||||||
|
&& !path.isEmpty()
|
||||||
|
&& !path.startsWith(QLatin1String("//")) /*don't watch UNC path*/) {
|
||||||
|
if (!watcher->directories().contains(path))
|
||||||
|
watcher->addPath(path);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -269,16 +278,6 @@ static QString translateDriveName(const QFileInfo &drive)
|
|||||||
*/
|
*/
|
||||||
void QFileInfoGatherer::getFileInfos(const QString &path, const QStringList &files)
|
void QFileInfoGatherer::getFileInfos(const QString &path, const QStringList &files)
|
||||||
{
|
{
|
||||||
#ifndef QT_NO_FILESYSTEMWATCHER
|
|
||||||
if (files.isEmpty()
|
|
||||||
&& !path.isEmpty()
|
|
||||||
&& !path.startsWith(QLatin1String("//")) /*don't watch UNC path*/) {
|
|
||||||
QMutexLocker locker(&mutex);
|
|
||||||
if (!watcher->directories().contains(path))
|
|
||||||
watcher->addPath(path);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// List drives
|
// List drives
|
||||||
if (path.isEmpty()) {
|
if (path.isEmpty()) {
|
||||||
#ifdef QT_BUILD_INTERNAL
|
#ifdef QT_BUILD_INTERNAL
|
||||||
|
@ -92,9 +92,6 @@
|
|||||||
#include "qgesture.h"
|
#include "qgesture.h"
|
||||||
#include "private/qgesturemanager_p.h"
|
#include "private/qgesturemanager_p.h"
|
||||||
#include <qpa/qplatformfontdatabase.h>
|
#include <qpa/qplatformfontdatabase.h>
|
||||||
#ifndef QT_NO_LIBRARY
|
|
||||||
#include "qlibrary.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "qdatetime.h"
|
#include "qdatetime.h"
|
||||||
|
|
||||||
@ -415,7 +412,6 @@ int qt_antialiasing_threshold = -1;
|
|||||||
QSize QApplicationPrivate::app_strut = QSize(0,0); // no default application strut
|
QSize QApplicationPrivate::app_strut = QSize(0,0); // no default application strut
|
||||||
int QApplicationPrivate::enabledAnimations = QPlatformTheme::GeneralUiEffect;
|
int QApplicationPrivate::enabledAnimations = QPlatformTheme::GeneralUiEffect;
|
||||||
bool QApplicationPrivate::widgetCount = false;
|
bool QApplicationPrivate::widgetCount = false;
|
||||||
bool QApplicationPrivate::load_testability = false;
|
|
||||||
#ifdef QT_KEYPAD_NAVIGATION
|
#ifdef QT_KEYPAD_NAVIGATION
|
||||||
Qt::NavigationMode QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadTabOrder;
|
Qt::NavigationMode QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadTabOrder;
|
||||||
QWidget *QApplicationPrivate::oldEditFocus = 0;
|
QWidget *QApplicationPrivate::oldEditFocus = 0;
|
||||||
@ -490,8 +486,6 @@ void QApplicationPrivate::process_cmdline()
|
|||||||
#endif
|
#endif
|
||||||
} else if (qstrcmp(arg, "-widgetcount") == 0) {
|
} else if (qstrcmp(arg, "-widgetcount") == 0) {
|
||||||
widgetCount = true;
|
widgetCount = true;
|
||||||
} else if (qstrcmp(arg, "-testability") == 0) {
|
|
||||||
load_testability = true;
|
|
||||||
} else {
|
} else {
|
||||||
argv[j++] = argv[i];
|
argv[j++] = argv[i];
|
||||||
}
|
}
|
||||||
@ -582,23 +576,6 @@ void QApplicationPrivate::construct()
|
|||||||
extern void qt_gui_eval_init(QCoreApplicationPrivate::Type);
|
extern void qt_gui_eval_init(QCoreApplicationPrivate::Type);
|
||||||
qt_gui_eval_init(application_type);
|
qt_gui_eval_init(application_type);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef QT_NO_LIBRARY
|
|
||||||
if(load_testability) {
|
|
||||||
QLibrary testLib(QLatin1String("qttestability"));
|
|
||||||
if (testLib.load()) {
|
|
||||||
typedef void (*TasInitialize)(void);
|
|
||||||
TasInitialize initFunction = (TasInitialize)testLib.resolve("qt_testability_init");
|
|
||||||
if (initFunction) {
|
|
||||||
initFunction();
|
|
||||||
} else {
|
|
||||||
qCritical("Library qttestability resolve failed!");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
qCritical("Library qttestability load failed!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_STATEMACHINE
|
#ifndef QT_NO_STATEMACHINE
|
||||||
|
@ -214,7 +214,6 @@ public:
|
|||||||
|
|
||||||
static int enabledAnimations; // Combination of QPlatformTheme::UiEffect
|
static int enabledAnimations; // Combination of QPlatformTheme::UiEffect
|
||||||
static bool widgetCount; // Coupled with -widgetcount switch
|
static bool widgetCount; // Coupled with -widgetcount switch
|
||||||
static bool load_testability; // Coupled with -testability switch
|
|
||||||
|
|
||||||
static void setSystemPalette(const QPalette &pal);
|
static void setSystemPalette(const QPalette &pal);
|
||||||
static void setPalette_helper(const QPalette &palette, const char* className, bool clearWidgetPaletteHash);
|
static void setPalette_helper(const QPalette &palette, const char* className, bool clearWidgetPaletteHash);
|
||||||
|
@ -273,7 +273,7 @@ void QTipLabel::hideTipImmediately()
|
|||||||
|
|
||||||
void QTipLabel::setTipRect(QWidget *w, const QRect &r)
|
void QTipLabel::setTipRect(QWidget *w, const QRect &r)
|
||||||
{
|
{
|
||||||
if (!rect.isNull() && !w)
|
if (!r.isNull() && !w)
|
||||||
qWarning("QToolTip::setTipRect: Cannot pass null widget if rect is set");
|
qWarning("QToolTip::setTipRect: Cannot pass null widget if rect is set");
|
||||||
else{
|
else{
|
||||||
widget = w;
|
widget = w;
|
||||||
|
@ -309,7 +309,7 @@ void QAbstractScrollAreaPrivate::init()
|
|||||||
q->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
|
q->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
|
||||||
q->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
q->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
layoutChildren();
|
layoutChildren();
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_OS_OSX
|
||||||
# ifndef QT_NO_GESTURES
|
# ifndef QT_NO_GESTURES
|
||||||
viewport->grabGesture(Qt::PanGesture);
|
viewport->grabGesture(Qt::PanGesture);
|
||||||
# endif
|
# endif
|
||||||
|
@ -444,7 +444,7 @@ void tst_QMdiSubWindow::mainWindowSupport()
|
|||||||
QVERIFY(!nestedWindow->maximizedButtonsWidget());
|
QVERIFY(!nestedWindow->maximizedButtonsWidget());
|
||||||
QVERIFY(!nestedWindow->maximizedSystemMenuIconWidget());
|
QVERIFY(!nestedWindow->maximizedSystemMenuIconWidget());
|
||||||
|
|
||||||
#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE)
|
#if !defined(Q_OS_MAC) && !defined(Q_OS_WINCE) && !defined(Q_OS_QNX)
|
||||||
QCOMPARE(mainWindow.windowTitle(), QString::fromLatin1("%1 - [%2]")
|
QCOMPARE(mainWindow.windowTitle(), QString::fromLatin1("%1 - [%2]")
|
||||||
.arg(originalWindowTitle, window->widget()->windowTitle()));
|
.arg(originalWindowTitle, window->widget()->windowTitle()));
|
||||||
#endif
|
#endif
|
||||||
@ -687,8 +687,8 @@ void tst_QMdiSubWindow::setOpaqueResizeAndMove_data()
|
|||||||
QTest::addColumn<QSize>("workspaceSize");
|
QTest::addColumn<QSize>("workspaceSize");
|
||||||
QTest::addColumn<QSize>("windowSize");
|
QTest::addColumn<QSize>("windowSize");
|
||||||
|
|
||||||
QTest::newRow("normal mode") << true<< 20 << 20 << QSize(400, 400) << QSize(200, 200);
|
QTest::newRow("normal mode") << true<< 20 << 20 << QSize(400, 400) << QSize(240, 200);
|
||||||
QTest::newRow("rubberband mode") << false << 20 << 1 << QSize(400, 400) << QSize(200, 200);
|
QTest::newRow("rubberband mode") << false << 20 << 1 << QSize(400, 400) << QSize(240, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_QMdiSubWindow::setOpaqueResizeAndMove()
|
void tst_QMdiSubWindow::setOpaqueResizeAndMove()
|
||||||
@ -779,7 +779,7 @@ void tst_QMdiSubWindow::setOpaqueResizeAndMove()
|
|||||||
// ### Remove this after mac style has been fixed
|
// ### Remove this after mac style has been fixed
|
||||||
height -= 4;
|
height -= 4;
|
||||||
#endif
|
#endif
|
||||||
QPoint mousePosition(window->width() / 2, height - 1);
|
QPoint mousePosition(window->width() / 3, height - 1);
|
||||||
sendMouseMove(window, mousePosition, Qt::NoButton);
|
sendMouseMove(window, mousePosition, Qt::NoButton);
|
||||||
sendMousePress(window, mousePosition);
|
sendMousePress(window, mousePosition);
|
||||||
|
|
||||||
@ -1478,6 +1478,9 @@ void tst_QMdiSubWindow::hideAndShow()
|
|||||||
|
|
||||||
#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
|
#if !defined (Q_OS_MAC) && !defined (Q_OS_WINCE)
|
||||||
QVERIFY(menuBar->cornerWidget(Qt::TopRightCorner));
|
QVERIFY(menuBar->cornerWidget(Qt::TopRightCorner));
|
||||||
|
#if defined Q_OS_QNX
|
||||||
|
QEXPECT_FAIL("", "QTBUG-38231", Abort);
|
||||||
|
#endif
|
||||||
QVERIFY(subWindow->maximizedButtonsWidget());
|
QVERIFY(subWindow->maximizedButtonsWidget());
|
||||||
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
|
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
|
||||||
QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget());
|
QCOMPARE(menuBar->cornerWidget(Qt::TopRightCorner), subWindow->maximizedButtonsWidget());
|
||||||
@ -1702,6 +1705,9 @@ void tst_QMdiSubWindow::replaceMenuBarWhileMaximized()
|
|||||||
|
|
||||||
qApp->processEvents();
|
qApp->processEvents();
|
||||||
|
|
||||||
|
#if defined Q_OS_QNX
|
||||||
|
QEXPECT_FAIL("", "QTBUG-38231", Abort);
|
||||||
|
#endif
|
||||||
QVERIFY(subWindow->maximizedButtonsWidget());
|
QVERIFY(subWindow->maximizedButtonsWidget());
|
||||||
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
|
QVERIFY(subWindow->maximizedSystemMenuIconWidget());
|
||||||
QCOMPARE(menuBar->cornerWidget(Qt::TopLeftCorner), subWindow->maximizedSystemMenuIconWidget());
|
QCOMPARE(menuBar->cornerWidget(Qt::TopLeftCorner), subWindow->maximizedSystemMenuIconWidget());
|
||||||
|
Loading…
Reference in New Issue
Block a user