summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.cpp7
-rw-r--r--src/plugins/platforms/windows/qwindowseglcontext.cpp2
-rw-r--r--src/plugins/platforms/winrt/qwinrtdrag.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.cpp15
-rw-r--r--src/plugins/platforms/xcb/qxcbmime.cpp9
5 files changed, 30 insertions, 7 deletions
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
index efeb1f5f05..fda3f51a48 100644
--- a/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
@@ -415,7 +415,9 @@ void QWindowsContext::setProcessDpiAwareness(QtWindows::ProcessDpiAwareness dpiA
qCDebug(lcQpaWindows) << __FUNCTION__ << dpiAwareness;
if (QWindowsContext::shcoredll.isValid()) {
const HRESULT hr = QWindowsContext::shcoredll.setProcessDpiAwareness(dpiAwareness);
- if (FAILED(hr)) {
+ // E_ACCESSDENIED means set externally (MSVC manifest or external app loading Qt plugin).
+ // Silence warning in that case unless debug is enabled.
+ if (FAILED(hr) && (hr != E_ACCESSDENIED || lcQpaWindows().isDebugEnabled())) {
qWarning().noquote().nospace() << "SetProcessDpiAwareness("
<< dpiAwareness << ") failed: " << QWindowsContext::comErrorString(hr)
<< ", using " << QWindowsContext::processDpiAwareness();
@@ -849,6 +851,9 @@ QByteArray QWindowsContext::comErrorString(HRESULT hr)
case E_UNEXPECTED:
result += QByteArrayLiteral("E_UNEXPECTED");
break;
+ case E_ACCESSDENIED:
+ result += QByteArrayLiteral("E_ACCESSDENIED");
+ break;
case CO_E_ALREADYINITIALIZED:
result += QByteArrayLiteral("CO_E_ALREADYINITIALIZED");
break;
diff --git a/src/plugins/platforms/windows/qwindowseglcontext.cpp b/src/plugins/platforms/windows/qwindowseglcontext.cpp
index 0ce4e87e52..4261c01ac8 100644
--- a/src/plugins/platforms/windows/qwindowseglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowseglcontext.cpp
@@ -371,7 +371,7 @@ QSurfaceFormat QWindowsEGLStaticContext::formatFromConfig(EGLDisplay display, EG
\list
\o Install the Direct X SDK
\o Checkout and build ANGLE (SVN repository) as explained here:
- \l{http://code.google.com/p/angleproject/wiki/DevSetup}{ANGLE-Project}.
+ \l{https://chromium.googlesource.com/angle/angle/+/master/README.md}
When building for 64bit, de-activate the "WarnAsError" option
in every project file (as otherwise integer conversion
warnings will break the build).
diff --git a/src/plugins/platforms/winrt/qwinrtdrag.cpp b/src/plugins/platforms/winrt/qwinrtdrag.cpp
index 2ef50aa4e2..055aacbf56 100644
--- a/src/plugins/platforms/winrt/qwinrtdrag.cpp
+++ b/src/plugins/platforms/winrt/qwinrtdrag.cpp
@@ -504,8 +504,8 @@ static HRESULT qt_drop(IInspectable *sender, ABI::Windows::UI::Xaml::IDragEventA
class QtDragEventHandler##name : public IDragEventHandler \
{ \
public: \
- virtual HRESULT STDMETHODCALLTYPE Invoke(IInspectable *sender, \
- ABI::Windows::UI::Xaml::IDragEventArgs *e) \
+ STDMETHODIMP Invoke(IInspectable *sender, \
+ ABI::Windows::UI::Xaml::IDragEventArgs *e) \
{ \
return qt_##func(sender, e);\
} \
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
index 7168e6e3bd..811ef4251a 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
@@ -979,10 +979,21 @@ QList<int> QXcbKeyboard::possibleKeys(const QKeyEvent *event) const
xkb_layout_index_t lockedLayout = xkb_state_serialize_layout(xkb_state, XKB_STATE_LAYOUT_LOCKED);
xkb_mod_mask_t latchedMods = xkb_state_serialize_mods(xkb_state, XKB_STATE_MODS_LATCHED);
xkb_mod_mask_t lockedMods = xkb_state_serialize_mods(xkb_state, XKB_STATE_MODS_LOCKED);
+ xkb_mod_mask_t depressedMods = xkb_state_serialize_mods(xkb_state, XKB_STATE_MODS_DEPRESSED);
- xkb_state_update_mask(kb_state, 0, latchedMods, lockedMods, 0, 0, lockedLayout);
-
+ xkb_state_update_mask(kb_state, depressedMods, latchedMods, lockedMods, 0, 0, lockedLayout);
quint32 keycode = event->nativeScanCode();
+ // handle shortcuts for level three and above
+ xkb_layout_index_t layoutIndex = xkb_state_key_get_layout(kb_state, keycode);
+ xkb_level_index_t levelIndex = 0;
+ if (layoutIndex != XKB_LAYOUT_INVALID) {
+ levelIndex = xkb_state_key_get_level(kb_state, keycode, layoutIndex);
+ if (levelIndex == XKB_LEVEL_INVALID)
+ levelIndex = 0;
+ }
+ if (levelIndex <= 1)
+ xkb_state_update_mask(kb_state, 0, latchedMods, lockedMods, 0, 0, lockedLayout);
+
xkb_keysym_t sym = xkb_state_key_get_one_sym(kb_state, keycode);
if (sym == XKB_KEY_NoSymbol) {
xkb_state_unref(kb_state);
diff --git a/src/plugins/platforms/xcb/qxcbmime.cpp b/src/plugins/platforms/xcb/qxcbmime.cpp
index 825a8acd1f..f7244739a5 100644
--- a/src/plugins/platforms/xcb/qxcbmime.cpp
+++ b/src/plugins/platforms/xcb/qxcbmime.cpp
@@ -131,6 +131,11 @@ bool QXcbMime::mimeDataForAtom(QXcbConnection *connection, xcb_atom_t a, QMimeDa
ret = true;
} else if ((a == XCB_ATOM_PIXMAP || a == XCB_ATOM_BITMAP) && mimeData->hasImage()) {
ret = true;
+ } else if (atomName == QLatin1String("text/plain")
+ && mimeData->hasFormat(QLatin1String("text/uri-list"))) {
+ // Return URLs also as plain text.
+ *data = QInternalMimeData::renderDataHelper(atomName, mimeData);
+ ret = true;
}
return ret;
}
@@ -149,8 +154,10 @@ QVector<xcb_atom_t> QXcbMime::mimeAtomsForFormat(QXcbConnection *connection, con
}
// special cases for uris
- if (format == QLatin1String("text/uri-list"))
+ if (format == QLatin1String("text/uri-list")) {
atoms.append(connection->internAtom("text/x-moz-url"));
+ atoms.append(connection->internAtom("text/plain"));
+ }
//special cases for images
if (format == QLatin1String("image/ppm"))