summaryrefslogtreecommitdiffstats
path: root/application/pages/LogPage.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/pages/LogPage.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/pages/LogPage.cpp')
-rw-r--r--application/pages/LogPage.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/application/pages/LogPage.cpp b/application/pages/LogPage.cpp
index 892ba324..597554db 100644
--- a/application/pages/LogPage.cpp
+++ b/application/pages/LogPage.cpp
@@ -74,11 +74,22 @@ bool LogPage::shouldDisplay() const
void LogPage::on_btnPaste_clicked()
{
- GuiUtil::uploadPaste(ui->text->toPlainText(), this);
+ //FIXME: turn this into a proper task and move the upload logic out of GuiUtil!
+ write(tr("MultiMC: Log upload triggered at: %1").arg(QDateTime::currentDateTime().toString(Qt::RFC2822Date)), MessageLevel::MultiMC);
+ auto url = GuiUtil::uploadPaste(ui->text->toPlainText(), this);
+ if(!url.isEmpty())
+ {
+ write(tr("MultiMC: Log uploaded to: %1").arg(url), MessageLevel::MultiMC);
+ }
+ else
+ {
+ write(tr("MultiMC: Log upload failed!"), MessageLevel::Error);
+ }
}
void LogPage::on_btnCopy_clicked()
{
+ write(QString("Clipboard copy at: %1").arg(QDateTime::currentDateTime().toString(Qt::RFC2822Date)), MessageLevel::MultiMC);
GuiUtil::setClipboardText(ui->text->toPlainText());
}