summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/api/qwebenginecookiestore.cpp138
-rw-r--r--src/core/api/qwebenginecookiestore.h21
-rw-r--r--src/core/api/qwebenginecookiestore_p.h3
-rw-r--r--src/core/browser_context_adapter.cpp18
-rw-r--r--src/core/cookie_monster_delegate_qt.cpp6
-rw-r--r--src/core/location_provider_qt.cpp9
-rw-r--r--src/core/url_request_custom_job.cpp16
-rw-r--r--src/core/url_request_custom_job.h3
-rw-r--r--src/core/web_event_factory.cpp37
9 files changed, 89 insertions, 162 deletions
diff --git a/src/core/api/qwebenginecookiestore.cpp b/src/core/api/qwebenginecookiestore.cpp
index 2938eddbd..c0a3f3208 100644
--- a/src/core/api/qwebenginecookiestore.cpp
+++ b/src/core/api/qwebenginecookiestore.cpp
@@ -175,20 +175,6 @@ void QWebEngineCookieStorePrivate::onCookieChanged(const QNetworkCookie &cookie,
Q_EMIT q->cookieAdded(cookie);
}
-bool QWebEngineCookieStorePrivate::canSetCookie(const QUrl &firstPartyUrl, const QByteArray &cookieLine, const QUrl &url)
-{
- if (filterCallback) {
- QWebEngineCookieStore::FilterRequest request;
- request.accepted = true;
- request.firstPartyUrl = firstPartyUrl;
- request.cookieLine = cookieLine;
- request.cookieSource = url;
- callbackDirectory.invokeDirectly<QWebEngineCookieStore::FilterRequest&>(filterCallback, request);
- return request.accepted;
- }
- return true;
-}
-
/*!
\class QWebEngineCookieStore
\inmodule QtWebEngineCore
@@ -268,41 +254,26 @@ QWebEngineCookieStore::~QWebEngineCookieStore()
}
/*!
- \fn void setCookieWithCallback(const QNetworkCookie &cookie, FunctorOrLambda resultCallback, const QUrl &origin = QUrl())
-
- Adds \a cookie to the cookie store. When the operation finishes, \a resultCallback will be executed
- on the caller thread.
- It is possible to provide an optional \a origin URL argument to limit the scope of the cookie.
- The provided URL should also include the scheme.
-
- \sa setCookie()
-*/
-
-void QWebEngineCookieStore::setCookieWithCallback(const QNetworkCookie &cookie, const QWebEngineCallback<bool> &resultCallback, const QUrl &origin)
-{
- Q_D(QWebEngineCookieStore);
- d->setCookie(resultCallback, cookie, origin);
-}
-
-/*!
- Adds \a cookie to the cookie store. This function is provided for convenience and is
- equivalent to calling setCookieWithCallback() with an empty callback.
+ Adds \a cookie to the cookie store.
It is possible to provide an optional \a origin URL argument to limit the scope of the cookie.
The provided URL should also include the scheme.
- \sa setCookieWithCallback()
+ \note This operation is asynchronous.
*/
void QWebEngineCookieStore::setCookie(const QNetworkCookie &cookie, const QUrl &origin)
{
- setCookieWithCallback(cookie, QWebEngineCallback<bool>(), origin);
+ //TODO: use callbacks or delete dummy ones
+ Q_D(QWebEngineCookieStore);
+ d->setCookie(QWebEngineCallback<bool>(), cookie, origin);
}
/*!
Deletes \a cookie from the cookie store.
It is possible to provide an optional \a origin URL argument to limit the scope of the
cookie to be deleted.
- The provided URL should also include the scheme.
+
+ \note This operation is asynchronous.
*/
void QWebEngineCookieStore::deleteCookie(const QNetworkCookie &cookie, const QUrl &origin)
@@ -312,104 +283,57 @@ void QWebEngineCookieStore::deleteCookie(const QNetworkCookie &cookie, const QUr
}
/*!
- \fn void QWebEngineCookieStore::getAllCookies(FunctorOrLambda resultCallback)
+ Loads all the cookies into the cookie store. The cookieAdded() signal is emitted on every
+ loaded cookie. Cookies are loaded automatically when the store gets initialized, which
+ in most cases happens on loading the first URL. However, calling this function is useful
+ if cookies should be listed before entering the web content.
- Requests all the cookies in the cookie store. When the asynchronous operation finishes,
- \a resultCallback will be called with a QByteArray as the argument containing the cookies.
- This QByteArray can be parsed using QNetworkCookie::parseCookies().
-
- \sa deleteCookie()
+ \note This operation is asynchronous.
*/
-void QWebEngineCookieStore::getAllCookies(const QWebEngineCallback<const QByteArray&> &resultCallback)
+void QWebEngineCookieStore::loadAllCookies()
{
+ //TODO: use callbacks or delete dummy ones
Q_D(QWebEngineCookieStore);
- if (d->m_getAllCookiesPending) {
- d->callbackDirectory.invokeEmpty(resultCallback);
+ if (d->m_getAllCookiesPending)
return;
- }
- d->callbackDirectory.registerCallback(CallbackDirectory::GetAllCookiesCallbackId, resultCallback);
+ d->callbackDirectory.registerCallback(CallbackDirectory::GetAllCookiesCallbackId, QWebEngineCallback<const QByteArray&>());
+ //this will trigger cookieAdded signal
d->getAllCookies();
}
/*!
- \fn void QWebEngineCookieStore::deleteSessionCookiesWithCallback(FunctorOrLambda resultCallback)
-
Deletes all the session cookies in the cookie store. Session cookies do not have an
expiration date assigned to them.
- When the asynchronous operation finishes, \a resultCallback will be called with the
- number of cookies deleted as the argument.
-*/
-void QWebEngineCookieStore::deleteSessionCookiesWithCallback(const QWebEngineCallback<int> &resultCallback)
-{
- Q_D(QWebEngineCookieStore);
- if (d->m_deleteAllCookiesPending || d->m_deleteSessionCookiesPending) {
- d->callbackDirectory.invokeEmpty(resultCallback);
- return;
- }
- d->callbackDirectory.registerCallback(CallbackDirectory::DeleteSessionCookiesCallbackId, resultCallback);
- d->deleteSessionCookies();
-}
-
-/*!
- \fn void QWebEngineCookieStore::deleteAllCookiesWithCallback(FunctorOrLambda resultCallback)
-
- Deletes all the cookies in the cookie store. When the asynchronous operation finishes,
- \a resultCallback will be called with the number of cookies deleted as the argument.
-
- \sa deleteSessionCookiesWithCallback(), getAllCookies()
+ \note This operation is asynchronous.
+ \sa loadAllCookies()
*/
-void QWebEngineCookieStore::deleteAllCookiesWithCallback(const QWebEngineCallback<int> &resultCallback)
+void QWebEngineCookieStore::deleteSessionCookies()
{
+ //TODO: use callbacks or delete dummy ones
Q_D(QWebEngineCookieStore);
- if (d->m_deleteAllCookiesPending) {
- d->callbackDirectory.invokeEmpty(resultCallback);
+ if (d->m_deleteAllCookiesPending || d->m_deleteSessionCookiesPending)
return;
- }
- d->callbackDirectory.registerCallback(CallbackDirectory::DeleteAllCookiesCallbackId, resultCallback);
- d->deleteAllCookies();
-}
-
-/*!
- Deletes all the session cookies in the cookie store.
-
- \sa deleteSessionCookiesWithCallback()
-*/
-
-void QWebEngineCookieStore::deleteSessionCookies()
-{
- deleteSessionCookiesWithCallback(QWebEngineCallback<int>());
+ d->callbackDirectory.registerCallback(CallbackDirectory::DeleteSessionCookiesCallbackId, QWebEngineCallback<int>());
+ d->deleteSessionCookies();
}
/*!
Deletes all the cookies in the cookie store.
-
- \sa deleteAllCookiesWithCallback(), getAllCookies()
+ \note This operation is asynchronous.
+ \sa loadAllCookies()
*/
void QWebEngineCookieStore::deleteAllCookies()
{
- deleteAllCookiesWithCallback(QWebEngineCallback<int>());
-}
-
-/*!
- \fn void QWebEngineCookieStore::setCookieFilter(FunctorOrLambda filterCallback)
-
- Installs a cookie filter that can reject cookies before they are added to the cookie store.
- The \a filterCallback must be a lambda or functor taking FilterRequest structure. If the
- cookie is to be rejected, the filter can set FilterRequest::accepted to \c false.
-
- The callback should not be used to execute heavy tasks since it is running on the
- IO thread and therefore blocks the Chromium networking.
-
- \sa deleteAllCookiesWithCallback(), getAllCookies()
-*/
-void QWebEngineCookieStore::setCookieFilter(const QWebEngineCallback<QWebEngineCookieStore::FilterRequest&> &filter)
-{
+ //TODO: use callbacks or delete dummy ones
Q_D(QWebEngineCookieStore);
- d->filterCallback = filter;
+ if (d->m_deleteAllCookiesPending)
+ return;
+ d->callbackDirectory.registerCallback(CallbackDirectory::DeleteAllCookiesCallbackId, QWebEngineCallback<int>());
+ d->deleteAllCookies();
}
QT_END_NAMESPACE
diff --git a/src/core/api/qwebenginecookiestore.h b/src/core/api/qwebenginecookiestore.h
index b78f885ef..b1d625385 100644
--- a/src/core/api/qwebenginecookiestore.h
+++ b/src/core/api/qwebenginecookiestore.h
@@ -57,32 +57,13 @@ class QWEBENGINE_EXPORT QWebEngineCookieStore : public QObject {
Q_OBJECT
public:
- struct FilterRequest {
- bool accepted;
-
- QUrl firstPartyUrl;
- QByteArray cookieLine;
- QUrl cookieSource;
- };
virtual ~QWebEngineCookieStore();
-#ifdef Q_QDOC
- void setCookieWithCallback(const QNetworkCookie &cookie, FunctorOrLambda resultCallback, const QUrl &origin = QUrl());
- void deleteSessionCookiesWithCallback(FunctorOrLambda resultCallback);
- void deleteAllCookiesWithCallback(FunctorOrLambda resultCallback);
- void getAllCookies(FunctorOrLambda resultCallback);
- void setCookieFilter(FunctorOrLambda filterCallback);
-#else
- void setCookieWithCallback(const QNetworkCookie &cookie, const QWebEngineCallback<bool> &resultCallback, const QUrl &origin = QUrl());
- void deleteSessionCookiesWithCallback(const QWebEngineCallback<int> &resultCallback);
- void deleteAllCookiesWithCallback(const QWebEngineCallback<int> &resultCallback);
- void getAllCookies(const QWebEngineCallback<const QByteArray&> &resultCallback);
- void setCookieFilter(const QWebEngineCallback<FilterRequest&> &filterCallback);
-#endif
void setCookie(const QNetworkCookie &cookie, const QUrl &origin = QUrl());
void deleteCookie(const QNetworkCookie &cookie, const QUrl &origin = QUrl());
void deleteSessionCookies();
void deleteAllCookies();
+ void loadAllCookies();
Q_SIGNALS:
void cookieAdded(const QNetworkCookie &cookie);
diff --git a/src/core/api/qwebenginecookiestore_p.h b/src/core/api/qwebenginecookiestore_p.h
index 348dcd69f..41456cfdc 100644
--- a/src/core/api/qwebenginecookiestore_p.h
+++ b/src/core/api/qwebenginecookiestore_p.h
@@ -75,7 +75,6 @@ class QWEBENGINE_PRIVATE_EXPORT QWebEngineCookieStorePrivate : public QObjectPri
friend class QTypeInfo<CookieData>;
public:
QtWebEngineCore::CallbackDirectory callbackDirectory;
- QWebEngineCallback<QWebEngineCookieStore::FilterRequest&> filterCallback;
QVector<CookieData> m_pendingUserCookies;
quint64 m_nextCallbackId;
bool m_deleteSessionCookiesPending;
@@ -94,8 +93,6 @@ public:
void deleteAllCookies();
void getAllCookies();
- bool canSetCookie(const QUrl &firstPartyUrl, const QByteArray &cookieLine, const QUrl &url);
-
void onGetAllCallbackResult(qint64 callbackId, const QByteArray &cookieList);
void onSetCallbackResult(qint64 callbackId, bool success);
void onDeleteCallbackResult(qint64 callbackId, int numCookies);
diff --git a/src/core/browser_context_adapter.cpp b/src/core/browser_context_adapter.cpp
index a8f704995..8f1311bb4 100644
--- a/src/core/browser_context_adapter.cpp
+++ b/src/core/browser_context_adapter.cpp
@@ -54,8 +54,6 @@
#include <QString>
#include <QStandardPaths>
-#include <numeric>
-
namespace {
inline QString buildLocationFromStandardPath(const QString &standardPath, const QString &name) {
QString location = standardPath;
@@ -363,13 +361,13 @@ bool BrowserContextAdapter::removeCustomUrlSchemeHandler(QWebEngineUrlSchemeHand
{
bool removedOneOrMore = false;
auto it = m_customUrlSchemeHandlers.begin();
- auto end = m_customUrlSchemeHandlers.end();
- for (; it != end; ++it) {
+ while (it != m_customUrlSchemeHandlers.end()) {
if (it.value() == handler) {
it = m_customUrlSchemeHandlers.erase(it);
removedOneOrMore = true;
continue;
}
+ ++it;
}
if (removedOneOrMore)
updateCustomUrlSchemeHandlers();
@@ -405,11 +403,13 @@ void BrowserContextAdapter::permissionRequestReply(const QUrl &origin, Permissio
QString BrowserContextAdapter::httpAcceptLanguageWithoutQualities() const
{
const QStringList list = m_httpAcceptLanguage.split(QLatin1Char(','));
- return std::accumulate(list.constBegin(), list.constEnd(), QString(),
- [](const QString &r, const QString &e) {
- return (r.isEmpty() ? r : r + QString(QLatin1Char(',')))
- + e.split(QLatin1Char(';')).first();
- });
+ QString out;
+ Q_FOREACH (const QString& str, list) {
+ if (!out.isEmpty())
+ out.append(QLatin1Char(','));
+ out.append(str.split(QLatin1Char(';')).first());
+ }
+ return out;
}
QString BrowserContextAdapter::httpAcceptLanguage() const
diff --git a/src/core/cookie_monster_delegate_qt.cpp b/src/core/cookie_monster_delegate_qt.cpp
index 3689d54d7..493743385 100644
--- a/src/core/cookie_monster_delegate_qt.cpp
+++ b/src/core/cookie_monster_delegate_qt.cpp
@@ -166,10 +166,8 @@ void CookieMonsterDelegateQt::setClient(QWebEngineCookieStore *client)
bool CookieMonsterDelegateQt::canSetCookie(const QUrl &firstPartyUrl, const QByteArray &cookieLine, const QUrl &url)
{
- if (!m_client)
- return true;
-
- return m_client->d_func()->canSetCookie(firstPartyUrl, cookieLine, url);
+ // TODO: should be used for FilterRequest implementation
+ return true;
}
void CookieMonsterDelegateQt::OnCookieChanged(const net::CanonicalCookie& cookie, bool removed, ChangeCause cause)
diff --git a/src/core/location_provider_qt.cpp b/src/core/location_provider_qt.cpp
index 222d15354..485ea8d94 100644
--- a/src/core/location_provider_qt.cpp
+++ b/src/core/location_provider_qt.cpp
@@ -74,6 +74,7 @@ private:
QGeoPositionInfoSource *m_positionInfoSource;
void postToLocationProvider(const base::Closure &task);
+ friend class LocationProviderQt;
};
QtPositioningHelper::QtPositioningHelper(LocationProviderQt *provider)
@@ -85,7 +86,8 @@ QtPositioningHelper::QtPositioningHelper(LocationProviderQt *provider)
QtPositioningHelper::~QtPositioningHelper()
{
- m_locationProvider->m_positioningHelper = 0;
+ if (m_locationProvider)
+ m_locationProvider->m_positioningHelper = 0;
}
static bool isHighAccuracySource(const QGeoPositionInfoSource *source)
@@ -223,7 +225,10 @@ LocationProviderQt::LocationProviderQt()
LocationProviderQt::~LocationProviderQt()
{
- m_positioningHelper->deleteLater();
+ if (m_positioningHelper) {
+ m_positioningHelper->m_locationProvider = 0;
+ m_positioningHelper->deleteLater();
+ }
}
bool LocationProviderQt::StartProvider(bool highAccuracy)
diff --git a/src/core/url_request_custom_job.cpp b/src/core/url_request_custom_job.cpp
index 0a81d04a1..1b6f1c767 100644
--- a/src/core/url_request_custom_job.cpp
+++ b/src/core/url_request_custom_job.cpp
@@ -60,7 +60,8 @@ URLRequestCustomJob::URLRequestCustomJob(URLRequest *request, NetworkDelegate *n
, m_schemeHandler(schemeHandler)
, m_error(0)
, m_started(false)
- , m_weakFactory(this)
+ , m_weakFactoryIO(this)
+ , m_weakFactoryUI(this)
{
}
@@ -78,7 +79,7 @@ URLRequestCustomJob::~URLRequestCustomJob()
void URLRequestCustomJob::Start()
{
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
- content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, base::Bind(&URLRequestCustomJob::startAsync, m_weakFactory.GetWeakPtr()));
+ content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, base::Bind(&URLRequestCustomJob::startAsync, m_weakFactoryIO.GetWeakPtr()));
}
void URLRequestCustomJob::Kill()
@@ -93,7 +94,8 @@ void URLRequestCustomJob::Kill()
if (m_device && m_device->isOpen())
m_device->close();
m_device = 0;
- m_weakFactory.InvalidateWeakPtrs();
+ m_weakFactoryIO.InvalidateWeakPtrs();
+ m_weakFactoryUI.InvalidateWeakPtrs();
URLRequestJob::Kill();
}
@@ -151,7 +153,7 @@ void URLRequestCustomJob::setReplyDevice(QIODevice *device)
m_device->open(QIODevice::ReadOnly);
if (m_device && m_device->isReadable())
- content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE, base::Bind(&URLRequestCustomJob::notifyStarted, m_weakFactory.GetWeakPtr()));
+ content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE, base::Bind(&URLRequestCustomJob::notifyStarted, m_weakFactoryUI.GetWeakPtr()));
else
fail(ERR_INVALID_URL);
}
@@ -179,7 +181,7 @@ void URLRequestCustomJob::redirect(const GURL &url)
QMutexLocker lock(&m_mutex);
m_redirect = url;
- content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE, base::Bind(&URLRequestCustomJob::notifyStarted, m_weakFactory.GetWeakPtr()));
+ content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE, base::Bind(&URLRequestCustomJob::notifyStarted, m_weakFactoryUI.GetWeakPtr()));
}
void URLRequestCustomJob::abort()
@@ -189,7 +191,7 @@ void URLRequestCustomJob::abort()
if (m_device && m_device->isOpen())
m_device->close();
m_device = 0;
- content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE, base::Bind(&URLRequestCustomJob::notifyCanceled, m_weakFactory.GetWeakPtr()));
+ content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE, base::Bind(&URLRequestCustomJob::notifyCanceled, m_weakFactoryUI.GetWeakPtr()));
}
void URLRequestCustomJob::notifyCanceled()
@@ -214,7 +216,7 @@ void URLRequestCustomJob::fail(int error)
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
QMutexLocker lock(&m_mutex);
m_error = error;
- content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE, base::Bind(&URLRequestCustomJob::notifyFailure, m_weakFactory.GetWeakPtr()));
+ content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE, base::Bind(&URLRequestCustomJob::notifyFailure, m_weakFactoryUI.GetWeakPtr()));
}
void URLRequestCustomJob::notifyFailure()
diff --git a/src/core/url_request_custom_job.h b/src/core/url_request_custom_job.h
index a994c467a..be5cae43c 100644
--- a/src/core/url_request_custom_job.h
+++ b/src/core/url_request_custom_job.h
@@ -87,7 +87,8 @@ private:
int m_error;
GURL m_redirect;
bool m_started;
- base::WeakPtrFactory<URLRequestCustomJob> m_weakFactory;
+ base::WeakPtrFactory<URLRequestCustomJob> m_weakFactoryIO;
+ base::WeakPtrFactory<URLRequestCustomJob> m_weakFactoryUI;
friend class URLRequestCustomJobDelegate;
diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp
index 1a58ae385..2e6fde214 100644
--- a/src/core/web_event_factory.cpp
+++ b/src/core/web_event_factory.cpp
@@ -109,6 +109,8 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
return VK_DECIMAL; // (6E) Decimal key
case Qt::Key_Slash:
return VK_DIVIDE; // (6F) Divide key
+ case Qt::Key_Equal:
+ return VK_OEM_PLUS; // (BB) Equal key
case Qt::Key_PageUp:
return VK_PRIOR; // (21) PAGE UP key
case Qt::Key_PageDown:
@@ -264,9 +266,10 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
case Qt::Key_Help:
return VK_HELP; // (2F) HELP key
case Qt::Key_0:
- case Qt::Key_ParenLeft:
+ case Qt::Key_ParenRight:
return VK_0; // (30) 0) key
case Qt::Key_1:
+ case Qt::Key_Exclam:
return VK_1; // (31) 1 ! key
case Qt::Key_2:
case Qt::Key_At:
@@ -290,7 +293,7 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
case Qt::Key_Asterisk:
return VK_8; // (38) 8 key '*'
case Qt::Key_9:
- case Qt::Key_ParenRight:
+ case Qt::Key_ParenLeft:
return VK_9; // (39) 9 key '('
case Qt::Key_A:
return VK_A; // (41) A key case 'a': case 'A': return 0x41;
@@ -375,13 +378,22 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
// VK_BROWSER_SEARCH (AA) Windows 2000/XP: Browser Search key
// VK_BROWSER_FAVORITES (AB) Windows 2000/XP: Browser Favorites key
// VK_BROWSER_HOME (AC) Windows 2000/XP: Browser Start and Home key
- // VK_VOLUME_MUTE (AD) Windows 2000/XP: Volume Mute key
- // VK_VOLUME_DOWN (AE) Windows 2000/XP: Volume Down key
- // VK_VOLUME_UP (AF) Windows 2000/XP: Volume Up key
- // VK_MEDIA_NEXT_TRACK (B0) Windows 2000/XP: Next Track key
- // VK_MEDIA_PREV_TRACK (B1) Windows 2000/XP: Previous Track key
- // VK_MEDIA_STOP (B2) Windows 2000/XP: Stop Media key
- // VK_MEDIA_PLAY_PAUSE (B3) Windows 2000/XP: Play/Pause Media key
+
+ case Qt::Key_VolumeMute:
+ return VK_VOLUME_MUTE; // (AD) Windows 2000/XP: Volume Mute key
+ case Qt::Key_VolumeDown:
+ return VK_VOLUME_DOWN; // (AE) Windows 2000/XP: Volume Down key
+ case Qt::Key_VolumeUp:
+ return VK_VOLUME_UP; // (AF) Windows 2000/XP: Volume Up key
+ case Qt::Key_MediaNext:
+ return VK_MEDIA_NEXT_TRACK; // (B0) Windows 2000/XP: Next Track key
+ case Qt::Key_MediaPrevious:
+ return VK_MEDIA_PREV_TRACK; // (B1) Windows 2000/XP: Previous Track key
+ case Qt::Key_MediaStop:
+ return VK_MEDIA_STOP; // (B2) Windows 2000/XP: Stop Media key
+ case Qt::Key_MediaTogglePlayPause:
+ return VK_MEDIA_PLAY_PAUSE; // (B3) Windows 2000/XP: Play/Pause Media key
+
// VK_LAUNCH_MAIL (B4) Windows 2000/XP: Start Mail key
// VK_LAUNCH_MEDIA_SELECT (B5) Windows 2000/XP: Select Media key
// VK_LAUNCH_APP1 (B6) Windows 2000/XP: Start Application 1 key
@@ -428,10 +440,17 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode, bool isKeypad)
case Qt::Key_BraceRight:
return VK_OEM_6; // case ']': case '}': return 0xDD;
// VK_OEM_7 (DE) Used for miscellaneous characters; it can vary by keyboard. Windows 2000/XP: For the US standard keyboard, the 'single-quote/double-quote' key
+ case Qt::Key_Apostrophe:
case Qt::Key_QuoteDbl:
return VK_OEM_7; // case '\'': case '"': return 0xDE;
// VK_OEM_8 (DF) Used for miscellaneous characters; it can vary by keyboard.
// VK_OEM_102 (E2) Windows 2000/XP: Either the angle bracket key or the backslash key on the RT 102-key keyboard
+
+ case Qt::Key_AudioRewind:
+ return 0xE3; // (E3) Android/GoogleTV: Rewind media key (Windows: VK_ICO_HELP Help key on 1984 Olivetti M24 deluxe keyboard)
+ case Qt::Key_AudioForward:
+ return 0xE4; // (E4) Android/GoogleTV: Fast forward media key (Windows: VK_ICO_00 '00' key on 1984 Olivetti M24 deluxe keyboard)
+
// VK_PROCESSKEY (E5) Windows 95/98/Me, Windows NT 4.0, Windows 2000/XP: IME PROCESS key
// VK_PACKET (E7) Windows 2000/XP: Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT,SendInput, WM_KEYDOWN, and WM_KEYUP
// VK_ATTN (F6) Attn key