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