New Defects reported by Coverity Scan for digiKam

scan-admin at coverity.com scan-admin at coverity.com
Thu Feb 29 07:30:41 GMT 2024


Hi,

Please find the latest report on new defect(s) introduced to digiKam found with Coverity Scan.

195 new defect(s) introduced to digiKam found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 20 of 195 defect(s)


** CID 1592821:    (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/advancedrename/common/highlighter.cpp: 154 in Digikam::Highlighter::setupHighlightingGrammar()()
/home/gilles/Devel/8.x/core/utilities/advancedrename/common/highlighter.cpp: 141 in Digikam::Highlighter::setupHighlightingGrammar()()


________________________________________________________________________________________________________
*** CID 1592821:    (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/advancedrename/common/highlighter.cpp: 154 in Digikam::Highlighter::setupHighlightingGrammar()()
148         modifierFormat.setForeground(Qt::darkGreen);
149     
150         Q_FOREACH (Rule* const modifier, parser->modifiers())
151         {
152             QRegularExpression r    = modifier->regExp();
153             rule.type               = ModifierPattern;
>>>     CID 1592821:    (COPY_INSTEAD_OF_MOVE)
>>>     "r" is copied in a call to copy assignment "operator =", when it could be moved instead.
154             rule.pattern            = r;
155             rule.format             = modifierFormat;
156             highlightingRules.append(rule);
157         }
158     
159         // --------------------------------------------------------
/home/gilles/Devel/8.x/core/utilities/advancedrename/common/highlighter.cpp: 141 in Digikam::Highlighter::setupHighlightingGrammar()()
135         optionFormat.setForeground(Qt::red);
136     
137         Q_FOREACH (Rule* const option, parser->options())
138         {
139             QRegularExpression r    = option->regExp();
140             rule.type               = OptionPattern;
>>>     CID 1592821:    (COPY_INSTEAD_OF_MOVE)
>>>     "r" is copied in a call to copy assignment "operator =", when it could be moved instead.
141             rule.pattern            = r;
142             rule.format             = optionFormat;
143             highlightingRules.append(rule);
144         }
145     
146         // --------------------------------------------------------

** CID 1592820:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/database/tags/tagscache.cpp: 241 in Digikam::TagsCache::Private::checkLabelTags()()


________________________________________________________________________________________________________
*** CID 1592820:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/database/tags/tagscache.cpp: 241 in Digikam::TagsCache::Private::checkLabelTags()()
235                 pickTags[RejectedLabel] = q->getOrCreateInternalTag(InternalTagName::pickLabelRejected());
236                 pickTags[PendingLabel]  = q->getOrCreateInternalTag(InternalTagName::pickLabelPending());
237                 pickTags[AcceptedLabel] = q->getOrCreateInternalTag(InternalTagName::pickLabelAccepted());
238     
239                 QWriteLocker locker(&lock);
240                 needUpdateLabelTags     = false;
>>>     CID 1592820:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "colorTags" is copied in a call to copy assignment "operator =", when it could be moved instead.
241                 colorLabelsTags         = colorTags;
242                 pickLabelsTags          = pickTags;
243             }
244         }
245     
246         // remember to call under lock

** CID 1592819:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/setup/collections/setupcollectionview.cpp: 823 in Digikam::SetupCollectionModel::updateCollection(int)()


