forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/2.6'
This commit is contained in:
@@ -170,7 +170,7 @@ void QmlProject::refresh(RefreshOptions options)
|
|||||||
|
|
||||||
QmlJS::ModelManagerInterface::ProjectInfo pinfo(this);
|
QmlJS::ModelManagerInterface::ProjectInfo pinfo(this);
|
||||||
pinfo.sourceFiles = files();
|
pinfo.sourceFiles = files();
|
||||||
pinfo.importPaths = importPaths();
|
pinfo.importPaths = customImportPaths();
|
||||||
QtSupport::BaseQtVersion *version = 0;
|
QtSupport::BaseQtVersion *version = 0;
|
||||||
if (activeTarget()) {
|
if (activeTarget()) {
|
||||||
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(activeTarget()->kit());
|
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(activeTarget()->kit());
|
||||||
@@ -220,26 +220,12 @@ bool QmlProject::validProjectFile() const
|
|||||||
return !m_projectItem.isNull();
|
return !m_projectItem.isNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList QmlProject::importPaths() const
|
QStringList QmlProject::customImportPaths() const
|
||||||
{
|
{
|
||||||
QStringList importPaths;
|
QStringList importPaths;
|
||||||
if (m_projectItem)
|
if (m_projectItem)
|
||||||
importPaths = m_projectItem.data()->importPaths();
|
importPaths = m_projectItem.data()->importPaths();
|
||||||
|
|
||||||
// add the default import path for the target Qt version
|
|
||||||
if (activeTarget()) {
|
|
||||||
const QmlProjectRunConfiguration *runConfig =
|
|
||||||
qobject_cast<QmlProjectRunConfiguration*>(activeTarget()->activeRunConfiguration());
|
|
||||||
if (runConfig) {
|
|
||||||
const QtSupport::BaseQtVersion *qtVersion = runConfig->qtVersion();
|
|
||||||
if (qtVersion && qtVersion->isValid()) {
|
|
||||||
const QString qtVersionImportPath = qtVersion->qmakeProperty("QT_INSTALL_IMPORTS");
|
|
||||||
if (!qtVersionImportPath.isEmpty())
|
|
||||||
importPaths += qtVersionImportPath;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return importPaths;
|
return importPaths;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public:
|
|||||||
QDir projectDir() const;
|
QDir projectDir() const;
|
||||||
QStringList files() const;
|
QStringList files() const;
|
||||||
QString mainFile() const;
|
QString mainFile() const;
|
||||||
QStringList importPaths() const;
|
QStringList customImportPaths() const;
|
||||||
|
|
||||||
bool addFiles(const QStringList &filePaths);
|
bool addFiles(const QStringList &filePaths);
|
||||||
|
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ QString QmlProjectRunConfiguration::viewerArguments() const
|
|||||||
|
|
||||||
// arguments from .qmlproject file
|
// arguments from .qmlproject file
|
||||||
QmlProject *project = static_cast<QmlProject *>(target()->project());
|
QmlProject *project = static_cast<QmlProject *>(target()->project());
|
||||||
foreach (const QString &importPath, project->importPaths()) {
|
foreach (const QString &importPath, project->customImportPaths()) {
|
||||||
Utils::QtcProcess::addArg(&args, "-I");
|
Utils::QtcProcess::addArg(&args, "-I");
|
||||||
Utils::QtcProcess::addArg(&args, importPath);
|
Utils::QtcProcess::addArg(&args, importPath);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,8 +54,7 @@ def modifyRunSettingsForHookInto(projectName, port):
|
|||||||
switchViewTo(ViewConstants.EDIT)
|
switchViewTo(ViewConstants.EDIT)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def modifyRunSettingsForHookIntoQtQuickUI(projectName, port):
|
def modifyRunSettingsForHookIntoQtQuickUI(workingDir, projectName, port):
|
||||||
global workingDir
|
|
||||||
switchViewTo(ViewConstants.PROJECTS)
|
switchViewTo(ViewConstants.PROJECTS)
|
||||||
switchToBuildOrRunSettingsFor(1, 0, ProjectSettings.RUN, True)
|
switchToBuildOrRunSettingsFor(1, 0, ProjectSettings.RUN, True)
|
||||||
|
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ def createNewQtQuickApplication(workingDir, projectName = None, templateFile = N
|
|||||||
return projectName
|
return projectName
|
||||||
|
|
||||||
def createNewQtQuickUI(workingDir):
|
def createNewQtQuickUI(workingDir):
|
||||||
__createProjectOrFileSelectType__(" Applications", "Qt Quick UI")
|
__createProjectOrFileSelectType__(" Applications", "Qt Quick 1 UI")
|
||||||
if workingDir == None:
|
if workingDir == None:
|
||||||
workingDir = tempDir()
|
workingDir = tempDir()
|
||||||
projectName = __createProjectSetNameAndPath__(workingDir)
|
projectName = __createProjectSetNameAndPath__(workingDir)
|
||||||
@@ -231,7 +231,7 @@ def createNewQtQuickUI(workingDir):
|
|||||||
return projectName
|
return projectName
|
||||||
|
|
||||||
def createNewQmlExtension(workingDir):
|
def createNewQmlExtension(workingDir):
|
||||||
available = __createProjectOrFileSelectType__(" Libraries", "Custom QML Extension Plugin")
|
available = __createProjectOrFileSelectType__(" Libraries", "Qt Quick 1 Extension Plugin")
|
||||||
if workingDir == None:
|
if workingDir == None:
|
||||||
workingDir = tempDir()
|
workingDir = tempDir()
|
||||||
__createProjectSetNameAndPath__(workingDir)
|
__createProjectSetNameAndPath__(workingDir)
|
||||||
|
|||||||
@@ -3,3 +3,6 @@
|
|||||||
"creator/qtcreator.pri"
|
"creator/qtcreator.pri"
|
||||||
"creator/doc/snippets/qml/list-of-transitions.qml"
|
"creator/doc/snippets/qml/list-of-transitions.qml"
|
||||||
"creator/share/qtcreator/glsl/glsl_120.frag"
|
"creator/share/qtcreator/glsl/glsl_120.frag"
|
||||||
|
"creator/tests/manual/cplusplus-frontend/conf.c++"
|
||||||
|
"creator/src/plugins/coreplugin/basefilewizard.cpp"
|
||||||
|
"creator/src/plugins/coreplugin/basefilewizard.h"
|
||||||
|
|||||||
|
@@ -34,7 +34,7 @@ def main():
|
|||||||
for template in dumpItems(templatesView.model(), templatesView.rootIndex()):
|
for template in dumpItems(templatesView.model(), templatesView.rootIndex()):
|
||||||
template = template.replace(".", "\\.")
|
template = template.replace(".", "\\.")
|
||||||
# skip non-configurable
|
# skip non-configurable
|
||||||
if "Qt Quick UI" in template or "Plain C" in template:
|
if "Qt Quick 1 UI" in template or "Plain C" in template:
|
||||||
continue
|
continue
|
||||||
availableProjectTypes.append({category:template})
|
availableProjectTypes.append({category:template})
|
||||||
clickButton(waitForObject("{text='Cancel' type='QPushButton' unnamed='1' visible='1'}"))
|
clickButton(waitForObject("{text='Cancel' type='QPushButton' unnamed='1' visible='1'}"))
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
source("../../shared/qtcreator.py")
|
source("../../shared/qtcreator.py")
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
global workingDir
|
|
||||||
startApplication("qtcreator" + SettingsPath)
|
startApplication("qtcreator" + SettingsPath)
|
||||||
# using a temporary directory won't mess up a potentially existing
|
# using a temporary directory won't mess up a potentially existing
|
||||||
workingDir = tempDir()
|
workingDir = tempDir()
|
||||||
projectName = createNewQtQuickUI(workingDir)
|
projectName = createNewQtQuickUI(workingDir)
|
||||||
test.log("Running project")
|
test.log("Running project")
|
||||||
qmlViewer = modifyRunSettingsForHookIntoQtQuickUI(projectName, 11223)
|
qmlViewer = modifyRunSettingsForHookIntoQtQuickUI(workingDir, projectName, 11223)
|
||||||
if qmlViewer!=None:
|
if qmlViewer!=None:
|
||||||
qmlViewerPath = os.path.dirname(qmlViewer)
|
qmlViewerPath = os.path.dirname(qmlViewer)
|
||||||
qmlViewer = os.path.basename(qmlViewer)
|
qmlViewer = os.path.basename(qmlViewer)
|
||||||
|
|||||||
Reference in New Issue
Block a user