Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"
This commit is contained in:
commit
6c3eb39832
@ -212,21 +212,17 @@ contains(CONFIG, plugin) {
|
|||||||
CMAKE_PLUGIN_TYPE_ESCAPED = $$replace(PLUGIN_TYPE, [-/], _)
|
CMAKE_PLUGIN_TYPE_ESCAPED = $$replace(PLUGIN_TYPE, [-/], _)
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
|
CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl
|
||||||
|
CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.prl
|
||||||
isEmpty(CMAKE_STATIC_TYPE) {
|
isEmpty(CMAKE_STATIC_TYPE) {
|
||||||
CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.dll
|
CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.dll
|
||||||
CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.dll
|
CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.dll
|
||||||
CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl
|
|
||||||
CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.prl
|
|
||||||
} else:mingw {
|
} else:mingw {
|
||||||
CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}.a
|
CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}.a
|
||||||
CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}d.a
|
CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}d.a
|
||||||
CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}.prl
|
|
||||||
CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/lib$${CMAKE_QT_STEM}d.prl
|
|
||||||
} else { # MSVC static
|
} else { # MSVC static
|
||||||
CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.lib
|
CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.lib
|
||||||
CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.lib
|
CMAKE_PLUGIN_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.lib
|
||||||
CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl
|
|
||||||
CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}d.prl
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mac {
|
mac {
|
||||||
@ -320,36 +316,25 @@ mac {
|
|||||||
CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.dll
|
CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.dll
|
||||||
CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll
|
CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll
|
||||||
|
|
||||||
|
!isEmpty(CMAKE_STATIC_TYPE) {
|
||||||
|
CMAKE_STATIC_WINDOWS_BUILD = "true"
|
||||||
|
|
||||||
|
CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.prl
|
||||||
|
CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl
|
||||||
|
}
|
||||||
|
|
||||||
mingw {
|
mingw {
|
||||||
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}d.a
|
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}d.a
|
||||||
CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqtmain$${QT_LIBINFIX}.a
|
CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqtmain$${QT_LIBINFIX}.a
|
||||||
|
|
||||||
!isEmpty(CMAKE_STATIC_TYPE) {
|
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a
|
||||||
CMAKE_STATIC_WINDOWS_BUILD = "true"
|
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
|
||||||
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a
|
|
||||||
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
|
|
||||||
|
|
||||||
CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.prl
|
|
||||||
CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
|
|
||||||
} else {
|
|
||||||
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.a
|
|
||||||
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}d.lib
|
CMAKE_WINMAIN_FILE_LOCATION_DEBUG = qtmain$${QT_LIBINFIX}d.lib
|
||||||
CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qtmain$${QT_LIBINFIX}.lib
|
CMAKE_WINMAIN_FILE_LOCATION_RELEASE = qtmain$${QT_LIBINFIX}.lib
|
||||||
|
|
||||||
!isEmpty(CMAKE_STATIC_TYPE) {
|
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.lib
|
||||||
CMAKE_STATIC_WINDOWS_BUILD = "true"
|
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
|
||||||
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.lib
|
|
||||||
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
|
|
||||||
|
|
||||||
CMAKE_PRL_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.prl
|
|
||||||
CMAKE_PRL_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.prl
|
|
||||||
} else {
|
|
||||||
CMAKE_IMPLIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.lib
|
|
||||||
CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
!isEmpty(CMAKE_STATIC_TYPE) {
|
!isEmpty(CMAKE_STATIC_TYPE) {
|
||||||
|
@ -64,11 +64,13 @@ debug {
|
|||||||
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_DEBUG
|
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_DEBUG
|
||||||
QMAKE_LFLAGS += $$QMAKE_LFLAGS_DEBUG
|
QMAKE_LFLAGS += $$QMAKE_LFLAGS_DEBUG
|
||||||
QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_DEBUG
|
QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_DEBUG
|
||||||
|
DEFINES += $$DEFINES_DEBUG
|
||||||
} else {
|
} else {
|
||||||
QMAKE_CFLAGS += $$QMAKE_CFLAGS_RELEASE
|
QMAKE_CFLAGS += $$QMAKE_CFLAGS_RELEASE
|
||||||
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_RELEASE
|
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_RELEASE
|
||||||
QMAKE_LFLAGS += $$QMAKE_LFLAGS_RELEASE
|
QMAKE_LFLAGS += $$QMAKE_LFLAGS_RELEASE
|
||||||
QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE
|
QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE
|
||||||
|
DEFINES += $$DEFINES_RELEASE
|
||||||
}
|
}
|
||||||
|
|
||||||
stack_protector_strong {
|
stack_protector_strong {
|
||||||
|
@ -26,10 +26,4 @@ CONFIG = \
|
|||||||
unset(today)
|
unset(today)
|
||||||
}
|
}
|
||||||
|
|
||||||
CONFIG(debug, debug|release) {
|
|
||||||
DEFINES += $$DEFINES_DEBUG
|
|
||||||
} else {
|
|
||||||
DEFINES += $$DEFINES_RELEASE
|
|
||||||
}
|
|
||||||
|
|
||||||
load(toolchain)
|
load(toolchain)
|
||||||
|
@ -36,6 +36,7 @@ EMCC_COMMON_LFLAGS += \
|
|||||||
-s USE_WEBGL2=1 \
|
-s USE_WEBGL2=1 \
|
||||||
-s NO_EXIT_RUNTIME=0 \
|
-s NO_EXIT_RUNTIME=0 \
|
||||||
-s ERROR_ON_UNDEFINED_SYMBOLS=1 \
|
-s ERROR_ON_UNDEFINED_SYMBOLS=1 \
|
||||||
|
-s EXTRA_EXPORTED_RUNTIME_METHODS=[\"UTF16ToString\",\"stringToUTF16\"] \
|
||||||
--bind
|
--bind
|
||||||
|
|
||||||
# The -s arguments can also be used with release builds,
|
# The -s arguments can also be used with release builds,
|
||||||
|
@ -1168,7 +1168,7 @@
|
|||||||
\section1 DEFINES_DEBUG
|
\section1 DEFINES_DEBUG
|
||||||
|
|
||||||
Specifies preprocessor defines for the debug configuration. The values of
|
Specifies preprocessor defines for the debug configuration. The values of
|
||||||
this variable get added to \l{DEFINES} before the project is loaded. This
|
this variable get added to \l{DEFINES} after the project is loaded. This
|
||||||
variable is typically set in \l{#QMAKESPEC}{qmake.conf} and rarely needs
|
variable is typically set in \l{#QMAKESPEC}{qmake.conf} and rarely needs
|
||||||
to be modified.
|
to be modified.
|
||||||
|
|
||||||
@ -1178,10 +1178,13 @@
|
|||||||
\section1 DEFINES_RELEASE
|
\section1 DEFINES_RELEASE
|
||||||
|
|
||||||
Specifies preprocessor defines for the release configuration. The values of
|
Specifies preprocessor defines for the release configuration. The values of
|
||||||
this variable get added to \l{DEFINES} before the project is loaded. This
|
this variable get added to \l{DEFINES} after the project is loaded. This
|
||||||
variable is typically set in \l{#QMAKESPEC}{qmake.conf} and rarely needs
|
variable is typically set in \l{#QMAKESPEC}{qmake.conf} and rarely needs
|
||||||
to be modified.
|
to be modified.
|
||||||
|
|
||||||
|
\note For MSVC mkspecs, this variable contains the value \c NDEBUG by
|
||||||
|
default.
|
||||||
|
|
||||||
This variable was introduced in Qt 5.13.2.
|
This variable was introduced in Qt 5.13.2.
|
||||||
|
|
||||||
\target DEF_FILE
|
\target DEF_FILE
|
||||||
|
@ -535,8 +535,25 @@ static QString getRelocatablePrefix()
|
|||||||
#if defined(QT_STATIC)
|
#if defined(QT_STATIC)
|
||||||
prefixPath = prefixFromAppDirHelper();
|
prefixPath = prefixFromAppDirHelper();
|
||||||
#elif defined(Q_OS_DARWIN) && QT_CONFIG(framework)
|
#elif defined(Q_OS_DARWIN) && QT_CONFIG(framework)
|
||||||
CFBundleRef qtCoreBundle = CFBundleGetBundleWithIdentifier(
|
auto qtCoreBundle = CFBundleGetBundleWithIdentifier(CFSTR("org.qt-project.QtCore"));
|
||||||
CFSTR("org.qt-project.QtCore"));
|
if (!qtCoreBundle) {
|
||||||
|
// When running Qt apps over Samba shares, CoreFoundation will fail to find
|
||||||
|
// the Resources directory inside the bundle, This directory is a symlink,
|
||||||
|
// and CF relies on readdir() and dtent.dt_type to detect symlinks, which
|
||||||
|
// does not work reliably for Samba shares. We work around it by manually
|
||||||
|
// looking for the QtCore bundle.
|
||||||
|
auto allBundles = CFBundleGetAllBundles();
|
||||||
|
auto bundleCount = CFArrayGetCount(allBundles);
|
||||||
|
for (int i = 0; i < bundleCount; ++i) {
|
||||||
|
auto bundle = CFBundleRef(CFArrayGetValueAtIndex(allBundles, i));
|
||||||
|
auto url = QCFType<CFURLRef>(CFBundleCopyBundleURL(bundle));
|
||||||
|
auto path = QCFType<CFStringRef>(CFURLCopyFileSystemPath(url, kCFURLPOSIXPathStyle));
|
||||||
|
if (CFStringHasSuffix(path, CFSTR("/QtCore.framework"))) {
|
||||||
|
qtCoreBundle = bundle;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Q_ASSERT(qtCoreBundle);
|
Q_ASSERT(qtCoreBundle);
|
||||||
|
|
||||||
QCFType<CFURLRef> qtCorePath = CFBundleCopyBundleURL(qtCoreBundle);
|
QCFType<CFURLRef> qtCorePath = CFBundleCopyBundleURL(qtCoreBundle);
|
||||||
|
@ -1023,7 +1023,7 @@
|
|||||||
|
|
||||||
\value WA_MacNoClickThrough This value is obsolete and has no effect.
|
\value WA_MacNoClickThrough This value is obsolete and has no effect.
|
||||||
|
|
||||||
\value WA_MacOpaqueSizeGrip Indicates that the native Carbon size grip
|
\value WA_MacOpaqueSizeGrip Indicates that the native size grip
|
||||||
should be opaque instead of transparent (the default). This attribute
|
should be opaque instead of transparent (the default). This attribute
|
||||||
is only applicable to \macos and is set by the widget's author.
|
is only applicable to \macos and is set by the widget's author.
|
||||||
|
|
||||||
|
@ -50,6 +50,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <qstack.h>
|
#include <qstack.h>
|
||||||
#include <qbuffer.h>
|
#include <qbuffer.h>
|
||||||
|
#include <qscopeguard.h>
|
||||||
#ifndef QT_BOOTSTRAPPED
|
#ifndef QT_BOOTSTRAPPED
|
||||||
#include <qcoreapplication.h>
|
#include <qcoreapplication.h>
|
||||||
#else
|
#else
|
||||||
@ -68,6 +69,8 @@ public: \
|
|||||||
{ return QString::fromLatin1(sourceText); } \
|
{ return QString::fromLatin1(sourceText); } \
|
||||||
private:
|
private:
|
||||||
#endif
|
#endif
|
||||||
|
#include <private/qmemory_p.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
#include "qxmlstream_p.h"
|
#include "qxmlstream_p.h"
|
||||||
@ -847,7 +850,7 @@ void QXmlStreamReaderPrivate::init()
|
|||||||
#endif
|
#endif
|
||||||
attributeStack.clear();
|
attributeStack.clear();
|
||||||
attributeStack.reserve(16);
|
attributeStack.reserve(16);
|
||||||
entityParser = nullptr;
|
entityParser.reset();
|
||||||
hasCheckedStartDocument = false;
|
hasCheckedStartDocument = false;
|
||||||
normalizeLiterals = false;
|
normalizeLiterals = false;
|
||||||
hasSeenTag = false;
|
hasSeenTag = false;
|
||||||
@ -880,7 +883,7 @@ void QXmlStreamReaderPrivate::parseEntity(const QString &value)
|
|||||||
|
|
||||||
|
|
||||||
if (!entityParser)
|
if (!entityParser)
|
||||||
entityParser = new QXmlStreamReaderPrivate(q);
|
entityParser = qt_make_unique<QXmlStreamReaderPrivate>(q);
|
||||||
else
|
else
|
||||||
entityParser->init();
|
entityParser->init();
|
||||||
entityParser->inParseEntity = true;
|
entityParser->inParseEntity = true;
|
||||||
@ -910,7 +913,6 @@ QXmlStreamReaderPrivate::~QXmlStreamReaderPrivate()
|
|||||||
#endif
|
#endif
|
||||||
free(sym_stack);
|
free(sym_stack);
|
||||||
free(state_stack);
|
free(state_stack);
|
||||||
delete entityParser;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1582,6 +1584,7 @@ QStringRef QXmlStreamReaderPrivate::namespaceForPrefix(const QStringRef &prefix)
|
|||||||
*/
|
*/
|
||||||
void QXmlStreamReaderPrivate::resolveTag()
|
void QXmlStreamReaderPrivate::resolveTag()
|
||||||
{
|
{
|
||||||
|
const auto attributeStackCleaner = qScopeGuard([this](){ attributeStack.clear(); });
|
||||||
int n = attributeStack.size();
|
int n = attributeStack.size();
|
||||||
|
|
||||||
if (namespaceProcessing) {
|
if (namespaceProcessing) {
|
||||||
@ -1649,7 +1652,10 @@ void QXmlStreamReaderPrivate::resolveTag()
|
|||||||
if (attributes[j].name() == attribute.name()
|
if (attributes[j].name() == attribute.name()
|
||||||
&& attributes[j].namespaceUri() == attribute.namespaceUri()
|
&& attributes[j].namespaceUri() == attribute.namespaceUri()
|
||||||
&& (namespaceProcessing || attributes[j].qualifiedName() == attribute.qualifiedName()))
|
&& (namespaceProcessing || attributes[j].qualifiedName() == attribute.qualifiedName()))
|
||||||
|
{
|
||||||
raiseWellFormedError(QXmlStream::tr("Attribute '%1' redefined.").arg(attribute.qualifiedName()));
|
raiseWellFormedError(QXmlStream::tr("Attribute '%1' redefined.").arg(attribute.qualifiedName()));
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1680,8 +1686,6 @@ void QXmlStreamReaderPrivate::resolveTag()
|
|||||||
attribute.m_isDefault = true;
|
attribute.m_isDefault = true;
|
||||||
attributes.append(attribute);
|
attributes.append(attribute);
|
||||||
}
|
}
|
||||||
|
|
||||||
attributeStack.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QXmlStreamReaderPrivate::resolvePublicNamespaces()
|
void QXmlStreamReaderPrivate::resolvePublicNamespaces()
|
||||||
|
@ -981,7 +981,7 @@ public:
|
|||||||
|
|
||||||
QString resolveUndeclaredEntity(const QString &name);
|
QString resolveUndeclaredEntity(const QString &name);
|
||||||
void parseEntity(const QString &value);
|
void parseEntity(const QString &value);
|
||||||
QXmlStreamReaderPrivate *entityParser;
|
std::unique_ptr<QXmlStreamReaderPrivate> entityParser;
|
||||||
|
|
||||||
bool scanAfterLangleBang();
|
bool scanAfterLangleBang();
|
||||||
bool scanPublicOrSystem();
|
bool scanPublicOrSystem();
|
||||||
|
@ -734,23 +734,23 @@ static void updateSystemPrivate()
|
|||||||
globalLocaleData.m_script_id = res.toInt();
|
globalLocaleData.m_script_id = res.toInt();
|
||||||
|
|
||||||
res = sys_locale->query(QSystemLocale::DecimalPoint, QVariant());
|
res = sys_locale->query(QSystemLocale::DecimalPoint, QVariant());
|
||||||
if (!res.isNull())
|
if (!res.isNull() && !res.toString().isEmpty())
|
||||||
globalLocaleData.m_decimal = res.toString().at(0).unicode();
|
globalLocaleData.m_decimal = res.toString().at(0).unicode();
|
||||||
|
|
||||||
res = sys_locale->query(QSystemLocale::GroupSeparator, QVariant());
|
res = sys_locale->query(QSystemLocale::GroupSeparator, QVariant());
|
||||||
if (!res.isNull())
|
if (!res.isNull() && !res.toString().isEmpty())
|
||||||
globalLocaleData.m_group = res.toString().at(0).unicode();
|
globalLocaleData.m_group = res.toString().at(0).unicode();
|
||||||
|
|
||||||
res = sys_locale->query(QSystemLocale::ZeroDigit, QVariant());
|
res = sys_locale->query(QSystemLocale::ZeroDigit, QVariant());
|
||||||
if (!res.isNull())
|
if (!res.isNull() && !res.toString().isEmpty())
|
||||||
globalLocaleData.m_zero = res.toString().at(0).unicode();
|
globalLocaleData.m_zero = res.toString().at(0).unicode();
|
||||||
|
|
||||||
res = sys_locale->query(QSystemLocale::NegativeSign, QVariant());
|
res = sys_locale->query(QSystemLocale::NegativeSign, QVariant());
|
||||||
if (!res.isNull())
|
if (!res.isNull() && !res.toString().isEmpty())
|
||||||
globalLocaleData.m_minus = res.toString().at(0).unicode();
|
globalLocaleData.m_minus = res.toString().at(0).unicode();
|
||||||
|
|
||||||
res = sys_locale->query(QSystemLocale::PositiveSign, QVariant());
|
res = sys_locale->query(QSystemLocale::PositiveSign, QVariant());
|
||||||
if (!res.isNull())
|
if (!res.isNull() && !res.toString().isEmpty())
|
||||||
globalLocaleData.m_plus = res.toString().at(0).unicode();
|
globalLocaleData.m_plus = res.toString().at(0).unicode();
|
||||||
}
|
}
|
||||||
#endif // !QT_NO_SYSTEMLOCALE
|
#endif // !QT_NO_SYSTEMLOCALE
|
||||||
@ -4463,6 +4463,8 @@ QStringList QLocale::uiLanguages() const
|
|||||||
for (const auto entry : qAsConst(uiLanguages))
|
for (const auto entry : qAsConst(uiLanguages))
|
||||||
locales.append(QLocale(entry));
|
locales.append(QLocale(entry));
|
||||||
}
|
}
|
||||||
|
if (locales.isEmpty())
|
||||||
|
locales.append(systemLocale()->fallbackUiLocale());
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
@ -48,7 +48,7 @@ SOURCES += \
|
|||||||
NO_PCH_SOURCES += text/qstring_compat.cpp
|
NO_PCH_SOURCES += text/qstring_compat.cpp
|
||||||
false: SOURCES += $$NO_PCH_SOURCES # Hack for QtCreator
|
false: SOURCES += $$NO_PCH_SOURCES # Hack for QtCreator
|
||||||
|
|
||||||
!nacl:macos: {
|
!nacl:darwin: {
|
||||||
SOURCES += text/qlocale_mac.mm
|
SOURCES += text/qlocale_mac.mm
|
||||||
}
|
}
|
||||||
else:unix {
|
else:unix {
|
||||||
|
@ -1269,6 +1269,55 @@
|
|||||||
\row \li \c word-spacing
|
\row \li \c word-spacing
|
||||||
\li <width>px
|
\li <width>px
|
||||||
\li Specifies an alternate spacing between each word.
|
\li Specifies an alternate spacing between each word.
|
||||||
|
\row \li \c line-height
|
||||||
|
\li <number>[% | px | pt | cm]
|
||||||
|
\li Specifies the height of a line. It can be one of the
|
||||||
|
following:
|
||||||
|
\list
|
||||||
|
\li fixed line height in pixels, points, or centimeters.
|
||||||
|
\li a percentage of the current font size.
|
||||||
|
\endlist
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
\section1 Qt-specific CSS properties
|
||||||
|
|
||||||
|
Besides the standard CSS properties listed earlier, the following
|
||||||
|
Qt-specific properties can also be used to style a text block:
|
||||||
|
|
||||||
|
\table
|
||||||
|
\header \li Property
|
||||||
|
\li Values
|
||||||
|
\li Description
|
||||||
|
\row
|
||||||
|
\li \c -qt-block-indent
|
||||||
|
\li \c <number>
|
||||||
|
\li Indents the text block by the specified no. spaces.
|
||||||
|
\row
|
||||||
|
\li \c -qt-list-indent
|
||||||
|
\li \c <number>
|
||||||
|
\li Indents the list items by the specified no. of spaces.
|
||||||
|
\row
|
||||||
|
\li \c -qt-list-number-prefix
|
||||||
|
\li \c <string>
|
||||||
|
\li Prefixes the given string to list number in an HTML ordered list.
|
||||||
|
\row
|
||||||
|
\li \c -qt-list-number-suffix
|
||||||
|
\li <string>
|
||||||
|
\li Suffixes the given string to list number in an HTML ordered list.
|
||||||
|
\row
|
||||||
|
\li \c -qt-paragraph-type
|
||||||
|
\li \c empty
|
||||||
|
\li Hides the text block.
|
||||||
|
\row
|
||||||
|
\li \c -qt-table-type
|
||||||
|
\li \c{root | frame}
|
||||||
|
\li \c root renders the text blocks inline without borders and
|
||||||
|
indentation, whereas \c frame renders them on a new line
|
||||||
|
with a frame around.
|
||||||
|
\row
|
||||||
|
\li \c -qt-user-state
|
||||||
|
\li \c <number>
|
||||||
|
\li Adds it as user data for the text block.
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
\section1 Supported CSS Selectors
|
\section1 Supported CSS Selectors
|
||||||
|
@ -916,6 +916,9 @@ bool QPNGImageWriter::writeImage(const QImage& image, int compression_in, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
png_set_error_fn(png_ptr, nullptr, nullptr, qt_png_warning);
|
png_set_error_fn(png_ptr, nullptr, nullptr, qt_png_warning);
|
||||||
|
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
|
||||||
|
png_set_benign_errors(png_ptr, 1);
|
||||||
|
#endif
|
||||||
|
|
||||||
info_ptr = png_create_info_struct(png_ptr);
|
info_ptr = png_create_info_struct(png_ptr);
|
||||||
if (!info_ptr) {
|
if (!info_ptr) {
|
||||||
|
@ -1150,8 +1150,8 @@ QKeyEvent::~QKeyEvent()
|
|||||||
Note: The native scan code may be 0, even if the key event contains
|
Note: The native scan code may be 0, even if the key event contains
|
||||||
extended information.
|
extended information.
|
||||||
|
|
||||||
Note: On Mac OS/X, this function is not useful, because there is no
|
Note: On \macos, this function is not useful, because there is no
|
||||||
way to get the scan code from Carbon or Cocoa. The function always
|
way to get the scan code from the system APIs. The function always
|
||||||
returns 1 (or 0 in the case explained above).
|
returns 1 (or 0 in the case explained above).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -900,7 +900,7 @@ Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void */*reserved*/)
|
|||||||
uenv.venv = nullptr;
|
uenv.venv = nullptr;
|
||||||
m_javaVM = nullptr;
|
m_javaVM = nullptr;
|
||||||
|
|
||||||
if (vm->GetEnv(&uenv.venv, JNI_VERSION_1_4) != JNI_OK) {
|
if (vm->GetEnv(&uenv.venv, JNI_VERSION_1_6) != JNI_OK) {
|
||||||
__android_log_print(ANDROID_LOG_FATAL, "Qt", "GetEnv failed");
|
__android_log_print(ANDROID_LOG_FATAL, "Qt", "GetEnv failed");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -922,5 +922,5 @@ Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void */*reserved*/)
|
|||||||
if (threadSetter.thread())
|
if (threadSetter.thread())
|
||||||
threadSetter.thread()->setObjectName("QtMainLoopThread");
|
threadSetter.thread()->setObjectName("QtMainLoopThread");
|
||||||
__android_log_print(ANDROID_LOG_INFO, "Qt", "qt started");
|
__android_log_print(ANDROID_LOG_INFO, "Qt", "qt started");
|
||||||
return JNI_VERSION_1_4;
|
return JNI_VERSION_1_6;
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include "qwasmclipboard.h"
|
#include "qwasmclipboard.h"
|
||||||
#include "qwasmwindow.h"
|
#include "qwasmwindow.h"
|
||||||
|
#include "qwasmstring.h"
|
||||||
|
|
||||||
#include <emscripten.h>
|
#include <emscripten.h>
|
||||||
#include <emscripten/html5.h>
|
#include <emscripten/html5.h>
|
||||||
@ -40,22 +41,22 @@
|
|||||||
using namespace emscripten;
|
using namespace emscripten;
|
||||||
|
|
||||||
// there has got to be a better way...
|
// there has got to be a better way...
|
||||||
static QByteArray g_clipboardArray;
|
static QString g_clipboardText;
|
||||||
static QByteArray g_clipboardFormat;
|
static QString g_clipboardFormat;
|
||||||
|
|
||||||
static val getClipboardData()
|
static val getClipboardData()
|
||||||
{
|
{
|
||||||
return val(g_clipboardArray.constData());
|
return QWasmString::fromQString(g_clipboardText);
|
||||||
}
|
}
|
||||||
|
|
||||||
static val getClipboardFormat()
|
static val getClipboardFormat()
|
||||||
{
|
{
|
||||||
return val(g_clipboardFormat.constData());
|
return QWasmString::fromQString(g_clipboardFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pasteClipboardData(emscripten::val format, emscripten::val dataPtr)
|
static void pasteClipboardData(emscripten::val format, emscripten::val dataPtr)
|
||||||
{
|
{
|
||||||
QString formatString = QString::fromStdString(format.as<std::string>());
|
QString formatString = QWasmString::toQString(format);
|
||||||
QByteArray dataArray = QByteArray::fromStdString(dataPtr.as<std::string>());
|
QByteArray dataArray = QByteArray::fromStdString(dataPtr.as<std::string>());
|
||||||
QMimeData *mMimeData = new QMimeData;
|
QMimeData *mMimeData = new QMimeData;
|
||||||
mMimeData->setData(formatString, dataArray);
|
mMimeData->setData(formatString, dataArray);
|
||||||
@ -102,11 +103,10 @@ static void qClipboardPasteTo(val event)
|
|||||||
bool hasClipboardApi = QWasmIntegration::get()->getWasmClipboard()->hasClipboardApi;
|
bool hasClipboardApi = QWasmIntegration::get()->getWasmClipboard()->hasClipboardApi;
|
||||||
val clipdata = hasClipboardApi ?
|
val clipdata = hasClipboardApi ?
|
||||||
val::global("Module").call<val>("qtGetClipboardData") :
|
val::global("Module").call<val>("qtGetClipboardData") :
|
||||||
event["clipboardData"].call<val>("getData", std::string("text"));
|
event["clipboardData"].call<val>("getData", val("text"));
|
||||||
|
|
||||||
const std::string data = clipdata.as<std::string>();
|
const QString qstr = QWasmString::toQString(clipdata);
|
||||||
if (data.length() > 0) {
|
if (qstr.length() > 0) {
|
||||||
QString qstr = QString::fromStdString(data);
|
|
||||||
QMimeData *mMimeData = new QMimeData;
|
QMimeData *mMimeData = new QMimeData;
|
||||||
mMimeData->setText(qstr);
|
mMimeData->setText(qstr);
|
||||||
QWasmClipboard::qWasmClipboardPaste(mMimeData);
|
QWasmClipboard::qWasmClipboardPaste(mMimeData);
|
||||||
@ -133,7 +133,7 @@ QWasmClipboard::QWasmClipboard()
|
|||||||
|
|
||||||
QWasmClipboard::~QWasmClipboard()
|
QWasmClipboard::~QWasmClipboard()
|
||||||
{
|
{
|
||||||
g_clipboardArray.clear();
|
g_clipboardText.clear();
|
||||||
g_clipboardFormat.clear();
|
g_clipboardFormat.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,11 +148,11 @@ QMimeData* QWasmClipboard::mimeData(QClipboard::Mode mode)
|
|||||||
void QWasmClipboard::setMimeData(QMimeData* mimeData, QClipboard::Mode mode)
|
void QWasmClipboard::setMimeData(QMimeData* mimeData, QClipboard::Mode mode)
|
||||||
{
|
{
|
||||||
if (mimeData->hasText()) {
|
if (mimeData->hasText()) {
|
||||||
g_clipboardFormat = mimeData->formats().at(0).toUtf8();
|
g_clipboardFormat = mimeData->formats().at(0);
|
||||||
g_clipboardArray = mimeData->text().toUtf8();
|
g_clipboardText = mimeData->text();
|
||||||
} else if (mimeData->hasHtml()) {
|
} else if (mimeData->hasHtml()) {
|
||||||
g_clipboardFormat =mimeData->formats().at(0).toUtf8();
|
g_clipboardFormat = mimeData->formats().at(0);
|
||||||
g_clipboardArray = mimeData->html().toUtf8();
|
g_clipboardText = mimeData->html();
|
||||||
}
|
}
|
||||||
|
|
||||||
QPlatformClipboard::setMimeData(mimeData, mode);
|
QPlatformClipboard::setMimeData(mimeData, mode);
|
||||||
@ -199,13 +199,13 @@ void QWasmClipboard::installEventHandlers(const QString &canvasId)
|
|||||||
|
|
||||||
// Fallback path for browsers which do not support direct clipboard access
|
// Fallback path for browsers which do not support direct clipboard access
|
||||||
val document = val::global("document");
|
val document = val::global("document");
|
||||||
val canvas = document.call<val>("getElementById", val(canvasId.toUtf8().constData()));
|
val canvas = document.call<val>("getElementById", QWasmString::fromQString(canvasId));
|
||||||
|
|
||||||
canvas.call<void>("addEventListener", std::string("cut"),
|
canvas.call<void>("addEventListener", val("cut"),
|
||||||
val::module_property("qtClipboardCutTo"));
|
val::module_property("qtClipboardCutTo"));
|
||||||
canvas.call<void>("addEventListener", std::string("copy"),
|
canvas.call<void>("addEventListener", val("copy"),
|
||||||
val::module_property("qtClipboardCopyTo"));
|
val::module_property("qtClipboardCopyTo"));
|
||||||
canvas.call<void>("addEventListener", std::string("paste"),
|
canvas.call<void>("addEventListener", val("paste"),
|
||||||
val::module_property("qtClipboardPasteTo"));
|
val::module_property("qtClipboardPasteTo"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,6 +226,6 @@ void QWasmClipboard::writeTextToClipboard()
|
|||||||
val txt = module.call<val>("qtGetClipboardData");
|
val txt = module.call<val>("qtGetClipboardData");
|
||||||
val format = module.call<val>("qtGetClipboardFormat");
|
val format = module.call<val>("qtGetClipboardFormat");
|
||||||
val navigator = val::global("navigator");
|
val navigator = val::global("navigator");
|
||||||
navigator["clipboard"].call<void>("writeText", txt.as<std::string>());
|
navigator["clipboard"].call<void>("writeText", txt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include "qwasmcursor.h"
|
#include "qwasmcursor.h"
|
||||||
#include "qwasmscreen.h"
|
#include "qwasmscreen.h"
|
||||||
|
#include "qwasmstring.h"
|
||||||
|
|
||||||
#include <QtCore/qdebug.h>
|
#include <QtCore/qdebug.h>
|
||||||
#include <QtGui/qwindow.h>
|
#include <QtGui/qwindow.h>
|
||||||
@ -56,11 +57,11 @@ void QWasmCursor::changeCursor(QCursor *windowCursor, QWindow *window)
|
|||||||
htmlCursorName = "auto";
|
htmlCursorName = "auto";
|
||||||
|
|
||||||
// Set cursor on the canvas
|
// Set cursor on the canvas
|
||||||
QByteArray canvasId = QWasmScreen::get(screen)->canvasId().toUtf8();
|
val jsCanvasId = QWasmString::fromQString(QWasmScreen::get(screen)->canvasId());
|
||||||
val document = val::global("document");
|
val document = val::global("document");
|
||||||
val canvas = document.call<val>("getElementById", val(canvasId.constData()));
|
val canvas = document.call<val>("getElementById", jsCanvasId);
|
||||||
val canvasStyle = canvas["style"];
|
val canvasStyle = canvas["style"];
|
||||||
canvasStyle.set("cursor", emscripten::val(htmlCursorName.constData()));
|
canvasStyle.set("cursor", val(htmlCursorName.constData()));
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray QWasmCursor::cursorShapeToHtml(Qt::CursorShape shape)
|
QByteArray QWasmCursor::cursorShapeToHtml(Qt::CursorShape shape)
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "qwasmcompositor.h"
|
#include "qwasmcompositor.h"
|
||||||
#include "qwasmintegration.h"
|
#include "qwasmintegration.h"
|
||||||
#include "qwasmclipboard.h"
|
#include "qwasmclipboard.h"
|
||||||
|
#include "qwasmstring.h"
|
||||||
|
|
||||||
#include <QtGui/qevent.h>
|
#include <QtGui/qevent.h>
|
||||||
#include <qpa/qwindowsysteminterface.h>
|
#include <qpa/qwindowsysteminterface.h>
|
||||||
@ -355,9 +356,10 @@ void QWasmEventTranslator::initEventHandlers()
|
|||||||
|
|
||||||
if (emscripten::val::global("window")["safari"].isUndefined()) {
|
if (emscripten::val::global("window")["safari"].isUndefined()) {
|
||||||
val document = val::global("document");
|
val document = val::global("document");
|
||||||
val canvas = document.call<val>("getElementById", val(canvasId));
|
val jsCanvasId = QWasmString::fromQString(screen()->canvasId());
|
||||||
|
val canvas = document.call<val>("getElementById", jsCanvasId);
|
||||||
canvas.call<void>("addEventListener",
|
canvas.call<void>("addEventListener",
|
||||||
std::string("wheel"),
|
val("wheel"),
|
||||||
val::module_property("qtMouseWheelEvent"));
|
val::module_property("qtMouseWheelEvent"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "qwasmclipboard.h"
|
#include "qwasmclipboard.h"
|
||||||
#include "qwasmservices.h"
|
#include "qwasmservices.h"
|
||||||
#include "qwasmoffscreensurface.h"
|
#include "qwasmoffscreensurface.h"
|
||||||
|
#include "qwasmstring.h"
|
||||||
|
|
||||||
#include "qwasmwindow.h"
|
#include "qwasmwindow.h"
|
||||||
#ifndef QT_NO_OPENGL
|
#ifndef QT_NO_OPENGL
|
||||||
@ -67,19 +68,19 @@ static void browserBeforeUnload(emscripten::val)
|
|||||||
|
|
||||||
static void addCanvasElement(emscripten::val canvas)
|
static void addCanvasElement(emscripten::val canvas)
|
||||||
{
|
{
|
||||||
QString canvasId = QString::fromStdString(canvas["id"].as<std::string>());
|
QString canvasId = QWasmString::toQString(canvas["id"]);
|
||||||
QWasmIntegration::get()->addScreen(canvasId);
|
QWasmIntegration::get()->addScreen(canvasId);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void removeCanvasElement(emscripten::val canvas)
|
static void removeCanvasElement(emscripten::val canvas)
|
||||||
{
|
{
|
||||||
QString canvasId = QString::fromStdString(canvas["id"].as<std::string>());
|
QString canvasId = QWasmString::toQString(canvas["id"]);
|
||||||
QWasmIntegration::get()->removeScreen(canvasId);
|
QWasmIntegration::get()->removeScreen(canvasId);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void resizeCanvasElement(emscripten::val canvas)
|
static void resizeCanvasElement(emscripten::val canvas)
|
||||||
{
|
{
|
||||||
QString canvasId = QString::fromStdString(canvas["id"].as<std::string>());
|
QString canvasId = QWasmString::toQString(canvas["id"]);
|
||||||
QWasmIntegration::get()->resizeScreen(canvasId);
|
QWasmIntegration::get()->resizeScreen(canvasId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,11 +116,11 @@ QWasmIntegration::QWasmIntegration()
|
|||||||
int screenCount = qtCanvaseElements["length"].as<int>();
|
int screenCount = qtCanvaseElements["length"].as<int>();
|
||||||
for (int i = 0; i < screenCount; ++i) {
|
for (int i = 0; i < screenCount; ++i) {
|
||||||
emscripten::val canvas = qtCanvaseElements[i].as<emscripten::val>();
|
emscripten::val canvas = qtCanvaseElements[i].as<emscripten::val>();
|
||||||
QString canvasId = QString::fromStdString(canvas["id"].as<std::string>());
|
QString canvasId = QWasmString::toQString(canvas["id"]);
|
||||||
addScreen(canvasId);
|
addScreen(canvasId);
|
||||||
}
|
}
|
||||||
} else if (!canvas.isUndefined()){
|
} else if (!canvas.isUndefined()){
|
||||||
QString canvasId = QString::fromStdString(canvas["id"].as<std::string>());
|
QString canvasId = QWasmString::toQString(canvas["id"]);
|
||||||
addScreen(canvasId);
|
addScreen(canvasId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,6 +32,8 @@
|
|||||||
#include "qwasmeventtranslator.h"
|
#include "qwasmeventtranslator.h"
|
||||||
#include "qwasmcompositor.h"
|
#include "qwasmcompositor.h"
|
||||||
#include "qwasmintegration.h"
|
#include "qwasmintegration.h"
|
||||||
|
#include "qwasmstring.h"
|
||||||
|
|
||||||
#include <emscripten/bind.h>
|
#include <emscripten/bind.h>
|
||||||
#include <emscripten/val.h>
|
#include <emscripten/val.h>
|
||||||
|
|
||||||
@ -186,7 +188,7 @@ void QWasmScreen::updateQScreenAndCanvasRenderSize()
|
|||||||
|
|
||||||
QSizeF canvasSize = cssSize * devicePixelRatio();
|
QSizeF canvasSize = cssSize * devicePixelRatio();
|
||||||
val document = val::global("document");
|
val document = val::global("document");
|
||||||
val canvas = document.call<val>("getElementById", val(canvasId.constData()));
|
val canvas = document.call<val>("getElementById", QWasmString::fromQString(m_canvasId));
|
||||||
|
|
||||||
canvas.set("width", canvasSize.width());
|
canvas.set("width", canvasSize.width());
|
||||||
canvas.set("height", canvasSize.height());
|
canvas.set("height", canvasSize.height());
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "qwasmservices.h"
|
#include "qwasmservices.h"
|
||||||
|
#include "qwasmstring.h"
|
||||||
|
|
||||||
#include <QtCore/QUrl>
|
#include <QtCore/QUrl>
|
||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
|
|
||||||
@ -37,8 +39,8 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
bool QWasmServices::openUrl(const QUrl &url)
|
bool QWasmServices::openUrl(const QUrl &url)
|
||||||
{
|
{
|
||||||
QByteArray utf8Url = url.toString().toUtf8();
|
emscripten::val jsUrl = QWasmString::fromQString(url.toString());
|
||||||
emscripten::val::global("window").call<void>("open", emscripten::val(utf8Url.constData()), emscripten::val("_blank"));
|
emscripten::val::global("window").call<void>("open", jsUrl, emscripten::val("_blank"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
61
src/plugins/platforms/wasm/qwasmstring.cpp
Normal file
61
src/plugins/platforms/wasm/qwasmstring.cpp
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
|
** Contact: https://www.qt.io/licensing/
|
||||||
|
**
|
||||||
|
** This file is part of the plugins of the Qt Toolkit.
|
||||||
|
**
|
||||||
|
** $QT_BEGIN_LICENSE:GPL$
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and The Qt Company. For licensing terms
|
||||||
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||||
|
** information use the contact form at https://www.qt.io/contact-us.
|
||||||
|
**
|
||||||
|
** GNU General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU
|
||||||
|
** General Public License version 3 or (at your option) any later version
|
||||||
|
** approved by the KDE Free Qt Foundation. The licenses are as published by
|
||||||
|
** the Free Software Foundation and appearing in the file LICENSE.GPL3
|
||||||
|
** included in the packaging of this file. Please review the following
|
||||||
|
** information to ensure the GNU General Public License requirements will
|
||||||
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||||
|
**
|
||||||
|
** $QT_END_LICENSE$
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include "qwasmstring.h"
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
using namespace emscripten;
|
||||||
|
|
||||||
|
val QWasmString::fromQString(const QString &str)
|
||||||
|
{
|
||||||
|
static const val UTF16ToString(
|
||||||
|
val::global("Module")["UTF16ToString"]);
|
||||||
|
|
||||||
|
auto ptr = quintptr(str.utf16());
|
||||||
|
return UTF16ToString(val(ptr));
|
||||||
|
}
|
||||||
|
|
||||||
|
QString QWasmString::toQString(const val &v)
|
||||||
|
{
|
||||||
|
QString result;
|
||||||
|
if (!v.isString())
|
||||||
|
return result;
|
||||||
|
|
||||||
|
static const val stringToUTF16(
|
||||||
|
val::global("Module")["stringToUTF16"]);
|
||||||
|
static const val length("length");
|
||||||
|
|
||||||
|
result.resize(v[length].as<int>());
|
||||||
|
auto ptr = quintptr(result.utf16());
|
||||||
|
stringToUTF16(v, val(ptr));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
45
src/plugins/platforms/wasm/qwasmstring.h
Normal file
45
src/plugins/platforms/wasm/qwasmstring.h
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
|
** Contact: https://www.qt.io/licensing/
|
||||||
|
**
|
||||||
|
** This file is part of the plugins of the Qt Toolkit.
|
||||||
|
**
|
||||||
|
** $QT_BEGIN_LICENSE:GPL$
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and The Qt Company. For licensing terms
|
||||||
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||||
|
** information use the contact form at https://www.qt.io/contact-us.
|
||||||
|
**
|
||||||
|
** GNU General Public License Usage
|
||||||
|
** Alternatively, this file may be used under the terms of the GNU
|
||||||
|
** General Public License version 3 or (at your option) any later version
|
||||||
|
** approved by the KDE Free Qt Foundation. The licenses are as published by
|
||||||
|
** the Free Software Foundation and appearing in the file LICENSE.GPL3
|
||||||
|
** included in the packaging of this file. Please review the following
|
||||||
|
** information to ensure the GNU General Public License requirements will
|
||||||
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||||
|
**
|
||||||
|
** $QT_END_LICENSE$
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <qstring.h>
|
||||||
|
|
||||||
|
#include <emscripten/val.h>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class QWasmString
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static emscripten::val fromQString(const QString &str);
|
||||||
|
static QString toQString(const emscripten::val &v);
|
||||||
|
};
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
@ -23,7 +23,8 @@ SOURCES = \
|
|||||||
qwasmtheme.cpp \
|
qwasmtheme.cpp \
|
||||||
qwasmclipboard.cpp \
|
qwasmclipboard.cpp \
|
||||||
qwasmservices.cpp \
|
qwasmservices.cpp \
|
||||||
qwasmoffscreensurface.cpp
|
qwasmoffscreensurface.cpp \
|
||||||
|
qwasmstring.cpp
|
||||||
|
|
||||||
HEADERS = \
|
HEADERS = \
|
||||||
qwasmintegration.h \
|
qwasmintegration.h \
|
||||||
@ -39,7 +40,8 @@ HEADERS = \
|
|||||||
qwasmtheme.h \
|
qwasmtheme.h \
|
||||||
qwasmclipboard.h \
|
qwasmclipboard.h \
|
||||||
qwasmservices.h \
|
qwasmservices.h \
|
||||||
qwasmoffscreensurface.h
|
qwasmoffscreensurface.h \
|
||||||
|
qwasmstring.h
|
||||||
|
|
||||||
wasmfonts.files = \
|
wasmfonts.files = \
|
||||||
../../../3rdparty/wasm/Vera.ttf \
|
../../../3rdparty/wasm/Vera.ttf \
|
||||||
|
@ -249,16 +249,15 @@ void QSqlQueryModel_snippets()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//! [21]
|
//! [21]
|
||||||
QSqlTableModel model;
|
QSqlQueryModel model;
|
||||||
model.setTable("employee");
|
model.setQuery("SELECT name, salary FROM employee");
|
||||||
model.select();
|
|
||||||
int salary = model.record(4).value("salary").toInt();
|
int salary = model.record(4).value("salary").toInt();
|
||||||
//! [21]
|
//! [21]
|
||||||
Q_UNUSED(salary);
|
Q_UNUSED(salary);
|
||||||
|
|
||||||
{
|
{
|
||||||
//! [22]
|
//! [22]
|
||||||
int salary = model.data(model.index(4, 2)).toInt();
|
int salary = model.data(model.index(4, 1)).toInt();
|
||||||
//! [22]
|
//! [22]
|
||||||
Q_UNUSED(salary);
|
Q_UNUSED(salary);
|
||||||
}
|
}
|
||||||
@ -308,7 +307,8 @@ void QSqlTableModel_snippets()
|
|||||||
//! [25]
|
//! [25]
|
||||||
QSqlTableModel model;
|
QSqlTableModel model;
|
||||||
model.setTable("employee");
|
model.setTable("employee");
|
||||||
QString name = model.record(4).value("name").toString();
|
model.select();
|
||||||
|
int salary = model.record(4).value("salary").toInt();
|
||||||
//! [25]
|
//! [25]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,8 +124,8 @@ int QSqlQueryModelPrivate::columnInQuery(int modelColumn) const
|
|||||||
\snippet sqldatabase/sqldatabase.cpp 21
|
\snippet sqldatabase/sqldatabase.cpp 21
|
||||||
|
|
||||||
The code snippet above extracts the \c salary field from record 4 in
|
The code snippet above extracts the \c salary field from record 4 in
|
||||||
the result set of the query \c{SELECT * from employee}. Assuming
|
the result set of the \c SELECT query. Since \c salary is the 2nd
|
||||||
that \c salary is column 2, we can rewrite the last line as follows:
|
column (or column index 1), we can rewrite the last line as follows:
|
||||||
|
|
||||||
\snippet sqldatabase/sqldatabase.cpp 22
|
\snippet sqldatabase/sqldatabase.cpp 22
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ bool QSqlTableModelPrivate::exec(const QString &stmt, bool prepStatement,
|
|||||||
QSqlTableModel can also be used to access a database
|
QSqlTableModel can also be used to access a database
|
||||||
programmatically, without binding it to a view:
|
programmatically, without binding it to a view:
|
||||||
|
|
||||||
\snippet sqldatabase/sqldatabase.cpp 21
|
\snippet sqldatabase/sqldatabase.cpp 25
|
||||||
|
|
||||||
The code snippet above extracts the \c salary field from record 4 in
|
The code snippet above extracts the \c salary field from record 4 in
|
||||||
the result set of the query \c{SELECT * from employee}.
|
the result set of the query \c{SELECT * from employee}.
|
||||||
|
@ -2543,6 +2543,18 @@
|
|||||||
|
|
||||||
See also \l{#height-prop}{height}.
|
See also \l{#height-prop}{height}.
|
||||||
|
|
||||||
|
\row
|
||||||
|
\li \b -qt-background-role
|
||||||
|
\li \l{#paletterole}{PaletteRole}
|
||||||
|
\li The \c{background-color} for the subcontrol or widget based on the
|
||||||
|
chosen role.
|
||||||
|
|
||||||
|
\row
|
||||||
|
\li \b -qt-style-features
|
||||||
|
\li \c list
|
||||||
|
\li The list of CSS properties that you want to apply Qt-specific styles on.
|
||||||
|
|
||||||
|
\note The \c list can only include properties that are not pixmap-based.
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
\target list of icons
|
\target list of icons
|
||||||
|
@ -2124,7 +2124,8 @@ QWidget *QApplicationPrivate::focusNextPrevChild_helper(QWidget *toplevel, bool
|
|||||||
&& !(!next && focusProxy && test->isAncestorOf(focusProxy))
|
&& !(!next && focusProxy && test->isAncestorOf(focusProxy))
|
||||||
&& test->isVisibleTo(toplevel) && test->isEnabled()
|
&& test->isVisibleTo(toplevel) && test->isEnabled()
|
||||||
&& !(w->windowType() == Qt::SubWindow && !w->isAncestorOf(test))
|
&& !(w->windowType() == Qt::SubWindow && !w->isAncestorOf(test))
|
||||||
&& (toplevel->windowType() != Qt::SubWindow || toplevel->isAncestorOf(test))) {
|
&& (toplevel->windowType() != Qt::SubWindow || toplevel->isAncestorOf(test))
|
||||||
|
&& f != focusProxy) {
|
||||||
w = test;
|
w = test;
|
||||||
if (seenWindow)
|
if (seenWindow)
|
||||||
focusWidgetAfterWindow = true;
|
focusWidgetAfterWindow = true;
|
||||||
|
@ -490,14 +490,14 @@ void QScrollArea::ensureWidgetVisible(QWidget *childWidget, int xmargin, int yma
|
|||||||
if (focusRect.width() > visibleRect.width())
|
if (focusRect.width() > visibleRect.width())
|
||||||
d->hbar->setValue(focusRect.center().x() - d->viewport->width() / 2);
|
d->hbar->setValue(focusRect.center().x() - d->viewport->width() / 2);
|
||||||
else if (focusRect.right() > visibleRect.right())
|
else if (focusRect.right() > visibleRect.right())
|
||||||
d->hbar->setValue(focusRect.right() - d->viewport->width());
|
d->hbar->setValue(focusRect.right() - d->viewport->width() + 1);
|
||||||
else if (focusRect.left() < visibleRect.left())
|
else if (focusRect.left() < visibleRect.left())
|
||||||
d->hbar->setValue(focusRect.left());
|
d->hbar->setValue(focusRect.left());
|
||||||
|
|
||||||
if (focusRect.height() > visibleRect.height())
|
if (focusRect.height() > visibleRect.height())
|
||||||
d->vbar->setValue(focusRect.center().y() - d->viewport->height() / 2);
|
d->vbar->setValue(focusRect.center().y() - d->viewport->height() / 2);
|
||||||
else if (focusRect.bottom() > visibleRect.bottom())
|
else if (focusRect.bottom() > visibleRect.bottom())
|
||||||
d->vbar->setValue(focusRect.bottom() - d->viewport->height());
|
d->vbar->setValue(focusRect.bottom() - d->viewport->height() + 1);
|
||||||
else if (focusRect.top() < visibleRect.top())
|
else if (focusRect.top() < visibleRect.top())
|
||||||
d->vbar->setValue(focusRect.top());
|
d->vbar->setValue(focusRect.top());
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 The Qt Company Ltd.
|
** Copyright (C) 2020 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the QtWidgets module of the Qt Toolkit.
|
** This file is part of the QtWidgets module of the Qt Toolkit.
|
||||||
@ -1168,11 +1168,11 @@ QVariant QSpinBoxPrivate::validateAndInterpret(QString &input, int &pos,
|
|||||||
} else {
|
} else {
|
||||||
num = locale.toInt(copy, &ok);
|
num = locale.toInt(copy, &ok);
|
||||||
if (!ok && (max >= 1000 || min <= -1000)) {
|
if (!ok && (max >= 1000 || min <= -1000)) {
|
||||||
const QChar sep = locale.groupSeparator();
|
const QString sep(locale.groupSeparator());
|
||||||
const QChar doubleSep[2] = {sep, sep};
|
const QString doubleSep = sep + sep;
|
||||||
if (copy.contains(sep) && !copy.contains(QString(doubleSep, 2))) {
|
if (copy.contains(sep) && !copy.contains(doubleSep)) {
|
||||||
QString copy2 = copy;
|
QString copy2 = copy;
|
||||||
copy2.remove(locale.groupSeparator());
|
copy2.remove(sep);
|
||||||
num = locale.toInt(copy2, &ok);
|
num = locale.toInt(copy2, &ok);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1314,6 +1314,10 @@ QVariant QDoubleSpinBoxPrivate::validateAndInterpret(QString &input, int &pos,
|
|||||||
const bool plus = max >= 0;
|
const bool plus = max >= 0;
|
||||||
const bool minus = min <= 0;
|
const bool minus = min <= 0;
|
||||||
|
|
||||||
|
const QString group(locale.groupSeparator());
|
||||||
|
const uint groupUcs = (group.size() > 1 && group.at(0).isHighSurrogate()
|
||||||
|
? QChar::surrogateToUcs4(group.at(0), group.at(1))
|
||||||
|
: group.at(0).unicode());
|
||||||
switch (len) {
|
switch (len) {
|
||||||
case 0:
|
case 0:
|
||||||
state = max != min ? QValidator::Intermediate : QValidator::Invalid;
|
state = max != min ? QValidator::Intermediate : QValidator::Invalid;
|
||||||
@ -1360,14 +1364,15 @@ QVariant QDoubleSpinBoxPrivate::validateAndInterpret(QString &input, int &pos,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const QChar last = copy.at(len - 1);
|
const QChar last = copy.back();
|
||||||
const QChar secondLast = copy.at(len - 2);
|
const bool groupEnd = copy.endsWith(group);
|
||||||
if ((last == locale.groupSeparator() || last.isSpace())
|
const QStringView head(copy.constData(), groupEnd ? len - group.size() : len - 1);
|
||||||
&& (secondLast == locale.groupSeparator() || secondLast.isSpace())) {
|
const QChar secondLast = head.back();
|
||||||
|
if ((groupEnd || last.isSpace()) && (head.endsWith(group) || secondLast.isSpace())) {
|
||||||
state = QValidator::Invalid;
|
state = QValidator::Invalid;
|
||||||
QSBDEBUG() << __FILE__ << __LINE__<< "state is set to Invalid";
|
QSBDEBUG() << __FILE__ << __LINE__<< "state is set to Invalid";
|
||||||
goto end;
|
goto end;
|
||||||
} else if (last.isSpace() && (!locale.groupSeparator().isSpace() || secondLast.isSpace())) {
|
} else if (last.isSpace() && (!QChar::isSpace(groupUcs) || secondLast.isSpace())) {
|
||||||
state = QValidator::Invalid;
|
state = QValidator::Invalid;
|
||||||
QSBDEBUG() << __FILE__ << __LINE__<< "state is set to Invalid";
|
QSBDEBUG() << __FILE__ << __LINE__<< "state is set to Invalid";
|
||||||
goto end;
|
goto end;
|
||||||
@ -1381,26 +1386,31 @@ QVariant QDoubleSpinBoxPrivate::validateAndInterpret(QString &input, int &pos,
|
|||||||
QSBDEBUG() << __FILE__ << __LINE__ << locale << copy << num << ok;
|
QSBDEBUG() << __FILE__ << __LINE__ << locale << copy << num << ok;
|
||||||
|
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
if (locale.groupSeparator().isPrint()) {
|
if (QChar::isPrint(groupUcs)) {
|
||||||
if (max < 1000 && min > -1000 && copy.contains(locale.groupSeparator())) {
|
if (max < 1000 && min > -1000 && copy.contains(group)) {
|
||||||
state = QValidator::Invalid;
|
state = QValidator::Invalid;
|
||||||
QSBDEBUG() << __FILE__ << __LINE__<< "state is set to Invalid";
|
QSBDEBUG() << __FILE__ << __LINE__<< "state is set to Invalid";
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int len = copy.size();
|
const int len = copy.size();
|
||||||
for (int i=0; i<len- 1; ++i) {
|
for (int i = 0; i < len - 1;) {
|
||||||
if (copy.at(i) == locale.groupSeparator() && copy.at(i + 1) == locale.groupSeparator()) {
|
if (QStringView(copy).mid(i).startsWith(group)) {
|
||||||
QSBDEBUG() << __FILE__ << __LINE__<< "state is set to Invalid";
|
if (QStringView(copy).mid(i + group.size()).startsWith(group)) {
|
||||||
state = QValidator::Invalid;
|
QSBDEBUG() << __FILE__ << __LINE__<< "state is set to Invalid";
|
||||||
goto end;
|
state = QValidator::Invalid;
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
i += group.size();
|
||||||
|
} else {
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString copy2 = copy;
|
QString copy2 = copy;
|
||||||
copy2.remove(locale.groupSeparator());
|
copy2.remove(group);
|
||||||
num = locale.toDouble(copy2, &ok);
|
num = locale.toDouble(copy2, &ok);
|
||||||
QSBDEBUG() << locale.groupSeparator() << num << copy2 << ok;
|
QSBDEBUG() << group << num << copy2 << ok;
|
||||||
|
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
state = QValidator::Invalid;
|
state = QValidator::Invalid;
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
[deleteChildrenWithRunningGroup]
|
[deleteChildrenWithRunningGroup]
|
||||||
osx-10.13
|
macos
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[pauseAndPropertyAnimations]
|
[pauseAndPropertyAnimations]
|
||||||
osx
|
macos
|
||||||
[multipleSequentialGroups]
|
[multipleSequentialGroups]
|
||||||
osx
|
macos
|
||||||
|
[noTimerUpdates]
|
||||||
|
macos
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[finishWithUncontrolledAnimation]
|
[finishWithUncontrolledAnimation]
|
||||||
windows-10 msvc-2015
|
windows-10 msvc-2015
|
||||||
osx-10.13
|
macos
|
||||||
[groupWithZeroDurationAnimations]
|
[groupWithZeroDurationAnimations]
|
||||||
osx-10.13
|
macos
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
[elapsed]
|
[elapsed]
|
||||||
osx-10.13
|
macos
|
||||||
windows-10
|
windows-10
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -2,9 +2,7 @@
|
|||||||
osx
|
osx
|
||||||
[tryAcquireWithTimeout:0.2s]
|
[tryAcquireWithTimeout:0.2s]
|
||||||
windows
|
windows
|
||||||
osx-10.12
|
macos
|
||||||
osx-10.13
|
|
||||||
[tryAcquireWithTimeout:2s]
|
[tryAcquireWithTimeout:2s]
|
||||||
windows
|
windows
|
||||||
osx-10.12
|
macos
|
||||||
osx-10.13
|
|
||||||
|
@ -2,6 +2,5 @@
|
|||||||
windows-10 msvc-2015
|
windows-10 msvc-2015
|
||||||
osx
|
osx
|
||||||
[frameRate]
|
[frameRate]
|
||||||
osx-10.12
|
macos
|
||||||
osx-10.13
|
|
||||||
|
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
opensuse-leap
|
opensuse-leap
|
||||||
[positioning:default]
|
[positioning:default]
|
||||||
linux
|
linux
|
||||||
osx-10.12 ci
|
macos ci
|
||||||
winrt
|
winrt
|
||||||
[positioning:fake]
|
[positioning:fake]
|
||||||
osx-10.12 ci
|
macos ci
|
||||||
[modalWithChildWindow]
|
[modalWithChildWindow]
|
||||||
# QTBUG-66851
|
# QTBUG-66851
|
||||||
# QTBUG-69160
|
# QTBUG-69160
|
||||||
|
@ -49,21 +49,21 @@ windows-7sp1
|
|||||||
windows-10
|
windows-10
|
||||||
osx
|
osx
|
||||||
[backgroundRequest]
|
[backgroundRequest]
|
||||||
osx-10.12
|
macos
|
||||||
[connectToIPv6Address]
|
[connectToIPv6Address]
|
||||||
osx-10.12
|
macos
|
||||||
[deleteFromHttp]
|
[deleteFromHttp]
|
||||||
osx-10.12
|
macos
|
||||||
[downloadProgress]
|
[downloadProgress]
|
||||||
osx-10.12
|
macos
|
||||||
[encrypted]
|
[encrypted]
|
||||||
osx-10.13
|
macos
|
||||||
[httpCanReadLine]
|
[httpCanReadLine]
|
||||||
osx-10.12
|
macos
|
||||||
[httpRecursiveCreation]
|
[httpRecursiveCreation]
|
||||||
osx
|
osx
|
||||||
[httpWithNoCredentialUsage]
|
[httpWithNoCredentialUsage]
|
||||||
osx-10.12
|
macos
|
||||||
[ignoreSslErrorsList]
|
[ignoreSslErrorsList]
|
||||||
osx
|
osx
|
||||||
[ignoreSslErrorsListWithSlot]
|
[ignoreSslErrorsListWithSlot]
|
||||||
@ -71,27 +71,27 @@ osx
|
|||||||
[ioGetFromBuiltinHttp]
|
[ioGetFromBuiltinHttp]
|
||||||
osx
|
osx
|
||||||
[ioGetFromHttp]
|
[ioGetFromHttp]
|
||||||
osx-10.12
|
macos
|
||||||
[ioPostToHttpFromFile]
|
[ioPostToHttpFromFile]
|
||||||
osx-10.13
|
macos
|
||||||
[ioPostToHttpFromSocketSynchronous]
|
[ioPostToHttpFromSocketSynchronous]
|
||||||
osx
|
osx
|
||||||
[ioPostToHttpUploadProgress]
|
[ioPostToHttpUploadProgress]
|
||||||
osx
|
osx
|
||||||
[ioPutToHttpFromFile]
|
[ioPutToHttpFromFile]
|
||||||
osx-10.13
|
macos
|
||||||
[lastModifiedHeaderForHttp]
|
[lastModifiedHeaderForHttp]
|
||||||
osx-10.12
|
macos
|
||||||
[multipartSkipIndices]
|
[multipartSkipIndices]
|
||||||
osx-10.12
|
macos
|
||||||
[nestedEventLoops]
|
[nestedEventLoops]
|
||||||
osx
|
osx
|
||||||
[postToHttp]
|
[postToHttp]
|
||||||
osx-10.12
|
macos
|
||||||
[postToHttpMultipart]
|
[postToHttpMultipart]
|
||||||
osx-10.12
|
macos
|
||||||
[postToHttpSynchronous]
|
[postToHttpSynchronous]
|
||||||
osx-10.12
|
macos
|
||||||
[postToHttps]
|
[postToHttps]
|
||||||
osx
|
osx
|
||||||
[postToHttpsMultipart]
|
[postToHttpsMultipart]
|
||||||
@ -99,17 +99,17 @@ osx
|
|||||||
[postToHttpsSynchronous]
|
[postToHttpsSynchronous]
|
||||||
osx
|
osx
|
||||||
[putGetDeleteGetFromHttp]
|
[putGetDeleteGetFromHttp]
|
||||||
osx-10.12
|
macos
|
||||||
[putToHttpSynchronous]
|
[putToHttpSynchronous]
|
||||||
osx-10.12
|
macos
|
||||||
[putToHttps]
|
[putToHttps]
|
||||||
osx
|
osx
|
||||||
[putToHttpsSynchronous]
|
[putToHttpsSynchronous]
|
||||||
osx
|
osx
|
||||||
[putWithRateLimiting]
|
[putWithRateLimiting]
|
||||||
osx-10.13
|
macos
|
||||||
[qtbug13431replyThrottling]
|
[qtbug13431replyThrottling]
|
||||||
osx-10.12
|
macos
|
||||||
[receiveCookiesFromHttp]
|
[receiveCookiesFromHttp]
|
||||||
osx
|
osx
|
||||||
[receiveCookiesFromHttpSynchronous]
|
[receiveCookiesFromHttpSynchronous]
|
||||||
@ -119,7 +119,7 @@ osx
|
|||||||
[sendCookiesSynchronous]
|
[sendCookiesSynchronous]
|
||||||
osx
|
osx
|
||||||
[sendCustomRequestToHttp]
|
[sendCustomRequestToHttp]
|
||||||
osx-10.12
|
macos
|
||||||
[sslConfiguration]
|
[sslConfiguration]
|
||||||
osx
|
osx
|
||||||
[synchronousRequest]
|
[synchronousRequest]
|
||||||
|
@ -3,9 +3,9 @@ windows
|
|||||||
[spontaneousWrite]
|
[spontaneousWrite]
|
||||||
windows-7sp1
|
windows-7sp1
|
||||||
[connectToHostEncrypted]
|
[connectToHostEncrypted]
|
||||||
osx-10.13
|
macos
|
||||||
[setSslConfiguration]
|
[setSslConfiguration]
|
||||||
windows-10 msvc-2015
|
windows-10 msvc-2015
|
||||||
windows-7sp1
|
windows-7sp1
|
||||||
[connectToHostEncryptedWithVerificationPeerName]
|
[connectToHostEncryptedWithVerificationPeerName]
|
||||||
osx-10.13
|
macos
|
||||||
|
@ -19,7 +19,7 @@ osx
|
|||||||
osx
|
osx
|
||||||
[testMouseDragToNonClientArea]
|
[testMouseDragToNonClientArea]
|
||||||
osx
|
osx
|
||||||
osx-10.12 ci
|
macos ci
|
||||||
# The following key tests fail after switching to synchronous
|
# The following key tests fail after switching to synchronous
|
||||||
# expose events, and we don't know why yet. QTBUG-62042
|
# expose events, and we don't know why yet. QTBUG-62042
|
||||||
[testKeyPressOnToplevel]
|
[testKeyPressOnToplevel]
|
||||||
@ -32,8 +32,8 @@ osx
|
|||||||
osx
|
osx
|
||||||
# QTQAINFRA-1292
|
# QTQAINFRA-1292
|
||||||
[testPushButtonPressRelease]
|
[testPushButtonPressRelease]
|
||||||
osx-10.12 ci
|
macos ci
|
||||||
|
|
||||||
# QTQAINFRA-1292
|
# QTQAINFRA-1292
|
||||||
[testModifierCtrlWithDontSwapCtrlAndMeta]
|
[testModifierCtrlWithDontSwapCtrlAndMeta]
|
||||||
osx-10.12 ci
|
macos ci
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[snapToDefaultButton]
|
[snapToDefaultButton]
|
||||||
osx-10.14
|
macos
|
||||||
[showFullScreen]
|
[showFullScreen]
|
||||||
osx-10.13 ci
|
macos ci
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
[QTBUG4419_lineEditSelectAll]
|
[QTBUG4419_lineEditSelectAll]
|
||||||
osx-10.12
|
macos
|
||||||
osx-10.14
|
|
||||||
osx-10.13
|
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
[autoShow]
|
[autoShow]
|
||||||
osx-10.13
|
macos
|
||||||
|
2
tests/auto/widgets/itemviews/qabstractitemview/BLACKLIST
Normal file
2
tests/auto/widgets/itemviews/qabstractitemview/BLACKLIST
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[task200665_itemEntered]
|
||||||
|
macos # Can't move cursor (QTBUG-76312)
|
@ -24,9 +24,7 @@ opensuse-42.3
|
|||||||
[childEvents]
|
[childEvents]
|
||||||
macos
|
macos
|
||||||
[renderInvisible]
|
[renderInvisible]
|
||||||
osx-10.12
|
macos
|
||||||
osx-10.11
|
|
||||||
osx-10.14
|
|
||||||
[optimizedResizeMove]
|
[optimizedResizeMove]
|
||||||
osx
|
osx
|
||||||
[optimizedResize_topLevel]
|
[optimizedResize_topLevel]
|
||||||
|
@ -72,6 +72,7 @@
|
|||||||
#include <QtWidgets/QGraphicsProxyWidget>
|
#include <QtWidgets/QGraphicsProxyWidget>
|
||||||
#include <QtGui/qwindow.h>
|
#include <QtGui/qwindow.h>
|
||||||
#include <qtimer.h>
|
#include <qtimer.h>
|
||||||
|
#include <QtWidgets/QDoubleSpinBox>
|
||||||
|
|
||||||
#if defined(Q_OS_OSX)
|
#if defined(Q_OS_OSX)
|
||||||
#include "tst_qwidget_mac_helpers.h" // Abstract the ObjC stuff out so not everyone must run an ObjC++ compile.
|
#include "tst_qwidget_mac_helpers.h" // Abstract the ObjC stuff out so not everyone must run an ObjC++ compile.
|
||||||
@ -187,6 +188,7 @@ private slots:
|
|||||||
void tabOrderNoChange2();
|
void tabOrderNoChange2();
|
||||||
void appFocusWidgetWithFocusProxyLater();
|
void appFocusWidgetWithFocusProxyLater();
|
||||||
void appFocusWidgetWhenLosingFocusProxy();
|
void appFocusWidgetWhenLosingFocusProxy();
|
||||||
|
void explicitTabOrderWithComplexWidget();
|
||||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||||
void activation();
|
void activation();
|
||||||
#endif
|
#endif
|
||||||
@ -2110,6 +2112,32 @@ void tst_QWidget::appFocusWidgetWhenLosingFocusProxy()
|
|||||||
QCOMPARE(QApplication::focusWidget(), lineEdit);
|
QCOMPARE(QApplication::focusWidget(), lineEdit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void tst_QWidget::explicitTabOrderWithComplexWidget()
|
||||||
|
{
|
||||||
|
// Check that handling tab/backtab with a widget comprimised of other widgets
|
||||||
|
// handles tabbing correctly
|
||||||
|
Container window;
|
||||||
|
auto lineEditOne = new QLineEdit;
|
||||||
|
window.box->addWidget(lineEditOne);
|
||||||
|
auto lineEditTwo = new QLineEdit;
|
||||||
|
window.box->addWidget(lineEditTwo);
|
||||||
|
QWidget::setTabOrder(lineEditOne, lineEditTwo);
|
||||||
|
lineEditOne->setFocus();
|
||||||
|
window.show();
|
||||||
|
QApplication::setActiveWindow(&window);
|
||||||
|
QVERIFY(QTest::qWaitForWindowActive(&window));
|
||||||
|
QTRY_COMPARE(QApplication::focusWidget(), lineEditOne);
|
||||||
|
|
||||||
|
window.tab();
|
||||||
|
QTRY_COMPARE(QApplication::focusWidget(), lineEditTwo);
|
||||||
|
window.tab();
|
||||||
|
QTRY_COMPARE(QApplication::focusWidget(), lineEditOne);
|
||||||
|
window.backTab();
|
||||||
|
QTRY_COMPARE(QApplication::focusWidget(), lineEditTwo);
|
||||||
|
window.backTab();
|
||||||
|
QTRY_COMPARE(QApplication::focusWidget(), lineEditOne);
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||||
void tst_QWidget::activation()
|
void tst_QWidget::activation()
|
||||||
{
|
{
|
||||||
|
5
tests/auto/widgets/util/qscroller/BLACKLIST
Normal file
5
tests/auto/widgets/util/qscroller/BLACKLIST
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[scrollTo]
|
||||||
|
macos
|
||||||
|
|
||||||
|
[scroll]
|
||||||
|
macos
|
@ -1,4 +1,2 @@
|
|||||||
[editingFinished]
|
[editingFinished]
|
||||||
osx-10.12
|
macos
|
||||||
osx-10.14
|
|
||||||
osx-10.13
|
|
||||||
|
@ -2,15 +2,12 @@
|
|||||||
ubuntu-16.04
|
ubuntu-16.04
|
||||||
rhel-7.6
|
rhel-7.6
|
||||||
opensuse-leap
|
opensuse-leap
|
||||||
osx-10.11
|
macos
|
||||||
osx-10.13
|
|
||||||
ubuntu-18.04
|
ubuntu-18.04
|
||||||
osx-10.14
|
macos
|
||||||
rhel-7.4
|
rhel-7.4
|
||||||
osx-10.12
|
macos
|
||||||
opensuse-42.3
|
opensuse-42.3
|
||||||
[resizeTimer]
|
[resizeTimer]
|
||||||
osx-10.12
|
macos
|
||||||
osx-10.14
|
|
||||||
osx-10.13
|
|
||||||
|
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
[task258920_mouseBorder]
|
[task258920_mouseBorder]
|
||||||
osx-10.14
|
macos
|
||||||
osx-10.13
|
|
||||||
[layoutDirection]
|
[layoutDirection]
|
||||||
osx-10.12
|
macos
|
||||||
osx-10.13
|
|
||||||
# Fails when enabling synchronous expose events QTBUG-62092
|
# Fails when enabling synchronous expose events QTBUG-62092
|
||||||
[pushButtonPopulateOnAboutToShow]
|
[pushButtonPopulateOnAboutToShow]
|
||||||
osx-10.13
|
macos
|
||||||
[tearOff]
|
[tearOff]
|
||||||
osx-10.14
|
macos
|
||||||
[activeSubMenuPosition]
|
[activeSubMenuPosition]
|
||||||
winrt
|
winrt
|
||||||
[submenuTearOffDontClose]
|
[submenuTearOffDontClose]
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
[task176137_autoRepeatOfAction]
|
[task176137_autoRepeatOfAction]
|
||||||
osx-10.13
|
macos
|
||||||
|
Loading…
x
Reference in New Issue
Block a user