Changed: Allow to get size of a directory recursively or not, see #279
This commit is contained in:
parent
2c8409506f
commit
c34414b71e
3 changed files with 5 additions and 5 deletions
|
@ -920,7 +920,7 @@ bool COperationDialog::createAddRemoveEntry()
|
||||||
settings.setValue("DisplayIcon", nativeFullPath + ",0");
|
settings.setValue("DisplayIcon", nativeFullPath + ",0");
|
||||||
settings.setValue("DisplayName", QApplication::applicationName());
|
settings.setValue("DisplayName", QApplication::applicationName());
|
||||||
settings.setValue("DisplayVersion", RYZOM_VERSION);
|
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("InstallDate", QDateTime::currentDateTime().toString("Ymd"));
|
||||||
settings.setValue("InstallLocation", config->getInstallationDirectory());
|
settings.setValue("InstallLocation", config->getInstallationDirectory());
|
||||||
settings.setValue("MajorVersion", versionTokens[0].toInt());
|
settings.setValue("MajorVersion", versionTokens[0].toInt());
|
||||||
|
@ -965,7 +965,7 @@ bool COperationDialog::updateAddRemoveEntry()
|
||||||
QStringList versionTokens = QApplication::applicationVersion().split('.');
|
QStringList versionTokens = QApplication::applicationVersion().split('.');
|
||||||
|
|
||||||
settings.setValue("DisplayVersion", QApplication::applicationVersion());
|
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("MajorVersion", versionTokens[0].toInt());
|
||||||
settings.setValue("MinorVersion", versionTokens[1].toInt());
|
settings.setValue("MinorVersion", versionTokens[1].toInt());
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -243,7 +243,7 @@ void CUninstallDialog::updateSizes()
|
||||||
{
|
{
|
||||||
const CServer &server = config->getServer(it.key());
|
const CServer &server = config->getServer(it.key());
|
||||||
|
|
||||||
qint64 bytes = getDirectorySize(server.getDirectory());
|
qint64 bytes = getDirectorySize(server.getDirectory(), true);
|
||||||
|
|
||||||
emit updateSize(it.value(), qBytesToHumanReadable(bytes));
|
emit updateSize(it.value(), qBytesToHumanReadable(bytes));
|
||||||
|
|
||||||
|
@ -257,7 +257,7 @@ void CUninstallDialog::updateSizes()
|
||||||
{
|
{
|
||||||
const CProfile &profile = config->getProfile(it.key());
|
const CProfile &profile = config->getProfile(it.key());
|
||||||
|
|
||||||
qint64 bytes = getDirectorySize(profile.getDirectory());
|
qint64 bytes = getDirectorySize(profile.getDirectory(), true);
|
||||||
|
|
||||||
emit updateSize(it.value(), qBytesToHumanReadable(bytes));
|
emit updateSize(it.value(), qBytesToHumanReadable(bytes));
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
QString qBytesToHumanReadable(qint64 bytes);
|
QString qBytesToHumanReadable(qint64 bytes);
|
||||||
|
|
||||||
qint64 getDirectorySize(const QString &directory);
|
qint64 getDirectorySize(const QString &directory, bool recursize);
|
||||||
|
|
||||||
// Convert a UTF-8 string to QString
|
// Convert a UTF-8 string to QString
|
||||||
QString qFromUtf8(const std::string &str);
|
QString qFromUtf8(const std::string &str);
|
||||||
|
|
Loading…
Reference in a new issue