Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6
This commit is contained in:
commit
e0d0e4a9a2
@ -922,6 +922,8 @@ bool VCCLCompilerTool::parseOption(const char* option)
|
||||
TreatWChar_tAsBuiltInType = ((*c) == '-' ? _False : _True);
|
||||
else if (config->CompilerVersion >= NET2013 && strncmp(option + 4, "strictStrings", 13) == 0)
|
||||
AdditionalOptions += option;
|
||||
else if (config->CompilerVersion >= NET2015 && strncmp(option + 4, "throwingNew", 11) == 0)
|
||||
AdditionalOptions += option;
|
||||
else
|
||||
found = false;
|
||||
} else {
|
||||
|
@ -250,12 +250,18 @@ public class QtActivityDelegate
|
||||
if (m_imm == null)
|
||||
return;
|
||||
|
||||
if (m_softInputMode == 0 && height > m_layout.getHeight() * 2 / 3)
|
||||
m_activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_UNCHANGED | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
else if (m_softInputMode == 0)
|
||||
m_activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_UNCHANGED | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
|
||||
else
|
||||
if (m_softInputMode != 0) {
|
||||
m_activity.getWindow().setSoftInputMode(m_softInputMode);
|
||||
// softInputIsHidden is true if SOFT_INPUT_STATE_HIDDEN or SOFT_INPUT_STATE_ALWAYS_HIDDEN is set.
|
||||
final boolean softInputIsHidden = (m_softInputMode & WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN) != 0;
|
||||
if (softInputIsHidden)
|
||||
return;
|
||||
} else {
|
||||
if (height > m_layout.getHeight() * 2 / 3)
|
||||
m_activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_UNCHANGED | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||
else
|
||||
m_activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_UNCHANGED | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
|
||||
}
|
||||
|
||||
int initialCapsMode = 0;
|
||||
|
||||
@ -344,8 +350,7 @@ public class QtActivityDelegate
|
||||
m_editText.setImeOptions(imeOptions);
|
||||
m_editText.setInputType(inputType);
|
||||
|
||||
m_layout.removeView(m_editText);
|
||||
m_layout.addView(m_editText, new QtLayout.LayoutParams(width, height, x, y));
|
||||
m_layout.setLayoutParams(m_editText, new QtLayout.LayoutParams(width, height, x, y), false);
|
||||
m_editText.requestFocus();
|
||||
m_editText.postDelayed(new Runnable() {
|
||||
@Override
|
||||
@ -1124,12 +1129,10 @@ public class QtActivityDelegate
|
||||
if (Build.VERSION.SDK_INT < 11 || w <= 0 || h <= 0) {
|
||||
m_activity.openContextMenu(m_layout);
|
||||
} else if (Build.VERSION.SDK_INT < 14) {
|
||||
m_layout.removeView(m_editText);
|
||||
m_layout.addView(m_editText, new QtLayout.LayoutParams(w, h, x, y));
|
||||
m_layout.setLayoutParams(m_editText, new QtLayout.LayoutParams(w, h, x, y), false);
|
||||
QtPopupMenu.getInstance().showMenu(m_editText);
|
||||
} else {
|
||||
m_layout.removeView(m_editText);
|
||||
m_layout.addView(m_editText, new QtLayout.LayoutParams(w, h, x, y));
|
||||
m_layout.setLayoutParams(m_editText, new QtLayout.LayoutParams(w, h, x, y), false);
|
||||
QtPopupMenu14.getInstance().showMenu(m_editText);
|
||||
}
|
||||
}
|
||||
|
@ -216,4 +216,34 @@ public class QtLayout extends ViewGroup
|
||||
invalidate();
|
||||
attachViewToParent(view, index, view.getLayoutParams());
|
||||
}
|
||||
|
||||
/**
|
||||
* set the layout params on a child view.
|
||||
*
|
||||
* Note: This function adds the child view if it's not in the
|
||||
* layout already.
|
||||
*/
|
||||
public void setLayoutParams(final View childView,
|
||||
final ViewGroup.LayoutParams params,
|
||||
final boolean forceRedraw)
|
||||
{
|
||||
// Invalid view
|
||||
if (childView == null)
|
||||
return;
|
||||
|
||||
// Invalid params
|
||||
if (!checkLayoutParams(params))
|
||||
return;
|
||||
|
||||
// View is already in the layout and can therefore be updated
|
||||
final boolean canUpdate = (this == childView.getParent());
|
||||
|
||||
if (canUpdate) {
|
||||
childView.setLayoutParams(params);
|
||||
if (forceRedraw)
|
||||
invalidate();
|
||||
} else {
|
||||
addView(childView, params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -304,3 +304,4 @@ void QCFSocketNotifier::enableSocketNotifiers(CFRunLoopObserverRef ref, CFRunLoo
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -39,7 +39,8 @@
|
||||
****************************************************************************/
|
||||
|
||||
//! [0]
|
||||
foreach (const QSslCertificate &cert, QSslCertificate::fromPath("C:/ssl/certificate.*.pem", QSsl::Pem,
|
||||
foreach (const QSslCertificate &cert, QSslCertificate::fromPath("C:/ssl/certificate.*.pem",
|
||||
QSsl::Pem,
|
||||
QRegExp::Wildcard)) {
|
||||
qDebug() << cert.issuerInfo(QSslCertificate::Organization);
|
||||
}
|
||||
|
@ -446,8 +446,8 @@ QByteArray QSslCertificate::digest(QCryptographicHash::Algorithm algorithm) cons
|
||||
|
||||
/*!
|
||||
Searches all files in the \a path for certificates encoded in the
|
||||
specified \a format and returns them in a list. \e must be a file or a
|
||||
pattern matching one or more files, as specified by \a syntax.
|
||||
specified \a format and returns them in a list. \a path must be a file
|
||||
or a pattern matching one or more files, as specified by \a syntax.
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -1311,8 +1311,8 @@ QList<QSslCipher> QSslSocket::supportedCiphers()
|
||||
/*!
|
||||
Searches all files in the \a path for certificates encoded in the
|
||||
specified \a format and adds them to this socket's CA certificate
|
||||
database. \a path can be explicit, or it can contain wildcards in
|
||||
the format specified by \a syntax. Returns \c true if one or more
|
||||
database. \a path must be a file or a pattern matching one or more
|
||||
files, as specified by \a syntax. Returns \c true if one or more
|
||||
certificates are added to the socket's CA certificate database;
|
||||
otherwise returns \c false.
|
||||
|
||||
|
@ -49,7 +49,6 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QAndroidPlatformWindow;
|
||||
class QAndroidPlatformBackingStore;
|
||||
|
||||
class QAndroidPlatformScreen: public QObject, public QPlatformScreen, public AndroidSurfaceClient
|
||||
{
|
||||
|
@ -335,7 +335,7 @@ void QLineEditIconButton::actionEvent(QActionEvent *e)
|
||||
switch (e->type()) {
|
||||
case QEvent::ActionChanged: {
|
||||
const QAction *action = e->action();
|
||||
if (isVisible() != action->isVisible()) {
|
||||
if (isVisibleTo(parentWidget()) != action->isVisible()) {
|
||||
setVisible(action->isVisible());
|
||||
if (QLineEdit *le = qobject_cast<QLineEdit *>(parentWidget()))
|
||||
static_cast<QLineEditPrivate *>(qt_widget_private(le))->positionSideWidgets();
|
||||
@ -439,13 +439,13 @@ void QLineEditPrivate::positionSideWidgets()
|
||||
QRect widgetGeometry(QPoint(QLineEditIconButton::IconMargin, (contentRect.height() - iconSize.height()) / 2), iconSize);
|
||||
foreach (const SideWidgetEntry &e, leftSideWidgetList()) {
|
||||
e.widget->setGeometry(widgetGeometry);
|
||||
if (e.widget->isVisible())
|
||||
if (e.action->isVisible())
|
||||
widgetGeometry.moveLeft(widgetGeometry.left() + delta);
|
||||
}
|
||||
widgetGeometry.moveLeft(contentRect.width() - iconSize.width() - QLineEditIconButton::IconMargin);
|
||||
foreach (const SideWidgetEntry &e, rightSideWidgetList()) {
|
||||
e.widget->setGeometry(widgetGeometry);
|
||||
if (e.widget->isVisible())
|
||||
if (e.action->isVisible())
|
||||
widgetGeometry.moveLeft(widgetGeometry.left() - delta);
|
||||
}
|
||||
}
|
||||
|
4
tests/auto/other/networkselftest/BLACKLIST
Normal file
4
tests/auto/other/networkselftest/BLACKLIST
Normal file
@ -0,0 +1,4 @@
|
||||
# QTBUG-27571
|
||||
[ftpProxyServer]
|
||||
windows 32bit
|
||||
windows 64bit
|
@ -4,5 +4,4 @@ TARGET = tst_networkselftest
|
||||
SOURCES += tst_networkselftest.cpp
|
||||
QT = core core-private network testlib
|
||||
|
||||
win32:CONFIG += insignificant_test # QTBUG-27571
|
||||
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
|
||||
|
@ -4319,10 +4319,10 @@ void tst_QLineEdit::clearButtonVisibleAfterSettingText_QTBUG_45518()
|
||||
#endif // QT_BUILD_INTERNAL
|
||||
}
|
||||
|
||||
static inline QIcon sideWidgetTestIcon()
|
||||
static inline QIcon sideWidgetTestIcon(Qt::GlobalColor color = Qt::yellow)
|
||||
{
|
||||
QImage image(QSize(20, 20), QImage::Format_ARGB32);
|
||||
image.fill(Qt::yellow);
|
||||
image.fill(color);
|
||||
return QIcon(QPixmap::fromImage(image));
|
||||
}
|
||||
|
||||
@ -4360,6 +4360,15 @@ void tst_QLineEdit::sideWidgets()
|
||||
lineEdit->addAction(iconAction);
|
||||
}
|
||||
|
||||
template <class T> T *findAssociatedWidget(const QAction *a)
|
||||
{
|
||||
foreach (QWidget *w, a->associatedWidgets()) {
|
||||
if (T *result = qobject_cast<T *>(w))
|
||||
return result;
|
||||
}
|
||||
return Q_NULLPTR;
|
||||
}
|
||||
|
||||
void tst_QLineEdit::sideWidgetsActionEvents()
|
||||
{
|
||||
// QTBUG-39660, verify whether action events are handled by the widget.
|
||||
@ -4368,28 +4377,43 @@ void tst_QLineEdit::sideWidgetsActionEvents()
|
||||
QLineEdit *lineEdit = new QLineEdit(&testWidget);
|
||||
l->addWidget(lineEdit);
|
||||
l->addSpacerItem(new QSpacerItem(0, 50, QSizePolicy::Ignored, QSizePolicy::Fixed));
|
||||
QAction *iconAction = lineEdit->addAction(sideWidgetTestIcon(), QLineEdit::LeadingPosition);
|
||||
QAction *iconAction1 = lineEdit->addAction(sideWidgetTestIcon(Qt::red), QLineEdit::LeadingPosition);
|
||||
QAction *iconAction2 = lineEdit->addAction(sideWidgetTestIcon(Qt::blue), QLineEdit::LeadingPosition);
|
||||
QAction *iconAction3 = lineEdit->addAction(sideWidgetTestIcon(Qt::yellow), QLineEdit::LeadingPosition);
|
||||
iconAction3->setVisible(false);
|
||||
|
||||
testWidget.move(300, 300);
|
||||
testWidget.show();
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&testWidget));
|
||||
|
||||
QWidget *toolButton = Q_NULLPTR;
|
||||
foreach (QWidget *w, iconAction->associatedWidgets()) {
|
||||
if (qobject_cast<QToolButton *>(w)) {
|
||||
toolButton = w;
|
||||
break;
|
||||
}
|
||||
}
|
||||
QVERIFY(toolButton);
|
||||
QWidget *toolButton1 = findAssociatedWidget<QToolButton>(iconAction1);
|
||||
QWidget *toolButton2 = findAssociatedWidget<QToolButton>(iconAction2);
|
||||
QWidget *toolButton3 = findAssociatedWidget<QToolButton>(iconAction3);
|
||||
|
||||
QVERIFY(toolButton->isVisible());
|
||||
QVERIFY(toolButton->isEnabled());
|
||||
QVERIFY(toolButton1);
|
||||
QVERIFY(toolButton2);
|
||||
QVERIFY(toolButton3);
|
||||
|
||||
iconAction->setEnabled(false);
|
||||
QVERIFY(!toolButton->isEnabled());
|
||||
QVERIFY(!toolButton3->isVisible()); // QTBUG-48899 , action hidden before show().
|
||||
|
||||
iconAction->setVisible(false);
|
||||
QVERIFY(!toolButton->isVisible());
|
||||
QVERIFY(toolButton1->isVisible());
|
||||
QVERIFY(toolButton1->isEnabled());
|
||||
|
||||
QVERIFY(toolButton2->isVisible());
|
||||
QVERIFY(toolButton2->isEnabled());
|
||||
|
||||
const int toolButton1X = toolButton1->x();
|
||||
const int toolButton2X = toolButton2->x();
|
||||
QVERIFY(toolButton1X < toolButton2X); // QTBUG-48806, positioned beside each other.
|
||||
|
||||
iconAction1->setEnabled(false);
|
||||
QVERIFY(!toolButton1->isEnabled());
|
||||
|
||||
iconAction1->setVisible(false);
|
||||
QVERIFY(!toolButton1->isVisible());
|
||||
|
||||
// QTBUG-39660, button 2 takes position of invisible button 1.
|
||||
QCOMPARE(toolButton2->x(), toolButton1X);
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(Qt::AlignmentFlag)
|
||||
|
Loading…
Reference in New Issue
Block a user