Browse Source

Fix bug on project property and services list in the wizard

master
Ulrich Van Den Hekke 12 years ago
parent
commit
9bf303bbec
  1. 13
      plugins/core/pluginproperty/searchpathlistprjpageform.cpp
  2. 8
      plugins/services/servicesprojectwizard.cpp
  3. 2
      templates/Generix/generix_with_services.xml
  4. 2
      templates/Generix/generix_without_services.xml

13
plugins/core/pluginproperty/searchpathlistprjpageform.cpp

@ -58,8 +58,9 @@ bool SearchPathListFormImpl::loadSettingsDialog()
{
if (! m_project) return true;
QStringList searchPathList = m_project->readProperty("searchPathList").toString().split(";;"),
searchPathList_fromNativeSeparators;
const QString searchPathListStr = m_project->readProperty("searchPathList").toString();
const QStringList searchPathList = searchPathListStr.split(";;", QString::SkipEmptyParts);
QStringList searchPathList_fromNativeSeparators;
foreach(QString path, searchPathList)
{
@ -74,15 +75,17 @@ bool SearchPathListFormImpl::saveSettingsDialog()
{
if (! m_project) return true;
QStringList searchPathList = m_searchPathList->values(),
searchPathList_toNativeSeparators;
const QStringList searchPathList = m_searchPathList->values();
QStringList searchPathList_toNativeSeparators;
foreach(QString path, searchPathList)
{
searchPathList_toNativeSeparators.append(QDir::toNativeSeparators(path));
}
m_project->writeProperty("searchPathList", m_searchPathList->values()); // toNativeSeparators
const QString searchPathListStr = searchPathList_toNativeSeparators.join(";;");
m_project->writeProperty("searchPathList", searchPathListStr); // toNativeSeparators
return true;
}

8
plugins/services/servicesprojectwizard.cpp

@ -19,6 +19,7 @@
// Xinx header
#include "servicesprojectwizard.h"
#include "servicesprojectpropertyimpl.h"
#include <project/xinxproject.h>
/* ServicesListPageImpl */
@ -53,12 +54,9 @@ bool ServicesListPageImpl::pageIsVisible() const
bool ServicesListPageImpl::saveSettingsDialog(XinxProject * project)
{
project->writeProperty("hasWebServices", true);
QStringList services;
foreach(const QString & value, m_webServicesWidget->values())
services += value;
project->writeProperty("webServiceVersion", WEBSERVICE_VERSION_CURRENT);
const QStringList services = m_webServicesWidget->values();
int index = 0;
foreach(const QString & link, services)

2
templates/Generix/generix_with_services.xml

@ -4,7 +4,7 @@
<Plugin name="GenerixPlugin"/>
</Plugins>
<Properties>
<Property name="searchPathList" value="langue/fra/nav/&lt;project&gt;;;langue/fra/nav;;.;;langue/fra;;langue"/>
<Property name="searchPathList" value="langue/fra/nav;;.;;langue/fra;;langue"/>
</Properties>
<WizardPage>
<Page name="StdProjectName"/>

2
templates/Generix/generix_without_services.xml

@ -3,7 +3,7 @@
<Plugin name="GenerixPlugin"/>
</Plugins>
<Properties>
<Property name="searchPathList" value="langue/fra/nav/&lt;project&gt;;;langue/fra/nav;;.;;langue/fra;;langue"/>
<Property name="searchPathList" value="langue/fra/nav;;.;;langue/fra;;langue"/>
</Properties>
<WizardPage>
<Page name="StdProjectName"/>

Loading…
Cancel
Save