diff --git a/include/ComboBoxModel.h b/include/ComboBoxModel.h index ed2465cfb..e4088679f 100644 --- a/include/ComboBoxModel.h +++ b/include/ComboBoxModel.h @@ -49,7 +49,7 @@ public: clear(); } - void addItem( const QString& item, std::unique_ptr loader = nullptr ); + void addItem( QString item, std::unique_ptr loader = nullptr ); void clear(); diff --git a/src/core/ComboBoxModel.cpp b/src/core/ComboBoxModel.cpp index 1c7e2d9c5..c91b4483d 100644 --- a/src/core/ComboBoxModel.cpp +++ b/src/core/ComboBoxModel.cpp @@ -27,9 +27,9 @@ -void ComboBoxModel::addItem( const QString& item, std::unique_ptr loader ) +void ComboBoxModel::addItem( QString item, std::unique_ptr loader ) { - m_items.push_back( std::make_pair( item, std::move(loader) ) ); + m_items.emplace_back( std::move(item), std::move(loader) ); setRange( 0, m_items.size() - 1 ); }