Commit 0ba4781b authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/3.5'

Change-Id: I889b93611d1762121548fb71d1d3493e4adba313
parents a5952658 f229f0db
Qt Creator version 3.5.1 contains bug fixes.
The most important changes are listed in this document. For a complete
list of changes, see the Git log for the Qt Creator sources that
you can check out from the public Git repository. For example:
git clone git://code.qt.io/qt-creator/qt-creator.git
git log --cherry-pick --pretty=oneline v3.5.0..v3.5.1
General
* Fixed dark theme for wizards (QTCREATORBUG-13395)
* Fixed that cancel button was ignored when wizards ask about overwriting files
(QTCREATORBUG-15022)
* Added support for MSYS2 compilers and debuggers
Editing
* Fixed crashes with code completion (QTCREATORBUG-14991, QTCREATORBUG-15020)
Project Management
* Fixed that some context actions were wrongly enabled
(QTCREATORBUG-14768, QTCREATORBUG-14728)
C++ Support
* Improved performance for Boost (QTCREATORBUG-14889, QTCREATORBUG-14741)
* Fixed that adding defines with compiler flag did not work with space after `-D`
(QTCREATORBUG-14792)
QML Support
* Fixed that `.ui.qml` warnings accumulated when splitting (QTCREATORBUG-14923)
QML Profier
* Fixed that notes were saved but not loaded (QTCREATORBUG-15077)
Version Control Systems
* Git
* Fixed encoding of log output
* Mercurial
* Fixed crash when annotating (QTCREATORBUG-14975)
Diff Editor
* Fixed handling of mode changes (QTCREATORBUG-14963)
Platform Specific
Remote Linux
* Fixed wrong SSH key compatibility check
BareMetal
* Fixed that GDB server provider list did not update on host change
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
DISTFILES variable as the configuration file for the DISTFILES variable as the configuration file for the
selected tool. selected tool.
\li Select the \uicontrol {Use $HOME} option to use the \li Select the \uicontrol {Use file in $HOME} option to use the
specified file in the user's home directory as the specified file in the user's home directory as the
configuration file for the selected tool. configuration file for the selected tool.
...@@ -117,8 +117,9 @@ ...@@ -117,8 +117,9 @@
\endlist \endlist
In addition to the \uicontrol {Format Current File} command, ClangFormat In addition to the \uicontrol {Format Current File} command, ClangFormat
provides the \uicontrol {Format Selected Text} command. If you select it and Uncrustify provide the \uicontrol {Format Selected Text} command. If you
when no text is selected, nothing happens. To format the entire file in this select it when no text is selected, nothing happens. To format the entire
case, select the \uicontrol {Format entire file if no text was selected} file in this case when using Clang, select the
check box in the \uicontrol {Clang Format} options. \uicontrol {Format entire file if no text was selected} check box in the
\uicontrol {Clang Format} options.
*/ */
...@@ -1785,11 +1785,11 @@ class CliDumper(Dumper): ...@@ -1785,11 +1785,11 @@ class CliDumper(Dumper):
return self.output return self.output
# Global instance. # Global instance.
if gdb.parameter('height') is None: #if gdb.parameter('height') is None:
theDumper = Dumper() theDumper = Dumper()
else: #else:
import codecs # import codecs
theDumper = CliDumper() # theDumper = CliDumper()
###################################################################### ######################################################################
# #
......
...@@ -18,6 +18,10 @@ ...@@ -18,6 +18,10 @@
"QtDataVisualization 1.0", "QtDataVisualization 1.0",
"QtGraphicalEffects 1.0", "QtGraphicalEffects 1.0",
"QtMultimedia 5.0", "QtMultimedia 5.0",
"QtMultimedia 5.2",
"QtMultimedia 5.3",
"QtMultimedia 5.4",
"QtMultimedia 5.5",
"QtNfc 5.0", "QtNfc 5.0",
"QtNfc 5.2", "QtNfc 5.2",
"QtNfc 5.3", "QtNfc 5.3",
......
...@@ -1487,6 +1487,7 @@ QList<const CppComponentValue *> CppQmlTypes::createObjectsForImport(const QStri ...@@ -1487,6 +1487,7 @@ QList<const CppComponentValue *> CppQmlTypes::createObjectsForImport(const QStri
if (m_objectsByQualifiedName.contains(key)) if (m_objectsByQualifiedName.contains(key))
continue; continue;
ComponentVersion cppVersion;
foreach (const FakeMetaObject::Export &bestExport, bestExports) { foreach (const FakeMetaObject::Export &bestExport, bestExports) {
QString name = bestExport.type; QString name = bestExport.type;
bool exported = true; bool exported = true;
...@@ -1501,7 +1502,10 @@ QList<const CppComponentValue *> CppQmlTypes::createObjectsForImport(const QStri ...@@ -1501,7 +1502,10 @@ QList<const CppComponentValue *> CppQmlTypes::createObjectsForImport(const QStri
fmoo.originId); fmoo.originId);
// use package.cppname importversion as key // use package.cppname importversion as key
m_objectsByQualifiedName.insert(key, newComponent); if (cppVersion <= bestExport.version) {
cppVersion = bestExport.version;
m_objectsByQualifiedName.insert(key, newComponent);
}
if (exported) { if (exported) {
if (!exportedObjects.contains(name) // we might have the same type in different versions if (!exportedObjects.contains(name) // we might have the same type in different versions
|| (newComponent->componentVersion() > exportedObjects.value(name)->componentVersion())) || (newComponent->componentVersion() > exportedObjects.value(name)->componentVersion()))
......
...@@ -432,7 +432,7 @@ void AnalyzerManagerPrivate::modeChanged(IMode *mode) ...@@ -432,7 +432,7 @@ void AnalyzerManagerPrivate::modeChanged(IMode *mode)
{ {
if (mode && mode == m_mode) { if (mode && mode == m_mode) {
m_mainWindow->setDockActionsVisible(true); m_mainWindow->setDockActionsVisible(true);
static bool firstTime = true; static bool firstTime = !m_currentAction;
if (firstTime) if (firstTime)
selectSavedTool(); selectSavedTool();
firstTime = false; firstTime = false;
......
...@@ -180,7 +180,6 @@ AndroidRunner::AndroidRunner(QObject *parent, ...@@ -180,7 +180,6 @@ AndroidRunner::AndroidRunner(QObject *parent,
m_gdbserverPath = packageDir + _("/lib/gdbserver"); m_gdbserverPath = packageDir + _("/lib/gdbserver");
m_gdbserverCommand = m_gdbserverPath + _(" --multi +") + m_gdbserverSocket;
// Detect busybox, as we need to pass -w to ps to get wide output. // Detect busybox, as we need to pass -w to ps to get wide output.
QProcess psProc; QProcess psProc;
psProc.start(m_adb, selector() << _("shell") << _("readlink") << _("$(which ps)")); psProc.start(m_adb, selector() << _("shell") << _("readlink") << _("$(which ps)"));
...@@ -375,7 +374,10 @@ void AndroidRunner::asyncStart() ...@@ -375,7 +374,10 @@ void AndroidRunner::asyncStart()
args << _("-e") << _("ping_file") << m_pingFile; args << _("-e") << _("ping_file") << m_pingFile;
args << _("-e") << _("pong_file") << m_pongFile; args << _("-e") << _("pong_file") << m_pongFile;
} }
args << _("-e") << _("gdbserver_command") << m_gdbserverCommand;
QString gdbserverCommand = QString::fromLatin1(adbShellAmNeedsQuotes() ? "\"%1 --multi +%2\"" : "%1 --multi +%2")
.arg(m_gdbserverPath).arg(m_gdbserverSocket);
args << _("-e") << _("gdbserver_command") << gdbserverCommand;
args << _("-e") << _("gdbserver_socket") << m_gdbserverSocket; args << _("-e") << _("gdbserver_socket") << m_gdbserverSocket;
if (m_handShakeMethod == SocketHandShake) { if (m_handShakeMethod == SocketHandShake) {
...@@ -501,6 +503,28 @@ void AndroidRunner::asyncStart() ...@@ -501,6 +503,28 @@ void AndroidRunner::asyncStart()
QMetaObject::invokeMethod(&m_checkPIDTimer, "start"); QMetaObject::invokeMethod(&m_checkPIDTimer, "start");
} }
bool AndroidRunner::adbShellAmNeedsQuotes()
{
// Between Android SDK Tools version 24.3.1 and 24.3.4 the quoting
// needs for the 'adb shell am start ...' parameters changed.
// Run a test to find out on what side of the fence we live.
// The command will fail with a complaint about the "--dummy"
// option on newer SDKs, and with "No intent supplied" on older ones.
// In case the test itself fails assume a new SDK.
QProcess adb;
adb.start(m_adb, selector() << _("shell") << _("am") << _("start")
<< _("-e") << _("dummy") <<_("dummy --dummy"));
if (!adb.waitForStarted())
return true;
if (!adb.waitForFinished(10000))
return true;
QByteArray output = adb.readAllStandardError() + adb.readAllStandardOutput();
bool oldSdk = output.contains("Error: No intent supplied");
return !oldSdk;
}
void AndroidRunner::handleRemoteDebuggerRunning() void AndroidRunner::handleRemoteDebuggerRunning()
{ {
if (m_useCppDebugger) { if (m_useCppDebugger) {
......
...@@ -90,6 +90,7 @@ private: ...@@ -90,6 +90,7 @@ private:
QByteArray runPs(); QByteArray runPs();
void findPs(); void findPs();
void logcatProcess(const QByteArray &text, QByteArray &buffer, bool onlyError); void logcatProcess(const QByteArray &text, QByteArray &buffer, bool onlyError);
bool adbShellAmNeedsQuotes();
private: private:
QProcess m_adbLogcatProcess; QProcess m_adbLogcatProcess;
...@@ -111,7 +112,6 @@ private: ...@@ -111,7 +112,6 @@ private:
QString m_pingFile; QString m_pingFile;
QString m_pongFile; QString m_pongFile;
QString m_gdbserverPath; QString m_gdbserverPath;
QString m_gdbserverCommand;
QString m_gdbserverSocket; QString m_gdbserverSocket;
QString m_localLibs; QString m_localLibs;
QString m_localJars; QString m_localJars;
......
...@@ -63,7 +63,8 @@ typedef QByteArray _; ...@@ -63,7 +63,8 @@ typedef QByteArray _;
class CompletionTestCase : public Tests::TestCase class CompletionTestCase : public Tests::TestCase
{ {
public: public:
CompletionTestCase(const QByteArray &sourceText, const QByteArray &textToInsert = QByteArray()) CompletionTestCase(const QByteArray &sourceText, const QByteArray &textToInsert = QByteArray(),
bool isObjC = false)
: m_position(-1), m_editorWidget(0), m_textDocument(0), m_editor(0) : m_position(-1), m_editorWidget(0), m_textDocument(0), m_editor(0)
{ {
QVERIFY(succeededSoFar()); QVERIFY(succeededSoFar());
...@@ -77,7 +78,8 @@ public: ...@@ -77,7 +78,8 @@ public:
// Write source to file // Write source to file
m_temporaryDir.reset(new Tests::TemporaryDir()); m_temporaryDir.reset(new Tests::TemporaryDir());
QVERIFY(m_temporaryDir->isValid()); QVERIFY(m_temporaryDir->isValid());
const QString fileName = m_temporaryDir->createFile("file.h", m_source); const QByteArray fileExt = isObjC ? ".mm" : ".h";
const QString fileName = m_temporaryDir->createFile("file." + fileExt, m_source);
QVERIFY(!fileName.isEmpty()); QVERIFY(!fileName.isEmpty());
// Open in editor // Open in editor
...@@ -3361,9 +3363,10 @@ void CppToolsPlugin::test_completion_member_access_operator() ...@@ -3361,9 +3363,10 @@ void CppToolsPlugin::test_completion_member_access_operator()
QFETCH(QByteArray, code); QFETCH(QByteArray, code);
QFETCH(QByteArray, prefix); QFETCH(QByteArray, prefix);
QFETCH(QStringList, expectedCompletions); QFETCH(QStringList, expectedCompletions);
QFETCH(bool, isObjC);
QFETCH(bool, expectedReplaceAccessOperator); QFETCH(bool, expectedReplaceAccessOperator);
CompletionTestCase test(code, prefix); CompletionTestCase test(code, prefix, isObjC);
QVERIFY(test.succeededSoFar()); QVERIFY(test.succeededSoFar());
bool replaceAccessOperator = false; bool replaceAccessOperator = false;
...@@ -3381,6 +3384,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data() ...@@ -3381,6 +3384,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data()
QTest::addColumn<QByteArray>("code"); QTest::addColumn<QByteArray>("code");
QTest::addColumn<QByteArray>("prefix"); QTest::addColumn<QByteArray>("prefix");
QTest::addColumn<QStringList>("expectedCompletions"); QTest::addColumn<QStringList>("expectedCompletions");
QTest::addColumn<bool>("isObjC");
QTest::addColumn<bool>("expectedReplaceAccessOperator"); QTest::addColumn<bool>("expectedReplaceAccessOperator");
QTest::newRow("member_access_operator") << _( QTest::newRow("member_access_operator") << _(
...@@ -3391,8 +3395,19 @@ void CppToolsPlugin::test_completion_member_access_operator_data() ...@@ -3391,8 +3395,19 @@ void CppToolsPlugin::test_completion_member_access_operator_data()
) << _("s.") << (QStringList() ) << _("s.") << (QStringList()
<< QLatin1String("S") << QLatin1String("S")
<< QLatin1String("t")) << QLatin1String("t"))
<< false
<< true; << true;
QTest::newRow("objc_not_replacing") << _(
"typedef struct objc_object Bar;"
"class Foo {\n"
" Bar *bar;\n"
" void func() { @ }"
"};\n"
) << _("bar.") << (QStringList())
<< true
<< false;
QTest::newRow("typedef_of_type_and_decl_of_type_no_replace_access_operator") << _( QTest::newRow("typedef_of_type_and_decl_of_type_no_replace_access_operator") << _(
"struct S { int m; };\n" "struct S { int m; };\n"
"typedef S SType;\n" "typedef S SType;\n"
...@@ -3401,6 +3416,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data() ...@@ -3401,6 +3416,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data()
) << _("p.") << (QStringList() ) << _("p.") << (QStringList()
<< QLatin1String("S") << QLatin1String("S")
<< QLatin1String("m")) << QLatin1String("m"))
<< false
<< false; << false;
QTest::newRow("typedef_of_pointer_and_decl_of_pointer_no_replace_access_operator") << _( QTest::newRow("typedef_of_pointer_and_decl_of_pointer_no_replace_access_operator") << _(
...@@ -3409,6 +3425,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data() ...@@ -3409,6 +3425,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data()
"SType *p;\n" "SType *p;\n"
"@\n" "@\n"
) << _("p.") << (QStringList()) ) << _("p.") << (QStringList())
<< false
<< false; << false;
QTest::newRow("typedef_of_type_and_decl_of_pointer_replace_access_operator") << _( QTest::newRow("typedef_of_type_and_decl_of_pointer_replace_access_operator") << _(
...@@ -3419,6 +3436,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data() ...@@ -3419,6 +3436,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data()
) << _("p.") << (QStringList() ) << _("p.") << (QStringList()
<< QLatin1String("S") << QLatin1String("S")
<< QLatin1String("m")) << QLatin1String("m"))
<< false
<< true; << true;
QTest::newRow("typedef_of_pointer_and_decl_of_type_replace_access_operator") << _( QTest::newRow("typedef_of_pointer_and_decl_of_type_replace_access_operator") << _(
...@@ -3429,6 +3447,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data() ...@@ -3429,6 +3447,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data()
) << _("p.") << (QStringList() ) << _("p.") << (QStringList()
<< QLatin1String("S") << QLatin1String("S")
<< QLatin1String("m")) << QLatin1String("m"))
<< false
<< true; << true;
QTest::newRow("predecl_typedef_of_type_and_decl_of_pointer_replace_access_operator") << _( QTest::newRow("predecl_typedef_of_type_and_decl_of_pointer_replace_access_operator") << _(
...@@ -3439,6 +3458,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data() ...@@ -3439,6 +3458,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data()
) << _("p.") << (QStringList() ) << _("p.") << (QStringList()
<< QLatin1String("S") << QLatin1String("S")
<< QLatin1String("m")) << QLatin1String("m"))
<< false
<< true; << true;
QTest::newRow("predecl_typedef_of_type_and_decl_type_no_replace_access_operator") << _( QTest::newRow("predecl_typedef_of_type_and_decl_type_no_replace_access_operator") << _(
...@@ -3449,6 +3469,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data() ...@@ -3449,6 +3469,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data()
) << _("p.") << (QStringList() ) << _("p.") << (QStringList()
<< QLatin1String("S") << QLatin1String("S")
<< QLatin1String("m")) << QLatin1String("m"))
<< false
<< false; << false;
QTest::newRow("predecl_typedef_of_pointer_and_decl_of_pointer_no_replace_access_operator") << _( QTest::newRow("predecl_typedef_of_pointer_and_decl_of_pointer_no_replace_access_operator") << _(
...@@ -3457,6 +3478,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data() ...@@ -3457,6 +3478,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data()
"SType *p;\n" "SType *p;\n"
"@\n" "@\n"
) << _("p.") << (QStringList()) ) << _("p.") << (QStringList())
<< false
<< false; << false;
QTest::newRow("predecl_typedef_of_pointer_and_decl_of_type_replace_access_operator") << _( QTest::newRow("predecl_typedef_of_pointer_and_decl_of_type_replace_access_operator") << _(
...@@ -3467,6 +3489,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data() ...@@ -3467,6 +3489,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data()
) << _("p.") << (QStringList() ) << _("p.") << (QStringList()
<< QLatin1String("S") << QLatin1String("S")
<< QLatin1String("m")) << QLatin1String("m"))
<< false
<< true; << true;
QTest::newRow("typedef_of_pointer_of_type_replace_access_operator") << _( QTest::newRow("typedef_of_pointer_of_type_replace_access_operator") << _(
...@@ -3478,6 +3501,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data() ...@@ -3478,6 +3501,7 @@ void CppToolsPlugin::test_completion_member_access_operator_data()
) << _("p.") << (QStringList() ) << _("p.") << (QStringList()
<< QLatin1String("S") << QLatin1String("S")
<< QLatin1String("m")) << QLatin1String("m"))
<< false
<< true; << true;
QTest::newRow("typedef_of_pointer_of_type_no_replace_access_operator") << _( QTest::newRow("typedef_of_pointer_of_type_no_replace_access_operator") << _(
...@@ -3489,5 +3513,6 @@ void CppToolsPlugin::test_completion_member_access_operator_data() ...@@ -3489,5 +3513,6 @@ void CppToolsPlugin::test_completion_member_access_operator_data()
) << _("p->") << (QStringList() ) << _("p->") << (QStringList()
<< QLatin1String("S") << QLatin1String("S")
<< QLatin1String("m")) << QLatin1String("m"))
<< false
<< false; << false;
} }
...@@ -2191,9 +2191,5 @@ void CppCompletionAssistInterface::getCppSpecifics() const ...@@ -2191,9 +2191,5 @@ void CppCompletionAssistInterface::getCppSpecifics() const
m_parser->update(BuiltinEditorDocumentParser::InMemoryInfo(false)); m_parser->update(BuiltinEditorDocumentParser::InMemoryInfo(false));
m_snapshot = m_parser->snapshot(); m_snapshot = m_parser->snapshot();
m_headerPaths = m_parser->headerPaths(); m_headerPaths = m_parser->headerPaths();
if (Document::Ptr document = m_parser->document())
m_languageFeatures = document->languageFeatures();
else
m_languageFeatures = LanguageFeatures::defaultFeatures();
} }
} }
...@@ -227,7 +227,10 @@ void JournaldWatcher::handleEntry() ...@@ -227,7 +227,10 @@ void JournaldWatcher::handleEntry()
continue; continue;
const QByteArray pid = logEntry.value(QByteArrayLiteral("_PID")); const QByteArray pid = logEntry.value(QByteArrayLiteral("_PID"));
quint64 pidNum = pid.isEmpty() ? 0 : QString::fromLatin1(pid).toInt(); if (pid.isEmpty())
continue;
quint64 pidNum = QString::fromLatin1(pid).toInt();
QString message = QString::fromUtf8(logEntry.value(QByteArrayLiteral("MESSAGE"))); QString message = QString::fromUtf8(logEntry.value(QByteArrayLiteral("MESSAGE")));
message.append(QLatin1Char('\n')); // Add newline. message.append(QLatin1Char('\n')); // Add newline.
......
...@@ -303,8 +303,10 @@ void QmlProfilerModelManager::acquiringDone() ...@@ -303,8 +303,10 @@ void QmlProfilerModelManager::acquiringDone()
void QmlProfilerModelManager::processingDone() void QmlProfilerModelManager::processingDone()
{ {
QTC_ASSERT(state() == ProcessingData, /**/); QTC_ASSERT(state() == ProcessingData, /**/);
d->notesModel->loadData(); // Load notes after the timeline models have been initialized ...
// which happens on stateChanged(Done).
setState(Done); setState(Done);
d->notesModel->loadData();
emit loadFinished(); emit loadFinished();
} }
......
...@@ -398,7 +398,7 @@ bool ResourceFolderNode::renameFile(const QString &filePath, const QString &newF ...@@ -398,7 +398,7 @@ bool ResourceFolderNode::renameFile(const QString &filePath, const QString &newF
bool ResourceFolderNode::renamePrefix(const QString &prefix, const QString &lang) bool ResourceFolderNode::renamePrefix(const QString &prefix, const QString &lang)
{ {
ResourceFile file(m_topLevelNode->path().toString()); ResourceFile file(m_topLevelNode->path().toString());
if (file.load() == Core::IDocument::OpenResult::Success) if (file.load() != Core::IDocument::OpenResult::Success)
return false; return false;
int index = file.indexOfPrefix(m_prefix, m_lang); int index = file.indexOfPrefix(m_prefix, m_lang);
if (index == -1) if (index == -1)
......
...@@ -224,6 +224,8 @@ VcsCommand *VcsBaseClientImpl::vcsExec(const QString &workingDirectory, const QS ...@@ -224,6 +224,8 @@ VcsCommand *VcsBaseClientImpl::vcsExec(const QString &workingDirectory, const QS
useOutputToWindow ? VcsWindowOutputBind : NoOutputBind); useOutputToWindow ? VcsWindowOutputBind : NoOutputBind);
command->setCookie(cookie); command->setCookie(cookie);
command->addFlags(additionalFlags); command->addFlags(additionalFlags);
if (editor)
command->setCodec(editor->codec());
enqueueJob(command, arguments); enqueueJob(command, arguments);
return command; return command;
} }
......
...@@ -78,7 +78,13 @@ def main(): ...@@ -78,7 +78,13 @@ def main():
appOutput = str(waitForObject(":Qt Creator_Core::OutputWindow").plainText) appOutput = str(waitForObject(":Qt Creator_Core::OutputWindow").plainText)
verifyOutput(appOutput, outputStdOut, "std::cout", "Application Output") verifyOutput(appOutput, outputStdOut, "std::cout", "Application Output")
verifyOutput(appOutput, outputStdErr, "std::cerr", "Application Output") verifyOutput(appOutput, outputStdErr, "std::cerr", "Application Output")
verifyOutput(appOutput, outputQDebug, "qDebug()", "Application Output") if (checkedTargets[kit] == Targets.DESKTOP_541_GCC
and platform.system() in ('Windows', 'Microsoft')):
test.log("Skipping qDebug() from %s (unstable, QTCREATORBUG-15067)"
% Targets.getStringForTarget(Targets.DESKTOP_541_GCC))
else:
verifyOutput(appOutput, outputQDebug,
"qDebug()", "Application Output")
clickButton(waitForObject(":Qt Creator_CloseButton")) clickButton(waitForObject(":Qt Creator_CloseButton"))
except: except:
test.fatal("Could not find Application Output Window", test.fatal("Could not find Application Output Window",
......
...@@ -186,9 +186,10 @@ def __getExpectedCompilers__(): ...@@ -186,9 +186,10 @@ def __getExpectedCompilers__():
def __getWinCompilers__(): def __getWinCompilers__():
result = [] result = []
winEnvVars = __getWinEnvVars__()
for record in testData.dataset("win_compiler_paths.tsv"): for record in testData.dataset("win_compiler_paths.tsv"):
envvar = winEnvVars.get(testData.field(record, "envvar"), "") envvar = os.getenv(testData.field(record, "envvar"))
if not envvar:
continue
compiler = os.path.abspath(os.path.join(envvar, testData.field(record, "path"), compiler = os.path.abspath(os.path.join(envvar, testData.field(record, "path"),
testData.field(record, "file"))) testData.field(record, "file")))
if os.path.exists(compiler): if os.path.exists(compiler):
...@@ -206,27 +207,14 @@ def __getWinCompilers__(): ...@@ -206,27 +207,14 @@ def __getWinCompilers__():
:"%s %s" % (compiler, used)}) :"%s %s" % (compiler, used)})
return result return result
# using os.getenv() or getOutputFromCmdline() do not work - they would return C:\Program Files (x86)
# for %ProgramFiles% as well as for %ProgramFiles(x86)% when using Python 32bit on 64bit machines
def __getWinEnvVars__():
result = {}
tmpF, tmpFPath = tempfile.mkstemp()
envvars = subprocess.call('set', stdout=tmpF, shell=True)
os.close(tmpF)
tmpF = open(tmpFPath, "r")
for line in tmpF:
tmp = line.split("=")
result[tmp[0]] = tmp[1]
tmpF.close()
os.remove(tmpFPath)
return result
def __getExpectedDebuggers__(): def __getExpectedDebuggers__():
exeSuffix = ""
result = [] result = []
if platform.system() in ('Microsoft', 'Windows'): if platform.system() in ('Microsoft', 'Windows'):
result.extend(__getCDB__()) result.extend(__getCDB__())
exeSuffix = ".exe"
for debugger in ["gdb", "lldb"]: for debugger in ["gdb", "lldb"]:
result.extend(findAllFilesInPATH(debugger)) result.extend(findAllFilesInPATH(debugger + exeSuffix))
if platform.system() == 'Linux': if platform.system() == 'Linux':
result.extend(filter(lambda s: not ("lldb-platform" in s or "lldb-gdbserver" in s), result.extend(filter(lambda s: not ("lldb-platform" in s or "lldb-gdbserver" in s),
findAllFilesInPATH("lldb-*"))) findAllFilesInPATH("lldb-*")))
...@@ -255,6 +243,7 @@ def __getCDB__(): ...@@ -255,6 +243,7 @@ def __getCDB__():
return result return result
def __compareCompilers__(foundCompilers, expectedCompilers): def __compareCompilers__(foundCompilers, expectedCompilers):
# TODO: Check if all expected compilers were found
equal = True equal = True
flags = 0 flags = 0
isWin = platform.system() in ('Microsoft', 'Windows') isWin = platform.system() in ('Microsoft', 'Windows')
...@@ -276,7 +265,7 @@ def __compareCompilers__(foundCompilers, expectedCompilers): ...@@ -276,7 +265,7 @@ def __compareCompilers__(foundCompilers, expectedCompilers):
or currentFound.values() == currentExp.values()): or currentFound.values() == currentExp.values()):
foundExp = True foundExp = True
break break
equal = foundExp equal = foundExp
else: else:
if isWin: if isWin:
equal = currentFound.lower() in __lowerStrs__(expectedCompilers) equal = currentFound.lower() in __lowerStrs__(expectedCompilers)
......
"envvar" "path" "file" "displayName" "displayedParameters" "usedParameters" "isSDK" "envvar" "path" "file" "displayName" "displayedParameters" "usedParameters" "isSDK"
"ProgramFiles" "Microsoft SDKs\Windows\v7.0\Bin" "SetEnv.cmd" "Microsoft Windows SDK for Windows 7" "x86,amd64,x86_amd64,ia64,x86_ia64" "/x86,/x64,/x64,/ia64,/ia64" "true" "ProgramFiles" "Microsoft SDKs\Windows\v7.0\Bin" "SetEnv.cmd" "Microsoft Windows SDK for Windows 7" "x86,amd64,x86_amd64,ia64,x86_ia64" "/x86,/x64,/x64,/ia64,/ia64" "true"
"ProgramFiles(x86)" "Microsoft SDKs\Windows\v7.0\Bin" "SetEnv.cmd" "Microsoft Windows SDK for Windows 7" "x86,amd64,x86_amd64,ia64,x86_ia64" "/x86,/x64,/x64,/ia64,/ia64" "true" "ProgramFiles(x86)" "Microsoft SDKs\Windows\v7.0\Bin" "SetEnv.cmd" "Microsoft Windows SDK for Windows 7" "x86,amd64,x86_amd64,ia64,x86_ia64" "/x86,/x64,/x64,/ia64,/ia64" "true"
"ProgramW6432" "Microsoft SDKs\Windows\v7.0\Bin" "SetEnv.cmd" "Microsoft Windows SDK for Windows 7" "x86,amd64,x86_amd64,ia64,x86_ia64" "/x86,/x64,/x64,/ia64,/ia64" "true"
"ProgramFiles" "Microsoft SDKs\Windows\v7.1\Bin" "SetEnv.cmd" "Microsoft Windows SDK for Windows 7" "x86,amd64,x86_amd64,ia64,x86_ia64" "/x86,/x64,/x64,/ia64,/ia64" "true" "ProgramFiles" "Microsoft SDKs\Windows\v7.1\Bin" "SetEnv.cmd" "Microsoft Windows SDK for Windows 7" "x86,amd64,x86_amd64,ia64,x86_ia64" "/x86,/x64,/x64,/ia64,/ia64" "true"
"ProgramFiles(x86)" "Microsoft SDKs\Windows\v7.1\Bin" "SetEnv.cmd" "Microsoft Windows SDK for Windows 7" "x86,amd64,x86_amd64,ia64,x86_ia64" "/x86,/x64,/x64,/ia64,/ia64" "true" "ProgramFiles(x86)" "Microsoft SDKs\Windows\v7.1\Bin" "SetEnv.cmd" "Microsoft Windows SDK for Windows 7" "x86,amd64,x86_amd64,ia64,x86_ia64" "/x86,/x64,/x64,/ia64,/ia64" "true"
"ProgramW6432" "Microsoft SDKs\Windows\v7.1\Bin" "SetEnv.cmd" "Microsoft Windows SDK for Windows 7" "x86,amd64,x86_amd64,ia64,x86_ia64" "/x86,/x64,/x64,/ia64,/ia64" "true"
"VS80COMNTOOLS" "..\..\VC\Bin" "vcvars32.bat" "Microsoft Visual C++ Compiler 8.0" "x86" "" "false" "VS80COMNTOOLS" "..\..\VC\Bin" "vcvars32.bat" "Microsoft Visual C++ Compiler 8.0" "x86" "" "false"
"VS80COMNTOOLS" "..\..\VC\Bin\amd64" "vcvarsamd64.bat" "Microsoft Visual C++ Compiler 8.0" "amd64" "amd64" "false" "VS80COMNTOOLS" "..\..\VC\Bin\amd64" "vcvarsamd64.bat" "Microsoft Visual C++ Compiler 8.0" "amd64" "amd64" "false"
"VS80COMNTOOLS" "..\..\VC\Bin" "vcvarsx86_amd64.bat" "Microsoft Visual C++ Compiler 8.0" "x86_amd64" "x86_amd64" "false" "VS80COMNTOOLS" "..\..\VC\Bin" "vcvarsx86_amd64.bat" "Microsoft Visual C++ Compiler 8.0" "x86_amd64" "x86_amd64" "false"
...@@ -17,3 +19,5 @@ ...@@ -17,3 +19,5 @@
"VS100COMNTOOLS" "..\..\VC" "vcvarsall.bat" "Microsoft Visual C++ Compiler 10.0" "x86,amd64,x86_amd64,ia64,x86_ia64" "x86,amd64,x86_amd64,ia64,x86_ia64" "false" "VS100COMNTOOLS" "..\..\VC" "vcvarsall.bat" "Microsoft Visual C++ Compiler 10.0" "x86,amd64,x86_amd64,ia64,x86_ia64" "x86,amd64,x86_amd64,ia64,x86_ia64" "false"
"VS110COMNTOOLS" "..\..\VC\Bin" "vcvars32.bat" "Microsoft Visual C++ Compiler 11.0" "x86" "" "false" "VS110COMNTOOLS" "..\..\VC\Bin" "vcvars32.bat" "Microsoft Visual C++ Compiler 11.0" "x86" "" "false"
"VS110COMNTOOLS" "..\..\VC" "vcvarsall.bat" "Microsoft Visual C++ Compiler 11.0" "x86,amd64,x86_amd64,ia64,x86_ia64" "x86,amd64,x86_amd64,ia64,x86_ia64" "false" "VS110COMNTOOLS" "..\..\VC" "vcvarsall.bat" "Microsoft Visual C++ Compiler 11.0" "x86,amd64,x86_amd64,ia64,x86_ia64" "x86,amd64,x86_amd64,ia64,x86_ia64" "false"
"VS120COMNTOOLS" "..\..\VC\Bin" "vcvars32.bat" "Microsoft Visual C++ Compiler 12.0" "x86" "" "false"
"VS120COMNTOOLS" "..\..\VC" "vcvarsall.bat" "Microsoft Visual C++ Compiler 12.0" "x86,amd64,x86_amd64,ia64,x86_ia64" "x86,amd64,x86_amd64,ia64,x86_ia64" "false"
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