From 759c0b5ecf84201f36d44b4e6c46da1886d85dee Mon Sep 17 00:00:00 2001 From: Joaquim Rocha Date: Mon, 15 Nov 2010 13:46:40 +0100 Subject: Fix wrong error assumption when converting "0.0" to double The function qstrtod calls strtod without first resetting the errno but verifying it nonetheless. This could lead to situations where the errno was already set to ERANGE and hence it would mistakenly assume the conversion could not be done right. Merge-request: 2507 Reviewed-by: Harald Fernengel --- src/corelib/tools/qlocale.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index 6b1de5e..2fb3616 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -7308,6 +7308,7 @@ Q_CORE_EXPORT char *qdtoa( double d, int mode, int ndigits, int *decpt, int *sig Q_CORE_EXPORT double qstrtod(const char *s00, const char **se, bool *ok) { + errno = 0; double ret = strtod((char*)s00, (char**)se); if (ok) { if((ret == 0.0l && errno == ERANGE) -- cgit v0.12 From abba37cd0eff959edf2d011842cbf2b36cce8467 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Mon, 15 Nov 2010 13:47:53 +0100 Subject: Improve restoring of miximized window geomertry. Task-number: QTBUG-2064 Follow-up commit to 54865d47cfd, which caused a regression on multi-display systems on Windows. --- src/gui/kernel/qwidget.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index cd1c9f0..7714acb 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -7051,13 +7051,16 @@ bool QWidget::restoreGeometry(const QByteArray &geometry) restoredNormalGeometry.moveTop(qMax(restoredNormalGeometry.top(), availableGeometry.top() + frameHeight)); if (maximized || fullScreen) { - // set geomerty before setting the window state to make - // sure the window is maximized to the right screen. - // Skip on windows: the window is restored into a broken - // half-maximized state. -#ifndef Q_WS_WIN - setGeometry(restoredNormalGeometry); -#endif + // Set the geomerty before setting the maximized/fullscreen + // window state to make sure the window is maximized to the + // correct screen. Clear the window state before setting the + // geometry to prevent a bug where the window is restored to + // an inconsitent state on Windows. + if (desktop->screenNumber(restoredNormalGeometry.center()) != desktop->screenNumber(this)) { + setWindowState(Qt::WindowNoState); + setGeometry(restoredNormalGeometry); + } + Qt::WindowStates ws = windowState(); if (maximized) ws |= Qt::WindowMaximized; -- cgit v0.12 From 136cd834aba49904226f1be6c3077f45db78b0dc Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Thu, 11 Nov 2010 12:50:38 +0100 Subject: Add version information for imported JS benchmarks The benchmarks are subject to change, so it's nice to know which versions are in the Qt repository. --- tests/benchmarks/script/sunspider/tests/VERSION | 1 + tests/benchmarks/script/v8/tests/README.txt | 79 +++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 tests/benchmarks/script/sunspider/tests/VERSION create mode 100644 tests/benchmarks/script/v8/tests/README.txt diff --git a/tests/benchmarks/script/sunspider/tests/VERSION b/tests/benchmarks/script/sunspider/tests/VERSION new file mode 100644 index 0000000..6aa91fb --- /dev/null +++ b/tests/benchmarks/script/sunspider/tests/VERSION @@ -0,0 +1 @@ +SunSpider 0.9.1 diff --git a/tests/benchmarks/script/v8/tests/README.txt b/tests/benchmarks/script/v8/tests/README.txt new file mode 100644 index 0000000..6676f37 --- /dev/null +++ b/tests/benchmarks/script/v8/tests/README.txt @@ -0,0 +1,79 @@ +V8 Benchmark Suite +================== + +This is the V8 benchmark suite: A collection of pure JavaScript +benchmarks that we have used to tune V8. The licenses for the +individual benchmarks are included in the JavaScript files. + +In addition to the benchmarks, the suite consists of the benchmark +framework (base.js), which must be loaded before any of the individual +benchmark files, and two benchmark runners: An HTML version (run.html) +and a standalone JavaScript version (run.js). + + +Changes From Version 1 To Version 2 +=================================== + +For version 2 the crypto benchmark was fixed. Previously, the +decryption stage was given plaintext as input, which resulted in an +error. Now, the decryption stage is given the output of the +encryption stage as input. The result is checked against the original +plaintext. For this to give the correct results the crypto objects +are reset for each iteration of the benchmark. In addition, the size +of the plain text has been increased a little and the use of +Math.random() and new Date() to build an RNG pool has been removed. + +Other benchmarks were fixed to do elementary verification of the +results of their calculations. This is to avoid accidentally +obtaining scores that are the result of an incorrect JavaScript engine +optimization. + + +Changes From Version 2 To Version 3 +=================================== + +Version 3 adds a new benchmark, RegExp. The RegExp benchmark is +generated by loading 50 of the most popular pages on the web and +logging all regexp operations performed. Each operation is given a +weight that is calculated from an estimate of the popularity of the +pages where it occurs and the number of times it is executed while +loading each page. Finally the literal letters in the data are +encoded using ROT13 in a way that does not affect how the regexps +match their input. + + +Changes from Version 3 to Version 4 +=================================== + +The Splay benchmark is a newcomer in version 4. It manipulates a +splay tree by adding and removing data nodes, thus exercising the +memory management subsystem of the JavaScript engine. + +Furthermore, all the unused parts of the Prototype library were +removed from the RayTrace benchmark. This does not affect the running +of the benchmark. + + +Changes from Version 4 to Version 5 +=================================== + +Removed duplicate line in random seed code, and changed the name of +the Object.prototype.inherits function in the DeltaBlue benchmark to +inheritsFrom to avoid name clashes when running in Chromium with +extensions enabled. + + +Changes from Version 5 to Version 6 +=================================== + +Removed dead code from the RayTrace benchmark and fixed a couple of +typos in the DeltaBlue implementation. Changed the Splay benchmark to +avoid converting the same numeric key to a string over and over again +and to avoid inserting and removing the same element repeatedly thus +increasing pressure on the memory subsystem. Changed the RegExp +benchmark to exercise the regular expression engine on different +input strings. + +Furthermore, the benchmark runner was changed to run the benchmarks +for at least a few times to stabilize the reported numbers on slower +machines. -- cgit v0.12 From c592b71d266a8f7a9bbf330fb3cbca168dbe1bfc Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Tue, 16 Nov 2010 11:24:53 +0100 Subject: Use WS_POPUP window style more often on windows. We dont use the WS_POPUP style when one of the following window flags are set (WindowSystemMenuHint, WindowTitleHint, WindowMinMaxButtonsHint WindowCloseButtonHint, WindowContextHelpButtonHint). None of these flags can conflict with this style, hence being removed. Task-number: QTBUG-10589 Reviewed-by: Denis --- src/gui/kernel/qwidget_win.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp index 39ed750..c358b9b 100644 --- a/src/gui/kernel/qwidget_win.cpp +++ b/src/gui/kernel/qwidget_win.cpp @@ -329,18 +329,11 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO if (topLevel) { if ((type == Qt::Window || dialog || tool)) { if (!(flags & Qt::FramelessWindowHint)) { - if (!(flags & Qt::MSWindowsFixedSizeDialogHint)) { + style |= WS_POPUP; + if (!(flags & Qt::MSWindowsFixedSizeDialogHint)) style |= WS_THICKFRAME; - if(!(flags & - ( Qt::WindowSystemMenuHint - | Qt::WindowTitleHint - | Qt::WindowMinMaxButtonsHint - | Qt::WindowCloseButtonHint - | Qt::WindowContextHelpButtonHint))) - style |= WS_POPUP; - } else { - style |= WS_POPUP | WS_DLGFRAME; - } + else + style |= WS_DLGFRAME; } if (flags & Qt::WindowTitleHint) style |= WS_CAPTION; @@ -424,6 +417,14 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO if (!q->testAttribute(Qt::WA_Resized)) { w = sw/2; h = 4*sh/10; + if (extra) { + int dx = rect.right - rect.left; + int dy = rect.bottom - rect.top; + w = qMin(w, extra->maxw + dx); + h = qMin(h, extra->maxh + dy); + w = qMax(w, extra->minw + dx); + h = qMax(h, extra->minh + dy); + } } if (!wasMoved) { x = sw/2 - w/2; -- cgit v0.12 From 17ece99980a2e777131542febfdc6c693e23bfef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Wed, 17 Nov 2010 11:13:57 +0100 Subject: Revert "Improve restoring of miximized window geomertry." This reverts commit abba37cd0eff959edf2d011842cbf2b36cce8467. Test Failure: tst_qwidget::restoreVersion1Geometry (linux-g++-32) --- src/gui/kernel/qwidget.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 7714acb..cd1c9f0 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -7051,16 +7051,13 @@ bool QWidget::restoreGeometry(const QByteArray &geometry) restoredNormalGeometry.moveTop(qMax(restoredNormalGeometry.top(), availableGeometry.top() + frameHeight)); if (maximized || fullScreen) { - // Set the geomerty before setting the maximized/fullscreen - // window state to make sure the window is maximized to the - // correct screen. Clear the window state before setting the - // geometry to prevent a bug where the window is restored to - // an inconsitent state on Windows. - if (desktop->screenNumber(restoredNormalGeometry.center()) != desktop->screenNumber(this)) { - setWindowState(Qt::WindowNoState); - setGeometry(restoredNormalGeometry); - } - + // set geomerty before setting the window state to make + // sure the window is maximized to the right screen. + // Skip on windows: the window is restored into a broken + // half-maximized state. +#ifndef Q_WS_WIN + setGeometry(restoredNormalGeometry); +#endif Qt::WindowStates ws = windowState(); if (maximized) ws |= Qt::WindowMaximized; -- cgit v0.12