Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imagewriter: Disable customisation of custom IMGs #832

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/imagewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,10 @@ void ImageWriter::clearSavedCustomizationSettings()
_settings.sync();
}

void ImageWriter::disableImageCustomization() {
_initFormat.clear();
}

bool ImageWriter::hasSavedCustomizationSettings()
{
_settings.sync();
Expand Down
1 change: 1 addition & 0 deletions src/imagewriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ class ImageWriter : public QObject

Q_INVOKABLE bool getBoolSetting(const QString &key);
Q_INVOKABLE void setSetting(const QString &key, const QVariant &value);
Q_INVOKABLE void disableImageCustomization();
Q_INVOKABLE void setImageCustomization(const QByteArray &config, const QByteArray &cmdline, const QByteArray &firstrun, const QByteArray &cloudinit, const QByteArray &cloudinitNetwork);
Q_INVOKABLE void setSavedCustomizationSettings(const QVariantMap &map);
Q_INVOKABLE QVariantMap getSavedCustomizationSettings();
Expand Down
1 change: 1 addition & 0 deletions src/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1320,6 +1320,7 @@ ApplicationWindow {

function onFileSelected(file) {
imageWriter.setSrc(file)
imageWriter.disableImageCustomization()
osbutton.text = imageWriter.srcFileName()
ospopup.close()
osswipeview.decrementCurrentIndex()
Expand Down