Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
5.3.1
-
None
-
QtCreator on Windows and MSVC2013
-
ca4b9f624a41aa656e1d336ea48ec50fe53fa17e
Description
Steps to reproduce:
- create a new Qt Application with Widgets in QtCreator
- add this signal to the MainWidow class (mainwindow.h):
signals: void sigUS_selectionItemChange(std::vector<int> const&); - add this connection in the MainWindow ctor (mainwindow.cpp):
QObject::connect(this, &MainWindow::sigUS_selectionItemChange,
[this](std::vector<int> const&) { }); - Compile the project.
Suggestion to correct: modify qmetatype.h file like this (note the added "static_cast<int>("...")"):
template<typename T>
struct ContainerAPI<QList<T> > : CapabilitiesImpl<QList<T> >
{ static int size(const QList<T> *t)
template<typename T>
struct ContainerAPI<QVector<T> > : CapabilitiesImpl<QVector<T> >
{ static int size(const QVector<T> *t) { return static_cast<int>(t->size()); }
};
template<typename T>
struct ContainerAPI<std::vector<T> > : CapabilitiesImpl<std::vector<T> >
{ static int size(const std::vector<T> *t)
template<typename T>
struct ContainerAPI<std::list<T> > : CapabilitiesImpl<std::list<T> >
{ static int size(const std::list<T> *t) { return static_cast<int>(t->size()); }
};