Merge remote-tracking branch 'origin/4.6'

Change-Id: I959428882b9da427c6bf522145646048141888c6
This commit is contained in:
Eike Ziller
2018-04-19 09:25:04 +02:00
11 changed files with 125 additions and 23 deletions

77
dist/changes-4.6.1.md vendored Normal file
View File

@@ -0,0 +1,77 @@
Qt Creator version 4.6.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 v4.6.0..v4.6.1
General
* Locator
* Fixed min and max functions when using more than two arguments
in JavaScript filter (QTCREATORBUG-20167)
Editing
* Fixed crash when closing file with generic highlighting (QTCREATORBUG-20247)
All Projects
* Fixed that `.qrc` files were not listed as project files in Locator and
searches (QTCREATORBUG-20220)
QMake Projects
* Fixed that run and build buttons could stay disabled after project parsing
(QTCREATORBUG-20203)
CMake Projects
* Fixed that build steps for `clean` were missing (QTCREATORBUG-19823)
Qbs Projects
* Fixed performance issue (QTCREATORBUG-20175)
C++ Support
* Clang Code Model
* Fixed issue with parsing type_traits from GCC 7 (QTCREATORBUG-18757)
* Fixed warnings about unknown warning options (QTCREATORBUG-17460)
* Fixed wrong warning about overriding files from precompiled headers
(QTCREATORBUG-20125)
QML Support
* Made Qt 5.11 known to wizards
Debugging
* Fixed pointer address value for arrays
* QML
* Fixed that `console.info` was not shown in Debugger Console
(QTCREATORBUG-20117)
QML Profiler
* Fixed issue with spaces in path (QTCREATORBUG-20260)
Qt Quick Designer
* Fixed issue with `AbstractButton` enums
* Fixed issue with deferred properties
Test Integration
* Fixed issue with non-ASCII characters in Qt Quick test output
(QTCREATORBUG-20105)
Platform Specific
Android
* Fixed deployment issue for 32-bit applications (QTCREATORBUG-20084)
* Fixed crash when trying to set up a broken NDK (QTCREATORBUG-20217)
* Fixed debugging on Android 8 or later

View File

@@ -53,6 +53,7 @@ const char avdInfoPathKey[] = "Path:";
const char avdInfoAbiKey[] = "abi.type"; const char avdInfoAbiKey[] = "abi.type";
const char avdInfoTargetKey[] = "target"; const char avdInfoTargetKey[] = "target";
const char avdInfoErrorKey[] = "Error:"; const char avdInfoErrorKey[] = "Error:";
const char googleApiTag[] = "google_apis";
const int avdCreateTimeoutMs = 30000; const int avdCreateTimeoutMs = 30000;
@@ -111,13 +112,17 @@ static CreateAvdInfo createAvdCommand(const AndroidConfig config, const CreateAv
return result; return result;
} }
QStringList arguments({"create", "avd", "-k", result.sdkPlatform->sdkStylePath(), "-n", result.name}); QStringList arguments({"create", "avd", "-n", result.name});
if (!result.abi.isEmpty()) { if (!result.abi.isEmpty()) {
SystemImage *image = Utils::findOrDefault(result.sdkPlatform->systemImages(), SystemImage *image = Utils::findOrDefault(result.sdkPlatform->systemImages(),
Utils::equal(&SystemImage::abiName, result.abi)); Utils::equal(&SystemImage::abiName, result.abi));
if (image && image->isValid()) { if (image && image->isValid()) {
arguments << "-k" << image->sdkStylePath(); arguments << "-k" << image->sdkStylePath();
// Google api system images requires explicit abi as
// google-apis/ABI or --tag "google-apis"
if (image->sdkStylePath().contains(googleApiTag))
arguments << "--tag" << googleApiTag;
} else { } else {
QString name = result.sdkPlatform->displayText(); QString name = result.sdkPlatform->displayText();
qCDebug(avdManagerLog) << "AVD Create failed. Cannot find system image for the platform" qCDebug(avdManagerLog) << "AVD Create failed. Cannot find system image for the platform"

View File

@@ -42,7 +42,7 @@ namespace Internal {
const int MIN_SOCKET_HANDSHAKE_PORT = 20001; const int MIN_SOCKET_HANDSHAKE_PORT = 20001;
static void deleter(QProcess *p) static inline void deleter(QProcess *p)
{ {
p->terminate(); p->terminate();
if (!p->waitForFinished(1000)) { if (!p->waitForFinished(1000)) {

View File

@@ -32,6 +32,7 @@
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/progressmanager/progressmanager.h> #include <coreplugin/progressmanager/progressmanager.h>
#include <utils/progressindicator.h>
#include <utils/styledbar.h> #include <utils/styledbar.h>
#include <utils/utilsicons.h> #include <utils/utilsicons.h>
@@ -43,6 +44,7 @@
#include <QHelpSearchResultWidget> #include <QHelpSearchResultWidget>
#include <QKeyEvent> #include <QKeyEvent>
#include <QLayout> #include <QLayout>
#include <QLabel>
#include <QMap> #include <QMap>
#include <QMenu> #include <QMenu>
#include <QRegExp> #include <QRegExp>
@@ -112,11 +114,14 @@ void SearchWidget::showEvent(QShowEvent *event)
Utils::StyledBar *toolbar = new Utils::StyledBar(this); Utils::StyledBar *toolbar = new Utils::StyledBar(this);
toolbar->setSingleRow(false); toolbar->setSingleRow(false);
QHelpSearchQueryWidget *queryWidget = searchEngine->queryWidget(); m_queryWidget = searchEngine->queryWidget();
QLayout *tbLayout = new QVBoxLayout(); QLayout *tbLayout = new QVBoxLayout();
tbLayout->setSpacing(6); tbLayout->setSpacing(6);
tbLayout->setMargin(4); tbLayout->setMargin(4);
tbLayout->addWidget(queryWidget); tbLayout->addWidget(m_queryWidget);
m_indexingDocumentationLabel = new QLabel(tr("Indexing Documentation"), toolbar);
m_indexingDocumentationLabel->hide();
tbLayout->addWidget(m_indexingDocumentationLabel);
toolbar->setLayout(tbLayout); toolbar->setLayout(tbLayout);
Utils::StyledBar *toolbar2 = new Utils::StyledBar(this); Utils::StyledBar *toolbar2 = new Utils::StyledBar(this);
@@ -127,12 +132,17 @@ void SearchWidget::showEvent(QShowEvent *event)
tbLayout->addWidget(resultWidget = searchEngine->resultWidget()); tbLayout->addWidget(resultWidget = searchEngine->resultWidget());
toolbar2->setLayout(tbLayout); toolbar2->setLayout(tbLayout);
m_indexingIndicator = new Utils::ProgressIndicator(Utils::ProgressIndicatorSize::Medium,
resultWidget);
m_indexingIndicator->attachToWidget(resultWidget);
m_indexingIndicator->hide();
vLayout->addWidget(toolbar); vLayout->addWidget(toolbar);
vLayout->addWidget(toolbar2); vLayout->addWidget(toolbar2);
setFocusProxy(queryWidget); setFocusProxy(m_queryWidget);
connect(queryWidget, &QHelpSearchQueryWidget::search, this, &SearchWidget::search); connect(m_queryWidget, &QHelpSearchQueryWidget::search, this, &SearchWidget::search);
connect(resultWidget, &QHelpSearchResultWidget::requestShowLink, this, connect(resultWidget, &QHelpSearchResultWidget::requestShowLink, this,
[this](const QUrl &url) { [this](const QUrl &url) {
emit linkActivated(url, currentSearchTerms(), false/*newPage*/); emit linkActivated(url, currentSearchTerms(), false/*newPage*/);
@@ -205,6 +215,10 @@ void SearchWidget::indexingStarted()
m_watcher.setFuture(m_progress->future()); m_watcher.setFuture(m_progress->future());
connect(&m_watcher, &QFutureWatcherBase::canceled, connect(&m_watcher, &QFutureWatcherBase::canceled,
searchEngine, &QHelpSearchEngine::cancelIndexing); searchEngine, &QHelpSearchEngine::cancelIndexing);
m_queryWidget->hide();
m_indexingDocumentationLabel->show();
m_indexingIndicator->show();
} }
void SearchWidget::indexingFinished() void SearchWidget::indexingFinished()
@@ -213,6 +227,10 @@ void SearchWidget::indexingFinished()
delete m_progress; delete m_progress;
m_progress = NULL; m_progress = NULL;
m_queryWidget->show();
m_indexingDocumentationLabel->hide();
m_indexingIndicator->hide();
} }
bool SearchWidget::eventFilter(QObject *o, QEvent *e) bool SearchWidget::eventFilter(QObject *o, QEvent *e)

View File

@@ -33,10 +33,13 @@
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QHelpSearchEngine; class QHelpSearchEngine;
class QHelpSearchQueryWidget;
class QHelpSearchResultWidget; class QHelpSearchResultWidget;
class QUrl; class QUrl;
QT_END_NAMESPACE QT_END_NAMESPACE
namespace Utils { class ProgressIndicator; }
namespace Help { namespace Help {
namespace Internal { namespace Internal {
@@ -93,6 +96,9 @@ private:
QHelpSearchEngine *searchEngine; QHelpSearchEngine *searchEngine;
QHelpSearchResultWidget *resultWidget; QHelpSearchResultWidget *resultWidget;
QHelpSearchQueryWidget *m_queryWidget;
QWidget *m_indexingDocumentationLabel;
Utils::ProgressIndicator *m_indexingIndicator;
}; };
} // namespace Internal } // namespace Internal

View File

@@ -562,7 +562,12 @@ void QmakeProject::asyncUpdate()
{ {
m_asyncUpdateTimer.setInterval(UPDATE_INTERVAL); m_asyncUpdateTimer.setInterval(UPDATE_INTERVAL);
if (m_invalidateQmakeVfsContents) {
m_invalidateQmakeVfsContents = false;
m_qmakeVfs->invalidateContents();
} else {
m_qmakeVfs->invalidateCache(); m_qmakeVfs->invalidateCache();
}
Q_ASSERT(!m_asyncUpdateFutureInterface); Q_ASSERT(!m_asyncUpdateFutureInterface);
m_asyncUpdateFutureInterface = new QFutureInterface<void>(); m_asyncUpdateFutureInterface = new QFutureInterface<void>();
@@ -588,7 +593,7 @@ void QmakeProject::asyncUpdate()
void QmakeProject::buildFinished(bool success) void QmakeProject::buildFinished(bool success)
{ {
if (success) if (success)
m_qmakeVfs->invalidateContents(); m_invalidateQmakeVfsContents = true;
} }
bool QmakeProject::supportsKit(const Kit *k, QString *errorMessage) const bool QmakeProject::supportsKit(const Kit *k, QString *errorMessage) const
@@ -789,6 +794,7 @@ void QmakeProject::activeTargetWasChanged()
} }
m_activeTarget = activeTarget(); m_activeTarget = activeTarget();
m_invalidateQmakeVfsContents = true;
if (!m_activeTarget) if (!m_activeTarget)
return; return;

View File

@@ -165,6 +165,7 @@ private:
// cached data during project rescan // cached data during project rescan
std::unique_ptr<QMakeGlobals> m_qmakeGlobals; std::unique_ptr<QMakeGlobals> m_qmakeGlobals;
int m_qmakeGlobalsRefCnt = 0; int m_qmakeGlobalsRefCnt = 0;
bool m_invalidateQmakeVfsContents = false;
QString m_qmakeSysroot; QString m_qmakeSysroot;

View File

@@ -18,7 +18,7 @@
<value type="QString" key="Cxx">ProjectExplorer.ToolChain.Gcc:{c3f59b87-6997-4bd8-8067-ee04dc536371}</value> <value type="QString" key="Cxx">ProjectExplorer.ToolChain.Gcc:{c3f59b87-6997-4bd8-8067-ee04dc536371}</value>
</valuemap> </valuemap>
<value type="QString" key="QtPM4.mkSpecInformation"></value> <value type="QString" key="QtPM4.mkSpecInformation"></value>
<value type="int" key="QtSupport.QtInformation">4</value> <value type="int" key="QtSupport.QtInformation">2</value>
</valuemap> </valuemap>
<value type="QString" key="PE.Profile.Icon">:///DESKTOP///</value> <value type="QString" key="PE.Profile.Icon">:///DESKTOP///</value>
<value type="QString" key="PE.Profile.Id">{f16848fc-b615-43b5-b0cc-16a9f57fb573}</value> <value type="QString" key="PE.Profile.Id">{f16848fc-b615-43b5-b0cc-16a9f57fb573}</value>
@@ -112,7 +112,7 @@
</data> </data>
<data> <data>
<variable>Profile.Default</variable> <variable>Profile.Default</variable>
<value type="QString">{a1e860d1-c241-4abf-80fe-cf0c9f0a43b3}</value> <value type="QString">{fc5f34fd-e703-4f4c-85ce-ea5bf5869e6a}</value>
</data> </data>
<data> <data>
<variable>Version</variable> <variable>Version</variable>

View File

@@ -193,18 +193,6 @@ class Qt5Path:
@staticmethod @staticmethod
def __createPlatformQtPath__(qt5Minor): def __createPlatformQtPath__(qt5Minor):
# special handling for Qt5.2
if qt5Minor == 2:
if platform.system() in ('Microsoft', 'Windows'):
return "C:/Qt/Qt5.2.1/5.2.1/msvc2010"
elif platform.system() == 'Linux':
if __is64BitOS__():
return os.path.expanduser("~/Qt5.2.1/5.2.1/gcc_64")
else:
return os.path.expanduser("~/Qt5.2.1/5.2.1/gcc")
else:
return os.path.expanduser("~/Qt5.2.1/5.2.1/clang_64")
# Qt5.3+
if platform.system() in ('Microsoft', 'Windows'): if platform.system() in ('Microsoft', 'Windows'):
return "C:/Qt/Qt5.%d.1" % qt5Minor return "C:/Qt/Qt5.%d.1" % qt5Minor
else: else:

View File

@@ -32,6 +32,7 @@ def main():
expectedErrorAlternatives = ["'SyntaxError' was not declared in this scope", expectedErrorAlternatives = ["'SyntaxError' was not declared in this scope",
"\xe2\x80\x98SyntaxError\xe2\x80\x99 was not declared in this scope", "\xe2\x80\x98SyntaxError\xe2\x80\x99 was not declared in this scope",
"'SyntaxError' : undeclared identifier", "'SyntaxError' : undeclared identifier",
'"SyntaxError" : undeclared identifier',
"use of undeclared identifier 'SyntaxError'", "use of undeclared identifier 'SyntaxError'",
"unknown type name 'SyntaxError'"] "unknown type name 'SyntaxError'"]
startApplication("qtcreator" + SettingsPath) startApplication("qtcreator" + SettingsPath)

View File

@@ -80,7 +80,7 @@ def main():
expect = (("QTableView", "unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'", expect = (("QTableView", "unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'",
"examples list"), "examples list"),
("QLineEdit", "placeholderText='Search in Examples...'", "examples search line edit"), ("QLineEdit", "placeholderText='Search in Examples...'", "examples search line edit"),
("QComboBox", "text~='.*Qt.*' visible='1'", "Qt version combo box")) ("QComboBox", "currentText~='.*Qt.*' visible='1'", "Qt version combo box"))
search = "{type='%s' %s}" search = "{type='%s' %s}"
test.verify(all(map(checkIfObjectExists, (search % (exp[0], exp[1]) for exp in expect))), test.verify(all(map(checkIfObjectExists, (search % (exp[0], exp[1]) for exp in expect))),
"Verifying: 'Examples' topic is opened and the examples are shown.") "Verifying: 'Examples' topic is opened and the examples are shown.")