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/ScreenshotDialog.cpp | |
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/ScreenshotDialog.cpp')
-rw-r--r-- | gui/dialogs/ScreenshotDialog.cpp | 6 |
1 files changed, 3 insertions, 3 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)); } |