Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-27099

Add definition refactoring bug

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • Qt Creator 6.0.2
    • C/C++/Obj-C++ Support

    Description

      For example, I have class

       

      class SerializableClass
      {
        public:
      	SerializableClass(const Poco::Data::RecordSet& recordSet);
      	//// Serializing
      	void Save(rapidjson::Value& json, rapidjson::Document::AllocatorType& allocator) const;
      
        private:
      	...
      };
      

      Then I left click on Save function -> Refactor ->  Add Definition in source file

       

      QtCreator creates definition in my source file but with wrong signature

       

      void SerializableClass::Save(rapidjson::Value &json, rapidjson::GenericDocument::AllocatorType &allocator) const
      {
      	
      }
      

      As you can see rapidjson::Document::AllocatorType becomes rapidjson::GenericDocument::AllocatorType

       

       

      Document -> GenericDocument and it's not the same types

      They have typedef

      typedef GenericDocument<UTF8<> > Document;
      

      So looks like QtC ignores explicit template instantiation and works with GenericDocument as non template class.

       

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            jihadist Anton null
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes