From b8b50a21dd788d1ba25a1857ab3072218271758a Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 8 Jul 2015 11:52:50 +0200 Subject: [PATCH 01/45] Debugger: Remove QScriptDebugClient This officially removes support for QtQuick1 debugging. Change-Id: Id3b6e64bb8e250ba57589b4e747f4ad33d3e03a6 Reviewed-by: Kai Koehne Reviewed-by: Eike Ziller Reviewed-by: Alessandro Portale --- src/plugins/debugger/debugger.qbs | 3 +- src/plugins/debugger/qml/qml.pri | 2 - src/plugins/debugger/qml/qmladapter.cpp | 9 - .../debugger/qml/qscriptdebuggerclient.cpp | 606 ------------------ .../debugger/qml/qscriptdebuggerclient.h | 99 --- 5 files changed, 1 insertion(+), 718 deletions(-) delete mode 100644 src/plugins/debugger/qml/qscriptdebuggerclient.cpp delete mode 100644 src/plugins/debugger/qml/qscriptdebuggerclient.h diff --git a/src/plugins/debugger/debugger.qbs b/src/plugins/debugger/debugger.qbs index 3322d95b83f..0419ddf5c2c 100644 --- a/src/plugins/debugger/debugger.qbs +++ b/src/plugins/debugger/debugger.qbs @@ -153,8 +153,7 @@ QtcPlugin { "qmlinspectoradapter.cpp", "qmlinspectoradapter.h", "qmlinspectoragent.cpp", "qmlinspectoragent.h", "qmlv8debuggerclient.cpp", "qmlv8debuggerclient.h", - "qmlv8debuggerclientconstants.h", - "qscriptdebuggerclient.cpp", "qscriptdebuggerclient.h" + "qmlv8debuggerclientconstants.h" ] } diff --git a/src/plugins/debugger/qml/qml.pri b/src/plugins/debugger/qml/qml.pri index 3dd714070d4..4d1676fbd3c 100644 --- a/src/plugins/debugger/qml/qml.pri +++ b/src/plugins/debugger/qml/qml.pri @@ -3,7 +3,6 @@ HEADERS += \ $$PWD/qmladapter.h \ $$PWD/baseqmldebuggerclient.h \ $$PWD/qmlcppengine.h \ - $$PWD/qscriptdebuggerclient.h \ $$PWD/qmlv8debuggerclient.h \ $$PWD/interactiveinterpreter.h \ $$PWD/qmlv8debuggerclientconstants.h \ @@ -15,7 +14,6 @@ SOURCES += \ $$PWD/qmladapter.cpp \ $$PWD/baseqmldebuggerclient.cpp \ $$PWD/qmlcppengine.cpp \ - $$PWD/qscriptdebuggerclient.cpp \ $$PWD/qmlv8debuggerclient.cpp \ $$PWD/interactiveinterpreter.cpp \ $$PWD/qmlinspectoragent.cpp \ diff --git a/src/plugins/debugger/qml/qmladapter.cpp b/src/plugins/debugger/qml/qmladapter.cpp index 73f29d0400f..be843c9b983 100644 --- a/src/plugins/debugger/qml/qmladapter.cpp +++ b/src/plugins/debugger/qml/qmladapter.cpp @@ -33,7 +33,6 @@ #include #include "qmlengine.h" #include "qmlv8debuggerclient.h" -#include "qscriptdebuggerclient.h" #include @@ -153,22 +152,14 @@ bool QmlAdapter::isConnected() const void QmlAdapter::createDebuggerClients() { - QScriptDebuggerClient *debugClient1 = new QScriptDebuggerClient(m_conn); - connect(debugClient1, &QScriptDebuggerClient::newState, - this, &QmlAdapter::clientStateChanged); - connect(debugClient1, &QScriptDebuggerClient::newState, - this, &QmlAdapter::debugClientStateChanged); - QmlV8DebuggerClient *debugClient2 = new QmlV8DebuggerClient(m_conn); connect(debugClient2, &QmlV8DebuggerClient::newState, this, &QmlAdapter::clientStateChanged); connect(debugClient2, &QmlV8DebuggerClient::newState, this, &QmlAdapter::debugClientStateChanged); - m_debugClients.insert(debugClient1->name(),debugClient1); m_debugClients.insert(debugClient2->name(),debugClient2); - debugClient1->setEngine((QmlEngine*)(m_engine.data())); debugClient2->setEngine((QmlEngine*)(m_engine.data())); } diff --git a/src/plugins/debugger/qml/qscriptdebuggerclient.cpp b/src/plugins/debugger/qml/qscriptdebuggerclient.cpp deleted file mode 100644 index fd9b246557e..00000000000 --- a/src/plugins/debugger/qml/qscriptdebuggerclient.cpp +++ /dev/null @@ -1,606 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ -#include "qscriptdebuggerclient.h" - -#include "qmlengine.h" -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -using QmlDebug::QmlDebugStream; - -namespace Debugger { -namespace Internal { - -struct JSAgentBreakpointData -{ - QByteArray functionName; - QByteArray fileUrl; - qint32 lineNumber; -}; - -struct JSAgentStackData -{ - QByteArray functionName; - QByteArray fileUrl; - qint32 lineNumber; -}; - -uint qHash(const JSAgentBreakpointData &b) -{ - return b.lineNumber ^ qHash(b.fileUrl); -} - -QDataStream &operator<<(QDataStream &s, const JSAgentBreakpointData &data) -{ - return s << data.functionName << data.fileUrl << data.lineNumber; -} - -QDataStream &operator<<(QDataStream &s, const JSAgentStackData &data) -{ - return s << data.functionName << data.fileUrl << data.lineNumber; -} - -QDataStream &operator>>(QDataStream &s, JSAgentBreakpointData &data) -{ - return s >> data.functionName >> data.fileUrl >> data.lineNumber; -} - -QDataStream &operator>>(QDataStream &s, JSAgentStackData &data) -{ - return s >> data.functionName >> data.fileUrl >> data.lineNumber; -} - -bool operator==(const JSAgentBreakpointData &b1, const JSAgentBreakpointData &b2) -{ - return b1.lineNumber == b2.lineNumber && b1.fileUrl == b2.fileUrl; -} - -typedef QSet JSAgentBreakpoints; -typedef QList JSAgentStackFrames; - - -static QDataStream &operator>>(QDataStream &s, WatchData &data) -{ - data = WatchData(); - QByteArray name; - QByteArray value; - QByteArray type; - bool hasChildren = false; - s >> data.exp >> name >> value >> type >> hasChildren >> data.id; - data.name = QString::fromUtf8(name); - data.setType(type, false); - data.setValue(QString::fromUtf8(value)); - data.setHasChildren(hasChildren); - data.setAllUnneeded(); - return s; -} - -class QScriptDebuggerClientPrivate -{ -public: - explicit QScriptDebuggerClientPrivate(QScriptDebuggerClient *) : - ping(0), sessionStarted(false), engine(0) - { - - } - - int ping; - bool sessionStarted; - QmlEngine *engine; - JSAgentBreakpoints breakpoints; - - void logSendMessage(const QString &msg) const; - void logReceiveMessage(const QString &msg) const; -}; - -QScriptDebuggerClient::QScriptDebuggerClient(QmlDebug::QmlDebugConnection* client) - : BaseQmlDebuggerClient(client, QLatin1String("JSDebugger")), - d(new QScriptDebuggerClientPrivate(this)) -{ -} - -QScriptDebuggerClient::~QScriptDebuggerClient() -{ - delete d; -} - -void QScriptDebuggerClient::executeStep() -{ - QByteArray reply; - QmlDebugStream rs(&reply, QIODevice::WriteOnly); - QByteArray cmd = "STEPINTO"; - rs << cmd; - d->logSendMessage(QLatin1String(cmd)); - sendMessage(reply); -} - -void QScriptDebuggerClient::executeStepOut() -{ - QByteArray reply; - QmlDebugStream rs(&reply, QIODevice::WriteOnly); - QByteArray cmd = "STEPOUT"; - rs << cmd; - d->logSendMessage(QLatin1String(cmd)); - sendMessage(reply); -} - -void QScriptDebuggerClient::executeNext() -{ - QByteArray reply; - QmlDebugStream rs(&reply, QIODevice::WriteOnly); - QByteArray cmd = "STEPOVER"; - rs << cmd; - d->logSendMessage(QLatin1String(cmd)); - sendMessage(reply); -} - -void QScriptDebuggerClient::executeStepI() -{ - QByteArray reply; - QmlDebugStream rs(&reply, QIODevice::WriteOnly); - QByteArray cmd = "STEPINTO"; - rs << cmd; - d->logSendMessage(QLatin1String(cmd)); - sendMessage(reply); -} - -void QScriptDebuggerClient::executeRunToLine(const ContextData &data) -{ - JSAgentBreakpointData bp; - bp.fileUrl = QUrl::fromLocalFile(data.fileName).toString().toUtf8(); - bp.lineNumber = data.lineNumber; - bp.functionName = "TEMPORARY"; - d->breakpoints.insert(bp); - synchronizeBreakpoints(); - continueInferior(); -} - -void QScriptDebuggerClient::continueInferior() -{ - QByteArray reply; - QmlDebugStream rs(&reply, QIODevice::WriteOnly); - QByteArray cmd = "CONTINUE"; - rs << cmd; - d->logSendMessage(QLatin1String(cmd)); - sendMessage(reply); -} - -void QScriptDebuggerClient::interruptInferior() -{ - QByteArray reply; - QmlDebugStream rs(&reply, QIODevice::WriteOnly); - QByteArray cmd = "INTERRUPT"; - rs << cmd; - d->logSendMessage(QLatin1String(cmd)); - sendMessage(reply); -} - -void QScriptDebuggerClient::startSession() -{ - //Flush buffered data - flushSendBuffer(); - - //Set all breakpoints - BreakHandler *handler = d->engine->breakHandler(); - DebuggerEngine * engine = d->engine->isSlaveEngine() ? - d->engine->masterEngine() : d->engine; - foreach (Breakpoint bp, handler->engineBreakpoints(engine)) { - QTC_CHECK(bp.state() == BreakpointInsertProceeding); - bp.notifyBreakpointInsertOk(); - } - d->sessionStarted = true; -} - -void QScriptDebuggerClient::endSession() -{ -} - -void QScriptDebuggerClient::resetSession() -{ - d->sessionStarted = false; -} - -void QScriptDebuggerClient::activateFrame(int index) -{ - QByteArray reply; - QmlDebugStream rs(&reply, QIODevice::WriteOnly); - QByteArray cmd = "ACTIVATE_FRAME"; - rs << cmd - << index; - d->logSendMessage(QLatin1String(cmd) + QLatin1Char(' ') + QString::number(index)); - sendMessage(reply); -} - -void QScriptDebuggerClient::insertBreakpoint(Breakpoint bp, - int adjustedLine, - int /*adjustedColumn*/) -{ - JSAgentBreakpointData jsbp; - jsbp.fileUrl = QUrl::fromLocalFile(bp.fileName()).toString().toUtf8(); - jsbp.lineNumber = adjustedLine; - jsbp.functionName = bp.functionName().toUtf8(); - d->breakpoints.insert(jsbp); - - BreakpointResponse br = bp.response(); - br.lineNumber = adjustedLine; - bp.setResponse(br); - if (d->sessionStarted && bp.state() == BreakpointInsertProceeding) - bp.notifyBreakpointInsertOk(); -} - -void QScriptDebuggerClient::removeBreakpoint(Breakpoint bp) -{ - JSAgentBreakpointData jsbp; - jsbp.fileUrl = QUrl::fromLocalFile(bp.fileName()).toString().toUtf8(); - jsbp.lineNumber = bp.lineNumber(); - jsbp.functionName = bp.functionName().toUtf8(); - d->breakpoints.remove(jsbp); -} - -void QScriptDebuggerClient::changeBreakpoint(Breakpoint bp) -{ - if (bp.isEnabled()) - insertBreakpoint(bp, bp.response().lineNumber); - else - removeBreakpoint(bp); - - BreakpointResponse br = bp.response(); - br.enabled = bp.isEnabled(); - bp.setResponse(br); -} - -void QScriptDebuggerClient::synchronizeBreakpoints() -{ - QByteArray reply; - QmlDebugStream rs(&reply, QIODevice::WriteOnly); - QByteArray cmd = "BREAKPOINTS"; - rs << cmd - << d->breakpoints; - - QString logBreakpoints; - QTextStream str(&logBreakpoints); - str << cmd << " ("; - bool first = true; - foreach (const JSAgentBreakpointData &bp, d->breakpoints) { - if (first) - first = false; - else - str << ", "; - str << '[' << bp.functionName << ", " << bp.fileUrl << ", " << bp.lineNumber << ']'; - } - str << ')'; - d->logSendMessage(logBreakpoints); - - sendMessage(reply); -} - -void QScriptDebuggerClient::assignValueInDebugger(const WatchData *data, - const QString &expr, - const QVariant &valueV) -{ - QByteArray reply; - QmlDebugStream rs(&reply, QIODevice::WriteOnly); - QByteArray cmd = "EXEC"; - rs << cmd; - QString expression = QString(_("%1 = %2;")).arg(expr).arg(valueV.toString()); - rs << data->iname << expression; - d->logSendMessage(QString::fromLatin1("%1 %2 %3 %4"). - arg(QLatin1String(cmd), QLatin1String(data->iname), expr, - valueV.toString())); - sendMessage(reply); -} - -void QScriptDebuggerClient::updateWatchData(const WatchData &data) -{ - QByteArray reply; - QmlDebugStream rs(&reply, QIODevice::WriteOnly); - QByteArray cmd = "EXEC"; - rs << cmd; - rs << data.iname << data.name; - d->logSendMessage(QLatin1String(cmd) + QLatin1Char(' ') + QLatin1String(data.iname) - + QLatin1Char(' ') + data.name); - sendMessage(reply); -} - -void QScriptDebuggerClient::executeDebuggerCommand(const QString &command) -{ - QByteArray reply; - QmlDebugStream rs(&reply, QIODevice::WriteOnly); - QByteArray cmd = "EXEC"; - QByteArray console = "console"; - rs << cmd << console << command; - d->logSendMessage(QLatin1String(cmd) + QLatin1Char(' ') + QLatin1String(console) - + QLatin1Char(' ') + command); - sendMessage(reply); -} - -void QScriptDebuggerClient::synchronizeWatchers(const QStringList &watchers) -{ - // send watchers list - QByteArray reply; - QmlDebugStream rs(&reply, QIODevice::WriteOnly); - QByteArray cmd = "WATCH_EXPRESSIONS"; - rs << cmd; - d->logSendMessage(QString::fromLatin1("%1 (%2)").arg(QLatin1String(cmd), - watchers.join(QLatin1String(", ")))); - sendMessage(reply); -} - -void QScriptDebuggerClient::expandObject(const QByteArray &iname, quint64 objectId) -{ - //Check if id is valid - if (qint64(objectId) == -1) - return; - - QByteArray reply; - QmlDebugStream rs(&reply, QIODevice::WriteOnly); - QByteArray cmd = "EXPAND"; - rs << cmd; - rs << iname << objectId; - d->logSendMessage(QLatin1String(cmd) + QLatin1Char(' ') + QLatin1String(iname) - + QString::number(objectId)); - sendMessage(reply); -} - -void QScriptDebuggerClient::sendPing() -{ - d->ping++; - QByteArray reply; - QmlDebugStream rs(&reply, QIODevice::WriteOnly); - QByteArray cmd = "PING"; - rs << cmd; - rs << d->ping; - d->logSendMessage(QLatin1String(cmd)); - sendMessage(reply); -} - -void QScriptDebuggerClient::messageReceived(const QByteArray &data) -{ - QByteArray rwData = data; - QmlDebugStream stream(&rwData, QIODevice::ReadOnly); - - QByteArray command; - stream >> command; - - WatchHandler *watchHandler = d->engine->watchHandler(); - StackHandler *stackHandler = d->engine->stackHandler(); - - if (command == "STOPPED") { - d->engine->inferiorSpontaneousStop(); - - QString logString = QString::fromLatin1(command); - - JSAgentStackFrames stackFrames; - QList watches; - QList locals; - stream >> stackFrames >> watches >> locals; - - logString += QString::fromLatin1(" (%1 stack frames) (%2 watches) (%3 locals)"). - arg(stackFrames.size()).arg(watches.size()).arg(locals.size()); - - StackFrames ideStackFrames; - for (int i = 0; i != stackFrames.size(); ++i) { - StackFrame frame; - frame.line = stackFrames.at(i).lineNumber; - frame.function = QLatin1String(stackFrames.at(i).functionName); - frame.file = d->engine->toFileInProject(QUrl(QLatin1String(stackFrames.at(i).fileUrl))); - frame.usable = QFileInfo(frame.file).isReadable(); - frame.level = i + 1; - ideStackFrames << frame; - } - - stackHandler->setFrames(ideStackFrames); - - bool becauseOfException; - stream >> becauseOfException; - - logString += becauseOfException ? QLatin1String(" exception") : QLatin1String(" no_exception"); - - if (becauseOfException) { - QString error; - stream >> error; - - logString += QLatin1Char(' '); - logString += error; - d->logReceiveMessage(logString); - - QString msg = stackFrames.isEmpty() - ? tr("

An uncaught exception occurred:

%1

") - .arg(error.toHtmlEscaped()) - : tr("

An uncaught exception occurred in \"%1\":

%2

") - .arg(QLatin1String(stackFrames.value(0).fileUrl), error.toHtmlEscaped()); - Core::AsynchronousMessageBox::information(tr("Uncaught Exception"), msg); - } else { - QString file; - int line = -1; - - if (!ideStackFrames.isEmpty()) { - file = ideStackFrames.at(0).file; - line = ideStackFrames.at(0).line; - } - - QList breakpoints(d->breakpoints.toList()); - foreach (const JSAgentBreakpointData &data, breakpoints) { - if (data.fileUrl == QUrl::fromLocalFile(file).toString().toUtf8() && - data.lineNumber == line && - data.functionName == "TEMPORARY") { - breakpoints.removeOne(data); - d->breakpoints = JSAgentBreakpoints::fromList(breakpoints); - synchronizeBreakpoints(); - break; - } - } - - d->logReceiveMessage(logString); - } - - if (!ideStackFrames.isEmpty()) - d->engine->gotoLocation(ideStackFrames.value(0)); - - insertLocalsAndWatches(locals, watches, stackHandler->currentIndex()); - - } else if (command == "RESULT") { - WatchData data; - QByteArray iname; - stream >> iname >> data; - - d->logReceiveMessage(QLatin1String(command) + QLatin1Char(' ') - + QLatin1String(iname) + QLatin1Char(' ') + data.value); - - auto item = new WatchItem(data); - item->iname = iname; - if (iname.startsWith("watch.")) { - watchHandler->insertItem(item); - } else if (iname == "console") { - d->engine->showMessage(item->value, ConsoleOutput); - } else if (iname.startsWith("local.")) { - item->name = item->name.left(item->name.indexOf(QLatin1Char(' '))); - watchHandler->insertItem(item); - } else { - qWarning() << "QmlEngine: Unexcpected result: " << iname << item->value; - } - } else if (command == "EXPANDED") { - QList result; - QByteArray iname; - stream >> iname >> result; - d->logReceiveMessage(QString::fromLatin1("%1 %2 (%3 x watchdata)"). - arg(QLatin1String(command), QLatin1String(iname), - QString::number(result.size()))); - bool needPing = false; - - foreach (WatchData data, result) { - data.iname = iname + '.' + data.exp; - watchHandler->insertItem(new WatchItem(data)); - - if (watchHandler->isExpandedIName(data.iname) && qint64(data.id) != -1) { - needPing = true; - expandObject(data.iname, data.id); - } - } - if (needPing) - sendPing(); - } else if (command == "LOCALS") { - QList locals; - QList watches; - int frameId; - stream >> frameId >> locals; - if (!stream.atEnd()) { // compatibility with jsdebuggeragent from 2.1, 2.2 - stream >> watches; - } - - d->logReceiveMessage(QString::fromLatin1("%1 %2 (%3 x locals) (%4 x watchdata)").arg( - QLatin1String(command), QString::number(frameId), - QString::number(locals.size()), QString::number(watches.size()))); - - insertLocalsAndWatches(locals, watches, frameId); - - } else if (command == "PONG") { - int ping; - stream >> ping; - d->logReceiveMessage(QLatin1String(command) + QLatin1Char(' ') + QString::number(ping)); - } else { - qDebug() << Q_FUNC_INFO << "Unknown command: " << command; - d->logReceiveMessage(QLatin1String(command) + QLatin1String(" UNKNOWN COMMAND!!")); - } - -} - -void QScriptDebuggerClient::insertLocalsAndWatches(QList &locals, - QList &watches, - int stackFrameIndex) -{ - WatchHandler *watchHandler = d->engine->watchHandler(); - watchHandler->removeAllData(); - if (stackFrameIndex < 0) - return; - const StackFrame frame = d->engine->stackHandler()->frameAt(stackFrameIndex); - if (!frame.isUsable()) - return; - - bool needPing = false; - foreach (const WatchData &data, watches) { - auto item = new WatchItem(data); - item->iname = watchHandler->watcherName(data.exp); - watchHandler->insertItem(item); - - if (watchHandler->isExpandedIName(data.iname) && qint64(data.id) != -1) { - needPing = true; - expandObject(data.iname, data.id); - } - } - - foreach (const WatchData &data, locals) { - auto item = new WatchItem(data); - if (item->name == QLatin1String("")) - item->name = tr("No Local Variables"); - item->iname = "local." + item->exp; - watchHandler->insertItem(item); - - if (watchHandler->isExpandedIName(data.iname) && qint64(data.id) != -1) { - needPing = true; - expandObject(data.iname, data.id); - } - } - - if (needPing) - sendPing(); - emit stackFrameCompleted(); -} - -void QScriptDebuggerClient::setEngine(QmlEngine *engine) -{ - d->engine = engine; - connect(this, &QScriptDebuggerClient::stackFrameCompleted, - engine, &DebuggerEngine::stackFrameCompleted); -} - -void QScriptDebuggerClientPrivate::logSendMessage(const QString &msg) const -{ - if (engine) - engine->logMessage(QLatin1String("QScriptDebuggerClient"), QmlEngine::LogSend, msg); -} - -void QScriptDebuggerClientPrivate::logReceiveMessage(const QString &msg) const -{ - if (engine) - engine->logMessage(QLatin1String("QScriptDebuggerClient"), QmlEngine::LogReceive, msg); -} - -} // Internal -} // Debugger diff --git a/src/plugins/debugger/qml/qscriptdebuggerclient.h b/src/plugins/debugger/qml/qscriptdebuggerclient.h deleted file mode 100644 index a09a1839c2d..00000000000 --- a/src/plugins/debugger/qml/qscriptdebuggerclient.h +++ /dev/null @@ -1,99 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -#ifndef QSCRIPTDEBUGGERCLIENT_H -#define QSCRIPTDEBUGGERCLIENT_H - -#include "baseqmldebuggerclient.h" - -namespace Debugger { -namespace Internal { - -class QScriptDebuggerClientPrivate; - -class QScriptDebuggerClient : public BaseQmlDebuggerClient -{ - Q_OBJECT - -public: - QScriptDebuggerClient(QmlDebug::QmlDebugConnection *client); - ~QScriptDebuggerClient(); - - void startSession(); - void endSession(); - void resetSession(); - - void executeStep(); - void executeStepOut(); - void executeNext(); - void executeStepI(); - - void executeRunToLine(const ContextData &data); - - void continueInferior(); - void interruptInferior(); - - void activateFrame(int index); - - void insertBreakpoint(Breakpoint bp, int adjustedLine, - int adjustedColumn = -1); - void removeBreakpoint(Breakpoint bp); - void changeBreakpoint(Breakpoint bp); - void synchronizeBreakpoints(); - - void assignValueInDebugger(const WatchData *data, const QString &expression, - const QVariant &valueV); - - void updateWatchData(const WatchData &data); - void executeDebuggerCommand(const QString &command); - - void synchronizeWatchers(const QStringList &watchers); - - void expandObject(const QByteArray &iname, quint64 objectId); - - void setEngine(QmlEngine *engine); - -protected: - void messageReceived(const QByteArray &data); - -private: - void sendPing(); - void insertLocalsAndWatches(QList &locals, QList &watches, - int stackFrameIndex); - -private: - QScriptDebuggerClientPrivate *d; - friend class QScriptDebuggerClientPrivate; -}; - -} // Internal -} // Debugger - -#endif // QSCRIPTDEBUGGERCLIENT_H From cb61a8a9aa93565c8f45fa412a0aac7cfc52ab48 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Wed, 8 Jul 2015 11:12:25 +0200 Subject: [PATCH 02/45] CppTools: Remove some pointless declarations * Unneeded private declared constructors * Q_DISABLE_COPY for classes deriving from QObject (not copyable) Change-Id: I89669e8bb062cda16bab5812e2ac591f9dcf4af2 Reviewed-by: Marco Bubke --- src/plugins/cpptools/baseeditordocumentparser.h | 2 -- src/plugins/cpptools/baseeditordocumentprocessor.h | 2 -- src/plugins/cpptools/builtineditordocumentprocessor.h | 1 - src/plugins/cpptools/cppeditoroutline.h | 1 - src/plugins/cpptools/cppsemanticinfoupdater.h | 1 - src/plugins/cpptools/semantichighlighter.h | 1 - 6 files changed, 8 deletions(-) diff --git a/src/plugins/cpptools/baseeditordocumentparser.h b/src/plugins/cpptools/baseeditordocumentparser.h index 544bc92e473..ddd12fbb0aa 100644 --- a/src/plugins/cpptools/baseeditordocumentparser.h +++ b/src/plugins/cpptools/baseeditordocumentparser.h @@ -41,8 +41,6 @@ namespace CppTools { class CPPTOOLS_EXPORT BaseEditorDocumentParser : public QObject { Q_OBJECT - Q_DISABLE_COPY(BaseEditorDocumentParser) - BaseEditorDocumentParser(); public: BaseEditorDocumentParser(const QString &filePath); diff --git a/src/plugins/cpptools/baseeditordocumentprocessor.h b/src/plugins/cpptools/baseeditordocumentprocessor.h index 8054d866e58..4f30a519e33 100644 --- a/src/plugins/cpptools/baseeditordocumentprocessor.h +++ b/src/plugins/cpptools/baseeditordocumentprocessor.h @@ -49,8 +49,6 @@ namespace CppTools { class CPPTOOLS_EXPORT BaseEditorDocumentProcessor : public QObject { Q_OBJECT - Q_DISABLE_COPY(BaseEditorDocumentProcessor) - BaseEditorDocumentProcessor(); public: BaseEditorDocumentProcessor(TextEditor::TextDocument *document); diff --git a/src/plugins/cpptools/builtineditordocumentprocessor.h b/src/plugins/cpptools/builtineditordocumentprocessor.h index 396ba1bf1a7..b0db31e0097 100644 --- a/src/plugins/cpptools/builtineditordocumentprocessor.h +++ b/src/plugins/cpptools/builtineditordocumentprocessor.h @@ -42,7 +42,6 @@ namespace CppTools { class CPPTOOLS_EXPORT BuiltinEditorDocumentProcessor : public BaseEditorDocumentProcessor { Q_OBJECT - BuiltinEditorDocumentProcessor(); public: BuiltinEditorDocumentProcessor(TextEditor::TextDocument *document, diff --git a/src/plugins/cpptools/cppeditoroutline.h b/src/plugins/cpptools/cppeditoroutline.h index c40ef4327d1..7017b44d9be 100644 --- a/src/plugins/cpptools/cppeditoroutline.h +++ b/src/plugins/cpptools/cppeditoroutline.h @@ -51,7 +51,6 @@ namespace CppTools { class CPPTOOLS_EXPORT CppEditorOutline : public QObject { Q_OBJECT - Q_DISABLE_COPY(CppEditorOutline) public: explicit CppEditorOutline(TextEditor::TextEditorWidget *editorWidget); diff --git a/src/plugins/cpptools/cppsemanticinfoupdater.h b/src/plugins/cpptools/cppsemanticinfoupdater.h index 40eb7a2749b..9b362543261 100644 --- a/src/plugins/cpptools/cppsemanticinfoupdater.h +++ b/src/plugins/cpptools/cppsemanticinfoupdater.h @@ -43,7 +43,6 @@ class SemanticInfoUpdaterPrivate; class SemanticInfoUpdater : public QObject { Q_OBJECT - Q_DISABLE_COPY(SemanticInfoUpdater) public: explicit SemanticInfoUpdater(); diff --git a/src/plugins/cpptools/semantichighlighter.h b/src/plugins/cpptools/semantichighlighter.h index d00db6e9dad..8485539e2e8 100644 --- a/src/plugins/cpptools/semantichighlighter.h +++ b/src/plugins/cpptools/semantichighlighter.h @@ -49,7 +49,6 @@ namespace CppTools { class CPPTOOLS_EXPORT SemanticHighlighter : public QObject { Q_OBJECT - Q_DISABLE_COPY(SemanticHighlighter) public: enum Kind { From 0369bac1261afef77e439424b2698ca7d48b42f9 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Mon, 18 May 2015 09:35:29 +0200 Subject: [PATCH 03/45] UiCodeModelSupport: Notify if content changes Needed for ClangCodeModel. If the content changes, we want to send it immediately to the codemodelbackend process. Change-Id: Iedf16930b494ccb5e91f1bc435db026067d98613 Reviewed-by: Nikolai Kosjar Reviewed-by: Daniel Teske --- .../cpptools/abstracteditorsupport.cpp | 5 + src/plugins/cpptools/abstracteditorsupport.h | 1 + src/plugins/cpptools/cppmodelmanager.cpp | 11 ++ src/plugins/cpptools/cppmodelmanager.h | 6 + src/plugins/qtsupport/uicodemodelsupport.cpp | 112 ++++++++---------- src/plugins/qtsupport/uicodemodelsupport.h | 4 +- 6 files changed, 76 insertions(+), 63 deletions(-) diff --git a/src/plugins/cpptools/abstracteditorsupport.cpp b/src/plugins/cpptools/abstracteditorsupport.cpp index e9f77f9e318..843ce0f06f0 100644 --- a/src/plugins/cpptools/abstracteditorsupport.cpp +++ b/src/plugins/cpptools/abstracteditorsupport.cpp @@ -53,6 +53,11 @@ void AbstractEditorSupport::updateDocument() m_modelmanager->updateSourceFiles(QSet() << fileName()); } +void AbstractEditorSupport::notifyAboutUpdatedContents() const +{ + m_modelmanager->emitAbstractEditorSupportContentsUpdated(fileName(), contents()); +} + QString AbstractEditorSupport::licenseTemplate(const QString &file, const QString &className) { return Internal::CppFileSettings::licenseTemplate(file, className); diff --git a/src/plugins/cpptools/abstracteditorsupport.h b/src/plugins/cpptools/abstracteditorsupport.h index b1919fcff24..606fcca9a23 100644 --- a/src/plugins/cpptools/abstracteditorsupport.h +++ b/src/plugins/cpptools/abstracteditorsupport.h @@ -51,6 +51,7 @@ public: virtual QString fileName() const = 0; void updateDocument(); + void notifyAboutUpdatedContents() const; unsigned revision() const { return m_revision; } static QString licenseTemplate(const QString &file = QString(), const QString &className = QString()); diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp index 01132b9ebbc..0d1b13621d6 100644 --- a/src/plugins/cpptools/cppmodelmanager.cpp +++ b/src/plugins/cpptools/cppmodelmanager.cpp @@ -958,6 +958,17 @@ void CppModelManager::emitDocumentUpdated(Document::Ptr doc) emit documentUpdated(doc); } +void CppModelManager::emitAbstractEditorSupportContentsUpdated(const QString &filePath, + const QByteArray &contents) +{ + emit abstractEditorSupportContentsUpdated(filePath, contents); +} + +void CppModelManager::emitAbstractEditorSupportRemoved(const QString &filePath) +{ + emit abstractEditorSupportRemoved(filePath); +} + void CppModelManager::onProjectAdded(ProjectExplorer::Project *) { QMutexLocker locker(&d->m_projectMutex); diff --git a/src/plugins/cpptools/cppmodelmanager.h b/src/plugins/cpptools/cppmodelmanager.h index 9a141ac8e3f..24b2d2d6ee7 100644 --- a/src/plugins/cpptools/cppmodelmanager.h +++ b/src/plugins/cpptools/cppmodelmanager.h @@ -111,6 +111,9 @@ public: bool replaceDocument(Document::Ptr newDoc); void emitDocumentUpdated(CPlusPlus::Document::Ptr doc); + void emitAbstractEditorSupportContentsUpdated(const QString &filePath, + const QByteArray &contents); + void emitAbstractEditorSupportRemoved(const QString &filePath); bool isCppEditor(Core::IEditor *editor) const; @@ -173,6 +176,9 @@ signals: void gcFinished(); // Needed for tests. + void abstractEditorSupportContentsUpdated(const QString &filePath, const QByteArray &contents); + void abstractEditorSupportRemoved(const QString &filePath); + public slots: void updateModifiedSourceFiles(); void GC(); diff --git a/src/plugins/qtsupport/uicodemodelsupport.cpp b/src/plugins/qtsupport/uicodemodelsupport.cpp index 0fb3f4154b2..358784c1b97 100644 --- a/src/plugins/qtsupport/uicodemodelsupport.cpp +++ b/src/plugins/qtsupport/uicodemodelsupport.cpp @@ -47,8 +47,7 @@ #include #include - -enum { debug = 0 }; +#include using namespace ProjectExplorer; using namespace CPlusPlus; @@ -79,20 +78,26 @@ UiCodeModelSupport::UiCodeModelSupport(CppTools::CppModelManager *modelmanager, m_headerFileName(uiHeaderFile), m_state(BARE) { - if (debug) - qDebug()<<"ctor UiCodeModelSupport for"<emitAbstractEditorSupportRemoved(m_headerFileName); + QLoggingCategory log("qtc.qtsupport.uicodemodelsupport"); + qCDebug(log) << "dtor ~UiCodeModelSupport for" << m_uiFileName; } void UiCodeModelSupport::init() const { + QLoggingCategory log("qtc.qtsupport.uicodemodelsupport"); if (m_state != BARE) return; QDateTime sourceTime = QFileInfo(m_uiFileName).lastModified(); @@ -101,53 +106,43 @@ void UiCodeModelSupport::init() const if (uiHeaderTime.isValid() && (uiHeaderTime > sourceTime)) { QFile file(m_headerFileName); if (file.open(QFile::ReadOnly | QFile::Text)) { - if (debug) - qDebug()<<"ui*h file is more recent then source file, using information from ui*h file"<= sourceTime) { - if (debug) - qDebug()<<"Cache is still more recent then source"; + qCDebug(log) << "Cache is still more recent then source"; return; } else { QFileInfo fi(m_headerFileName); @@ -237,20 +232,19 @@ void UiCodeModelSupport::updateFromBuild() if (uiHeaderTime.isValid() && (uiHeaderTime > sourceTime)) { if (m_cacheTime >= uiHeaderTime) return; - if (debug) - qDebug()<<"found ui*h updating from it"; + qCDebug(log) << "found ui*h updating from it"; QFile file(m_headerFileName); if (file.open(QFile::ReadOnly | QFile::Text)) { QTextStream stream(&file); m_contents = stream.readAll().toUtf8(); m_cacheTime = uiHeaderTime; + notifyAboutUpdatedContents(); updateDocument(); return; } } - if (debug) - qDebug()<<"ui*h not found or not more recent then source not changing anything"; + qCDebug(log) << "ui*h not found or not more recent then source not changing anything"; } } @@ -279,34 +273,30 @@ QStringList UiCodeModelSupport::environment() const } } -bool UiCodeModelSupport::finishProcess() const +bool UiCodeModelSupport::finishProcess() { if (m_state != RUNNING) return false; + QLoggingCategory log("qtc.qtsupport.uicodemodelsupport"); if (!m_process.waitForFinished(3000) && m_process.exitStatus() != QProcess::NormalExit && m_process.exitCode() != 0) { - if (m_state != RUNNING) // waitForFinished can recurse into finishProcess - return false; - if (debug) - qDebug() << "failed" << m_process.readAllStandardError(); + qCDebug(log) << "finish process: failed" << m_process.readAllStandardError(); m_process.kill(); m_state = FINISHED; return false; } - if (m_state != RUNNING) // waitForFinished can recurse into finishProcess - return true; - // As far as I can discover in the UIC sources, it writes out local 8-bit encoding. The // conversion below is to normalize both the encoding, and the line terminators. QString normalized = QString::fromLocal8Bit(m_process.readAllStandardOutput()); m_contents = normalized.toUtf8(); m_cacheTime = QDateTime::currentDateTime(); - if (debug) - qDebug() << "ok" << m_contents.size() << "bytes."; + qCDebug(log) << "finish process: ok" << m_contents.size() << "bytes."; m_state = FINISHED; + notifyAboutUpdatedContents(); + updateDocument(); return true; } diff --git a/src/plugins/qtsupport/uicodemodelsupport.h b/src/plugins/qtsupport/uicodemodelsupport.h index 333950e79ca..91dbdb33611 100644 --- a/src/plugins/qtsupport/uicodemodelsupport.h +++ b/src/plugins/qtsupport/uicodemodelsupport.h @@ -73,11 +73,11 @@ private: QStringList environment() const; private slots: - bool finishProcess() const; + bool finishProcess(); private: ProjectExplorer::Project *m_project; - enum State { BARE, RUNNING, FINISHED }; + enum State { BARE, RUNNING, FINISHED, ABORTING }; void init() const; bool runUic(const QString &ui) const; From 5b583ad67e8c9dd24f3cccf3672583abfe361918 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 7 Jul 2015 17:19:53 +0200 Subject: [PATCH 04/45] Debugger: Add dumper for QUuid Change-Id: I171ac0130009b9610c766deaa2d85aa095e33d6f Reviewed-by: Christian Stenger Reviewed-by: Orgad Shaneh --- share/qtcreator/debugger/qttypes.py | 10 ++++++++++ tests/auto/debugger/tst_dumpers.cpp | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py index 268da78f71c..4ebffc09981 100644 --- a/share/qtcreator/debugger/qttypes.py +++ b/share/qtcreator/debugger/qttypes.py @@ -1899,6 +1899,16 @@ def qdump__QUrl(d, value): d.putGenericItem("fragment", stringType, fragment, Hex4EncodedLittleEndian) d.putFields(value) + +def qdump__QUuid(d, value): + v = value["data4"] + d.putValue("{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}" + % (value["data1"], value["data2"], value["data3"], + v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7])) + d.putNumChild(1) + d.putPlainChildren(value) + + def qdumpHelper_QVariant_0(d, blob): # QVariant::Invalid d.putBetterType("%sQVariant (invalid)" % d.qtNamespace()) diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index b4c8054d965..3263ad00b25 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -2962,6 +2962,14 @@ void tst_Dumpers::dumper_data() + Check4("url1.d.fragment", "\"\"", "@QString"); + QTest::newRow("QUuid") + << Data("#include ", + "QUuid uuid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);\n" + "unused(&uuid);\n") + + CoreProfile() + + Check("uuid", "{00000001-0002-0003-0405-060708090a0b}", "@QUuid"); + + QByteArray expected1 = "\"AAA"; expected1.append(char('\t')); expected1.append(char('\r')); From 3a2c9f6d4b280a1116a121aa0fde3907f35afb1b Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Wed, 8 Jul 2015 15:08:13 +0200 Subject: [PATCH 05/45] Clang: Fix invalid QTC_ASSERT() The assertion failed if textDocument was of type e.g. DiffEditorDocument. Change-Id: I00f8734b99c1187c071ef55ff1622fe1f9c3eb56 Reviewed-by: Marco Bubke --- src/plugins/clangcodemodel/clangmodelmanagersupport.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp b/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp index 36bd7aebfdb..eda9ecc06fb 100644 --- a/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp +++ b/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp @@ -113,9 +113,8 @@ void ModelManagerSupportClang::onEditorOpened(Core::IEditor *editor) Core::IDocument *document = editor->document(); QTC_ASSERT(document, return); TextEditor::TextDocument *textDocument = qobject_cast(document); - QTC_ASSERT(textDocument, return); - if (cppModelManager()->isCppEditor(editor)) { + if (textDocument && cppModelManager()->isCppEditor(editor)) { // Handle externally changed documents connect(textDocument, &Core::IDocument::reloadFinished, this, &ModelManagerSupportClang::onCppDocumentReloadFinished, From 521d7cf7a38ad82eed70ef005b18f09139ac34a3 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Thu, 4 Jun 2015 11:38:59 +0200 Subject: [PATCH 06/45] Clang: Send in-memory generated ui header to backend Change-Id: I59e9b1f10d1a7fe9a75cbe84117aa5cc04460dab Reviewed-by: Marco Bubke --- .../clangmodelmanagersupport.cpp | 4 ++ .../test/clangcodecompletion_test.cpp | 53 ++++++++++++++++++- 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp b/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp index eda9ecc06fb..8115b52577d 100644 --- a/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp +++ b/src/plugins/clangcodemodel/clangmodelmanagersupport.cpp @@ -69,6 +69,10 @@ ModelManagerSupportClang::ModelManagerSupportClang() this, &ModelManagerSupportClang::onEditorOpened); CppTools::CppModelManager *modelManager = cppModelManager(); + connect(modelManager, &CppTools::CppModelManager::abstractEditorSupportContentsUpdated, + this, &ModelManagerSupportClang::onAbstractEditorSupportContentsUpdated); + connect(modelManager, &CppTools::CppModelManager::abstractEditorSupportRemoved, + this, &ModelManagerSupportClang::onAbstractEditorSupportRemoved); connect(modelManager, &CppTools::CppModelManager::projectPartsUpdated, this, &ModelManagerSupportClang::onProjectPartsUpdated); connect(modelManager, &CppTools::CppModelManager::projectPartsRemoved, diff --git a/src/plugins/clangcodemodel/test/clangcodecompletion_test.cpp b/src/plugins/clangcodemodel/test/clangcodecompletion_test.cpp index 58de8258508..2ddcf8bcb99 100644 --- a/src/plugins/clangcodemodel/test/clangcodecompletion_test.cpp +++ b/src/plugins/clangcodemodel/test/clangcodecompletion_test.cpp @@ -615,6 +615,49 @@ bool hasSnippet(ProposalModel model, const QByteArray &text) return false; } +class MonitorGeneratedUiFile : public QObject +{ + Q_OBJECT + +public: + MonitorGeneratedUiFile(); + bool waitUntilGenerated(int timeout = 10000) const; + +private: + void onUiFileGenerated() { m_isGenerated = true; } + + bool m_isGenerated = false; +}; + +MonitorGeneratedUiFile::MonitorGeneratedUiFile() +{ + connect(CppTools::CppModelManager::instance(), + &CppTools::CppModelManager::abstractEditorSupportContentsUpdated, + this, &MonitorGeneratedUiFile::onUiFileGenerated); +} + +bool MonitorGeneratedUiFile::waitUntilGenerated(int timeout) const +{ + if (m_isGenerated) + return true; + + QTime time; + time.start(); + + forever { + if (m_isGenerated) + return true; + + if (time.elapsed() > timeout) + return false; + + QCoreApplication::processEvents(); + QThread::msleep(20); + } + + return false; +} + } // anonymous namespace namespace ClangCodeModel { @@ -883,6 +926,8 @@ void ClangCodeCompletionTest::testUnsavedFilesTrackingByCompletingUiObject() CppTools::Tests::TemporaryCopiedDir testDir(qrcPath("qt-widgets-app")); QVERIFY(testDir.isValid()); + MonitorGeneratedUiFile monitorGeneratedUiFile; + // Open project const QString projectFilePath = testDir.absolutePath("qt-widgets-app.pro"); CppTools::Tests::ProjectOpenerAndCloser projectManager; @@ -897,11 +942,11 @@ void ClangCodeCompletionTest::testUnsavedFilesTrackingByCompletingUiObject() QVERIFY(openSource.succeeded()); // ...and check comletions + QVERIFY(monitorGeneratedUiFile.waitUntilGenerated()); ProposalModel proposal = completionResults(openSource.editor()); QVERIFY(hasItem(proposal, "menuBar")); QVERIFY(hasItem(proposal, "statusBar")); QVERIFY(hasItem(proposal, "centralWidget")); - QEXPECT_FAIL("", "Signals are not yet done", Abort); QVERIFY(hasItem(proposal, "setupUi")); } @@ -921,6 +966,7 @@ void ClangCodeCompletionTest::testUpdateBackendAfterRestart() // ... and modify it, so we have an unsaved file. insertTextAtTopOfEditor(openHeader.editor(), "int someGlobal;\n"); // Open project ... + MonitorGeneratedUiFile monitorGeneratedUiFile; const QString projectFilePath = testDir.absolutePath("qt-widgets-app.pro"); CppTools::Tests::ProjectOpenerAndCloser projectManager; const CppTools::ProjectInfo projectInfo = projectManager.open(projectFilePath, true); @@ -931,6 +977,7 @@ void ClangCodeCompletionTest::testUpdateBackendAfterRestart() QVERIFY(testDocument.isCreatedAndHasValidCursorPosition()); OpenEditorAtCursorPosition openSource(testDocument); QVERIFY(openSource.succeeded()); + QVERIFY(monitorGeneratedUiFile.waitUntilGenerated()); // Check commands that would have been sent QVERIFY(compare(LogOutput(spy.senderLog), @@ -939,6 +986,8 @@ void ClangCodeCompletionTest::testUpdateBackendAfterRestart() " ProjectPartContainer id: qt-widgets-app.pro\n" "RegisterTranslationUnitForCodeCompletionCommand\n" " Path: myheader.h ProjectPart: \n" + "RegisterTranslationUnitForCodeCompletionCommand\n" + " Path: ui_mainwindow.h ProjectPart: \n" ))); spy.senderLog.clear(); @@ -966,3 +1015,5 @@ void ClangCodeCompletionTest::testUpdateBackendAfterRestart() } // namespace Tests } // namespace Internal } // namespace ClangCodeModel + +#include "clangcodecompletion_test.moc" From cf4eae090a4b38397ac08eb89ef0dc1f1890fe13 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Wed, 8 Jul 2015 10:24:05 +0200 Subject: [PATCH 07/45] Clang: Clean up ClangEditorDocumentParser Change-Id: Ib7e0b7c51b4c751b184021baac9e26d008dea06c Reviewed-by: Marco Bubke --- src/plugins/clangcodemodel/clangeditordocumentparser.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/plugins/clangcodemodel/clangeditordocumentparser.h b/src/plugins/clangcodemodel/clangeditordocumentparser.h index cbdce90f2d8..e86cf50f949 100644 --- a/src/plugins/clangcodemodel/clangeditordocumentparser.h +++ b/src/plugins/clangcodemodel/clangeditordocumentparser.h @@ -28,7 +28,6 @@ ** ****************************************************************************/ - #ifndef CLANGEDITORDOCUMENTPARSER_H #define CLANGEDITORDOCUMENTPARSER_H @@ -36,7 +35,6 @@ #include - namespace CppTools { class WorkingCopy; } namespace ClangCodeModel { @@ -45,9 +43,6 @@ class ClangEditorDocumentParser : public CppTools::BaseEditorDocumentParser { Q_OBJECT -public: - typedef QSharedPointer Ptr; - public: ClangEditorDocumentParser(const QString &filePath); @@ -59,8 +54,6 @@ public: private: SemanticMarker::Ptr m_marker; - QStringList m_options; - Internal::UnsavedFiles m_unsavedFiles; }; } // namespace ClangCodeModel From 554700e073d12eadff073758c58a6d136d874270 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Fri, 3 Jul 2015 10:54:48 +0200 Subject: [PATCH 08/45] Remove unused and outdated script Change-Id: Iaa3d2f5f415b2d74d12d5b1e269c97df848d25bf Reviewed-by: Christian Stenger Reviewed-by: Eike Ziller --- scripts/unixdeployqt.sh | 100 ---------------------------------------- 1 file changed, 100 deletions(-) delete mode 100755 scripts/unixdeployqt.sh diff --git a/scripts/unixdeployqt.sh b/scripts/unixdeployqt.sh deleted file mode 100755 index be843f3e303..00000000000 --- a/scripts/unixdeployqt.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash -################################################################################ -# Copyright (C) 2015 The Qt Company Ltd -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# * Neither the name of The Qt Company Ltd, nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -################################################################################ - -if [ $# -lt 1 ]; then - echo "Usage: $(basename $1) [qmake_path]" - exit 1 -fi - -INSTALL_DIR="$1" -QMAKE_BIN="${2:-$(which qmake)}" - -if [ ! -e "$QMAKE_BIN" ]; then - echo "Could not detetermine location of 'qmake'!" - exit 1; -fi - -CHRPATH=$(which chrpath) -if [ ! -e "$CHRPATH" ]; then - echo "Cannot find required binary 'chrpath'." - exit 1 -fi - -QT_INSTALL_LIBS="$($QMAKE_BIN -query QT_INSTALL_LIBS)" -QT_INSTALL_PLUGINS="$($QMAKE_BIN -query QT_INSTALL_PLUGINS)" -QT_INSTALL_IMPORTS="$($QMAKE_BIN -query QT_INSTALL_IMPORTS)" -QT_INSTALL_TRANSLATIONS="$($QMAKE_BIN -query QT_INSTALL_TRANSLATIONS)" - -plugins="accessible designer iconengines imageformats sqldrivers" -imports="Qt QtWebKit" -tr_catalogs="assistant designer qt qt_help" -tr_languages="$(cd $INSTALL_DIR/share/qtcreator/translations; echo qtcreator_* | sed -e 's,[^_]*_\([^.]*\)\.,\1 ,g')" - -function fix_rpaths() -{ - pushd $INSTALL_DIR/lib - find qtcreator/ -maxdepth 1 -name "*.so*" -type f -exec $CHRPATH -r \$ORIGIN {} \; - cd $INSTALL_DIR/lib/qtcreator - find plugins/ -maxdepth 2 -name "*.so" -type f -exec $CHRPATH -r \$ORIGIN/../.. {} \; - - cd $INSTALL_DIR/bin - # all executable files in bin - find -maxdepth 1 -type f -executable -exec $CHRPATH -r \$ORIGIN/../lib/qtcreator {} \; - # all lib of imports and plugins one level underneath bin - find -mindepth 2 -maxdepth 2 -type f -name "*.so" -exec $CHRPATH -r \$ORIGIN/../../lib/qtcreator {} \; - find -mindepth 3 -maxdepth 3 -type f -name "*.so" -exec $CHRPATH -r \$ORIGIN/../../../lib/qtcreator {} \; - find -mindepth 4 -maxdepth 4 -type f -name "*.so" -exec $CHRPATH -r \$ORIGIN/../../../../lib/qtcreator {} \; -} - -function copy_binaries() -{ - cp -a $QT_INSTALL_LIBS/*.so* $INSTALL_DIR/lib/qtcreator - - for plugin in $plugins; do - cp -a $QT_INSTALL_PLUGINS/$plugin $INSTALL_DIR/bin - done - - for import in $imports; do - cp -a $QT_INSTALL_IMPORTS/$import $INSTALL_DIR/bin - done -} - -function copy_translations() -{ - for language in $tr_languages; do - for catalog in $tr_catalogs; do - cp -a $QT_INSTALL_TRANSLATIONS/${catalog}_${language}.qm $INSTALL_DIR/share/qtcreator/translations - done - done -} - -copy_binaries -copy_translations -fix_rpaths - From fc7ce7f0c8044c7f98262929fa75fa10169a845b Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Wed, 8 Jul 2015 13:51:32 +0200 Subject: [PATCH 09/45] JsonFieldPage: Be more paranoid with the index of ComboBoxes This avoids a combobox being shown without any selection. This has the side-effect that QTCREATORBUG-14699 can no longer get triggered. Task-number: QTCREATORBUG-14699 Change-Id: I98f5ae503d29370ad46c6620238bc2815c024747 Reviewed-by: Christian Stenger --- src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp index f62f05d0bf6..3f798035cde 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp @@ -820,13 +820,15 @@ void JsonFieldPage::ComboBoxField::initializeData(MacroExpander *expander) if (!tmpConditions.at(i)) { tmpItems.removeAt(i); tmpData.removeAt(i); - if (i <= index) + if (i < index && index > 0) --index; } } + + if (index < 0 || index >= tmpData.count()) + index = 0; w->setItems(tmpItems, tmpData); w->setInsertPolicy(QComboBox::NoInsert); - w->setCurrentIndex(index); } From f36e79cfa2bc75adba339220011b8ddd42ec2c9d Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Wed, 8 Jul 2015 17:52:50 +0200 Subject: [PATCH 10/45] QtQuick*Wizards: Do never show an empty version dropdown Always list all minimum Qt version options and pick the lowest by default. The wizard will be listed with no platform set and needs to do something then. Before it did show an empty combobox and behaved oddly from that point on when no kit with a Qt >= 5.3 was found. Now it lists all possible versions and offers to set up kits for you via the kits page when no matching kit is available. Change-Id: I978268a2b8f1dfcfc8640460d905652abe91f1ae Reviewed-by: Christian Stenger --- .../projects/qmake/qtquickapplication/wizard.json | 14 ++++++-------- .../qmake/qtquickcontrolsapplication/wizard.json | 14 ++++++-------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/wizard.json b/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/wizard.json index d633eddf6bf..ff84948f890 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qmake/qtquickapplication/wizard.json @@ -7,8 +7,8 @@ "trDisplayName": "Qt Quick Application", "trDisplayCategory": "Application", "icon": "qml_wizard.png", - "featuresRequired": [ "QtSupport.Wizards.FeatureQt", "QtSupport.Wizards.FeatureQtQuick.2" ], - "enabled": "${JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 && [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.3') >= 0}", + "featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.3" ], + "enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 }", "options": [ @@ -38,6 +38,7 @@ "type": "ComboBox", "data": { + "index": 2, "items": [ { @@ -46,8 +47,7 @@ "{ 'qtQuickVersion': '2.5', 'qtQuickWindowVersion': '2.2' - }", - "condition": "%{JS: [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.5') >= 0}" + }" }, { "trKey": "Qt 5.4", @@ -55,8 +55,7 @@ "{ 'qtQuickVersion': '2.4', 'qtQuickWindowVersion': '2.2' - }", - "condition": "%{JS: [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.4') >= 0}" + }" }, { "trKey": "Qt 5.3", @@ -64,8 +63,7 @@ "{ 'qtQuickVersion': '2.3', 'qtQuickWindowVersion': '2.2' - }", - "condition": "%{JS: [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.3') >= 0}" + }" } ] } diff --git a/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrolsapplication/wizard.json b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrolsapplication/wizard.json index 7738f28e5ac..0a57e21bf3b 100644 --- a/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrolsapplication/wizard.json +++ b/share/qtcreator/templates/wizards/projects/qmake/qtquickcontrolsapplication/wizard.json @@ -7,8 +7,8 @@ "trDisplayName": "Qt Quick Controls Application", "trDisplayCategory": "Application", "icon": "../qtquickapplication/qml_wizard.png", - "featuresRequired": [ "QtSupport.Wizards.FeatureQt" ], - "enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 && [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.3') >= 0 }", + "featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.3" ], + "enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}", "options": [ @@ -40,6 +40,7 @@ "type": "ComboBox", "data": { + "index": 2, "items": [ { @@ -50,8 +51,7 @@ 'qtQuickControlsVersion': '1.4', 'qtQuickDialogsVersion': '1.2', 'qtQuickLayoutsVersion': '1.2' - }", - "condition": "%{JS: [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.5') >= 0}" + }" }, { "trKey": "Qt 5.4", @@ -61,8 +61,7 @@ 'qtQuickControlsVersion': '1.3', 'qtQuickDialogsVersion': '1.2', 'qtQuickLayoutsVersion': '1.1' - }", - "condition": "%{JS: [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.4') >= 0}" + }" }, { "trKey": "Qt 5.3", @@ -72,8 +71,7 @@ 'qtQuickControlsVersion': '1.2', 'qtQuickDialogsVersion': '1.2', 'qtQuickLayoutsVersion': '1.1' - }", - "condition": "%{JS: [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.3') >= 0}" + }" } ] } From 7e30a74d41aea34a469c5d348219908c8b426986 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Mon, 6 Jul 2015 19:09:09 +0200 Subject: [PATCH 11/45] QmlDesigner: Remove unsupported testfiles Change-Id: I236b26646752783d4956f3c290d1e6463bef5efa Reviewed-by: Christian Stenger Reviewed-by: Thomas Hartmann --- .../qml/testfiles/components/MyButton.qml | 37 --------- tests/manual/qml/testfiles/empty.qml | 36 --------- tests/manual/qml/testfiles/flipable.qml | 43 ---------- tests/manual/qml/testfiles/helloworld.qml | 41 ---------- .../qml/testfiles/helloworld_inverted.qml | 43 ---------- tests/manual/qml/testfiles/images.qml | 57 -------------- .../manual/qml/testfiles/images/qtcreator.ico | Bin 20929 -> 0 bytes .../manual/qml/testfiles/images/qtcreator.jpg | Bin 9489 -> 0 bytes .../manual/qml/testfiles/images/qtcreator.png | Bin 12498 -> 0 bytes tests/manual/qml/testfiles/listmodel.qml | 40 ---------- tests/manual/qml/testfiles/listview.qml | 74 ------------------ tests/manual/qml/testfiles/states.qml | 74 ------------------ tests/manual/qml/testfiles/subcomponent.qml | 47 ----------- .../manual/qml/testfiles/testfiles.qmlproject | 16 ---- tests/manual/qml/testfiles/usingbutton.qml | 41 ---------- tests/manual/qml/testfiles/webview.qml | 43 ---------- 16 files changed, 592 deletions(-) delete mode 100644 tests/manual/qml/testfiles/components/MyButton.qml delete mode 100644 tests/manual/qml/testfiles/empty.qml delete mode 100644 tests/manual/qml/testfiles/flipable.qml delete mode 100644 tests/manual/qml/testfiles/helloworld.qml delete mode 100644 tests/manual/qml/testfiles/helloworld_inverted.qml delete mode 100644 tests/manual/qml/testfiles/images.qml delete mode 100644 tests/manual/qml/testfiles/images/qtcreator.ico delete mode 100644 tests/manual/qml/testfiles/images/qtcreator.jpg delete mode 100644 tests/manual/qml/testfiles/images/qtcreator.png delete mode 100644 tests/manual/qml/testfiles/listmodel.qml delete mode 100644 tests/manual/qml/testfiles/listview.qml delete mode 100644 tests/manual/qml/testfiles/states.qml delete mode 100644 tests/manual/qml/testfiles/subcomponent.qml delete mode 100644 tests/manual/qml/testfiles/testfiles.qmlproject delete mode 100644 tests/manual/qml/testfiles/usingbutton.qml delete mode 100644 tests/manual/qml/testfiles/webview.qml diff --git a/tests/manual/qml/testfiles/components/MyButton.qml b/tests/manual/qml/testfiles/components/MyButton.qml deleted file mode 100644 index a2da7221809..00000000000 --- a/tests/manual/qml/testfiles/components/MyButton.qml +++ /dev/null @@ -1,37 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -import QtQuick 1.1 - -Rectangle { - width: 64 - height: 48 - color: "Red" -} diff --git a/tests/manual/qml/testfiles/empty.qml b/tests/manual/qml/testfiles/empty.qml deleted file mode 100644 index a59296037f0..00000000000 --- a/tests/manual/qml/testfiles/empty.qml +++ /dev/null @@ -1,36 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -import QtQuick 1.1 - -Rectangle { - width: 640 - height: 480 -} diff --git a/tests/manual/qml/testfiles/flipable.qml b/tests/manual/qml/testfiles/flipable.qml deleted file mode 100644 index 2fc46c4567a..00000000000 --- a/tests/manual/qml/testfiles/flipable.qml +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -import QtQuick 1.1 - -Flipable { - width: 640 - height: 480 - front: Text { - text: "front" - } - back: Text { - text: "back" - } - -} diff --git a/tests/manual/qml/testfiles/helloworld.qml b/tests/manual/qml/testfiles/helloworld.qml deleted file mode 100644 index c0ab2b8bed6..00000000000 --- a/tests/manual/qml/testfiles/helloworld.qml +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -import QtQuick 1.1 - -Rectangle { - width: 200 - height: 200 - Text { - x: 66 - y: 93 - text: "Hello World" - } -} diff --git a/tests/manual/qml/testfiles/helloworld_inverted.qml b/tests/manual/qml/testfiles/helloworld_inverted.qml deleted file mode 100644 index 6bdd3e5b33e..00000000000 --- a/tests/manual/qml/testfiles/helloworld_inverted.qml +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -import QtQuick 1.1 - -Rectangle { - width: 200 - height: 200 - color: "black" - Text { - x: 66 - y: 93 - text: "Hello World" - color: "white" - } -} diff --git a/tests/manual/qml/testfiles/images.qml b/tests/manual/qml/testfiles/images.qml deleted file mode 100644 index b115ee6540f..00000000000 --- a/tests/manual/qml/testfiles/images.qml +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -import QtQuick 1.1 - -Rectangle { - width: 640 - height: 480 - - Image { - id: image1 - x: 20 - y: 18 - source: "images/qtcreator.png" - } - - Image { - id: image2 - x: 327 - y: 18 - source: "images/qtcreator.jpg" - } - - Image { - id: image3 - x: 20 - y: 288 - source: "images/qtcreator.ico" - } -} diff --git a/tests/manual/qml/testfiles/images/qtcreator.ico b/tests/manual/qml/testfiles/images/qtcreator.ico deleted file mode 100644 index 06209ee81e5bd923504ab62b2a356a922f309754..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20929 zcmZQzU}Rur00Bk@1%|g)3=Clm3=9SaAaMnTwVVtL&ejYJ3JMVZPgVwo4=xN05)u%; zBMSq=OD_fn0RaeqIuiqfmOleSXMmqOFP9V-0|NuEr-w@rNEU=S*cccXVv1IzF)%1F zc)B=-RLpt1x3WSeeCGTAmUq`)+vmMaH9GF8>%Av;3uR`qsH^Zu&M@F%K2y-n9m6KU zCNU#%z6fiK-s!oOb>i;~if2l;S+8MaV%gE6S~SOkv#e+CjlS}mn^JGyx<0Myz14pE zsHIz;OuI5^Rn_I6HvMu_SFb*2dG*@wwcqzVpYxqVQ#G2!1pzt< zF)Q;9lw`Q`J!6`BV8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cu#$9+4rbxu1?QZeyWo_+Sw_um&w zWe*$7m_7S-m)l}D!{$nX!wS6IJKhMy9DBS|==S=jpP&S2@0|q=|;^M)bE=l>-)z$Y;{Rm1cU>E8<(%-dc3zwqGVFR_x zFTZS8R#u+xy7=Ov{1^Xc@*R4y$|!X;fdWK;fq_8)T!6@b{-4Oez!V26KrDJ&C&hY9 z4wN`v|GYN-xy&^e;nH179Zg1`7hO=e(y=Sfh>bJ0LbNtOywTCIBk+Q&dAEY*LXlk? zUzlZOIPMl)(qG#U(V{I9du!Xbyz2XB=j!F`y1M57-G?^+?-$SeU&(Ud!R>i|GsDj* z2dK1&YC3ToTG)E){Ns5aL;oo<7W_TCv7F;(+_QTOX)GjBaI4l9Uv~}05(~dii62G% z4_$vz^i5IV&FyQw0;kgc@iu6g$Xwmsx$IelN8O>Y#N~S*vRJ>#-SIu`scE_L#1q|WapU-yWkf7m*KNX*M zI?g`3&3>v^q6FK@kglIUe+FvgBu%`ubN-!~pA-TFB42M_c5K?_Advj7b;%neJk%x& z_8&J6#);b|&F+PJZ*F0KF%lE5pLVHbkv`vFqHUM~~h*IrAp0$UYSJ zZuOpf_pZk1sV8ro5fCaGd%g4c<9|MC#xW}dpY|O6^t0xDXz1P4S!pJ7{p<^N#;8Vr R_S2%%K1P diff --git a/tests/manual/qml/testfiles/images/qtcreator.jpg b/tests/manual/qml/testfiles/images/qtcreator.jpg deleted file mode 100644 index 700af01ff13f568a6f5f7aa49917e402a712f5ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9489 zcmex=8$Vf|{&?q5{YeMpia94t5TH4i0_= zQ6W(UlEME&41yet42%rSjDieIf{e_9jQ@`?NHZ`pFflVSG9Um88xt!#Ge}a35iE(2 zVqjolWnyMy{C|sqhnbOqNq|{^fr0VO0y(RXmkwTj+Geyp-Mp^YJbhYR15A_i#a8k8 zjgQwKV7{_;r|YZxs_X~-fj(4_>UQmNEQ1?{nw_zL{5VHb9-h`siQT zrL>EIO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3h}c*5VuKlzV(Z8QwHe`3vtkP9|@?ym}yc;$R%#j@h+#PnHBR}SfCU#R$&srTpa H`u{fpK)}83 diff --git a/tests/manual/qml/testfiles/images/qtcreator.png b/tests/manual/qml/testfiles/images/qtcreator.png deleted file mode 100644 index b1d96b9c433fdc3609820a408eaf2a2dd01a84a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12498 zcmeAS@N?(olHy`uVBq!ia0y~yU}OMc4mJh`hM1xiX$%YoGd*1#Ln>~)oy$H))OFjj za1rIS)ax7UzQ0}6UHJ9k;iEc^u~S0>#SC;8X?O{+1aeNgJfZlUWxC38MmDxKgC{)B zGKUNlW?KI}cm2KC?Jc#%q06hY>hI?Z&Y1bmyY~MotI}6j-kbRTmhC?3<@d4uK$0Ot zgpL^Vfz+%WFRs4!_&$m2gS}Yy(`1GTC*_rJ{3ZNS>z#=Xo5P!D`o5>Wb^JX1(j-$g)8J+MgX+JnC8p(S zV$26_{kd9`@W;c-JIYzgZ^ETJ(mC~wKM!+S^3HDl$#;WyrNb}jmu&B*=$vO(xG}T%<_kma%}d`d zIk_ZkiNA-dhk0RoY9$lHi#1Dh%r=KSWi?jV*nMf*7s;2AmvrxRM&>a)2%D{0d&_;6 z>no2{K2`Hd*vs>#y=7R?_r0NeQq82;6PxC^zw-Ju>xc}Y zO%kG#*^P`7R{Z>b?%Ag;7P_+-CkQa8ZSJhm^y^Mza1s4!e>%-mOHsE06QvTb}uyEb9C=Ic>7l#Cy$10TaI;mZ)B8Y;9<~T zee}}yt)0<9TS{+!-f~y{TITU{@2=~yoXfnp#k*2`>zc{ZTT_1@%Uo=3dhwRN{`s~P z1_OpW>(o}R&sH`!yJRL8xg?e+=0eK0$1A2-D?U_5HqvZbbZx)y*Xuu%BU?>0euqlhw^EaTV2~_TvuvlNYa_+tYr}$MCe{cHUyA@~s<8@i?>y0M4PY z^;fdY>%Yab=b&JVnRvBbB+lOS3`<+ezl7J%EfT$@LEfxpIALMp{5kpe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*PN{KA&GVW}L$SJxl`w^Wy#i800kEg#ZntV_OWQ1ry(@9Ttu7@I7EpQ4L* z9enfr_0`qe=L(fP3t1nxH@lTf^i<&9+9i+0Jhn}VVPiP0%b<~Bwo0HWe}@Ef+BTyS zj=9TAe}9v&|5GR?xtIO!lIYb@TeI>**Fs;0P#pGqbirmTAHUF9A^(#O8US|K2fq{X+ M)78&qol`;+0I)G=+5i9m diff --git a/tests/manual/qml/testfiles/listmodel.qml b/tests/manual/qml/testfiles/listmodel.qml deleted file mode 100644 index 270bd0a6b24..00000000000 --- a/tests/manual/qml/testfiles/listmodel.qml +++ /dev/null @@ -1,40 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -import QtQuick 1.1 - -ListModel { - id: myModel - ListElement { - content: "foo" - text: "bar" - } - -} diff --git a/tests/manual/qml/testfiles/listview.qml b/tests/manual/qml/testfiles/listview.qml deleted file mode 100644 index 44f6cd170fd..00000000000 --- a/tests/manual/qml/testfiles/listview.qml +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -import QtQuick 1.1 - -Item { - width: 200 - height: 100 - - ListView { - anchors.fill: parent; - model: ListModel { - ListElement { - name: "BMW" - speed: 200 - } - ListElement { - name: "Mercedes" - speed: 180 - } - ListElement { - name: "Audi" - speed: 190 - } - ListElement { - name: "VW" - speed: 180 - } - } - - - delegate: Item { - height: 40 - Row { - spacing: 10 - Text { - text: name; - font.bold: true - } - - Text { text: "speed: " + speed } - } - - - } - } -} diff --git a/tests/manual/qml/testfiles/states.qml b/tests/manual/qml/testfiles/states.qml deleted file mode 100644 index 1d614cea349..00000000000 --- a/tests/manual/qml/testfiles/states.qml +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -import QtQuick 1.1 - -Rectangle { - id: rect - width: 200 - height: 200 - Text { - id: text - x: 66 - y: 93 - text: "Base State" - } - states: [ - State { - name: "State1" - PropertyChanges { - target: rect - color: "blue" - } - PropertyChanges { - target: text - text: "State1" - } - }, - State { - name: "State2" - PropertyChanges { - target: rect - color: "gray" - } - PropertyChanges { - target: text - text: "State2" - } - } - ] - - Image { - id: image1 - x: 41 - y: 46 - source: "images/qtcreator.png" - } -} diff --git a/tests/manual/qml/testfiles/subcomponent.qml b/tests/manual/qml/testfiles/subcomponent.qml deleted file mode 100644 index 48d4dd9c121..00000000000 --- a/tests/manual/qml/testfiles/subcomponent.qml +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -import QtQuick 1.1 - -Rectangle { - width: 640 - height: 480 - Component { - id: redSquare - Rectangle { - color: "red" - width: 100 - height: 100 - } - } - - Loader { sourceComponent: redSquare;} - Loader { sourceComponent: redSquare; x: 20 } -} diff --git a/tests/manual/qml/testfiles/testfiles.qmlproject b/tests/manual/qml/testfiles/testfiles.qmlproject deleted file mode 100644 index 86a56698e27..00000000000 --- a/tests/manual/qml/testfiles/testfiles.qmlproject +++ /dev/null @@ -1,16 +0,0 @@ -// File generated by QtCreator - -import QmlProject 1.0 - -Project { - // Scan current directory for .qml, .js, and image files - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } -} diff --git a/tests/manual/qml/testfiles/usingbutton.qml b/tests/manual/qml/testfiles/usingbutton.qml deleted file mode 100644 index 4d7fc384669..00000000000 --- a/tests/manual/qml/testfiles/usingbutton.qml +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -import QtQuick 1.1 -import "components" as X - -Rectangle { - width: 640 - height: 480 - - X.MyButton { - } - -} diff --git a/tests/manual/qml/testfiles/webview.qml b/tests/manual/qml/testfiles/webview.qml deleted file mode 100644 index 567b48f5687..00000000000 --- a/tests/manual/qml/testfiles/webview.qml +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -import QtQuick 1.1 -import QtWebKit 1.0 - -// Test loading of import libraries -WebView { - width: 640 - height: 480 - - html:"\ - \ - Hello World\ - " -} From 0e7e521a0aa4054946725f27dba13c1eab50c63e Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 8 Jul 2015 12:21:51 +0200 Subject: [PATCH 12/45] Debugger: Merge {baseqml,qml}debuggerclient. Abstraction is not used after the demise of QScriptDebuggerClient and unlikely to be used again. Change-Id: Icdd6615eb0d1468fd9a3d717d6a7d5e44f7f7d79 Reviewed-by: Christian Stenger --- src/plugins/debugger/debugger.qbs | 1 - .../debugger/qml/baseqmldebuggerclient.cpp | 83 ------------- .../debugger/qml/baseqmldebuggerclient.h | 111 ------------------ src/plugins/debugger/qml/qml.pri | 2 - src/plugins/debugger/qml/qmladapter.cpp | 6 +- src/plugins/debugger/qml/qmladapter.h | 10 +- src/plugins/debugger/qml/qmlengine.cpp | 12 +- .../debugger/qml/qmlv8debuggerclient.cpp | 25 +++- .../debugger/qml/qmlv8debuggerclient.h | 17 ++- 9 files changed, 53 insertions(+), 214 deletions(-) delete mode 100644 src/plugins/debugger/qml/baseqmldebuggerclient.cpp delete mode 100644 src/plugins/debugger/qml/baseqmldebuggerclient.h diff --git a/src/plugins/debugger/debugger.qbs b/src/plugins/debugger/debugger.qbs index 0419ddf5c2c..cfb777f97c0 100644 --- a/src/plugins/debugger/debugger.qbs +++ b/src/plugins/debugger/debugger.qbs @@ -145,7 +145,6 @@ QtcPlugin { name: "QML Debugger" prefix: "qml/" files: [ - "baseqmldebuggerclient.cpp", "baseqmldebuggerclient.h", "interactiveinterpreter.cpp", "interactiveinterpreter.h", "qmladapter.cpp", "qmladapter.h", "qmlcppengine.cpp", "qmlcppengine.h", diff --git a/src/plugins/debugger/qml/baseqmldebuggerclient.cpp b/src/plugins/debugger/qml/baseqmldebuggerclient.cpp deleted file mode 100644 index 5a7f9287a1e..00000000000 --- a/src/plugins/debugger/qml/baseqmldebuggerclient.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -#include "baseqmldebuggerclient.h" -#include - -#include - -namespace Debugger { -namespace Internal { - -class BaseQmlDebuggerClientPrivate -{ -public: - QList sendBuffer; -}; - -BaseQmlDebuggerClient::BaseQmlDebuggerClient(QmlDebug::QmlDebugConnection* client, QLatin1String clientName) - : QmlDebugClient(clientName, client), - d(new BaseQmlDebuggerClientPrivate()) -{ -} - -BaseQmlDebuggerClient::~BaseQmlDebuggerClient() -{ - delete d; -} - -bool BaseQmlDebuggerClient::acceptsBreakpoint(Breakpoint /*bp*/) -{ - return false; -} - -void BaseQmlDebuggerClient::stateChanged(State state) -{ - emit newState(state); -} - -void BaseQmlDebuggerClient::sendMessage(const QByteArray &msg) -{ - if (state() == Enabled) - QmlDebugClient::sendMessage(msg); - else - d->sendBuffer.append(msg); -} - -void BaseQmlDebuggerClient::flushSendBuffer() -{ - QTC_ASSERT(state() == Enabled, return); - foreach (const QByteArray &msg, d->sendBuffer) - QmlDebugClient::sendMessage(msg); - d->sendBuffer.clear(); -} - -} // Internal -} // Debugger diff --git a/src/plugins/debugger/qml/baseqmldebuggerclient.h b/src/plugins/debugger/qml/baseqmldebuggerclient.h deleted file mode 100644 index 47435fbf996..00000000000 --- a/src/plugins/debugger/qml/baseqmldebuggerclient.h +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -#ifndef BASEQMLDEBUGGERCLIENT_H -#define BASEQMLDEBUGGERCLIENT_H - -#include -#include - -namespace Debugger { -namespace Internal { - -class WatchData; -class WatchItem; -class BreakHandler; -class BreakpointModelId; -class QmlEngine; -class BaseQmlDebuggerClientPrivate; - -class BaseQmlDebuggerClient : public QmlDebug::QmlDebugClient -{ - Q_OBJECT - -public: - BaseQmlDebuggerClient(QmlDebug::QmlDebugConnection* client, QLatin1String clientName); - virtual ~BaseQmlDebuggerClient(); - - virtual void startSession() = 0; - virtual void endSession() = 0; - virtual void resetSession() = 0; - - virtual void executeStep() = 0; - virtual void executeStepOut() = 0; - virtual void executeNext() = 0; - virtual void executeStepI() = 0; - - virtual void executeRunToLine(const ContextData &data) = 0; - - virtual void continueInferior() = 0; - virtual void interruptInferior() = 0; - - virtual void activateFrame(int index) = 0; - - virtual bool acceptsBreakpoint(Breakpoint bp); - virtual void insertBreakpoint(Breakpoint bp, int adjustedLine, - int adjustedColumn = -1) = 0; - virtual void removeBreakpoint(Breakpoint bp) = 0; - virtual void changeBreakpoint(Breakpoint bp) = 0; - virtual void synchronizeBreakpoints() = 0; - - virtual void assignValueInDebugger(const WatchData *data, - const QString &expression, - const QVariant &valueV) = 0; - - virtual void updateWatchData(const WatchData &data) = 0; - virtual void executeDebuggerCommand(const QString &command) = 0; - - virtual void synchronizeWatchers(const QStringList &watchers) = 0; - - virtual void expandObject(const QByteArray &iname, quint64 objectId) = 0; - - virtual void setEngine(QmlEngine *engine) = 0; - - virtual void getSourceFiles() {} - - void flushSendBuffer(); - -signals: - void newState(QmlDebug::QmlDebugClient::State state); - void stackFrameCompleted(); - -protected: - virtual void stateChanged(State state); - void sendMessage(const QByteArray &msg); - -private: - BaseQmlDebuggerClientPrivate *d; - friend class BaseQmlDebuggerClientPrivate; -}; - -} // Internal -} // Debugger - -#endif // BASEQMLDEBUGGERCLIENT_H diff --git a/src/plugins/debugger/qml/qml.pri b/src/plugins/debugger/qml/qml.pri index 4d1676fbd3c..12d34e0dc8d 100644 --- a/src/plugins/debugger/qml/qml.pri +++ b/src/plugins/debugger/qml/qml.pri @@ -1,7 +1,6 @@ HEADERS += \ $$PWD/qmlengine.h \ $$PWD/qmladapter.h \ - $$PWD/baseqmldebuggerclient.h \ $$PWD/qmlcppengine.h \ $$PWD/qmlv8debuggerclient.h \ $$PWD/interactiveinterpreter.h \ @@ -12,7 +11,6 @@ HEADERS += \ SOURCES += \ $$PWD/qmlengine.cpp \ $$PWD/qmladapter.cpp \ - $$PWD/baseqmldebuggerclient.cpp \ $$PWD/qmlcppengine.cpp \ $$PWD/qmlv8debuggerclient.cpp \ $$PWD/interactiveinterpreter.cpp \ diff --git a/src/plugins/debugger/qml/qmladapter.cpp b/src/plugins/debugger/qml/qmladapter.cpp index be843c9b983..c2698bdf17b 100644 --- a/src/plugins/debugger/qml/qmladapter.cpp +++ b/src/plugins/debugger/qml/qmladapter.cpp @@ -133,7 +133,7 @@ void QmlAdapter::debugClientStateChanged(QmlDebugClient::State state) QmlDebugClient *client = qobject_cast(sender()); QTC_ASSERT(client, return); - m_qmlClient = qobject_cast(client); + m_qmlClient = qobject_cast(client); m_qmlClient->startSession(); } @@ -185,12 +185,12 @@ void QmlAdapter::showConnectionErrorMessage(const QString &message) m_engine.data()->showMessage(_("QML Debugger: ") + message, LogError); } -BaseQmlDebuggerClient *QmlAdapter::activeDebuggerClient() const +QmlV8DebuggerClient *QmlAdapter::activeDebuggerClient() const { return m_qmlClient; } -QHash QmlAdapter::debuggerClients() const +QHash QmlAdapter::debuggerClients() const { return m_debugClients; } diff --git a/src/plugins/debugger/qml/qmladapter.h b/src/plugins/debugger/qml/qmladapter.h index e9f39368785..7e966e4068f 100644 --- a/src/plugins/debugger/qml/qmladapter.h +++ b/src/plugins/debugger/qml/qmladapter.h @@ -45,7 +45,7 @@ class QDebugMessageClient; namespace Debugger { namespace Internal { -class BaseQmlDebuggerClient; +class QmlV8DebuggerClient; class DebuggerEngine; class QmlAdapterPrivate; @@ -63,8 +63,8 @@ public: QmlDebug::QmlDebugConnection *connection() const; DebuggerEngine *debuggerEngine() const; - BaseQmlDebuggerClient *activeDebuggerClient() const; - QHash debuggerClients() const; + QmlV8DebuggerClient *activeDebuggerClient() const; + QHash debuggerClients() const; QmlDebug::QDebugMessageClient *messageClient() const; @@ -94,10 +94,10 @@ private: private: QPointer m_engine; - BaseQmlDebuggerClient *m_qmlClient; + QmlV8DebuggerClient *m_qmlClient; QTimer m_connectionTimer; QmlDebug::QmlDebugConnection *m_conn; - QHash m_debugClients; + QHash m_debugClients; QmlDebug::QDebugMessageClient *m_msgClient; }; diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index c2b2ca32467..ea1aabbb622 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -29,8 +29,8 @@ ****************************************************************************/ #include "qmlengine.h" -#include "baseqmldebuggerclient.h" #include "qmlinspectoragent.h" +#include "qmlv8debuggerclient.h" #include #include @@ -821,7 +821,7 @@ void QmlEngine::insertBreakpoint(Breakpoint bp) if (m_adapter.activeDebuggerClient()) { m_adapter.activeDebuggerClient()->insertBreakpoint(bp, line, column); } else { - foreach (BaseQmlDebuggerClient *client, m_adapter.debuggerClients()) { + foreach (QmlV8DebuggerClient *client, m_adapter.debuggerClients()) { client->insertBreakpoint(bp, line, column); } } @@ -849,7 +849,7 @@ void QmlEngine::removeBreakpoint(Breakpoint bp) if (m_adapter.activeDebuggerClient()) { m_adapter.activeDebuggerClient()->removeBreakpoint(bp); } else { - foreach (BaseQmlDebuggerClient *client, m_adapter.debuggerClients()) { + foreach (QmlV8DebuggerClient *client, m_adapter.debuggerClients()) { client->removeBreakpoint(bp); } } @@ -867,7 +867,7 @@ void QmlEngine::changeBreakpoint(Breakpoint bp) if (m_adapter.activeDebuggerClient()) { m_adapter.activeDebuggerClient()->changeBreakpoint(bp); } else { - foreach (BaseQmlDebuggerClient *client, m_adapter.debuggerClients()) { + foreach (QmlV8DebuggerClient *client, m_adapter.debuggerClients()) { client->changeBreakpoint(bp); } } @@ -922,7 +922,7 @@ void QmlEngine::attemptBreakpointSynchronization() if (m_adapter.activeDebuggerClient()) { m_adapter.activeDebuggerClient()->synchronizeBreakpoints(); } else { - foreach (BaseQmlDebuggerClient *client, m_adapter.debuggerClients()) { + foreach (QmlV8DebuggerClient *client, m_adapter.debuggerClients()) { client->synchronizeBreakpoints(); } } @@ -1035,7 +1035,7 @@ void QmlEngine::synchronizeWatchers() if (m_adapter.activeDebuggerClient()) { m_adapter.activeDebuggerClient()->synchronizeWatchers(watchedExpressions); } else { - foreach (BaseQmlDebuggerClient *client, m_adapter.debuggerClients()) + foreach (QmlV8DebuggerClient *client, m_adapter.debuggerClients()) client->synchronizeWatchers(watchedExpressions); } } diff --git a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp index c821da13a0a..33577f52570 100644 --- a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp +++ b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp @@ -138,6 +138,8 @@ public: QHash stackIndexLookup; QmlV8DebuggerClient::StepAction previousStepAction; + + QList sendBuffer; }; /////////////////////////////////////////////////////////////////////// @@ -745,7 +747,7 @@ void QmlV8DebuggerClientPrivate::logReceiveMessage(const QString &msg) const /////////////////////////////////////////////////////////////////////// QmlV8DebuggerClient::QmlV8DebuggerClient(QmlDebug::QmlDebugConnection *client) - : BaseQmlDebuggerClient(client, QLatin1String("V8Debugger")), + : QmlDebugClient(QLatin1String("V8Debugger"), client), d(new QmlV8DebuggerClientPrivate(this)) { } @@ -1795,5 +1797,26 @@ void QmlV8DebuggerClient::clearExceptionSelection() } +void QmlV8DebuggerClient::stateChanged(State state) +{ + emit newState(state); +} + +void QmlV8DebuggerClient::sendMessage(const QByteArray &msg) +{ + if (state() == Enabled) + QmlDebugClient::sendMessage(msg); + else + d->sendBuffer.append(msg); +} + +void QmlV8DebuggerClient::flushSendBuffer() +{ + QTC_ASSERT(state() == Enabled, return); + foreach (const QByteArray &msg, d->sendBuffer) + QmlDebugClient::sendMessage(msg); + d->sendBuffer.clear(); +} + } // Internal } // Debugger diff --git a/src/plugins/debugger/qml/qmlv8debuggerclient.h b/src/plugins/debugger/qml/qmlv8debuggerclient.h index ae78443e77a..5adb989efeb 100644 --- a/src/plugins/debugger/qml/qmlv8debuggerclient.h +++ b/src/plugins/debugger/qml/qmlv8debuggerclient.h @@ -31,14 +31,18 @@ #ifndef QMLV8DEBUGGERCLIENT_H #define QMLV8DEBUGGERCLIENT_H -#include "baseqmldebuggerclient.h" +#include +#include namespace Debugger { namespace Internal { +class WatchData; +class WatchItem; +class QmlEngine; class QmlV8DebuggerClientPrivate; -class QmlV8DebuggerClient : public BaseQmlDebuggerClient +class QmlV8DebuggerClient : public QmlDebug::QmlDebugClient { Q_OBJECT @@ -99,6 +103,15 @@ public: void getSourceFiles(); + void flushSendBuffer(); + + void stateChanged(State state); + void sendMessage(const QByteArray &msg); + +signals: + void newState(QmlDebug::QmlDebugClient::State state); + void stackFrameCompleted(); + protected: void messageReceived(const QByteArray &data); From bc7ef69363ecccb50b42e6285c332bb21d85a024 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Thu, 9 Jul 2015 01:32:29 +0200 Subject: [PATCH 13/45] AutoTools: Handle "-I /some/path" as well as "-I/some/path" Do the same for -D and -U. Change-Id: I66ea3c03a58e59602e70f6eb39c471cdf063b456 Reviewed-by: Daniel Teske --- .../autotoolsprojectmanager/makefileparser.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/plugins/autotoolsprojectmanager/makefileparser.cpp b/src/plugins/autotoolsprojectmanager/makefileparser.cpp index 3c1e94d1335..53a79134a6d 100644 --- a/src/plugins/autotoolsprojectmanager/makefileparser.cpp +++ b/src/plugins/autotoolsprojectmanager/makefileparser.cpp @@ -445,7 +445,20 @@ QStringList MakefileParser::parseTermsAfterAssign(const QString &line) int assignPos = line.indexOf(QLatin1Char('=')) + 1; if (assignPos >= line.size()) return QStringList(); - return line.mid(assignPos).split(QLatin1Char(' '), QString::SkipEmptyParts); + + const QStringList parts = line.mid(assignPos).split(QLatin1Char(' '), QString::SkipEmptyParts); + QStringList result; + for (int i = 0; i < parts.count(); ++i) { + const QString cur = parts.at(i); + const QString next = (i == parts.count() - 1) ? QString() : parts.at(i + 1); + if (cur == QLatin1String("-D") || cur == QLatin1String("-U") || cur == QLatin1String("-I")) { + result << cur + next; + ++i; + } else { + result << cur; + } + } + return result; } bool MakefileParser::maybeParseDefine(const QString &term) From ed1416d18062ac96f960bd45efe760733603ff43 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 7 Jul 2015 10:15:59 +0200 Subject: [PATCH 14/45] QmlDesigner: Parse .metainfo file if plugin path contains version If the qml plugin path did contain the major version the .metainfo file for the iteml ibrary was not parsed. Change-Id: I50219b9b2673813b90e2f53d12aeea3dec9a32cd Reviewed-by: J-P Nurmi --- .../designercore/metainfo/subcomponentmanager.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp b/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp index d6d95409b72..34f07c22ff4 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp @@ -209,6 +209,15 @@ void SubComponentManager::parseDirectories() foreach (const QString &path, importPaths()) { QString fullUrl = path + QLatin1Char('/') + url; dirInfo = QFileInfo(fullUrl); + + if (dirInfo.exists() && dirInfo.isDir()) { + //### todo full qualified names QString nameSpace = import.uri(); + parseDirectory(dirInfo.canonicalFilePath(), false); + } + + QString fullUrlVersion = path + QLatin1Char('/') + url + QLatin1Char('.') + import.version().split(".").first(); + dirInfo = QFileInfo(fullUrlVersion); + if (dirInfo.exists() && dirInfo.isDir()) { //### todo full qualified names QString nameSpace = import.uri(); parseDirectory(dirInfo.canonicalFilePath(), false); From 7ec0a8d8899863883c05e2c72622e2c652de9e5d Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 7 Jul 2015 14:00:45 +0200 Subject: [PATCH 15/45] QmlDesigner: take version into account when looking up specifics Change-Id: I074a2930b5d0cfee6444ee4df6f0d2e06a8ecc54 Reviewed-by: J-P Nurmi --- .../propertyeditor/propertyeditorqmlbackend.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp index 62a10188816..4b466aa2230 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp @@ -473,6 +473,7 @@ QString PropertyEditorQmlBackend::locateQmlFile(const NodeMetaInfo &info, const static QDir resourcesDir(QStringLiteral(":/propertyEditorQmlSources")); QDir importDir(info.importDirectoryPath() + QLatin1String(Constants::QML_DESIGNER_SUBFOLDER)); + QDir importDirVersion(info.importDirectoryPath() + QStringLiteral(".") + QString::number(info.majorVersion()) + QLatin1String(Constants::QML_DESIGNER_SUBFOLDER)); const QString versionString = QStringLiteral("_") + QString::number(info.majorVersion()) + QStringLiteral("_") @@ -484,6 +485,14 @@ QString PropertyEditorQmlBackend::locateQmlFile(const NodeMetaInfo &info, const //Check for qml files with versions first const QString withoutDirWithVersion = relativePathWithVersion.split(QStringLiteral("/")).last(); + + const QString withoutDir = relativePath.split(QStringLiteral("/")).last(); + + if (importDirVersion.exists(withoutDir)) + return importDirVersion.absoluteFilePath(withoutDir); + + + if (importDir.exists(relativePathWithVersion)) return importDir.absoluteFilePath(relativePathWithVersion); if (importDir.exists(withoutDirWithVersion)) //Since we are in a subfolder of the import we do not require the directory @@ -493,7 +502,7 @@ QString PropertyEditorQmlBackend::locateQmlFile(const NodeMetaInfo &info, const if (resourcesDir.exists(relativePathWithVersion)) return resourcesDir.absoluteFilePath(relativePathWithVersion); - const QString withoutDir = relativePath.split(QStringLiteral("/")).last(); + if (importDir.exists(relativePath)) return importDir.absoluteFilePath(relativePath); if (importDir.exists(withoutDir)) //Since we are in a subfolder of the import we do not require the directory From 3c84660ac417ddbcc4bfd9e7df5f44859990d85c Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Thu, 9 Jul 2015 13:27:27 +0200 Subject: [PATCH 16/45] AutoTools: Improve parsing of CPPFLAGS Change-Id: I55019b37a883fca7241aa27bf27e45b03c4262c2 Reviewed-by: Daniel Teske Reviewed-by: hjk --- .../makefileparser.cpp | 20 +++++++++++++++---- .../autotoolsprojectmanager/makefileparser.h | 8 +++++++- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/plugins/autotoolsprojectmanager/makefileparser.cpp b/src/plugins/autotoolsprojectmanager/makefileparser.cpp index 53a79134a6d..b3284243ebc 100644 --- a/src/plugins/autotoolsprojectmanager/makefileparser.cpp +++ b/src/plugins/autotoolsprojectmanager/makefileparser.cpp @@ -131,12 +131,12 @@ QByteArray MakefileParser::defines() const QStringList MakefileParser::cflags() const { - return m_cflags; + return m_cppflags + m_cflags; } QStringList MakefileParser::cxxflags() const { - return m_cxxflags; + return m_cppflags + m_cxxflags; } void MakefileParser::cancel() @@ -506,6 +506,15 @@ bool MakefileParser::maybeParseCXXFlag(const QString &term) return false; } +bool MakefileParser::maybeParseCPPFlag(const QString &term) +{ + if (term.startsWith(QLatin1Char('-'))) { + m_cppflags += term; + return true; + } + return false; +} + void MakefileParser::addAllSources() { QStringList extensions; @@ -550,11 +559,14 @@ void MakefileParser::parseIncludePaths() foreach (const QString &term, parseTermsAfterAssign(line)) maybeParseDefine(term) || maybeParseInclude(term, dirName) || maybeParseCFlag(term); - } else if (varName.endsWith(QLatin1String("CPPFLAGS")) - || varName.endsWith(QLatin1String("CXXFLAGS"))) { + } else if (varName.endsWith(QLatin1String("CXXFLAGS"))) { foreach (const QString &term, parseTermsAfterAssign(line)) maybeParseDefine(term) || maybeParseInclude(term, dirName) || maybeParseCXXFlag(term); + } else if (varName.endsWith(QLatin1String("CPPFLAGS"))) { + foreach (const QString &term, parseTermsAfterAssign(line)) + maybeParseDefine(term) || maybeParseInclude(term, dirName) + || maybeParseCPPFlag(term); } } while (!line.isNull()); diff --git a/src/plugins/autotoolsprojectmanager/makefileparser.h b/src/plugins/autotoolsprojectmanager/makefileparser.h index 463c56e65a8..32569d6a116 100644 --- a/src/plugins/autotoolsprojectmanager/makefileparser.h +++ b/src/plugins/autotoolsprojectmanager/makefileparser.h @@ -258,6 +258,11 @@ private: */ bool maybeParseCXXFlag(const QString &term); + /** + * If term is compiler flag -, adds it to cppflags and returns true. + */ + bool maybeParseCPPFlag(const QString &term); + private: bool m_success; ///< Return value for MakefileParser::parse(). @@ -271,7 +276,8 @@ private: QStringList m_includePaths; ///< Return value for MakefileParser::includePaths() QByteArray m_defines; ///< Return value for MakefileParser::defines() QStringList m_cflags; ///< Return value for MakefileParser::cflags() - QStringList m_cxxflags; ///< Return value for MakefileParser::cxxflags() + QStringList m_cxxflags; ///< Return value for MakefileParser::cxxflags() + QStringList m_cppflags; ///< The cpp flags, which will be part of both cflags and cxxflags QString m_line; ///< Current line of the makefile QTextStream m_textStream; ///< Textstream that represents the makefile From 0e0f1babdb1db8b17131dee0a1ba280074a675a5 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Thu, 9 Jul 2015 13:30:40 +0200 Subject: [PATCH 17/45] AutoTools: Disconnect Qt5-style Fix up a disconnect that was missed in 0df67801765927ad3dbe0715fa46b4cdc09c6ce2 to match with the connect. This potentially fixes a spurious signal being received. Change-Id: I3bdf65eca41948ac11a34da8f554645c782bcdfb Reviewed-by: hjk Reviewed-by: Daniel Teske --- src/plugins/autotoolsprojectmanager/autotoolsproject.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp index 64053b4a5bc..25d454ca763 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp @@ -164,8 +164,8 @@ void AutotoolsProject::loadProjectTree() // The thread is still busy parsing a previus configuration. // Wait until the thread has been finished and delete it. // TODO: Discuss whether blocking is acceptable. - disconnect(m_makefileParserThread, SIGNAL(finished()), - this, SLOT(makefileParsingFinished())); + disconnect(m_makefileParserThread, &QThread::finished, + this, &AutotoolsProject::makefileParsingFinished); m_makefileParserThread->wait(); delete m_makefileParserThread; m_makefileParserThread = 0; From bcd29daa48d4294fc02e434c63f0d5b9ac87f1d3 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 8 Jul 2015 13:14:03 +0200 Subject: [PATCH 18/45] Debugger: Consolidate QmlEngine Create a QmlEnginePrivate. Move the QmlDebugClient there. Merge QmlAdapter into QmlEngine Abstraction is not used anymore. Move some helper bits to a qmlengineutils.{h,cpp} Change-Id: I63117355d786cc12641101b7fd38c7cd208d11eb Reviewed-by: Christian Stenger --- src/plugins/debugger/debugger.qbs | 3 +- src/plugins/debugger/qml/qml.pri | 6 +- src/plugins/debugger/qml/qmladapter.cpp | 233 -- src/plugins/debugger/qml/qmladapter.h | 107 - src/plugins/debugger/qml/qmlengine.cpp | 2441 +++++++++++++---- src/plugins/debugger/qml/qmlengine.h | 92 +- src/plugins/debugger/qml/qmlengineutils.cpp | 270 ++ src/plugins/debugger/qml/qmlengineutils.h | 47 + .../debugger/qml/qmlinspectoradapter.cpp | 39 +- .../debugger/qml/qmlinspectoradapter.h | 10 +- .../debugger/qml/qmlv8debuggerclient.cpp | 1822 ------------ .../debugger/qml/qmlv8debuggerclient.h | 143 - 12 files changed, 2267 insertions(+), 2946 deletions(-) delete mode 100644 src/plugins/debugger/qml/qmladapter.cpp delete mode 100644 src/plugins/debugger/qml/qmladapter.h create mode 100644 src/plugins/debugger/qml/qmlengineutils.cpp create mode 100644 src/plugins/debugger/qml/qmlengineutils.h delete mode 100644 src/plugins/debugger/qml/qmlv8debuggerclient.cpp delete mode 100644 src/plugins/debugger/qml/qmlv8debuggerclient.h diff --git a/src/plugins/debugger/debugger.qbs b/src/plugins/debugger/debugger.qbs index cfb777f97c0..f682cdc4b57 100644 --- a/src/plugins/debugger/debugger.qbs +++ b/src/plugins/debugger/debugger.qbs @@ -146,12 +146,11 @@ QtcPlugin { prefix: "qml/" files: [ "interactiveinterpreter.cpp", "interactiveinterpreter.h", - "qmladapter.cpp", "qmladapter.h", "qmlcppengine.cpp", "qmlcppengine.h", "qmlengine.cpp", "qmlengine.h", + "qmlengineutils.cpp", "qmlengineutils.h", "qmlinspectoradapter.cpp", "qmlinspectoradapter.h", "qmlinspectoragent.cpp", "qmlinspectoragent.h", - "qmlv8debuggerclient.cpp", "qmlv8debuggerclient.h", "qmlv8debuggerclientconstants.h" ] } diff --git a/src/plugins/debugger/qml/qml.pri b/src/plugins/debugger/qml/qml.pri index 12d34e0dc8d..18ed7fe1f55 100644 --- a/src/plugins/debugger/qml/qml.pri +++ b/src/plugins/debugger/qml/qml.pri @@ -1,8 +1,7 @@ HEADERS += \ $$PWD/qmlengine.h \ - $$PWD/qmladapter.h \ + $$PWD/qmlengineutils.h \ $$PWD/qmlcppengine.h \ - $$PWD/qmlv8debuggerclient.h \ $$PWD/interactiveinterpreter.h \ $$PWD/qmlv8debuggerclientconstants.h \ $$PWD/qmlinspectoragent.h \ @@ -10,9 +9,8 @@ HEADERS += \ SOURCES += \ $$PWD/qmlengine.cpp \ - $$PWD/qmladapter.cpp \ + $$PWD/qmlengineutils.cpp \ $$PWD/qmlcppengine.cpp \ - $$PWD/qmlv8debuggerclient.cpp \ $$PWD/interactiveinterpreter.cpp \ $$PWD/qmlinspectoragent.cpp \ $$PWD/qmlinspectoradapter.cpp diff --git a/src/plugins/debugger/qml/qmladapter.cpp b/src/plugins/debugger/qml/qmladapter.cpp deleted file mode 100644 index c2698bdf17b..00000000000 --- a/src/plugins/debugger/qml/qmladapter.cpp +++ /dev/null @@ -1,233 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -#include "qmladapter.h" - -#include -#include "qmlengine.h" -#include "qmlv8debuggerclient.h" - -#include - -#include - -using namespace QmlDebug; - -namespace Debugger { -namespace Internal { - -/*! - QmlAdapter manages the connection & clients for QML/JS debugging. - */ - -QmlAdapter::QmlAdapter(DebuggerEngine *engine, QObject *parent) - : QObject(parent) - , m_engine(engine) - , m_qmlClient(0) - , m_conn(0) - , m_msgClient(0) -{ - m_connectionTimer.setInterval(4000); - m_connectionTimer.setSingleShot(true); - connect(&m_connectionTimer, &QTimer::timeout, this, &QmlAdapter::checkConnectionState); - - m_conn = new QmlDebugConnection(this); - connect(m_conn, &QmlDebugConnection::stateMessage, - this, &QmlAdapter::showConnectionStateMessage); - connect(m_conn, &QmlDebugConnection::errorMessage, - this, &QmlAdapter::showConnectionErrorMessage); - connect(m_conn, &QmlDebugConnection::error, - this, &QmlAdapter::connectionErrorOccurred); - connect(m_conn, &QmlDebugConnection::opened, - &m_connectionTimer, &QTimer::stop); - connect(m_conn, &QmlDebugConnection::opened, - this, &QmlAdapter::connected); - connect(m_conn, &QmlDebugConnection::closed, - this, &QmlAdapter::disconnected); - - createDebuggerClients(); - m_msgClient = new QDebugMessageClient(m_conn); - connect(m_msgClient, &QDebugMessageClient::newState, this, &QmlAdapter::clientStateChanged); - -} - -QmlAdapter::~QmlAdapter() -{ -} - -void QmlAdapter::beginConnectionTcp(const QString &address, quint16 port) -{ - if (m_engine.isNull() || !m_conn || m_conn->isOpen()) - return; - - m_conn->connectToHost(address, port); - - //A timeout to check the connection state - m_connectionTimer.start(); -} - -void QmlAdapter::closeConnection() -{ - if (m_connectionTimer.isActive()) { - m_connectionTimer.stop(); - } else { - if (m_conn) - m_conn->close(); - } -} - -void QmlAdapter::connectionErrorOccurred(QDebugSupport::Error error) -{ - // this is only an error if we are already connected and something goes wrong. - if (isConnected()) { - emit connectionError(error); - } else { - m_connectionTimer.stop(); - emit connectionStartupFailed(); - } -} - -void QmlAdapter::clientStateChanged(QmlDebugClient::State state) -{ - QString serviceName; - float version = 0; - if (QmlDebugClient *client = qobject_cast(sender())) { - serviceName = client->name(); - version = client->remoteVersion(); - } - - logServiceStateChange(serviceName, version, state); -} - -void QmlAdapter::debugClientStateChanged(QmlDebugClient::State state) -{ - if (state != QmlDebugClient::Enabled) - return; - QmlDebugClient *client = qobject_cast(sender()); - QTC_ASSERT(client, return); - - m_qmlClient = qobject_cast(client); - m_qmlClient->startSession(); -} - -void QmlAdapter::checkConnectionState() -{ - if (!isConnected()) { - closeConnection(); - emit connectionStartupFailed(); - } -} - -bool QmlAdapter::isConnected() const -{ - return m_conn && m_qmlClient && m_conn->isOpen(); -} - -void QmlAdapter::createDebuggerClients() -{ - QmlV8DebuggerClient *debugClient2 = new QmlV8DebuggerClient(m_conn); - connect(debugClient2, &QmlV8DebuggerClient::newState, - this, &QmlAdapter::clientStateChanged); - connect(debugClient2, &QmlV8DebuggerClient::newState, - this, &QmlAdapter::debugClientStateChanged); - - m_debugClients.insert(debugClient2->name(),debugClient2); - - debugClient2->setEngine((QmlEngine*)(m_engine.data())); -} - -QmlDebugConnection *QmlAdapter::connection() const -{ - return m_conn; -} - -DebuggerEngine *QmlAdapter::debuggerEngine() const -{ - return m_engine.data(); -} - -void QmlAdapter::showConnectionStateMessage(const QString &message) -{ - if (!m_engine.isNull()) - m_engine.data()->showMessage(_("QML Debugger: ") + message, LogStatus); -} - -void QmlAdapter::showConnectionErrorMessage(const QString &message) -{ - if (!m_engine.isNull()) - m_engine.data()->showMessage(_("QML Debugger: ") + message, LogError); -} - -QmlV8DebuggerClient *QmlAdapter::activeDebuggerClient() const -{ - return m_qmlClient; -} - -QHash QmlAdapter::debuggerClients() const -{ - return m_debugClients; -} - -QDebugMessageClient *QmlAdapter::messageClient() const -{ - return m_msgClient; -} - -void QmlAdapter::logServiceStateChange(const QString &service, float version, - QmlDebugClient::State newState) -{ - switch (newState) { - case QmlDebugClient::Unavailable: { - showConnectionStateMessage(_("Status of \"%1\" Version: %2 changed to 'unavailable'."). - arg(service).arg(QString::number(version))); - break; - } - case QmlDebugClient::Enabled: { - showConnectionStateMessage(_("Status of \"%1\" Version: %2 changed to 'enabled'."). - arg(service).arg(QString::number(version))); - break; - } - - case QmlDebugClient::NotConnected: { - showConnectionStateMessage(_("Status of \"%1\" Version: %2 changed to 'not connected'."). - arg(service).arg(QString::number(version))); - break; - } - } -} - -void QmlAdapter::logServiceActivity(const QString &service, const QString &logMessage) -{ - if (!m_engine.isNull()) - m_engine.data()->showMessage(service + QLatin1Char(' ') + logMessage, LogDebug); -} - -} // namespace Internal -} // namespace Debugger diff --git a/src/plugins/debugger/qml/qmladapter.h b/src/plugins/debugger/qml/qmladapter.h deleted file mode 100644 index 7e966e4068f..00000000000 --- a/src/plugins/debugger/qml/qmladapter.h +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms and -** conditions see http://www.qt.io/terms-conditions. For further information -** use the contact form at http://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 or version 3 as published by the Free -** Software Foundation and appearing in the file LICENSE.LGPLv21 and -** LICENSE.LGPLv3 included in the packaging of this file. Please review the -** following information to ensure the GNU Lesser General Public License -** requirements will be met: https://www.gnu.org/licenses/lgpl.html and -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, The Qt Company gives you certain additional -** rights. These rights are described in The Qt Company LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -#ifndef QMLADAPTER_H -#define QMLADAPTER_H - -#include - -#include -#include - -namespace QmlDebug { -class BaseEngineDebugClient; -class QmlDebugConnection; -class QDebugMessageClient; -} - -namespace Debugger { -namespace Internal { - -class QmlV8DebuggerClient; -class DebuggerEngine; -class QmlAdapterPrivate; - -class QmlAdapter : public QObject -{ - Q_OBJECT - -public: - explicit QmlAdapter(DebuggerEngine *engine, QObject *parent = 0); - virtual ~QmlAdapter(); - - void beginConnectionTcp(const QString &address, quint16 port); - void closeConnection(); - - QmlDebug::QmlDebugConnection *connection() const; - DebuggerEngine *debuggerEngine() const; - - QmlV8DebuggerClient *activeDebuggerClient() const; - QHash debuggerClients() const; - - QmlDebug::QDebugMessageClient *messageClient() const; - -public slots: - void logServiceStateChange(const QString &service, float version, - QmlDebug::QmlDebugClient::State newState); - void logServiceActivity(const QString &service, const QString &logMessage); - -signals: - void connected(); - void disconnected(); - void connectionStartupFailed(); - void connectionError(QDebugSupport::Error error); - void serviceConnectionError(const QString serviceName); - -private slots: - void connectionErrorOccurred(QDebugSupport::Error socketError); - void clientStateChanged(QmlDebug::QmlDebugClient::State state); - void debugClientStateChanged(QmlDebug::QmlDebugClient::State state); - void checkConnectionState(); - void showConnectionStateMessage(const QString &message); - void showConnectionErrorMessage(const QString &message); - -private: - bool isConnected() const; - void createDebuggerClients(); - -private: - QPointer m_engine; - QmlV8DebuggerClient *m_qmlClient; - QTimer m_connectionTimer; - QmlDebug::QmlDebugConnection *m_conn; - QHash m_debugClients; - QmlDebug::QDebugMessageClient *m_msgClient; -}; - -} // namespace Internal -} // namespace Debugger - -#endif // QMLADAPTER_H diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index ea1aabbb622..753ca5d65f9 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -29,46 +29,54 @@ ****************************************************************************/ #include "qmlengine.h" -#include "qmlinspectoragent.h" -#include "qmlv8debuggerclient.h" +#include "interactiveinterpreter.h" +#include "qmlinspectoradapter.h" +#include "qmlinspectoragent.h" +#include "qmlv8debuggerclientconstants.h" +#include "qmlengineutils.h" + +#include #include #include #include -#include #include -#include #include #include -#include +#include +#include #include +#include #include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include -#include #include #include #include +#include + +#include +#include +#include + +#include +#include + +#include + #include #include #include +#include +#include +#include +#include #include #include +#include +#include -#define DEBUG_QML 1 +#define DEBUG_QML 0 #if DEBUG_QML # define SDEBUG(s) qDebug() << s #else @@ -76,185 +84,141 @@ #endif # define XSDEBUG(s) qDebug() << s +using namespace Core; +using namespace ProjectExplorer; +using namespace QmlDebug; using namespace QmlJS; -using namespace AST; +using namespace TextEditor; namespace Debugger { namespace Internal { -static QTreeView *inspectorTreeView() +enum Exceptions { - return Internal::inspectorView(); -} - -class ASTWalker : public Visitor -{ -public: - void operator()(Node *ast, quint32 *l, quint32 *c) - { - done = false; - line = l; - column = c; - Node::accept(ast, this); - } - - bool preVisit(Node *ast) - { - return ast->lastSourceLocation().startLine >= *line && !done; - } - - //Case 1: Breakpoint is between sourceStart(exclusive) and - // sourceEnd(inclusive) --> End tree walk. - //Case 2: Breakpoint is on sourceStart --> Check for the start - // of the first executable code. Set the line number and - // column number. End tree walk. - //Case 3: Breakpoint is on "unbreakable" code --> Find the next "breakable" - // code and check for Case 2. End tree walk. - - //Add more types when suitable. - - bool visit(UiScriptBinding *ast) - { - if (!ast->statement) - return true; - - quint32 sourceStartLine = ast->firstSourceLocation().startLine; - quint32 statementStartLine; - quint32 statementColumn; - - if (ast->statement->kind == Node::Kind_ExpressionStatement) { - statementStartLine = ast->statement->firstSourceLocation(). - startLine; - statementColumn = ast->statement->firstSourceLocation().startColumn; - - } else if (ast->statement->kind == Node::Kind_Block) { - Block *block = static_cast(ast->statement); - if (!block || !block->statements) - return true; - statementStartLine = block->statements->firstSourceLocation(). - startLine; - statementColumn = block->statements->firstSourceLocation(). - startColumn; - - } else { - return true; - } - - - //Case 1 - //Check for possible relocation within the binding statement - - //Rewritten to (function () { { }}) - //The offset 16 is position of inner lbrace without token length. - const int offset = 16; - - //Case 2 - if (statementStartLine == *line) { - if (sourceStartLine == *line) - *column = offset + ast->qualifiedId->identifierToken.length; - done = true; - } - - //Case 3 - if (statementStartLine > *line) { - *line = statementStartLine; - if (sourceStartLine == *line) - *column = offset + ast->qualifiedId->identifierToken.length; - else - *column = statementColumn; - done = true; - } - return true; - } - - bool visit(FunctionDeclaration *ast) { - quint32 sourceStartLine = ast->firstSourceLocation().startLine; - quint32 sourceStartColumn = ast->firstSourceLocation().startColumn; - quint32 statementStartLine = ast->body->firstSourceLocation().startLine; - quint32 statementColumn = ast->body->firstSourceLocation().startColumn; - - //Case 1 - //Check for possible relocation within the function declaration - - //Case 2 - if (statementStartLine == *line) { - if (sourceStartLine == *line) - *column = statementColumn - sourceStartColumn + 1; - done = true; - } - - //Case 3 - if (statementStartLine > *line) { - *line = statementStartLine; - if (sourceStartLine == *line) - *column = statementColumn - sourceStartColumn + 1; - else - *column = statementColumn; - done = true; - } - return true; - } - - bool visit(EmptyStatement *ast) - { - *line = ast->lastSourceLocation().startLine + 1; - return true; - } - - bool visit(VariableStatement *ast) { test(ast); return true; } - bool visit(VariableDeclarationList *ast) { test(ast); return true; } - bool visit(VariableDeclaration *ast) { test(ast); return true; } - bool visit(ExpressionStatement *ast) { test(ast); return true; } - bool visit(IfStatement *ast) { test(ast); return true; } - bool visit(DoWhileStatement *ast) { test(ast); return true; } - bool visit(WhileStatement *ast) { test(ast); return true; } - bool visit(ForStatement *ast) { test(ast); return true; } - bool visit(LocalForStatement *ast) { test(ast); return true; } - bool visit(ForEachStatement *ast) { test(ast); return true; } - bool visit(LocalForEachStatement *ast) { test(ast); return true; } - bool visit(ContinueStatement *ast) { test(ast); return true; } - bool visit(BreakStatement *ast) { test(ast); return true; } - bool visit(ReturnStatement *ast) { test(ast); return true; } - bool visit(WithStatement *ast) { test(ast); return true; } - bool visit(SwitchStatement *ast) { test(ast); return true; } - bool visit(CaseBlock *ast) { test(ast); return true; } - bool visit(CaseClauses *ast) { test(ast); return true; } - bool visit(CaseClause *ast) { test(ast); return true; } - bool visit(DefaultClause *ast) { test(ast); return true; } - bool visit(LabelledStatement *ast) { test(ast); return true; } - bool visit(ThrowStatement *ast) { test(ast); return true; } - bool visit(TryStatement *ast) { test(ast); return true; } - bool visit(Catch *ast) { test(ast); return true; } - bool visit(Finally *ast) { test(ast); return true; } - bool visit(FunctionExpression *ast) { test(ast); return true; } - bool visit(DebuggerStatement *ast) { test(ast); return true; } - - void test(Node *ast) - { - quint32 statementStartLine = ast->firstSourceLocation().startLine; - //Case 1/2 - if (statementStartLine <= *line && - *line <= ast->lastSourceLocation().startLine) - done = true; - - //Case 3 - if (statementStartLine > *line) { - *line = statementStartLine; - *column = ast->firstSourceLocation().startColumn; - done = true; - } - } - - bool done; - quint32 *line; - quint32 *column; + NoExceptions, + UncaughtExceptions, + AllExceptions }; -ConsoleManagerInterface *qmlConsoleManager() +enum StepAction { - return ConsoleManagerInterface::instance(); + Continue, + StepIn, + StepOut, + Next +}; + +struct QmlV8ObjectData +{ + int handle; + QByteArray name; + QByteArray type; + QVariant value; + QVariantList properties; +}; + +class QmlEnginePrivate : QmlDebugClient +{ +public: + QmlEnginePrivate(QmlEngine *engine_, QmlDebugConnection *connection_) + : QmlDebugClient(QLatin1String("V8Debugger"), connection_), + engine(engine_), + inspectorAdapter(engine, connection_), + connection(connection_) + {} + + void sendMessage(const QByteArray &msg); + void messageReceived(const QByteArray &data); + void stateChanged(State state); + + void connect(); + void disconnect(); + + void continueDebugging(StepAction stepAction); + + void evaluate(const QString expr, bool global = false, bool disableBreak = false, + int frame = -1, bool addContext = false); + void lookup(const QList handles, bool includeSource = false); + void backtrace(int fromFrame = -1, int toFrame = -1, bool bottom = false); + void frame(int number = -1); + void scope(int number = -1, int frameNumber = -1); + void scripts(int types = 4, const QList ids = QList(), + bool includeSource = false, const QVariant filter = QVariant()); + + void setBreakpoint(const QString type, const QString target, + bool enabled = true,int line = 0, int column = 0, + const QString condition = QString(), int ignoreCount = -1); + void clearBreakpoint(int breakpoint); + void setExceptionBreak(Exceptions type, bool enabled = false); + + void version(); + void clearCache(); + + void sendAndLogV8Request(const QJsonObject &request); + + QByteArray packMessage(const QByteArray &type, const QByteArray &message = QByteArray()); + QJsonObject initObject(); + + void expandObject(const QByteArray &iname, quint64 objectId); + void flushSendBuffer(); + + void updateStack(const QVariant &bodyVal, const QVariant &refsVal); + void expandLocalsAndWatchers(const QVariant &bodyVal, const QVariant &refsVal); + void updateEvaluationResult(int sequence, bool success, const QVariant &bodyVal, const QVariant &refsVal); + void setCurrentFrameDetails(const QVariant &bodyVal, const QVariant &refsVal); + void updateScope(const QVariant &bodyVal, const QVariant &refsVal); + void createWatchDataList(const WatchItem *parent, const QVariantList &properties, const QVariant &refsVal); + void highlightExceptionCode(int lineNumber, const QString &filePath, const QString &errorMessage); + StackFrame extractStackFrame(const QVariant &bodyVal, const QVariant &refsVal); + + bool canEvaluateScript(const QString &script); + void updateScriptSource(const QString &fileName, int lineOffset, int columnOffset, const QString &source); + +public: + int sequence = -1; + QmlEngine *engine; + QHash breakpoints; + QHash breakpointsSync; + QList breakpointsTemp; + + QHash evaluatingExpression; + QHash localsAndWatchers; + QList updateLocalsAndWatchers; + QList debuggerCommands; + + //Cache + QList currentFrameScopes; + QHash stackIndexLookup; + + StepAction previousStepAction = Continue; + + QList sendBuffer; + + QHash sourceDocuments; + QHash > sourceEditors; + InteractiveInterpreter interpreter; + ApplicationLauncher applicationLauncher; + QmlInspectorAdapter inspectorAdapter; + QmlOutputParser outputParser; + + QTimer noDebugOutputTimer; + QHash pendingBreakpoints; + QList queryIds; + bool retryOnConnectFail = false; + bool automaticConnect = false; + + QTimer connectionTimer; + QmlDebug::QmlDebugConnection *connection; + QmlDebug::QDebugMessageClient *msgClient = 0; +}; + +static void updateDocument(IDocument *document, const QTextDocument *textDocument) +{ + if (auto baseTextDocument = qobject_cast(document)) + baseTextDocument->document()->setPlainText(textDocument->toPlainText()); } + /////////////////////////////////////////////////////////////////////// // // QmlEngine @@ -262,94 +226,97 @@ ConsoleManagerInterface *qmlConsoleManager() /////////////////////////////////////////////////////////////////////// QmlEngine::QmlEngine(const DebuggerRunParameters &startParameters, DebuggerEngine *masterEngine) - : DebuggerEngine(startParameters) - , m_adapter(this) - , m_inspectorAdapter(&m_adapter, this) - , m_retryOnConnectFail(false) - , m_automaticConnect(false) + : DebuggerEngine(startParameters), + d(new QmlEnginePrivate(this, new QmlDebugConnection(this))) { setObjectName(QLatin1String("QmlEngine")); if (masterEngine) setMasterEngine(masterEngine); - connect(&m_adapter, SIGNAL(connectionError(QDebugSupport::Error)), - SLOT(connectionError(QDebugSupport::Error))); - connect(&m_adapter, SIGNAL(serviceConnectionError(QString)), - SLOT(serviceConnectionError(QString))); - connect(&m_adapter, SIGNAL(connected()), - SLOT(connectionEstablished())); - connect(&m_adapter, SIGNAL(connectionStartupFailed()), - SLOT(connectionStartupFailed())); - - connect(stackHandler(), SIGNAL(stackChanged()), + connect(stackHandler(), &StackHandler::stackChanged, + this, &QmlEngine::updateCurrentContext); + connect(stackHandler(), &StackHandler::currentIndexChanged, + this, &QmlEngine::updateCurrentContext); + connect(inspectorView(), SIGNAL(currentIndexChanged(QModelIndex)), SLOT(updateCurrentContext())); - connect(stackHandler(), SIGNAL(currentIndexChanged()), - SLOT(updateCurrentContext())); - connect(inspectorTreeView(), SIGNAL(currentIndexChanged(QModelIndex)), - SLOT(updateCurrentContext())); - connect(m_inspectorAdapter.agent(), SIGNAL( - expressionResult(quint32,QVariant)), - SLOT(expressionEvaluated(quint32,QVariant))); - connect(m_adapter.messageClient(), - SIGNAL(message(QtMsgType,QString, - QmlDebug::QDebugContextInfo)), - SLOT(appendDebugOutput(QtMsgType,QString, - QmlDebug::QDebugContextInfo))); + connect(d->inspectorAdapter.agent(), &QmlInspectorAgent::expressionResult, + this, &QmlEngine::expressionEvaluated); + connect(&d->applicationLauncher, &ApplicationLauncher::processExited, + this, &QmlEngine::disconnected); + connect(&d->applicationLauncher, &ApplicationLauncher::appendMessage, + this, &QmlEngine::appendMessage); + connect(&d->applicationLauncher, &ApplicationLauncher::processStarted, + &d->noDebugOutputTimer, static_cast(&QTimer::start)); - connect(&m_applicationLauncher, - SIGNAL(processExited(int,QProcess::ExitStatus)), - SLOT(disconnected())); - connect(&m_applicationLauncher, - SIGNAL(appendMessage(QString,Utils::OutputFormat)), - SLOT(appendMessage(QString,Utils::OutputFormat))); - connect(&m_applicationLauncher, - SIGNAL(processStarted()), - &m_noDebugOutputTimer, - SLOT(start())); - - m_outputParser.setNoOutputText(ProjectExplorer::ApplicationLauncher - ::msgWinCannotRetrieveDebuggingOutput()); - connect(&m_outputParser, SIGNAL(waitingForConnectionOnPort(quint16)), - this, SLOT(beginConnection(quint16))); - connect(&m_outputParser, SIGNAL(noOutputMessage()), - this, SLOT(tryToConnect())); - connect(&m_outputParser, SIGNAL(errorMessage(QString)), - this, SLOT(appStartupFailed(QString))); + d->outputParser.setNoOutputText(ApplicationLauncher::msgWinCannotRetrieveDebuggingOutput()); + connect(&d->outputParser, &QmlOutputParser::waitingForConnectionOnPort, + this, &QmlEngine::beginConnection); + connect(&d->outputParser, &QmlOutputParser::noOutputMessage, + this, [this] { tryToConnect(); }); + connect(&d->outputParser, &QmlOutputParser::errorMessage, + this, &QmlEngine::appStartupFailed); // Only wait 8 seconds for the 'Waiting for connection' on application output, // then just try to connect (application output might be redirected / blocked) - m_noDebugOutputTimer.setSingleShot(true); - m_noDebugOutputTimer.setInterval(8000); - connect(&m_noDebugOutputTimer, SIGNAL(timeout()), this, SLOT(tryToConnect())); + d->noDebugOutputTimer.setSingleShot(true); + d->noDebugOutputTimer.setInterval(8000); + connect(&d->noDebugOutputTimer, SIGNAL(timeout()), this, SLOT(tryToConnect())); - ModelManagerInterface *mmIface = ModelManagerInterface::instance(); - if (mmIface) { - connect(ModelManagerInterface::instance(), SIGNAL(documentUpdated(QmlJS::Document::Ptr)), - this, SLOT(documentUpdated(QmlJS::Document::Ptr))); + if (auto mmIface = ModelManagerInterface::instance()) { + connect(mmIface, &ModelManagerInterface::documentUpdated, + this, &QmlEngine::documentUpdated); } // we won't get any debug output if (startParameters.useTerminal) { - m_noDebugOutputTimer.setInterval(0); - m_retryOnConnectFail = true; - m_automaticConnect = true; + d->noDebugOutputTimer.setInterval(0); + d->retryOnConnectFail = true; + d->automaticConnect = true; } - if (qmlConsoleManager()) - qmlConsoleManager()->setScriptEvaluator(this); + + if (auto consoleManager = ConsoleManagerInterface::instance()) + consoleManager->setScriptEvaluator(this); + + + d->connectionTimer.setInterval(4000); + d->connectionTimer.setSingleShot(true); + connect(&d->connectionTimer, &QTimer::timeout, + this, &QmlEngine::checkConnectionState); + + connect(d->connection, &QmlDebugConnection::stateMessage, + this, &QmlEngine::showConnectionStateMessage); + connect(d->connection, &QmlDebugConnection::errorMessage, + this, &QmlEngine::showConnectionErrorMessage); + connect(d->connection, &QmlDebugConnection::error, + this, &QmlEngine::connectionErrorOccurred); + connect(d->connection, &QmlDebugConnection::opened, + &d->connectionTimer, &QTimer::stop); + connect(d->connection, &QmlDebugConnection::opened, + this, &QmlEngine::connectionEstablished); + connect(d->connection, &QmlDebugConnection::closed, + this, &QmlEngine::disconnected); + + d->msgClient = new QDebugMessageClient(d->connection); + connect(d->msgClient, &QDebugMessageClient::newState, + this, &QmlEngine::clientStateChanged); + connect(d->msgClient, &QDebugMessageClient::message, + this, &appendDebugOutput); } QmlEngine::~QmlEngine() { - QSet documentsToClose; + QSet documentsToClose; - QHash >::iterator iter; - for (iter = m_sourceEditors.begin(); iter != m_sourceEditors.end(); ++iter) { - QWeakPointer textEditPtr = iter.value(); + QHash >::iterator iter; + for (iter = d->sourceEditors.begin(); iter != d->sourceEditors.end(); ++iter) { + QWeakPointer textEditPtr = iter.value(); if (textEditPtr) documentsToClose << textEditPtr.data()->document(); } - Core::EditorManager::closeDocuments(documentsToClose.toList()); + EditorManager::closeDocuments(documentsToClose.toList()); + + delete d; } void QmlEngine::setupInferior() @@ -358,7 +325,7 @@ void QmlEngine::setupInferior() notifyInferiorSetupOk(); - if (m_automaticConnect) + if (d->automaticConnect) beginConnection(); } @@ -373,7 +340,8 @@ void QmlEngine::connectionEstablished() if (!watchHandler()->watcherNames().isEmpty()) synchronizeWatchers(); - connect(watchModel(),SIGNAL(layoutChanged()),this,SLOT(synchronizeWatchers())); + connect(watchModel(), &QAbstractItemModel::layoutChanged, + this, &QmlEngine::synchronizeWatchers); if (state() == EngineRunRequested) notifyEngineRunAndInferiorRunOk(); @@ -382,13 +350,13 @@ void QmlEngine::connectionEstablished() void QmlEngine::tryToConnect(quint16 port) { showMessage(QLatin1String("QML Debugger: No application output received in time, trying to connect ..."), LogStatus); - m_retryOnConnectFail = true; + d->retryOnConnectFail = true; if (state() == EngineRunRequested) { if (isSlaveEngine()) { // Probably cpp is being debugged and hence we did not get the output yet. if (!masterEngine()->isDying()) { - m_noDebugOutputTimer.setInterval(4000); - m_noDebugOutputTimer.start(); + d->noDebugOutputTimer.setInterval(4000); + d->noDebugOutputTimer.start(); } else appStartupFailed(tr("No application output received in time")); @@ -396,15 +364,15 @@ void QmlEngine::tryToConnect(quint16 port) beginConnection(port); } } else { - m_automaticConnect = true; + d->automaticConnect = true; } } void QmlEngine::beginConnection(quint16 port) { - m_noDebugOutputTimer.stop(); + d->noDebugOutputTimer.stop(); - if (state() != EngineRunRequested && m_retryOnConnectFail) + if (state() != EngineRunRequested && d->retryOnConnectFail) return; QTC_ASSERT(state() == EngineRunRequested, return); @@ -428,19 +396,24 @@ void QmlEngine::beginConnection(quint16 port) if (runParameters().qmlServerPort > 0) port = runParameters().qmlServerPort; - m_adapter.beginConnectionTcp(host, port); -} + if (!d->connection || d->connection->isOpen()) + return; + d->connection->connectToHost(host, port); + + //A timeout to check the connection state + d->connectionTimer.start(); +} void QmlEngine::connectionStartupFailed() { - if (m_retryOnConnectFail) { + if (d->retryOnConnectFail) { // retry after 3 seconds ... QTimer::singleShot(3000, this, SLOT(beginConnection())); return; } - QMessageBox *infoBox = new QMessageBox(Core::ICore::mainWindow()); + QMessageBox *infoBox = new QMessageBox(ICore::mainWindow()); infoBox->setIcon(QMessageBox::Critical); infoBox->setWindowTitle(tr("Qt Creator")); infoBox->setText(tr("Could not connect to the in-process QML debugger." @@ -450,8 +423,8 @@ void QmlEngine::connectionStartupFailed() infoBox->setDefaultButton(QMessageBox::Retry); infoBox->setModal(true); - connect(infoBox, SIGNAL(finished(int)), - this, SLOT(errorMessageBoxFinished(int))); + connect(infoBox, &QDialog::finished, + this, &QmlEngine::errorMessageBoxFinished); infoBox->show(); } @@ -462,14 +435,14 @@ void QmlEngine::appStartupFailed(const QString &errorMessage) "\n%1").arg(errorMessage); if (isMasterEngine()) { - QMessageBox *infoBox = new QMessageBox(Core::ICore::mainWindow()); + QMessageBox *infoBox = new QMessageBox(ICore::mainWindow()); infoBox->setIcon(QMessageBox::Critical); infoBox->setWindowTitle(tr("Qt Creator")); infoBox->setText(error); infoBox->setStandardButtons(QMessageBox::Ok | QMessageBox::Help); infoBox->setDefaultButton(QMessageBox::Ok); - connect(infoBox, SIGNAL(finished(int)), - this, SLOT(errorMessageBoxFinished(int))); + connect(infoBox, &QDialog::finished, + this, &QmlEngine::errorMessageBoxFinished); infoBox->show(); } else { showMessage(error, StatusBar); @@ -486,7 +459,7 @@ void QmlEngine::errorMessageBoxFinished(int result) break; } case QMessageBox::Help: { - Core::HelpManager::handleHelpRequest(QLatin1String("qthelp://org.qt-project.qtcreator/doc/creator-debugging-qml.html")); + HelpManager::handleHelpRequest(QLatin1String("qthelp://org.qt-project.qtcreator/doc/creator-debugging-qml.html")); // fall through } default: @@ -500,37 +473,15 @@ void QmlEngine::errorMessageBoxFinished(int result) } } -void QmlEngine::connectionError(QDebugSupport::Error error) +void QmlEngine::filterApplicationMessage(const QString &output, int /*channel*/) const { - if (error == QDebugSupport::RemoteClosedConnectionError) - showMessage(tr("QML Debugger: Remote host closed connection."), StatusBar); - - if (!isSlaveEngine()) { // normal flow for slave engine when gdb exits - notifyInferiorSpontaneousStop(); - notifyInferiorIll(); - } -} - -void QmlEngine::serviceConnectionError(const QString &serviceName) -{ - showMessage(tr("QML Debugger: Could not connect to service \"%1\".") - .arg(serviceName), StatusBar); -} - -bool QmlEngine::canDisplayTooltip() const -{ - return false; -} - -void QmlEngine::filterApplicationMessage(const QString &output, int /*channel*/) -{ - m_outputParser.processOutput(output); + d->outputParser.processOutput(output); } void QmlEngine::showMessage(const QString &msg, int channel, int timeout) const { if (channel == AppOutput || channel == AppError) - const_cast(this)->filterApplicationMessage(msg, channel); + filterApplicationMessage(msg, channel); DebuggerEngine::showMessage(msg, channel, timeout); } @@ -539,25 +490,23 @@ void QmlEngine::gotoLocation(const Location &location) const QString fileName = location.fileName(); if (QUrl(fileName).isLocalFile()) { // internal file from source files -> show generated .js - QTC_ASSERT(m_sourceDocuments.contains(fileName), return); + QTC_ASSERT(d->sourceDocuments.contains(fileName), return); QString titlePattern = tr("JS Source for %1").arg(fileName); //Check if there are open documents with the same title - foreach (Core::IDocument *document, Core::DocumentModel::openedDocuments()) { + foreach (IDocument *document, DocumentModel::openedDocuments()) { if (document->displayName() == titlePattern) { - Core::EditorManager::activateEditorForDocument(document); + EditorManager::activateEditorForDocument(document); return; } } - Core::IEditor *editor = Core::EditorManager::openEditorWithContents( + IEditor *editor = EditorManager::openEditorWithContents( QmlJSEditor::Constants::C_QMLJSEDITOR_ID, &titlePattern); if (editor) { editor->document()->setProperty(Constants::OPENED_BY_DEBUGGER, true); - QPlainTextEdit *plainTextEdit = - qobject_cast(editor->widget()); - if (plainTextEdit) + if (auto plainTextEdit = qobject_cast(editor->widget())) plainTextEdit->setReadOnly(true); - updateDocument(editor->document(), m_sourceDocuments.value(fileName)); + updateDocument(editor->document(), d->sourceDocuments.value(fileName)); } } else { DebuggerEngine::gotoLocation(location); @@ -566,8 +515,15 @@ void QmlEngine::gotoLocation(const Location &location) void QmlEngine::closeConnection() { - disconnect(watchModel(),SIGNAL(layoutChanged()),this,SLOT(synchronizeWatchers())); - m_adapter.closeConnection(); + disconnect(watchModel(), &QAbstractItemModel::layoutChanged, + this, &QmlEngine::synchronizeWatchers); + + if (d->connectionTimer.isActive()) { + d->connectionTimer.stop(); + } else { + if (d->connection) + d->connection->close(); + } } void QmlEngine::runEngine() @@ -576,25 +532,25 @@ void QmlEngine::runEngine() if (!isSlaveEngine()) { if (runParameters().startMode == AttachToRemoteServer) - m_noDebugOutputTimer.start(); + d->noDebugOutputTimer.start(); else if (runParameters().startMode == AttachToRemoteProcess) beginConnection(); else startApplicationLauncher(); } else { - m_noDebugOutputTimer.start(); + d->noDebugOutputTimer.start(); } } void QmlEngine::startApplicationLauncher() { - if (!m_applicationLauncher.isRunning()) { + if (!d->applicationLauncher.isRunning()) { appendMessage(tr("Starting %1 %2").arg( QDir::toNativeSeparators(runParameters().executable), runParameters().processArgs) + QLatin1Char('\n') , Utils::NormalMessageFormat); - m_applicationLauncher.start(ProjectExplorer::ApplicationLauncher::Gui, + d->applicationLauncher.start(ApplicationLauncher::Gui, runParameters().executable, runParameters().processArgs); } @@ -602,10 +558,10 @@ void QmlEngine::startApplicationLauncher() void QmlEngine::stopApplicationLauncher() { - if (m_applicationLauncher.isRunning()) { - disconnect(&m_applicationLauncher, SIGNAL(processExited(int,QProcess::ExitStatus)), - this, SLOT(disconnected())); - m_applicationLauncher.stop(); + if (d->applicationLauncher.isRunning()) { + disconnect(&d->applicationLauncher, &ApplicationLauncher::processExited, + this, &QmlEngine::disconnected); + d->applicationLauncher.stop(); } } @@ -622,12 +578,12 @@ void QmlEngine::notifyEngineRemoteSetupFinished(const RemoteSetupResult &result) // The remote setup can take while especialy with mixed debugging. // Just waiting for 8 seconds is not enough. Increase the timeout // to 60 s - // In case we get an output the m_outputParser will start the connection. - m_noDebugOutputTimer.setInterval(60000); + // In case we get an output the d->outputParser will start the connection. + d->noDebugOutputTimer.setInterval(60000); } else { if (isMasterEngine()) - QMessageBox::critical(Core::ICore::dialogParent(), tr("Failed to start application"), + QMessageBox::critical(ICore::dialogParent(), tr("Failed to start application"), tr("Application startup failed: %1").arg(result.reason)); notifyEngineSetupFailed(); } @@ -646,16 +602,15 @@ void QmlEngine::notifyEngineRemoteServerRunning(const QByteArray &serverChannel, notifyEngineSetupOk(); // The remote setup can take a while especially with mixed debugging. - // Just waiting for 8 seconds is not enough. Increase the timeout - // to 60 s - // In case we get an output the m_outputParser will start the connection. - m_noDebugOutputTimer.setInterval(60000); + // Just waiting for 8 seconds is not enough. Increase the timeout to 60 s. + // In case we get an output the d->outputParser will start the connection. + d->noDebugOutputTimer.setInterval(60000); } void QmlEngine::shutdownInferior() { - if (m_adapter.activeDebuggerClient()) - m_adapter.activeDebuggerClient()->endSession(); + // End session. + d->disconnect(); if (isSlaveEngine()) resetLocation(); @@ -667,12 +622,11 @@ void QmlEngine::shutdownInferior() void QmlEngine::shutdownEngine() { - if (m_adapter.activeDebuggerClient()) - m_adapter.activeDebuggerClient()->resetSession(); + clearExceptionSelection(); - if (qmlConsoleManager()) - qmlConsoleManager()->setScriptEvaluator(0); - m_noDebugOutputTimer.stop(); + if (auto consoleManager = ConsoleManagerInterface::instance()) + consoleManager->setScriptEvaluator(0); + d->noDebugOutputTimer.stop(); // double check (ill engine?): stopApplicationLauncher(); @@ -688,12 +642,12 @@ void QmlEngine::setupEngine() // we need to get the port first notifyEngineRequestRemoteSetup(); } else { - m_applicationLauncher.setEnvironment(runParameters().environment); - m_applicationLauncher.setWorkingDirectory(runParameters().workingDirectory); + d->applicationLauncher.setEnvironment(runParameters().environment); + d->applicationLauncher.setWorkingDirectory(runParameters().workingDirectory); // We can't do this in the constructore because runControl() isn't yet defined - connect(&m_applicationLauncher, SIGNAL(bringToForegroundRequested(qint64)), - runControl(), SLOT(bringApplicationToForeground(qint64)), + connect(&d->applicationLauncher, &ApplicationLauncher::bringToForegroundRequested, + runControl(), &RunControl::bringApplicationToForeground, Qt::UniqueConnection); notifyEngineSetupOk(); @@ -703,8 +657,8 @@ void QmlEngine::setupEngine() void QmlEngine::continueInferior() { QTC_ASSERT(state() == InferiorStopOk, qDebug() << state()); - if (m_adapter.activeDebuggerClient()) - m_adapter.activeDebuggerClient()->continueInferior(); + clearExceptionSelection(); + d->continueDebugging(Continue); resetLocation(); notifyInferiorRunRequested(); notifyInferiorRunOk(); @@ -712,39 +666,39 @@ void QmlEngine::continueInferior() void QmlEngine::interruptInferior() { - if (m_adapter.activeDebuggerClient()) - m_adapter.activeDebuggerClient()->interruptInferior(); + showMessage(_(INTERRUPT), LogInput); + d->sendMessage(d->packMessage(INTERRUPT)); notifyInferiorStopOk(); } void QmlEngine::executeStep() { - if (m_adapter.activeDebuggerClient()) - m_adapter.activeDebuggerClient()->executeStep(); + clearExceptionSelection(); + d->continueDebugging(StepIn); notifyInferiorRunRequested(); notifyInferiorRunOk(); } void QmlEngine::executeStepI() { - if (m_adapter.activeDebuggerClient()) - m_adapter.activeDebuggerClient()->executeStepI(); + clearExceptionSelection(); + d->continueDebugging(StepIn); notifyInferiorRunRequested(); notifyInferiorRunOk(); } void QmlEngine::executeStepOut() { - if (m_adapter.activeDebuggerClient()) - m_adapter.activeDebuggerClient()->executeStepOut(); + clearExceptionSelection(); + d->continueDebugging(StepOut); notifyInferiorRunRequested(); notifyInferiorRunOk(); } void QmlEngine::executeNext() { - if (m_adapter.activeDebuggerClient()) - m_adapter.activeDebuggerClient()->executeNext(); + clearExceptionSelection(); + d->continueDebugging(Next); notifyInferiorRunRequested(); notifyInferiorRunOk(); } @@ -765,8 +719,11 @@ void QmlEngine::executeRunToLine(const ContextData &data) bool valid; if (adjustBreakpointLineAndColumn(data.fileName, &line, &column, &valid)) modifiedData.lineNumber = line; - if (m_adapter.activeDebuggerClient()) - m_adapter.activeDebuggerClient()->executeRunToLine(modifiedData); + d->setBreakpoint(QString(_(SCRIPTREGEXP)), modifiedData.fileName, + true, modifiedData.lineNumber); + clearExceptionSelection(); + d->continueDebugging(Continue); + notifyInferiorRunRequested(); notifyInferiorRunOk(); } @@ -788,8 +745,10 @@ void QmlEngine::activateFrame(int index) if (state() != InferiorStopOk && state() != InferiorUnrunnable) return; - if (m_adapter.activeDebuggerClient()) - m_adapter.activeDebuggerClient()->activateFrame(index); + if (index != stackHandler()->currentIndex()) + d->frame(d->stackIndexLookup.value(index)); + + stackHandler()->setCurrentIndex(index); gotoLocation(stackHandler()->frames().value(index)); } @@ -811,31 +770,39 @@ void QmlEngine::insertBreakpoint(Breakpoint bp) bool valid = false; if (!adjustBreakpointLineAndColumn(params.fileName, &line, &column, &valid)) { - pendingBreakpoints.insertMulti(params.fileName, bp); + d->pendingBreakpoints.insertMulti(params.fileName, bp); return; } if (!valid) return; } - if (m_adapter.activeDebuggerClient()) { - m_adapter.activeDebuggerClient()->insertBreakpoint(bp, line, column); - } else { - foreach (QmlV8DebuggerClient *client, m_adapter.debuggerClients()) { - client->insertBreakpoint(bp, line, column); - } + if (params.type == BreakpointAtJavaScriptThrow) { + bp.notifyBreakpointInsertOk(); + d->setExceptionBreak(AllExceptions, params.enabled); + + } else if (params.type == BreakpointByFileAndLine) { + d->setBreakpoint(QString(_(SCRIPTREGEXP)), params.fileName, + params.enabled, line, column, + QLatin1String(params.condition), params.ignoreCount); + + } else if (params.type == BreakpointOnQmlSignalEmit) { + d->setBreakpoint(QString(_(EVENT)), params.functionName, params.enabled); + bp.notifyBreakpointInsertOk(); } + + d->breakpointsSync.insert(d->sequence, bp.id()); } void QmlEngine::removeBreakpoint(Breakpoint bp) { const BreakpointParameters ¶ms = bp.parameters(); if (params.type == BreakpointByFileAndLine && - pendingBreakpoints.contains(params.fileName)) { - auto it = pendingBreakpoints.find(params.fileName); - while (it != pendingBreakpoints.end() && it.key() == params.fileName) { + d->pendingBreakpoints.contains(params.fileName)) { + auto it = d->pendingBreakpoints.find(params.fileName); + while (it != d->pendingBreakpoints.end() && it.key() == params.fileName) { if (it.value() == bp.id()) { - pendingBreakpoints.erase(it); + d->pendingBreakpoints.erase(it); return; } ++it; @@ -846,13 +813,15 @@ void QmlEngine::removeBreakpoint(Breakpoint bp) QTC_ASSERT(state == BreakpointRemoveRequested, qDebug() << bp << this << state); bp.notifyBreakpointRemoveProceeding(); - if (m_adapter.activeDebuggerClient()) { - m_adapter.activeDebuggerClient()->removeBreakpoint(bp); - } else { - foreach (QmlV8DebuggerClient *client, m_adapter.debuggerClients()) { - client->removeBreakpoint(bp); - } - } + int breakpoint = d->breakpoints.value(bp.id()); + d->breakpoints.remove(bp.id()); + + if (params.type == BreakpointAtJavaScriptThrow) + d->setExceptionBreak(AllExceptions); + else if (params.type == BreakpointOnQmlSignalEmit) + d->setBreakpoint(QString(_(EVENT)), params.functionName, false); + else + d->clearBreakpoint(breakpoint); if (bp.state() == BreakpointRemoveProceeding) bp.notifyBreakpointRemoveOk(); @@ -864,12 +833,24 @@ void QmlEngine::changeBreakpoint(Breakpoint bp) QTC_ASSERT(state == BreakpointChangeRequested, qDebug() << bp << this << state); bp.notifyBreakpointChangeProceeding(); - if (m_adapter.activeDebuggerClient()) { - m_adapter.activeDebuggerClient()->changeBreakpoint(bp); + const BreakpointParameters ¶ms = bp.parameters(); + + BreakpointResponse br = bp.response(); + if (params.type == BreakpointAtJavaScriptThrow) { + d->setExceptionBreak(AllExceptions, params.enabled); + br.enabled = params.enabled; + bp.setResponse(br); + } else if (params.type == BreakpointOnQmlSignalEmit) { + d->setBreakpoint(QString(_(EVENT)), params.functionName, params.enabled); + br.enabled = params.enabled; + bp.setResponse(br); } else { - foreach (QmlV8DebuggerClient *client, m_adapter.debuggerClients()) { - client->changeBreakpoint(bp); - } + //V8 supports only minimalistic changes in breakpoint + //Remove the breakpoint and add again + bp.notifyBreakpointChangeOk(); + bp.removeBreakpoint(); + BreakHandler *handler = d->engine->breakHandler(); + handler->appendBreakpoint(params); } if (bp.state() == BreakpointChangeProceeding) @@ -918,14 +899,6 @@ void QmlEngine::attemptBreakpointSynchronization() } DebuggerEngine::attemptBreakpointSynchronization(); - - if (m_adapter.activeDebuggerClient()) { - m_adapter.activeDebuggerClient()->synchronizeBreakpoints(); - } else { - foreach (QmlV8DebuggerClient *client, m_adapter.debuggerClients()) { - client->synchronizeBreakpoints(); - } - } } bool QmlEngine::acceptsBreakpoint(Breakpoint bp) const @@ -937,10 +910,10 @@ bool QmlEngine::acceptsBreakpoint(Breakpoint bp) const //TODO: enable setting of breakpoints before start of debug session //For now, the event breakpoint can be set after the activeDebuggerClient is known //This is because the older client does not support BreakpointOnQmlSignalHandler - bool acceptBreakpoint = false; - if (m_adapter.activeDebuggerClient()) - acceptBreakpoint = m_adapter.activeDebuggerClient()->acceptsBreakpoint(bp); - return acceptBreakpoint; + BreakpointType type = bp.type(); + return type == BreakpointOnQmlSignalEmit + || type == BreakpointByFileAndLine + || type == BreakpointAtJavaScriptThrow; } void QmlEngine::loadSymbols(const QString &moduleName) @@ -958,8 +931,7 @@ void QmlEngine::reloadModules() void QmlEngine::reloadSourceFiles() { - if (m_adapter.activeDebuggerClient()) - m_adapter.activeDebuggerClient()->getSourceFiles(); + d->scripts(4, QList(), true, QVariant()); } void QmlEngine::requestModuleSymbols(const QString &moduleName) @@ -967,12 +939,6 @@ void QmlEngine::requestModuleSymbols(const QString &moduleName) Q_UNUSED(moduleName) } -////////////////////////////////////////////////////////////////////// -// -// Tooltip specific stuff -// -////////////////////////////////////////////////////////////////////// - bool QmlEngine::canHandleToolTip(const DebuggerToolTipContext &) const { // This is processed by QML inspector, which has dependencies to @@ -981,20 +947,23 @@ bool QmlEngine::canHandleToolTip(const DebuggerToolTipContext &) const return true; } -////////////////////////////////////////////////////////////////////// -// -// Watch specific stuff -// -////////////////////////////////////////////////////////////////////// - void QmlEngine::assignValueInDebugger(WatchItem *item, const QString &expression, const QVariant &valueV) { if (!expression.isEmpty()) { - if (item->isInspect() && m_inspectorAdapter.agent()) - m_inspectorAdapter.agent()->assignValue(item, expression, valueV); - else if (m_adapter.activeDebuggerClient()) - m_adapter.activeDebuggerClient()->assignValueInDebugger(item, expression, valueV); + if (item->isInspect() && d->inspectorAdapter.agent()) { + d->inspectorAdapter.agent()->assignValue(item, expression, valueV); + } else { + StackHandler *handler = stackHandler(); + QString expression = QString(_("%1 = %2;")).arg(expression).arg(valueV.toString()); + if (handler->isContentsValid() && handler->currentFrame().isUsable()) { + d->evaluate(expression, false, false, handler->currentIndex()); + d->updateLocalsAndWatchers.append(d->sequence); + } else { + showMessage(QString(_("Cannot evaluate %1 in current stack frame")).arg( + expression), ConsoleOutput); + } + } } } @@ -1008,14 +977,11 @@ void QmlEngine::updateWatchData(const QByteArray &iname) return; if (item->isInspect()) { - m_inspectorAdapter.agent()->updateWatchData(*item); + d->inspectorAdapter.agent()->updateWatchData(*item); } else { - if (!item->name.isEmpty() && m_adapter.activeDebuggerClient()) { - if (item->isValueNeeded()) - m_adapter.activeDebuggerClient()->updateWatchData(*item); - if (item->isChildrenNeeded() && watchHandler()->isExpandedIName(item->iname)) { - m_adapter.activeDebuggerClient()->expandObject(item->iname, item->id); - } + if (!item->name.isEmpty()) { + if (item->isChildrenNeeded() && watchHandler()->isExpandedIName(item->iname)) + d->expandObject(item->iname, item->id); } synchronizeWatchers(); } @@ -1025,26 +991,30 @@ void QmlEngine::selectWatchData(const QByteArray &iname) { const WatchItem *item = watchHandler()->findItem(iname); if (item && item->isInspect()) - m_inspectorAdapter.agent()->watchDataSelected(item->id); + d->inspectorAdapter.agent()->watchDataSelected(item->id); } void QmlEngine::synchronizeWatchers() { - QStringList watchedExpressions = watchHandler()->watchedExpressions(); + if (state() != InferiorStopOk) + return; + + QStringList watchers = watchHandler()->watchedExpressions(); + // send watchers list - if (m_adapter.activeDebuggerClient()) { - m_adapter.activeDebuggerClient()->synchronizeWatchers(watchedExpressions); - } else { - foreach (QmlV8DebuggerClient *client, m_adapter.debuggerClients()) - client->synchronizeWatchers(watchedExpressions); + foreach (const QString &exp, watchers) { + StackHandler *handler = stackHandler(); + if (handler->isContentsValid() && handler->currentFrame().isUsable()) { + d->evaluate(exp, false, false, handler->currentIndex()); + d->evaluatingExpression.insert(d->sequence, exp); + } } } -ConsoleItem *constructLogItemTree(ConsoleItem *parent, - const QVariant &result, - const QString &key = QString()) +static ConsoleItem *constructLogItemTree(ConsoleItem *parent, + const QVariant &result, + const QString &key = QString()) { - using namespace QmlJS; bool sorted = boolSetting(SortStructMembers); if (!result.isValid()) return 0; @@ -1086,13 +1056,10 @@ ConsoleItem *constructLogItemTree(ConsoleItem *parent, void QmlEngine::expressionEvaluated(quint32 queryId, const QVariant &result) { - if (queryIds.contains(queryId)) { - queryIds.removeOne(queryId); - using namespace QmlJS; - ConsoleManagerInterface *consoleManager = qmlConsoleManager(); - if (consoleManager) { - ConsoleItem *item = constructLogItemTree(consoleManager->rootItem(), result); - if (item) + if (d->queryIds.contains(queryId)) { + d->queryIds.removeOne(queryId); + if (auto consoleManager = ConsoleManagerInterface::instance()) { + if (ConsoleItem *item = constructLogItemTree(consoleManager->rootItem(), result)) consoleManager->printToConsolePane(item); } } @@ -1116,18 +1083,12 @@ bool QmlEngine::hasCapability(unsigned cap) const void QmlEngine::quitDebugger() { - m_noDebugOutputTimer.stop(); - m_automaticConnect = false; - m_retryOnConnectFail = false; + d->noDebugOutputTimer.stop(); + d->automaticConnect = false; + d->retryOnConnectFail = false; DebuggerEngine::quitDebugger(); } -void QmlEngine::inferiorSpontaneousStop() -{ - if (state() == InferiorRunOk) - notifyInferiorSpontaneousStop(); -} - void QmlEngine::disconnected() { showMessage(tr("QML Debugger disconnected."), StatusBar); @@ -1137,9 +1098,9 @@ void QmlEngine::disconnected() void QmlEngine::documentUpdated(Document::Ptr doc) { QString fileName = doc->fileName(); - if (pendingBreakpoints.contains(fileName)) { - QList bps = pendingBreakpoints.values(fileName); - pendingBreakpoints.remove(fileName); + if (d->pendingBreakpoints.contains(fileName)) { + QList bps = d->pendingBreakpoints.values(fileName); + d->pendingBreakpoints.remove(fileName); foreach (const Breakpoint bp, bps) insertBreakpoint(bp); } @@ -1151,13 +1112,12 @@ void QmlEngine::updateCurrentContext() if (state() == InferiorStopOk) { context = stackHandler()->currentFrame().function; } else { - QModelIndex currentIndex = inspectorTreeView()->currentIndex(); + QModelIndex currentIndex = inspectorView()->currentIndex(); const WatchData *currentData = watchHandler()->watchItem(currentIndex); if (!currentData) return; const WatchData *parentData = watchHandler()->watchItem(currentIndex.parent()); - const WatchData *grandParentData = watchHandler()->watchItem( - currentIndex.parent().parent()); + const WatchData *grandParentData = watchHandler()->watchItem(currentIndex.parent().parent()); if (currentData->id != parentData->id) context = currentData->name; else if (parentData->id != grandParentData->id) @@ -1168,44 +1128,24 @@ void QmlEngine::updateCurrentContext() synchronizeWatchers(); - ConsoleManagerInterface *consoleManager = qmlConsoleManager(); - if (consoleManager) + if (auto consoleManager = ConsoleManagerInterface::instance()) consoleManager->setContext(tr("Context:") + QLatin1Char(' ') + context); } -void QmlEngine::appendDebugOutput(QtMsgType type, const QString &message, - const QmlDebug::QDebugContextInfo &info) -{ - using namespace QmlJS; - ConsoleItem::ItemType itemType; - switch (type) { - case QtDebugMsg: - itemType = ConsoleItem::DebugType; - break; - case QtWarningMsg: - itemType = ConsoleItem::WarningType; - break; - case QtCriticalMsg: - case QtFatalMsg: - itemType = ConsoleItem::ErrorType; - break; - default: - //This case is not possible - return; - } - ConsoleManagerInterface *consoleManager = qmlConsoleManager(); - if (consoleManager) { - ConsoleItem *item = new ConsoleItem(consoleManager->rootItem(), itemType, message); - item->file = info.file; - item->line = info.line; - consoleManager->printToConsolePane(item); - } -} - void QmlEngine::executeDebuggerCommand(const QString &command, DebuggerLanguages languages) { - if ((languages & QmlLanguage) && m_adapter.activeDebuggerClient()) - m_adapter.activeDebuggerClient()->executeDebuggerCommand(command); + if (!(languages & QmlLanguage)) + return; + + StackHandler *handler = stackHandler(); + if (handler->isContentsValid() && handler->currentFrame().isUsable()) { + d->evaluate(command, false, false, handler->currentIndex()); + d->debuggerCommands.append(d->sequence); + } else { + //Currently cannot evaluate if not in a javascript break + d->engine->showMessage(QString(_("Cannot evaluate %1 in current stack frame")).arg( + command), ConsoleOutput); + } } bool QmlEngine::evaluateScript(const QString &expression) @@ -1214,17 +1154,15 @@ bool QmlEngine::evaluateScript(const QString &expression) // Evaluate expression based on engine state // When engine->state() == InferiorStopOk, the expression is sent to debuggerClient. if (state() != InferiorStopOk) { - QModelIndex currentIndex = inspectorTreeView()->currentIndex(); - QmlInspectorAgent *agent = m_inspectorAdapter.agent(); + QModelIndex currentIndex = inspectorView()->currentIndex(); + QmlInspectorAgent *agent = d->inspectorAdapter.agent(); quint32 queryId = agent->queryExpressionResult(watchHandler()->watchItem(currentIndex)->id, expression); if (queryId) { - queryIds << queryId; + d->queryIds.append(queryId); } else { didEvaluate = false; - using namespace QmlJS; - ConsoleManagerInterface *consoleManager = qmlConsoleManager(); - if (consoleManager) { + if (auto consoleManager = ConsoleManagerInterface::instance()) { consoleManager->printToConsolePane(ConsoleItem::ErrorType, _("Error evaluating expression.")); } @@ -1235,42 +1173,15 @@ bool QmlEngine::evaluateScript(const QString &expression) return didEvaluate; } -QString QmlEngine::qmlImportPath() const -{ - return runParameters().environment.value(QLatin1String("QML_IMPORT_PATH")); -} - -void QmlEngine::logMessage(const QString &service, LogDirection direction, const QString &message) -{ - QString msg = service; - msg += direction == LogSend ? QLatin1String(": sending ") : QLatin1String(": receiving "); - msg += message; - showMessage(msg, LogDebug); -} - -void QmlEngine::setSourceFiles(const QStringList &fileNames) -{ - QMap files; - foreach (const QString &file, fileNames) { - QString shortName = file; - QString fullName = toFileInProject(file); - files.insert(shortName, fullName); - } - - sourceFilesHandler()->setSourceFiles(files); - //update open editors - -} - -void QmlEngine::updateScriptSource(const QString &fileName, int lineOffset, int columnOffset, - const QString &source) +void QmlEnginePrivate::updateScriptSource(const QString &fileName, int lineOffset, int columnOffset, + const QString &source) { QTextDocument *document = 0; - if (m_sourceDocuments.contains(fileName)) { - document = m_sourceDocuments.value(fileName); + if (sourceDocuments.contains(fileName)) { + document = sourceDocuments.value(fileName); } else { document = new QTextDocument(this); - m_sourceDocuments.insert(fileName, document); + sourceDocuments.insert(fileName, document); } // We're getting an unordered set of snippets that can even interleave @@ -1307,7 +1218,7 @@ void QmlEngine::updateScriptSource(const QString &fileName, int lineOffset, int //update open editors QString titlePattern = tr("JS Source for %1").arg(fileName); //Check if there are open editors with the same title - foreach (Core::IDocument *doc, Core::DocumentModel::openedDocuments()) { + foreach (IDocument *doc, DocumentModel::openedDocuments()) { if (doc->displayName() == titlePattern) { updateDocument(doc, document); break; @@ -1315,45 +1226,1488 @@ void QmlEngine::updateScriptSource(const QString &fileName, int lineOffset, int } } -void QmlEngine::updateDocument(Core::IDocument *document, const QTextDocument *textDocument) +bool QmlEnginePrivate::canEvaluateScript(const QString &script) { - TextEditor::TextDocument *baseTextDocument - = qobject_cast(document); - if (!baseTextDocument) - return; - - baseTextDocument->document()->setPlainText(textDocument->toPlainText()); + interpreter.clearText(); + interpreter.appendText(script); + return interpreter.canEvaluate(); } -bool QmlEngine::canEvaluateScript(const QString &script) +void QmlEngine::connectionErrorOccurred(QDebugSupport::Error error) { - m_interpreter.clearText(); - m_interpreter.appendText(script); - return m_interpreter.canEvaluate(); + // this is only an error if we are already connected and something goes wrong. + if (isConnected()) { + if (error == QDebugSupport::RemoteClosedConnectionError) + showMessage(tr("QML Debugger: Remote host closed connection."), StatusBar); + + if (!isSlaveEngine()) { // normal flow for slave engine when gdb exits + notifyInferiorSpontaneousStop(); + notifyInferiorIll(); + } + } else { + d->connectionTimer.stop(); + connectionStartupFailed(); + } } -bool QmlEngine::adjustBreakpointLineAndColumn( - const QString &filePath, quint32 *line, quint32 *column, bool *valid) +void QmlEngine::clientStateChanged(QmlDebugClient::State state) { - bool success = false; - //check if file is in the latest snapshot - //ignoring documentChangedOnDisk - //TODO:: update breakpoints if document is changed. - ModelManagerInterface *mmIface = ModelManagerInterface::instance(); - if (mmIface) { - Document::Ptr doc = mmIface->newestSnapshot(). - document(filePath); - if (doc.isNull()) { - ModelManagerInterface::instance()->updateSourceFiles( - QStringList() << filePath, false); - } else { - ASTWalker walker; - walker(doc->ast(), line, column); - *valid = walker.done; - success = true; + QString serviceName; + float version = 0; + if (QmlDebugClient *client = qobject_cast(sender())) { + serviceName = client->name(); + version = client->remoteVersion(); + } + + logServiceStateChange(serviceName, version, state); +} + +void QmlEngine::checkConnectionState() +{ + if (!isConnected()) { + closeConnection(); + connectionStartupFailed(); + } +} + +bool QmlEngine::isConnected() const +{ + return d->connection->isOpen(); +} + +void QmlEngine::showConnectionStateMessage(const QString &message) +{ + showMessage(_("QML Debugger: ") + message, LogStatus); +} + +void QmlEngine::showConnectionErrorMessage(const QString &message) +{ + showMessage(_("QML Debugger: ") + message, LogError); +} + +void QmlEngine::logServiceStateChange(const QString &service, float version, + QmlDebugClient::State newState) +{ + switch (newState) { + case QmlDebugClient::Unavailable: { + showConnectionStateMessage(_("Status of \"%1\" Version: %2 changed to 'unavailable'."). + arg(service).arg(QString::number(version))); + break; + } + case QmlDebugClient::Enabled: { + showConnectionStateMessage(_("Status of \"%1\" Version: %2 changed to 'enabled'."). + arg(service).arg(QString::number(version))); + break; + } + + case QmlDebugClient::NotConnected: { + showConnectionStateMessage(_("Status of \"%1\" Version: %2 changed to 'not connected'."). + arg(service).arg(QString::number(version))); + break; + } + } +} + +void QmlEngine::logServiceActivity(const QString &service, const QString &logMessage) +{ + showMessage(service + QLatin1Char(' ') + logMessage, LogDebug); +} + +void QmlEnginePrivate::connect() +{ + engine->showMessage(_(CONNECT), LogInput); + sendMessage(packMessage(CONNECT)); +} + +void QmlEnginePrivate::disconnect() +{ + // { "seq" : , + // "type" : "request", + // "command" : "disconnect", + // } + QJsonObject jsonVal = initObject(); + jsonVal.insert(_(COMMAND), _(DISCONNECT)); + + const QByteArray msg = QJsonDocument(jsonVal).toJson(QJsonDocument::Compact); + engine->showMessage(QString::fromUtf8(msg), LogInput); + sendMessage(packMessage(DISCONNECT, msg)); +} + +void QmlEnginePrivate::continueDebugging(StepAction action) +{ + // { "seq" : , + // "type" : "request", + // "command" : "continue", + // "arguments" : { "stepaction" : <"in", "next" or "out">, + // "stepcount" : + // } + // } + QJsonObject jsonVal = initObject(); + jsonVal.insert(_(COMMAND), _(CONTINEDEBUGGING)); + + if (action != Continue) { + QJsonObject args; + switch (action) { + case StepIn: + args.insert(_(STEPACTION), _(IN)); + break; + case StepOut: + args.insert(_(STEPACTION), _(OUT)); + break; + case Next: + args.insert(_(STEPACTION), _(NEXT)); + break; + default:break; + } + + jsonVal.insert(_(ARGUMENTS), args); + } + sendAndLogV8Request(jsonVal); + previousStepAction = action; +} + +void QmlEnginePrivate::evaluate(const QString expr, bool global, + bool disableBreak, int frame, bool addContext) +{ + // { "seq" : , + // "type" : "request", + // "command" : "evaluate", + // "arguments" : { "expression" : , + // "frame" : , + // "global" : , + // "disable_break" : , + // "additional_context" : [ + // { "name" : , "handle" : }, + // { "name" : , "handle" : }, + // ... + // ] + // } + // } + QJsonObject jsonVal = initObject(); + jsonVal.insert(_(COMMAND), _(EVALUATE)); + + QJsonObject args { + { _(EXPRESSION), expr } + }; + + if (frame != -1) + args.insert(_(FRAME), frame); + + if (global) + args.insert(_(GLOBAL), global); + + if (disableBreak) + args.insert(_(DISABLE_BREAK), disableBreak); + + if (addContext) { + WatchHandler *watchHandler = engine->watchHandler(); + QAbstractItemModel *watchModel = watchHandler->model(); + int rowCount = watchModel->rowCount(); + + QJsonArray ctxtList; + while (rowCount) { + QModelIndex index = watchModel->index(--rowCount, 0); + const WatchData *data = watchHandler->watchItem(index); + const QJsonObject ctxt { + { _(NAME), data->name }, + { _(HANDLE), int(data->id) } + }; + + ctxtList.push_front(ctxt); + } + + args.insert(_(ADDITIONAL_CONTEXT), ctxtList); + } + + jsonVal.insert(_(ARGUMENTS), args); + + sendAndLogV8Request(jsonVal); +} + +void QmlEnginePrivate::lookup(QList handles, bool includeSource) +{ + // { "seq" : , + // "type" : "request", + // "command" : "lookup", + // "arguments" : { "handles" : , + // "includeSource" : , + // } + // } + QJsonObject jsonVal = initObject(); + jsonVal.insert(_(COMMAND), _(LOOKUP)); + + QJsonObject args; + + QJsonArray array; + foreach (int handle, handles) + array.push_back(handle); + args.insert(_(HANDLES), array); + + if (includeSource) + args.insert(_(INCLUDESOURCE), includeSource); + + jsonVal.insert(_(ARGUMENTS), args); + + sendAndLogV8Request(jsonVal); +} + +void QmlEnginePrivate::backtrace(int fromFrame, int toFrame, bool bottom) +{ + // { "seq" : , + // "type" : "request", + // "command" : "backtrace", + // "arguments" : { "fromFrame" : + // "toFrame" : + // "bottom" : + // } + // } + QJsonObject jsonVal = initObject(); + jsonVal.insert(_(COMMAND), _(BACKTRACE)); + + QJsonObject args; + + if (fromFrame != -1) + args.insert(_(FROMFRAME), fromFrame); + + if (toFrame != -1) + args.insert(_(TOFRAME), toFrame); + + if (bottom) + args.insert(_(BOTTOM), bottom); + + jsonVal.insert(_(ARGUMENTS), args); + + sendAndLogV8Request(jsonVal); +} + +void QmlEnginePrivate::frame(int number) +{ + // { "seq" : , + // "type" : "request", + // "command" : "frame", + // "arguments" : { "number" : + // } + // } + QJsonObject jsonVal = initObject(); + jsonVal.insert(_(COMMAND), _(FRAME)); + + if (number != -1) { + const QJsonObject args { + { _(NUMBER), number } + }; + + jsonVal.insert(_(ARGUMENTS), args); + } + + sendAndLogV8Request(jsonVal); +} + +void QmlEnginePrivate::scope(int number, int frameNumber) +{ + // { "seq" : , + // "type" : "request", + // "command" : "scope", + // "arguments" : { "number" : + // "frameNumber" : + // } + // } + QJsonObject jsonVal = initObject(); + jsonVal.insert(_(COMMAND), _(SCOPE)); + + if (number != -1) { + QJsonObject args { + { _(NUMBER), number } + }; + + if (frameNumber != -1) + args.insert(_(FRAMENUMBER), frameNumber); + + jsonVal.insert(_(ARGUMENTS), args); + } + + sendAndLogV8Request(jsonVal); +} + +void QmlEnginePrivate::scripts(int types, const QList ids, bool includeSource, + const QVariant filter) +{ + // { "seq" : , + // "type" : "request", + // "command" : "scripts", + // "arguments" : { "types" : + // "ids" : + // "includeSource" : + // "filter" : + // } + // } + QJsonObject jsonVal = initObject(); + jsonVal.insert(_(COMMAND), _(SCRIPTS)); + + QJsonObject args { + { _(TYPES), types } + }; + + if (ids.count()) { + QJsonArray array; + foreach (int id, ids) { + array.push_back(id); + } + args.insert(_(IDS), array); + } + + if (includeSource) + args.insert(_(INCLUDESOURCE), includeSource); + + QJsonValue filterValue; + if (filter.type() == QVariant::String) + filterValue = filter.toString(); + else if (filter.type() == QVariant::Int) + filterValue = filter.toInt(); + else + QTC_CHECK(!filter.isValid()); + + args.insert(_(FILTER), filterValue); + + jsonVal.insert(_(ARGUMENTS), args); + + sendAndLogV8Request(jsonVal); +} + +void QmlEnginePrivate::setBreakpoint(const QString type, const QString target, + bool enabled, int line, int column, + const QString condition, int ignoreCount) +{ + // { "seq" : , + // "type" : "request", + // "command" : "setbreakpoint", + // "arguments" : { "type" : <"function" or "script" or "scriptId" or "scriptRegExp"> + // "target" : + // "line" : + // "column" : + // "enabled" : + // "condition" : + // "ignoreCount" : + // } + // } + if (type == _(EVENT)) { + QByteArray params; + QmlDebugStream rs(¶ms, QIODevice::WriteOnly); + rs << target.toUtf8() << enabled; + engine->showMessage(QString(_("%1 %2 %3")).arg(_(BREAKONSIGNAL), target, enabled ? _("enabled") : _("disabled")), LogInput); + sendMessage(packMessage(BREAKONSIGNAL, params)); + + } else { + QJsonObject jsonVal = initObject(); + jsonVal.insert(_(COMMAND), _(SETBREAKPOINT)); + + QJsonObject args { + { _(TYPE), type }, + { _(ENABLED), enabled } + }; + if (type == _(SCRIPTREGEXP)) + args.insert(_(TARGET), Utils::FileName::fromString(target).fileName()); + else + args.insert(_(TARGET), target); + + if (line) + args.insert(_(LINE), line - 1); + + if (column) + args.insert(_(COLUMN), column - 1); + + if (!condition.isEmpty()) + args.insert(_(CONDITION), condition); + + if (ignoreCount != -1) + args.insert(_(IGNORECOUNT), ignoreCount); + + jsonVal.insert(_(ARGUMENTS), args); + + sendAndLogV8Request(jsonVal); + } +} + +void QmlEnginePrivate::clearBreakpoint(int breakpoint) +{ + // { "seq" : , + // "type" : "request", + // "command" : "clearbreakpoint", + // "arguments" : { "breakpoint" : + // } + // } + QJsonObject jsonVal = initObject(); + jsonVal.insert(_(COMMAND), _(CLEARBREAKPOINT)); + + QJsonObject args { + { _(BREAKPOINT), breakpoint } + }; + + jsonVal.insert(_(ARGUMENTS), args); + + sendAndLogV8Request(jsonVal); +} + +void QmlEnginePrivate::setExceptionBreak(Exceptions type, bool enabled) +{ + // { "seq" : , + // "type" : "request", + // "command" : "setexceptionbreak", + // "arguments" : { "type" : , + // "enabled" : + // } + // } + QJsonObject jsonVal = initObject(); + jsonVal.insert(_(COMMAND), _(SETEXCEPTIONBREAK)); + + QJsonObject args; + + if (type == AllExceptions) + args.insert(_(TYPE), _(ALL)); + //Not Supported + // else if (type == UncaughtExceptions) + // args.setProperty(_(TYPE),QScriptValue(_(UNCAUGHT))); + + if (enabled) + args.insert(_(ENABLED), enabled); + + jsonVal.insert(_(ARGUMENTS), args); + + sendAndLogV8Request(jsonVal); +} + +void QmlEnginePrivate::version() +{ + // { "seq" : , + // "type" : "request", + // "command" : "version", + // } + QJsonObject jsonVal = initObject(); + jsonVal.insert(_(COMMAND), _(VERSION)); + + sendAndLogV8Request(jsonVal); +} + +QVariant valueFromRef(int handle, const QVariant &refsVal, bool *success) +{ + *success = false; + QVariant variant; + const QVariantList refs = refsVal.toList(); + foreach (const QVariant &ref, refs) { + const QVariantMap refData = ref.toMap(); + if (refData.value(_(HANDLE)).toInt() == handle) { + variant = refData; + *success = true; + break; } } - return success; + return variant; +} + +QmlV8ObjectData extractData(const QVariant &data, const QVariant &refsVal) +{ + // { "handle" : , + // "type" : <"undefined", "null", "boolean", "number", "string", "object", "function" or "frame"> + // } + + // {"handle":,"type":"undefined"} + + // {"handle":,"type":"null"} + + // { "handle":, + // "type" : <"boolean", "number" or "string"> + // "value" : + // } + + // {"handle":7,"type":"boolean","value":true} + + // {"handle":8,"type":"number","value":42} + + // { "handle" : , + // "type" : "object", + // "className" : , + // "constructorFunction" : {"ref":}, + // "protoObject" : {"ref":}, + // "prototypeObject" : {"ref":}, + // "properties" : [ {"name" : , + // "ref" : + // }, + // ... + // ] + // } + + // { "handle" : , + // "type" : "function", + // "className" : "Function", + // "constructorFunction" : {"ref":}, + // "protoObject" : {"ref":}, + // "prototypeObject" : {"ref":}, + // "name" : , + // "inferredName" : + // "source" : , + // "script" : , + // "scriptId" : , + // "position" : , + // "line" : , + // "column" : , + // "properties" : [ {"name" : , + // "ref" : + // }, + // ... + // ] + // } + + QmlV8ObjectData objectData; + const QVariantMap dataMap = data.toMap(); + + objectData.name = dataMap.value(_(NAME)).toByteArray(); + + if (dataMap.contains(_(REF))) { + objectData.handle = dataMap.value(_(REF)).toInt(); + bool success; + QVariant dataFromRef = valueFromRef(objectData.handle, refsVal, &success); + if (success) { + QmlV8ObjectData data = extractData(dataFromRef, refsVal); + objectData.type = data.type; + objectData.value = data.value; + objectData.properties = data.properties; + } + } else { + objectData.handle = dataMap.value(_(HANDLE)).toInt(); + QString type = dataMap.value(_(TYPE)).toString(); + + if (type == _("undefined")) { + objectData.type = QByteArray("undefined"); + objectData.value = QVariant(_("undefined")); + + } else if (type == _("null")) { + objectData.type = QByteArray("null"); + objectData.value= QVariant(_("null")); + + } else if (type == _("boolean")) { + objectData.type = QByteArray("boolean"); + objectData.value = dataMap.value(_(VALUE)); + + } else if (type == _("number")) { + objectData.type = QByteArray("number"); + objectData.value = dataMap.value(_(VALUE)); + + } else if (type == _("string")) { + objectData.type = QByteArray("string"); + objectData.value = dataMap.value(_(VALUE)); + + } else if (type == _("object")) { + objectData.type = QByteArray("object"); + objectData.value = dataMap.value(_("className")); + objectData.properties = dataMap.value(_("properties")).toList(); + + } else if (type == _("function")) { + objectData.type = QByteArray("function"); + objectData.value = dataMap.value(_(NAME)); + objectData.properties = dataMap.value(_("properties")).toList(); + + } else if (type == _("script")) { + objectData.type = QByteArray("script"); + objectData.value = dataMap.value(_(NAME)); + } + } + + return objectData; +} + +void QmlEnginePrivate::clearCache() +{ + currentFrameScopes.clear(); + updateLocalsAndWatchers.clear(); +} + +QByteArray QmlEnginePrivate::packMessage(const QByteArray &type, const QByteArray &message) +{ + SDEBUG(message); + QByteArray request; + QmlDebugStream rs(&request, QIODevice::WriteOnly); + QByteArray cmd = V8DEBUG; + rs << cmd << type << message; + return request; +} + +QJsonObject QmlEnginePrivate::initObject() +{ + return QJsonObject { + {_(SEQ), ++sequence}, + {_(TYPE), _(REQUEST)} + }; +} + +void QmlEnginePrivate::sendAndLogV8Request(const QJsonObject &request) +{ + const QByteArray msg = QJsonDocument(request).toJson(QJsonDocument::Compact); + engine->showMessage(QString::fromLatin1("%1 %2").arg(_(V8REQUEST), QString::fromUtf8(msg)), LogInput); + sendMessage(packMessage(V8REQUEST, msg)); +} + +void QmlEnginePrivate::expandObject(const QByteArray &iname, quint64 objectId) +{ + if (objectId == 0) { + //We may have got the global object + const WatchItem *watch = engine->watchHandler()->findItem(iname); + if (watch->value == QLatin1String("global")) { + StackHandler *stackHandler = engine->stackHandler(); + if (stackHandler->isContentsValid() && stackHandler->currentFrame().isUsable()) { + evaluate(watch->name, false, false, stackHandler->currentIndex()); + evaluatingExpression.insert(sequence, QLatin1String(iname)); + } + return; + } + } + localsAndWatchers.insertMulti(objectId, iname); + lookup(QList() << objectId); +} + +void QmlEnginePrivate::messageReceived(const QByteArray &data) +{ + QmlDebugStream ds(data); + QByteArray command; + ds >> command; + + if (command == V8DEBUG) { + QByteArray type; + QByteArray response; + ds >> type >> response; + + engine->showMessage(QLatin1String(type), LogOutput); + if (type == CONNECT) { + //debugging session started + + } else if (type == INTERRUPT) { + //debug break requested + + } else if (type == BREAKONSIGNAL) { + //break on signal handler requested + + } else if (type == V8MESSAGE) { + const QString responseString = QLatin1String(response); + SDEBUG(responseString); + engine->showMessage(QLatin1String(V8MESSAGE) + QLatin1Char(' ') + responseString, LogOutput); + + const QVariantMap resp = + QJsonDocument::fromJson(responseString.toUtf8()).toVariant().toMap(); + + const QString type(resp.value(_(TYPE)).toString()); + + if (type == _("response")) { + + bool success = resp.value(_("success")).toBool(); + if (!success) { + SDEBUG("Request was unsuccessful"); + } + + const QString debugCommand(resp.value(_(COMMAND)).toString()); + + if (debugCommand == _(DISCONNECT)) { + //debugging session ended + + } else if (debugCommand == _(CONTINEDEBUGGING)) { + //do nothing, wait for next break + + } else if (debugCommand == _(BACKTRACE)) { + if (success) + updateStack(resp.value(_(BODY)), resp.value(_(REFS))); + + } else if (debugCommand == _(LOOKUP)) { + if (success) + expandLocalsAndWatchers(resp.value(_(BODY)), resp.value(_(REFS))); + + } else if (debugCommand == _(EVALUATE)) { + int seq = resp.value(_("request_seq")).toInt(); + if (success) { + updateEvaluationResult(seq, success, resp.value(_(BODY)), resp.value(_(REFS))); + } else { + QVariantMap map; + map.insert(_(TYPE), QVariant(_("string"))); + map.insert(_(VALUE), resp.value(_("message"))); + updateEvaluationResult(seq, success, QVariant(map), QVariant()); + } + + } else if (debugCommand == _(SETBREAKPOINT)) { + // { "seq" : , + // "type" : "response", + // "request_seq" : , + // "command" : "setbreakpoint", + // "body" : { "type" : <"function" or "script"> + // "breakpoint" : + // } + // "running" : + // "success" : true + // } + + int seq = resp.value(_("request_seq")).toInt(); + const QVariantMap breakpointData = resp.value(_(BODY)).toMap(); + int index = breakpointData.value(_("breakpoint")).toInt(); + + if (breakpointsSync.contains(seq)) { + BreakpointModelId id = breakpointsSync.take(seq); + breakpoints.insert(id, index); + + //Is actual position info present? Then breakpoint was + //accepted + const QVariantList actualLocations = + breakpointData.value(_("actual_locations")).toList(); + if (actualLocations.count()) { + //The breakpoint requested line should be same as + //actual line + BreakHandler *handler = engine->breakHandler(); + Breakpoint bp = handler->breakpointById(id); + if (bp.state() != BreakpointInserted) { + BreakpointResponse br = bp.response(); + br.lineNumber = breakpointData.value(_("line")).toInt() + 1; + bp.setResponse(br); + bp.notifyBreakpointInsertOk(); + } + } + + + } else { + breakpointsTemp.append(index); + } + + + } else if (debugCommand == _(CLEARBREAKPOINT)) { + // DO NOTHING + + } else if (debugCommand == _(SETEXCEPTIONBREAK)) { + // { "seq" : , + // "type" : "response", + // "request_seq" : , + // "command" : "setexceptionbreak", + // "body" : { "type" : , + // "enabled" : + // } + // "running" : true + // "success" : true + // } + + + } else if (debugCommand == _(FRAME)) { + if (success) + setCurrentFrameDetails(resp.value(_(BODY)), resp.value(_(REFS))); + + } else if (debugCommand == _(SCOPE)) { + if (success) + updateScope(resp.value(_(BODY)), resp.value(_(REFS))); + + } else if (debugCommand == _(SCRIPTS)) { + // { "seq" : , + // "type" : "response", + // "request_seq" : , + // "command" : "scripts", + // "body" : [ { "name" : , + // "id" : + // "lineOffset" : + // "columnOffset" : + // "lineCount" : + // "data" : + // "source" : + // "sourceStart" : + // "sourceLength" : + // "scriptType" :