Merge remote-tracking branch 'origin/2.5'

Conflicts:
	qtcreator.pri
	qtcreator.qbp
	src/plugins/find/treeviewfind.cpp

Change-Id: Iaae61c98938df24bda5521a923303db89eb7f8fe
This commit is contained in:
Eike Ziller
2012-05-10 08:14:36 +02:00
10 changed files with 34 additions and 16 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ ${staging}/lib/libexpat.a: ${source}/expat-${expatversion}.tar.gz | makestagingd
cd ${staging} && \
echo "Extracting expat..." && \
tar xf ${source}/expat-${expatversion}.tar.gz && cd expat-${expatversion} && \
./configure --disable-shared -prefix=/ && ${MAKE} && ${MAKE} install
./configure --disable-shared -prefix=${staging} && ${MAKE} && ${MAKE} install
${staging}/lib/libpython${pyversion}.a: ${source}/Python-${pyversion}.tgz | makestagingdir
unset PYTHONHOME && \
+2 -2
View File
@@ -17518,11 +17518,11 @@ to project &apos;%2&apos;.</source>
<name>ProjectExplorer::Internal::TargetSelector</name>
<message>
<source>Run</source>
<translation>Запустить</translation>
<translation>Запуск</translation>
</message>
<message>
<source>Build</source>
<translation>Собрать</translation>
<translation>Сборка</translation>
</message>
</context>
<context>
+1
View File
@@ -561,6 +561,7 @@ bool CdbEngine::setToolTipExpression(const QPoint &mousePos,
}
DebuggerToolTipWidget *tw = new DebuggerToolTipWidget;
tw->setContext(context);
tw->setDebuggerModel(LocalsWatch);
tw->setExpression(exp);
tw->acquireEngine(this);
DebuggerToolTipManager::instance()->showToolTip(mousePos, editor, tw);
@@ -38,7 +38,6 @@
#include "watchutils.h"
#include "stackhandler.h"
#include "debuggercore.h"
#include "debuggerinternalconstants.h"
#include <coreplugin/icore.h>
#include <coreplugin/modemanager.h>
@@ -579,7 +578,7 @@ QDebug operator<<(QDebug d, const DebuggerToolTipContext &c)
It consists of a title toolbar and a vertical main layout.
The widget has the ability to save/restore tree model contents to XML.
With the engine acquired, it sets a filter model (by expression) on
the engine's Locals model.
one of the engine's models (debuggerModel).
On release, it serializes and restores the data to a QStandardItemModel
(defaultModel) and displays that.
@@ -618,6 +617,7 @@ DebuggerToolTipWidget::DebuggerToolTipWidget(QWidget *parent) :
m_titleLabel(new DraggableLabel),
m_engineAcquired(false),
m_creationDate(QDate::currentDate()),
m_debuggerModel(TooltipsWatch),
m_treeView(new DebuggerToolTipTreeView),
m_defaultModel(new QStandardItemModel(this))
{
@@ -651,8 +651,8 @@ DebuggerToolTipWidget::DebuggerToolTipWidget(QWidget *parent) :
}
bool DebuggerToolTipWidget::matches(const QString &fileName,
const QString &engineType,
const QString &function) const
const QString &engineType,
const QString &function) const
{
if (fileName.isEmpty() || m_context.fileName != fileName)
return false;
@@ -994,7 +994,18 @@ void DebuggerToolTipTreeView::computeSize()
void DebuggerToolTipWidget::doAcquireEngine(Debugger::DebuggerEngine *engine)
{
// Create a filter model on the debugger's model and switch to it.
QAbstractItemModel *model = engine->localsModel();
QAbstractItemModel *model = 0;
switch (m_debuggerModel) {
case LocalsWatch:
model = engine->localsModel();
break;
case WatchersWatch:
model = engine->watchersModel();
break;
case TooltipsWatch:
model = engine->toolTipsModel();
break;
}
QTC_ASSERT(model, return);
DebuggerToolTipExpressionFilterModel *filterModel =
new DebuggerToolTipExpressionFilterModel(model, m_expression);
@@ -1068,6 +1079,7 @@ void DebuggerToolTipWidget::doSaveSessionData(QXmlStreamWriter &w) const
{
w.writeStartElement(QLatin1String(treeElementC));
QXmlStreamAttributes attributes;
attributes.append(QLatin1String(treeModelAttributeC), QString::number(m_debuggerModel));
attributes.append(QLatin1String(treeExpressionAttributeC), m_expression);
w.writeAttributes(attributes);
if (QAbstractItemModel *model = m_treeView->model()) {
@@ -1083,9 +1095,10 @@ void DebuggerToolTipWidget::doLoadSessionData(QXmlStreamReader &r)
return;
// Restore data to default model and show that.
const QXmlStreamAttributes attributes = r.attributes();
m_debuggerModel = attributes.value(QLatin1String(treeModelAttributeC)).toString().toInt();
m_expression = attributes.value(QLatin1String(treeExpressionAttributeC)).toString();
if (debugToolTips)
qDebug() << "DebuggerTreeViewToolTipWidget::doLoadSessionData() " << m_expression;
qDebug() << "DebuggerTreeViewToolTipWidget::doLoadSessionData() " << m_debuggerModel << m_expression;
setObjectName(QLatin1String("DebuggerTreeViewToolTipWidget: ") + m_expression);
restoreTreeModel(r, m_defaultModel);
r.readNext(); // Skip </tree>
@@ -54,6 +54,7 @@ QT_END_NAMESPACE
namespace Core {
class IEditor;
class IMode;
}
namespace TextEditor {
@@ -64,7 +65,6 @@ namespace Debugger {
class DebuggerEngine;
namespace Internal {
class DraggableLabel;
class DebuggerToolTipEditor;
@@ -103,9 +103,8 @@ public:
QString function() const { return m_context.function; }
int position() const { return m_context.position; }
// Check for a match at position.
bool matches(const QString &fileName,
const QString &engineType,
const QString &engineType = QString(),
const QString &function= QString()) const;
const DebuggerToolTipContext &context() const { return m_context; }
@@ -122,6 +121,8 @@ public:
static DebuggerToolTipWidget *loadSessionData(QXmlStreamReader &r);
int debuggerModel() const { return m_debuggerModel; }
void setDebuggerModel(int m) { m_debuggerModel = m; }
QString expression() const { return m_expression; }
void setExpression(const QString &e) { m_expression = e; }
@@ -165,6 +166,7 @@ private:
QAbstractItemModel *swapModel(QAbstractItemModel *newModel);
static void restoreTreeModel(QXmlStreamReader &r, QStandardItemModel *m);
int m_debuggerModel;
QString m_expression;
DebuggerToolTipTreeView *m_treeView;
+1
View File
@@ -3932,6 +3932,7 @@ bool GdbEngine::showToolTip()
return true;
}
DebuggerToolTipWidget *tw = new DebuggerToolTipWidget;
tw->setDebuggerModel(TooltipsWatch);
tw->setExpression(expression);
tw->setContext(*m_toolTipContext);
tw->acquireEngine(this);
+1 -1
View File
@@ -40,7 +40,7 @@ namespace Find {
class ItemModelFindPrivate
{
public:
explicit ItemModelFindPrivate(QTreeView *view, int role)
explicit ItemModelFindPrivate(QTreeView *view, int role, int column)
: m_view(view)
, m_incrementalWrappedState(false),
m_role(role)
+1 -1
View File
@@ -140,7 +140,7 @@ def doSimpleDebugging(currentConfigName, pressContinueCount=1, expectedBPOrder=[
def __startDebugger__(config):
clickButton(waitForObject(":*Qt Creator.Start Debugging_Core::Internal::FancyToolButton"))
handleDebuggerWarnings(config)
hasNotTimedOut = waitFor("object.exists(':Debugger Toolbar.Continue_QToolButton')", 20000)
hasNotTimedOut = waitFor("object.exists(':Debugger Toolbar.Continue_QToolButton')", 60000)
try:
mBox = findObject(":Failed to start application_QMessageBox")
mBoxText = mBox.text
@@ -16,7 +16,7 @@ def main():
workingDir = tempDir()
templateDir = prepareTemplate(sourceExample)
prepareForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
installLazySignalHandler("{type='Core::FutureProgress' unnamed='1''}", "finished()", "__handleFutureProgress__")
installLazySignalHandler("{type='Core::FutureProgress' unnamed='1'}", "finished()", "__handleFutureProgress__")
createNewQtQuickApplication(workingDir, "untitled", templateDir + "/qml/focus.qml")
# wait for parsing to complete
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)")
@@ -53,7 +53,8 @@ def handleTextChanged(object):
def testReIndent():
global originalText,textHasChanged
installLazySignalHandler("QmlJSEditor::QmlJSTextEditorWidget", "textChanged()", "handleTextChanged")
installLazySignalHandler("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1'}",
"textChanged()", "handleTextChanged")
textHasChanged = False
editor = waitForObject("{type='QmlJSEditor::QmlJSTextEditorWidget' unnamed='1' visible='1' "
"window=':Qt Creator_Core::Internal::MainWindow'}")