Fixed some bugs.

new_gui
Ivan Loskutov 14 years ago
parent b60323add4
commit a10cc62099

@ -100,8 +100,8 @@ bool CalculateConfig::getNewPartitioning()
MapConfig confDisk;
QProcess cl_install;
qDebug() << "Start cl-install -v --xml --filter (os_disk*|os_device*)";
cl_install.start( "cl-install -v --xml --filter \"(os_disk*|os_device*)\" " );
qDebug() << "Start cl-install -v --xml --filter (os_disk*|os_device*|os_install_disk*)";
cl_install.start( "cl-install -v --xml --filter \"(os_disk*|os_device*|os_install_disk*)\" " );
if ( !cl_install.waitForStarted() )
return false;
@ -147,6 +147,12 @@ bool CalculateConfig::getNewPartitioning()
m_Config.remove("os_disk_size");
m_Config["os_disk_size"] = confDisk["os_disk_size"];
m_Config.remove("os_disk_mount");
m_Config["os_disk_mount"] = confDisk["os_disk_mount"];
m_Config.remove("os_install_disk_perform_format");
m_Config["os_install_disk_perform_format"] = confDisk["os_install_disk_perform_format"];
return true;
}

@ -9,6 +9,9 @@
#include <QDebug>
#include <sys/types.h>
#include <signal.h>
#include "calculateconfig.h"
PageInstall::PageInstall() :
@ -22,7 +25,10 @@ PageInstall::~PageInstall()
{
if ( m_clProc )
{
m_clProc->kill();
qDebug() << "Terminate cl-install";
//m_clProc->terminate();
::kill( m_clProc->pid(), SIGINT);
m_clProc->waitForFinished(1000);
delete m_clProc;
m_clProc = 0;
}
@ -136,7 +142,7 @@ void PageInstall::onError(QProcess::ProcessError error)
{
m_Progress->setMinimum(0);
m_Progress->setMaximum(100);
qDebug() << "failed to run process 'calculate' error=" << error ;
qDebug() << "failed to run process 'cl-install' error=" << error ;
onFinish(-error);
}
@ -146,6 +152,12 @@ void PageInstall::showStdOut()
{
QString str = m_clProc->readAllStandardOutput();
QFile std_log("/var/log/calculate/cl-install-gui_stdlog.txt");
if ( std_log.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append) )
{
std_log.write( (str + "\n").toLocal8Bit() );
}
// skip fan (/|\-)
str.replace("\x08/", "");
str.replace("\x08\\", "");

@ -108,6 +108,8 @@ void PageMountPoints::retranslateUi()
void PageMountPoints::show()
{
// get from CalculateConfig
getPartitions();
showMountPoints();
m_tabMountPoints->setColumnWidth(0, 110);
@ -328,6 +330,7 @@ void PageMountPoints::getPartitions()
CalculateConfig* clConf = CalculateConfig::instance();
QStringList os_disk_dev = clConf->getValue("os_disk_dev").toStringList();
QStringList os_disk_format = clConf->getValue("os_disk_format").toStringList();
QStringList os_disk_name = clConf->getValue("os_disk_name").toStringList();

Loading…
Cancel
Save