mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 19:36:45 +02:00
Fix bugs in Menu.cpp
This commit is contained in:
parent
aa7d8678e1
commit
aed1ba31c4
1 changed files with 2 additions and 2 deletions
|
@ -104,11 +104,11 @@ Menu::Menu() {
|
||||||
qDebug() << "Selected: " << filename;
|
qDebug() << "Selected: " << filename;
|
||||||
QFile file { filename.path() };
|
QFile file { filename.path() };
|
||||||
if (file.open(QIODevice::ReadOnly)) {
|
if (file.open(QIODevice::ReadOnly)) {
|
||||||
auto fileInfo { filename.path() };
|
QFileInfo fileInfo { filename.path() };
|
||||||
auto extension = fileInfo.suffix();
|
auto extension = fileInfo.suffix();
|
||||||
auto data = file.readAll();
|
auto data = file.readAll();
|
||||||
auto assetClient = DependencyManager::get<AssetClient>();
|
auto assetClient = DependencyManager::get<AssetClient>();
|
||||||
assetClient->uploadAsset(data, extension, [this](bool result, QString hash) mutable {
|
assetClient->uploadAsset(data, extension, [this, extension](bool result, QString hash) mutable {
|
||||||
if (result) {
|
if (result) {
|
||||||
QMessageBox::information(this, "Upload Successful", "URL: apt:/" + hash + "." + extension);
|
QMessageBox::information(this, "Upload Successful", "URL: apt:/" + hash + "." + extension);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue