diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index 8cfd1a8f8b8..39c1c46f6e0 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -130,7 +130,7 @@ public: #ifdef Q_COMPILER_INITIALIZER_LISTS inline QList(std::initializer_list args) : d(const_cast(&QListData::shared_null)) - { reserve(args.size()); std::copy(args.begin(), args.end(), std::back_inserter(*this)); } + { reserve(int(args.size())); std::copy(args.begin(), args.end(), std::back_inserter(*this)); } #endif bool operator==(const QList &l) const; inline bool operator!=(const QList &l) const { return !(*this == l); }