[Qt-creator] Problems using c++11 features

Orgad Shaneh orgads at gmail.com
Wed Apr 3 17:28:30 CEST 2013


On Tue, Apr 2, 2013 at 12:49 PM, Prof. Dr.-Ing. Wilhelm Meier <
wilhelm.meier at fh-kl.de> wrote:

> Hi all,
>
> in the following simple example (code and project settings below) using
> c++11-features I heavily miss the autocompletion: the templates of
> <memory> aren't autocompleted as well as the members of the
> std::shared_ptr template and the pointed-to object.
>
> I'm using qtcreator-2.7 and gcc-4.8.0.
>
> Is there any chance to get this working?
>
> ---------------
>
> #include <memory>
> #include <string>
>
> class X
> {
> public:
>      inline std::string name() {
>          return mName;
>      }
> private:
>      std::string mName;
> };
>
> int main()
> {
>      // no completion for std::make_shared
>      auto p1 = std::make_shared<X>();
>      // no completion for member-function
>      p1->name();
>
>      // no completion for std::shared_ptr
>      std::shared_ptr<X> p2 = std::make_shared<X>();
>      // no completion for member-function
>      p2->name();
> }
>
> ----------------------
>
> QT       += core
> QT       -= gui
>
> TARGET = l0002
> CONFIG   += console
> CONFIG   -= app_bundle
>
> TEMPLATE = app
>
> QMAKE_CXXFLAGS += -Wall -Wextra -std=c++11
>
> SOURCES += main.cc
>
> --
> Wilhelm
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
>


Hi,

Template problems (and almost any other code-model problems, at least the
ones I report<https://bugreports.qt-project.org/secure/IssueNavigator.jspa?reset=true&jqlQuery=resolution+%3D+Unresolved+AND+reporter+%3D+orgads+AND+component+%3D+%22C%2FC%2B%2B%2FObj-C%2B%2B+Support%22>)
tend to be ignored (i.e. not even evaluated).

Przemyslaw is doing a great
work<https://codereview.qt-project.org/#q,owner:przemyslaw,n,z>trying
to fix them, but it is far from complete. There is an ongoing
incomplete
patch <https://codereview.qt-project.org/46622> that should fix completion
for stl containers.

- Orgad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20130403/01beaf0b/attachment.html>


More information about the Qt-creator mailing list