Merge pull request #913 from Gingeh/cape-without-skin
This commit is contained in:
commit
56085310cb
@ -57,6 +57,10 @@ void SkinUploadDialog::on_buttonBox_accepted()
|
|||||||
{
|
{
|
||||||
QString fileName;
|
QString fileName;
|
||||||
QString input = ui->skinPathTextBox->text();
|
QString input = ui->skinPathTextBox->text();
|
||||||
|
ProgressDialog prog(this);
|
||||||
|
SequentialTask skinUpload;
|
||||||
|
|
||||||
|
if (!input.isEmpty()) {
|
||||||
QRegularExpression urlPrefixMatcher(QRegularExpression::anchoredPattern("^([a-z]+)://.+$"));
|
QRegularExpression urlPrefixMatcher(QRegularExpression::anchoredPattern("^([a-z]+)://.+$"));
|
||||||
bool isLocalFile = false;
|
bool isLocalFile = false;
|
||||||
// it has an URL prefix -> it is an URL
|
// it has an URL prefix -> it is an URL
|
||||||
@ -116,9 +120,9 @@ void SkinUploadDialog::on_buttonBox_accepted()
|
|||||||
{
|
{
|
||||||
model = SkinUpload::ALEX;
|
model = SkinUpload::ALEX;
|
||||||
}
|
}
|
||||||
ProgressDialog prog(this);
|
|
||||||
SequentialTask skinUpload;
|
|
||||||
skinUpload.addTask(shared_qobject_ptr<SkinUpload>(new SkinUpload(this, m_acct->accessToken(), FS::read(fileName), model)));
|
skinUpload.addTask(shared_qobject_ptr<SkinUpload>(new SkinUpload(this, m_acct->accessToken(), FS::read(fileName), model)));
|
||||||
|
}
|
||||||
|
|
||||||
auto selectedCape = ui->capeCombo->currentData().toString();
|
auto selectedCape = ui->capeCombo->currentData().toString();
|
||||||
if(selectedCape != m_acct->accountData()->minecraftProfile.currentCape) {
|
if(selectedCape != m_acct->accountData()->minecraftProfile.currentCape) {
|
||||||
skinUpload.addTask(shared_qobject_ptr<CapeChange>(new CapeChange(this, m_acct->accessToken(), selectedCape)));
|
skinUpload.addTask(shared_qobject_ptr<CapeChange>(new CapeChange(this, m_acct->accessToken(), selectedCape)));
|
||||||
|
@ -21,7 +21,11 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<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>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="skinBrowseBtn">
|
<widget class="QPushButton" name="skinBrowseBtn">
|
||||||
|
Loading…
Reference in New Issue
Block a user