summaryrefslogtreecommitdiffstats
path: root/application/GuiUtil.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-01-20 03:10:02 +0100
committerPetr Mrázek <peterix@gmail.com>2016-01-20 03:10:02 +0100
commit9fd66b3bb103d668378843766d98a9fe7458d62b (patch)
treeb3ddef636754d10a88e2f45ee25009c71c4f117f /application/GuiUtil.cpp
parent47ea2a71c003bff1c4386b9c189f455f3e6fd973 (diff)
downloadMultiMC-9fd66b3bb103d668378843766d98a9fe7458d62b.tar
MultiMC-9fd66b3bb103d668378843766d98a9fe7458d62b.tar.gz
MultiMC-9fd66b3bb103d668378843766d98a9fe7458d62b.tar.lz
MultiMC-9fd66b3bb103d668378843766d98a9fe7458d62b.tar.xz
MultiMC-9fd66b3bb103d668378843766d98a9fe7458d62b.zip
GH-1362 Put timestamps into the log when it is copied or uploaded
Diffstat (limited to 'application/GuiUtil.cpp')
-rw-r--r--application/GuiUtil.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/application/GuiUtil.cpp b/application/GuiUtil.cpp
index f10095c1..cab3721d 100644
--- a/application/GuiUtil.cpp
+++ b/application/GuiUtil.cpp
@@ -13,7 +13,7 @@
#include <DesktopServices.h>
#include <BuildConfig.h>
-void GuiUtil::uploadPaste(const QString &text, QWidget *parentWidget)
+QString GuiUtil::uploadPaste(const QString &text, QWidget *parentWidget)
{
ProgressDialog dialog(parentWidget);
auto APIKeySetting = MMC->settings()->get("PasteEEAPIKey").toString();
@@ -29,7 +29,7 @@ void GuiUtil::uploadPaste(const QString &text, QWidget *parentWidget)
parentWidget, QObject::tr("Upload failed"),
QObject::tr("The log file is too big. You'll have to upload it manually."),
QMessageBox::Warning)->exec();
- return;
+ return QString();
}
dialog.execWithTask(paste.get());
@@ -37,6 +37,7 @@ void GuiUtil::uploadPaste(const QString &text, QWidget *parentWidget)
{
CustomMessageBox::selectable(parentWidget, QObject::tr("Upload failed"),
paste->failReason(), QMessageBox::Critical)->exec();
+ return QString();
}
else
{
@@ -49,6 +50,7 @@ void GuiUtil::uploadPaste(const QString &text, QWidget *parentWidget)
"the default "
"browser and placed in your clipboard.").arg(link),
QMessageBox::Information)->exec();
+ return link;
}
}