Make skin upload optional
Signed-off-by: Gingeh <39150378+Gingeh@users.noreply.github.com>
This commit is contained in:
parent
b0b8ccfd4a
commit
4dfc01899a
@ -57,6 +57,10 @@ void SkinUploadDialog::on_buttonBox_accepted()
|
||||
{
|
||||
QString fileName;
|
||||
QString input = ui->skinPathTextBox->text();
|
||||
ProgressDialog prog(this);
|
||||
SequentialTask skinUpload;
|
||||
|
||||
if (!input.isEmpty()) {
|
||||
QRegularExpression urlPrefixMatcher(QRegularExpression::anchoredPattern("^([a-z]+)://.+$"));
|
||||
bool isLocalFile = false;
|
||||
// it has an URL prefix -> it is an URL
|
||||
@ -116,9 +120,9 @@ void SkinUploadDialog::on_buttonBox_accepted()
|
||||
{
|
||||
model = SkinUpload::ALEX;
|
||||
}
|
||||
ProgressDialog prog(this);
|
||||
SequentialTask skinUpload;
|
||||
skinUpload.addTask(shared_qobject_ptr<SkinUpload>(new SkinUpload(this, m_acct->accessToken(), FS::read(fileName), model)));
|
||||
}
|
||||
|
||||
auto selectedCape = ui->capeCombo->currentData().toString();
|
||||
if(selectedCape != m_acct->accountData()->minecraftProfile.currentCape) {
|
||||
skinUpload.addTask(shared_qobject_ptr<CapeChange>(new CapeChange(this, m_acct->accessToken(), selectedCape)));
|
||||
|
@ -21,7 +21,11 @@
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="skinPathTextBox"/>
|
||||
<widget class="QLineEdit" name="skinPathTextBox">
|
||||
<property name="placeholderText">
|
||||
<string>Leave empty to keep current skin</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="skinBrowseBtn">
|
||||
|
Loading…
Reference in New Issue
Block a user