forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/2.7'
Conflicts: share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp Change-Id: I7f319154d5865c47ccfd5f525f0fd7983733dd0e
This commit is contained in:
1
.gitmodules
vendored
1
.gitmodules
vendored
@@ -1,3 +1,4 @@
|
|||||||
[submodule "qbs"]
|
[submodule "qbs"]
|
||||||
path = src/shared/qbs
|
path = src/shared/qbs
|
||||||
url = ../../qt-labs/qbs.git
|
url = ../../qt-labs/qbs.git
|
||||||
|
ignore = dirty
|
||||||
|
@@ -12,6 +12,8 @@
|
|||||||
#include <private/qquicktextinput_p.h>
|
#include <private/qquicktextinput_p.h>
|
||||||
#include <private/qquicktextedit_p.h>
|
#include <private/qquicktextedit_p.h>
|
||||||
|
|
||||||
|
#include <designersupport.h>
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -499,6 +501,10 @@ void GraphicalNodeInstance::doComponentComplete()
|
|||||||
|
|
||||||
disableTextCursor(quickItem());
|
disableTextCursor(quickItem());
|
||||||
|
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 1, 0))
|
||||||
|
DesignerSupport::emitComponentCompleteSignalForAttachedProperty(quickItem());
|
||||||
|
#endif
|
||||||
|
|
||||||
quickItem()->update();
|
quickItem()->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -7,6 +7,7 @@ QWidget {
|
|||||||
LineEdit {
|
LineEdit {
|
||||||
backendValue: backendValues.%2
|
backendValue: backendValues.%2
|
||||||
baseStateFlag: isBaseState
|
baseStateFlag: isBaseState
|
||||||
|
translation: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
24
share/qtcreator/templates/qml/qtquickcontrols/main.qml
Normal file
24
share/qtcreator/templates/qml/qtquickcontrols/main.qml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
import QtQuick 2.0
|
||||||
|
import QtQuick.Controls 1.0
|
||||||
|
import QtQuick.Window 2.0
|
||||||
|
|
||||||
|
ApplicationWindow {
|
||||||
|
width: 640
|
||||||
|
height: 480
|
||||||
|
|
||||||
|
menuBar: MenuBar {
|
||||||
|
Menu {
|
||||||
|
title: qsTr("File")
|
||||||
|
MenuItem {
|
||||||
|
text: qsTr("Exit")
|
||||||
|
onTriggered: Qt.quit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: qsTr("Hello World")
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,21 @@
|
|||||||
|
/* File generated by Qt Creator, version 2.7.0 */
|
||||||
|
|
||||||
|
import QmlProject 1.1
|
||||||
|
|
||||||
|
Project {
|
||||||
|
// QTC_REPLACE main.qml WITH main
|
||||||
|
mainFile: "main.qml"
|
||||||
|
|
||||||
|
/* Include .qml, .js, and image files from current directory and subdirectories */
|
||||||
|
QmlFiles {
|
||||||
|
directory: "."
|
||||||
|
}
|
||||||
|
JavaScriptFiles {
|
||||||
|
directory: "."
|
||||||
|
}
|
||||||
|
ImageFiles {
|
||||||
|
directory: "."
|
||||||
|
}
|
||||||
|
/* List of plugin directories passed to QML runtime */
|
||||||
|
// importPaths: [ "../exampleplugin" ]
|
||||||
|
}
|
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<template openeditor="main.qml" priority="2"
|
||||||
|
featuresRequired="QtSupport.Wizards.FeatureQtQuickProject, QtSupport.Wizards.FeatureQtQuick, QtSupport.Wizards.FeatureQtQuick.2, QtSupport.Wizards.FeatureQtQuick.Controls"
|
||||||
|
id="QB.QML Application for Qt Quick 2.0">
|
||||||
|
<displayname>Qt Quick 2 UI with Controls</displayname>
|
||||||
|
<description>Creates a Qt Quick 2 UI project with a single QML file that contains the main view and uses Qt Quick Controls.<br/>You can review Qt Quick 2 UI projects in the QML Scene and you need not build them. This project requires that you have installed Qt Quick Controls for your Qt version.<br/><br/>Requires <b>Qt 5.1</b> or newer.</description>
|
||||||
|
</template>
|
@@ -27,7 +27,7 @@ OTHER_FILES = qmldir
|
|||||||
|
|
||||||
qmldir.files = qmldir
|
qmldir.files = qmldir
|
||||||
unix {
|
unix {
|
||||||
installPath = $$[QT_INSTALL_IMPORTS]/$$replace(uri, \\., /)
|
installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
|
||||||
qmldir.path = $$installPath
|
qmldir.path = $$installPath
|
||||||
target.path = $$installPath
|
target.path = $$installPath
|
||||||
INSTALLS += target qmldir
|
INSTALLS += target qmldir
|
||||||
|
@@ -45,10 +45,6 @@
|
|||||||
<description><![CDATA[This talk discusses various QML best practices and design patterns for building powerful and scalable Qt Quick applications with QML and C++ code.]]></description>
|
<description><![CDATA[This talk discusses various QML best practices and design patterns for building powerful and scalable Qt Quick applications with QML and C++ code.]]></description>
|
||||||
<tags>qt quick, qml</tags>
|
<tags>qt quick, qml</tags>
|
||||||
</tutorial>
|
</tutorial>
|
||||||
<tutorial imageUrl="images/icons/ddays11.png" difficulty="" projectPath="" name="Meet Qt and Qt Quick" isVideo="true" videoUrl="http://qt-project.org/videos/watch/qt-quick-best-practices-and-design-patterns" videoLength="1:07:43">
|
|
||||||
<description><![CDATA[Are you fully aware of all you can really accomplish with Qt and Qt Quick? We’ll take you beyond the benefits of Qt and Qt Quick from a marketing standpoint and dive into the technical aspects of what they are and how they work together.]]></description>
|
|
||||||
<tags>qt quick, qml</tags>
|
|
||||||
</tutorial>
|
|
||||||
<tutorial imageUrl="images/icons/ddays12.png" difficulty="" projectPath="" name="What is New in QtWebKit in 5.0" isVideo="true" videoUrl="http://www.youtube.com/watch?v=xEuapSGxaeU" videoLength="1:01:55">
|
<tutorial imageUrl="images/icons/ddays12.png" difficulty="" projectPath="" name="What is New in QtWebKit in 5.0" isVideo="true" videoUrl="http://www.youtube.com/watch?v=xEuapSGxaeU" videoLength="1:01:55">
|
||||||
<description><![CDATA[The web platform continues to evolve at breakneck speed. With our WebKit port to Qt 5 we are bringing these latest web technologies to the Qt world.]]></description>
|
<description><![CDATA[The web platform continues to evolve at breakneck speed. With our WebKit port to Qt 5 we are bringing these latest web technologies to the Qt world.]]></description>
|
||||||
<tags>qt, webkit</tags>
|
<tags>qt, webkit</tags>
|
||||||
|
@@ -280,6 +280,10 @@ bool AndroidManager::ensureIconAttribute(ProjectExplorer::Target *target)
|
|||||||
|
|
||||||
QString AndroidManager::targetSDK(ProjectExplorer::Target *target)
|
QString AndroidManager::targetSDK(ProjectExplorer::Target *target)
|
||||||
{
|
{
|
||||||
|
QVariant v = target->namedSettings(QLatin1String("AndroidManager.TargetSdk"));
|
||||||
|
if (v.isValid())
|
||||||
|
return v.toString();
|
||||||
|
|
||||||
QString fallback = QLatin1String("android-8");
|
QString fallback = QLatin1String("android-8");
|
||||||
if (QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(target->kit()))
|
if (QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(target->kit()))
|
||||||
if (qt->qtVersion() >= QtSupport::QtVersionNumber(5, 0, 0))
|
if (qt->qtVersion() >= QtSupport::QtVersionNumber(5, 0, 0))
|
||||||
@@ -287,6 +291,7 @@ QString AndroidManager::targetSDK(ProjectExplorer::Target *target)
|
|||||||
|
|
||||||
if (!createAndroidTemplatesIfNecessary(target))
|
if (!createAndroidTemplatesIfNecessary(target))
|
||||||
return AndroidConfigurations::instance().bestMatch(fallback);
|
return AndroidConfigurations::instance().bestMatch(fallback);
|
||||||
|
|
||||||
QFile file(defaultPropertiesPath(target).toString());
|
QFile file(defaultPropertiesPath(target).toString());
|
||||||
if (!file.open(QIODevice::ReadOnly))
|
if (!file.open(QIODevice::ReadOnly))
|
||||||
return AndroidConfigurations::instance().bestMatch(fallback);
|
return AndroidConfigurations::instance().bestMatch(fallback);
|
||||||
@@ -301,6 +306,7 @@ QString AndroidManager::targetSDK(ProjectExplorer::Target *target)
|
|||||||
bool AndroidManager::setTargetSDK(ProjectExplorer::Target *target, const QString &sdk)
|
bool AndroidManager::setTargetSDK(ProjectExplorer::Target *target, const QString &sdk)
|
||||||
{
|
{
|
||||||
updateTarget(target, sdk, applicationName(target));
|
updateTarget(target, sdk, applicationName(target));
|
||||||
|
target->setNamedSettings(QLatin1String("AndroidManager.TargetSdk"), sdk);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -118,8 +118,6 @@ void AndroidQtVersion::addToEnvironment(const ProjectExplorer::Kit *k, Utils::En
|
|||||||
if (AndroidConfigurations::instance().config().ndkLocation.isEmpty()
|
if (AndroidConfigurations::instance().config().ndkLocation.isEmpty()
|
||||||
|| AndroidConfigurations::instance().config().sdkLocation.isEmpty())
|
|| AndroidConfigurations::instance().config().sdkLocation.isEmpty())
|
||||||
return;
|
return;
|
||||||
if (AndroidConfigurations::instance().sdkTargets().isEmpty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
env.set(QLatin1String("ANDROID_NDK_PLATFORM"),
|
env.set(QLatin1String("ANDROID_NDK_PLATFORM"),
|
||||||
AndroidConfigurations::instance().bestMatch(AndroidManager::targetSDK(target)));
|
AndroidConfigurations::instance().bestMatch(AndroidManager::targetSDK(target)));
|
||||||
|
@@ -43,6 +43,7 @@ class CMakeProject;
|
|||||||
|
|
||||||
class CMakeUiCodeModelSupport : public CppTools::UiCodeModelSupport
|
class CMakeUiCodeModelSupport : public CppTools::UiCodeModelSupport
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
CMakeUiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
|
CMakeUiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
|
||||||
CMakeProject *project,
|
CMakeProject *project,
|
||||||
|
@@ -2215,6 +2215,7 @@ void EditorManager::removeAllSplits()
|
|||||||
d->m_splitter->unsplitAll();
|
d->m_splitter->unsplitAll();
|
||||||
if (!editor)
|
if (!editor)
|
||||||
editor = pickUnusedEditor();
|
editor = pickUnusedEditor();
|
||||||
|
if (editor)
|
||||||
activateEditor(editor);
|
activateEditor(editor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -33,12 +33,14 @@
|
|||||||
#include "cpptools_global.h"
|
#include "cpptools_global.h"
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
namespace CppTools {
|
namespace CppTools {
|
||||||
class CppModelManagerInterface;
|
class CppModelManagerInterface;
|
||||||
|
|
||||||
class CPPTOOLS_EXPORT AbstractEditorSupport
|
class CPPTOOLS_EXPORT AbstractEditorSupport : public QObject
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit AbstractEditorSupport(CppModelManagerInterface *modelmanager);
|
explicit AbstractEditorSupport(CppModelManagerInterface *modelmanager);
|
||||||
virtual ~AbstractEditorSupport();
|
virtual ~AbstractEditorSupport();
|
||||||
|
@@ -44,11 +44,12 @@ UiCodeModelSupport::UiCodeModelSupport(CppModelManagerInterface *modelmanager,
|
|||||||
: AbstractEditorSupport(modelmanager),
|
: AbstractEditorSupport(modelmanager),
|
||||||
m_sourceName(source),
|
m_sourceName(source),
|
||||||
m_fileName(uiHeaderFile),
|
m_fileName(uiHeaderFile),
|
||||||
m_initialized(false),
|
m_state(BARE)
|
||||||
m_running(false)
|
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
qDebug()<<"ctor UiCodeModelSupport for"<<m_sourceName<<uiHeaderFile;
|
qDebug()<<"ctor UiCodeModelSupport for"<<m_sourceName<<uiHeaderFile;
|
||||||
|
connect(&m_process, SIGNAL(finished(int)),
|
||||||
|
this, SLOT(finishProcess()));
|
||||||
}
|
}
|
||||||
|
|
||||||
UiCodeModelSupport::~UiCodeModelSupport()
|
UiCodeModelSupport::~UiCodeModelSupport()
|
||||||
@@ -59,7 +60,8 @@ UiCodeModelSupport::~UiCodeModelSupport()
|
|||||||
|
|
||||||
void UiCodeModelSupport::init() const
|
void UiCodeModelSupport::init() const
|
||||||
{
|
{
|
||||||
m_initialized = true;
|
if (m_state != BARE)
|
||||||
|
return;
|
||||||
QDateTime sourceTime = QFileInfo(m_sourceName).lastModified();
|
QDateTime sourceTime = QFileInfo(m_sourceName).lastModified();
|
||||||
QFileInfo uiHeaderFileInfo(m_fileName);
|
QFileInfo uiHeaderFileInfo(m_fileName);
|
||||||
QDateTime uiHeaderTime = uiHeaderFileInfo.exists() ? uiHeaderFileInfo.lastModified() : QDateTime();
|
QDateTime uiHeaderTime = uiHeaderFileInfo.exists() ? uiHeaderFileInfo.lastModified() : QDateTime();
|
||||||
@@ -71,6 +73,7 @@ void UiCodeModelSupport::init() const
|
|||||||
QTextStream stream(&file);
|
QTextStream stream(&file);
|
||||||
m_contents = stream.readAll().toUtf8();
|
m_contents = stream.readAll().toUtf8();
|
||||||
m_cacheTime = uiHeaderTime;
|
m_cacheTime = uiHeaderTime;
|
||||||
|
m_state = FINISHED;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -91,20 +94,25 @@ void UiCodeModelSupport::init() const
|
|||||||
qDebug()<<"uic run wasn't succesfull";
|
qDebug()<<"uic run wasn't succesfull";
|
||||||
m_cacheTime = QDateTime ();
|
m_cacheTime = QDateTime ();
|
||||||
m_contents = QByteArray();
|
m_contents = QByteArray();
|
||||||
|
m_state = FINISHED;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (debug)
|
if (debug)
|
||||||
qDebug()<<"Could open "<<m_sourceName<<"needed for the cpp model";
|
qDebug()<<"Could open "<<m_sourceName<<"needed for the cpp model";
|
||||||
m_contents = QByteArray();
|
m_contents = QByteArray();
|
||||||
|
m_state = FINISHED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray UiCodeModelSupport::contents() const
|
QByteArray UiCodeModelSupport::contents() const
|
||||||
{
|
{
|
||||||
if (!m_initialized)
|
// Check the common case first
|
||||||
|
if (m_state == FINISHED)
|
||||||
|
return m_contents;
|
||||||
|
if (m_state == BARE)
|
||||||
init();
|
init();
|
||||||
if (m_running)
|
if (m_state == RUNNING)
|
||||||
finishProcess();
|
finishProcess();
|
||||||
|
|
||||||
return m_contents;
|
return m_contents;
|
||||||
@@ -120,13 +128,16 @@ void UiCodeModelSupport::setFileName(const QString &name)
|
|||||||
if (m_fileName == name && m_cacheTime.isValid())
|
if (m_fileName == name && m_cacheTime.isValid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (m_state == RUNNING)
|
||||||
|
finishProcess();
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
qDebug() << "UiCodeModelSupport::setFileName"<<name;
|
qDebug() << "UiCodeModelSupport::setFileName"<<name;
|
||||||
|
|
||||||
m_fileName = name;
|
m_fileName = name;
|
||||||
m_contents.clear();
|
m_contents.clear();
|
||||||
m_cacheTime = QDateTime();
|
m_cacheTime = QDateTime();
|
||||||
init();
|
m_state = BARE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UiCodeModelSupport::runUic(const QString &ui) const
|
bool UiCodeModelSupport::runUic(const QString &ui) const
|
||||||
@@ -145,19 +156,23 @@ bool UiCodeModelSupport::runUic(const QString &ui) const
|
|||||||
if (!m_process.waitForBytesWritten(3000))
|
if (!m_process.waitForBytesWritten(3000))
|
||||||
goto error;
|
goto error;
|
||||||
m_process.closeWriteChannel();
|
m_process.closeWriteChannel();
|
||||||
m_running = true;
|
m_state = RUNNING;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (debug)
|
if (debug)
|
||||||
qDebug() << "failed" << m_process.readAllStandardError();
|
qDebug() << "failed" << m_process.readAllStandardError();
|
||||||
m_process.kill();
|
m_process.kill();
|
||||||
m_running = false;
|
m_state = FINISHED;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UiCodeModelSupport::updateFromEditor(const QString &formEditorContents)
|
void UiCodeModelSupport::updateFromEditor(const QString &formEditorContents)
|
||||||
{
|
{
|
||||||
|
if (m_state == BARE)
|
||||||
|
init();
|
||||||
|
if (m_state == RUNNING)
|
||||||
|
finishProcess();
|
||||||
if (runUic(formEditorContents))
|
if (runUic(formEditorContents))
|
||||||
if (finishProcess())
|
if (finishProcess())
|
||||||
updateDocument();
|
updateDocument();
|
||||||
@@ -165,23 +180,29 @@ void UiCodeModelSupport::updateFromEditor(const QString &formEditorContents)
|
|||||||
|
|
||||||
bool UiCodeModelSupport::finishProcess() const
|
bool UiCodeModelSupport::finishProcess() const
|
||||||
{
|
{
|
||||||
if (!m_running)
|
if (m_state != RUNNING)
|
||||||
return false;
|
return false;
|
||||||
if (!m_process.waitForFinished(3000)
|
if (!m_process.waitForFinished(3000)
|
||||||
&& m_process.exitStatus() != QProcess::NormalExit
|
&& m_process.exitStatus() != QProcess::NormalExit
|
||||||
&& m_process.exitCode() != 0) {
|
&& m_process.exitCode() != 0) {
|
||||||
|
if (m_state != RUNNING) // waitForFinished can recurse into finishProcess
|
||||||
|
return false;
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
qDebug() << "failed" << m_process.readAllStandardError();
|
qDebug() << "failed" << m_process.readAllStandardError();
|
||||||
m_process.kill();
|
m_process.kill();
|
||||||
m_running = false;
|
m_state = FINISHED;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_state != RUNNING) // waitForFinished can recurse into finishProcess
|
||||||
|
return true;
|
||||||
|
|
||||||
m_contents = m_process.readAllStandardOutput();
|
m_contents = m_process.readAllStandardOutput();
|
||||||
m_cacheTime = QDateTime::currentDateTime();
|
m_cacheTime = QDateTime::currentDateTime();
|
||||||
if (debug)
|
if (debug)
|
||||||
qDebug() << "ok" << m_contents.size() << "bytes.";
|
qDebug() << "ok" << m_contents.size() << "bytes.";
|
||||||
m_running = false;
|
m_state = FINISHED;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -189,6 +210,10 @@ void UiCodeModelSupport::updateFromBuild()
|
|||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
qDebug()<<"UiCodeModelSupport::updateFromBuild() for file"<<m_sourceName;
|
qDebug()<<"UiCodeModelSupport::updateFromBuild() for file"<<m_sourceName;
|
||||||
|
if (m_state == BARE)
|
||||||
|
init();
|
||||||
|
if (m_state == RUNNING)
|
||||||
|
finishProcess();
|
||||||
// This is mostly a fall back for the cases when uic couldn't be run
|
// This is mostly a fall back for the cases when uic couldn't be run
|
||||||
// it pays special attention to the case where a ui_*h was newly created
|
// it pays special attention to the case where a ui_*h was newly created
|
||||||
QDateTime sourceTime = QFileInfo(m_sourceName).lastModified();
|
QDateTime sourceTime = QFileInfo(m_sourceName).lastModified();
|
||||||
|
@@ -42,6 +42,7 @@ namespace CppTools {
|
|||||||
|
|
||||||
class CPPTOOLS_EXPORT UiCodeModelSupport : public AbstractEditorSupport
|
class CPPTOOLS_EXPORT UiCodeModelSupport : public AbstractEditorSupport
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
UiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
|
UiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
|
||||||
const QString &sourceFile,
|
const QString &sourceFile,
|
||||||
@@ -57,16 +58,18 @@ protected:
|
|||||||
virtual QString uicCommand() const = 0;
|
virtual QString uicCommand() const = 0;
|
||||||
virtual QStringList environment() const = 0;
|
virtual QStringList environment() const = 0;
|
||||||
private:
|
private:
|
||||||
|
enum State { BARE, RUNNING, FINISHED };
|
||||||
|
|
||||||
void init() const;
|
void init() const;
|
||||||
bool runUic(const QString &ui) const;
|
bool runUic(const QString &ui) const;
|
||||||
bool finishProcess() const;
|
Q_SLOT bool finishProcess() const;
|
||||||
mutable QProcess m_process;
|
mutable QProcess m_process;
|
||||||
QString m_sourceName;
|
QString m_sourceName;
|
||||||
QString m_fileName;
|
QString m_fileName;
|
||||||
mutable bool m_initialized;
|
mutable State m_state;
|
||||||
mutable QByteArray m_contents;
|
mutable QByteArray m_contents;
|
||||||
mutable QDateTime m_cacheTime;
|
mutable QDateTime m_cacheTime;
|
||||||
mutable bool m_running;
|
static QList<UiCodeModelSupport *> m_waitingForStart;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // CppTools
|
} // CppTools
|
||||||
|
@@ -61,7 +61,6 @@ QmlInspectorAgent::QmlInspectorAgent(DebuggerEngine *engine, QObject *parent)
|
|||||||
, m_engineQueryId(0)
|
, m_engineQueryId(0)
|
||||||
, m_rootContextQueryId(0)
|
, m_rootContextQueryId(0)
|
||||||
, m_objectToSelect(-1)
|
, m_objectToSelect(-1)
|
||||||
, m_newObjectsCreated(false)
|
|
||||||
{
|
{
|
||||||
m_debugIdToIname.insert(-1, QByteArray("inspect"));
|
m_debugIdToIname.insert(-1, QByteArray("inspect"));
|
||||||
connect(debuggerCore()->action(ShowQmlObjectTree),
|
connect(debuggerCore()->action(ShowQmlObjectTree),
|
||||||
@@ -811,11 +810,6 @@ QList<WatchData> QmlInspectorAgent::buildWatchData(const ObjectReference &obj,
|
|||||||
// element makes sure we're queried on expansion.
|
// element makes sure we're queried on expansion.
|
||||||
if (obj.needsMoreData())
|
if (obj.needsMoreData())
|
||||||
return list;
|
return list;
|
||||||
|
|
||||||
// To improve performance, we do not insert data for items
|
|
||||||
// that have not been previously queried when the object tree is refreshed.
|
|
||||||
if (m_newObjectsCreated)
|
|
||||||
append = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// properties
|
// properties
|
||||||
@@ -886,10 +880,6 @@ void QmlInspectorAgent::clearObjectTree()
|
|||||||
m_debugIdToIname.clear();
|
m_debugIdToIname.clear();
|
||||||
m_debugIdToIname.insert(-1, QByteArray("inspect"));
|
m_debugIdToIname.insert(-1, QByteArray("inspect"));
|
||||||
m_objectStack.clear();
|
m_objectStack.clear();
|
||||||
// reset only for qt > 4.8.3.
|
|
||||||
if (m_engineClient->objectName() != QLatin1String(QDECLARATIVE_ENGINE))
|
|
||||||
m_newObjectsCreated = false;
|
|
||||||
|
|
||||||
removeAllObjectWatches();
|
removeAllObjectWatches();
|
||||||
}
|
}
|
||||||
} // Internal
|
} // Internal
|
||||||
|
@@ -143,7 +143,6 @@ private:
|
|||||||
QList<int> m_objectWatches;
|
QList<int> m_objectWatches;
|
||||||
QList<int> m_fetchDataIds;
|
QList<int> m_fetchDataIds;
|
||||||
QTimer m_delayQueryTimer;
|
QTimer m_delayQueryTimer;
|
||||||
bool m_newObjectsCreated;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
|
@@ -2413,12 +2413,13 @@ void GitClient::handleMergeConflicts(const QString &workingDir, const QString &c
|
|||||||
{
|
{
|
||||||
QString message = commit.isEmpty() ? tr("Conflicts detected")
|
QString message = commit.isEmpty() ? tr("Conflicts detected")
|
||||||
: tr("Conflicts detected with commit %1").arg(commit);
|
: tr("Conflicts detected with commit %1").arg(commit);
|
||||||
QMessageBox mergeOrAbort(QMessageBox::Question, tr("Conflicts Detected"),
|
QMessageBox mergeOrAbort(QMessageBox::Question, tr("Conflicts Detected"), message);
|
||||||
message, QMessageBox::Ignore | QMessageBox::Abort);
|
|
||||||
QPushButton *mergeToolButton = mergeOrAbort.addButton(tr("Run &Merge Tool"),
|
QPushButton *mergeToolButton = mergeOrAbort.addButton(tr("Run &Merge Tool"),
|
||||||
QMessageBox::ActionRole);
|
QMessageBox::AcceptRole);
|
||||||
|
mergeOrAbort.addButton(QMessageBox::Ignore);
|
||||||
if (abortCommand == QLatin1String("rebase"))
|
if (abortCommand == QLatin1String("rebase"))
|
||||||
mergeOrAbort.addButton(tr("&Skip"), QMessageBox::ActionRole);
|
mergeOrAbort.addButton(tr("&Skip"), QMessageBox::RejectRole);
|
||||||
|
mergeOrAbort.addButton(QMessageBox::Abort);
|
||||||
switch (mergeOrAbort.exec()) {
|
switch (mergeOrAbort.exec()) {
|
||||||
case QMessageBox::Abort:
|
case QMessageBox::Abort:
|
||||||
synchronousAbortCommand(workingDir, abortCommand);
|
synchronousAbortCommand(workingDir, abortCommand);
|
||||||
|
@@ -63,6 +63,7 @@ const char DC_COUNT_KEY[] = "ProjectExplorer.Target.DeployConfigurationCount";
|
|||||||
const char ACTIVE_RC_KEY[] = "ProjectExplorer.Target.ActiveRunConfiguration";
|
const char ACTIVE_RC_KEY[] = "ProjectExplorer.Target.ActiveRunConfiguration";
|
||||||
const char RC_KEY_PREFIX[] = "ProjectExplorer.Target.RunConfiguration.";
|
const char RC_KEY_PREFIX[] = "ProjectExplorer.Target.RunConfiguration.";
|
||||||
const char RC_COUNT_KEY[] = "ProjectExplorer.Target.RunConfigurationCount";
|
const char RC_COUNT_KEY[] = "ProjectExplorer.Target.RunConfigurationCount";
|
||||||
|
const char PLUGIN_SETTINGS_KEY[] = "ProjectExplorer.Target.PluginSettings";
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
@@ -92,6 +93,7 @@ public:
|
|||||||
RunConfiguration* m_activeRunConfiguration;
|
RunConfiguration* m_activeRunConfiguration;
|
||||||
DeploymentData m_deploymentData;
|
DeploymentData m_deploymentData;
|
||||||
BuildTargetInfoList m_appTargets;
|
BuildTargetInfoList m_appTargets;
|
||||||
|
QVariantMap m_pluginSettings;
|
||||||
|
|
||||||
QPixmap m_connectedPixmap;
|
QPixmap m_connectedPixmap;
|
||||||
QPixmap m_readyToUsePixmap;
|
QPixmap m_readyToUsePixmap;
|
||||||
@@ -517,6 +519,8 @@ QVariantMap Target::toMap() const
|
|||||||
for (int i = 0; i < rcs.size(); ++i)
|
for (int i = 0; i < rcs.size(); ++i)
|
||||||
map.insert(QString::fromLatin1(RC_KEY_PREFIX) + QString::number(i), rcs.at(i)->toMap());
|
map.insert(QString::fromLatin1(RC_KEY_PREFIX) + QString::number(i), rcs.at(i)->toMap());
|
||||||
|
|
||||||
|
map.insert(QLatin1String(PLUGIN_SETTINGS_KEY), d->m_pluginSettings);
|
||||||
|
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -663,6 +667,19 @@ void Target::updateDefaultRunConfigurations()
|
|||||||
addRunConfiguration(rc);
|
addRunConfiguration(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QVariant Target::namedSettings(const QString &name) const
|
||||||
|
{
|
||||||
|
return d->m_pluginSettings.value(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Target::setNamedSettings(const QString &name, const QVariant &value)
|
||||||
|
{
|
||||||
|
if (value.isNull())
|
||||||
|
d->m_pluginSettings.remove(name);
|
||||||
|
else
|
||||||
|
d->m_pluginSettings.insert(name, value);
|
||||||
|
}
|
||||||
|
|
||||||
static QString formatToolTip(const IDevice::DeviceInfo &input)
|
static QString formatToolTip(const IDevice::DeviceInfo &input)
|
||||||
{
|
{
|
||||||
QStringList lines;
|
QStringList lines;
|
||||||
@@ -824,6 +841,9 @@ bool Target::fromMap(const QVariantMap &map)
|
|||||||
setActiveRunConfiguration(rc);
|
setActiveRunConfiguration(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (map.contains(QLatin1String(PLUGIN_SETTINGS_KEY)))
|
||||||
|
d->m_pluginSettings = map.value(QLatin1String(PLUGIN_SETTINGS_KEY)).toMap();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -116,6 +116,8 @@ public:
|
|||||||
void updateDefaultDeployConfigurations();
|
void updateDefaultDeployConfigurations();
|
||||||
void updateDefaultRunConfigurations();
|
void updateDefaultRunConfigurations();
|
||||||
|
|
||||||
|
QVariant namedSettings(const QString &name) const;
|
||||||
|
void setNamedSettings(const QString &name, const QVariant &value);
|
||||||
signals:
|
signals:
|
||||||
void targetEnabled(bool);
|
void targetEnabled(bool);
|
||||||
void iconChanged();
|
void iconChanged();
|
||||||
|
@@ -256,8 +256,7 @@ MetaInfo {
|
|||||||
version: "1.0"
|
version: "1.0"
|
||||||
requiredImport: "QtQuick.Controls"
|
requiredImport: "QtQuick.Controls"
|
||||||
|
|
||||||
Property { name: "width"; type: "int"; value: 360; }
|
|
||||||
Property { name: "height"; type: "int"; value: 50; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -288,9 +287,6 @@ MetaInfo {
|
|||||||
libraryIcon: ":/desktopplugin/images/toolbar.png"
|
libraryIcon: ":/desktopplugin/images/toolbar.png"
|
||||||
version: "1.0"
|
version: "1.0"
|
||||||
requiredImport: "QtQuick.Controls"
|
requiredImport: "QtQuick.Controls"
|
||||||
|
|
||||||
Property { name: "width"; type: "int"; value: 360; }
|
|
||||||
Property { name: "height"; type: "int"; value: 50; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -77,7 +77,7 @@ using namespace QmlJS;
|
|||||||
|
|
||||||
typedef QPair<PropertyName, TypeName> PropertyInfo;
|
typedef QPair<PropertyName, TypeName> PropertyInfo;
|
||||||
|
|
||||||
QList<PropertyInfo> getObjectTypes(const ObjectValue *ov, const ContextPtr &context, bool local = false);
|
QList<PropertyInfo> getObjectTypes(const ObjectValue *ov, const ContextPtr &context, bool local = false, int rec = 0);
|
||||||
|
|
||||||
static TypeName resolveTypeName(const ASTPropertyReference *ref, const ContextPtr &context, QList<PropertyInfo> &dotProperties)
|
static TypeName resolveTypeName(const ASTPropertyReference *ref, const ContextPtr &context, QList<PropertyInfo> &dotProperties)
|
||||||
{
|
{
|
||||||
@@ -219,7 +219,7 @@ QStringList prototypes(const ObjectValue *ov, const ContextPtr &context, bool ve
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<PropertyInfo> getQmlTypes(const CppComponentValue *objectValue, const ContextPtr &context, bool local = false)
|
QList<PropertyInfo> getQmlTypes(const CppComponentValue *objectValue, const ContextPtr &context, bool local = false, int rec = 0)
|
||||||
{
|
{
|
||||||
QList<PropertyInfo> propertyList;
|
QList<PropertyInfo> propertyList;
|
||||||
|
|
||||||
@@ -228,6 +228,9 @@ QList<PropertyInfo> getQmlTypes(const CppComponentValue *objectValue, const Cont
|
|||||||
if (objectValue->className().isEmpty())
|
if (objectValue->className().isEmpty())
|
||||||
return propertyList;
|
return propertyList;
|
||||||
|
|
||||||
|
if (rec > 2)
|
||||||
|
return propertyList;
|
||||||
|
|
||||||
PropertyMemberProcessor processor(context);
|
PropertyMemberProcessor processor(context);
|
||||||
objectValue->processMembers(&processor);
|
objectValue->processMembers(&processor);
|
||||||
|
|
||||||
@@ -239,7 +242,7 @@ QList<PropertyInfo> getQmlTypes(const CppComponentValue *objectValue, const Cont
|
|||||||
//dot property
|
//dot property
|
||||||
const CppComponentValue * qmlValue = value_cast<CppComponentValue>(objectValue->lookupMember(name, context));
|
const CppComponentValue * qmlValue = value_cast<CppComponentValue>(objectValue->lookupMember(name, context));
|
||||||
if (qmlValue) {
|
if (qmlValue) {
|
||||||
QList<PropertyInfo> dotProperties = getQmlTypes(qmlValue, context);
|
QList<PropertyInfo> dotProperties = getQmlTypes(qmlValue, context, false, rec + 1);
|
||||||
foreach (const PropertyInfo &propertyInfo, dotProperties) {
|
foreach (const PropertyInfo &propertyInfo, dotProperties) {
|
||||||
PropertyName dotName = propertyInfo.first;
|
PropertyName dotName = propertyInfo.first;
|
||||||
TypeName type = propertyInfo.second;
|
TypeName type = propertyInfo.second;
|
||||||
@@ -251,7 +254,7 @@ QList<PropertyInfo> getQmlTypes(const CppComponentValue *objectValue, const Cont
|
|||||||
if (isValueType(objectValue->propertyType(name))) {
|
if (isValueType(objectValue->propertyType(name))) {
|
||||||
const ObjectValue *dotObjectValue = value_cast<ObjectValue>(objectValue->lookupMember(name, context));
|
const ObjectValue *dotObjectValue = value_cast<ObjectValue>(objectValue->lookupMember(name, context));
|
||||||
if (dotObjectValue) {
|
if (dotObjectValue) {
|
||||||
QList<PropertyInfo> dotProperties = getObjectTypes(dotObjectValue, context);
|
QList<PropertyInfo> dotProperties = getObjectTypes(dotObjectValue, context, false, rec + 1);
|
||||||
foreach (const PropertyInfo &propertyInfo, dotProperties) {
|
foreach (const PropertyInfo &propertyInfo, dotProperties) {
|
||||||
PropertyName dotName = propertyInfo.first;
|
PropertyName dotName = propertyInfo.first;
|
||||||
TypeName type = propertyInfo.second;
|
TypeName type = propertyInfo.second;
|
||||||
@@ -272,9 +275,9 @@ QList<PropertyInfo> getQmlTypes(const CppComponentValue *objectValue, const Cont
|
|||||||
const CppComponentValue * qmlObjectValue = value_cast<CppComponentValue>(prototype);
|
const CppComponentValue * qmlObjectValue = value_cast<CppComponentValue>(prototype);
|
||||||
|
|
||||||
if (qmlObjectValue)
|
if (qmlObjectValue)
|
||||||
propertyList.append(getQmlTypes(qmlObjectValue, context));
|
propertyList.append(getQmlTypes(qmlObjectValue, context, false, rec + 1));
|
||||||
else
|
else
|
||||||
propertyList.append(getObjectTypes(prototype, context));
|
propertyList.append(getObjectTypes(prototype, context, false, rec + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
return propertyList;
|
return propertyList;
|
||||||
@@ -320,7 +323,7 @@ QList<PropertyInfo> getTypes(const ObjectValue *objectValue, const ContextPtr &c
|
|||||||
return propertyList;
|
return propertyList;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<PropertyInfo> getObjectTypes(const ObjectValue *objectValue, const ContextPtr &context, bool local)
|
QList<PropertyInfo> getObjectTypes(const ObjectValue *objectValue, const ContextPtr &context, bool local, int rec)
|
||||||
{
|
{
|
||||||
QList<PropertyInfo> propertyList;
|
QList<PropertyInfo> propertyList;
|
||||||
|
|
||||||
@@ -329,6 +332,9 @@ QList<PropertyInfo> getObjectTypes(const ObjectValue *objectValue, const Context
|
|||||||
if (objectValue->className().isEmpty())
|
if (objectValue->className().isEmpty())
|
||||||
return propertyList;
|
return propertyList;
|
||||||
|
|
||||||
|
if (rec > 2)
|
||||||
|
return propertyList;
|
||||||
|
|
||||||
PropertyMemberProcessor processor(context);
|
PropertyMemberProcessor processor(context);
|
||||||
objectValue->processMembers(&processor);
|
objectValue->processMembers(&processor);
|
||||||
|
|
||||||
@@ -343,9 +349,9 @@ QList<PropertyInfo> getObjectTypes(const ObjectValue *objectValue, const Context
|
|||||||
const CppComponentValue * qmlObjectValue = value_cast<CppComponentValue>(prototype);
|
const CppComponentValue * qmlObjectValue = value_cast<CppComponentValue>(prototype);
|
||||||
|
|
||||||
if (qmlObjectValue)
|
if (qmlObjectValue)
|
||||||
propertyList.append(getQmlTypes(qmlObjectValue, context));
|
propertyList.append(getQmlTypes(qmlObjectValue, context, local, rec + 1));
|
||||||
else
|
else
|
||||||
propertyList.append(getObjectTypes(prototype, context));
|
propertyList.append(getObjectTypes(prototype, context, local, rec + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
return propertyList;
|
return propertyList;
|
||||||
|
@@ -101,7 +101,7 @@ static inline bool checkIfDerivedFromItem(const QString &fileName)
|
|||||||
|
|
||||||
snapshot.insert(document);
|
snapshot.insert(document);
|
||||||
|
|
||||||
QmlJS::Link link(snapshot, QStringList(), QmlJS::ModelManagerInterface::instance()->builtins(document));
|
QmlJS::Link link(snapshot, modelManager->importPaths(), QmlJS::ModelManagerInterface::instance()->builtins(document));
|
||||||
|
|
||||||
QList<QmlJS::DiagnosticMessage> diagnosticLinkMessages;
|
QList<QmlJS::DiagnosticMessage> diagnosticLinkMessages;
|
||||||
QmlJS::ContextPtr context = link(document, &diagnosticLinkMessages);
|
QmlJS::ContextPtr context = link(document, &diagnosticLinkMessages);
|
||||||
@@ -116,15 +116,7 @@ static inline bool checkIfDerivedFromItem(const QString &fileName)
|
|||||||
if (!definition)
|
if (!definition)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
QString fullTypeName;
|
const QmlJS::ObjectValue *objectValue = context->lookupType(document.data(), definition->qualifiedTypeNameId);
|
||||||
for (QmlJS::AST::UiQualifiedId *iter = definition->qualifiedTypeNameId; iter; iter = iter->next)
|
|
||||||
if (!iter->name.isEmpty())
|
|
||||||
fullTypeName += iter->name.toString() + QLatin1Char('.');
|
|
||||||
|
|
||||||
if (fullTypeName.endsWith(QLatin1Char('.')))
|
|
||||||
fullTypeName.chop(1);
|
|
||||||
|
|
||||||
const QmlJS::ObjectValue *objectValue = context->lookupType(document.data(), fullTypeName.split('.'));
|
|
||||||
|
|
||||||
QList<const QmlJS::ObjectValue *> prototypes = QmlJS::PrototypeIterator(objectValue, context).all();
|
QList<const QmlJS::ObjectValue *> prototypes = QmlJS::PrototypeIterator(objectValue, context).all();
|
||||||
|
|
||||||
|
@@ -76,7 +76,6 @@ QtcPlugin {
|
|||||||
"qml/RangeMover.qml",
|
"qml/RangeMover.qml",
|
||||||
"qml/SelectionRange.qml",
|
"qml/SelectionRange.qml",
|
||||||
"qml/SelectionRangeDetails.qml",
|
"qml/SelectionRangeDetails.qml",
|
||||||
"qml/StatusDisplay.qml",
|
|
||||||
"qml/TimeDisplay.qml",
|
"qml/TimeDisplay.qml",
|
||||||
"qml/TimeMarks.qml",
|
"qml/TimeMarks.qml",
|
||||||
"qml/qmlprofiler.qrc",
|
"qml/qmlprofiler.qrc",
|
||||||
|
@@ -42,6 +42,7 @@ namespace Internal {
|
|||||||
|
|
||||||
class Qt4UiCodeModelSupport : public CppTools::UiCodeModelSupport
|
class Qt4UiCodeModelSupport : public CppTools::UiCodeModelSupport
|
||||||
{
|
{
|
||||||
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
Qt4UiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
|
Qt4UiCodeModelSupport(CppTools::CppModelManagerInterface *modelmanager,
|
||||||
Qt4Project *project,
|
Qt4Project *project,
|
||||||
|
@@ -716,7 +716,7 @@ bool ExamplesListModelFilter::filterAcceptsRow(int sourceRow, const QModelIndex
|
|||||||
|
|
||||||
if (!m_showTutorialsOnly) {
|
if (!m_showTutorialsOnly) {
|
||||||
int type = sourceModel()->index(sourceRow, 0, sourceParent).data(Type).toInt();
|
int type = sourceModel()->index(sourceRow, 0, sourceParent).data(Type).toInt();
|
||||||
if (type != Example)
|
if (type != Example && type != Demo)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -160,8 +160,7 @@ def selectBuildConfig(targetCount, currentTarget, configName):
|
|||||||
switchViewTo(ViewConstants.PROJECTS)
|
switchViewTo(ViewConstants.PROJECTS)
|
||||||
switchToBuildOrRunSettingsFor(targetCount, currentTarget, ProjectSettings.BUILD)
|
switchToBuildOrRunSettingsFor(targetCount, currentTarget, ProjectSettings.BUILD)
|
||||||
if selectFromCombo(":scrollArea.Edit build configuration:_QComboBox", configName):
|
if selectFromCombo(":scrollArea.Edit build configuration:_QComboBox", configName):
|
||||||
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}",
|
progressBarWait(30000)
|
||||||
"sourceFilesRefreshed(QStringList)")
|
|
||||||
return getQtInformationForBuildSettings(targetCount, True, ViewConstants.EDIT)
|
return getQtInformationForBuildSettings(targetCount, True, ViewConstants.EDIT)
|
||||||
|
|
||||||
# This will not trigger a rebuild. If needed, caller has to do this.
|
# This will not trigger a rebuild. If needed, caller has to do this.
|
||||||
|
@@ -175,7 +175,7 @@ def createProject_Qt_GUI(path, projectName, checks = True):
|
|||||||
expectedFiles.extend(__sortFilenamesOSDependent__(["main.cpp", cpp_file, h_file, ui_file, pro_file]))
|
expectedFiles.extend(__sortFilenamesOSDependent__(["main.cpp", cpp_file, h_file, ui_file, pro_file]))
|
||||||
__createProjectHandleLastPage__(expectedFiles)
|
__createProjectHandleLastPage__(expectedFiles)
|
||||||
|
|
||||||
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 20000)
|
progressBarWait(20000)
|
||||||
__verifyFileCreation__(path, expectedFiles)
|
__verifyFileCreation__(path, expectedFiles)
|
||||||
return checkedTargets
|
return checkedTargets
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ def createProject_Qt_Console(path, projectName, checks = True):
|
|||||||
expectedFiles.extend(__sortFilenamesOSDependent__([cpp_file, pro_file]))
|
expectedFiles.extend(__sortFilenamesOSDependent__([cpp_file, pro_file]))
|
||||||
__createProjectHandleLastPage__(expectedFiles)
|
__createProjectHandleLastPage__(expectedFiles)
|
||||||
|
|
||||||
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 10000)
|
progressBarWait(10000)
|
||||||
__verifyFileCreation__(path, expectedFiles)
|
__verifyFileCreation__(path, expectedFiles)
|
||||||
return checkedTargets
|
return checkedTargets
|
||||||
|
|
||||||
@@ -224,7 +224,7 @@ def createNewQtQuickApplication(workingDir, projectName = None, templateFile = N
|
|||||||
clickButton(nextButton)
|
clickButton(nextButton)
|
||||||
__createProjectHandleLastPage__()
|
__createProjectHandleLastPage__()
|
||||||
|
|
||||||
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 10000)
|
progressBarWait(10000)
|
||||||
return checkedTargets, projectName
|
return checkedTargets, projectName
|
||||||
|
|
||||||
def createNewQtQuickUI(workingDir):
|
def createNewQtQuickUI(workingDir):
|
||||||
|
@@ -609,9 +609,9 @@ def checkIfObjectExists(name, shouldExist = True, timeout = 3000, verboseOnFail
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
# wait for progress bar(s) to appear and disappear
|
# wait for progress bar(s) to appear and disappear
|
||||||
def progressBarWait():
|
def progressBarWait(timeout=60000):
|
||||||
checkIfObjectExists("{type='Core::Internal::ProgressBar' unnamed='1'}", True, 2000)
|
checkIfObjectExists("{type='Core::Internal::ProgressBar' unnamed='1'}", True, 2000)
|
||||||
checkIfObjectExists("{type='Core::Internal::ProgressBar' unnamed='1'}", False, 60000)
|
checkIfObjectExists("{type='Core::Internal::ProgressBar' unnamed='1'}", False, timeout)
|
||||||
|
|
||||||
def readFile(filename):
|
def readFile(filename):
|
||||||
f = open(filename, "r")
|
f = open(filename, "r")
|
||||||
|
@@ -19,7 +19,7 @@ def main():
|
|||||||
openQmakeProject(examplePath)
|
openQmakeProject(examplePath)
|
||||||
installLazySignalHandler("{type='Core::FutureProgress' unnamed='1'}", "finished()", "__handleFutureProgress__")
|
installLazySignalHandler("{type='Core::FutureProgress' unnamed='1'}", "finished()", "__handleFutureProgress__")
|
||||||
# wait for parsing to complete
|
# wait for parsing to complete
|
||||||
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
|
progressBarWait(30000)
|
||||||
# open .cpp file in editor
|
# open .cpp file in editor
|
||||||
if not openDocument("propertyanimation.Sources.main\\.cpp"):
|
if not openDocument("propertyanimation.Sources.main\\.cpp"):
|
||||||
test.fatal("Could not open main.cpp")
|
test.fatal("Could not open main.cpp")
|
||||||
|
@@ -17,7 +17,7 @@ def main():
|
|||||||
# open example project
|
# open example project
|
||||||
openQmakeProject(examplePath)
|
openQmakeProject(examplePath)
|
||||||
# wait for parsing to complete
|
# wait for parsing to complete
|
||||||
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
|
progressBarWait(30000)
|
||||||
# open .cpp file in editor
|
# open .cpp file in editor
|
||||||
if not openDocument("propertyanimation.Sources.main\\.cpp"):
|
if not openDocument("propertyanimation.Sources.main\\.cpp"):
|
||||||
test.fatal("Could not open main.cpp")
|
test.fatal("Could not open main.cpp")
|
||||||
|
@@ -28,8 +28,7 @@ def main():
|
|||||||
# select "Create Project" and try to create a new project.
|
# select "Create Project" and try to create a new project.
|
||||||
# create Qt Quick application from "Welcome" page -> "Develop" tab
|
# create Qt Quick application from "Welcome" page -> "Develop" tab
|
||||||
createNewQtQuickApplication(tempDir(), "SampleApp", fromWelcome = True)
|
createNewQtQuickApplication(tempDir(), "SampleApp", fromWelcome = True)
|
||||||
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}",
|
progressBarWait(30000)
|
||||||
"sourceFilesRefreshed(QStringList)")
|
|
||||||
test.verify(checkIfObjectExists("{column='0' container=':Qt Creator_Utils::NavigationTreeView'"
|
test.verify(checkIfObjectExists("{column='0' container=':Qt Creator_Utils::NavigationTreeView'"
|
||||||
" text~='SampleApp( \(.*\))?' type='QModelIndex'}"),
|
" text~='SampleApp( \(.*\))?' type='QModelIndex'}"),
|
||||||
"Verifying: The project is opened in 'Edit' mode after configuring.")
|
"Verifying: The project is opened in 'Edit' mode after configuring.")
|
||||||
@@ -42,8 +41,7 @@ def main():
|
|||||||
examplePath = os.path.join(prepareTemplate(sourceExample), "propertyanimation.pro")
|
examplePath = os.path.join(prepareTemplate(sourceExample), "propertyanimation.pro")
|
||||||
# open example project from "Welcome" page -> "Develop" tab
|
# open example project from "Welcome" page -> "Develop" tab
|
||||||
openQmakeProject(examplePath, fromWelcome = True)
|
openQmakeProject(examplePath, fromWelcome = True)
|
||||||
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}",
|
progressBarWait(30000)
|
||||||
"sourceFilesRefreshed(QStringList)")
|
|
||||||
test.verify(checkIfObjectExists("{column='0' container=':Qt Creator_Utils::NavigationTreeView'"
|
test.verify(checkIfObjectExists("{column='0' container=':Qt Creator_Utils::NavigationTreeView'"
|
||||||
" text~='propertyanimation( \(.*\))?' type='QModelIndex'}"),
|
" text~='propertyanimation( \(.*\))?' type='QModelIndex'}"),
|
||||||
"Verifying: The project is opened in 'Edit' mode after configuring.")
|
"Verifying: The project is opened in 'Edit' mode after configuring.")
|
||||||
|
@@ -19,9 +19,8 @@ def main():
|
|||||||
overrideInstallLazySignalHandler()
|
overrideInstallLazySignalHandler()
|
||||||
installLazySignalHandler(":Qt Creator_CppEditor::Internal::CPPEditorWidget", "textChanged()",
|
installLazySignalHandler(":Qt Creator_CppEditor::Internal::CPPEditorWidget", "textChanged()",
|
||||||
"__handleTextChanged__")
|
"__handleTextChanged__")
|
||||||
prepareForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
|
|
||||||
openQmakeProject(proFile)
|
openQmakeProject(proFile)
|
||||||
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 20000)
|
progressBarWait(20000)
|
||||||
selectFromLocator("dummy.cpp")
|
selectFromLocator("dummy.cpp")
|
||||||
|
|
||||||
## Waiting for a solution from Froglogic to make the below work.
|
## Waiting for a solution from Froglogic to make the below work.
|
||||||
|
@@ -21,7 +21,7 @@ def main():
|
|||||||
if platform.system() in ('Windows', 'Microsoft'):
|
if platform.system() in ('Windows', 'Microsoft'):
|
||||||
suitableKits |= Targets.DESKTOP_474_MSVC2008
|
suitableKits |= Targets.DESKTOP_474_MSVC2008
|
||||||
checkedTargets = openQmakeProject(SpeedCrunchPath, suitableKits)
|
checkedTargets = openQmakeProject(SpeedCrunchPath, suitableKits)
|
||||||
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
|
progressBarWait(30000)
|
||||||
|
|
||||||
fancyToolButton = waitForObject(":*Qt Creator_Core::Internal::FancyToolButton")
|
fancyToolButton = waitForObject(":*Qt Creator_Core::Internal::FancyToolButton")
|
||||||
|
|
||||||
|
@@ -21,7 +21,7 @@ def main():
|
|||||||
test.fatal("Could not open/create cmake project - leaving test")
|
test.fatal("Could not open/create cmake project - leaving test")
|
||||||
invokeMenuItem("File", "Exit")
|
invokeMenuItem("File", "Exit")
|
||||||
return
|
return
|
||||||
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
|
progressBarWait(30000)
|
||||||
|
|
||||||
# Invoke a rebuild of the application
|
# Invoke a rebuild of the application
|
||||||
invokeMenuItem("Build", "Rebuild All")
|
invokeMenuItem("Build", "Rebuild All")
|
||||||
|
@@ -12,10 +12,10 @@ def main():
|
|||||||
|
|
||||||
openQmakeProject(pathSpeedcrunch)
|
openQmakeProject(pathSpeedcrunch)
|
||||||
# Wait for parsing to complete
|
# Wait for parsing to complete
|
||||||
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
|
progressBarWait(30000)
|
||||||
openQmakeProject(pathCreator)
|
openQmakeProject(pathCreator)
|
||||||
# Wait for parsing to complete
|
# Wait for parsing to complete
|
||||||
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 300000)
|
progressBarWait(300000)
|
||||||
|
|
||||||
naviTreeView = "{column='0' container=':Qt Creator_Utils::NavigationTreeView' text~='%s' type='QModelIndex'}"
|
naviTreeView = "{column='0' container=':Qt Creator_Utils::NavigationTreeView' text~='%s' type='QModelIndex'}"
|
||||||
compareProjectTree(naviTreeView % "speedcrunch( \(\S+\))?", "projecttree_speedcrunch.tsv")
|
compareProjectTree(naviTreeView % "speedcrunch( \(\S+\))?", "projecttree_speedcrunch.tsv")
|
||||||
|
@@ -7,7 +7,7 @@ def main():
|
|||||||
# using a temporary directory won't mess up a potentially existing
|
# using a temporary directory won't mess up a potentially existing
|
||||||
createNewQmlExtension(tempDir())
|
createNewQmlExtension(tempDir())
|
||||||
# wait for parsing to complete
|
# wait for parsing to complete
|
||||||
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
|
progressBarWait(30000)
|
||||||
test.log("Building project")
|
test.log("Building project")
|
||||||
invokeMenuItem("Build","Build All")
|
invokeMenuItem("Build","Build All")
|
||||||
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
|
waitForSignal("{type='ProjectExplorer::BuildManager' unnamed='1'}", "buildQueueFinished(bool)")
|
||||||
|
Reference in New Issue
Block a user