Commit 054ed354 authored by Eike Ziller's avatar Eike Ziller
Browse files

Merge remote-tracking branch 'origin/3.5'

Change-Id: I30148c16cbb66ef670caaf1c74dccff47069bf68
parents e818a4ed 73fbf3af
broot=${PWD}
source=${broot}/source
targets=x86_64-unknown-linux-gnu i686-unknown-linux-gnu arm-none-linux-gnueabi
targets=x86_64-unknown-linux-gnu,i686-unknown-linux-gnu,arm-none-linux-gnueabi
staging=${broot}/staging
pyversion=2.7
expatversion=2.1.0
arch=`uname -sm | sed 's/ /-/g' | tr A-Z a-z`
version=7.9
version=7.10
targetdir=${broot}/qtcreator-gdb-${version}
gdbtargets=$(addprefix ${targetdir}/gdb-, ${targets})
packagename=qtcreator-gdb-${version}-${arch}.tar.gz
all:package
......@@ -68,19 +67,19 @@ ${staging}/gdb-${version}/configure: ${source}/gdb-${version}.tar.xz | makestagi
cd gdb-${version} && \
touch configure
${gdbtargets}: ${targetdir}/gdb-%: ${staging}/gdb-${version}/configure ${staging}/lib/libpython${pyversion}.a ${staging}/lib/libexpat.a | maketargetdir
test -e ${staging}/gdb-${version}-$* || mkdir ${staging}/gdb-${version}-$*
${targetdir}/gdb: ${staging}/gdb-${version}/configure ${staging}/lib/libpython${pyversion}.a ${staging}/lib/libexpat.a | maketargetdir
test -e ${staging}/gdb-${version}-build || mkdir ${staging}/gdb-${version}-build
export PYTHONHOME=${staging} && \
export PATH="${staging}/bin/:$$PATH" && \
export LDFLAGS="-Wl,--no-as-needed -pthread -lm" && \
cd ${staging}/gdb-${version}-$* && \
${staging}/gdb-${version}/configure --disable-nls --target=$* --with-separate-debug-dir="" \
cd ${staging}/gdb-${version}-build && \
${staging}/gdb-${version}/configure --disable-nls --enable-targets=${targets} --with-separate-debug-dir="" \
--disable-werror --with-python=${staging} --with-libexpat-prefix=${staging} && \
sleep 3 && \
${MAKE} MAKEFLAGS+=-j1 && \
strip -o ${targetdir}/gdb-$* gdb/gdb
strip -o ${targetdir}/gdb gdb/gdb
package: ${gdbtargets} ${targetdir}/python/include/python${pyversion}/pyconfig.h
package: ${targetdir}/gdb ${targetdir}/python/include/python${pyversion}/pyconfig.h
mv ${targetdir} ${targetdir}-${arch}
echo "Packing..."
tar czf ${packagename} qtcreator-gdb-${version}-${arch}
......
broot=${PWD}
source=${broot}/source
targets=arm-none-eabi arm-none-linux-gnueabi i686-pc-mingw32
targets=arm-none-eabi,arm-none-linux-gnueabi,i686-pc-mingw32
staging=${broot}/staging
pyversion=2.7
pydir=${broot}/python
expatversion=2.1.0
iconvversion=1.14
version=7.9
version=7.10
targetdir=${broot}/qtcreator-gdb-${version}
gdbtargets=$(addprefix ${targetdir}/gdb-, ${targets})
packageparts=${targetdir}/lib ${targetdir}/data-directory ${targetdir}/libiconv-2.dll ${targetdir}/python27.dll ${targetdir}/libexpat-1.dll
arch=`uname -sm | sed 's/ /-/g' | tr A-Z a-z`
packagename=qtcreator-gdb-${version}-${arch}.tar.gz
......@@ -90,13 +89,13 @@ ${staging}/lib/libexpat.a: ${source}/expat-${expatversion}.tar.gz | makestagingd
./configure -prefix=${staging} --enable-static --build=i686-pc-mingw32 && \
${MAKE} && ${MAKE} install
${gdbtargets}: ${targetdir}/gdb-%: ${staging}/lib/libexpat.a ${staging}/lib/libiconv.a ${staging}/gdb-${version}/configure | maketargetdir ${broot}/python/python.exe
test -e ${staging}/gdb-${version}-$* || mkdir ${staging}/gdb-${version}-$*
${targetdir}/gdb.exe: ${staging}/lib/libexpat.a ${staging}/lib/libiconv.a ${staging}/gdb-${version}/configure | maketargetdir ${broot}/python/python.exe
test -e ${staging}/gdb-${version}-build || mkdir ${staging}/gdb-${version}-build
export PYTHONHOME=${pydir} && \
LDFLAGS="L${pydir} -lpthread -ldl -lutil -lpython27" && \
CFLAGS="-I${pydir}/include" && \
cd ${staging}/gdb-${version}-$* && \
${staging}/gdb-${version}/configure --target=$* --disable-nls --disable-werror --build=i686-pc-mingw32 \
cd ${staging}/gdb-${version}-build && \
${staging}/gdb-${version}/configure --enable-targets=${targets} --disable-nls --disable-werror --build=i686-pc-mingw32 \
--with-libiconv-prefix=${staging} \
--with-expat --with-libexpat-prefix=${staging} \
--with-separate-debug-dir="" \
......@@ -104,13 +103,13 @@ ${gdbtargets}: ${targetdir}/gdb-%: ${staging}/lib/libexpat.a ${staging}/lib/libi
${MAKE} MAKEFLAGS+= -j1 && \
strip -o ${targetdir}/gdb-$*.exe gdb/gdb.exe
package: ${gdbtargets} ${broot}/python/python.exe
package: ${targetdir}/gdb.exe ${broot}/python/python.exe
cp ${staging}/bin/libiconv* ${targetdir} && \
cp ${staging}/bin/libexpat* ${targetdir} && \
cp ${pydir}/python*.dll ${targetdir} && \
cp -r ${pydir}/lib ${targetdir} && \
mkdir -p ${targetdir}/data-directory && \
cp -r ${staging}/gdb-${version}-i686-pc-mingw32/gdb/data-directory/{python,syscalls} ${targetdir}/data-directory && \
cp -r ${staging}/gdb-${version}-build/gdb/data-directory/{python,syscalls} ${targetdir}/data-directory && \
mv ${targetdir} ${targetdir}-${arch} && \
echo "Packing..." && \
tar czf ${packagename} qtcreator-gdb-${version}-${arch} && \
......
broot=${PWD}
source=${broot}/source
targets=x86_64-unknown-linux-gnu i686-unknown-linux-gnu arm-none-linux-gnueabi x86_64-apple-darwin10
targets=x86_64-unknown-linux-gnu,i686-unknown-linux-gnu,arm-none-linux-gnueabi,x86_64-apple-darwin10
staging=${broot}/staging
pyversion=2.7
expatversion=2.1.0
arch=`uname -sm | sed 's/ /-/g' | tr A-Z a-z`
version=7.9
version=7.10
targetdir=${broot}/qtcreator-gdb-${version}
gdbtargets=$(addprefix ${targetdir}/gdb-, ${targets})
packagename=qtcreator-gdb-${version}-${arch}.tar.gz
all:package
......@@ -67,17 +66,17 @@ ${staging}/gdb-${version}/configure: ${source}/gdb-${version}.tar.xz | makestagi
cd gdb-${version} && \
touch configure
${gdbtargets}: ${targetdir}/gdb-%: ${staging}/gdb-${version}/configure ${staging}/lib/libpython${pyversion}.a ${staging}/lib/libexpat.a | maketargetdir
test -e ${staging}/gdb-${version}-$* || mkdir ${staging}/gdb-${version}-$*
${targetdir}/gdb: ${staging}/gdb-${version}/configure ${staging}/lib/libpython${pyversion}.a ${staging}/lib/libexpat.a | maketargetdir
test -e ${staging}/gdb-${version}-build || mkdir ${staging}/gdb-${version}-build
export PYTHONHOME=${staging} && \
export PATH="${staging}/bin/:$$PATH" && \
cd ${staging}/gdb-${version}-$* && \
${staging}/gdb-${version}/configure --disable-nls --target=$* --with-separate-debug-dir="" \
cd ${staging}/gdb-${version}-build && \
${staging}/gdb-${version}/configure --disable-nls --enable-targets=${targets} --with-separate-debug-dir="" \
--disable-werror --with-python=${staging} --with-libexpat-prefix=${staging} && \
${MAKE} MAKEFLAGS+=-j1 && \
strip -o ${targetdir}/gdb-$* gdb/gdb
strip -o ${targetdir}/gdb gdb/gdb
package: ${gdbtargets} ${targetdir}/python/include/python${pyversion}/pyconfig.h
package: ${targetdir}/gdb ${targetdir}/python/include/python${pyversion}/pyconfig.h
mv ${targetdir} ${targetdir}-${arch}
echo "Packing..."
tar czf ${packagename} qtcreator-gdb-${version}-${arch}
......
......@@ -115,8 +115,6 @@
\li qtcreator
\li qtc-debugging-helper
\li qtc-qmldump
\endlist
......
......@@ -570,7 +570,7 @@ private:
LookupScopePrivate *nestedType(const Name *name, LookupScopePrivate *origin);
LookupScopePrivate *findSpecialization(const Template *baseTemplate, const TemplateNameId *templId,
LookupScopePrivate *findSpecialization(const TemplateNameId *templId,
const TemplateNameIdTable &specializations,
LookupScopePrivate *origin);
......@@ -1001,11 +1001,13 @@ LookupScope *LookupScopePrivate::lookupType_helper(
}
if (const QualifiedNameId *qName = name->asQualifiedNameId()) {
ProcessedSet innerProcessed;
if (! qName->base())
return globalNamespace()->d->lookupType_helper(qName->name(), processed, true, origin);
return globalNamespace()->d->lookupType_helper(qName->name(), &innerProcessed, true, origin);
if (LookupScope *binding = lookupType_helper(qName->base(), processed, true, origin))
return binding->d->lookupType_helper(qName->name(), processed, false, origin);
return binding->d->lookupType_helper(qName->name(), &innerProcessed, false, origin);
return 0;
......@@ -1017,7 +1019,7 @@ LookupScope *LookupScopePrivate::lookupType_helper(
foreach (Symbol *s, _symbols) {
if (Class *klass = s->asClass()) {
if (klass->name() && klass->name()->match(name))
if (klass->identifier() && klass->identifier()->match(name->identifier()))
return q;
}
}
......@@ -1051,29 +1053,9 @@ LookupScope *LookupScopePrivate::lookupType_helper(
return 0;
}
static const NamedType *dereference(const FullySpecifiedType &type)
static LookupScopePrivate *findSpecializationWithMatchingTemplateArgument(
const Name *argumentName, LookupScopePrivate *reference)
{
FullySpecifiedType ty = type;
forever {
if (PointerType *pointer = ty->asPointerType())
ty = pointer->elementType();
else if (ReferenceType *reference = ty->asReferenceType())
ty = reference->elementType();
else if (ArrayType *array = ty->asArrayType())
ty = array->elementType();
else if (const NamedType *namedType = ty->asNamedType())
return namedType;
else
break;
}
return 0;
}
static bool findTemplateArgument(const NamedType *namedType, LookupScopePrivate *reference)
{
if (!namedType)
return false;
const Name *argumentName = namedType->name();
foreach (Symbol *s, reference->_symbols) {
if (Class *clazz = s->asClass()) {
if (Template *templateSpecialization = clazz->enclosingTemplate()) {
......@@ -1084,67 +1066,67 @@ static bool findTemplateArgument(const NamedType *namedType, LookupScopePrivate
= templateSpecialization->templateParameterAt(i)->asTypenameArgument()) {
if (const Name *name = tParam->name()) {
if (compareName(name, argumentName))
return true;
return reference;
}
}
}
}
}
}
return false;
}
static bool matchTypes(const FullySpecifiedType &instantiation,
const FullySpecifiedType &specialization)
{
if (specialization.match(instantiation))
return true;
if (const NamedType *specName = specialization->asNamedType()) {
if (const NamedType *initName = instantiation->asNamedType()) {
if (specName->name()->identifier()->match(initName->name()->identifier()))
return true;
}
}
return false;
return 0;
}
LookupScopePrivate *LookupScopePrivate::findSpecialization(
const Template *baseTemplate,
const TemplateNameId *templId,
const TemplateNameIdTable &specializations,
LookupScopePrivate *origin)
{
Clone cloner(_factory->control().data());
for (TemplateNameIdTable::const_iterator cit = specializations.begin();
cit != specializations.end(); ++cit) {
const TemplateNameId *specializationNameId = cit->first;
const unsigned specializationTemplateArgumentCount
= specializationNameId->templateArgumentCount();
Subst subst(_factory->control().data());
bool match = true;
for (unsigned i = 0; i < specializationTemplateArgumentCount && match; ++i) {
const unsigned initializationTemplateArgumentCount = templId->templateArgumentCount();
// for now it works only when we have the same number of arguments in specialization
// and initialization(in future it should be more clever)
if (specializationTemplateArgumentCount != initializationTemplateArgumentCount)
continue;
for (unsigned i = 0; i < initializationTemplateArgumentCount; ++i) {
const FullySpecifiedType &specializationTemplateArgument
= specializationNameId->templateArgumentAt(i);
FullySpecifiedType initializationTemplateArgument =
_factory->resolveTemplateArgument(cloner, subst, origin ? origin->q : 0,
baseTemplate, templId, i);
FullySpecifiedType initializationTemplateArgument = templId->templateArgumentAt(i);
TypeResolver typeResolver(*_factory);
Scope *scope = 0;
typeResolver.resolve(&initializationTemplateArgument, &scope, origin ? origin->q : 0);
PointerType *specPointer = specializationTemplateArgument.type()->asPointerType();
// specialization and initialization argument have to be a pointer
// additionally type of pointer argument of specialization has to be namedType
if (findTemplateArgument(dereference(specializationTemplateArgument), cit->second)) {
if (specializationTemplateArgument->isPointerType())
match = initializationTemplateArgument->isPointerType();
else if (specializationTemplateArgument->isReferenceType())
match = initializationTemplateArgument->isReferenceType();
else if (specializationTemplateArgument->isArrayType())
match = initializationTemplateArgument->isArrayType();
// Do not try exact match (typename T != class T {};)
} else {
// Real type specialization
match = matchTypes(initializationTemplateArgument, specializationTemplateArgument);
if (specPointer && initializationTemplateArgument.type()->isPointerType()
&& specPointer->elementType().type()->isNamedType()) {
return cit->second;
}
ArrayType *specArray = specializationTemplateArgument.type()->asArrayType();
if (specArray && initializationTemplateArgument.type()->isArrayType()) {
if (const NamedType *argumentNamedType
= specArray->elementType().type()->asNamedType()) {
if (const Name *argumentName = argumentNamedType->name()) {
if (LookupScopePrivate *reference
= findSpecializationWithMatchingTemplateArgument(
argumentName, cit->second)) {
return reference;
}
}
}
}
if (const NamedType *specName = specializationTemplateArgument->asNamedType()) {
if (const NamedType *initName = initializationTemplateArgument->asNamedType()) {
if (specName->name()->identifier() == initName->name()->identifier())
return cit->second;
}
}
}
if (match)
return cit->second;
}
return 0;
......@@ -1245,23 +1227,12 @@ LookupScopePrivate *LookupScopePrivate::nestedType(const Name *name, LookupScope
// we found full specialization
reference = cit->second;
} else {
Template *baseTemplate = 0;
foreach (Symbol *s, reference->_symbols) {
if (Class *clazz = s->asClass())
baseTemplate = clazz->enclosingTemplate();
else if (ForwardClassDeclaration *forward = s->asForwardClassDeclaration())
baseTemplate = forward->enclosingTemplate();
if (baseTemplate)
break;
}
if (baseTemplate) {
if (LookupScopePrivate *specialization =
findSpecialization(baseTemplate, templId, specializations, origin)) {
reference = specialization;
if (Q_UNLIKELY(debug)) {
Overview oo;
qDebug() << "picked specialization" << oo(specialization->_name);
}
if (LookupScopePrivate *specialization =
findSpecialization(templId, specializations, origin)) {
reference = specialization;
if (Q_UNLIKELY(debug)) {
Overview oo;
qDebug() << "picked specialization" << oo(specialization->_name);
}
}
}
......
......@@ -266,6 +266,7 @@ void Theme::readSettings(QSettings &settings)
{
d->name = settings.value(QLatin1String("ThemeName"), QLatin1String("unnamed")).toString();
d->preferredStyles = settings.value(QLatin1String("PreferredStyles")).toStringList();
d->preferredStyles.removeAll(QLatin1String(""));
}
{
settings.beginGroup(QLatin1String("Palette"));
......
......@@ -35,6 +35,8 @@
#include "qtcassert.h"
#include "wizardpage.h"
#include <utils/theme/theme.h>
#include <QDialog>
#include <QDialogButtonBox>
#include <QHash>
......@@ -333,6 +335,8 @@ Wizard::Wizard(QWidget *parent, Qt::WindowFlags flags) :
setOption(QWizard::NoCancelButton, false);
setOption(QWizard::NoDefaultButton, false);
setOption(QWizard::NoBackButtonOnStartPage, true);
if (!Utils::creatorTheme()->preferredStyles().isEmpty())
setWizardStyle(QWizard::ModernStyle);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
if (HostOsInfo::isMacHost()) {
......
......@@ -369,7 +369,6 @@ F2TestCase::F2TestCase(CppEditorAction action,
QEXPECT_FAIL("globalVarFromEnum", "Contributor works on a fix.", Abort);
QEXPECT_FAIL("matchFunctionSignature_Follow_5", "foo(int) resolved as CallAST", Abort);
QEXPECT_FAIL("qualifiedNames", "Regression since e0594fc9b906a32f5c8ac70265490cf86044676f", Abort);
QCOMPARE(currentTextEditor->currentLine(), expectedLine);
QCOMPARE(currentTextEditor->currentColumn() - 1, expectedColumn);
......
......@@ -328,11 +328,16 @@ void CppToolsPlugin::test_completion()
QEXPECT_FAIL("template_as_base: typedef not available in derived",
"We can live with that...", Abort);
QEXPECT_FAIL("template_specialization_with_reference", "test of reverted change", Abort);
QEXPECT_FAIL("specialization_multiple_arguments", "test of reverted change", Abort);
QEXPECT_FAIL("specialization_with_default_value", "test of reverted change", Abort);
QEXPECT_FAIL("partial_specialization_with_pointer", "test of reverted change", Abort);
QEXPECT_FAIL("enum_in_function_in_struct_in_function", "QTCREATORBUG-13757", Abort);
QEXPECT_FAIL("enum_in_function_in_struct_in_function_cxx11", "QTCREATORBUG-13757", Abort);
QEXPECT_FAIL("enum_in_function_in_struct_in_function_anon", "QTCREATORBUG-13757", Abort);
QEXPECT_FAIL("enum_in_class_accessed_in_member_func_cxx11", "QTCREATORBUG-13757", Abort);
QEXPECT_FAIL("enum_in_class_accessed_in_member_func_inline_cxx11", "QTCREATORBUG-13757", Abort);
QEXPECT_FAIL("recursive_instantiation_of_template_type", "QTCREATORBUG-14237", Abort);
QCOMPARE(actualCompletions, expectedCompletions);
}
......
......@@ -134,7 +134,7 @@ protected:
const QString m_directory;
private:
VcsCommand *m_command;
QPointer<VcsCommand> m_command;
};
BaseController::BaseController(IDocument *document, const QString &dir) :
......@@ -158,8 +158,8 @@ void BaseController::runCommand(const QList<QStringList> &args, QTextCodec *code
m_command = new VcsCommand(m_directory, gitClient()->processEnvironment());
m_command->setCodec(codec ? codec : EditorManager::defaultTextCodec());
connect(m_command, &VcsCommand::stdOutText, this, &BaseController::processOutput);
connect(m_command, &VcsCommand::finished, this, &BaseController::reloadFinished);
connect(m_command.data(), &VcsCommand::stdOutText, this, &BaseController::processOutput);
connect(m_command.data(), &VcsCommand::finished, this, &BaseController::reloadFinished);
m_command->addFlags(diffExecutionFlags());
foreach (const QStringList &arg, args) {
......@@ -173,7 +173,7 @@ void BaseController::runCommand(const QList<QStringList> &args, QTextCodec *code
void BaseController::processDiff(const QString &output)
{
m_command = 0;
m_command.clear();
bool ok;
QList<FileData> fileDataList = DiffUtils::readPatch(output, &ok);
......
......@@ -218,7 +218,7 @@ void JsonWizard::accept()
emit prePromptForOverwrite(m_files);
JsonWizardGenerator::OverwriteResult overwrite =
JsonWizardGenerator::promptForOverwrite(&m_files, &errorMessage);
if (overwrite == JsonWizardGenerator::OverwriteError) {
if (overwrite != JsonWizardGenerator::OverwriteOk) {
if (!errorMessage.isEmpty())
QMessageBox::warning(this, tr("Failed to Overwrite Files"), errorMessage);
return;
......
......@@ -97,6 +97,8 @@ void QmlProjectNode::refresh()
// plain old file format
absoluteFilePath = fileInfo.filePath();
relativeDirectory = m_project->projectDir().relativeFilePath(fileInfo.path());
if (relativeDirectory == QLatin1String("."))
relativeDirectory.clear();
} else {
absoluteFilePath = m_project->projectDir().absoluteFilePath(fileInfo.filePath());
relativeDirectory = fileInfo.path();
......
......@@ -236,13 +236,13 @@ void ResourceEditorPlugin::onRefresh()
void ResourceEditorPlugin::addPrefixContextMenu()
{
auto topLevel = static_cast<ResourceTopLevelNode *>(ProjectTree::currentNode());
PrefixLangDialog dialog(tr("Add Prefix"), QString(), QString(), Core::ICore::mainWindow());
if (dialog.exec() != QDialog::Accepted)
return;
QString prefix = dialog.prefix();
if (prefix.isEmpty())
return;
ResourceTopLevelNode *topLevel = static_cast<ResourceTopLevelNode *>(ProjectTree::currentNode());
topLevel->addPrefix(prefix, dialog.lang());
}
......
......@@ -1213,7 +1213,7 @@ void tst_CheckSymbols::findField()
BaseTestCase tc(source);
Use use = tc.findUse(line, column);
QEXPECT_FAIL("std vector", "Regression since e0594fc9b906a32f5c8ac70265490cf86044676f", Abort);
QEXPECT_FAIL("recursive_instantiation_of_template_type", "QTCREATORBUG-14237", Abort);
QVERIFY(use.isValid());
QVERIFY(use.kind == Highlighting::FieldUse);
}
......
......@@ -2,7 +2,7 @@ Prerequisites - general information
-----------------------------------
Squish tests inside this folder have several prerequisites to get them running.
First - and most important - you have to own a valid Squish license. Currently it's recommended to use Squish 5.1.1.
First - and most important - you have to own a valid Squish license. Currently it's recommended to use Squish 5.1.3.
For Squish on Mac it's necessary to change the used Python version to 2.6 inside the <SQUISHDIR>/etc/paths.ini
Second - some of the test suites/test cases expect an installed Qt 4 SDK in its default location.
......@@ -10,14 +10,15 @@ On Linux/Mac this is ~/QtSDK, and on Windows this is C:\QtSDK.
After installing the QtSDK you should use the package manager of the QtSDK (SDKMaintenanceTool) to add some more packages.
You'll need at least Desktop Qt versions 4.7.4, 4.8.0, Harmattan stuff (except QEmu), Maemo Toolchain, Qt Examples, Simulator, Documentation files.
Third - some of the test suites/test cases expect Qt 5.2.1 and Qt 5.3.1 installed in its default location.
On Linux/Mac this is ~/Qt5.2.1 or ~/Qt5.3.1, and on Windows this is C:\Qt\Qt5.2.1 or C:\Qt\Qt5.3.1.
Third - some of the test suites/test cases expect Qt 5.2.1 (default toolchain), Qt 5.3.1 (default toolchain) and Qt 5.4.1 (gcc, Linux and Windows only)
installed in their default locations. On Linux/Mac this is ~/Qt5.x.1 and on Windows this is C:\Qt\Qt5.x.1. The default toolchains are gcc on Linux,
clang on Mac and MSVC2010 on Windows.
Fourth - you'll have to provide some additional repositories (and for the hooking into subprocesses even some more Squish bundles, see below).
These additional repositories are located inside ~/QtSDK/src or C:\QtSDK\src (depending on the OS you're on).
You can also just provide them inside a different folder and specify the folder with the environment variable SYSTEST_SRCPATH.
This folder must contain the following:
* a QtCreator repository (or source copy) of tag v3.2.0 named 'creator' including the submodule src/shared/qbs
* a QtCreator repository (or source copy) of tag v3.5.0 named 'creator' including the submodule src/shared/qbs
* a subfolder called 'creator-test-data'
* a speedcrunch 0.11 repository (or source copy) inside 'creator-test-data' named 'speedcrunch'
* additional Squish versions for hooking into subprocesses inside different folders inside 'creator-test-data' following the information below
......@@ -27,8 +28,8 @@ Fifth - you'll have to make sure that some needed tools are available (no matter
* wget or curl, capable of HTTPS
Normally it should be okay to just install them as usual and add their executables' path(s) to the PATH variable.
Sixth - Qt Creator should be built with ClangCodeModel plugin.
How to do so, see QTCREATOR_REPO/src/plugins/clangcodemodel/README.
Sixth - Qt Creator should be built with ClangCodeModel plugin. How to do so, see QTCREATOR_REPO/src/plugins/clangcodemodel/README. Without the
plugin, the tests for ClangCodeModel will be skipped but will not cause failures.
Attention! If any of these prerequisites cannot be satisfied the tests will likely fail (or not run at all).
......
......@@ -345,6 +345,7 @@ def validateSearchResult(expectedCount):
# this function invokes context menu and command from it
def invokeContextMenuItem(editorArea, command1, command2 = None):
ctxtMenu = openContextMenuOnTextCursorPosition(editorArea)
snooze(1)
if platform.system() == 'Darwin':
activateItem(ctxtMenu, command1)
else:
......
......@@ -211,6 +211,7 @@ def invokeMenuItem(menu, item, *subItems):
nativeType("<Command+q>")
return
menuObject = waitForObjectItem(":Qt Creator.QtCreator.MenuBar_QMenuBar", menu)
snooze(1)
waitFor("menuObject.visible", 1000)
activateItem(menuObject)
itemObject = waitForObjectItem(objectMap.realName(menuObject), item)
......
......@@ -38,7 +38,7 @@ def main():
workingDir = tempDir()
# we need a Qt >= 5.3 - we use checkedTargets, so we should get only valid targets
analyzerTargets = Targets.desktopTargetClasses()
if platform.system() in ('Windows', 'Microsoft') and JIRA.isBugStillOpen(14307):
if platform.system() in ('Windows', 'Microsoft'):
analyzerTargets &= ~Targets.DESKTOP_541_GCC
checkedTargets, projectName = createNewQtQuickApplication(workingDir, targets=analyzerTargets)
editor = waitForObject(":Qt Creator_QmlJSEditor::QmlJSTextEditorWidget")
......
......@@ -63,6 +63,16 @@ def main():
compareProjectTree(naviTreeView % "speedcrunch( \[\S+\])?", "projecttree_speedcrunch.tsv")
compareProjectTree(naviTreeView % "qtcreator( \[\S+\])?", "projecttree_creator.tsv")
# Verify warnings about old Qt version
if not test.verify(object.exists(":Qt Creator_Core::OutputWindow"),
"Did the General Messages view show up?"):
openGeneralMessages()
generalMessages = str(waitForObject(":Qt Creator_Core::OutputWindow").plainText)
test.verify("Project MESSAGE: Cannot build Qt Creator with Qt version 5.3.1." in generalMessages,
"Warning about outdated Qt shown?")
test.verify("Project ERROR: Use at least Qt 5.4.0." in generalMessages,
"Minimum Qt version shown?")
# Now check some basic lookups in the search box
selectFromLocator(": Qlist::QList", "QList::QList")
test.compare(wordUnderCursor(waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")), "QList")
......
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