Commit 387f5a70 authored by Eike Ziller's avatar Eike Ziller
Browse files

Merge remote-tracking branch 'origin/2.6'

Conflicts:
	src/plugins/cpptools/cppcompletion_test.cpp
	src/plugins/projectexplorer/kitmanagerconfigwidget.cpp
	src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
	src/plugins/qtsupport/baseqtversion.cpp
	tests/auto/cplusplus/findusages/tst_findusages.cpp

Change-Id: Idd2abc09753a71a6c252bfa9914274459b2c7e63
parents c9afad98 9820278a
......@@ -111,8 +111,10 @@ bin/qml2puppet.exe
bin/qtpromaker
bin/qtpromaker.exe
share/doc/qtcreator/*.qch
src/tools/gen-cpp-ast/generate-ast
src/tools/mkvisitor/cplusplus0
src/tools/cplusplus-mkvisitor/cplusplus-mkvisitor
src/tools/cplusplus-mkvisitor/cplusplus-mkvisitor.exe
src/tools/cplusplus-update-frontend/cplusplus-update-frontend
src/tools/cplusplus-update-frontend/cplusplus-update-frontend.exe
src/tools/qml/qmldump/qmldump
src/tools/examplesscanner/examplesscanner
src/tools/valgrindfake/valgrind-fake
......@@ -120,13 +122,15 @@ bin/*.exe
# Tests
#------
tests/manual/cplusplus-frontend/cplusplus0
tests/manual/cplusplus-dump/cplusplus0
tests/manual/cplusplus-frontend/cplusplus-frontend
tests/manual/cplusplus-frontend/cplusplus-frontend.exe
tests/manual/qml-ast2dot/qml-ast2dot
tests/manual/debugger/simple/libsimple_test_plugin.*dylib
tests/manual/debugger/simple/simple_test_app
tests/manual/plain-cplusplus/plain-c++
tests/manual/preprocessor/pp
tests/tools/cplusplus-ast2png/cplusplus-ast2png
tests/tools/cplusplus-ast2png/cplusplus-ast2png.exe
tests/auto/cplusplus/codegen/tst_codegen
tests/auto/cplusplus/ast/tst_ast
tests/auto/cplusplus/codeformatter/tst_codeformatter
......
......@@ -31,7 +31,7 @@
\title Using External Tools
You can use external tools directly from \QC. Qt Linguist,
QML Viewer, the
QML preview tools, the
default text editor for your system, and the \c sort tool are preconfigured
for use. You can change their default configurations and configure new
tools.
......@@ -59,14 +59,14 @@
\l{http://qt-project.org/doc/qt-4.8/linguist-manual.html}
{Qt Linguist Manual}.
\section1 Using QML Viewer
\section1 Previewing QML Files
You can preview the current QML document in the QML Viewer. The QML Viewer
invokes the QML runtime to load QML documents and also includes additional
features useful for the development of QML-based applications.
You can preview the current QML document in the QML Viewer (Qt Quick 1) or
QML Scene (Qt Quick 2). The preview tools enable you to load QML documents
for viewing and testing while you are developing an application.
To preview the currently active QML file, select \gui {Tools > External >
Qt Quick > Preview (qmlviewer)}.
To preview the currently active QML file, select \gui Tools > \gui External
> \gui {Qt Quick} > \gui {Preview (qmlviewer)} or \gui {Preview (qmlscene)}.
\section1 Using External Text Editors
......
......@@ -71,7 +71,8 @@
\o \l{Using External Tools}
You can use external tools directly from \QC. Qt Linguist,
QML Viewer, the default text editor for your system, and the \c sort
QML preview tools (QML Viewer and QML Scene), the default text
editor for your system, and the \c sort
tool are preconfigured for use. You can change their default
configurations and configure new tools.
......
......@@ -141,8 +141,9 @@
\o Qt Quick UI
Use a single QML file that contains the main view. You can run
Qt Quick UI projects in the QML Viewer and you need not build
Use a single QML file that contains the main view. You can
review Qt Quick UI projects in a \l{Previewing QML Files}
{preview tool} and you need not build
them. You do not need to have the development environment
installed on your computer to create and run this type of
projects
......@@ -273,7 +274,11 @@
\o Qt resource files, which allow you to store binary files in the
application executable
\o QML files, which specify elements in Qt Quick projects
\o QML files, which specify elements in Qt Quick projects.
\gui {Qt Quick 1} creates a QML file that imports Qt Quick 1.1 and
\gui {Qt Quick 2} creates a QML file that imports Qt Quick 2.0.
Select \gui {Qt Quick 1} to add files to a Qt Quick 1 application
and \gui {Qt Quick 2} to add files to a Qt Quick 2 application.
\o JavaScript files that you can use to write the application logic in
Qt Quick projects
......
......@@ -59,7 +59,8 @@
develop for platforms that run Qt 5.
\o \gui {Qt Quick UI} creates a Qt Quick UI project with a single QML
file that contains the main view. You can review Qt Quick UI
projects in the QML Viewer and you need not build them. You do not
projects in a \l{Previewing QML Files}{preview tool} and you need
not build them. You do not
need to have the development environment installed on your
computer to create and run this type of project.
......
......@@ -127,9 +127,12 @@ macx {
IDE_BIN_PATH = $$IDE_APP_PATH/$${IDE_APP_TARGET}.app/Contents/MacOS
copydata = 1
isEmpty(TIGER_COMPAT_MODE):TIGER_COMPAT_MODE=$$(QTC_TIGER_COMPAT)
isEmpty(TIGER_COMPAT_MODE) {
QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5
QMAKE_LFLAGS *= -mmacosx-version-min=10.5
!isEqual(QT_MAJOR_VERSION, 5) {
# Qt5 doesn't support 10.5, and will set the minimum version correctly to 10.6 or 10.7.
isEmpty(TIGER_COMPAT_MODE) {
QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5
QMAKE_LFLAGS *= -mmacosx-version-min=10.5
}
}
} else {
contains(TEMPLATE, vc.*):vcproj = 1
......
......@@ -7831,7 +7831,7 @@ konnte dem Projekt &apos;%2&apos; nicht hinzugefügt werden.</translation>
</message>
<message>
<source>&amp;Debug</source>
<translation>&amp;Debuggen</translation>
<translation>Deb&amp;uggen</translation>
</message>
<message>
<source>&amp;Start Debugging</source>
......@@ -29,7 +29,7 @@
/*
All firstToken/lastToken methods below which have a doxygen comment with
\generated in it, will be re-generated when the tool "generate-ast" is run.
\generated in it, will be re-generated when the tool "cplusplus-update-frontend" is run.
For methods which are hand-coded, or which should not be changed, make sure that
the comment is gone.
......
......@@ -181,7 +181,11 @@ bool MakeStep::init()
ProcessParameters *pp = processParameters();
pp->setMacroExpander(bc->macroExpander());
pp->setEnvironment(bc->environment());
Utils::Environment env = bc->environment();
// Force output to english for the parsers. Do this here and not in the toolchain's
// addToEnvironment() to not screw up the users run environment.
env.set(QLatin1String("LC_ALL"), QLatin1String("C"));
pp->setEnvironment(env);
pp->setWorkingDirectory(bc->buildDirectory());
pp->setCommand(tc ? tc->makeCommand(bc->environment()) : QLatin1String("make"));
pp->setArguments(arguments);
......
......@@ -188,14 +188,13 @@ bool MakeStep::init()
ProcessParameters *pp = processParameters();
pp->setMacroExpander(bc->macroExpander());
if (m_useNinja) {
Utils::Environment env = bc->environment();
if (!env.value(QLatin1String("NINJA_STATUS")).startsWith(m_ninjaProgressString))
env.set(QLatin1String("NINJA_STATUS"), m_ninjaProgressString + QLatin1String("%o/sec] "));
pp->setEnvironment(env);
} else {
pp->setEnvironment(bc->environment());
}
Utils::Environment env = bc->environment();
// Force output to english for the parsers. Do this here and not in the toolchain's
// addToEnvironment() to not screw up the users run environment.
env.set(QLatin1String("LC_ALL"), QLatin1String("C"));
if (m_useNinja && !env.value(QLatin1String("NINJA_STATUS")).startsWith(m_ninjaProgressString))
env.set(QLatin1String("NINJA_STATUS"), m_ninjaProgressString + QLatin1String("%o/sec] "));
pp->setEnvironment(env);
pp->setWorkingDirectory(bc->buildDirectory());
pp->setCommand(makeCommand(tc, bc->environment()));
pp->setArguments(arguments);
......
......@@ -1051,5 +1051,4 @@ void CppToolsPlugin::test_completion_enclosing_template_class_data()
completions.append(QLatin1String("int_nested"));
QTest::newRow("case: nested template class with enclosing template class")
<< code << completions;
}
......@@ -136,7 +136,7 @@ bool Debugger::Internal::interruptProcess(int pID, int engineType, QString *erro
*errorMessage = QLatin1String("DebugBreakProcess failed: ") + Utils::winErrorMessage(GetLastError());
} else {
const QString executable = QCoreApplication::applicationDirPath() + QLatin1String("/win64interrupt.exe");
switch (QProcess::execute(executable + QLatin1Char(' ') + QString::number(pID))) {
switch (QProcess::execute(executable, QStringList(QString::number(pID)))) {
case -2:
*errorMessage = QString::fromLatin1("Cannot start %1. Check src\\tools\\win64interrupt\\win64interrupt.c for more information.").
arg(QDir::toNativeSeparators(executable));
......
......@@ -251,7 +251,8 @@ void QmlInspectorAdapter::engineClientStatusChanged(QmlDebug::ClientStatus statu
BaseEngineDebugClient *client
= qobject_cast<BaseEngineDebugClient*>(sender());
if (status == QmlDebug::Enabled) {
if (status == QmlDebug::Enabled && !m_engineClientConnected) {
// We accept the first client that is enabled and reject the others.
QTC_ASSERT(client, return);
setActiveEngineClient(client);
} else if (m_engineClientConnected && client == m_engineClient) {
......
......@@ -62,6 +62,7 @@ QmlInspectorAgent::QmlInspectorAgent(DebuggerEngine *engine, QObject *parent)
, m_objectToSelect(-1)
, m_newObjectsCreated(false)
{
m_debugIdToIname.insert(-1, QByteArray("inspect"));
connect(debuggerCore()->action(ShowQmlObjectTree),
SIGNAL(valueChanged(QVariant)), SLOT(updateStatus()));
m_delayQueryTimer.setSingleShot(true);
......@@ -452,17 +453,17 @@ void QmlInspectorAgent::onResult(quint32 queryId, const QVariant &value,
}
if (m_objectTreeQueryIds.contains(queryId)) {
m_objectTreeQueryIds.removeOne(queryId);
if (value.type() == QVariant::List) {
QVariantList objList = value.toList();
foreach (QVariant var, objList) {
// TODO: check which among the list is the actual
// object that needs to be selected.
insertObjectInTree(qvariant_cast<ObjectReference>(var));
verifyAndInsertObjectInTree(qvariant_cast<ObjectReference>(var));
}
} else {
insertObjectInTree(qvariant_cast<ObjectReference>(value));
verifyAndInsertObjectInTree(qvariant_cast<ObjectReference>(value));
}
m_objectTreeQueryIds.removeOne(queryId);
} else if (queryId == m_engineQueryId) {
m_engineQueryId = 0;
QList<EngineReference> engines = qvariant_cast<QList<EngineReference> >(value);
......@@ -608,13 +609,13 @@ void QmlInspectorAgent::updateObjectTree(const ContextReference &context)
return;
foreach (const ObjectReference & obj, context.objects())
insertObjectInTree(obj);
verifyAndInsertObjectInTree(obj);
foreach (const ContextReference &child, context.contexts())
updateObjectTree(child);
}
void QmlInspectorAgent::insertObjectInTree(const ObjectReference &object)
void QmlInspectorAgent::verifyAndInsertObjectInTree(const ObjectReference &object)
{
if (debug)
qDebug() << __FUNCTION__ << '(' << object << ')';
......@@ -622,17 +623,56 @@ void QmlInspectorAgent::insertObjectInTree(const ObjectReference &object)
if (!object.isValid())
return;
QElapsedTimer timeElapsed;
// sync tree with watchhandler
QList<WatchData> watchData;
int objectDebugId = object.debugId();
// Find out the correct position in the tree
// Objects are inserted to the tree if they satisfy one of the two conditions.
// Condition 1: Object is a root object i.e. parentId == -1.
// Condition 2: Object has an expanded parent i.e. siblings are known.
// If the two conditions are not met then we push the object to a stack and recursively
// fetch parents till we find a previously expanded parent.
WatchHandler *handler = m_debuggerEngine->watchHandler();
const int parentId = object.parentId();
const int objectDebugId = object.debugId();
if (m_debugIdToIname.contains(parentId)) {
QByteArray parentIname = m_debugIdToIname.value(parentId);
if (parentId != -1 && !handler->isExpandedIName(parentIname)) {
m_objectStack.push(object);
handler->model()->fetchMore(handler->watchDataIndex(parentIname));
return; // recursive
}
insertObjectInTree(object);
// When root items are inserted in the object tree, m_objectTreeQueryIds = 0
if (!m_debugIdToIname.contains(objectDebugId) && m_objectTreeQueryIds.count())
return;
} else {
m_objectStack.push(object);
fetchObject(parentId);
return; // recursive
}
if (!m_objectStack.isEmpty()) {
const ObjectReference &top = m_objectStack.top();
// We want to expand only a particular branch and not the whole tree. Hence, we do not
// expand siblings.
if (object.children().contains(top)) {
QByteArray objectIname = m_debugIdToIname.value(objectDebugId);
if (!handler->isExpandedIName(objectIname)) {
handler->model()->fetchMore(handler->watchDataIndex(objectIname));
} else {
verifyAndInsertObjectInTree(m_objectStack.pop());
return; // recursive
}
}
}
}
void QmlInspectorAgent::insertObjectInTree(const ObjectReference &object)
{
if (debug)
qDebug() << __FUNCTION__ << '(' << object << ')';
int parentId = parentIdForIname(m_debugIdToIname.value(objectDebugId));
const int objectDebugId = object.debugId();
const int parentId = parentIdForIname(m_debugIdToIname.value(objectDebugId));
QElapsedTimer timeElapsed;
QList<WatchData> watchData;
if (debug)
timeElapsed.start();
watchData.append(buildWatchData(object, m_debugIdToIname.value(parentId), true));
......@@ -829,6 +869,7 @@ void QmlInspectorAgent::clearObjectTree()
m_debugIdHash.clear();
m_debugIdHash.reserve(old_count + 1);
m_debugIdToIname.clear();
m_debugIdToIname.insert(-1, QByteArray("inspect"));
m_objectStack.clear();
// reset only for qt > 4.8.3.
if (m_engineClient->objectName() != QLatin1String(QDECLARATIVE_ENGINE))
......
......@@ -110,7 +110,7 @@ private slots:
private:
void updateObjectTree(const QmlDebug::ContextReference &context);
void verifyAndInsertObjectInTree(const QmlDebug::ObjectReference &object);
void insertObjectInTree(const QmlDebug::ObjectReference &result);
void buildDebugIdHashRecursive(const QmlDebug::ObjectReference &ref);
......
......@@ -1809,6 +1809,11 @@ const WatchData *WatchHandler::watchData(const QModelIndex &idx) const
return m_model->watchItem(idx);
}
const QModelIndex WatchHandler::watchDataIndex(const QByteArray &iname) const
{
return m_model->watchIndex(m_model->findItem(iname));
}
const WatchData *WatchHandler::findData(const QByteArray &iname) const
{
return m_model->findItem(iname);
......
......@@ -85,6 +85,7 @@ public:
void showEditValue(const WatchData &data);
const WatchData *watchData(const QModelIndex &) const;
const QModelIndex watchDataIndex(const QByteArray &iname) const;
const WatchData *findData(const QByteArray &iname) const;
const WatchData *findCppLocalVariable(const QString &name) const;
QString displayForAutoTest(const QByteArray &iname) const;
......
......@@ -114,7 +114,11 @@ bool GenericMakeStep::init()
ProcessParameters *pp = processParameters();
pp->setMacroExpander(bc->macroExpander());
pp->setWorkingDirectory(bc->buildDirectory());
pp->setEnvironment(bc->environment());
Utils::Environment env = bc->environment();
// Force output to english for the parsers. Do this here and not in the toolchain's
// addToEnvironment() to not screw up the users run environment.
env.set(QLatin1String("LC_ALL"), QLatin1String("C"));
pp->setEnvironment(env);
pp->setCommand(makeCommand(bc->environment()));
pp->setArguments(allArguments());
......
......@@ -402,7 +402,7 @@ void BuildManager::nextBuildQueue()
addToOutputWindow(tr("Error while building/deploying project %1 (kit: %2)").arg(projectName, targetName), BuildStep::ErrorOutput);
addToOutputWindow(tr("When executing step '%1'").arg(d->m_currentBuildStep->displayName()), BuildStep::ErrorOutput);
// NBS TODO fix in qtconcurrent
d->m_progressFutureInterface->setProgressValueAndText(d->m_progress*100, tr("Error while building/deploying project %1 (target: %2)").arg(projectName, targetName));
d->m_progressFutureInterface->setProgressValueAndText(d->m_progress*100, tr("Error while building/deploying project %1 (kit: %2)").arg(projectName, targetName));
}
if (result)
......@@ -502,7 +502,7 @@ bool BuildManager::buildQueueAppend(QList<BuildStep *> steps, QStringList names)
// print something for the user
const QString projectName = bs->project()->displayName();
const QString targetName = bs->target()->displayName();
addToOutputWindow(tr("Error while building/deploying project %1 (target: %2)").arg(projectName, targetName), BuildStep::ErrorOutput);
addToOutputWindow(tr("Error while building/deploying project %1 (kit: %2)").arg(projectName, targetName), BuildStep::ErrorOutput);
addToOutputWindow(tr("When executing step '%1'").arg(bs->displayName()), BuildStep::ErrorOutput);
// disconnect the buildsteps again
......
......@@ -44,6 +44,7 @@ class IOutputParser;
namespace Internal {
class KitManagerPrivate;
class KitModel;
class KitPrivate;
} // namespace Internal
......@@ -110,6 +111,7 @@ private:
Internal::KitPrivate *d;
friend class KitManager;
friend class Internal::KitModel; // needed for setAutoDetected() when cloning kits
};
class KitGuard
......
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