MCPcopy Create free account
hub / github.com/KDE/kdevelop / apply

Method apply

plugins/qmakebuilder/qmakebuilderpreferences.cpp:83–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83void 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
102void QMakeBuilderPreferences::validate()
103{

Callers

nothing calls this directly

Calls 5

writeEntryMethod · 0.80
validateMethod · 0.45
saveConfigMethod · 0.45
projectConfigurationMethod · 0.45
buildDirMethod · 0.45

Tested by

no test coverage detected