diff options
-rw-r--r-- | gui/dialogs/ScreenshotDialog.cpp | 6 | ||||
-rw-r--r-- | gui/dialogs/ScreenshotDialog.h | 4 | ||||
-rw-r--r-- | logic/lists/ScreenshotList.cpp | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/gui/dialogs/ScreenshotDialog.cpp b/gui/dialogs/ScreenshotDialog.cpp index c62e1d52..76f87283 100644 --- a/gui/dialogs/ScreenshotDialog.cpp +++ b/gui/dialogs/ScreenshotDialog.cpp @@ -32,8 +32,8 @@ QString ScreenshotDialog::message() const QList<ScreenShot *> ScreenshotDialog::selected() const { - QList<ScreenShot *> list; - QList<ScreenShot *> first = m_list->screenshots(); + QList<std::shared_ptr<ScreenShot>> list; + QList<std::shared_ptr<ScreenShot>> first = m_list->screenshots(); for (QModelIndex index : ui->listView->selectionModel()->selectedRows()) { list.append(first.at(index.row())); @@ -51,7 +51,7 @@ void ScreenshotDialog::on_uploadBtn_clicked() } SequentialTask *task = new SequentialTask(this); NetJob *job = new NetJob("Screenshot Upload"); - for (ScreenShot *shot : m_uploaded) + for (std::shared_ptr<ScreenShot> shot : m_uploaded) { job->addNetAction(ImgurUpload::make(shot)); } diff --git a/gui/dialogs/ScreenshotDialog.h b/gui/dialogs/ScreenshotDialog.h index a406d1fe..ac95b4f0 100644 --- a/gui/dialogs/ScreenshotDialog.h +++ b/gui/dialogs/ScreenshotDialog.h @@ -24,7 +24,7 @@ public: }; QString message() const; - QList<ScreenShot *> selected() const; + QList<std::shared_ptr<ScreenShot>> selected() const; private slots: @@ -35,6 +35,6 @@ slots: private: Ui::ScreenshotDialog *ui; ScreenshotList *m_list; - QList<ScreenShot *> m_uploaded; + QList<std::shared_ptr<ScreenShot>> m_uploaded; std::shared_ptr<ImgurAlbumCreation> m_imgurAlbum; }; diff --git a/logic/lists/ScreenshotList.cpp b/logic/lists/ScreenshotList.cpp index 9f4ce6b5..eda57a03 100644 --- a/logic/lists/ScreenshotList.cpp +++ b/logic/lists/ScreenshotList.cpp @@ -88,10 +88,10 @@ void ScreenshotList::deleteSelected(ScreenshotDialog *dialog) return; } beginResetModel(); - QList<ScreenShot *>::const_iterator it; + QList<std::shared_ptr<ScreenShot>>::const_iterator it; for (it = screens.cbegin(); it != screens.cend(); it++) { - ScreenShot *shot = *it; + std::shared_ptr<ScreenShot> = *it; if (!QFile(shot->file).remove()) { CustomMessageBox::selectable(dialog, tr("Error!"), |