summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-03-27 10:42:08 +0200
committerLiang Qi <liang.qi@qt.io>2017-03-27 10:42:08 +0200
commit7702fe86029c771e641a918baa221b9737c0f18e (patch)
tree8e0795bc4c701518e1c66922f8e8b0cb359da155 /src/plugins
parent1dd54b5647d33416c39fb41fdab560c815356951 (diff)
parent38550c562d918e783bb609622bc8fb46de1bfec4 (diff)
Merge remote-tracking branch 'origin/5.8' into 5.9
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/android/androidjnimain.cpp17
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm2
-rw-r--r--src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm2
-rw-r--r--src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp2
5 files changed, 12 insertions, 13 deletions
diff --git a/src/plugins/platforms/android/androidjnimain.cpp b/src/plugins/platforms/android/androidjnimain.cpp
index 1f681cc1a3..0fabb25233 100644
--- a/src/plugins/platforms/android/androidjnimain.cpp
+++ b/src/plugins/platforms/android/androidjnimain.cpp
@@ -402,11 +402,6 @@ namespace QtAndroid
if (surfaceId == -1)
return;
- QMutexLocker lock(&m_surfacesMutex);
- const auto &it = m_surfaces.find(surfaceId);
- if (it != m_surfaces.end())
- m_surfaces.remove(surfaceId);
-
QJNIEnvironmentPrivate env;
if (!env)
return;
@@ -583,14 +578,18 @@ static void setSurface(JNIEnv *env, jobject /*thiz*/, jint id, jobject jSurface,
{
QMutexLocker lock(&m_surfacesMutex);
const auto &it = m_surfaces.find(id);
- if (it.value() == nullptr) // This should never happen...
- return;
-
if (it == m_surfaces.end()) {
qWarning()<<"Can't find surface" << id;
return;
}
- it.value()->surfaceChanged(env, jSurface, w, h);
+ auto surfaceClient = it.value();
+ if (!surfaceClient) // This should never happen...
+ return;
+
+ surfaceClient->surfaceChanged(env, jSurface, w, h);
+
+ if (!jSurface)
+ m_surfaces.erase(it);
}
static void setDisplayMetrics(JNIEnv */*env*/, jclass /*clazz*/,
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
index 7368aabf7d..35ac7182af 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
@@ -286,7 +286,7 @@ QT_END_NAMESPACE
if (qEnvironmentVariableIsEmpty("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM")) {
if (QSysInfo::macVersion() >= QSysInfo::MV_10_12) {
// Move the application window to front to avoid launching behind the terminal.
- // Ignoring other apps is neccessary (we must ignore the terminal), but makes
+ // Ignoring other apps is necessary (we must ignore the terminal), but makes
// Qt apps play slightly less nice with other apps when lanching from Finder
// (See the activateIgnoringOtherApps docs.)
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
index 41a809cdd2..e39d5e4546 100644
--- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
+++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm
@@ -429,7 +429,7 @@ static QString strippedText(QString s)
{
// Call this functions if mFileMode, mFileOptions,
// mNameFilterDropDownList or mQDirFilter changes.
- // The savepanel does not contain the neccessary functions for this.
+ // The savepanel does not contain the necessary functions for this.
const QFileDialogOptions::FileMode fileMode = mOptions->fileMode();
bool chooseFilesOnly = fileMode == QFileDialogOptions::ExistingFile
|| fileMode == QFileDialogOptions::ExistingFiles;
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
index 91f408e5c2..9dfcb82151 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
@@ -340,7 +340,7 @@ QCocoaIntegration::QCocoaIntegration(const QStringList &paramList)
// from the terminal. On 10.12+ this call has been moved to applicationDidFinishLauching
// to work around issues with loss of focus at startup.
if (QSysInfo::macVersion() < QSysInfo::MV_10_12) {
- // Ignoring other apps is neccessary (we must ignore the terminal), but makes
+ // Ignoring other apps is necessary (we must ignore the terminal), but makes
// Qt apps play slightly less nice with other apps when lanching from Finder
// (See the activateIgnoringOtherApps docs.)
[cocoaApplication activateIgnoringOtherApps : YES];
diff --git a/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp b/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
index 699b058932..8b6ec31400 100644
--- a/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
+++ b/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
@@ -57,7 +57,7 @@
QT_BEGIN_NAMESPACE
-static const char *standardButtonText(int button)
+static QByteArray standardButtonText(int button)
{
return QGtk3Theme::defaultStandardButtonText(button).toUtf8();
}