[Uml-devel] kdesdk/umbrello/umbrello/dialogs
Sebastian Stein
seb.kde at hpfsc.de
Sun Feb 1 09:00:03 UTC 2004
CVS commit by sstein:
fix bug #73042: code generation ignores output directory
In fact, it ignored all settings before code generation was started. I also re-added the check, if the output directory exists and is writable. I will backport this change to KDE 3.2 in the next days. Please have a look at the function CodeGenerationWizard::generator()! What was the purpose of this function? Can we remove it completely???
M +18 -14 codegenerationwizard.cpp 1.14
--- kdesdk/umbrello/umbrello/dialogs/codegenerationwizard.cpp #1.13:1.14
@@ -157,14 +157,19 @@ void CodeGenerationWizard::populateStatu
void CodeGenerationWizard::showPage(QWidget *page) {
if (indexOf(page) == 2)
- {//before advancint to the final page, check that the output directory exists and is
- //writtable
-/*
-// FIX, needed?
- SettingsDlg::CodeGenState codegenState;
- ((CodeGenerationOptionsPage*)QWizard::page(1))->state(codegenState);
- QFileInfo info(codegenState.outputDir);
+ {
+ // first save the settings to the selected generator policy
+ ((CodeGenerationOptionsPage*)QWizard::page(1))->apply();
+
+ // before going on to the final page, check that the output directory exists and is
+ // writable
+
+ // get the policy for the current code generator
+ CodeGenerationPolicy *policy = m_doc->getCurrentCodeGenerator()->getPolicy();
+
+ // get the output directory path
+ QFileInfo info(policy->getOutputDirectory().absPath());
if(!info.exists())
{
- if(KMessageBox::questionYesNo(this,
+ if (KMessageBox::questionYesNo(this,
i18n("The directory %1 does not exist. Do you want to create it now?").arg(info.filePath()),
i18n("Output Directoy Does Not Exist")) == KMessageBox::Yes)
@@ -185,6 +190,6 @@ void CodeGenerationWizard::showPage(QWid
return;
}
- }
- {//directory exists.. make sure we can write to it
+ } else {
+ //directory exists.. make sure we can write to it
if(!info.isWritable())
{
@@ -202,5 +207,4 @@ void CodeGenerationWizard::showPage(QWid
}
}
-*/
}
populateStatusList();
More information about the umbrello-devel
mailing list