________________________________________________________________________________________________________
*** CID 1592819:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/setup/collections/setupcollectionview.cpp: 823 in Digikam::SetupCollectionModel::updateCollection(int)()
817             item.deleted = true;
818     
819             if (askForNewCollectionPath(false, parentId, &path, &label))
820             {
821                 item.parentId = parentId;
822                 item.label    = label;
>>>     CID 1592819:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "path" is copied in a call to copy assignment "operator =", when it could be moved instead.
823                 item.path     = path;
824                 item.updated  = true;
825     
826                 // only workaround for bug 182753
827     
828                 Q_EMIT layoutChanged();

** CID 1592818:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/dplugins/webservices/o2/src/o2simplecrypt.cpp: 85 in O0SimpleCrypt::encryptToByteArray(const QString &)()


________________________________________________________________________________________________________
*** CID 1592818:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/dplugins/webservices/o2/src/o2simplecrypt.cpp: 85 in O0SimpleCrypt::encryptToByteArray(const QString &)()
79         }
80     }
81     
82     QByteArray O0SimpleCrypt::encryptToByteArray(const QString& plaintext)
83     {
84         QByteArray plaintextArray = plaintext.toUtf8();
>>>     CID 1592818:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "plaintextArray" is passed-by-value as parameter to "encryptToByteArray" when it could be moved instead.
85         return encryptToByteArray(plaintextArray);
86     }
87     
88     QByteArray O0SimpleCrypt::encryptToByteArray(QByteArray plaintext)
89     {
90         if (m_keyParts.isEmpty()) {

** CID 1592817:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/database/item/containers/itemposition.cpp: 381 in Digikam::ItemPosition::setLatitude(double)()


________________________________________________________________________________________________________
*** CID 1592817:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/database/item/containers/itemposition.cpp: 381 in Digikam::ItemPosition::setLatitude(double)()
375     
376         if (string.isNull())
377         {
378             return false;
379         }
380     
>>>     CID 1592817:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "string" is copied in a call to copy assignment "operator =", when it could be moved instead.
381         d->latitude       = string;
382         d->latitudeNumber = latitudeNumber;
383         d->dirtyFields   |= DatabaseFields::Latitude | DatabaseFields::LatitudeNumber;
384     
385         return true;
386     }

** CID 1592816:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/dimg/filters/icc/iccprofile.cpp: 165 in Digikam::IccProfile::IccProfile(const char *, const QString &)()


________________________________________________________________________________________________________
*** CID 1592816:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/dimg/filters/icc/iccprofile.cpp: 165 in Digikam::IccProfile::IccProfile(const char *, const QString &)()
159         {
160             qCDebug(DIGIKAM_DIMG_LOG) << "The bundled profile" << relativePath << "cannot be found. Check your installation.";
161             return;
162         }
163     
164         d           = new Private;
>>>     CID 1592816:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "filePath" is copied in a call to copy assignment "operator =", when it could be moved instead.
165         d->filePath = filePath;
166     }
167     
168     IccProfile IccProfile::sRGB()
169     {
170         // The srgb.icm file seems to have a whitepoint of D50, see #133913

** CID 1592815:  Error handling issues  (CHECKED_RETURN)
/home/gilles/Devel/8.x/core/libs/metadataengine/engine/metaengine.cpp: 60 in Digikam::MetaEngine::MetaEngine(const QString &)()


________________________________________________________________________________________________________
*** CID 1592815:  Error handling issues  (CHECKED_RETURN)
/home/gilles/Devel/8.x/core/libs/metadataengine/engine/metaengine.cpp: 60 in Digikam::MetaEngine::MetaEngine(const QString &)()
54     
55     MetaEngine::MetaEngine(const QString& filePath)
56         : d(new Private(this))
57     {
58         // NOTE: use dynamic binding as this virtual method can be re-implemented in derived classes.
59     
>>>     CID 1592815:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "load" without checking return value (as is done elsewhere 9 out of 10 times).
60         this->load(filePath);
61     }
62     
63     MetaEngine::~MetaEngine()
64     {
65         delete d;

** CID 1592814:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/properties/itempropertiescolorstab.cpp: 474 in Digikam::ItemPropertiesColorsTab::loadImageFromUrl(const QUrl &)()


________________________________________________________________________________________________________
*** CID 1592814:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/properties/itempropertiescolorstab.cpp: 474 in Digikam::ItemPropertiesColorsTab::loadImageFromUrl(const QUrl &)()
468         if (d->currentLoadingDescription.equalsOrBetterThan(desc))
469         {
470             return;
471         }
472     
473         d->currentFilePath           = desc.filePath;
>>>     CID 1592814:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "desc" is copied in a call to copy assignment "operator =", when it could be moved instead.
474         d->currentLoadingDescription = desc;
475     
476         d->imageLoaderThread->load(d->currentLoadingDescription,
477                                    SharedLoadSaveThread::AccessModeRead,
478                                    SharedLoadSaveThread::LoadingPolicyFirstRemovePrevious);
479     

** CID 1592813:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/usr/include/aarch64-linux-gnu/qt5/QtCore/qdebug.h: 321 in operator <<<QString>(QDebug, const QSet<T1> &)()


________________________________________________________________________________________________________
*** CID 1592813:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/usr/include/aarch64-linux-gnu/qt5/QtCore/qdebug.h: 321 in operator <<<QString>(QDebug, const QSet<T1> &)()
315         return debug.maybeSpace();
316     }
317     
318     template <typename T>
319     inline QDebug operator<<(QDebug debug, const QSet<T> &set)
320     {
>>>     CID 1592813:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "debug" is passed-by-value as parameter to "printSequentialContainer" when it could be moved instead.
321         return QtPrivate::printSequentialContainer(debug, "QSet", set);
322     }
323     
324     template <class T>
325     inline QDebug operator<<(QDebug debug, const QContiguousCache<T> &cache)
326     {

** CID 1592812:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/tests/metadataengine/metareaderthread_utest.cpp: 263 in MetaReaderThreadTest::testMetaReaderThread()()


________________________________________________________________________________________________________
*** CID 1592812:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/tests/metadataengine/metareaderthread_utest.cpp: 263 in MetaReaderThreadTest::testMetaReaderThread()()
257     
258                 threadsToUse        = conf.value(QLatin1String("ThreadsToUse"), 0).toInt();
259                 QString confFilters = conf.value(QLatin1String("Filters"), QString()).toString();
260     
261                 if (!confFilters.isEmpty())
262                 {
>>>     CID 1592812:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "confFilters" is copied in a call to copy assignment "operator =", when it could be moved instead.
263                     filters = confFilters;
264                 }
265     
266                 QString confPath = conf.value(QLatin1String("Path"), QString()).toString();
267     
268                 if (!confPath.isEmpty())

** CID 1592811:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/database/engine/dbengineparameters.cpp: 835 in Digikam::DbEngineParameters::defaultParameters(const QString &)()


________________________________________________________________________________________________________
*** CID 1592811:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/database/engine/dbengineparameters.cpp: 835 in Digikam::DbEngineParameters::defaultParameters(const QString &)()
829                                                                ? QString::fromLatin1("UNIX_SOCKET=%1/mysql.socket").arg(miscDir)
830                                                                : QString());
831     #endif
832     
833         parameters.hostName                   = hostName;
834         parameters.port                       = port.toInt();
>>>     CID 1592811:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "connectOptions" is copied in a call to copy assignment "operator =", when it could be moved instead.
835         parameters.connectOptions             = connectOptions;
836     
837         qCDebug(DIGIKAM_DBENGINE_LOG) << "ConnectOptions " << parameters.connectOptions;
838     
839         return parameters;
840     }

** CID 1592810:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/settings/applicationsettings.cpp: 98 in Digikam::ApplicationSettings::readSettings()()


________________________________________________________________________________________________________
*** CID 1592810:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/settings/applicationsettings.cpp: 98 in Digikam::ApplicationSettings::readSettings()()
92         KConfigGroup group         = config->group(d->configGroupDefault);
93         QStringList collectionList = group.readEntry(d->configAlbumCollectionsEntry, QStringList());
94     
95         if (!collectionList.isEmpty())
96         {
97             collectionList.sort();
>>>     CID 1592810:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "collectionList" is copied in a call to copy assignment "operator =", when it could be moved instead.
98             d->albumCategoryNames = collectionList;
99         }
100     
101         d->albumSortRole                     = (ApplicationSettings::AlbumSortRole)
102                                                    (group.readEntry(d->configAlbumSortRoleEntry,           (int)ApplicationSettings::ByFolder));
103     

** CID 1592809:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/dplugins/generic/webservices/mediawiki/mediawikiwidget.cpp: 787 in DigikamGenericMediaWikiPlugin::MediaWikiWidget::loadItemInfo(const QUrl &)()


________________________________________________________________________________________________________
*** CID 1592809:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/dplugins/generic/webservices/mediawiki/mediawikiwidget.cpp: 787 in DigikamGenericMediaWikiPlugin::MediaWikiWidget::loadItemInfo(const QUrl &)()
781             longitude = QString::number(info.longitude(), 'f', 9);
782         }
783     
784         QMap<QString, QString> imageMetaData;
785         imageMetaData[QLatin1String("title")]       = title;
786         imageMetaData[QLatin1String("date")]        = date;
>>>     CID 1592809:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "currentCategories" is copied in a call to copy assignment "operator =", when it could be moved instead.
787         imageMetaData[QLatin1String("categories")]  = currentCategories;
788         imageMetaData[QLatin1String("description")] = description;
789         imageMetaData[QLatin1String("latitude")]    = latitude;
790         imageMetaData[QLatin1String("longitude")]   = longitude;
791         d->imagesDescInfo.insert(url.toLocalFile(), imageMetaData);
792     }

** CID 1592808:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/tests/database/haariface_utest.cpp: 222 in HaarIfaceTest::testOriginal()()


________________________________________________________________________________________________________
*** CID 1592808:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/tests/database/haariface_utest.cpp: 222 in HaarIfaceTest::testOriginal()()
216      */
217     void HaarIfaceTest::testOriginal()
218     {
219         AlbumList all                = AlbumManager::instance()->allPAlbums();
220         const auto refImageSelMethod = HaarIface::RefImageSelMethod::OlderOrLarger;
221         AlbumList tags; // empty
>>>     CID 1592808:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "all" is copied in call to copy constructor "QList<Digikam::Album *>", when it could be moved instead.
222         AlbumList searchAlbums       = all;
223         AlbumList referenceAlbums;
224     
225         QHash<ImagePath, QList<ItemInfo>> references;
226         START_SEARCHING_DUPLICATES
227     

** CID 1592807:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/dplugins/widgets/ditemslist_item.cpp: 159 in Digikam::DItemsListViewItem::setThumb(const QPixmap &, bool)()


________________________________________________________________________________________________________
*** CID 1592807:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/dplugins/widgets/ditemslist_item.cpp: 159 in Digikam::DItemsListViewItem::setThumb(const QPixmap &, bool)()
153         int iconSize = qMax<int>(d->view->iconSize().width(), d->view->iconSize().height());
154         QPixmap pixmap(iconSize + 2, iconSize + 2);
155         pixmap.fill(Qt::transparent);
156         QPainter p(&pixmap);
157         p.drawPixmap((pixmap.width()  / 2) - (pix.width()  / 2),
158                      (pixmap.height() / 2) - (pix.height() / 2), pix);
>>>     CID 1592807:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "pixmap" is copied in a call to copy assignment "operator =", when it could be moved instead.
159         d->thumb     = pixmap;
160         setPixmap(d->thumb);
161     
162         d->hasThumb  = hasThumb;
163     }
164     

** CID 1592806:    (COPY_INSTEAD_OF_MOVE)
/usr/include/c++/13/bits/stl_algo.h: 2779 in std::__stable_sort_adaptive_resize<QList<Digikam::ItemInfo>::iterator, Digikam::ItemInfo *, long long, __gnu_cxx::__ops::_Iter_comp_iter<Digikam::LessThanByProximityToSubject>>(T1, T1, T2, T3, T4)()
/usr/include/c++/13/bits/stl_algo.h: 2775 in std::__stable_sort_adaptive_resize<QList<Digikam::ItemInfo>::iterator, Digikam::ItemInfo *, long long, __gnu_cxx::__ops::_Iter_comp_iter<Digikam::LessThanByProximityToSubject>>(T1, T1, T2, T3, T4)()


________________________________________________________________________________________________________
*** CID 1592806:    (COPY_INSTEAD_OF_MOVE)
/usr/include/c++/13/bits/stl_algo.h: 2779 in std::__stable_sort_adaptive_resize<QList<Digikam::ItemInfo>::iterator, Digikam::ItemInfo *, long long, __gnu_cxx::__ops::_Iter_comp_iter<Digikam::LessThanByProximityToSubject>>(T1, T1, T2, T3, T4)()
2773     				       _Distance(__last - __middle),
2774     				       __buffer, __buffer_size,
2775     				       __comp);
2776     	}
2777           else
2778     	std::__stable_sort_adaptive(__first, __middle, __last,
>>>     CID 1592806:    (COPY_INSTEAD_OF_MOVE)
>>>     "__comp" is passed-by-value as parameter to "__stable_sort_adaptive" when it could be moved instead.
2779     				    __buffer, __comp);
2780         }
2781     
2782       /// This is a helper function for the stable sorting routines.
2783       template<typename _RandomAccessIterator, typename _Compare>
2784         void
/usr/include/c++/13/bits/stl_algo.h: 2775 in std::__stable_sort_adaptive_resize<QList<Digikam::ItemInfo>::iterator, Digikam::ItemInfo *, long long, __gnu_cxx::__ops::_Iter_comp_iter<Digikam::LessThanByProximityToSubject>>(T1, T1, T2, T3, T4)()
2769     	  std::__stable_sort_adaptive_resize(__middle, __last, __buffer,
2770     					     __buffer_size, __comp);
2771     	  std::__merge_adaptive_resize(__first, __middle, __last,
2772     				       _Distance(__middle - __first),
2773     				       _Distance(__last - __middle),
2774     				       __buffer, __buffer_size,
>>>     CID 1592806:    (COPY_INSTEAD_OF_MOVE)
>>>     "__comp" is passed-by-value as parameter to "__merge_adaptive_resize" when it could be moved instead.
2775     				       __comp);
2776     	}
2777           else
2778     	std::__stable_sort_adaptive(__first, __middle, __last,
2779     				    __buffer, __comp);
2780         }

