Merge remote-tracking branch 'upstream/develop' into rework-settings
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
commit
618e6bd96b
295 changed files with 11681 additions and 2609 deletions
|
@ -59,10 +59,10 @@ APIPage::APIPage(QWidget* parent) : QWidget(parent), ui(new Ui::APIPage)
|
|||
int comboBoxEntries[] = { PasteUpload::PasteType::Mclogs, PasteUpload::PasteType::NullPointer, PasteUpload::PasteType::PasteGG,
|
||||
PasteUpload::PasteType::Hastebin };
|
||||
|
||||
static QRegularExpression validUrlRegExp("https?://.+");
|
||||
static QRegularExpression validMSAClientID(
|
||||
static const QRegularExpression s_validUrlRegExp("https?://.+");
|
||||
static const QRegularExpression s_validMSAClientID(
|
||||
QRegularExpression::anchoredPattern("[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"));
|
||||
static QRegularExpression validFlameKey(QRegularExpression::anchoredPattern("\\$2[ayb]\\$.{56}"));
|
||||
static const QRegularExpression s_validFlameKey(QRegularExpression::anchoredPattern("\\$2[ayb]\\$.{56}"));
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
|
@ -75,10 +75,10 @@ APIPage::APIPage(QWidget* parent) : QWidget(parent), ui(new Ui::APIPage)
|
|||
// This function needs to be called even when the ComboBox's index is still in its default state.
|
||||
updateBaseURLPlaceholder(ui->pasteTypeComboBox->currentIndex());
|
||||
// NOTE: this allows http://, but we replace that with https later anyway
|
||||
ui->metaURL->setValidator(new QRegularExpressionValidator(validUrlRegExp, ui->metaURL));
|
||||
ui->baseURLEntry->setValidator(new QRegularExpressionValidator(validUrlRegExp, ui->baseURLEntry));
|
||||
ui->msaClientID->setValidator(new QRegularExpressionValidator(validMSAClientID, ui->msaClientID));
|
||||
ui->flameKey->setValidator(new QRegularExpressionValidator(validFlameKey, ui->flameKey));
|
||||
ui->metaURL->setValidator(new QRegularExpressionValidator(s_validUrlRegExp, ui->metaURL));
|
||||
ui->baseURLEntry->setValidator(new QRegularExpressionValidator(s_validUrlRegExp, ui->baseURLEntry));
|
||||
ui->msaClientID->setValidator(new QRegularExpressionValidator(s_validMSAClientID, ui->msaClientID));
|
||||
ui->flameKey->setValidator(new QRegularExpressionValidator(s_validFlameKey, ui->flameKey));
|
||||
|
||||
ui->metaURL->setPlaceholderText(BuildConfig.META_URL);
|
||||
ui->userAgentLineEdit->setPlaceholderText(BuildConfig.USER_AGENT);
|
||||
|
|
|
@ -37,11 +37,11 @@
|
|||
|
||||
#include <Application.h>
|
||||
#include <QObjectPtr.h>
|
||||
#include "ui/widgets/JavaSettingsWidget.h"
|
||||
#include <QDialog>
|
||||
#include <QStringListModel>
|
||||
#include "JavaCommon.h"
|
||||
#include "ui/pages/BasePage.h"
|
||||
#include "ui/widgets/JavaSettingsWidget.h"
|
||||
|
||||
class SettingsObject;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue