Some checks failed
CodeQL Code Scanning / CodeQL (push) Has been cancelled
Build Application / Build Debug (push) Has been cancelled
Nix / Build (${{ matrix.system }}) (macos-13, x86_64-darwin) (push) Has been cancelled
Nix / Build (${{ matrix.system }}) (macos-14, aarch64-darwin) (push) Has been cancelled
Nix / Build (${{ matrix.system }}) (ubuntu-22.04, x86_64-linux) (push) Has been cancelled
Nix / Build (${{ matrix.system }}) (ubuntu-22.04-arm, aarch64-linux) (push) Has been cancelled
Update Flake Lockfile / update-flake (push) Has been cancelled
38 lines
951 B
C++
Executable File
38 lines
951 B
C++
Executable File
#include "PasteWizardPage.h"
|
|
#include "ui_PasteWizardPage.h"
|
|
|
|
#include "Application.h"
|
|
#include "net/PasteUpload.h"
|
|
|
|
PasteWizardPage::PasteWizardPage(QWidget* parent) : BaseWizardPage(parent), ui(new Ui::PasteWizardPage)
|
|
{
|
|
ui->setupUi(this);
|
|
}
|
|
|
|
PasteWizardPage::~PasteWizardPage()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void PasteWizardPage::initializePage() {}
|
|
|
|
bool PasteWizardPage::validatePage()
|
|
{
|
|
auto s = APPLICATION->settings();
|
|
QString prevPasteURL = s->get("PastebinURL").toString();
|
|
s->reset("PastebinURL");
|
|
if (ui->previousSettingsRadioButton->isChecked()) {
|
|
bool usingDefaultBase = prevPasteURL == PasteUpload::PasteTypes.at(PasteUpload::PasteType::NullPointer).defaultBase;
|
|
s->set("PastebinType", PasteUpload::PasteType::NullPointer);
|
|
if (!usingDefaultBase)
|
|
s->set("PastebinCustomAPIBase", prevPasteURL);
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
void PasteWizardPage::retranslate()
|
|
{
|
|
ui->retranslateUi(this);
|
|
}
|