forked from qt-creator/qt-creator
Adding qt plugin support to Symbian's library wizard.
Task-number: QTCREATORBUG-3436 Reviewed-by: Tobias Hunger
This commit is contained in:
@@ -43,6 +43,7 @@
|
|||||||
#include <utils/projectintropage.h>
|
#include <utils/projectintropage.h>
|
||||||
|
|
||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
|
#include <QtCore/QDir>
|
||||||
|
|
||||||
#include <QtGui/QComboBox>
|
#include <QtGui/QComboBox>
|
||||||
#include <QtGui/QLabel>
|
#include <QtGui/QLabel>
|
||||||
@@ -244,7 +245,9 @@ int LibraryWizardDialog::nextId() const
|
|||||||
|
|
||||||
// If there was no Symbian target defined we omit "Symbian specific" step
|
// If there was no Symbian target defined we omit "Symbian specific" step
|
||||||
// We also omit this step if the library type is not dll
|
// 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;
|
next = m_mobilePageId;
|
||||||
|
|
||||||
if (next == m_modulesPageId)
|
if (next == m_modulesPageId)
|
||||||
@@ -353,6 +356,9 @@ void LibraryWizardDialog::setupFilesPage()
|
|||||||
void LibraryWizardDialog::setupMobilePage()
|
void LibraryWizardDialog::setupMobilePage()
|
||||||
{
|
{
|
||||||
m_mobilePage->setSymbianUid(AbstractMobileApp::symbianUidForPath(path()+projectName()));
|
m_mobilePage->setSymbianUid(AbstractMobileApp::symbianUidForPath(path()+projectName()));
|
||||||
|
|
||||||
|
if (type() == QtProjectParameters::Qt4Plugin)
|
||||||
|
m_mobilePage->setQtPluginDirectory(projectName());
|
||||||
m_mobilePage->setLibraryType(type());
|
m_mobilePage->setLibraryType(type());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -381,6 +387,7 @@ MobileLibraryParameters LibraryWizardDialog::mobileLibraryParameters() const
|
|||||||
|
|
||||||
if (mlp.type & MobileLibraryParameters::Symbian) {
|
if (mlp.type & MobileLibraryParameters::Symbian) {
|
||||||
mlp.symbianUid = m_mobilePage->symbianUid();
|
mlp.symbianUid = m_mobilePage->symbianUid();
|
||||||
|
mlp.qtPluginDirectory = m_mobilePage->qtPluginDirectory();
|
||||||
mlp.symbianCapabilities |= m_mobilePage->networkEnabled()?MobileLibraryParameters::NetworkServices:0;
|
mlp.symbianCapabilities |= m_mobilePage->networkEnabled()?MobileLibraryParameters::NetworkServices:0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>400</width>
|
<width>315</width>
|
||||||
<height>300</height>
|
<height>116</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
#include "qtprojectparameters.h"
|
#include "qtprojectparameters.h"
|
||||||
|
|
||||||
#include <QtCore/QTextStream>
|
#include <QtCore/QTextStream>
|
||||||
|
#include <QtCore/QDir>
|
||||||
|
|
||||||
namespace Qt4ProjectManager {
|
namespace Qt4ProjectManager {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -94,19 +95,31 @@ void MobileLibraryParameters::writeProFile(QTextStream &str) const
|
|||||||
|
|
||||||
void MobileLibraryParameters::writeSymbianProFile(QTextStream &str) const
|
void MobileLibraryParameters::writeSymbianProFile(QTextStream &str) const
|
||||||
{
|
{
|
||||||
if (libraryType != QtProjectParameters::SharedLibrary)
|
if (libraryType == QtProjectParameters::SharedLibrary) {
|
||||||
return; //nothing to do when the library is not a shared library
|
str << "\n"
|
||||||
|
"symbian {\n"
|
||||||
str << "\n"
|
" MMP_RULES += EXPORTUNFROZEN\n"
|
||||||
"symbian {\n"
|
" TARGET.UID3 = " + symbianUid + "\n"
|
||||||
" MMP_RULES += EXPORTUNFROZEN\n"
|
" TARGET.CAPABILITY = " + generateCapabilitySet(symbianCapabilities).toAscii() + "\n"
|
||||||
" TARGET.UID3 = " + symbianUid + "\n"
|
" TARGET.EPOCALLOWDLLDATA = 1\n"
|
||||||
" TARGET.CAPABILITY = " + generateCapabilitySet(symbianCapabilities).toAscii() + "\n"
|
" addFiles.sources = " + fileName + ".dll\n"
|
||||||
" TARGET.EPOCALLOWDLLDATA = 1\n"
|
" addFiles.path = !:/sys/bin\n"
|
||||||
" addFiles.sources = " + fileName + ".dll\n"
|
" DEPLOYMENT += addFiles\n"
|
||||||
" addFiles.path = !:/sys/bin\n"
|
"}\n";
|
||||||
" DEPLOYMENT += addFiles\n"
|
} else if (libraryType == QtProjectParameters::Qt4Plugin) {
|
||||||
"}\n";
|
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
|
void MobileLibraryParameters::writeMaemoProFile(QTextStream &str) const
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ public:
|
|||||||
QString fileName;
|
QString fileName;
|
||||||
|
|
||||||
QString symbianUid;
|
QString symbianUid;
|
||||||
|
QString qtPluginDirectory;
|
||||||
uint symbianCapabilities;
|
uint symbianCapabilities;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -84,9 +84,27 @@ bool MobileLibraryWizardOptionPage::networkEnabled() const
|
|||||||
return m_d->ui.symbianEnableNetworkCheckBox->isChecked();
|
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)
|
void MobileLibraryWizardOptionPage::setLibraryType(int type)
|
||||||
{
|
{
|
||||||
m_d->libraryType = static_cast<QtProjectParameters::Type>(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
|
} // namespace Internal
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ public:
|
|||||||
QString symbianUid() const;
|
QString symbianUid() const;
|
||||||
void setNetworkEnabled(bool enableIt);
|
void setNetworkEnabled(bool enableIt);
|
||||||
bool networkEnabled() const;
|
bool networkEnabled() const;
|
||||||
|
QString qtPluginDirectory() const;
|
||||||
|
void setQtPluginDirectory(const QString &directory);
|
||||||
void setLibraryType(int type);
|
void setLibraryType(int type);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -7,13 +7,13 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>404</width>
|
<width>404</width>
|
||||||
<height>548</height>
|
<height>130</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>WizardPage</string>
|
<string>WizardPage</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="frame">
|
<widget class="QFrame" name="frame">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
@@ -22,16 +22,9 @@
|
|||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="formLayout_2">
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QCheckBox" name="symbianEnableNetworkCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>Enable network access</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="symbianTargetUid3Label">
|
<widget class="QLabel" name="symbianTargetUid3Label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -54,7 +47,7 @@
|
|||||||
<widget class="QLineEdit" name="symbianTargetUid3LineEdit"/>
|
<widget class="QLineEdit" name="symbianTargetUid3LineEdit"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_2">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
@@ -68,24 +61,49 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
|||||||
Reference in New Issue
Block a user