Changed: Allow to get size of a directory recursively or not, see #279

This commit is contained in:
kervala 2016-08-14 12:47:56 +02:00
parent ac0bbd0cad
commit d3bb38d363
3 changed files with 5 additions and 5 deletions

View file

@ -920,7 +920,7 @@ bool COperationDialog::createAddRemoveEntry()
settings.setValue("DisplayIcon", nativeFullPath + ",0");
settings.setValue("DisplayName", QApplication::applicationName());
settings.setValue("DisplayVersion", RYZOM_VERSION);
settings.setValue("EstimatedSize", getDirectorySize(config->getInstallationDirectory()));
settings.setValue("EstimatedSize", getDirectorySize(config->getInstallationDirectory(), true));
settings.setValue("InstallDate", QDateTime::currentDateTime().toString("Ymd"));
settings.setValue("InstallLocation", config->getInstallationDirectory());
settings.setValue("MajorVersion", versionTokens[0].toInt());
@ -965,7 +965,7 @@ bool COperationDialog::updateAddRemoveEntry()
QStringList versionTokens = QApplication::applicationVersion().split('.');
settings.setValue("DisplayVersion", QApplication::applicationVersion());
settings.setValue("EstimatedSize", getDirectorySize(config->getInstallationDirectory()));
settings.setValue("EstimatedSize", getDirectorySize(config->getInstallationDirectory(), true));
settings.setValue("MajorVersion", versionTokens[0].toInt());
settings.setValue("MinorVersion", versionTokens[1].toInt());
#endif

View file

@ -243,7 +243,7 @@ void CUninstallDialog::updateSizes()
{
const CServer &server = config->getServer(it.key());
qint64 bytes = getDirectorySize(server.getDirectory());
qint64 bytes = getDirectorySize(server.getDirectory(), true);
emit updateSize(it.value(), qBytesToHumanReadable(bytes));
@ -257,7 +257,7 @@ void CUninstallDialog::updateSizes()
{
const CProfile &profile = config->getProfile(it.key());
qint64 bytes = getDirectorySize(profile.getDirectory());
qint64 bytes = getDirectorySize(profile.getDirectory(), true);
emit updateSize(it.value(), qBytesToHumanReadable(bytes));

View file

@ -30,7 +30,7 @@
QString qBytesToHumanReadable(qint64 bytes);
qint64 getDirectorySize(const QString &directory);
qint64 getDirectorySize(const QString &directory, bool recursize);
// Convert a UTF-8 string to QString
QString qFromUtf8(const std::string &str);