Merge remote-tracking branch 'origin/2.5'

This commit is contained in:
Eike Ziller
2012-03-28 16:31:29 +02:00
25 changed files with 152 additions and 57 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 357 B

After

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -42,9 +42,6 @@
the final installation file. the final installation file.
You specify build settings in the \gui Projects mode. You specify build settings in the \gui Projects mode.
\image qtcreator-projectpane.png
To add a new build configuration, click \gui Add and select the type of To add a new build configuration, click \gui Add and select the type of
configuration you would like to add. You can add as many build configuration you would like to add. You can add as many build
configurations as you need. configurations as you need.
@@ -53,6 +50,8 @@
\section1 Editing Build Configurations \section1 Editing Build Configurations
\image qtcreator-projectpane.png
To edit a build configuration: To edit a build configuration:
\list 1 \list 1
@@ -150,7 +149,7 @@
\image qtcreator-build-steps.png "Build steps" \image qtcreator-build-steps.png "Build steps"
To override the shell command that \QC constructs by default, remove To override the shell command that \QC constructs by default, disable or remove
the build step and add a custom build step that specifies another shell the build step and add a custom build step that specifies another shell
command. command.
@@ -159,8 +158,9 @@
To add custom steps to the build settings, select \gui {Add Build Step > To add custom steps to the build settings, select \gui {Add Build Step >
Custom Process Step}. Custom Process Step}.
By default, custom steps are disabled. To activate a custom step, select By default, custom steps are enabled. To disable a custom step, select
the \gui{Enable custom process step} check-box. the \inlineimage qtcreator-disable-steps.png
(\gui Disable) button.
\image qtcreator-build-steps-custom.png "Custom Process Step" \image qtcreator-build-steps-custom.png "Custom Process Step"
@@ -179,14 +179,14 @@
\o To add a clean step using make or a custom process, click \o To add a clean step using make or a custom process, click
\gui{Add Clean Step} and select the type of step you want to add. \gui{Add Clean Step} and select the type of step you want to add.
By default, custom steps are disabled. To activate a custom step, By default, custom steps are enabled. To disable a custom step,
select the \gui{Enable custom process step} check-box. select the \gui Disable button.
\o To remove a clean step, click \gui{Remove Item}. \o To remove a clean step, click \gui{Remove Item}.
\o To change the order of steps, click \o To change the order of steps, click
\inlineimage qtcreator-movestep.png \inlineimage qtcreator-movestep.png
. (\gui {Move Up} and \gui {Move Down}).
\endlist \endlist
\section1 Build Environment \section1 Build Environment
@@ -214,4 +214,13 @@
compilers and tools need. Therefore, the environment is never totally empty, compilers and tools need. Therefore, the environment is never totally empty,
even after you clear it. even after you clear it.
\section1 Related Topics
\list
\o \l{Adding Qt Versions}
\o \l{Adding Tool Chains}
\endlist
*/ */

View File

