Merge remote-tracking branch 'origin/2.6'

This commit is contained in:
Eike Ziller
2012-12-05 10:39:22 +01:00
8 changed files with 12 additions and 25 deletions

View File

@@ -170,7 +170,7 @@ void QmlProject::refresh(RefreshOptions options)
QmlJS::ModelManagerInterface::ProjectInfo pinfo(this);
pinfo.sourceFiles = files();
pinfo.importPaths = importPaths();
pinfo.importPaths = customImportPaths();
QtSupport::BaseQtVersion *version = 0;
if (activeTarget()) {
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(activeTarget()->kit());
@@ -220,26 +220,12 @@ bool QmlProject::validProjectFile() const
return !m_projectItem.isNull();
}
QStringList QmlProject::importPaths() const
QStringList QmlProject::customImportPaths() const
{
QStringList importPaths;
if (m_projectItem)
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;
}

View File

@@ -86,7 +86,7 @@ public:
QDir projectDir() const;
QStringList files() const;
QString mainFile() const;
QStringList importPaths() const;
QStringList customImportPaths() const;
bool addFiles(const QStringList &filePaths);

View File

@@ -144,7 +144,7 @@ QString QmlProjectRunConfiguration::viewerArguments() const
// arguments from .qmlproject file
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, importPath);
}

View File

@@ -54,8 +54,7 @@ def modifyRunSettingsForHookInto(projectName, port):
switchViewTo(ViewConstants.EDIT)
return result
def modifyRunSettingsForHookIntoQtQuickUI(projectName, port):
global workingDir
def modifyRunSettingsForHookIntoQtQuickUI(workingDir, projectName, port):
switchViewTo(ViewConstants.PROJECTS)
switchToBuildOrRunSettingsFor(1, 0, ProjectSettings.RUN, True)

View File

@@ -223,7 +223,7 @@ def createNewQtQuickApplication(workingDir, projectName = None, templateFile = N
return projectName
def createNewQtQuickUI(workingDir):
__createProjectOrFileSelectType__(" Applications", "Qt Quick UI")
__createProjectOrFileSelectType__(" Applications", "Qt Quick 1 UI")
if workingDir == None:
workingDir = tempDir()
projectName = __createProjectSetNameAndPath__(workingDir)
@@ -231,7 +231,7 @@ def createNewQtQuickUI(workingDir):
return projectName
def createNewQmlExtension(workingDir):
available = __createProjectOrFileSelectType__(" Libraries", "Custom QML Extension Plugin")
available = __createProjectOrFileSelectType__(" Libraries", "Qt Quick 1 Extension Plugin")
if workingDir == None:
workingDir = tempDir()
__createProjectSetNameAndPath__(workingDir)

View File

@@ -3,3 +3,6 @@
"creator/qtcreator.pri"
"creator/doc/snippets/qml/list-of-transitions.qml"
"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"
1 filename
3 creator/qtcreator.pri
4 creator/doc/snippets/qml/list-of-transitions.qml
5 creator/share/qtcreator/glsl/glsl_120.frag
6 creator/tests/manual/cplusplus-frontend/conf.c++
7 creator/src/plugins/coreplugin/basefilewizard.cpp
8 creator/src/plugins/coreplugin/basefilewizard.h

View File

@@ -34,7 +34,7 @@ def main():
for template in dumpItems(templatesView.model(), templatesView.rootIndex()):
template = template.replace(".", "\\.")
# 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
availableProjectTypes.append({category:template})
clickButton(waitForObject("{text='Cancel' type='QPushButton' unnamed='1' visible='1'}"))

View File

@@ -1,13 +1,12 @@
source("../../shared/qtcreator.py")
def main():
global workingDir
startApplication("qtcreator" + SettingsPath)
# using a temporary directory won't mess up a potentially existing
workingDir = tempDir()
projectName = createNewQtQuickUI(workingDir)
test.log("Running project")
qmlViewer = modifyRunSettingsForHookIntoQtQuickUI(projectName, 11223)
qmlViewer = modifyRunSettingsForHookIntoQtQuickUI(workingDir, projectName, 11223)
if qmlViewer!=None:
qmlViewerPath = os.path.dirname(qmlViewer)
qmlViewer = os.path.basename(qmlViewer)