mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
clean trailing whitespace
This commit is contained in:
@@ -145,7 +145,7 @@ void CDownloadManager::downloadProgressChanged(qint64 bytesReceived, qint64 byte
|
|||||||
quint64 received = 0;
|
quint64 received = 0;
|
||||||
for(auto & entry : currentDownloads)
|
for(auto & entry : currentDownloads)
|
||||||
received += entry.bytesReceived > 0 ? entry.bytesReceived : 0;
|
received += entry.bytesReceived > 0 ? entry.bytesReceived : 0;
|
||||||
|
|
||||||
if(received > total)
|
if(received > total)
|
||||||
total = received;
|
total = received;
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ void CModListView::setupModsView()
|
|||||||
ui->allModsView->setUniformRowHeights(true);
|
ui->allModsView->setUniformRowHeights(true);
|
||||||
|
|
||||||
ui->allModsView->setContextMenuPolicy(Qt::CustomContextMenu);
|
ui->allModsView->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
|
|
||||||
connect(ui->allModsView, SIGNAL(customContextMenuRequested(const QPoint &)),
|
connect(ui->allModsView, SIGNAL(customContextMenuRequested(const QPoint &)),
|
||||||
this, SLOT(onCustomContextMenu(const QPoint &)));
|
this, SLOT(onCustomContextMenu(const QPoint &)));
|
||||||
|
|
||||||
@@ -332,7 +332,7 @@ QString CModListView::genModInfoText(const ModState & mod)
|
|||||||
|
|
||||||
if((!mod.isInstalled() || mod.isUpdateAvailable()) && !mod.getDownloadSizeFormatted().isEmpty())
|
if((!mod.isInstalled() || mod.isUpdateAvailable()) && !mod.getDownloadSizeFormatted().isEmpty())
|
||||||
result += replaceIfNotEmpty(mod.getDownloadSizeFormatted(), lineTemplate.arg(tr("Download size")));
|
result += replaceIfNotEmpty(mod.getDownloadSizeFormatted(), lineTemplate.arg(tr("Download size")));
|
||||||
|
|
||||||
result += replaceIfNotEmpty(mod.getAuthors(), lineTemplate.arg(tr("Authors")));
|
result += replaceIfNotEmpty(mod.getAuthors(), lineTemplate.arg(tr("Authors")));
|
||||||
|
|
||||||
if(!mod.getLicenseName().isEmpty())
|
if(!mod.getLicenseName().isEmpty())
|
||||||
@@ -750,7 +750,7 @@ void CModListView::on_uninstallButton_clicked()
|
|||||||
QString modName = ui->allModsView->currentIndex().data(ModRoles::ModNameRole).toString();
|
QString modName = ui->allModsView->currentIndex().data(ModRoles::ModNameRole).toString();
|
||||||
|
|
||||||
doUninstallMod(modName);
|
doUninstallMod(modName);
|
||||||
|
|
||||||
checkManagerErrors();
|
checkManagerErrors();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -845,13 +845,13 @@ void CModListView::downloadFinished(QStringList savedFiles, QStringList failedFi
|
|||||||
enqueuedModDownloads.clear();
|
enqueuedModDownloads.clear();
|
||||||
dlManager->deleteLater();
|
dlManager->deleteLater();
|
||||||
dlManager = nullptr;
|
dlManager = nullptr;
|
||||||
|
|
||||||
ui->progressBar->setMaximum(0);
|
ui->progressBar->setMaximum(0);
|
||||||
ui->progressBar->setValue(0);
|
ui->progressBar->setValue(0);
|
||||||
|
|
||||||
if(doInstallFiles)
|
if(doInstallFiles)
|
||||||
installFiles(savedFiles);
|
installFiles(savedFiles);
|
||||||
|
|
||||||
hideProgressBar();
|
hideProgressBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -986,13 +986,13 @@ void CModListView::installFiles(QStringList files)
|
|||||||
ce.installChronicles(exe);
|
ce.installChronicles(exe);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
while(futureExtract.wait_for(std::chrono::milliseconds(10)) != std::future_status::ready)
|
while(futureExtract.wait_for(std::chrono::milliseconds(10)) != std::future_status::ready)
|
||||||
{
|
{
|
||||||
extractionProgress(static_cast<int>(prog * 1000.f), 1000);
|
extractionProgress(static_cast<int>(prog * 1000.f), 1000);
|
||||||
qApp->processEvents();
|
qApp->processEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(futureExtract.get())
|
if(futureExtract.get())
|
||||||
{
|
{
|
||||||
hideProgressBar();
|
hideProgressBar();
|
||||||
@@ -1062,7 +1062,7 @@ void CModListView::installMods(QStringList archives)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
reload(lastInstalled);
|
reload(lastInstalled);
|
||||||
|
|
||||||
if (!modsToEnable.empty())
|
if (!modsToEnable.empty())
|
||||||
{
|
{
|
||||||
@@ -1266,7 +1266,7 @@ void CModListView::loadScreenshots()
|
|||||||
|
|
||||||
if (!ui->allModsView->currentIndex().isValid())
|
if (!ui->allModsView->currentIndex().isValid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ui->screenshotsList->clear();
|
ui->screenshotsList->clear();
|
||||||
QString modName = ui->allModsView->currentIndex().data(ModRoles::ModNameRole).toString();
|
QString modName = ui->allModsView->currentIndex().data(ModRoles::ModNameRole).toString();
|
||||||
assert(modStateModel->isModExists(modName)); //should be filtered out by check above
|
assert(modStateModel->isModExists(modName)); //should be filtered out by check above
|
||||||
@@ -1404,10 +1404,10 @@ void CModListView::on_allModsView_doubleClicked(const QModelIndex &index)
|
|||||||
{
|
{
|
||||||
if(!index.isValid())
|
if(!index.isValid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto modName = index.data(ModRoles::ModNameRole).toString();
|
auto modName = index.data(ModRoles::ModNameRole).toString();
|
||||||
auto mod = modStateModel->getMod(modName);
|
auto mod = modStateModel->getMod(modName);
|
||||||
|
|
||||||
QStringList notInstalledDependencies = this->getModsToInstall(mod.getID());
|
QStringList notInstalledDependencies = this->getModsToInstall(mod.getID());
|
||||||
QStringList unavailableDependencies = this->findUnavailableMods(notInstalledDependencies);
|
QStringList unavailableDependencies = this->findUnavailableMods(notInstalledDependencies);
|
||||||
|
|
||||||
@@ -1422,14 +1422,14 @@ void CModListView::on_allModsView_doubleClicked(const QModelIndex &index)
|
|||||||
on_updateButton_clicked();
|
on_updateButton_clicked();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(index.column() == ModFields::NAME)
|
if(index.column() == ModFields::NAME)
|
||||||
{
|
{
|
||||||
if(ui->allModsView->isExpanded(index))
|
if(ui->allModsView->isExpanded(index))
|
||||||
ui->allModsView->collapse(index);
|
ui->allModsView->collapse(index);
|
||||||
else
|
else
|
||||||
ui->allModsView->expand(index);
|
ui->allModsView->expand(index);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user