summaryrefslogtreecommitdiffstats
path: root/gui/dialogs
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-02-25 00:51:24 +0100
committerPetr Mrázek <peterix@gmail.com>2014-02-25 00:51:24 +0100
commitcb5cfe724208beb7d506868fc4e50d9f13e28a53 (patch)
tree527bfd30ef74d5edef055ae6b4258dd2526162d8 /gui/dialogs
parentb1cddb4600db2aa54c9d274466b393fc1e03eba9 (diff)
downloadMultiMC-cb5cfe724208beb7d506868fc4e50d9f13e28a53.tar
MultiMC-cb5cfe724208beb7d506868fc4e50d9f13e28a53.tar.gz
MultiMC-cb5cfe724208beb7d506868fc4e50d9f13e28a53.tar.lz
MultiMC-cb5cfe724208beb7d506868fc4e50d9f13e28a53.tar.xz
MultiMC-cb5cfe724208beb7d506868fc4e50d9f13e28a53.zip
Reorganize all the screenshot files
Diffstat (limited to 'gui/dialogs')
-rw-r--r--gui/dialogs/ScreenshotDialog.cpp16
-rw-r--r--gui/dialogs/ScreenshotDialog.h6
2 files changed, 11 insertions, 11 deletions
diff --git a/gui/dialogs/ScreenshotDialog.cpp b/gui/dialogs/ScreenshotDialog.cpp
index 76f87283..a88c8dfd 100644
--- a/gui/dialogs/ScreenshotDialog.cpp
+++ b/gui/dialogs/ScreenshotDialog.cpp
@@ -7,8 +7,8 @@
#include "ProgressDialog.h"
#include "CustomMessageBox.h"
#include "logic/net/NetJob.h"
-#include "logic/net/ImgurUpload.h"
-#include "logic/net/ImgurAlbumCreation.h"
+#include "logic/screenshots/ImgurUpload.h"
+#include "logic/screenshots/ImgurAlbumCreation.h"
#include "logic/tasks/SequentialTask.h"
ScreenshotDialog::ScreenshotDialog(ScreenshotList *list, QWidget *parent)
@@ -30,10 +30,10 @@ QString ScreenshotDialog::message() const
.arg(m_imgurAlbum->id(), m_imgurAlbum->deleteHash());
}
-QList<ScreenShot *> ScreenshotDialog::selected() const
+QList<ScreenshotPtr> ScreenshotDialog::selected() const
{
- QList<std::shared_ptr<ScreenShot>> list;
- QList<std::shared_ptr<ScreenShot>> first = m_list->screenshots();
+ QList<ScreenshotPtr> list;
+ QList<ScreenshotPtr> first = m_list->screenshots();
for (QModelIndex index : ui->listView->selectionModel()->selectedRows())
{
list.append(first.at(index.row()));
@@ -51,14 +51,14 @@ void ScreenshotDialog::on_uploadBtn_clicked()
}
SequentialTask *task = new SequentialTask(this);
NetJob *job = new NetJob("Screenshot Upload");
- for (std::shared_ptr<ScreenShot> shot : m_uploaded)
+ for (auto shot : m_uploaded)
{
job->addNetAction(ImgurUpload::make(shot));
}
NetJob *albumTask = new NetJob("Imgur Album Creation");
albumTask->addNetAction(m_imgurAlbum = ImgurAlbumCreation::make(m_uploaded));
- task->addTask(std::shared_ptr<NetJob>(job));
- task->addTask(std::shared_ptr<NetJob>(albumTask));
+ task->addTask(NetJobPtr(job));
+ task->addTask(NetJobPtr(albumTask));
ProgressDialog prog(this);
if (prog.exec(task) == QDialog::Accepted)
{
diff --git a/gui/dialogs/ScreenshotDialog.h b/gui/dialogs/ScreenshotDialog.h
index ac95b4f0..29dd6765 100644
--- a/gui/dialogs/ScreenshotDialog.h
+++ b/gui/dialogs/ScreenshotDialog.h
@@ -1,7 +1,7 @@
#pragma once
#include <QDialog>
-#include "logic/lists/ScreenshotList.h"
+#include "logic/screenshots/ScreenshotList.h"
class ImgurAlbumCreation;
@@ -24,7 +24,7 @@ public:
};
QString message() const;
- QList<std::shared_ptr<ScreenShot>> selected() const;
+ QList<ScreenshotPtr> selected() const;
private
slots:
@@ -35,6 +35,6 @@ slots:
private:
Ui::ScreenshotDialog *ui;
ScreenshotList *m_list;
- QList<std::shared_ptr<ScreenShot>> m_uploaded;
+ QList<ScreenshotPtr> m_uploaded;
std::shared_ptr<ImgurAlbumCreation> m_imgurAlbum;
};