Merge pull request #528 from flowln/guo_ext
This commit is contained in:
commit
8dd68580a6
@ -100,7 +100,8 @@ void SkinUploadDialog::on_buttonBox_accepted()
|
|||||||
|
|
||||||
void SkinUploadDialog::on_skinBrowseBtn_clicked()
|
void SkinUploadDialog::on_skinBrowseBtn_clicked()
|
||||||
{
|
{
|
||||||
QString raw_path = QFileDialog::getOpenFileName(this, tr("Select Skin Texture"), QString(), "*.png");
|
auto filter = QMimeDatabase().mimeTypeForName("image/png").filterString();
|
||||||
|
QString raw_path = QFileDialog::getOpenFileName(this, tr("Select Skin Texture"), QString(), filter);
|
||||||
if (raw_path.isEmpty() || !QFileInfo::exists(raw_path))
|
if (raw_path.isEmpty() || !QFileInfo::exists(raw_path))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -143,7 +143,8 @@ void ImportPage::setUrl(const QString& url)
|
|||||||
|
|
||||||
void ImportPage::on_modpackBtn_clicked()
|
void ImportPage::on_modpackBtn_clicked()
|
||||||
{
|
{
|
||||||
const QUrl url = QFileDialog::getOpenFileUrl(this, tr("Choose modpack"), modpackUrl(), tr("Zip (*.zip)"));
|
auto filter = QMimeDatabase().mimeTypeForName("application/zip").filterString();
|
||||||
|
const QUrl url = QFileDialog::getOpenFileUrl(this, tr("Choose modpack"), modpackUrl(), filter);
|
||||||
if (url.isValid())
|
if (url.isValid())
|
||||||
{
|
{
|
||||||
if (url.isLocalFile())
|
if (url.isLocalFile())
|
||||||
|
Loading…
Reference in New Issue
Block a user