diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-10-02 00:12:53 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-10-02 00:12:53 +0200 |
commit | ae4216de6101db63a1ec7d817852cad2d10863f5 (patch) | |
tree | 1a565f4381bad632941f46724ae330ea8355bff0 /application/GuiUtil.cpp | |
parent | ac8ff8806137d3f6db35afe54b0ef777c40278ef (diff) | |
download | MultiMC-ae4216de6101db63a1ec7d817852cad2d10863f5.tar MultiMC-ae4216de6101db63a1ec7d817852cad2d10863f5.tar.gz MultiMC-ae4216de6101db63a1ec7d817852cad2d10863f5.tar.lz MultiMC-ae4216de6101db63a1ec7d817852cad2d10863f5.tar.xz MultiMC-ae4216de6101db63a1ec7d817852cad2d10863f5.zip |
GH-719 implement paste.ee API keys
Diffstat (limited to 'application/GuiUtil.cpp')
-rw-r--r-- | application/GuiUtil.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/application/GuiUtil.cpp b/application/GuiUtil.cpp index 442922cd..cc06d711 100644 --- a/application/GuiUtil.cpp +++ b/application/GuiUtil.cpp @@ -11,11 +11,17 @@ #include "MultiMC.h" #include <settings/SettingsObject.h> +#include <BuildConfig.h> void GuiUtil::uploadPaste(const QString &text, QWidget *parentWidget) { ProgressDialog dialog(parentWidget); - std::unique_ptr<PasteUpload> paste(new PasteUpload(parentWidget, text)); + auto APIKeySetting = MMC->settings()->get("PasteEEAPIKey").toString(); + if(APIKeySetting == "multimc") + { + APIKeySetting = BuildConfig.PASTE_EE_KEY; + } + std::unique_ptr<PasteUpload> paste(new PasteUpload(parentWidget, text, APIKeySetting)); if (!paste->validateText()) { |