diff options
author | robotbrain <robotbrainify@gmail.com> | 2014-02-24 17:49:18 -0500 |
---|---|---|
committer | robotbrain <robotbrainify@gmail.com> | 2014-02-24 17:49:18 -0500 |
commit | b1cddb4600db2aa54c9d274466b393fc1e03eba9 (patch) | |
tree | 48d24295fc53a65d046aea95b7dee170f5ebd66f /gui/dialogs | |
parent | 55e21737dd7d30c1922615c575384b41cc77985f (diff) | |
download | MultiMC-b1cddb4600db2aa54c9d274466b393fc1e03eba9.tar MultiMC-b1cddb4600db2aa54c9d274466b393fc1e03eba9.tar.gz MultiMC-b1cddb4600db2aa54c9d274466b393fc1e03eba9.tar.lz MultiMC-b1cddb4600db2aa54c9d274466b393fc1e03eba9.tar.xz MultiMC-b1cddb4600db2aa54c9d274466b393fc1e03eba9.zip |
Fix memory leak in system
Diffstat (limited to 'gui/dialogs')
-rw-r--r-- | gui/dialogs/ScreenshotDialog.cpp | 6 | ||||
-rw-r--r-- | gui/dialogs/ScreenshotDialog.h | 4 |
2 files changed, 5 insertions, 5 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; }; |