Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Iaad9509712c848ed42ada2c25065162a6fc5a930
This commit is contained in:
commit
e4e5a1f0b7
@ -1,5 +1,2 @@
|
||||
# Pick up the VULKAN_SDK env var set by the LunarG SDK so that the Vulkan
|
||||
# headers are found out-of-the-box on typical Windows setups.
|
||||
|
||||
QMAKE_INCDIR_VULKAN = $$(VULKAN_SDK)\\include
|
||||
load(windows_vulkan_sdk)
|
||||
QMAKE_LIBS_VULKAN =
|
||||
|
@ -963,8 +963,10 @@ defineTest(qtConfExportLibrary) {
|
||||
defines = $$eval($${spfx}.defines)
|
||||
!isEmpty(defines): qtConfOutputVar(assign, $$output, QMAKE_DEFINES_$$NAME, $$defines)
|
||||
includes = $$eval($${spfx}.exportincludedir)
|
||||
isEmpty(includes): includes = $$eval($${spfx}.includedir)
|
||||
!isEmpty(includes): qtConfOutputVar(assign, $$output, QMAKE_INCDIR_$$NAME, $$includes)
|
||||
!equals(includes, -) {
|
||||
isEmpty(includes): includes = $$eval($${spfx}.includedir)
|
||||
!isEmpty(includes): qtConfOutputVar(assign, $$output, QMAKE_INCDIR_$$NAME, $$includes)
|
||||
}
|
||||
uses = $$eval($${lpfx}.dependencies)
|
||||
!isEmpty(uses) {
|
||||
# FIXME: ideally, we would export transitive deps only for static
|
||||
|
@ -60,8 +60,12 @@ defineReplace(qtExportLibsForModule) {
|
||||
QMAKE_LIBS_$$NAME QMAKE_LIBS_$${NAME}_DEBUG QMAKE_LIBS_$${NAME}_RELEASE \
|
||||
QMAKE_DEFINES_$$NAME QMAKE_INCDIR_$$NAME
|
||||
for (var, vars) {
|
||||
defined($$var, var): \
|
||||
result += "$$var = $$val_escape($$var)"
|
||||
expvar = $$var
|
||||
expvar ~= s/^QMAKE_/QMAKE_EXPORT_/
|
||||
defined($$expvar, var):equals($$expvar, -): next()
|
||||
!defined($$expvar, var): expvar = $$var
|
||||
defined($$expvar, var): \
|
||||
result += "$$var = $$val_escape($$expvar)"
|
||||
}
|
||||
}
|
||||
return($$result)
|
||||
|
8
mkspecs/features/win32/windows_vulkan_sdk.prf
Normal file
8
mkspecs/features/win32/windows_vulkan_sdk.prf
Normal file
@ -0,0 +1,8 @@
|
||||
isEmpty(QMAKE_INCDIR_VULKAN) {
|
||||
# Pick up the VULKAN_SDK env var set by the LunarG SDK so that the Vulkan
|
||||
# headers are found out-of-the-box on typical Windows setups.
|
||||
QMAKE_INCDIR_VULKAN = $$(VULKAN_SDK)\\include
|
||||
|
||||
# Do not export the include dir but resolve it on every qmake call.
|
||||
QMAKE_EXPORT_INCDIR_VULKAN = -
|
||||
}
|
@ -320,7 +320,8 @@ void QDirIteratorPrivate::checkAndPushDirectory(const QFileInfo &fileInfo)
|
||||
|
||||
bool QDirIteratorPrivate::matchesFilters(const QString &fileName, const QFileInfo &fi) const
|
||||
{
|
||||
Q_ASSERT(!fileName.isEmpty());
|
||||
if (fileName.isEmpty())
|
||||
return false;
|
||||
|
||||
// filter . and ..?
|
||||
const int fileNameSize = fileName.size();
|
||||
|
@ -1206,14 +1206,14 @@
|
||||
"label": " Using system FreeType",
|
||||
"enable": "input.freetype == 'system'",
|
||||
"disable": "input.freetype == 'qt'",
|
||||
"autoDetect": "!config.win32",
|
||||
"autoDetect": "!config.msvc",
|
||||
"condition": "features.freetype && libs.freetype",
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"fontconfig": {
|
||||
"label": "Fontconfig",
|
||||
"autoDetect": "!config.darwin",
|
||||
"condition": "!config.win32 && features.system-freetype && libs.fontconfig",
|
||||
"condition": "!config.msvc && features.system-freetype && libs.fontconfig",
|
||||
"output": [ "privateFeature", "feature" ]
|
||||
},
|
||||
"gbm": {
|
||||
|
@ -49,6 +49,8 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_PDF
|
||||
|
||||
// This map is used for symbol fonts to get the correct glyph names for the latin range
|
||||
static const unsigned short symbol_map[0x100] = {
|
||||
0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
|
||||
@ -90,7 +92,7 @@ static const unsigned short symbol_map[0x100] = {
|
||||
|
||||
// ---------------------------- PS/PDF helper methods -----------------------------------
|
||||
|
||||
#ifndef QT_NO_PDF
|
||||
|
||||
|
||||
QByteArray QFontSubset::glyphName(unsigned short unicode, bool symbol)
|
||||
{
|
||||
|
@ -1721,6 +1721,8 @@ QStringList QTextHtmlStyleSelector::nodeNames(NodePtr node) const
|
||||
|
||||
#endif // QT_NO_CSSPARSER
|
||||
|
||||
#ifndef QT_NO_CSSPARSER
|
||||
|
||||
static inline int findAttribute(const QStringList &attributes, const QString &name)
|
||||
{
|
||||
int idx = -1;
|
||||
@ -1730,8 +1732,6 @@ static inline int findAttribute(const QStringList &attributes, const QString &na
|
||||
return idx;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_CSSPARSER
|
||||
|
||||
QString QTextHtmlStyleSelector::attribute(NodePtr node, const QString &name) const
|
||||
{
|
||||
const QStringList &attributes = parser->at(node.id).attributes;
|
||||
|
@ -1118,7 +1118,7 @@ static bool addFontToDatabase(QString familyName,
|
||||
}
|
||||
|
||||
static int QT_WIN_CALLBACK storeFont(const LOGFONT *logFont, const TEXTMETRIC *textmetric,
|
||||
DWORD type, LPARAM)
|
||||
DWORD type, LPARAM lparam)
|
||||
{
|
||||
const ENUMLOGFONTEX *f = reinterpret_cast<const ENUMLOGFONTEX *>(logFont);
|
||||
const QString familyName = QString::fromWCharArray(f->elfLogFont.lfFaceName);
|
||||
@ -1128,8 +1128,16 @@ static int QT_WIN_CALLBACK storeFont(const LOGFONT *logFont, const TEXTMETRIC *t
|
||||
// to the documentation is identical to a TEXTMETRIC except for the last four
|
||||
// members, which we don't use anyway
|
||||
const FONTSIGNATURE *signature = nullptr;
|
||||
if (type & TRUETYPE_FONTTYPE)
|
||||
if (type & TRUETYPE_FONTTYPE) {
|
||||
signature = &reinterpret_cast<const NEWTEXTMETRICEX *>(textmetric)->ntmFontSig;
|
||||
// We get a callback for each script-type supported, but we register them all
|
||||
// at once using the signature, so we only need one call to addFontToDatabase().
|
||||
QSet<QPair<QString,QString>> *foundFontAndStyles = reinterpret_cast<QSet<QPair<QString,QString>> *>(lparam);
|
||||
QPair<QString,QString> fontAndStyle(familyName, styleName);
|
||||
if (foundFontAndStyles->contains(fontAndStyle))
|
||||
return 1;
|
||||
foundFontAndStyles->insert(fontAndStyle);
|
||||
}
|
||||
addFontToDatabase(familyName, styleName, *logFont, textmetric, signature, type);
|
||||
|
||||
// keep on enumerating
|
||||
@ -1149,7 +1157,8 @@ void QWindowsFontDatabase::populateFamily(const QString &familyName)
|
||||
familyName.toWCharArray(lf.lfFaceName);
|
||||
lf.lfFaceName[familyName.size()] = 0;
|
||||
lf.lfPitchAndFamily = 0;
|
||||
EnumFontFamiliesEx(dummy, &lf, storeFont, 0, 0);
|
||||
QSet<QPair<QString,QString>> foundFontAndStyles;
|
||||
EnumFontFamiliesEx(dummy, &lf, storeFont, reinterpret_cast<intptr_t>(&foundFontAndStyles), 0);
|
||||
ReleaseDC(0, dummy);
|
||||
}
|
||||
|
||||
|
@ -303,7 +303,7 @@ static bool addFontToDatabase(QString familyName,
|
||||
}
|
||||
|
||||
static int QT_WIN_CALLBACK storeFont(const LOGFONT *logFont, const TEXTMETRIC *textmetric,
|
||||
DWORD type, LPARAM)
|
||||
DWORD type, LPARAM lparam)
|
||||
{
|
||||
const ENUMLOGFONTEX *f = reinterpret_cast<const ENUMLOGFONTEX *>(logFont);
|
||||
const QString faceName = QString::fromWCharArray(f->elfLogFont.lfFaceName);
|
||||
@ -314,8 +314,16 @@ static int QT_WIN_CALLBACK storeFont(const LOGFONT *logFont, const TEXTMETRIC *t
|
||||
// to the documentation is identical to a TEXTMETRIC except for the last four
|
||||
// members, which we don't use anyway
|
||||
const FONTSIGNATURE *signature = nullptr;
|
||||
if (type & TRUETYPE_FONTTYPE)
|
||||
if (type & TRUETYPE_FONTTYPE) {
|
||||
signature = &reinterpret_cast<const NEWTEXTMETRICEX *>(textmetric)->ntmFontSig;
|
||||
// We get a callback for each script-type supported, but we register them all
|
||||
// at once using the signature, so we only need one call to addFontToDatabase().
|
||||
QSet<QPair<QString,QString>> *foundFontAndStyles = reinterpret_cast<QSet<QPair<QString,QString>> *>(lparam);
|
||||
QPair<QString,QString> fontAndStyle(faceName, styleName);
|
||||
if (foundFontAndStyles->contains(fontAndStyle))
|
||||
return 1;
|
||||
foundFontAndStyles->insert(fontAndStyle);
|
||||
}
|
||||
addFontToDatabase(faceName, styleName, fullName, *logFont, textmetric, signature, type);
|
||||
|
||||
// keep on enumerating
|
||||
@ -344,7 +352,8 @@ void QWindowsFontDatabaseFT::populateFamily(const QString &familyName)
|
||||
lf.lfFaceName[familyName.size()] = 0;
|
||||
lf.lfCharSet = DEFAULT_CHARSET;
|
||||
lf.lfPitchAndFamily = 0;
|
||||
EnumFontFamiliesEx(dummy, &lf, storeFont, 0, 0);
|
||||
QSet<QPair<QString,QString>> foundFontAndStyles;
|
||||
EnumFontFamiliesEx(dummy, &lf, storeFont, reinterpret_cast<intptr_t>(&foundFontAndStyles), 0);
|
||||
ReleaseDC(0, dummy);
|
||||
}
|
||||
|
||||
|
@ -55,6 +55,8 @@
|
||||
#include <QtDBus/QDBusConnection>
|
||||
#include <QtDBus/QDBusVariant>
|
||||
|
||||
#include <QtGui/qtgui-config.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QDBusServiceWatcher;
|
||||
|
@ -978,15 +978,25 @@ jboolean QAndroidInputContext::deleteSurroundingText(jint leftLength, jint right
|
||||
m_composingText.clear();
|
||||
m_composingTextStart = -1;
|
||||
|
||||
QString text = query->value(Qt::ImSurroundingText).toString();
|
||||
if (text.isEmpty())
|
||||
return JNI_TRUE;
|
||||
|
||||
if (leftLength < 0) {
|
||||
rightLength += -leftLength;
|
||||
leftLength = 0;
|
||||
}
|
||||
|
||||
QVariant textBeforeCursor = query->value(Qt::ImTextBeforeCursor);
|
||||
QVariant textAfterCursor = query->value(Qt::ImTextAfterCursor);
|
||||
if (textBeforeCursor.isValid() && textAfterCursor.isValid()) {
|
||||
leftLength = qMin(leftLength, textBeforeCursor.toString().length());
|
||||
rightLength = qMin(rightLength, textAfterCursor.toString().length());
|
||||
} else {
|
||||
int cursorPos = query->value(Qt::ImCursorPosition).toInt();
|
||||
leftLength = qMin(leftLength, cursorPos);
|
||||
rightLength = qMin(rightLength, query->value(Qt::ImSurroundingText).toString().length() - cursorPos);
|
||||
}
|
||||
|
||||
if (leftLength == 0 && rightLength == 0)
|
||||
return JNI_TRUE;
|
||||
|
||||
QInputMethodEvent event;
|
||||
event.setCommitString(QString(), -leftLength, leftLength+rightLength);
|
||||
sendInputMethodEvent(&event);
|
||||
@ -1075,6 +1085,14 @@ const QAndroidInputContext::ExtractedText &QAndroidInputContext::getExtractedTex
|
||||
int cpos = localPos + composeLength; //actual cursor pos relative to the current block
|
||||
|
||||
int localOffset = 0; // start of extracted text relative to the current block
|
||||
if (blockPos > 0) {
|
||||
QString prevBlockEnding = query->value(Qt::ImTextBeforeCursor).toString();
|
||||
prevBlockEnding.chop(localPos);
|
||||
if (prevBlockEnding.endsWith(QLatin1Char('\n'))) {
|
||||
localOffset = -qMin(20, prevBlockEnding.length());
|
||||
blockText = prevBlockEnding.right(-localOffset) + blockText;
|
||||
}
|
||||
}
|
||||
|
||||
// It is documented that we should try to return hintMaxChars
|
||||
// characters, but that's not what the standard Android controls do, and
|
||||
|
@ -42,8 +42,9 @@
|
||||
#define QCOCOASYSTEMTRAYICON_P_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
|
||||
#ifndef QT_NO_SYSTEMTRAYICON
|
||||
#if QT_CONFIG(systemtrayicon)
|
||||
|
||||
#include "QtCore/qstring.h"
|
||||
#include "QtGui/qpa/qplatformsystemtrayicon.h"
|
||||
|
@ -293,7 +293,26 @@ static QPoint mapWindowCoordinates(QWindow *source, QWindow *target, QPoint poin
|
||||
QCocoaDrag* nativeDrag = QCocoaIntegration::instance()->drag();
|
||||
nativeDrag->setAcceptedAction(qt_mac_mapNSDragOperation(operation));
|
||||
|
||||
// Qt starts drag-and-drop on a mouse button press event. Cococa in
|
||||
// this case won't send the matching release event, so we have to
|
||||
// synthesize it here.
|
||||
m_buttons = currentlyPressedMouseButtons();
|
||||
const auto modifiers = [QNSView convertKeyModifiers:NSApp.currentEvent.modifierFlags];
|
||||
|
||||
NSPoint windowPoint = [self.window convertRectFromScreen:NSMakeRect(screenPoint.x, screenPoint.y, 1, 1)].origin;
|
||||
NSPoint nsViewPoint = [self convertPoint: windowPoint fromView: nil];
|
||||
|
||||
QPoint qtWindowPoint(nsViewPoint.x, nsViewPoint.y);
|
||||
QPoint qtScreenPoint = QCocoaScreen::mapFromNative(screenPoint).toPoint();
|
||||
|
||||
QWindowSystemInterface::handleMouseEvent(
|
||||
target,
|
||||
mapWindowCoordinates(m_platformWindow->window(), target, qtWindowPoint),
|
||||
qtScreenPoint,
|
||||
m_buttons,
|
||||
Qt::NoButton,
|
||||
QEvent::MouseButtonRelease,
|
||||
modifiers);
|
||||
|
||||
qCDebug(lcQpaMouse) << "Drag session" << session << "ended, with" << m_buttons;
|
||||
}
|
||||
|
@ -388,6 +388,8 @@ bool QAbstractItemDelegate::helpEvent(QHelpEvent *event,
|
||||
const QModelIndex &index)
|
||||
{
|
||||
Q_D(QAbstractItemDelegate);
|
||||
Q_UNUSED(d);
|
||||
Q_UNUSED(index);
|
||||
Q_UNUSED(option);
|
||||
|
||||
if (!event || !view)
|
||||
|
@ -50,8 +50,12 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QWidgetAnimator::QWidgetAnimator(QMainWindowLayout *layout) : m_mainWindowLayout(layout)
|
||||
QWidgetAnimator::QWidgetAnimator(QMainWindowLayout *layout)
|
||||
#if QT_CONFIG(mainwindow)
|
||||
: m_mainWindowLayout(layout)
|
||||
#endif
|
||||
{
|
||||
Q_UNUSED(layout)
|
||||
}
|
||||
|
||||
void QWidgetAnimator::abort(QWidget *w)
|
||||
|
@ -81,7 +81,9 @@ private Q_SLOTS:
|
||||
private:
|
||||
typedef QHash<QWidget*, QPointer<QPropertyAnimation> > AnimationMap;
|
||||
AnimationMap m_animation_map;
|
||||
#if QT_CONFIG(mainwindow)
|
||||
QMainWindowLayout *m_mainWindowLayout;
|
||||
#endif
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
Loading…
x
Reference in New Issue
Block a user