Commit 01459c7c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use QVector here

parent baaa000d
Pipeline #22906 passed with stage
in 6 minutes and 47 seconds
......@@ -188,10 +188,10 @@ ImageWithNameList RichTextComposerImages::imagesWithName() const
return retImages;
}
QList< QSharedPointer<EmbeddedImage> > RichTextComposerImages::embeddedImages() const
QVector< QSharedPointer<EmbeddedImage> > RichTextComposerImages::embeddedImages() const
{
const ImageWithNameList normalImages = imagesWithName();
QList< QSharedPointer<EmbeddedImage> > retImages;
QVector< QSharedPointer<EmbeddedImage> > retImages;
retImages.reserve(normalImages.count());
for (const ImageWithNamePtr &normalImage : normalImages) {
retImages.append(createEmbeddedImage(normalImage->image, normalImage->name));
......
......@@ -51,7 +51,7 @@ struct ImageWithName {
typedef QSharedPointer<ImageWithName> ImageWithNamePtr;
typedef QList< ImageWithNamePtr > ImageWithNameList;
typedef QList< QSharedPointer<EmbeddedImage> > ImageList;
typedef QVector< QSharedPointer<EmbeddedImage> > ImageList;
class KPIMTEXTEDIT_EXPORT RichTextComposerImages : public QObject
{
......@@ -87,7 +87,7 @@ public:
void addImageHelper(const QString &imageName, const QImage &image, int width = -1, int height = -1);
Q_REQUIRED_RESULT ImageWithNameList imagesWithName() const;
Q_REQUIRED_RESULT QList<QSharedPointer<EmbeddedImage> > embeddedImages() const;
Q_REQUIRED_RESULT QVector<QSharedPointer<EmbeddedImage> > embeddedImages() const;
Q_REQUIRED_RESULT QList<QTextImageFormat> embeddedImageFormats() const;
void addImageHelper(const QUrl &url, int width = -1, int height = -1);
void insertImage(const QImage &image, const QFileInfo &fileInfo);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment