Commit 542fdc07 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Symbian: Provide field in Qt version to set up SBSv2

Provide a field in the symbian Qt version to set up the SBSv2 build
system.

Reviewed-by: dt
parent 5aedcb78
......@@ -221,6 +221,8 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent, QList<QtVersion *> ver
this, SLOT(updateCurrentS60SDKDirectory()));
connect(m_ui->gccePath, SIGNAL(changed(QString)),
this, SLOT(updateCurrentGcceDirectory()));
connect(m_ui->sbsV2Path, SIGNAL(changed(QString)),
this, SLOT(updateCurrentSbsV2Directory()));
connect(m_ui->addButton, SIGNAL(clicked()),
this, SLOT(addQtDir()));
......@@ -540,6 +542,8 @@ void QtOptionsPageWidget::makeS60Visible(bool visible)
m_ui->s60SDKPath->setVisible(visible);
m_ui->gcceLabel->setVisible(visible);
m_ui->gccePath->setVisible(visible);
m_ui->sbsV2Label->setVisible(visible);
m_ui->sbsV2Path->setVisible(visible);
}
void QtOptionsPageWidget::makeDebuggingHelperVisible(bool visible)
......@@ -608,6 +612,8 @@ void QtOptionsPageWidget::showEnvironmentPage(QTreeWidgetItem *item)
m_ui->mwcPath->setPath(QDir::toNativeSeparators(m_versions.at(index)->mwcDirectory()));
m_ui->s60SDKPath->setPath(QDir::toNativeSeparators(m_versions.at(index)->s60SDKDirectory()));
m_ui->gccePath->setPath(QDir::toNativeSeparators(m_versions.at(index)->gcceDirectory()));
m_ui->sbsV2Path->setPath(m_versions.at(index)->sbsV2Directory());
m_ui->sbsV2Path->setEnabled(m_versions.at(index)->isBuildWithSymbianSbsV2());
} else { //ProjectExplorer::ToolChain::GCC
makeMSVCVisible(false);
makeMingwVisible(false);
......@@ -832,6 +838,7 @@ void QtOptionsPageWidget::updateCurrentS60SDKDirectory()
m_versions[currentItemIndex]->setS60SDKDirectory(
QDir::fromNativeSeparators(m_ui->s60SDKPath->path()));
}
void QtOptionsPageWidget::updateCurrentGcceDirectory()
{
QTreeWidgetItem *currentItem = m_ui->qtdirList->currentItem();
......@@ -843,6 +850,17 @@ void QtOptionsPageWidget::updateCurrentGcceDirectory()
QDir::fromNativeSeparators(m_ui->gccePath->path()));
}
void QtOptionsPageWidget::updateCurrentSbsV2Directory()
{
QTreeWidgetItem *currentItem = m_ui->qtdirList->currentItem();
Q_ASSERT(currentItem);
int currentItemIndex = indexForTreeItem(currentItem);
if (currentItemIndex < 0)
return;
m_versions[currentItemIndex]->setSbsV2Directory(
QDir::fromNativeSeparators(m_ui->sbsV2Path->path()));
}
QList<QSharedPointerQtVersion> QtOptionsPageWidget::versions() const
{
QList<QSharedPointerQtVersion> result;
......
......@@ -123,6 +123,7 @@ private slots:
void updateCurrentMwcDirectory();
void updateCurrentS60SDKDirectory();
void updateCurrentGcceDirectory();
void updateCurrentSbsV2Directory();
void msvcVersionChanged();
void buildDebuggingHelper();
void slotShowDebuggingBuildLog();
......
......@@ -132,6 +132,7 @@ QtVersionManager::QtVersionManager()
version->setMwcDirectory(s->value("MwcDirectory").toString());
version->setS60SDKDirectory(s->value("S60SDKDirectory").toString());
version->setGcceDirectory(s->value("GcceDirectory").toString());
version->setSbsV2Directory(s->value(QLatin1String("SBSv2Directory")).toString());
m_versions.append(version);
}
s->endArray();
......@@ -300,6 +301,7 @@ void QtVersionManager::writeVersionsIntoSettings()
s->setValue("MwcDirectory", version->mwcDirectory());
s->setValue("S60SDKDirectory", version->s60SDKDirectory());
s->setValue("GcceDirectory", version->gcceDirectory());
s->setValue(QLatin1String("SBSv2Directory"), version->sbsV2Directory());
}
s->endArray();
}
......@@ -1291,7 +1293,7 @@ bool QtVersion::supportsMobileTarget() const
return supportsTargetId(Constants::S60_DEVICE_TARGET_ID) ||
supportsTargetId(Constants::S60_EMULATOR_TARGET_ID) ||
supportsTargetId(Constants::MAEMO_DEVICE_TARGET_ID) ||
supportsTargetId(Constants::QT_SIMULATOR_TARGET_ID);
supportsTargetId(Constants::QT_SIMULATOR_TARGET_ID);
}
QList<QSharedPointer<ProjectExplorer::ToolChain> > QtVersion::toolChains() const
......@@ -1555,6 +1557,16 @@ void QtVersion::setGcceDirectory(const QString &directory)
m_toolChainUpToDate = false;
}
QString QtVersion::sbsV2Directory() const
{
return m_sbsV2Directory;
}
void QtVersion::setSbsV2Directory(const QString &directory)
{
m_sbsV2Directory = directory;
}
QString QtVersion::mingwDirectory() const
{
return m_mingwDirectory;
......@@ -1580,6 +1592,8 @@ void QtVersion::setMsvcVersion(const QString &version)
void QtVersion::addToEnvironment(Utils::Environment &env) const
{
env.set("QTDIR", QDir::toNativeSeparators(versionInfo().value("QT_INSTALL_DATA")));
if (isBuildWithSymbianSbsV2() && !m_sbsV2Directory.isEmpty())
env.prependOrSetPath(m_sbsV2Directory);
env.prependOrSetPath(versionInfo().value("QT_INSTALL_BINS"));
}
......
......@@ -103,6 +103,8 @@ public:
void setS60SDKDirectory(const QString &directory);
QString gcceDirectory() const;
void setGcceDirectory(const QString &directory);
QString sbsV2Directory() const;
void setSbsV2Directory(const QString &directory);
QString mingwDirectory() const;
void setMingwDirectory(const QString &directory);
......@@ -184,6 +186,7 @@ private:
QString m_mwcDirectory;
QString m_s60SDKDirectory;
QString m_gcceDirectory;
QString m_sbsV2Directory;
mutable bool m_toolChainUpToDate;
mutable QString m_mkspec; // updated lazily
......
......@@ -10,8 +10,8 @@
<height>424</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QTreeWidget" name="qtdirList">
......@@ -89,149 +89,155 @@
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="versionNameLabel">
<property name="text">
<string>Version name:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="nameEdit"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="pathLabel">
<property name="text">
<string>qmake location:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Utils::PathChooser" name="qmakePath" native="true"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mingwLabel">
<property name="text">
<string>MinGW directory:</string>
<item row="1" column="0">
<widget class="QLabel" name="versionNameLabel">
<property name="text">
<string>Version name:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="nameEdit"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="pathLabel">
<property name="text">
<string>qmake location:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Utils::PathChooser" name="qmakePath" native="true"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="mingwLabel">
<property name="text">
<string>MinGW directory:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="Utils::PathChooser" name="mingwPath" native="true"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="msvcLabel">
<property name="text">
<string>Toolchain:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<layout class="QHBoxLayout" name="msvcHorizontalLayout">
<item>
<widget class="QComboBox" name="msvcComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Utils::PathChooser" name="mingwPath" native="true"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="msvcLabel">
<property name="text">
<string>Toolchain:</string>
<item>
<widget class="QLabel" name="msvcNotFoundLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="3" column="1">
<layout class="QHBoxLayout" name="msvcHorizontalLayout">
<item>
<widget class="QComboBox" name="msvcComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="msvcNotFoundLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Unable to detect MSVC version.</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0">
<widget class="QLabel" name="s60SDKLabel">
<property name="text">
<string>S60 SDK:</string>
<string>Unable to detect MSVC version.</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="Utils::PathChooser" name="s60SDKPath" native="true"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="gcceLabel">
<property name="text">
<string>CSL/GCCE directory:</string>
</layout>
</item>
<item row="5" column="0">
<widget class="QLabel" name="s60SDKLabel">
<property name="text">
<string>S60 SDK:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="Utils::PathChooser" name="s60SDKPath" native="true"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="gcceLabel">
<property name="text">
<string>CSL/GCCE directory:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="Utils::PathChooser" name="gccePath" native="true"/>
</item>
<item row="7" column="0">
<widget class="QLabel" name="mwcLabel">
<property name="text">
<string>Carbide directory:</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="Utils::PathChooser" name="mwcPath" native="true"/>
</item>
<item row="8" column="0">
<widget class="QLabel" name="sbsV2Label">
<property name="text">
<string>SBS v2 directory:</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="Utils::PathChooser" name="sbsV2Path" native="true"/>
</item>
<item row="9" column="0">
<widget class="QLabel" name="debuggingHelperLabel">
<property name="text">
<string>Debugging helpers:</string>
</property>
</widget>
</item>
<item row="9" column="1">
<layout class="QHBoxLayout" name="debuggingHelperHorizontalLayout">
<item>
<widget class="QLabel" name="debuggingHelperStateLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="Utils::PathChooser" name="gccePath" native="true"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="mwcLabel">
<property name="text">
<string>Carbide directory:</string>
<string/>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="Utils::PathChooser" name="mwcPath" native="true"/>
</item>
<item row="7" column="0">
<widget class="QLabel" name="debuggingHelperLabel">
<item>
<widget class="QPushButton" name="showLogButton">
<property name="text">
<string>Debugging helpers:</string>
<string>Show &amp;Log</string>
</property>
</widget>
</item>
<item row="7" column="1">
<layout class="QHBoxLayout" name="debuggingHelperHorizontalLayout">
<item>
<widget class="QLabel" name="debuggingHelperStateLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="showLogButton">
<property name="text">
<string>Show &amp;Log</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="rebuildButton">
<property name="text">
<string>&amp;Rebuild</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="8" column="0" colspan="2">
<widget class="QLabel" name="errorLabel">
<item>
<widget class="QPushButton" name="rebuildButton">
<property name="text">
<string/>
<string>&amp;Rebuild</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="10" column="0" colspan="2">
<widget class="QLabel" name="errorLabel">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
......@@ -254,7 +260,6 @@
<tabstop>qmakePath</tabstop>
<tabstop>mingwPath</tabstop>
<tabstop>msvcComboBox</tabstop>
<tabstop>showLogButton</tabstop>
<tabstop>rebuildButton</tabstop>
</tabstops>
<resources/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment