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

permissive C++ code in windows specific files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.8.0 Alpha
    • Fix Version/s: 5.8.0 RC
    • Labels:
      None
    • Environment:
      Windows build
    • Commits:
      f46977ae785632e52fc7212265f2e1e0d38565db

      Description

      The Microsoft C++ team uses the latest Qt build as part of our 'real world code' compiler tests. When testing language conformance improvements in the compiler I noticed a few places that will need to change if you use the new /permissive- switch. I am unable to do a pull request because I don't have a corporate contribution license, so instead I am writing a bug with a suggested fix.

      Issue 1) Losing const qualifier from string literal (also covered under /Zc:strictStrings)
      src\systeminfo\windows\qwmihelper_win.cpp
      Line 138:
      hres = wbemServices->ExecQuery((BSTR)L"WQL", bstrQuery, //add cast
      WBEM_FLAG_BIDIRECTIONAL | WBEM_FLAG_RETURN_IMMEDIATELY,0,&wbemEnumerator);

      Line 293
      hres = wbemServices->ExecNotificationQueryAsync(
      (BSTR)L"WQL", //add cast
      bstrQuery,
      WBEM_FLAG_SEND_STATUS,
      NULL,
      pStubSink);

      Issue 2) The MSVC compiler extension to treat copy initialization as direct initialization is disabled under /permissive-
      qnetworkinfo_win.cpp line 1082
      for (uint i = 0; i < ssid.uSSIDLength;i++) {
      QString temp ( ssid.ucSSID[i] ); // {} initialization also fixes it
      netname += temp;
      }

        Attachments

        For Gerrit Dashboard: QTBUG-56880
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            mkalinow Maurice Kalinowski
            Reporter:
            phil.christensen Phil Christensen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes