aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2012-04-16 17:09:27 +0200
committerKai Koehne <kai.koehne@nokia.com>2012-04-17 08:45:08 +0200
commit684b37fece3c3f051d11b6a3c762ee489b6ec8dd (patch)
treedae2036d621d43b020fcc5978df07f0b846824ac
parentc46221ee9a15d5b2d4b31f60f83839873584b1f6 (diff)
QmlJSInspector: Fix whitespace issues
Change-Id: I5dba3ffcad7cdcd45dc6e2e81dce13fc181e27cf Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
-rw-r--r--src/plugins/qmljsinspector/qmljsclientproxy.cpp28
-rw-r--r--src/plugins/qmljsinspector/qmljsclientproxy.h10
-rw-r--r--src/plugins/qmljsinspector/qmljsinspector.cpp8
-rw-r--r--src/plugins/qmljsinspector/qmljsinspectorclient.cpp8
-rw-r--r--src/plugins/qmljsinspector/qmljsinspectorclient.h2
-rw-r--r--src/plugins/qmljsinspector/qmljsinspectorplugin.cpp2
-rw-r--r--src/plugins/qmljsinspector/qmljslivetextpreview.cpp110
-rw-r--r--src/plugins/qmljsinspector/qmljslivetextpreview.h4
-rw-r--r--src/plugins/qmljsinspector/qmljspropertyinspector.cpp40
9 files changed, 106 insertions, 106 deletions
diff --git a/src/plugins/qmljsinspector/qmljsclientproxy.cpp b/src/plugins/qmljsinspector/qmljsclientproxy.cpp
index 9d40cbb8b0..c72ce7b57f 100644
--- a/src/plugins/qmljsinspector/qmljsclientproxy.cpp
+++ b/src/plugins/qmljsinspector/qmljsclientproxy.cpp
@@ -91,23 +91,23 @@ void ClientProxy::connectToServer()
SIGNAL(connectedStatusChanged(QDeclarativeDebugClient::Status)),
this, SLOT(clientStatusChanged(QDeclarativeDebugClient::Status)));
connect(m_inspectorClient, SIGNAL(currentObjectsChanged(QList<int>)),
- SLOT(onCurrentObjectsChanged(QList<int>)));
+ SLOT(onCurrentObjectsChanged(QList<int>)));
connect(m_inspectorClient, SIGNAL(zoomToolActivated()),
- SIGNAL(zoomToolActivated()));
+ SIGNAL(zoomToolActivated()));
connect(m_inspectorClient, SIGNAL(selectToolActivated()),
- SIGNAL(selectToolActivated()));
+ SIGNAL(selectToolActivated()));
connect(m_inspectorClient, SIGNAL(selectMarqueeToolActivated()),
- SIGNAL(selectMarqueeToolActivated()));
+ SIGNAL(selectMarqueeToolActivated()));
connect(m_inspectorClient, SIGNAL(animationSpeedChanged(qreal)),
- SIGNAL(animationSpeedChanged(qreal)));
+ SIGNAL(animationSpeedChanged(qreal)));
connect(m_inspectorClient, SIGNAL(animationPausedChanged(bool)),
- SIGNAL(animationPausedChanged(bool)));
+ SIGNAL(animationPausedChanged(bool)));
connect(m_inspectorClient, SIGNAL(designModeBehaviorChanged(bool)),
- SIGNAL(designModeBehaviorChanged(bool)));
+ SIGNAL(designModeBehaviorChanged(bool)));
connect(m_inspectorClient, SIGNAL(showAppOnTopChanged(bool)),
- SIGNAL(showAppOnTopChanged(bool)));
+ SIGNAL(showAppOnTopChanged(bool)));
connect(m_inspectorClient, SIGNAL(reloaded()), this,
- SIGNAL(serverReloaded()));
+ SIGNAL(serverReloaded()));
connect(m_inspectorClient, SIGNAL(logActivity(QString,QString)),
m_adapter.data(), SLOT(logServiceActivity(QString,QString)));
@@ -337,11 +337,11 @@ ClientProxy::objectReferences(const QmlDebugObjectReference &objectRef) const
}
quint32 ClientProxy::setBindingForObject(int objectDebugId,
- const QString &propertyName,
- const QVariant &value,
- bool isLiteralValue,
- QString source,
- int line)
+ const QString &propertyName,
+ const QVariant &value,
+ bool isLiteralValue,
+ QString source,
+ int line)
{
if (objectDebugId == -1)
return false;
diff --git a/src/plugins/qmljsinspector/qmljsclientproxy.h b/src/plugins/qmljsinspector/qmljsclientproxy.h
index 4154060e25..738732fa9f 100644
--- a/src/plugins/qmljsinspector/qmljsclientproxy.h
+++ b/src/plugins/qmljsinspector/qmljsclientproxy.h
@@ -61,11 +61,11 @@ public:
~ClientProxy();
quint32 setBindingForObject(int objectDebugId,
- const QString &propertyName,
- const QVariant &value,
- bool isLiteralValue,
- QString source,
- int line);
+ const QString &propertyName,
+ const QVariant &value,
+ bool isLiteralValue,
+ QString source,
+ int line);
quint32 setMethodBodyForObject(int objectDebugId, const QString &methodName, const QString &methodBody);
quint32 resetBindingForObject(int objectDebugId, const QString &propertyName);
diff --git a/src/plugins/qmljsinspector/qmljsinspector.cpp b/src/plugins/qmljsinspector/qmljsinspector.cpp
index dcc07ea023..1d3bc22d7d 100644
--- a/src/plugins/qmljsinspector/qmljsinspector.cpp
+++ b/src/plugins/qmljsinspector/qmljsinspector.cpp
@@ -331,7 +331,7 @@ void InspectorUi::connected(ClientProxy *clientProxy)
m_clientProxy = clientProxy;
if (m_clientProxy)
connect(m_clientProxy, SIGNAL(result(quint32,QVariant)),
- SLOT(onResult(quint32,QVariant)));
+ SLOT(onResult(quint32,QVariant)));
using namespace QmlJsDebugClient::Constants;
if (m_clientProxy->qmlDebugger()->objectName() == QML_DEBUGGER &&
m_clientProxy->qmlDebugger()->serviceVersion() >= CURRENT_SUPPORTED_VERSION)
@@ -390,7 +390,7 @@ void InspectorUi::onRootContext(const QVariant &value)
m_clientProxy->fetchRootObjects(
qvariant_cast<QmlDebugContextReference>(
value), true);
- } else {
+ } else {
for (int i = 1; i < m_crumblePath->length(); i++) {
m_updateObjectQueryIds << m_clientProxy->fetchContextObject(
m_crumblePath->dataForIndex(i).toInt());
@@ -413,7 +413,7 @@ void InspectorUi::updateEngineList()
{
QList<QmlDebugEngineReference> engines = m_clientProxy->engines();
-//#warning update the QML engines combo
+ //#warning update the QML engines combo
if (engines.isEmpty())
qWarning("qmldebugger: no engines found!");
@@ -780,7 +780,7 @@ void InspectorUi::gotoObjectReferenceDefinition(const QmlDebugObjectReference &o
TextEditor::ITextEditor *textEditor = qobject_cast<TextEditor::ITextEditor*>(editor);
if (currentEditor != editor)
- m_selectionCallbackExpected = true;
+ m_selectionCallbackExpected = true;
if (textEditor) {
QmlDebugObjectReference ref = objectReferenceForLocation(fileName);
diff --git a/src/plugins/qmljsinspector/qmljsinspectorclient.cpp b/src/plugins/qmljsinspector/qmljsinspectorclient.cpp
index 0b4bc2aaab..6022c58941 100644
--- a/src/plugins/qmljsinspector/qmljsinspectorclient.cpp
+++ b/src/plugins/qmljsinspector/qmljsinspectorclient.cpp
@@ -39,9 +39,9 @@ namespace QmlJSInspector {
namespace Internal {
QmlJSInspectorClient::QmlJSInspectorClient(QDeclarativeDebugConnection *client,
- QObject * /*parent*/)
+ QObject * /*parent*/)
: QDeclarativeDebugClient(QLatin1String("QDeclarativeObserverMode"), client) ,
- m_connection(client)
+ m_connection(client)
{
setObjectName(name());
}
@@ -358,7 +358,7 @@ void QmlJSInspectorClient::showAppOnTop(bool showOnTop)
}
void QmlJSInspectorClient::createQmlObject(const QString &qmlText, int parentDebugId,
- const QStringList &imports, const QString &filename, int order)
+ const QStringList &imports, const QString &filename, int order)
{
if (!m_connection || !m_connection->isConnected())
return;
@@ -431,7 +431,7 @@ void QmlJSInspectorClient::applyChangesFromQmlFile()
}
void QmlJSInspectorClient::log(LogDirection direction, InspectorProtocol::Message message,
- const QString &extra)
+ const QString &extra)
{
QString msg;
if (direction == LogSend)
diff --git a/src/plugins/qmljsinspector/qmljsinspectorclient.h b/src/plugins/qmljsinspector/qmljsinspectorclient.h
index 37420d192c..823088bbfb 100644
--- a/src/plugins/qmljsinspector/qmljsinspectorclient.h
+++ b/src/plugins/qmljsinspector/qmljsinspectorclient.h
@@ -44,7 +44,7 @@ class QmlJSInspectorClient : public QDeclarativeDebugClient
Q_OBJECT
public:
explicit QmlJSInspectorClient(QDeclarativeDebugConnection *client,
- QObject *parent = 0);
+ QObject *parent = 0);
void setCurrentObjects(const QList<int> &debugIds);
void reloadViewer();
diff --git a/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp b/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp
index 9c0f416d9d..2db3cffd4e 100644
--- a/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp
+++ b/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp
@@ -145,7 +145,7 @@ void InspectorPlugin::modeAboutToChange(Core::IMode *newMode)
// Make sure we're not called again.
QObject::disconnect(Core::ModeManager::instance(), SIGNAL(currentModeAboutToChange(Core::IMode*)),
- this, SLOT(modeAboutToChange(Core::IMode*)));
+ this, SLOT(modeAboutToChange(Core::IMode*)));
}
}
diff --git a/src/plugins/qmljsinspector/qmljslivetextpreview.cpp b/src/plugins/qmljsinspector/qmljslivetextpreview.cpp
index 657c860618..9f6f6a096a 100644
--- a/src/plugins/qmljsinspector/qmljslivetextpreview.cpp
+++ b/src/plugins/qmljsinspector/qmljslivetextpreview.cpp
@@ -68,24 +68,24 @@ namespace Internal {
*/
class MapObjectWithDebugReference : public Visitor
{
- public:
- typedef QList<int> DebugIdList;
- MapObjectWithDebugReference() : activated(0) {}
- virtual void endVisit(UiObjectDefinition *ast) ;
- virtual void endVisit(UiObjectBinding *ast) ;
- virtual bool visit(UiObjectDefinition *ast) ;
- virtual bool visit(UiObjectBinding *ast) ;
-
- QHash<QPair<int, int>, DebugIdList> ids;
- QString filename;
- QHash<UiObjectMember *, DebugIdList> result;
- QSet<UiObjectMember *> lookupObjects;
-
- private:
- void process(UiObjectMember *ast);
- void process(UiObjectBinding *ast);
- private:
- int activated;
+public:
+ typedef QList<int> DebugIdList;
+ MapObjectWithDebugReference() : activated(0) {}
+ virtual void endVisit(UiObjectDefinition *ast) ;
+ virtual void endVisit(UiObjectBinding *ast) ;
+ virtual bool visit(UiObjectDefinition *ast) ;
+ virtual bool visit(UiObjectBinding *ast) ;
+
+ QHash<QPair<int, int>, DebugIdList> ids;
+ QString filename;
+ QHash<UiObjectMember *, DebugIdList> result;
+ QSet<UiObjectMember *> lookupObjects;
+
+private:
+ void process(UiObjectMember *ast);
+ void process(UiObjectBinding *ast);
+private:
+ int activated;
};
bool MapObjectWithDebugReference::visit(UiObjectDefinition* ast)
@@ -270,8 +270,8 @@ void QmlJSLiveTextPreview::changeSelectedElements(QList<int> offsets, const QStr
// fallback: use ref under cursor if nothing else is found
if (selectedReferences.isEmpty()
- && !containsReferenceUnderCursor
- && objectRefUnderCursor.debugId() != -1)
+ && !containsReferenceUnderCursor
+ && objectRefUnderCursor.debugId() != -1)
{
selectedReferences << objectRefUnderCursor.debugId();
}
@@ -343,7 +343,7 @@ void QmlJSLiveTextPreview::updateDebugIds()
const QmlJS::Document::Ptr &doc = it.key();
DebugIdHash::const_iterator id_it = clientProxy->debugIdHash().constFind(
- qMakePair<QString, int>(doc->fileName(), doc->editorRevision()));
+ qMakePair<QString, int>(doc->fileName(), doc->editorRevision()));
if (id_it == clientProxy->debugIdHash().constEnd())
continue;
@@ -442,21 +442,21 @@ private:
ExpressionStatement *expStatement = cast<ExpressionStatement*>(scriptBinding->statement);
switch(expStatement->expression->kind) {
- case Node::Kind_NumericLiteral:
- case Node::Kind_UnaryPlusExpression:
- case Node::Kind_UnaryMinusExpression:
- castedExpression = QVariant(cleanedValue).toReal();
- break;
- case Node::Kind_StringLiteral:
- castedExpression = QVariant(cleanedValue).toString();
- break;
- case Node::Kind_TrueLiteral:
- case Node::Kind_FalseLiteral:
- castedExpression = QVariant(cleanedValue).toBool();
- break;
- default:
- castedExpression = cleanedValue;
- break;
+ case Node::Kind_NumericLiteral:
+ case Node::Kind_UnaryPlusExpression:
+ case Node::Kind_UnaryMinusExpression:
+ castedExpression = QVariant(cleanedValue).toReal();
+ break;
+ case Node::Kind_StringLiteral:
+ castedExpression = QVariant(cleanedValue).toString();
+ break;
+ case Node::Kind_TrueLiteral:
+ case Node::Kind_FalseLiteral:
+ castedExpression = QVariant(cleanedValue).toBool();
+ break;
+ default:
+ castedExpression = cleanedValue;
+ break;
}
return castedExpression;
@@ -510,7 +510,7 @@ protected:
}
virtual void createObject(const QString& qmlText, DebugId ref,
- const QStringList& importList, const QString& filename, int order)
+ const QStringList& importList, const QString& filename, int order)
{
appliedChangesToViewer = true;
referenceRefreshRequired = true;
@@ -528,7 +528,7 @@ protected:
if (unsyncronizableChanges == QmlJSLiveTextPreview::NoUnsyncronizableChanges) {
UiObjectDefinition *parentDefinition = cast<UiObjectDefinition *>(parent);
if (parentDefinition && parentDefinition->qualifiedTypeNameId
- && !parentDefinition->qualifiedTypeNameId->name.isEmpty())
+ && !parentDefinition->qualifiedTypeNameId->name.isEmpty())
{
unsyncronizableElementName = parentDefinition->qualifiedTypeNameId->name.toString();
unsyncronizableChanges = QmlJSLiveTextPreview::ElementChangeWarning;
@@ -568,7 +568,7 @@ void QmlJSLiveTextPreview::documentChanged(QmlJS::Document::Ptr doc)
m_docWithUnappliedChanges.clear();
if (doc && m_previousDoc && doc->fileName() == m_previousDoc->fileName()
- && doc->qmlProgram() && m_previousDoc->qmlProgram())
+ && doc->qmlProgram() && m_previousDoc->qmlProgram())
{
UpdateInspector delta(m_clientProxy.data());
m_debugIds = delta(m_previousDoc, doc, m_debugIds);
@@ -602,9 +602,9 @@ void QmlJSLiveTextPreview::showExperimentalWarning()
foreach (QWeakPointer<TextEditor::BaseTextEditorWidget> editor, m_editors)
if (editor) {
Core::InfoBarEntry info(
- Constants::INFO_EXPERIMENTAL,
- tr("You changed a QML file in Live Preview mode, which modifies the running QML application. "
- "In case of unexpected behavior, please reload the QML application."));
+ Constants::INFO_EXPERIMENTAL,
+ tr("You changed a QML file in Live Preview mode, which modifies the running QML application. "
+ "In case of unexpected behavior, please reload the QML application."));
info.setCustomButtonInfo(tr("Disable Live Preview"), this, SLOT(disableLivePreview()));
editor.data()->editorDocument()->infoBar()->addInfo(info);
}
@@ -615,17 +615,17 @@ void QmlJSLiveTextPreview::showSyncWarning(UnsyncronizableChangeType unsyncroniz
{
QString errorMessage;
switch (unsyncronizableChangeType) {
- case AttributeChangeWarning:
- errorMessage = tr("The %1 attribute at line %2, column %3 cannot be changed without reloading the QML application. ")
- .arg(elementName, QString::number(line), QString::number(column));
- break;
- case ElementChangeWarning:
- errorMessage = tr("The %1 element at line %2, column %3 cannot be changed without reloading the QML application. ")
- .arg(elementName, QString::number(line), QString::number(column));
- break;
- case QmlJSLiveTextPreview::NoUnsyncronizableChanges:
- default:
- return;
+ case AttributeChangeWarning:
+ errorMessage = tr("The %1 attribute at line %2, column %3 cannot be changed without reloading the QML application. ")
+ .arg(elementName, QString::number(line), QString::number(column));
+ break;
+ case ElementChangeWarning:
+ errorMessage = tr("The %1 element at line %2, column %3 cannot be changed without reloading the QML application. ")
+ .arg(elementName, QString::number(line), QString::number(column));
+ break;
+ case QmlJSLiveTextPreview::NoUnsyncronizableChanges:
+ default:
+ return;
}
errorMessage.append(tr("You can continue debugging, but behavior can be unexpected."));
@@ -633,7 +633,7 @@ void QmlJSLiveTextPreview::showSyncWarning(UnsyncronizableChangeType unsyncroniz
foreach (QWeakPointer<TextEditor::BaseTextEditorWidget> editor, m_editors)
if (editor)
editor.data()->editorDocument()->infoBar()->addInfo(Core::InfoBarEntry(
- QLatin1String(Constants::INFO_OUT_OF_SYNC), errorMessage));
+ QLatin1String(Constants::INFO_OUT_OF_SYNC), errorMessage));
}
void QmlJSLiveTextPreview::reloadQmlViewer()
@@ -675,7 +675,7 @@ void QmlJSLiveTextPreview::setClientProxy(ClientProxy *clientProxy)
if (m_clientProxy.data()) {
connect(m_clientProxy.data(), SIGNAL(objectTreeUpdated()),
- SLOT(updateDebugIds()));
+ SLOT(updateDebugIds()));
foreach (QWeakPointer<TextEditor::BaseTextEditorWidget> editWidget, m_editors)
if (editWidget)
diff --git a/src/plugins/qmljsinspector/qmljslivetextpreview.h b/src/plugins/qmljsinspector/qmljslivetextpreview.h
index d6a50ffb05..ffae88965a 100644
--- a/src/plugins/qmljsinspector/qmljslivetextpreview.h
+++ b/src/plugins/qmljsinspector/qmljslivetextpreview.h
@@ -44,11 +44,11 @@
QT_FORWARD_DECLARE_CLASS(QTextDocument)
namespace Core {
- class IEditor;
+class IEditor;
}
namespace QmlJS {
- class ModelManagerInterface;
+class ModelManagerInterface;
}
namespace QmlJSInspector {
diff --git a/src/plugins/qmljsinspector/qmljspropertyinspector.cpp b/src/plugins/qmljsinspector/qmljspropertyinspector.cpp
index 86c0e5804f..a53bf55c8b 100644
--- a/src/plugins/qmljsinspector/qmljspropertyinspector.cpp
+++ b/src/plugins/qmljsinspector/qmljspropertyinspector.cpp
@@ -60,7 +60,7 @@ namespace Internal {
class PropertyEditDelegate : public QItemDelegate
{
- public:
+public:
explicit PropertyEditDelegate(QObject *parent=0) : QItemDelegate(parent),
m_treeWidget(dynamic_cast<QmlJSPropertyInspector *>(parent)) {}
@@ -74,24 +74,24 @@ class PropertyEditDelegate : public QItemDelegate
switch (m_treeWidget->getTypeFor(index.row())) {
- case QmlJSPropertyInspector::BooleanType: {
- // invert the bool, skip editor
- int objectId = m_treeWidget->getData(index.row(), PROPERTY_NAME_COLUMN, Qt::UserRole).toInt();
- QString propertyName = m_treeWidget->getData(index.row(), PROPERTY_NAME_COLUMN, Qt::DisplayRole).toString();
- bool propertyValue = m_treeWidget->getData(index.row(), PROPERTY_VALUE_COLUMN, Qt::DisplayRole).toBool();
- m_treeWidget->propertyValueEdited(objectId, propertyName, !propertyValue?"true":"false", true);
- return 0;
- }
+ case QmlJSPropertyInspector::BooleanType: {
+ // invert the bool, skip editor
+ int objectId = m_treeWidget->getData(index.row(), PROPERTY_NAME_COLUMN, Qt::UserRole).toInt();
+ QString propertyName = m_treeWidget->getData(index.row(), PROPERTY_NAME_COLUMN, Qt::DisplayRole).toString();
+ bool propertyValue = m_treeWidget->getData(index.row(), PROPERTY_VALUE_COLUMN, Qt::DisplayRole).toBool();
+ m_treeWidget->propertyValueEdited(objectId, propertyName, !propertyValue?"true":"false", true);
+ return 0;
+ }
- case QmlJSPropertyInspector::NumberType: {
- QLineEdit *editor = new QLineEdit(parent);
- editor->setValidator(new QDoubleValidator(editor));
- return editor;
- }
+ case QmlJSPropertyInspector::NumberType: {
+ QLineEdit *editor = new QLineEdit(parent);
+ editor->setValidator(new QDoubleValidator(editor));
+ return editor;
+ }
default: {
- return new QLineEdit(parent);
- }
+ return new QLineEdit(parent);
+ }
}
return 0;
@@ -257,9 +257,9 @@ QVariant QmlJSPropertyInspectorModel::headerData(int section, Qt::Orientation or
{
if (orient == Qt::Horizontal && role == Qt::DisplayRole) {
switch (section) {
- case PROPERTY_NAME_COLUMN: return tr("Name");
- case PROPERTY_VALUE_COLUMN: return tr("Value");
- case PROPERTY_TYPE_COLUMN: return tr("Type");
+ case PROPERTY_NAME_COLUMN: return tr("Name");
+ case PROPERTY_VALUE_COLUMN: return tr("Value");
+ case PROPERTY_TYPE_COLUMN: return tr("Type");
};
}
return QStandardItemModel::headerData(section, orient, role);
@@ -405,7 +405,7 @@ void QmlJSPropertyInspector::buildPropertyTree(const QmlDebugObjectReference &ob
}
void QmlJSPropertyInspector::addRow(const QString &name,const QString &value, const QString &type,
- const int debugId, bool editable)
+ const int debugId, bool editable)
{
QStandardItem *nameColumn = new QStandardItem(name);
nameColumn->setToolTip(name);