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

assistants clucene does not compile with vs2015rc

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.5.0 Alpha
    • Fix Version/s: 5.5.0
    • Component/s: Tools: Assistant
    • Labels:
      None
    • Environment:
      windows7, vs2015rc, Qt 5.5 beta
    • Commits:
      2eeed409e3fed0f0681f128166ac3b3b3fabd57f

      Description

      first i got this error
      "<hash_map> is deprecated and will be REMOVED. "
      "Please use <unordered_map>. You can define "
      "_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS "
      "to acknowledge that you have received this warning."
      i fixed that by adding
      win32-msvc2015:DEFINES += _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS

      to clucene.pro

      then i get this error:
      C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene/util/VoidMap.h(228): error C2923: 'std::map': 'std::_Tree<std::_Tmap_traits<_K
      ty,_Ty,_Pr,_Alloc,false>>::_Compare' is not a valid template type argument for parameter '_Pr'
      with
      [
      _Kty=lucene::index::IndexReader::CloseCallback,
      _Ty=void *,
      _Pr=std::greater<lucene::index::IndexReader::CloseCallback>,
      _Alloc=std::allocator<std::pair<const lucene::index::IndexReader::CloseCallback ,void *>>
      ]
      C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene/index/IndexReader.h(96): note: see reference to class template instantiation '
      lucene::util::CLSet<lucene::index::IndexReader::CloseCallback,void *,std::greater<lucene::index::IndexReader::CloseCallback>,lucene::index::IndexReader::CloseCa
      llbackCompare,lucene::util::Deletor::Dummy>' being compiled
      C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene/util/VoidMap.h(230): error C3203: 'map': unspecialized class template can't be
      used as a template argument for template parameter 'base', expected a real type

      after trying about an 1 hour i suddenly saw :
      td::_Tree<std::_Tmap_traits<_K
      ty,_Ty,_Pr,_Alloc,false>>::_Compare' is not a valid template type

      wow std::_Tree has now _Compare member.
      this clucene stuff violates the the c++ standard by using _+Cpatial Letter and __for its identifiers a lot.

      Names containing double underscore or beginning with an underscore and a capital letter are reserved for implementation (compiler, standard library) and should not be used (e.g. __reserved or _Reserved)
      see http://en.wikipedia.org/wiki/Naming_convention_%28programming%29#C_and_C.2B.2B

      i simply did a search replace s/_Compare/xx_Compare/
      that fixes this.

      at last i got this:
      C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(50): error C2440: '=': cannot convert from 'const char [13
      ]' to 'char *'
      C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(50): note: Conversion from string literal loses const qual
      ifier (see /Zc:strictStrings)
      C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(54): error C2440: '=': cannot convert from 'const char [10
      ]' to 'char *'
      C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(54): note: Conversion from string literal loses const qual
      ifier (see /Zc:strictStrings)
      C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(58): error C2440: '=': cannot convert from 'const char [8]
      ' to 'char *'
      C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(58): note: Conversion from string literal loses const qual
      ifier (see /Zc:strictStrings)
      C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(62): error C2440: '=': cannot convert from 'const char [8]
      ' to 'char *'
      C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(62): note: Conversion from string literal loses const qual
      ifier (see /Zc:strictStrings)
      C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(66): error C2440: '=': cannot convert from 'const char [14
      ]' to 'char *'
      C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(66): note: Conversion from string literal loses const qual
      ifier (see /Zc:strictStrings)
      C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(70): error C2440: '=': cannot convert from 'const char [5]
      ' to 'char *'
      C:\RTIL\Shared\Qt\5.5.0\qt-src\qttools\src\assistant\3rdparty\clucene\src\CLucene\debug\condition.cpp(70): note: Conversion from string literal loses const qual
      ifier (see /Zc:strictStrings)

      that is fixed by changing line 40 in condition.cpp from
      char* StrTitle = NULL;
      to
      const char* StrTitle = NULL;

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              heimrich Karsten Heimrich
              Reporter:
              gunnar.roth Gunnar Roth
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes