summaryrefslogtreecommitdiffstats
path: root/gui/ConsoleWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/ConsoleWindow.cpp')
-rw-r--r--gui/ConsoleWindow.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/gui/ConsoleWindow.cpp b/gui/ConsoleWindow.cpp
index d0210df6..5db4442e 100644
--- a/gui/ConsoleWindow.cpp
+++ b/gui/ConsoleWindow.cpp
@@ -22,6 +22,9 @@
#include <gui/Platform.h>
#include <gui/dialogs/CustomMessageBox.h>
+#include <gui/dialogs/ProgressDialog.h>
+
+#include "logic/net/PasteUpload.h"
ConsoleWindow::ConsoleWindow(MinecraftProcess *mcproc, QWidget *parent)
: QMainWindow(parent), ui(new Ui::ConsoleWindow), proc(mcproc)
@@ -179,3 +182,15 @@ void ConsoleWindow::onLaunchFailed(BaseInstance *instance)
if(!isVisible())
show();
}
+
+void ConsoleWindow::on_btnPaste_clicked()
+{
+ auto text = ui->text->toPlainText();
+ ProgressDialog dialog(this);
+ PasteUpload* paste=new PasteUpload(this, text);
+ dialog.exec(paste);
+ if(!paste->successful())
+ {
+ CustomMessageBox::selectable(this, "Upload failed", paste->failReason(), QMessageBox::Critical)->exec();
+ }
+}