From f998e630e74a8921e2e48e84fc0153ff81850def Mon Sep 17 00:00:00 2001 From: Alexandra Cherdantseva Date: Wed, 29 Jan 2020 17:38:41 +0300 Subject: wasm: fix QWasmString::toQString assertion for emscripten 1.39.4 In emscripten 1.39.4 `maxBytesToWrite` argument is required for function `stringToUTF16(str, outPtr, maxBytesToWrite)` Fixes: QTBUG-81728 Change-Id: I634134a30454ae09a9a05593428397b40464b31f Reviewed-by: jian liang Reviewed-by: Lorn Potter --- src/plugins/platforms/wasm/qwasmstring.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/wasm/qwasmstring.cpp b/src/plugins/platforms/wasm/qwasmstring.cpp index 05b571c459..b1be405eeb 100644 --- a/src/plugins/platforms/wasm/qwasmstring.cpp +++ b/src/plugins/platforms/wasm/qwasmstring.cpp @@ -52,9 +52,10 @@ QString QWasmString::toQString(const val &v) val::global("Module")["stringToUTF16"]); static const val length("length"); - result.resize(v[length].as()); + int len = v[length].as(); + result.resize(len); auto ptr = quintptr(result.utf16()); - stringToUTF16(v, val(ptr)); + stringToUTF16(v, val(ptr), val((len + 1) * 2)); return result; } -- cgit v1.2.3 From 2b1068af97f1483b7bdb3d7a9257ab59fc4b2b59 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Thu, 23 Jan 2020 18:28:07 +0100 Subject: Pass QDate and QTime by value in various static and local functions They're value types, so pass them as such. Change-Id: I0dc46c63a3a0e6d859b821362f71390f0148b64c Reviewed-by: Thiago Macieira --- src/plugins/sqldrivers/ibase/qsql_ibase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp index 0f39f6aa0d..3368c74373 100644 --- a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp +++ b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp @@ -250,7 +250,7 @@ static QDateTime fromTimeStamp(char *buffer) return QDateTime(d, t); } -static ISC_TIME toTime(const QTime &t) +static ISC_TIME toTime(QTime t) { static const QTime midnight(0, 0, 0, 0); return (ISC_TIME)midnight.msecsTo(t) * 10; @@ -266,7 +266,7 @@ static QTime fromTime(char *buffer) return t; } -static ISC_DATE toDate(const QDate &t) +static ISC_DATE toDate(QDate t) { static const QDate basedate(1858, 11, 17); ISC_DATE date; -- cgit v1.2.3 From aadf21b25cad7026f07a5fe7bf19fbedfb1866b7 Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Fri, 31 Jan 2020 16:47:46 +0100 Subject: Fix 'the the' typo in comments Change-Id: I00fcb1c2374e7ca168b6240f9d41c0323fb0867c Reviewed-by: Giuseppe D'Angelo --- src/plugins/platforms/ios/qiostextinputoverlay.mm | 2 +- src/plugins/platforms/ios/qiosviewcontroller.mm | 2 +- src/plugins/platforms/wasm/qwasmintegration.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/ios/qiostextinputoverlay.mm b/src/plugins/platforms/ios/qiostextinputoverlay.mm index 0561a826c6..3da4ba5480 100644 --- a/src/plugins/platforms/ios/qiostextinputoverlay.mm +++ b/src/plugins/platforms/ios/qiostextinputoverlay.mm @@ -511,7 +511,7 @@ static void executeBlockWithoutAnimation(Block block) - (void)createLoupe { - // We magnify the the desktop view. But the loupe itself will be added as a child + // We magnify the desktop view. But the loupe itself will be added as a child // of the desktop view's parent, so it doesn't become a part of what we magnify. _loupeLayer = [[self createLoupeLayer] retain]; _loupeLayer.targetView = _desktopView; diff --git a/src/plugins/platforms/ios/qiosviewcontroller.mm b/src/plugins/platforms/ios/qiosviewcontroller.mm index ce2aa96ca5..cd4af46ef7 100644 --- a/src/plugins/platforms/ios/qiosviewcontroller.mm +++ b/src/plugins/platforms/ios/qiosviewcontroller.mm @@ -452,7 +452,7 @@ if (!focusWindow->screen() || focusWindow->screen()->handle() != self.platformScreen) return; - // All decisions are based on the the top level window + // All decisions are based on the top level window focusWindow = qt_window_private(focusWindow)->topLevelWindow(); #ifndef Q_OS_TVOS diff --git a/src/plugins/platforms/wasm/qwasmintegration.cpp b/src/plugins/platforms/wasm/qwasmintegration.cpp index fd53cd0bae..ee3f6afb73 100644 --- a/src/plugins/platforms/wasm/qwasmintegration.cpp +++ b/src/plugins/platforms/wasm/qwasmintegration.cpp @@ -133,7 +133,7 @@ QWasmIntegration::QWasmIntegration() Q_UNUSED(userData); // This resize event is called when the HTML window is resized. Depending - // on the page layout the the canvas(es) might also have been resized, so we + // on the page layout the canvas(es) might also have been resized, so we // update the Qt screen sizes (and canvas render sizes). if (QWasmIntegration *integration = QWasmIntegration::get()) integration->resizeAllScreens(); -- cgit v1.2.3