summaryrefslogtreecommitdiffstats
path: root/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2016-05-14 23:07:21 (GMT)
committerBritney Fransen <brfransen@gmail.com>2016-05-14 23:07:21 (GMT)
commit14c5449e276daca15bf2280d73976ef62c84f6fd (patch)
tree79b0cd2289f55918bd3e119a37cfcf812408d77c /abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp
parent4eaadadcacd43380816f9ad14a1c7a9900e319ee (diff)
downloadlinhes_pkgbuild-R8.4.zip
linhes_pkgbuild-R8.4.tar.gz
linhes_pkgbuild-R8.4.tar.bz2
mythinstall: fix memory detection for swap sizingR8.4
Diffstat (limited to 'abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp')
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp
index 9fa3b1a..96866dc 100755
--- a/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp
@@ -6,7 +6,6 @@
#include <qdir.h>
#include "mv_common.h"
-
int mythinstalltype (QString tmp_install_drive)
{
@@ -97,17 +96,21 @@ static HostSpinBox *HOSTSWAPsize()
line = t.readLine();
if ( line.startsWith("MemTotal:"))
{
- currentitem = line.trimmed();
+ currentitem = line.simplified();
currentitem = currentitem.section( " ", 1, 1 );
}
}
file.close();
bool ok;
int mem = currentitem.toInt( &ok, 10 ); // dec == 0, ok == FALSE
+ //QTextStream(stdout) << mem << endl;
mem = mem/1024 ;
+ //QTextStream(stdout) << mem << endl;
+
if ( ! ok )
- mem = 120 ;
- HostSpinBox *gc = new HostSpinBox("HOSTSWAPsize", 128, 128000, 128, true);
+ mem = 257 ;
+ //QTextStream(stdout) << mem << endl;
+ HostSpinBox *gc = new HostSpinBox("HOSTSWAPsize", 256, 256000, 256, true);
gc->setLabel(QObject::tr("Swapspace size (MB)"));
gc->setValue(mem);
gc->setHelpText(QObject::tr("Amount of space allocated for the swap partition." ));