@@ -177,6 +177,7 @@ Item {
Row { Row {
x: 6 x: 6
spacing: 4 spacing: 4
visible: !defaultSession
Image { source: "images/icons/clone.png" } Image { source: "images/icons/clone.png" }
LinkedText { LinkedText {

View File

@@ -234,10 +234,6 @@ int main(int argc, char **argv)
QtSystemExceptionHandler systemExceptionHandler; QtSystemExceptionHandler systemExceptionHandler;
#endif #endif
QTranslator translator;
QTranslator qtTranslator;
QString locale = QLocale::system().name();
// Manually determine -settingspath command line option // Manually determine -settingspath command line option
// We can't use the regular way of the plugin manager, because that needs to parse pluginspecs // We can't use the regular way of the plugin manager, because that needs to parse pluginspecs
// but the settings path can influence which plugins are enabled // but the settings path can influence which plugins are enabled
@@ -273,19 +269,37 @@ int main(int argc, char **argv)
pluginManager.setGlobalSettings(globalSettings); pluginManager.setGlobalSettings(globalSettings);
pluginManager.setSettings(settings); pluginManager.setSettings(settings);
locale = settings->value("General/OverrideLanguage", locale).toString(); QTranslator translator;
QTranslator qtTranslator;
QStringList uiLanguages;
#if QT_VERSION >= 0x040800
uiLanguages = QLocale::system().uiLanguages();
#else
uiLanguages << QLocale::system().name();
#endif
QString overrideLanguage = settings->value("General/OverrideLanguage").toString();
if (!overrideLanguage.isEmpty())
uiLanguages.prepend(overrideLanguage);
const QString &creatorTrPath = QCoreApplication::applicationDirPath() const QString &creatorTrPath = QCoreApplication::applicationDirPath()
+ QLatin1String(SHARE_PATH "/translations"); + QLatin1String(SHARE_PATH "/translations");
if (translator.load(QLatin1String("qtcreator_") + locale, creatorTrPath)) { foreach (const QString &locale, uiLanguages) {
const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath); if (translator.load(QLatin1String("qtcreator_") + locale, creatorTrPath)) {
const QString &qtTrFile = QLatin1String("qt_") + locale; const QString &qtTrPath = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
// Binary installer puts Qt tr files into creatorTrPath const QString &qtTrFile = QLatin1String("qt_") + locale;
if (qtTranslator.load(qtTrFile, qtTrPath) || qtTranslator.load(qtTrFile, creatorTrPath)) { // Binary installer puts Qt tr files into creatorTrPath
app.installTranslator(&translator); if (qtTranslator.load(qtTrFile, qtTrPath) || qtTranslator.load(qtTrFile, creatorTrPath)) {
app.installTranslator(&qtTranslator); app.installTranslator(&translator);
app.setProperty("qtc_locale", locale); app.installTranslator(&qtTranslator);
} else { app.setProperty("qtc_locale", locale);
break;
}
translator.load(QString()); // unload() translator.load(QString()); // unload()
} else if (locale == QLatin1String("C") /* overrideLanguage == "English" */) {
// use built-in
break;
} else if (locale.startsWith(QLatin1String("en")) /* "English" is built-in */) {
// use built-in
break;
} }
} }

View File

@@ -3638,11 +3638,9 @@ bool Parser::parseBuiltinTypeSpecifier(SpecifierListAST *&node)
DecltypeSpecifierAST *ast = new (_pool) DecltypeSpecifierAST; DecltypeSpecifierAST *ast = new (_pool) DecltypeSpecifierAST;
ast->decltype_token = consumeToken(); ast->decltype_token = consumeToken();
match(T_LPAREN, &ast->lparen_token); match(T_LPAREN, &ast->lparen_token);
if (parseExpression(ast->expression)) { if (parseExpression(ast->expression))
match(T_RPAREN, &ast->rparen_token); match(T_RPAREN, &ast->rparen_token);
node = new (_pool) SpecifierListAST(ast); node = new (_pool) SpecifierListAST(ast);
return true;
}
skipUntilDeclaration(); skipUntilDeclaration();
return true; return true;
} else if (lookAtBuiltinTypeSpecifier()) { } else if (lookAtBuiltinTypeSpecifier()) {

View File

@@ -95,14 +95,11 @@ void FileNameValidatingLineEdit::setForceFirstCapitalLetter(bool b)
/* Validate a file base name, check for forbidden characters/strings. */ /* Validate a file base name, check for forbidden characters/strings. */
#ifdef Q_OS_WIN
# define SLASHES "/\\"
#else
# define SLASHES "/"
#endif
static const char notAllowedCharsSubDir[] = "~!?:&*\"|#%<>$\"'();`' "; #define SLASHES "/\\"
static const char notAllowedCharsNoSubDir[] = "~!?:&*\"|#%<>$\"'();`' "SLASHES;
static const char notAllowedCharsSubDir[] = ",^@=+{}[]~!?:&*\"|#%<>$\"'();`' ";
static const char notAllowedCharsNoSubDir[] = ",^@=+{}[]~!?:&*\"|#%<>$\"'();`' "SLASHES;
static const char *notAllowedSubStrings[] = {".."}; static const char *notAllowedSubStrings[] = {".."};

View File

@@ -62,7 +62,7 @@ namespace Utils {
bool FileUtils::removeRecursively(const QString &filePath, QString *error) bool FileUtils::removeRecursively(const QString &filePath, QString *error)
{ {
QFileInfo fileInfo(filePath); QFileInfo fileInfo(filePath);
if (!fileInfo.exists()) if (!fileInfo.exists() && !fileInfo.isSymLink())
return true; return true;
QFile::setPermissions(filePath, fileInfo.permissions() | QFile::WriteUser); QFile::setPermissions(filePath, fileInfo.permissions() | QFile::WriteUser);
if (fileInfo.isDir()) { if (fileInfo.isDir()) {

View File

@@ -249,7 +249,7 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep)
// TODO update this list also on rescans of the CMakeLists.txt // TODO update this list also on rescans of the CMakeLists.txt
// TODO shouldn't be accessing project // TODO shouldn't be accessing project
CMakeProject *pro = m_makeStep->cmakeBuildConfiguration()->cmakeTarget()->cmakeProject(); CMakeProject *pro = static_cast<CMakeProject *>(m_makeStep->target()->project());
foreach (const QString& buildTarget, pro->buildTargetTitles()) { foreach (const QString& buildTarget, pro->buildTargetTitles()) {
QListWidgetItem *item = new QListWidgetItem(buildTarget, m_buildTargetsList); QListWidgetItem *item = new QListWidgetItem(buildTarget, m_buildTargetsList);
item->setFlags(item->flags() | Qt::ItemIsUserCheckable); item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
@@ -288,7 +288,7 @@ void MakeStepConfigWidget::buildTargetsChanged()
{ {
disconnect(m_buildTargetsList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(itemChanged(QListWidgetItem*))); disconnect(m_buildTargetsList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(itemChanged(QListWidgetItem*)));
m_buildTargetsList->clear(); m_buildTargetsList->clear();
CMakeProject *pro = m_makeStep->cmakeBuildConfiguration()->cmakeTarget()->cmakeProject(); CMakeProject *pro = static_cast<CMakeProject *>(m_makeStep->target()->project());
foreach (const QString& buildTarget, pro->buildTargetTitles()) { foreach (const QString& buildTarget, pro->buildTargetTitles()) {
QListWidgetItem *item = new QListWidgetItem(buildTarget, m_buildTargetsList); QListWidgetItem *item = new QListWidgetItem(buildTarget, m_buildTargetsList);
item->setFlags(item->flags() | Qt::ItemIsUserCheckable); item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
@@ -301,6 +301,8 @@ void MakeStepConfigWidget::buildTargetsChanged()
void MakeStepConfigWidget::updateDetails() void MakeStepConfigWidget::updateDetails()
{ {
CMakeBuildConfiguration *bc = m_makeStep->cmakeBuildConfiguration(); CMakeBuildConfiguration *bc = m_makeStep->cmakeBuildConfiguration();
if (!bc)
bc = static_cast<CMakeBuildConfiguration *>(m_makeStep->target()->activeBuildConfiguration());
ProjectExplorer::ToolChain *tc = bc->toolChain(); ProjectExplorer::ToolChain *tc = bc->toolChain();
if (tc) { if (tc) {
QString arguments = Utils::QtcProcess::joinArgs(m_makeStep->m_buildTargets); QString arguments = Utils::QtcProcess::joinArgs(m_makeStep->m_buildTargets);

View File

@@ -514,11 +514,13 @@ void CppFindReferences::cancel()
void CppFindReferences::openEditor(const Find::SearchResultItem &item) void CppFindReferences::openEditor(const Find::SearchResultItem &item)
{ {
if (item.path.size() > 0) { if (item.path.size() > 0) {
TextEditor::BaseTextEditorWidget::openEditorAt(item.path.first(), item.lineNumber, item.textMarkPos, TextEditor::BaseTextEditorWidget::openEditorAt(QDir::fromNativeSeparators(item.path.first()),
Core::Id(), item.lineNumber, item.textMarkPos,
Core::EditorManager::ModeSwitch); Core::Id(),
Core::EditorManager::ModeSwitch);
} else { } else {
Core::EditorManager::instance()->openEditor(item.text, Core::Id(), Core::EditorManager::ModeSwitch); Core::EditorManager::instance()->openEditor(QDir::fromNativeSeparators(item.text),
Core::Id(), Core::EditorManager::ModeSwitch);
} }
} }

View File

@@ -812,12 +812,21 @@ QStringList CppModelManager::internalFrameworkPaths() const
QByteArray CppModelManager::internalDefinedMacros() const QByteArray CppModelManager::internalDefinedMacros() const
{ {
QByteArray macros; QByteArray macros;
QSet<QByteArray> alreadyIn;
QMapIterator<ProjectExplorer::Project *, ProjectInfo> it(m_projects); QMapIterator<ProjectExplorer::Project *, ProjectInfo> it(m_projects);
while (it.hasNext()) { while (it.hasNext()) {
it.next(); it.next();
ProjectInfo pinfo = it.value(); ProjectInfo pinfo = it.value();
foreach (const ProjectPart::Ptr &part, pinfo.projectParts()) foreach (const ProjectPart::Ptr &part, pinfo.projectParts()) {
macros += part->defines; const QList<QByteArray> defs = part->defines.split('\n');
foreach (const QByteArray &def, defs) {
if (!alreadyIn.contains(def)) {
macros += def;
macros.append('\n');
alreadyIn.insert(def);
}
}
}
} }
return macros; return macros;
} }

View File

@@ -110,6 +110,8 @@ GenericBuildConfiguration *GenericMakeStep::genericBuildConfiguration() const
bool GenericMakeStep::init() bool GenericMakeStep::init()
{ {
GenericBuildConfiguration *bc = genericBuildConfiguration(); GenericBuildConfiguration *bc = genericBuildConfiguration();
if (!bc)
bc = static_cast<GenericBuildConfiguration *>(target()->activeBuildConfiguration());
ProjectExplorer::ProcessParameters *pp = processParameters(); ProjectExplorer::ProcessParameters *pp = processParameters();
pp->setMacroExpander(bc->macroExpander()); pp->setMacroExpander(bc->macroExpander());
@@ -173,7 +175,7 @@ QString GenericMakeStep::makeCommand() const
{ {
QString command = m_makeCommand; QString command = m_makeCommand;
if (command.isEmpty()) { if (command.isEmpty()) {
GenericProject *pro = genericBuildConfiguration()->genericTarget()->genericProject(); GenericProject *pro = static_cast<GenericProject *>(target()->project());
if (ProjectExplorer::ToolChain *toolChain = pro->toolChain()) if (ProjectExplorer::ToolChain *toolChain = pro->toolChain())
command = toolChain->makeCommand(); command = toolChain->makeCommand();
else else
@@ -224,7 +226,7 @@ GenericMakeStepConfigWidget::GenericMakeStepConfigWidget(GenericMakeStep *makeSt
m_ui->setupUi(this); m_ui->setupUi(this);
// TODO update this list also on rescans of the GenericLists.txt // TODO update this list also on rescans of the GenericLists.txt
GenericProject *pro = m_makeStep->genericBuildConfiguration()->genericTarget()->genericProject(); GenericProject *pro = static_cast<GenericProject *>(m_makeStep->target()->project());
foreach (const QString &target, pro->buildTargets()) { foreach (const QString &target, pro->buildTargets()) {
QListWidgetItem *item = new QListWidgetItem(target, m_ui->targetsList); QListWidgetItem *item = new QListWidgetItem(target, m_ui->targetsList);
item->setFlags(item->flags() | Qt::ItemIsUserCheckable); item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
@@ -263,6 +265,8 @@ void GenericMakeStepConfigWidget::updateMakeOverrrideLabel()
void GenericMakeStepConfigWidget::updateDetails() void GenericMakeStepConfigWidget::updateDetails()
{ {
GenericBuildConfiguration *bc = m_makeStep->genericBuildConfiguration(); GenericBuildConfiguration *bc = m_makeStep->genericBuildConfiguration();
if (!bc)
bc = static_cast<GenericBuildConfiguration *>(m_makeStep->target()->activeBuildConfiguration());
ProjectExplorer::ProcessParameters param; ProjectExplorer::ProcessParameters param;
param.setMacroExpander(bc->macroExpander()); param.setMacroExpander(bc->macroExpander());

View File

@@ -203,7 +203,7 @@ bool AbstractMsvcToolChain::generateEnvironmentSettings(Utils::Environment &env,
Utils::TempFileSaver saver(QDir::tempPath() + QLatin1String("/XXXXXX.bat")); Utils::TempFileSaver saver(QDir::tempPath() + QLatin1String("/XXXXXX.bat"));
QByteArray call = "call "; QByteArray call = "call ";
call += Utils::QtcProcess::quoteArg(batchFile).toLocal8Bit() + "\r\n"; call += Utils::QtcProcess::quoteArg(batchFile).toLocal8Bit();
if (!batchArgs.isEmpty()) { if (!batchArgs.isEmpty()) {
call += ' '; call += ' ';
call += batchArgs.toLocal8Bit(); call += batchArgs.toLocal8Bit();

View File

@@ -285,11 +285,6 @@ void SessionManager::addProjects(const QList<Project*> &projects)
if (clearedList.count() == 1) if (clearedList.count() == 1)
emit singleProjectAdded(clearedList.first()); emit singleProjectAdded(clearedList.first());
// maybe we have a new startup project?
if (!startupProject())
if (!m_projects.isEmpty())
setStartupProject(m_projects.first());
} }
void SessionManager::removeProject(Project *project) void SessionManager::removeProject(Project *project)
@@ -759,7 +754,7 @@ void SessionManager::restoreStartupProject(const Utils::PersistentSettingsReader
const QString startupProjectPath = startupProject; const QString startupProjectPath = startupProject;
foreach (Project *pro, m_projects) { foreach (Project *pro, m_projects) {
if (QDir::cleanPath(pro->document()->fileName()) == startupProjectPath) { if (QDir::cleanPath(pro->document()->fileName()) == startupProjectPath) {
setStartupProject(m_startupProject); setStartupProject(pro);
break; break;
} }
} }

View File

@@ -101,6 +101,7 @@ private slots:
void gcc_attributes_1(); void gcc_attributes_1();
void gcc_attributes_2(); void gcc_attributes_2();
void gcc_attributes_3(); void gcc_attributes_3();
void crash_test_1();
// expressions // expressions
void simple_name_1(); void simple_name_1();
@@ -212,6 +213,13 @@ void tst_AST::gcc_attributes_3()
QCOMPARE(unit->tokenKind(link->rbrace_token), (int) T_RBRACE); QCOMPARE(unit->tokenKind(link->rbrace_token), (int) T_RBRACE);
} }
void tst_AST::crash_test_1()
{
QSharedPointer<TranslationUnit> unit(parseStatement("decltype auto\n"));
AST *ast = unit->ast();
QVERIFY(ast);
}
void tst_AST::simple_declaration_1() void tst_AST::simple_declaration_1()
{ {
QSharedPointer<TranslationUnit> unit(parseStatement("\n" QSharedPointer<TranslationUnit> unit(parseStatement("\n"

View File

@@ -53,9 +53,19 @@
<value type="bool" key="isAutodetected">true</value> <value type="bool" key="isAutodetected">true</value>
</valuemap> </valuemap>
</data> </data>
<data>
<variable>QtVersion.5</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">2</value>
<value type="QString" key="Name">Desktop Qt 4.8 for GCC (Qt SDK)</value>
<value type="QString" key="QMakePath">~/QtSDK/Desktop/Qt/4.8.0/gcc/bin/qmake</value>
<value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value>
<value type="bool" key="isAutodetected">false</value>
</valuemap>
</data>
<data> <data>
<variable>QtVersion.Count</variable> <variable>QtVersion.Count</variable>
<value type="int">5</value> <value type="int">6</value>
</data> </data>
<data> <data>
<variable>Version</variable> <variable>Version</variable>

View File

@@ -107,9 +107,39 @@
<value type="bool" key="isAutodetected">true</value> <value type="bool" key="isAutodetected">true</value>
</valuemap> </valuemap>
</data> </data>
<data>
<variable>QtVersion.9</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">1</value>
<value type="QString" key="Name">Qt 4.8 for Desktop - MSVC2008 (Qt SDK)</value>
<value type="QString" key="QMakePath">C:/QtSDK/Desktop/Qt/4.8.0/msvc2008/bin/qmake.exe</value>
<value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value>
<value type="bool" key="isAutodetected">false</value>
</valuemap>
</data>
<data>
<variable>QtVersion.10</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">2</value>
<value type="QString" key="Name">Qt 4.8 for Desktop - MSVC2010 (Qt SDK)</value>
<value type="QString" key="QMakePath">C:/QtSDK/Desktop/Qt/4.8.0/msvc2010/bin/qmake.exe</value>
<value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value>
<value type="bool" key="isAutodetected">false</value>
</valuemap>
</data>
<data>
<variable>QtVersion.10</variable>
<valuemap type="QVariantMap">
<value type="int" key="Id">3</value>
<value type="QString" key="Name">Qt 4.8 for Desktop - MinGW (Qt SDK)</value>
<value type="QString" key="QMakePath">C:/QtSDK/Desktop/Qt/4.8.0/mingw/bin/qmake.exe</value>
<value type="QString" key="QtVersion.Type">Qt4ProjectManager.QtVersion.Desktop</value>
<value type="bool" key="isAutodetected">false</value>
</valuemap>
</data>
<data> <data>
<variable>QtVersion.Count</variable> <variable>QtVersion.Count</variable>
<value type="int">9</value> <value type="int">12</value>
</data> </data>
<data> <data>
<variable>Version</variable> <variable>Version</variable>

View File

@@ -11,11 +11,12 @@ def __handleProcessExited__(object, exitCode):
global processExited global processExited
processExited = True processExited = True
def openQmakeProject(projectPath): def openQmakeProject(projectPath, targets=QtQuickConstants.Targets.DESKTOP):
invokeMenuItem("File", "Open File or Project...") invokeMenuItem("File", "Open File or Project...")
selectFromFileDialog(projectPath) selectFromFileDialog(projectPath)
selectFromCombo(waitForObject(":Qt Creator.Create Build Configurations:_QComboBox", 180000), selectFromCombo(waitForObject(":Qt Creator.Create Build Configurations:_QComboBox", 180000),
"For Each Qt Version One Debug And One Release") "For Each Qt Version One Debug And One Release")
__chooseTargets__(targets)
configureButton = waitForObject("{text='Configure Project' type='QPushButton' unnamed='1' visible='1'" configureButton = waitForObject("{text='Configure Project' type='QPushButton' unnamed='1' visible='1'"
"window=':Qt Creator_Core::Internal::MainWindow'}", 20000) "window=':Qt Creator_Core::Internal::MainWindow'}", 20000)
clickButton(configureButton) clickButton(configureButton)
@@ -271,6 +272,7 @@ def __chooseTargets__(targets=QtQuickConstants.Targets.DESKTOP, availableTargets
QtQuickConstants.Targets.SIMULATOR, QtQuickConstants.Targets.HARMATTAN] QtQuickConstants.Targets.SIMULATOR, QtQuickConstants.Targets.HARMATTAN]
if platform.system() in ('Windows', 'Microsoft'): if platform.system() in ('Windows', 'Microsoft'):
available += [QtQuickConstants.Targets.SYMBIAN] available += [QtQuickConstants.Targets.SYMBIAN]
available.remove(QtQuickConstants.Targets.EMBEDDED_LINUX)
for current in available: for current in available:
mustCheck = targets & current == current mustCheck = targets & current == current
try: try:

View File

@@ -2,11 +2,14 @@ import re;
# this function switches the MainWindow of creator to the specified view # this function switches the MainWindow of creator to the specified view
def switchViewTo(view): def switchViewTo(view):
# make sure that no tooltip is shown, so move the mouse away and wait until all disappear
mouseMove(waitForObject(':Qt Creator_Core::Internal::MainWindow'), -20, -20)
waitFor("not QToolTip.isVisible()", 15000)
if view < ViewConstants.WELCOME or view > ViewConstants.LAST_AVAILABLE: if view < ViewConstants.WELCOME or view > ViewConstants.LAST_AVAILABLE:
return return
tabBar = waitForObject("{type='Core::Internal::FancyTabBar' unnamed='1' visible='1' " tabBar = waitForObject("{type='Core::Internal::FancyTabBar' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}") "window=':Qt Creator_Core::Internal::MainWindow'}")
mouseMove(tabBar, 10, 10 + 52 * view) mouseMove(tabBar, 20, 20 + 52 * view)
if waitFor("QToolTip.isVisible()", 10000): if waitFor("QToolTip.isVisible()", 10000):
text = str(QToolTip.text()) text = str(QToolTip.text())
else: else:
@@ -18,7 +21,7 @@ def switchViewTo(view):
else: else:
test.warning("ToolTip does not match", "Expected pattern: %s\nGot: %s" % (pattern, text)) test.warning("ToolTip does not match", "Expected pattern: %s\nGot: %s" % (pattern, text))
mouseClick(waitForObject("{type='Core::Internal::FancyTabBar' unnamed='1' visible='1' " mouseClick(waitForObject("{type='Core::Internal::FancyTabBar' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}"), 5, 5 + 52 * view, 0, Qt.LeftButton) "window=':Qt Creator_Core::Internal::MainWindow'}"), 20, 20 + 52 * view, 0, Qt.LeftButton)
# this function is used to make sure that simple building prerequisites are met # this function is used to make sure that simple building prerequisites are met
# param targetCount specifies how many build targets had been selected (it's important that this one is correct) # param targetCount specifies how many build targets had been selected (it's important that this one is correct)

View File

@@ -1,4 +1,5 @@
source("../../shared/qtcreator.py") source("../../shared/qtcreator.py")
import re
SpeedCrunchPath = "" SpeedCrunchPath = ""
@@ -25,7 +26,17 @@ def main():
fancyToolButton = waitForObject(":*Qt Creator_Core::Internal::FancyToolButton") fancyToolButton = waitForObject(":*Qt Creator_Core::Internal::FancyToolButton")
qtVerPattern = re.compile("\d\.\d(\.\d+)?")
for config in iterateBuildConfigs(1, 0, "(Desktop )?Qt.*Release"): for config in iterateBuildConfigs(1, 0, "(Desktop )?Qt.*Release"):
qtVersion = qtVerPattern.search(config)
if qtVersion:
qtVersion = qtVersion.group()
if qtVersion >= "4.8":
test.log("Skipping config %s - this project needs Qt <= 4.7.x (got %s)" % (config, qtVersion))
continue
else:
test.warning("Could not determine Qt version for config '%s' - skipping..." % config)
continue
selectBuildConfig(1, 0, config) selectBuildConfig(1, 0, config)
buildConfig = buildConfigFromFancyToolButton(fancyToolButton) buildConfig = buildConfigFromFancyToolButton(fancyToolButton)
if buildConfig != config: if buildConfig != config: