mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-21 00:18:43 +00:00
Changed: Allow to get size of a directory recursively or not, see #279
This commit is contained in:
parent
ac0bbd0cad
commit
d3bb38d363
3 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue