Commit 7c0b1b63 authored by con's avatar con

Merge remote branch 'origin/2.1' into master

parents 5daec0bd e0084d9e
......@@ -14,6 +14,9 @@
#include <QtDeclarative/private/qdeclarativemetatype_p.h>
#include <QtDeclarative/private/qdeclarativeopenmetaobject_p.h>
#include <QtDeclarative/QDeclarativeView>
#ifdef QT_SIMULATOR
#include <QtGui/private/qsimulatorconnection_p.h>
#endif
static QHash<QByteArray, QList<const QDeclarativeType *> > qmlTypesByCppName;
static QHash<QByteArray, QByteArray> cppToId;
......@@ -258,6 +261,9 @@ void writeEasingCurve(QXmlStreamWriter *xml)
int main(int argc, char *argv[])
{
#ifdef QT_SIMULATOR
QtSimulatorPrivate::SimulatorConnection::createStubInstance();
#endif
QApplication app(argc, argv);
if (argc != 1 && argc != 3) {
......
......@@ -567,8 +567,6 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH
{ // Have the QML engine check if the document is valid:
QDeclarativeEngine engine;
engine.setOutputWarningsToStandardError(false);
foreach (const QString &importPath, importPaths)
engine.addImportPath(importPath);
QDeclarativeComponent comp(&engine);
comp.setData(data.toUtf8(), url);
if (comp.status() == QDeclarativeComponent::Error) {
......
......@@ -139,8 +139,8 @@ GettingStartedWelcomePageWidget::GettingStartedWelcomePageWidget(QWidget *parent
const QString featureRssFile = Core::ICore::instance()->resourcePath()+QLatin1String("/rss/featured.rss");
emit startRssFetching(QUrl::fromLocalFile(featureRssFile));
ui->nextFeatureBtn->setEnabled(false);
ui->prevFeatureBtn->setEnabled(false);
ui->nextFeatureBtn->hide();
ui->prevFeatureBtn->hide();
connect(ui->nextFeatureBtn, SIGNAL(clicked()), this, SLOT(slotNextFeature()));
connect(ui->prevFeatureBtn, SIGNAL(clicked()), this, SLOT(slotPrevFeature()));
}
......@@ -524,8 +524,10 @@ QStringList GettingStartedWelcomePageWidget::tipsOfTheDay()
void GettingStartedWelcomePageWidget::addToFeatures(const Core::RssItem &feature)
{
m_featuredItems.append(feature);
ui->nextFeatureBtn->setEnabled(true);
ui->prevFeatureBtn->setEnabled(true);
if (m_featuredItems.count() > 1) {
ui->nextFeatureBtn->show();
ui->prevFeatureBtn->show();
}
}
void GettingStartedWelcomePageWidget::showFeature(int feature)
......
......@@ -141,8 +141,10 @@ bool QmlDumpTool::canBuild(const QtVersion *qtVersion)
{
const QString installHeaders = qtVersion->versionInfo().value("QT_INSTALL_HEADERS");
const QString header = installHeaders + QLatin1String("/QtDeclarative/private/qdeclarativemetatype_p.h");
return qtVersion->supportsTargetId(Constants::DESKTOP_TARGET_ID)
&& QFile::exists(header);
return (qtVersion->supportsTargetId(Constants::DESKTOP_TARGET_ID)
|| (qtVersion->supportsTargetId(Constants::QT_SIMULATOR_TARGET_ID)
&& checkMinimumQtVersion(qtVersion->qtVersionString(), 4, 7, 1)))
&& QFile::exists(header);
}
static QtVersion *qtVersionForProject(ProjectExplorer::Project *project)
......@@ -170,24 +172,25 @@ static QtVersion *qtVersionForProject(ProjectExplorer::Project *project)
return 0;
}
// else, find any desktop Qt version that has qmldump, or - if there isn't any -
// one that could build it
QtVersion *desktopQt = 0;
// else, find any desktop or simulator Qt version that has qmldump, or
// - if there isn't any - one that could build it
QtVersion *canBuildQmlDump = 0;
QtVersionManager *qtVersions = QtVersionManager::instance();
foreach (QtVersion *version, qtVersions->validVersions()) {
if (version->supportsTargetId(Constants::DESKTOP_TARGET_ID)) {
if (version->supportsTargetId(Constants::DESKTOP_TARGET_ID)
|| version->supportsTargetId(Constants::QT_SIMULATOR_TARGET_ID)) {
const QString qtInstallData = version->versionInfo().value("QT_INSTALL_DATA");
const QString path = QmlDumpTool::toolByInstallData(qtInstallData);
if (!path.isEmpty())
return version;
if (!desktopQt && QmlDumpTool::canBuild(version)) {
desktopQt = version;
if (!canBuildQmlDump && QmlDumpTool::canBuild(version)) {
canBuildQmlDump = version;
}
}
}
return desktopQt;
return canBuildQmlDump;
}
QString QmlDumpTool::toolForProject(ProjectExplorer::Project *project)
......
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