** CID 1592805:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/import/main/importui.cpp: 2344 in Digikam::ImportUI::postProcessAfterDownload()()


________________________________________________________________________________________________________
*** CID 1592805:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/import/main/importui.cpp: 2344 in Digikam::ImportUI::postProcessAfterDownload()()
2338             {
2339                 newName = d->renameCustomizer->newName(srcFile);
2340             }
2341     
2342             if (newName == srcInfo.fileName())
2343             {
>>>     CID 1592805:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "orgName" is copied in a call to copy assignment "operator =", when it could be moved instead.
2344                 newName = orgName;
2345             }
2346     
2347             QString dstFile = srcInfo.path() + QLatin1Char('/') + newName;
2348             QFileInfo dstInfo(dstFile);
2349     

** CID 1592804:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/threadimageio/thumb/thumbnailcreator_engine.cpp: 227 in Digikam::ThumbnailCreator::createThumbnail(const Digikam::ThumbnailInfo &, const QRect &) const()


________________________________________________________________________________________________________
*** CID 1592804:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/libs/threadimageio/thumb/thumbnailcreator_engine.cpp: 227 in Digikam::ThumbnailCreator::createThumbnail(const Digikam::ThumbnailInfo &, const QRect &) const()
221         if (colorManage && !profile.isNull())
222         {
223             IccManager::transformToSRGB(qimage, profile);
224         }
225     
226         ThumbnailImage image;
>>>     CID 1592804:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "qimage" is copied in a call to copy assignment "operator =", when it could be moved instead.
227         image.qimage          = qimage;
228         image.exifOrientation = exifOrientation(info, *metadata, fromEmbeddedPreview, fromDetail);
229     
230         return image;
231     }
232     

** CID 1592803:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/imageeditor/editor/editorwindow.cpp: 2142 in Digikam::EditorWindow::startingSaveAs(const QUrl &)()


________________________________________________________________________________________________________
*** CID 1592803:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/home/gilles/Devel/8.x/core/utilities/imageeditor/editor/editorwindow.cpp: 2142 in Digikam::EditorWindow::startingSaveAs(const QUrl &)()
2136         }
2137     
2138         // Now do the actual saving -----------------------------------------------------
2139     
2140         setupTempSaveFile(newURL);
2141     
>>>     CID 1592803:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>>     "newURL" is copied in a call to copy assignment "operator =", when it could be moved instead.
2142         m_savingContext.destinationURL = newURL;
2143         m_savingContext.originalFormat = m_canvas->currentImageFileFormat();
2144         m_savingContext.savingState    = SavingContext::SavingStateSaveAs;
2145         m_savingContext.executedOperation = SavingContext::SavingStateNone;
2146         m_savingContext.abortingSaving = false;
2147     

** CID 1592802:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
/home/gilles/Devel/8.x/core/utilities/geolocation/marble/osm/OsmPlacemarkData.h: 72 in ()


________________________________________________________________________________________________________
*** CID 1592802:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
/home/gilles/Devel/8.x/core/utilities/geolocation/marble/osm/OsmPlacemarkData.h: 72 in ()
66      *
67      * Writing stage:
68      * The OsmObjectManager assigns OsmPlacemarkData objects to placemarks that do not have it
69      * ( these are usually newly created placemarks within the editor, or placemarks loaded from
70      * ".kml" files ). Placemarks that already have it, are simply written as-is.
71      */
>>>     CID 1592802:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
>>>     Class "Marble::OsmPlacemarkData" may benefit from adding a move assignment operator. See other events which show the copy assignment operator being applied to rvalues, where a move assignment may be faster.
72     class DIGIKAM_EXPORT OsmPlacemarkData: public GeoNode
73     {
74     
75     public:
76     
77         OsmPlacemarkData();


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu4yJUfIaFVfulX1EnArvLvmGJ18AyhOhOJnWywYkUuR-2BHL458rbL5b5DiAzhSjilZ8-3DGNWG_wUwU8mg96yc-2FA1IAMQ6mJ-2FFdQ9EM-2BFY-2BXFbSpXNYnfwbpSCN9TJKfbjmojPceUn97Q0Xkx018X-2FRtNJDRyJMme78VhgX24uwMyzXfK3fi2fp6LCTiBupll-2BnFrvQmU2hkvMgg4DHkR7n7PRA4Lta2wWj6Vsh-2BPoFVh3IiYyH4Xrch95f05-2F39LDv4siML-2FJISH9O6gm9zy8Q-2BFL0CUAjpppGAlztHoD5JRI2DG0iXDY-3D



More information about the Digikam-devel mailing list