mirror of
https://bitbucket.org/smil3y/kde-playground.git
synced 2025-02-23 18:32:51 +00:00
kemu: do not save while loading
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
0b6838cd43
commit
3898fad667
2 changed files with 6 additions and 0 deletions
|
@ -216,6 +216,9 @@ void KEmuMainWindow::updateStatus()
|
|||
void KEmuMainWindow::machineSave(const QString ignored)
|
||||
{
|
||||
Q_UNUSED(ignored);
|
||||
if (m_loading) {
|
||||
return;
|
||||
}
|
||||
const QString machine = m_kemuui->machinesList->currentText();
|
||||
kDebug() << "saving machine" << machine;
|
||||
m_settings->setValue(machine + "/cdrom", m_kemuui->CDROMInput->url().prettyUrl());
|
||||
|
@ -240,6 +243,7 @@ void KEmuMainWindow::machineSave(int ignored)
|
|||
|
||||
void KEmuMainWindow::machineLoad(const QString machine)
|
||||
{
|
||||
m_loading = true;
|
||||
kDebug() << "loading machine" << machine;
|
||||
m_kemuui->CDROMInput->setUrl(m_settings->value(machine + "/cdrom").toUrl());
|
||||
m_kemuui->HardDiskInput->setUrl(m_settings->value(machine + "/harddisk").toUrl());
|
||||
|
@ -257,6 +261,7 @@ void KEmuMainWindow::machineLoad(const QString machine)
|
|||
m_kemuui->KVMCheckBox->setChecked(m_settings->value(machine + "/kvm", false).toBool());
|
||||
m_kemuui->ACPICheckBox->setChecked(m_settings->value(machine + "/acpi", false).toBool());
|
||||
m_kemuui->argumentsLineEdit->setText(m_settings->value(machine + "/args").toString());
|
||||
m_loading = false;
|
||||
}
|
||||
|
||||
void KEmuMainWindow::machineChanged(QItemSelection ignored, QItemSelection ignored2)
|
||||
|
|
|
@ -52,6 +52,7 @@ private:
|
|||
Ui_KEmuWindow *m_kemuui;
|
||||
QSettings *m_settings;
|
||||
QHash<QString,QProcess*> m_machines;
|
||||
bool m_loading;
|
||||
};
|
||||
|
||||
#endif // KEMUMAINWINDOW_H
|
Loading…
Add table
Reference in a new issue