work on pasting instance logs
blame clang for formatting changes
This commit is contained in:
@ -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,19 @@ 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())
|
||||
{
|
||||
paste->messageBox()->exec();
|
||||
}
|
||||
else
|
||||
{
|
||||
CustomMessageBox::selectable(this, "Upload failed", paste->failReason(), QMessageBox::Critical)->exec();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user