| 81 | } |
| 82 | |
| 83 | void QMakeBuilderPreferences::apply() |
| 84 | { |
| 85 | qCDebug(KDEV_QMAKEBUILDER) << "Saving data"; |
| 86 | QString errormsg; |
| 87 | |
| 88 | if (m_chooserUi->validate(&errormsg)) { |
| 89 | // data is valid: save, once in the build dir's data and also as current data |
| 90 | m_chooserUi->saveConfig(); |
| 91 | KConfigGroup config(m_project->projectConfiguration(), QMakeConfig::CONFIG_GROUP()); |
| 92 | m_chooserUi->saveConfig(config); |
| 93 | config.writeEntry(QMakeConfig::BUILD_FOLDER, m_chooserUi->buildDir()); |
| 94 | } else { |
| 95 | // invalid data: message box |
| 96 | KMessageBox::error(nullptr, errormsg, QStringLiteral("Data is invalid!")); |
| 97 | // FIXME dialog behaves like if save really happened (dialog closes if user click ok) even if changed signal is |
| 98 | // emitted |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | void QMakeBuilderPreferences::validate() |
| 103 | { |
nothing calls this directly
no test coverage detected