Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-31988

javascript "switch" statement can not go into correct case block with MinGW 32bit in release

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P1: Critical P1: Critical
    • 5.2.0
    • 5.1.0 RC1
    • WebKit
    • None
    • Win7, qt-windows-opensource-5.1.0-rc1-mingw48_opengl-x86-offline.exe

      The switch statement in javascript sometimes doesn't work correctly in my application built with Qt 5.1 RC.

      switch(A) {
      case B:
      ...
      }

      when A is a string variable from DOM and B is a string literal longer then 3 characters, the code in B block can never be executed even if A===B.

      the attachment test.html shows this bug.

      click button "Test1", the message is always "your selection is **** !?" in default clause which shouldn't be executed.
      click button "Test1.1" or "Test2", the message is "*** selected"

        1. test.html
          2 kB
        2. MinGW48_bug_illustration.diff
          1 kB
        3. bug31988-jsengine-webview.pro
          0.1 kB
        4. bug31988-jsengine-webview.cpp
          0.6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            jturcott Jocelyn Turcotte
            xz xuzhen
            Votes:
            3 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes