Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
This commit is contained in:
commit
d0c360fd88
30
configure
vendored
30
configure
vendored
@ -831,6 +831,7 @@ CFG_AVX=auto
|
||||
CFG_AVX2=auto
|
||||
CFG_REDUCE_RELOCATIONS=auto
|
||||
CFG_ACCESSIBILITY=auto
|
||||
CFG_ACCESSIBILITY_ATSPI_BRIDGE=no # will be enabled depending on dbus and accessibility being enabled
|
||||
CFG_IWMMXT=no
|
||||
CFG_NEON=auto
|
||||
CFG_MIPS_DSP=auto
|
||||
@ -3094,6 +3095,10 @@ Configure options:
|
||||
+ -largefile ......... Enables Qt to access files larger than 4 GB.
|
||||
|
||||
-no-accessibility .. Do not compile Accessibility support.
|
||||
Disabling accessibility is not recommended, as it will break QStyle
|
||||
and may break other internal parts of Qt.
|
||||
With this switch you create a source incompatible version of Qt,
|
||||
which is unsupported.
|
||||
+ -accessibility ..... Compile Accessibility support.
|
||||
|
||||
-no-sql-<driver> ... Disable SQL <driver> entirely.
|
||||
@ -4950,20 +4955,19 @@ if [ "$CFG_KMS" = "yes" ]; then
|
||||
fi
|
||||
|
||||
# Detect accessibility support
|
||||
if [ "$CFG_ACCESSIBILITY" != "no" ]; then
|
||||
if [ "$CFG_XCB" = "no" ]; then
|
||||
CFG_ACCESSIBILITY=yes
|
||||
else
|
||||
# linux/xcb accessibility needs dbus
|
||||
if [ "$CFG_DBUS" != "no" ] && [ -n "$PKG_CONFIG" ]; then
|
||||
CFG_ACCESSIBILITY=yes
|
||||
if [ "$CFG_ACCESSIBILITY" = "no" ]; then
|
||||
echo >&2 "Warning: Disabling Accessibility. This version of Qt is unsupported."
|
||||
else
|
||||
CFG_ACCESSIBILITY=yes
|
||||
|
||||
# linux/xcb accessibility bridge needs dbus
|
||||
if [ "$CFG_XCB" != "no" ]; then
|
||||
if [ "$CFG_DBUS" != "no" ]; then
|
||||
CFG_ACCESSIBILITY_ATSPI_BRIDGE=yes
|
||||
QT_CONFIG="$QT_CONFIG accessibility-atspi-bridge"
|
||||
else
|
||||
if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
|
||||
CFG_ACCESSIBILITY=no
|
||||
else
|
||||
echo "Accessibility support needs DBus."
|
||||
exit 101
|
||||
fi
|
||||
echo >&2 "Warning: Disabling Linux Accessibility Bridge: DBus is missing."
|
||||
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY_ATSPI_BRIDGE"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
7
dist/changes-5.0.1
vendored
7
dist/changes-5.0.1
vendored
@ -22,6 +22,13 @@ information about a particular change.
|
||||
General Improvements
|
||||
--------------------
|
||||
|
||||
- Documentation:
|
||||
- Moved documentation under the correct module, fixed module identifiers
|
||||
- Cleanup of examples and their documentation
|
||||
- [QTBUG-28579] Fixed broken links to C++ class reference and examples
|
||||
for a number of modules in Qt Creator Help contents
|
||||
- Fixed incorrect or missing links, typos
|
||||
|
||||
Third party components
|
||||
----------------------
|
||||
|
||||
|
@ -39,7 +39,7 @@ HTML.footer = \
|
||||
"</div>\n" \
|
||||
"<div class=\"footer\">\n" \
|
||||
" <p>\n" \
|
||||
" <acronym title=\"Copyright\">©</acronym> 2012 Digia Plc and/or its\n" \
|
||||
" <acronym title=\"Copyright\">©</acronym> 2013 Digia Plc and/or its\n" \
|
||||
" subsidiaries. Documentation contributions included herein are the copyrights of\n" \
|
||||
" their respective owners.</p>\n" \
|
||||
" <br />\n" \
|
||||
|
@ -54,7 +54,7 @@ HTML.footer = \
|
||||
"</div>\n" \
|
||||
"<div class=\"footer\">\n" \
|
||||
" <p>\n" \
|
||||
" <acronym title=\"Copyright\">©</acronym> 2012 Digia Plc and/or its\n" \
|
||||
" <acronym title=\"Copyright\">©</acronym> 2013 Digia Plc and/or its\n" \
|
||||
" subsidiaries. Documentation contributions included herein are the copyrights of\n" \
|
||||
" their respective owners.</p>\n" \
|
||||
" <br />\n" \
|
||||
|
@ -7,7 +7,7 @@ include(compat.qdocconf)
|
||||
dita.metadata.default.author = Qt Project
|
||||
dita.metadata.default.permissions = all
|
||||
dita.metadata.default.publisher = Qt Project
|
||||
dita.metadata.default.copyryear = 2012
|
||||
dita.metadata.default.copyryear = 2013
|
||||
dita.metadata.default.copyrholder = Digia Plc
|
||||
dita.metadata.default.audience = programmer
|
||||
|
||||
|
@ -7,7 +7,7 @@ include(compat.qdocconf)
|
||||
dita.metadata.default.author = Qt Project
|
||||
dita.metadata.default.permissions = all
|
||||
dita.metadata.default.publisher = Qt Project
|
||||
dita.metadata.default.copyryear = 2012
|
||||
dita.metadata.default.copyryear = 2013
|
||||
dita.metadata.default.copyrholder = Digia Plc
|
||||
dita.metadata.default.audience = programmer
|
||||
|
||||
|
@ -50,7 +50,7 @@ int main(int argc, char *argv[])
|
||||
QApplication app(argc, argv);
|
||||
app.setApplicationName("cube");
|
||||
app.setApplicationVersion("0.1");
|
||||
#ifdef QT_NO_OPENGL
|
||||
#ifndef QT_NO_OPENGL
|
||||
MainWidget widget;
|
||||
widget.show();
|
||||
#else
|
||||
|
@ -37,6 +37,6 @@ exampledirs += \
|
||||
snippets \
|
||||
../../../examples/threads/ \
|
||||
../../../examples/tools/ \
|
||||
../../../examples/widgets/widgets/analogclock
|
||||
../../../examples/widgets/
|
||||
|
||||
imagedirs += images
|
||||
|
@ -230,7 +230,7 @@
|
||||
\row
|
||||
\li {2,1}
|
||||
|
||||
\snippet gui/analogclock/main.cpp 1
|
||||
\snippet analogclock/main.cpp 1
|
||||
|
||||
We translate the coordinate system so that point (0, 0) is in the
|
||||
widget's center, instead of being at the top-left corner. We also
|
||||
@ -244,7 +244,7 @@
|
||||
|
||||
See also the \l {Window-Viewport Conversion} section.
|
||||
|
||||
\snippet gui/analogclock/main.cpp 2
|
||||
\snippet analogclock/main.cpp 2
|
||||
|
||||
We draw the clock's hour hand by rotating the coordinate system
|
||||
and calling QPainter::drawConvexPolygon(). Thank's to the
|
||||
@ -259,14 +259,14 @@
|
||||
the code guarantees that the code that follows won't be disturbed
|
||||
by the transformations we've used.
|
||||
|
||||
\snippet gui/analogclock/main.cpp 3
|
||||
\snippet analogclock/main.cpp 3
|
||||
|
||||
We do the same for the clock's minute hand, which is defined by
|
||||
the four points (1, 0), (0, 1), (-1, 0), and (0, -40). These
|
||||
coordinates specify a hand that is thinner and longer than the
|
||||
minute hand.
|
||||
|
||||
\snippet gui/analogclock/main.cpp 4
|
||||
\snippet analogclock/main.cpp 4
|
||||
|
||||
Finally, we draw the clock face, which consists of twelve short
|
||||
lines at 30-degree intervals. At the end of that, the painter is
|
||||
|
@ -181,6 +181,7 @@ bool QSslConfiguration::operator==(const QSslConfiguration &other) const
|
||||
d->protocol == other.d->protocol &&
|
||||
d->peerVerifyMode == other.d->peerVerifyMode &&
|
||||
d->peerVerifyDepth == other.d->peerVerifyDepth &&
|
||||
d->allowRootCertOnDemandLoading == other.d->allowRootCertOnDemandLoading &&
|
||||
d->sslOptions == other.d->sslOptions;
|
||||
}
|
||||
|
||||
@ -208,6 +209,7 @@ bool QSslConfiguration::isNull() const
|
||||
return (d->protocol == QSsl::SecureProtocols &&
|
||||
d->peerVerifyMode == QSslSocket::AutoVerifyPeer &&
|
||||
d->peerVerifyDepth == 0 &&
|
||||
d->allowRootCertOnDemandLoading == true &&
|
||||
d->caCertificates.count() == 0 &&
|
||||
d->ciphers.count() == 0 &&
|
||||
d->localCertificate.isNull() &&
|
||||
@ -519,6 +521,7 @@ QList<QSslCertificate> QSslConfiguration::caCertificates() const
|
||||
void QSslConfiguration::setCaCertificates(const QList<QSslCertificate> &certificates)
|
||||
{
|
||||
d->caCertificates = certificates;
|
||||
d->allowRootCertOnDemandLoading = false;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@ -83,6 +83,7 @@ public:
|
||||
: protocol(QSsl::SecureProtocols),
|
||||
peerVerifyMode(QSslSocket::AutoVerifyPeer),
|
||||
peerVerifyDepth(0),
|
||||
allowRootCertOnDemandLoading(true),
|
||||
sslOptions(QSslConfigurationPrivate::defaultSslOptions)
|
||||
{ }
|
||||
|
||||
@ -98,6 +99,7 @@ public:
|
||||
QSsl::SslProtocol protocol;
|
||||
QSslSocket::PeerVerifyMode peerVerifyMode;
|
||||
int peerVerifyDepth;
|
||||
bool allowRootCertOnDemandLoading;
|
||||
|
||||
QSsl::SslOptions sslOptions;
|
||||
|
||||
|
@ -903,7 +903,12 @@ void QSslSocket::setSslConfiguration(const QSslConfiguration &configuration)
|
||||
d->configuration.peerVerifyMode = configuration.peerVerifyMode();
|
||||
d->configuration.protocol = configuration.protocol();
|
||||
d->configuration.sslOptions = configuration.d->sslOptions;
|
||||
d->allowRootCertOnDemandLoading = false;
|
||||
|
||||
// if the CA certificates were set explicitly (either via
|
||||
// QSslConfiguration::setCaCertificates() or QSslSocket::setCaCertificates(),
|
||||
// we cannot load the certificates on demand
|
||||
if (!configuration.d->allowRootCertOnDemandLoading)
|
||||
d->allowRootCertOnDemandLoading = false;
|
||||
}
|
||||
|
||||
/*!
|
||||
@ -2378,6 +2383,14 @@ QByteArray QSslSocketPrivate::peek(qint64 maxSize)
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
bool QSslSocketPrivate::rootCertOnDemandLoadingSupported()
|
||||
{
|
||||
return s_loadRootCertsOnDemand;
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
|
@ -182,6 +182,8 @@ public:
|
||||
virtual QSslCipher sessionCipher() const = 0;
|
||||
virtual void continueHandshake() = 0;
|
||||
|
||||
Q_AUTOTEST_EXPORT static bool rootCertOnDemandLoadingSupported();
|
||||
|
||||
private:
|
||||
static bool ensureLibraryLoaded();
|
||||
static void ensureCiphersAndCertsLoaded();
|
||||
|
@ -1,4 +1,4 @@
|
||||
qtHaveModule(dbus):contains(QT_CONFIG, xcb):contains(QT_CONFIG, accessibility) {
|
||||
contains(QT_CONFIG, accessibility-atspi-bridge) {
|
||||
|
||||
QT += dbus
|
||||
include(../../3rdparty/atspi2/atspi2.pri)
|
||||
|
@ -490,6 +490,39 @@ static QTouchDevice *touchDevice = 0;
|
||||
[self handleMouseEvent:theEvent];
|
||||
}
|
||||
|
||||
- (void)updateTrackingAreas
|
||||
{
|
||||
[super updateTrackingAreas];
|
||||
|
||||
// [NSView addTrackingArea] is slow, so bail out early if we can:
|
||||
if (NSIsEmptyRect([self visibleRect]))
|
||||
return;
|
||||
|
||||
QCocoaAutoReleasePool pool;
|
||||
if (NSArray *trackingArray = [self trackingAreas]) {
|
||||
NSUInteger size = [trackingArray count];
|
||||
for (NSUInteger i = 0; i < size; ++i) {
|
||||
NSTrackingArea *t = [trackingArray objectAtIndex:i];
|
||||
[self removeTrackingArea:t];
|
||||
}
|
||||
}
|
||||
|
||||
// Ideally, we shouldn't have NSTrackingMouseMoved events included below, it should
|
||||
// only be turned on if mouseTracking, hover is on or a tool tip is set.
|
||||
// Unfortunately, Qt will send "tooltip" events on mouse moves, so we need to
|
||||
// turn it on in ALL case. That means EVERY QCocoaView gets to pay the cost of
|
||||
// mouse moves delivered to it (Apple recommends keeping it OFF because there
|
||||
// is a performance hit). So it goes.
|
||||
NSUInteger trackingOptions = NSTrackingMouseEnteredAndExited | NSTrackingActiveInActiveApp
|
||||
| NSTrackingInVisibleRect | NSTrackingMouseMoved;
|
||||
NSTrackingArea *ta = [[[NSTrackingArea alloc] initWithRect:[self frame]
|
||||
options:trackingOptions
|
||||
owner:self
|
||||
userInfo:nil]
|
||||
autorelease];
|
||||
[self addTrackingArea:ta];
|
||||
}
|
||||
|
||||
- (void)mouseMoved:(NSEvent *)theEvent
|
||||
{
|
||||
[self handleMouseEvent:theEvent];
|
||||
|
@ -769,6 +769,7 @@ public:
|
||||
inline void selectNameFilter(const QString &filter);
|
||||
inline void updateSelectedNameFilter() { selectNameFilter(m_data.selectedNameFilter()); }
|
||||
inline QString selectedNameFilter() const;
|
||||
void selectFile(const QString &fileName) const;
|
||||
bool hideFiltersDetails() const { return m_hideFiltersDetails; }
|
||||
void setHideFiltersDetails(bool h) { m_hideFiltersDetails = h; }
|
||||
void setDefaultSuffix(const QString &s);
|
||||
@ -1071,6 +1072,11 @@ void QWindowsNativeFileDialogBase::setLabelText(QFileDialogOptions::DialogLabel
|
||||
}
|
||||
}
|
||||
|
||||
void QWindowsNativeFileDialogBase::selectFile(const QString &fileName) const
|
||||
{
|
||||
m_fileDialog->SetFileName((wchar_t*)fileName.utf16());
|
||||
}
|
||||
|
||||
// Return the index of the selected filter, accounting for QFileDialog
|
||||
// sometimes stripping the filter specification depending on the
|
||||
// hideFilterDetails setting.
|
||||
@ -1362,6 +1368,12 @@ QWindowsNativeDialogBase *QWindowsFileDialogHelper::createNativeDialog()
|
||||
result->setLabelText(QFileDialogOptions::Accept, opts->labelText(QFileDialogOptions::Accept));
|
||||
result->updateDirectory();
|
||||
result->updateSelectedNameFilter();
|
||||
const QStringList initialSelection = opts->initiallySelectedFiles();
|
||||
if (initialSelection.size() > 0) {
|
||||
QFileInfo info(initialSelection.front());
|
||||
if (!info.isDir())
|
||||
result->selectFile(info.fileName());
|
||||
}
|
||||
const QString defaultSuffix = opts->defaultSuffix();
|
||||
if (!defaultSuffix.isEmpty())
|
||||
result->setDefaultSuffix(defaultSuffix);
|
||||
@ -1383,9 +1395,13 @@ QString QWindowsFileDialogHelper::directory() const
|
||||
return m_data.directory();
|
||||
}
|
||||
|
||||
void QWindowsFileDialogHelper::selectFile(const QString & /* filename */)
|
||||
void QWindowsFileDialogHelper::selectFile(const QString &fileName)
|
||||
{
|
||||
// Not implemented.
|
||||
if (QWindowsContext::verboseDialogs)
|
||||
qDebug("%s %s" , __FUNCTION__, qPrintable(fileName));
|
||||
|
||||
if (QWindowsNativeFileDialogBase *nfd = nativeFileDialog())
|
||||
nfd->selectFile(fileName);
|
||||
}
|
||||
|
||||
QStringList QWindowsFileDialogHelper::selectedFiles() const
|
||||
|
@ -771,6 +771,7 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
|
||||
HANDLE_PLATFORM_WINDOW_EVENT(xcb_unmap_notify_event_t, event, handleUnmapNotifyEvent);
|
||||
case XCB_CLIENT_MESSAGE:
|
||||
handleClientMessageEvent((xcb_client_message_event_t *)event);
|
||||
break;
|
||||
case XCB_ENTER_NOTIFY:
|
||||
HANDLE_PLATFORM_WINDOW_EVENT(xcb_enter_notify_event_t, event, handleEnterNotifyEvent);
|
||||
case XCB_LEAVE_NOTIFY:
|
||||
|
@ -84,8 +84,10 @@
|
||||
#include <QtGui/QScreen>
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#include <qpa/qplatformaccessibility.h>
|
||||
#ifndef QT_NO_ACCESSIBILITY_ATSPI_BRIDGE
|
||||
#include "../../../platformsupport/linuxaccessibility/bridge_p.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -112,7 +114,7 @@ QXcbIntegration::QXcbIntegration(const QStringList ¶meters)
|
||||
|
||||
m_fontDatabase.reset(new QGenericUnixFontDatabase());
|
||||
m_inputContext.reset(QPlatformInputContextFactory::create());
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#ifndef QT_NO_ACCESSIBILITY_ATSPI_BRIDGE
|
||||
m_accessibility.reset(new QSpiAccessibleBridge());
|
||||
#endif
|
||||
}
|
||||
|
@ -3272,12 +3272,14 @@ void QGraphicsItemPrivate::setFocusHelper(Qt::FocusReason focusReason, bool clim
|
||||
if (p->flags() & QGraphicsItem::ItemIsFocusScope) {
|
||||
QGraphicsItem *oldFocusScopeItem = p->d_ptr->focusScopeItem;
|
||||
p->d_ptr->focusScopeItem = q_ptr;
|
||||
if (oldFocusScopeItem)
|
||||
oldFocusScopeItem->d_ptr->focusScopeItemChange(false);
|
||||
focusScopeItemChange(true);
|
||||
if (!p->focusItem() && !focusFromHide) {
|
||||
if (oldFocusScopeItem)
|
||||
oldFocusScopeItem->d_ptr->focusScopeItemChange(false);
|
||||
focusScopeItemChange(true);
|
||||
// If you call setFocus on a child of a focus scope that
|
||||
// doesn't currently have a focus item, then stop.
|
||||
// Calling setFocus() on a child of a focus scope that does
|
||||
// not have focus changes only the focus scope pointer,
|
||||
// so that focus is restored the next time the scope gains
|
||||
// focus.
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
@ -1480,6 +1480,9 @@ bool QMainWindow::event(QEvent *event)
|
||||
\obsolete
|
||||
|
||||
This property is not implemented in Qt 5. Setting it has no effect.
|
||||
|
||||
A replacement API (QtMacUnifiedToolBar) is available in QtMacExtras at
|
||||
http://qt.gitorious.org/qtplayground/qtmacextras
|
||||
*/
|
||||
void QMainWindow::setUnifiedTitleAndToolBarOnMac(bool set)
|
||||
{
|
||||
|
@ -1653,6 +1653,10 @@ void tst_QLocale::ampm()
|
||||
QLocale tr("tr_TR");
|
||||
QCOMPARE(tr.amText(), QString::fromUtf8("\303\226\303\226"));
|
||||
QCOMPARE(tr.pmText(), QString::fromUtf8("\303\226\123"));
|
||||
|
||||
QLocale id("id_ID");
|
||||
QCOMPARE(id.amText(), QLatin1String("AM"));
|
||||
QCOMPARE(id.pmText(), QLatin1String("PM"));
|
||||
}
|
||||
|
||||
void tst_QLocale::dateFormat()
|
||||
@ -1681,6 +1685,14 @@ void tst_QLocale::timeFormat()
|
||||
QCOMPARE(no.timeFormat(QLocale::NarrowFormat), QLatin1String("HH:mm"));
|
||||
QCOMPARE(no.timeFormat(QLocale::ShortFormat), QLatin1String("HH:mm"));
|
||||
QCOMPARE(no.timeFormat(QLocale::LongFormat), QLatin1String("'kl'. HH:mm:ss t"));
|
||||
|
||||
const QLocale id("id_ID");
|
||||
QCOMPARE(id.timeFormat(QLocale::ShortFormat), QLatin1String("HH.mm"));
|
||||
QCOMPARE(id.timeFormat(QLocale::LongFormat), QLatin1String("HH.mm.ss t"));
|
||||
|
||||
const QLocale cat("ca_ES");
|
||||
QCOMPARE(cat.timeFormat(QLocale::ShortFormat), QLatin1String("H.mm"));
|
||||
QCOMPARE(cat.timeFormat(QLocale::LongFormat), QLatin1String("H.mm.ss t"));
|
||||
}
|
||||
|
||||
void tst_QLocale::dateTimeFormat()
|
||||
|
@ -46,7 +46,10 @@
|
||||
#include <QNetworkProxy>
|
||||
#include <QAuthenticator>
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
#include "private/qhostinfo_p.h"
|
||||
#include "private/qsslsocket_p.h"
|
||||
#endif
|
||||
|
||||
#include "../../../network-settings.h"
|
||||
|
||||
@ -211,12 +214,31 @@ void tst_QSslSocket_onDemandCertificates_member::onDemandRootCertLoadingMemberMe
|
||||
socket3->connectToHostEncrypted(host, 443);
|
||||
QVERIFY(!socket3->waitForEncrypted());
|
||||
|
||||
// setting empty SSL configuration explicitly -> should not work
|
||||
// setting empty SSL configuration explicitly -> depends on on-demand loading
|
||||
QSslSocketPtr socket4 = newSocket();
|
||||
this->socket = socket4.data();
|
||||
socket4->setSslConfiguration(QSslConfiguration());
|
||||
QSslConfiguration conf;
|
||||
socket4->setSslConfiguration(conf);
|
||||
socket4->connectToHostEncrypted(host, 443);
|
||||
QVERIFY(!socket4->waitForEncrypted());
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
bool rootCertLoadingAllowed = QSslSocketPrivate::rootCertOnDemandLoadingSupported();
|
||||
#if defined(Q_OS_LINUX) || defined (Q_OS_BLACKBERRY)
|
||||
QCOMPARE(rootCertLoadingAllowed, true);
|
||||
#elif defined(Q_OS_MAC)
|
||||
QCOMPARE(rootCertLoadingAllowed, false);
|
||||
#endif // other platforms: undecided (Windows: depends on the version)
|
||||
// when we allow on demand loading, it is enabled by default,
|
||||
// so on Unix it will work without setting any certificates. Otherwise,
|
||||
// the configuration contains an empty set of certificates
|
||||
// and will fail.
|
||||
bool works;
|
||||
#if defined (Q_OS_WIN)
|
||||
works = false; // on Windows, this won't work even though we use on demand loading
|
||||
#else
|
||||
works = rootCertLoadingAllowed;
|
||||
#endif
|
||||
QCOMPARE(socket4->waitForEncrypted(), works);
|
||||
#endif // QT_BUILD_INTERNAL
|
||||
}
|
||||
|
||||
#endif // QT_NO_OPENSSL
|
||||
|
@ -50,7 +50,7 @@ cross_compile: SUBDIRS -= \
|
||||
|
||||
wince*|!contains(QT_CONFIG, accessibility): SUBDIRS -= qaccessibility
|
||||
|
||||
!contains(QT_CONFIG, accessibility)|!contains(QT_CONFIG, xcb): SUBDIRS -= qaccessibilitylinux
|
||||
!contains(QT_CONFIG, accessibility-atspi-bridge): SUBDIRS -= qaccessibilitylinux
|
||||
|
||||
!mac: SUBDIRS -= \
|
||||
macgui \
|
||||
|
@ -429,6 +429,7 @@ private slots:
|
||||
void ensureDirtySceneTransform();
|
||||
void focusScope();
|
||||
void focusScope2();
|
||||
void focusScopeItemChangedWhileScopeDoesntHaveFocus();
|
||||
void stackBefore();
|
||||
void sceneModality();
|
||||
void panelModality();
|
||||
@ -9405,6 +9406,62 @@ void tst_QGraphicsItem::focusScope2()
|
||||
QCOMPARE(siblingFocusScope->focusItem(), (QGraphicsItem *)siblingChild2);
|
||||
}
|
||||
|
||||
class FocusScopeItemPrivate;
|
||||
class FocusScopeItem : public QGraphicsItem
|
||||
{
|
||||
Q_DECLARE_PRIVATE(FocusScopeItem)
|
||||
public:
|
||||
FocusScopeItem(QGraphicsItem *parent = 0);
|
||||
QRectF boundingRect() const { return QRectF(); }
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) { }
|
||||
|
||||
int focusScopeChanged;
|
||||
FocusScopeItemPrivate *d_ptr;
|
||||
};
|
||||
|
||||
class FocusScopeItemPrivate : QGraphicsItemPrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(FocusScopeItem)
|
||||
public:
|
||||
void focusScopeItemChange(bool)
|
||||
{ ++q_func()->focusScopeChanged; }
|
||||
};
|
||||
|
||||
FocusScopeItem::FocusScopeItem(QGraphicsItem *parent)
|
||||
: QGraphicsItem(*new FocusScopeItemPrivate, parent), focusScopeChanged(0)
|
||||
{
|
||||
setFlag(ItemIsFocusable);
|
||||
}
|
||||
|
||||
void tst_QGraphicsItem::focusScopeItemChangedWhileScopeDoesntHaveFocus()
|
||||
{
|
||||
QGraphicsRectItem rect;
|
||||
rect.setFlags(QGraphicsItem::ItemIsFocusScope | QGraphicsItem::ItemIsFocusable);
|
||||
|
||||
FocusScopeItem *child1 = new FocusScopeItem(&rect);
|
||||
FocusScopeItem *child2 = new FocusScopeItem(&rect);
|
||||
|
||||
QCOMPARE(rect.focusScopeItem(), (QGraphicsItem *)0);
|
||||
QCOMPARE(child1->focusScopeChanged, 0);
|
||||
QCOMPARE(child2->focusScopeChanged, 0);
|
||||
child1->setFocus();
|
||||
QCOMPARE(rect.focusScopeItem(), (QGraphicsItem *)child1);
|
||||
QCOMPARE(child1->focusScopeChanged, 1);
|
||||
QCOMPARE(child2->focusScopeChanged, 0);
|
||||
child2->setFocus();
|
||||
QCOMPARE(rect.focusScopeItem(), (QGraphicsItem *)child2);
|
||||
QCOMPARE(child1->focusScopeChanged, 2);
|
||||
QCOMPARE(child2->focusScopeChanged, 1);
|
||||
child1->setFocus();
|
||||
QCOMPARE(rect.focusScopeItem(), (QGraphicsItem *)child1);
|
||||
QCOMPARE(child1->focusScopeChanged, 3);
|
||||
QCOMPARE(child2->focusScopeChanged, 2);
|
||||
child1->clearFocus();
|
||||
QCOMPARE(rect.focusScopeItem(), (QGraphicsItem *)0);
|
||||
QCOMPARE(child1->focusScopeChanged, 4);
|
||||
QCOMPARE(child2->focusScopeChanged, 2);
|
||||
}
|
||||
|
||||
void tst_QGraphicsItem::stackBefore()
|
||||
{
|
||||
QGraphicsRectItem parent;
|
||||
|
@ -46,8 +46,13 @@
|
||||
#include <QtNetwork/qnetworkreply.h>
|
||||
#include <QtNetwork/qnetworkrequest.h>
|
||||
#include <QtNetwork/qnetworkaccessmanager.h>
|
||||
#include <QtNetwork/qsslconfiguration.h>
|
||||
#include "../../auto/network-settings.h"
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
#include "private/qsslsocket_p.h"
|
||||
#endif
|
||||
|
||||
#define BANDWIDTH_LIMIT_BYTES (1024*100)
|
||||
#define TIME_ESTIMATION_SECONDS (97)
|
||||
|
||||
@ -58,6 +63,8 @@ private slots:
|
||||
void initTestCase();
|
||||
void limiting_data();
|
||||
void limiting();
|
||||
void setSslConfiguration_data();
|
||||
void setSslConfiguration();
|
||||
};
|
||||
|
||||
QNetworkReply *reply;
|
||||
@ -129,6 +136,42 @@ void tst_qnetworkreply::limiting()
|
||||
QVERIFY(!QTestEventLoop::instance().timeout());
|
||||
}
|
||||
|
||||
void tst_qnetworkreply::setSslConfiguration_data()
|
||||
{
|
||||
QTest::addColumn<QUrl>("url");
|
||||
QTest::addColumn<bool>("works");
|
||||
|
||||
QTest::newRow("codereview.qt-project.org") << QUrl("https://codereview.qt-project.org") << true;
|
||||
QTest::newRow("test-server") << QUrl("https://" + QtNetworkSettings::serverName() + "/") << false;
|
||||
}
|
||||
|
||||
void tst_qnetworkreply::setSslConfiguration()
|
||||
{
|
||||
QFETCH(QUrl, url);
|
||||
QNetworkRequest request(url);
|
||||
QSslConfiguration conf = request.sslConfiguration();
|
||||
conf.setProtocol(QSsl::TlsV1_0); // TLS 1.0 will be used anyway, just make sure we change the configuration
|
||||
request.setSslConfiguration(conf);
|
||||
QNetworkAccessManager manager;
|
||||
reply = manager.get(request);
|
||||
QObject::connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
|
||||
QTestEventLoop::instance().enterLoop(15);
|
||||
QVERIFY(!QTestEventLoop::instance().timeout());
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
QFETCH(bool, works);
|
||||
bool rootCertLoadingAllowed = QSslSocketPrivate::rootCertOnDemandLoadingSupported();
|
||||
#if defined(Q_OS_LINUX) || defined (Q_OS_BLACKBERRY)
|
||||
QCOMPARE(rootCertLoadingAllowed, true);
|
||||
#elif defined(Q_OS_MAC)
|
||||
QCOMPARE(rootCertLoadingAllowed, false);
|
||||
#endif // other platforms: undecided (Windows: depends on the version)
|
||||
if (works) {
|
||||
QCOMPARE(reply->error(), QNetworkReply::NoError);
|
||||
} else {
|
||||
QCOMPARE(reply->error(), QNetworkReply::SslHandshakeFailedError);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
QTEST_MAIN(tst_qnetworkreply)
|
||||
|
||||
|
@ -2,7 +2,7 @@ TEMPLATE = app
|
||||
TARGET = tst_qnetworkreply
|
||||
|
||||
QT -= gui
|
||||
QT += network testlib
|
||||
QT += core-private network network-private testlib
|
||||
|
||||
SOURCES += main.cpp
|
||||
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
|
||||
|
@ -1650,8 +1650,12 @@ bool Configure::displayHelp()
|
||||
|
||||
desc("WIDGETS", "no", "-no-widgets", "Disable QtWidgets module.\n");
|
||||
|
||||
desc("ACCESSIBILITY", "no", "-no-accessibility", "Do not compile Windows Active Accessibility support.");
|
||||
desc("ACCESSIBILITY", "yes", "-accessibility", "Compile Windows Active Accessibility support.\n");
|
||||
desc("ACCESSIBILITY", "no", "-no-accessibility", "Disable accessibility support.\n");
|
||||
desc( "", "Disabling accessibility is not recommended, as it will break QStyle\n"
|
||||
"and may break other internal parts of Qt.\n"
|
||||
"With this switch you create a source incompatible version of Qt,\n"
|
||||
"which is unsupported.\n");
|
||||
desc("ACCESSIBILITY", "yes", "-accessibility", "Enable accessibility support.\n");
|
||||
|
||||
desc( "-no-sql-<driver>", "Disable SQL <driver> entirely, by default none are turned on.");
|
||||
desc( "-qt-sql-<driver>", "Enable a SQL <driver> in the Qt Library.");
|
||||
|
Loading…
Reference in New Issue
Block a user