#include <utils/projectintropage.h>
#include <QtCore/QDebug>
+#include <QtCore/QDir>
#include <QtGui/QComboBox>
#include <QtGui/QLabel>
// If there was no Symbian target defined we omit "Symbian specific" step
// We also omit this step if the library type is not dll
- if (symbianTargetEnabled && type() == QtProjectParameters::SharedLibrary)
+ if (symbianTargetEnabled
+ && (type() == QtProjectParameters::SharedLibrary
+ || type() == QtProjectParameters::Qt4Plugin))
next = m_mobilePageId;
if (next == m_modulesPageId)
void LibraryWizardDialog::setupMobilePage()
{
m_mobilePage->setSymbianUid(AbstractMobileApp::symbianUidForPath(path()+projectName()));
+
+ if (type() == QtProjectParameters::Qt4Plugin)
+ m_mobilePage->setQtPluginDirectory(projectName());
m_mobilePage->setLibraryType(type());
}
if (mlp.type & MobileLibraryParameters::Symbian) {
mlp.symbianUid = m_mobilePage->symbianUid();
+ mlp.qtPluginDirectory = m_mobilePage->qtPluginDirectory();
mlp.symbianCapabilities |= m_mobilePage->networkEnabled()?MobileLibraryParameters::NetworkServices:0;
}
<rect>
<x>0</x>
<y>0</y>
- <width>400</width>
- <height>300</height>
+ <width>315</width>
+ <height>116</height>
</rect>
</property>
<property name="windowTitle">
#include "qtprojectparameters.h"
#include <QtCore/QTextStream>
+#include <QtCore/QDir>
namespace Qt4ProjectManager {
namespace Internal {
void MobileLibraryParameters::writeSymbianProFile(QTextStream &str) const
{
- if (libraryType != QtProjectParameters::SharedLibrary)
- return; //nothing to do when the library is not a shared library
-
- str << "\n"
- "symbian {\n"
- " MMP_RULES += EXPORTUNFROZEN\n"
- " TARGET.UID3 = " + symbianUid + "\n"
- " TARGET.CAPABILITY = " + generateCapabilitySet(symbianCapabilities).toAscii() + "\n"
- " TARGET.EPOCALLOWDLLDATA = 1\n"
- " addFiles.sources = " + fileName + ".dll\n"
- " addFiles.path = !:/sys/bin\n"
- " DEPLOYMENT += addFiles\n"
- "}\n";
+ if (libraryType == QtProjectParameters::SharedLibrary) {
+ str << "\n"
+ "symbian {\n"
+ " MMP_RULES += EXPORTUNFROZEN\n"
+ " TARGET.UID3 = " + symbianUid + "\n"
+ " TARGET.CAPABILITY = " + generateCapabilitySet(symbianCapabilities).toAscii() + "\n"
+ " TARGET.EPOCALLOWDLLDATA = 1\n"
+ " addFiles.sources = " + fileName + ".dll\n"
+ " addFiles.path = !:/sys/bin\n"
+ " DEPLOYMENT += addFiles\n"
+ "}\n";
+ } else if (libraryType == QtProjectParameters::Qt4Plugin) {
+ str << "\n"
+ "symbian {\n"
+ "# Load predefined include paths (e.g. QT_PLUGINS_BASE_DIR) to be used in the pro-files\n"
+ " load(data_caging_paths)\n"
+ " MMP_RULES += EXPORTUNFROZEN\n"
+ " TARGET.UID3 = " + symbianUid + "\n"
+ " TARGET.CAPABILITY = " + generateCapabilitySet(symbianCapabilities).toAscii() + "\n"
+ " TARGET.EPOCALLOWDLLDATA = 1\n"
+ " pluginDeploy.sources = " + fileName + ".dll\n"
+ " pluginDeploy.path = $$QT_PLUGINS_BASE_DIR/" + QDir::fromNativeSeparators(qtPluginDirectory) + "\n"
+ " DEPLOYMENT += pluginDeploy\n"
+ "}\n";
+ }
}
void MobileLibraryParameters::writeMaemoProFile(QTextStream &str) const
QString fileName;
QString symbianUid;
+ QString qtPluginDirectory;
uint symbianCapabilities;
};
return m_d->ui.symbianEnableNetworkCheckBox->isChecked();
}
+QString MobileLibraryWizardOptionPage::qtPluginDirectory() const
+{
+ return m_d->ui.qtPluginLocationLineEdit->text();
+}
+
+void MobileLibraryWizardOptionPage::setQtPluginDirectory(const QString &directory)
+{
+ m_d->ui.qtPluginLocationLineEdit->setText(directory);
+}
+
void MobileLibraryWizardOptionPage::setLibraryType(int type)
{
m_d->libraryType = static_cast<QtProjectParameters::Type>(type);
+
+ if (type != QtProjectParameters::Qt4Plugin) {
+ m_d->ui.qtPluginLocationLineEdit->setVisible(false);
+ m_d->ui.qtPluginLocationLabel->setVisible(false);
+ m_d->ui.formLayout_2->removeItem(m_d->ui.horizontalLayout_2);
+ delete m_d->ui.horizontalLayout_2;
+ m_d->ui.horizontalLayout_2 = 0;
+ }
}
} // namespace Internal
QString symbianUid() const;
void setNetworkEnabled(bool enableIt);
bool networkEnabled() const;
+ QString qtPluginDirectory() const;
+ void setQtPluginDirectory(const QString &directory);
void setLibraryType(int type);
private:
<x>0</x>
<y>0</y>
<width>404</width>
- <height>548</height>
+ <height>130</height>
</rect>
</property>
<property name="windowTitle">
<string>WizardPage</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QFrame" name="frame">
<property name="frameShape">
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout">
+ <layout class="QVBoxLayout" name="verticalLayout_4">
<item>
- <layout class="QFormLayout" name="formLayout">
- <item row="1" column="0">
- <widget class="QCheckBox" name="symbianEnableNetworkCheckBox">
- <property name="text">
- <string>Enable network access</string>
- </property>
- </widget>
- </item>
+ <layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="symbianTargetUid3Label">
<property name="sizePolicy">
<widget class="QLineEdit" name="symbianTargetUid3LineEdit"/>
</item>
<item>
- <spacer name="horizontalSpacer_2">
+ <spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</item>
</layout>
</item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="qtPluginLocationLabel">
+ <property name="text">
+ <string>Plugin's directory name:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout_7">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QLineEdit" name="qtPluginLocationLineEdit"/>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item row="2" column="0">
+ <widget class="QCheckBox" name="symbianEnableNetworkCheckBox">
+ <property name="text">
+ <string>Enable network access</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
</layout>
</widget>
</item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</widget>
<resources/>