forked from qt-creator/qt-creator
QmlDesigner: rename RewriterError -> DocumentMessage
Change-Id: I8cbb1b8b83ec10c33e416de96a09281208be8773 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
Thomas Hartmann
parent
759db2b7b6
commit
fa84524c0c
@@ -264,18 +264,18 @@ void DebugView::auxiliaryDataChanged(const ModelNode &node, const PropertyName &
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugView::documentMessagesChanged(const QList<RewriterError> &errors, const QList<RewriterError> &warnings)
|
void DebugView::documentMessagesChanged(const QList<DocumentMessage> &errors, const QList<DocumentMessage> &warnings)
|
||||||
{
|
{
|
||||||
if (isDebugViewEnabled()) {
|
if (isDebugViewEnabled()) {
|
||||||
QTextStream message;
|
QTextStream message;
|
||||||
QString string;
|
QString string;
|
||||||
message.setString(&string);
|
message.setString(&string);
|
||||||
|
|
||||||
foreach (const RewriterError &error, errors) {
|
foreach (const DocumentMessage &error, errors) {
|
||||||
message << error.toString();
|
message << error.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const RewriterError &warning, warnings) {
|
foreach (const DocumentMessage &warning, warnings) {
|
||||||
message << warning.toString();
|
message << warning.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -65,7 +65,7 @@ public:
|
|||||||
void propertiesRemoved(const QList<AbstractProperty> &propertyList) override;
|
void propertiesRemoved(const QList<AbstractProperty> &propertyList) override;
|
||||||
|
|
||||||
void auxiliaryDataChanged(const ModelNode &node, const PropertyName &name, const QVariant &data) override;
|
void auxiliaryDataChanged(const ModelNode &node, const PropertyName &name, const QVariant &data) override;
|
||||||
void documentMessagesChanged(const QList<RewriterError> &errors, const QList<RewriterError> &warnings) override;
|
void documentMessagesChanged(const QList<DocumentMessage> &errors, const QList<DocumentMessage> &warnings) override;
|
||||||
|
|
||||||
void rewriterBeginTransaction() override;
|
void rewriterBeginTransaction() override;
|
||||||
void rewriterEndTransaction() override;
|
void rewriterEndTransaction() override;
|
||||||
|
@@ -284,7 +284,7 @@ void FormEditorView::selectedNodesChanged(const QList<ModelNode> &selectedNodeLi
|
|||||||
m_scene->update();
|
m_scene->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorView::documentMessagesChanged(const QList<RewriterError> &errors, const QList<RewriterError> &warnings)
|
void FormEditorView::documentMessagesChanged(const QList<DocumentMessage> &errors, const QList<DocumentMessage> &warnings)
|
||||||
{
|
{
|
||||||
if (!errors.isEmpty())
|
if (!errors.isEmpty())
|
||||||
formEditorWidget()->showErrorMessageBox(errors);
|
formEditorWidget()->showErrorMessageBox(errors);
|
||||||
|
@@ -76,7 +76,7 @@ public:
|
|||||||
void selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
|
void selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
|
||||||
const QList<ModelNode> &lastSelectedNodeList) override;
|
const QList<ModelNode> &lastSelectedNodeList) override;
|
||||||
|
|
||||||
virtual void documentMessagesChanged(const QList<RewriterError> &errors, const QList<RewriterError> &warnings) override;
|
virtual void documentMessagesChanged(const QList<DocumentMessage> &errors, const QList<DocumentMessage> &warnings) override;
|
||||||
|
|
||||||
void customNotification(const AbstractView *view, const QString &identifier, const QList<ModelNode> &nodeList, const QList<QVariant> &data) override;
|
void customNotification(const AbstractView *view, const QString &identifier, const QList<ModelNode> &nodeList, const QList<QVariant> &data) override;
|
||||||
|
|
||||||
|
@@ -252,7 +252,7 @@ void FormEditorWidget::setFocus()
|
|||||||
m_graphicsView->setFocus(Qt::OtherFocusReason);
|
m_graphicsView->setFocus(Qt::OtherFocusReason);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorWidget::showErrorMessageBox(const QList<RewriterError> &errors)
|
void FormEditorWidget::showErrorMessageBox(const QList<DocumentMessage> &errors)
|
||||||
{
|
{
|
||||||
errorWidget()->setErrors(errors);
|
errorWidget()->setErrors(errors);
|
||||||
errorWidget()->setVisible(true);
|
errorWidget()->setVisible(true);
|
||||||
@@ -269,7 +269,7 @@ void FormEditorWidget::hideErrorMessageBox()
|
|||||||
m_toolBox->setDisabled(false);
|
m_toolBox->setDisabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorWidget::showWarningMessageBox(const QList<RewriterError> &warnings)
|
void FormEditorWidget::showWarningMessageBox(const QList<DocumentMessage> &warnings)
|
||||||
{
|
{
|
||||||
if (!errorWidget()->warningsEnabled())
|
if (!errorWidget()->warningsEnabled())
|
||||||
return;
|
return;
|
||||||
|
@@ -74,10 +74,10 @@ public:
|
|||||||
|
|
||||||
void setFocus();
|
void setFocus();
|
||||||
|
|
||||||
void showErrorMessageBox(const QList<RewriterError> &errors);
|
void showErrorMessageBox(const QList<DocumentMessage> &errors);
|
||||||
void hideErrorMessageBox();
|
void hideErrorMessageBox();
|
||||||
|
|
||||||
void showWarningMessageBox(const QList<RewriterError> &warnings);
|
void showWarningMessageBox(const QList<DocumentMessage> &warnings);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void wheelEvent(QWheelEvent *event);
|
void wheelEvent(QWheelEvent *event);
|
||||||
|
@@ -165,7 +165,7 @@ Model* DesignDocument::createInFileComponentModel()
|
|||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<RewriterError> DesignDocument::qmlParseWarnings() const
|
QList<DocumentMessage> DesignDocument::qmlParseWarnings() const
|
||||||
{
|
{
|
||||||
return m_rewriterView->warnings();
|
return m_rewriterView->warnings();
|
||||||
}
|
}
|
||||||
@@ -175,7 +175,7 @@ bool DesignDocument::hasQmlParseWarnings() const
|
|||||||
return !m_rewriterView->warnings().isEmpty();
|
return !m_rewriterView->warnings().isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<RewriterError> DesignDocument::qmlParseErrors() const
|
QList<DocumentMessage> DesignDocument::qmlParseErrors() const
|
||||||
{
|
{
|
||||||
return m_rewriterView->errors();
|
return m_rewriterView->errors();
|
||||||
}
|
}
|
||||||
|
@@ -77,9 +77,9 @@ public:
|
|||||||
Model *documentModel() const;
|
Model *documentModel() const;
|
||||||
|
|
||||||
QString contextHelpId() const;
|
QString contextHelpId() const;
|
||||||
QList<RewriterError> qmlParseWarnings() const;
|
QList<DocumentMessage> qmlParseWarnings() const;
|
||||||
bool hasQmlParseWarnings() const;
|
bool hasQmlParseWarnings() const;
|
||||||
QList<RewriterError> qmlParseErrors() const;
|
QList<DocumentMessage> qmlParseErrors() const;
|
||||||
bool hasQmlParseErrors() const;
|
bool hasQmlParseErrors() const;
|
||||||
|
|
||||||
RewriterView *rewriterView() const;
|
RewriterView *rewriterView() const;
|
||||||
@@ -104,7 +104,7 @@ signals:
|
|||||||
void undoAvailable(bool isAvailable);
|
void undoAvailable(bool isAvailable);
|
||||||
void redoAvailable(bool isAvailable);
|
void redoAvailable(bool isAvailable);
|
||||||
void designDocumentClosed();
|
void designDocumentClosed();
|
||||||
void qmlErrorsChanged(const QList<RewriterError> &errors);
|
void qmlErrorsChanged(const QList<DocumentMessage> &errors);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void deleteSelected();
|
void deleteSelected();
|
||||||
|
@@ -122,12 +122,12 @@ void TextEditorView::customNotification(const AbstractView * /*view*/, const QSt
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEditorView::documentMessagesChanged(const QList<RewriterError> &errors, const QList<RewriterError> &)
|
void TextEditorView::documentMessagesChanged(const QList<DocumentMessage> &errors, const QList<DocumentMessage> &)
|
||||||
{
|
{
|
||||||
if (errors.isEmpty()) {
|
if (errors.isEmpty()) {
|
||||||
m_widget->clearStatusBar();
|
m_widget->clearStatusBar();
|
||||||
} else {
|
} else {
|
||||||
const RewriterError error = errors.first();
|
const DocumentMessage error = errors.first();
|
||||||
m_widget->setStatusText(QString("%1 (Line: %2)").arg(error.description()).arg(error.line()));
|
m_widget->setStatusText(QString("%1 (Line: %2)").arg(error.description()).arg(error.line()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -59,7 +59,7 @@ public:
|
|||||||
void selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
|
void selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
|
||||||
const QList<ModelNode> &lastSelectedNodeList) override;
|
const QList<ModelNode> &lastSelectedNodeList) override;
|
||||||
void customNotification(const AbstractView *view, const QString &identifier, const QList<ModelNode> &nodeList, const QList<QVariant> &data) override;
|
void customNotification(const AbstractView *view, const QString &identifier, const QList<ModelNode> &nodeList, const QList<QVariant> &data) override;
|
||||||
void documentMessagesChanged(const QList<RewriterError> &errors, const QList<RewriterError> &warnings) override;
|
void documentMessagesChanged(const QList<DocumentMessage> &errors, const QList<DocumentMessage> &warnings) override;
|
||||||
|
|
||||||
// TextEditorView
|
// TextEditorView
|
||||||
WidgetInfo widgetInfo() override;
|
WidgetInfo widgetInfo() override;
|
||||||
|
@@ -15,7 +15,7 @@ include (../../../../share/qtcreator/qml/qmlpuppet/types/types.pri)
|
|||||||
|
|
||||||
SOURCES += $$PWD/model/abstractview.cpp \
|
SOURCES += $$PWD/model/abstractview.cpp \
|
||||||
$$PWD/model/rewriterview.cpp \
|
$$PWD/model/rewriterview.cpp \
|
||||||
$$PWD/model/rewritererror.cpp \
|
$$PWD/model/documentmessage.cpp \
|
||||||
$$PWD/metainfo/metainfo.cpp \
|
$$PWD/metainfo/metainfo.cpp \
|
||||||
$$PWD/metainfo/metainforeader.cpp \
|
$$PWD/metainfo/metainforeader.cpp \
|
||||||
$$PWD/metainfo/nodemetainfo.cpp \
|
$$PWD/metainfo/nodemetainfo.cpp \
|
||||||
@@ -84,7 +84,7 @@ HEADERS += $$PWD/include/qmldesignercorelib_global.h \
|
|||||||
$$PWD/include/abstractview.h \
|
$$PWD/include/abstractview.h \
|
||||||
$$PWD/include/nodeinstanceview.h \
|
$$PWD/include/nodeinstanceview.h \
|
||||||
$$PWD/include/rewriterview.h \
|
$$PWD/include/rewriterview.h \
|
||||||
$$PWD/include/rewritererror.h \
|
$$PWD/include/documentmessage.h \
|
||||||
$$PWD/include/metainfo.h \
|
$$PWD/include/metainfo.h \
|
||||||
$$PWD/include/metainforeader.h \
|
$$PWD/include/metainforeader.h \
|
||||||
$$PWD/include/nodemetainfo.h \
|
$$PWD/include/nodemetainfo.h \
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
#include <model.h>
|
#include <model.h>
|
||||||
#include <modelnode.h>
|
#include <modelnode.h>
|
||||||
#include <abstractproperty.h>
|
#include <abstractproperty.h>
|
||||||
#include <rewritererror.h>
|
#include <documentmessage.h>
|
||||||
#include <rewritertransaction.h>
|
#include <rewritertransaction.h>
|
||||||
#include <commondefines.h>
|
#include <commondefines.h>
|
||||||
|
|
||||||
@@ -163,7 +163,7 @@ public:
|
|||||||
|
|
||||||
QList<ModelNode> allModelNodes() const;
|
QList<ModelNode> allModelNodes() const;
|
||||||
|
|
||||||
void emitDocumentMessage(const QList<RewriterError> &errors, const QList<RewriterError> &warnings = QList<RewriterError>());
|
void emitDocumentMessage(const QList<DocumentMessage> &errors, const QList<DocumentMessage> &warnings = QList<DocumentMessage>());
|
||||||
void emitDocumentMessage(const QString &error);
|
void emitDocumentMessage(const QString &error);
|
||||||
void emitCustomNotification(const QString &identifier);
|
void emitCustomNotification(const QString &identifier);
|
||||||
void emitCustomNotification(const QString &identifier, const QList<ModelNode> &nodeList);
|
void emitCustomNotification(const QString &identifier, const QList<ModelNode> &nodeList);
|
||||||
@@ -230,7 +230,7 @@ public:
|
|||||||
|
|
||||||
virtual void scriptFunctionsChanged(const ModelNode &node, const QStringList &scriptFunctionList);
|
virtual void scriptFunctionsChanged(const ModelNode &node, const QStringList &scriptFunctionList);
|
||||||
|
|
||||||
virtual void documentMessagesChanged(const QList<RewriterError> &errors, const QList<RewriterError> &warnings);
|
virtual void documentMessagesChanged(const QList<DocumentMessage> &errors, const QList<DocumentMessage> &warnings);
|
||||||
|
|
||||||
void changeRootNodeType(const TypeName &type, int majorVersion, int minorVersion);
|
void changeRootNodeType(const TypeName &type, int majorVersion, int minorVersion);
|
||||||
|
|
||||||
|
@@ -35,8 +35,8 @@ class DiagnosticMessage;
|
|||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
class RewriterError {
|
class DocumentMessage {
|
||||||
Q_DECLARE_TR_FUNCTIONS(QmlDesigner::RewriterError)
|
Q_DECLARE_TR_FUNCTIONS(QmlDesigner::DocumentMessage)
|
||||||
public:
|
public:
|
||||||
enum Type {
|
enum Type {
|
||||||
NoError = 0,
|
NoError = 0,
|
||||||
@@ -45,10 +45,10 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RewriterError();
|
DocumentMessage();
|
||||||
RewriterError(const QmlJS::DiagnosticMessage &qmlError, const QUrl &document);
|
DocumentMessage(const QmlJS::DiagnosticMessage &qmlError, const QUrl &document);
|
||||||
RewriterError(const QString &shortDescription);
|
DocumentMessage(const QString &shortDescription);
|
||||||
RewriterError(Exception *exception);
|
DocumentMessage(Exception *exception);
|
||||||
|
|
||||||
Type type() const
|
Type type() const
|
||||||
{ return m_type; }
|
{ return m_type; }
|
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include <qmldesignercorelib_global.h>
|
#include <qmldesignercorelib_global.h>
|
||||||
|
|
||||||
#include <rewritererror.h>
|
#include <documentmessage.h>
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QPair>
|
#include <QPair>
|
||||||
@@ -111,7 +111,7 @@ public:
|
|||||||
|
|
||||||
TextModifier *textModifier() const;
|
TextModifier *textModifier() const;
|
||||||
void setTextModifier(TextModifier *textModifier);
|
void setTextModifier(TextModifier *textModifier);
|
||||||
void setDocumentMessages(const QList<RewriterError> &errors, const QList<RewriterError> &warnings);
|
void setDocumentMessages(const QList<DocumentMessage> &errors, const QList<DocumentMessage> &warnings);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Model();
|
Model();
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
#include "qmldesignercorelib_global.h"
|
#include "qmldesignercorelib_global.h"
|
||||||
#include "exception.h"
|
#include "exception.h"
|
||||||
#include "abstractview.h"
|
#include "abstractview.h"
|
||||||
#include "rewritererror.h"
|
#include "documentmessage.h"
|
||||||
|
|
||||||
#include <QScopedPointer>
|
#include <QScopedPointer>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
@@ -111,12 +111,12 @@ public:
|
|||||||
|
|
||||||
Internal::ModelNodePositionStorage *positionStorage() const;
|
Internal::ModelNodePositionStorage *positionStorage() const;
|
||||||
|
|
||||||
QList<RewriterError> warnings() const;
|
QList<DocumentMessage> warnings() const;
|
||||||
QList<RewriterError> errors() const;
|
QList<DocumentMessage> errors() const;
|
||||||
void clearErrorAndWarnings();
|
void clearErrorAndWarnings();
|
||||||
void setErrors(const QList<RewriterError> &errors);
|
void setErrors(const QList<DocumentMessage> &errors);
|
||||||
void setWarnings(const QList<RewriterError> &warnings);
|
void setWarnings(const QList<DocumentMessage> &warnings);
|
||||||
void addError(const RewriterError &error);
|
void addError(const DocumentMessage &error);
|
||||||
|
|
||||||
void enterErrorState(const QString &errorMessage);
|
void enterErrorState(const QString &errorMessage);
|
||||||
bool inErrorState() const { return !m_rewritingErrorMessage.isEmpty(); }
|
bool inErrorState() const { return !m_rewritingErrorMessage.isEmpty(); }
|
||||||
@@ -173,7 +173,7 @@ protected: // functions
|
|||||||
void applyModificationGroupChanges();
|
void applyModificationGroupChanges();
|
||||||
void applyChanges();
|
void applyChanges();
|
||||||
void amendQmlText();
|
void amendQmlText();
|
||||||
void notifyErrorsAndWarnings(const QList<RewriterError> &errors);
|
void notifyErrorsAndWarnings(const QList<DocumentMessage> &errors);
|
||||||
|
|
||||||
private: //variables
|
private: //variables
|
||||||
TextModifier *m_textModifier = nullptr;
|
TextModifier *m_textModifier = nullptr;
|
||||||
@@ -185,8 +185,8 @@ private: //variables
|
|||||||
QScopedPointer<Internal::ModelNodePositionStorage> m_positionStorage;
|
QScopedPointer<Internal::ModelNodePositionStorage> m_positionStorage;
|
||||||
QScopedPointer<Internal::ModelToTextMerger> m_modelToTextMerger;
|
QScopedPointer<Internal::ModelToTextMerger> m_modelToTextMerger;
|
||||||
QScopedPointer<Internal::TextToModelMerger> m_textToModelMerger;
|
QScopedPointer<Internal::TextToModelMerger> m_textToModelMerger;
|
||||||
QList<RewriterError> m_errors;
|
QList<DocumentMessage> m_errors;
|
||||||
QList<RewriterError> m_warnings;
|
QList<DocumentMessage> m_warnings;
|
||||||
RewriterTransaction m_removeDefaultPropertyTransaction;
|
RewriterTransaction m_removeDefaultPropertyTransaction;
|
||||||
QString m_rewritingErrorMessage;
|
QString m_rewritingErrorMessage;
|
||||||
QString m_lastCorrectQmlSource;
|
QString m_lastCorrectQmlSource;
|
||||||
|
@@ -1269,7 +1269,7 @@ void NodeInstanceView::token(const TokenCommand &command)
|
|||||||
|
|
||||||
void NodeInstanceView::debugOutput(const DebugOutputCommand & command)
|
void NodeInstanceView::debugOutput(const DebugOutputCommand & command)
|
||||||
{
|
{
|
||||||
RewriterError error(tr("Qt Quick emulation layer crashed."));
|
DocumentMessage error(tr("Qt Quick emulation layer crashed."));
|
||||||
if (command.instanceIds().isEmpty()) {
|
if (command.instanceIds().isEmpty()) {
|
||||||
emitDocumentMessage(command.text());
|
emitDocumentMessage(command.text());
|
||||||
} else {
|
} else {
|
||||||
|
@@ -348,7 +348,7 @@ void AbstractView::scriptFunctionsChanged(const ModelNode &/*node*/, const QStri
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractView::documentMessagesChanged(const QList<RewriterError> &/*errors*/, const QList<RewriterError> &/*warnings*/)
|
void AbstractView::documentMessagesChanged(const QList<DocumentMessage> &/*errors*/, const QList<DocumentMessage> &/*warnings*/)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -577,10 +577,10 @@ QList<ModelNode> AbstractView::allModelNodes() const
|
|||||||
|
|
||||||
void AbstractView::emitDocumentMessage(const QString &error)
|
void AbstractView::emitDocumentMessage(const QString &error)
|
||||||
{
|
{
|
||||||
emitDocumentMessage( { RewriterError(error) } );
|
emitDocumentMessage( { DocumentMessage(error) } );
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractView::emitDocumentMessage(const QList<RewriterError> &errors, const QList<RewriterError> &warnings)
|
void AbstractView::emitDocumentMessage(const QList<DocumentMessage> &errors, const QList<DocumentMessage> &warnings)
|
||||||
{
|
{
|
||||||
model()->d->setDocumentMessages(errors, warnings);
|
model()->d->setDocumentMessages(errors, warnings);
|
||||||
}
|
}
|
||||||
|
@@ -23,20 +23,20 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <rewritererror.h>
|
#include <documentmessage.h>
|
||||||
|
|
||||||
#include <qmljs/parser/qmljsengine_p.h>
|
#include <qmljs/parser/qmljsengine_p.h>
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
RewriterError::RewriterError():
|
DocumentMessage::DocumentMessage():
|
||||||
m_type(NoError),
|
m_type(NoError),
|
||||||
m_line(-1),
|
m_line(-1),
|
||||||
m_column(-1)
|
m_column(-1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
RewriterError::RewriterError(Exception *exception):
|
DocumentMessage::DocumentMessage(Exception *exception):
|
||||||
m_type(InternalError),
|
m_type(InternalError),
|
||||||
m_line(exception->line()),
|
m_line(exception->line()),
|
||||||
m_column(-1),
|
m_column(-1),
|
||||||
@@ -45,7 +45,7 @@ RewriterError::RewriterError(Exception *exception):
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
RewriterError::RewriterError(const QmlJS::DiagnosticMessage &qmlError, const QUrl &document):
|
DocumentMessage::DocumentMessage(const QmlJS::DiagnosticMessage &qmlError, const QUrl &document):
|
||||||
m_type(ParseError),
|
m_type(ParseError),
|
||||||
m_line(qmlError.loc.startLine),
|
m_line(qmlError.loc.startLine),
|
||||||
m_column(qmlError.loc.startColumn),
|
m_column(qmlError.loc.startColumn),
|
||||||
@@ -54,7 +54,7 @@ RewriterError::RewriterError(const QmlJS::DiagnosticMessage &qmlError, const QUr
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
RewriterError::RewriterError(const QString &shortDescription) :
|
DocumentMessage::DocumentMessage(const QString &shortDescription) :
|
||||||
m_type(ParseError),
|
m_type(ParseError),
|
||||||
m_line(1),
|
m_line(1),
|
||||||
m_column(0),
|
m_column(0),
|
||||||
@@ -64,7 +64,7 @@ RewriterError::RewriterError(const QString &shortDescription) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString RewriterError::toString() const
|
QString DocumentMessage::toString() const
|
||||||
{
|
{
|
||||||
QString str;
|
QString str;
|
||||||
|
|
@@ -174,7 +174,7 @@ QUrl ModelPrivate::fileUrl() const
|
|||||||
return m_fileUrl;
|
return m_fileUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelPrivate::setDocumentMessages(const QList<RewriterError> &errors, const QList<RewriterError> &warnings)
|
void ModelPrivate::setDocumentMessages(const QList<DocumentMessage> &errors, const QList<DocumentMessage> &warnings)
|
||||||
{
|
{
|
||||||
foreach (const QPointer<AbstractView> &view, m_viewList)
|
foreach (const QPointer<AbstractView> &view, m_viewList)
|
||||||
view->documentMessagesChanged(errors, warnings);
|
view->documentMessagesChanged(errors, warnings);
|
||||||
@@ -1948,7 +1948,7 @@ void Model::setTextModifier(TextModifier *textModifier)
|
|||||||
d->m_textModifier = textModifier;
|
d->m_textModifier = textModifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Model::setDocumentMessages(const QList<RewriterError> &errors, const QList<RewriterError> &warnings)
|
void Model::setDocumentMessages(const QList<DocumentMessage> &errors, const QList<DocumentMessage> &warnings)
|
||||||
{
|
{
|
||||||
d->setDocumentMessages(errors, warnings);
|
d->setDocumentMessages(errors, warnings);
|
||||||
}
|
}
|
||||||
|
@@ -158,7 +158,7 @@ public:
|
|||||||
|
|
||||||
void notifyCurrentStateChanged(const ModelNode &node);
|
void notifyCurrentStateChanged(const ModelNode &node);
|
||||||
|
|
||||||
void setDocumentMessages(const QList<RewriterError> &errors, const QList<RewriterError> &warnings);
|
void setDocumentMessages(const QList<DocumentMessage> &errors, const QList<DocumentMessage> &warnings);
|
||||||
|
|
||||||
void notifyRewriterBeginTransaction();
|
void notifyRewriterBeginTransaction();
|
||||||
void notifyRewriterEndTransaction();
|
void notifyRewriterEndTransaction();
|
||||||
|
@@ -428,7 +428,7 @@ void RewriterView::amendQmlText()
|
|||||||
emitCustomNotification(EndRewriterAmend);
|
emitCustomNotification(EndRewriterAmend);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RewriterView::notifyErrorsAndWarnings(const QList<RewriterError> &errors)
|
void RewriterView::notifyErrorsAndWarnings(const QList<DocumentMessage> &errors)
|
||||||
{
|
{
|
||||||
if (m_setWidgetStatusCallback)
|
if (m_setWidgetStatusCallback)
|
||||||
m_setWidgetStatusCallback(errors.isEmpty());
|
m_setWidgetStatusCallback(errors.isEmpty());
|
||||||
@@ -441,12 +441,12 @@ Internal::ModelNodePositionStorage *RewriterView::positionStorage() const
|
|||||||
return m_positionStorage.data();
|
return m_positionStorage.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<RewriterError> RewriterView::warnings() const
|
QList<DocumentMessage> RewriterView::warnings() const
|
||||||
{
|
{
|
||||||
return m_warnings;
|
return m_warnings;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<RewriterError> RewriterView::errors() const
|
QList<DocumentMessage> RewriterView::errors() const
|
||||||
{
|
{
|
||||||
return m_errors;
|
return m_errors;
|
||||||
}
|
}
|
||||||
@@ -458,19 +458,19 @@ void RewriterView::clearErrorAndWarnings()
|
|||||||
notifyErrorsAndWarnings(m_errors);
|
notifyErrorsAndWarnings(m_errors);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RewriterView::setWarnings(const QList<RewriterError> &warnings)
|
void RewriterView::setWarnings(const QList<DocumentMessage> &warnings)
|
||||||
{
|
{
|
||||||
m_warnings = warnings;
|
m_warnings = warnings;
|
||||||
notifyErrorsAndWarnings(m_errors);
|
notifyErrorsAndWarnings(m_errors);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RewriterView::setErrors(const QList<RewriterError> &errors)
|
void RewriterView::setErrors(const QList<DocumentMessage> &errors)
|
||||||
{
|
{
|
||||||
m_errors = errors;
|
m_errors = errors;
|
||||||
notifyErrorsAndWarnings(m_errors);
|
notifyErrorsAndWarnings(m_errors);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RewriterView::addError(const RewriterError &error)
|
void RewriterView::addError(const DocumentMessage &error)
|
||||||
{
|
{
|
||||||
m_errors.append(error);
|
m_errors.append(error);
|
||||||
notifyErrorsAndWarnings(m_errors);
|
notifyErrorsAndWarnings(m_errors);
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include "texttomodelmerger.h"
|
#include "texttomodelmerger.h"
|
||||||
|
|
||||||
#include "rewritererror.h"
|
#include "documentmessage.h"
|
||||||
#include "modelnodepositionstorage.h"
|
#include "modelnodepositionstorage.h"
|
||||||
#include "abstractproperty.h"
|
#include "abstractproperty.h"
|
||||||
#include "bindingproperty.h"
|
#include "bindingproperty.h"
|
||||||
@@ -886,7 +886,7 @@ void TextToModelMerger::setupUsedImports()
|
|||||||
m_rewriterView->model()->setUsedImports(usedImports);
|
m_rewriterView->model()->setUsedImports(usedImports);
|
||||||
}
|
}
|
||||||
|
|
||||||
Document::MutablePtr TextToModelMerger::createParsedDocument(const QUrl &url, const QString &data, QList<RewriterError> *errors)
|
Document::MutablePtr TextToModelMerger::createParsedDocument(const QUrl &url, const QString &data, QList<DocumentMessage> *errors)
|
||||||
{
|
{
|
||||||
const QString fileName = url.toLocalFile();
|
const QString fileName = url.toLocalFile();
|
||||||
|
|
||||||
@@ -902,7 +902,7 @@ Document::MutablePtr TextToModelMerger::createParsedDocument(const QUrl &url, co
|
|||||||
if (!doc->isParsedCorrectly()) {
|
if (!doc->isParsedCorrectly()) {
|
||||||
if (errors) {
|
if (errors) {
|
||||||
foreach (const QmlJS::DiagnosticMessage &message, doc->diagnosticMessages())
|
foreach (const QmlJS::DiagnosticMessage &message, doc->diagnosticMessages())
|
||||||
errors->append(RewriterError(message, QUrl::fromLocalFile(doc->fileName())));
|
errors->append(DocumentMessage(message, QUrl::fromLocalFile(doc->fileName())));
|
||||||
}
|
}
|
||||||
return Document::MutablePtr();
|
return Document::MutablePtr();
|
||||||
}
|
}
|
||||||
@@ -930,8 +930,8 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH
|
|||||||
try {
|
try {
|
||||||
Snapshot snapshot = m_rewriterView->textModifier()->qmljsSnapshot();
|
Snapshot snapshot = m_rewriterView->textModifier()->qmljsSnapshot();
|
||||||
|
|
||||||
QList<RewriterError> errors;
|
QList<DocumentMessage> errors;
|
||||||
QList<RewriterError> warnings;
|
QList<DocumentMessage> warnings;
|
||||||
if (Document::MutablePtr doc = createParsedDocument(url, data, &errors)) {
|
if (Document::MutablePtr doc = createParsedDocument(url, data, &errors)) {
|
||||||
snapshot.insert(doc);
|
snapshot.insert(doc);
|
||||||
m_document = doc;
|
m_document = doc;
|
||||||
@@ -981,7 +981,7 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH
|
|||||||
setActive(false);
|
setActive(false);
|
||||||
return true;
|
return true;
|
||||||
} catch (Exception &e) {
|
} catch (Exception &e) {
|
||||||
RewriterError error(&e);
|
DocumentMessage error(&e);
|
||||||
// Somehow, the error below gets eaten in upper levels, so printing the
|
// Somehow, the error below gets eaten in upper levels, so printing the
|
||||||
// exception info here for debugging purposes:
|
// exception info here for debugging purposes:
|
||||||
qDebug() << "*** An exception occurred while reading the QML file:"
|
qDebug() << "*** An exception occurred while reading the QML file:"
|
||||||
@@ -1947,18 +1947,18 @@ void TextToModelMerger::setupComponent(const ModelNode &node)
|
|||||||
ModelNode(node).setNodeSource(result);
|
ModelNode(node).setNodeSource(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextToModelMerger::collectLinkErrors(QList<RewriterError> *errors, const ReadingContext &ctxt)
|
void TextToModelMerger::collectLinkErrors(QList<DocumentMessage> *errors, const ReadingContext &ctxt)
|
||||||
{
|
{
|
||||||
foreach (const QmlJS::DiagnosticMessage &diagnosticMessage, ctxt.diagnosticLinkMessages()) {
|
foreach (const QmlJS::DiagnosticMessage &diagnosticMessage, ctxt.diagnosticLinkMessages()) {
|
||||||
errors->append(RewriterError(diagnosticMessage, QUrl::fromLocalFile(m_document->fileName())));
|
errors->append(DocumentMessage(diagnosticMessage, QUrl::fromLocalFile(m_document->fileName())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextToModelMerger::collectImportErrors(QList<RewriterError> *errors)
|
void TextToModelMerger::collectImportErrors(QList<DocumentMessage> *errors)
|
||||||
{
|
{
|
||||||
if (m_rewriterView->model()->imports().isEmpty()) {
|
if (m_rewriterView->model()->imports().isEmpty()) {
|
||||||
const QmlJS::DiagnosticMessage diagnosticMessage(QmlJS::Severity::Error, AST::SourceLocation(0, 0, 0, 0), QCoreApplication::translate("QmlDesigner::TextToModelMerger", "No import statements found"));
|
const QmlJS::DiagnosticMessage diagnosticMessage(QmlJS::Severity::Error, AST::SourceLocation(0, 0, 0, 0), QCoreApplication::translate("QmlDesigner::TextToModelMerger", "No import statements found"));
|
||||||
errors->append(RewriterError(diagnosticMessage, QUrl::fromLocalFile(m_document->fileName())));
|
errors->append(DocumentMessage(diagnosticMessage, QUrl::fromLocalFile(m_document->fileName())));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasQtQuick = false;
|
bool hasQtQuick = false;
|
||||||
@@ -1970,16 +1970,16 @@ void TextToModelMerger::collectImportErrors(QList<RewriterError> *errors)
|
|||||||
} else {
|
} else {
|
||||||
const QmlJS::DiagnosticMessage diagnosticMessage(QmlJS::Severity::Error, AST::SourceLocation(0, 0, 0, 0),
|
const QmlJS::DiagnosticMessage diagnosticMessage(QmlJS::Severity::Error, AST::SourceLocation(0, 0, 0, 0),
|
||||||
QCoreApplication::translate("QmlDesigner::TextToModelMerger", "Unsupported QtQuick version"));
|
QCoreApplication::translate("QmlDesigner::TextToModelMerger", "Unsupported QtQuick version"));
|
||||||
errors->append(RewriterError(diagnosticMessage, QUrl::fromLocalFile(m_document->fileName())));
|
errors->append(DocumentMessage(diagnosticMessage, QUrl::fromLocalFile(m_document->fileName())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hasQtQuick)
|
if (!hasQtQuick)
|
||||||
errors->append(RewriterError(QCoreApplication::translate("QmlDesigner::TextToModelMerger", "No import for Qt Quick found.")));
|
errors->append(DocumentMessage(QCoreApplication::translate("QmlDesigner::TextToModelMerger", "No import for Qt Quick found.")));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextToModelMerger::collectSemanticErrorsAndWarnings(QList<RewriterError> *errors, QList<RewriterError> *warnings)
|
void TextToModelMerger::collectSemanticErrorsAndWarnings(QList<DocumentMessage> *errors, QList<DocumentMessage> *warnings)
|
||||||
{
|
{
|
||||||
Check check(m_document, m_scopeChain->context());
|
Check check(m_document, m_scopeChain->context());
|
||||||
check.disableMessage(StaticAnalysis::ErrPrototypeCycle);
|
check.disableMessage(StaticAnalysis::ErrPrototypeCycle);
|
||||||
@@ -2000,15 +2000,15 @@ void TextToModelMerger::collectSemanticErrorsAndWarnings(QList<RewriterError> *e
|
|||||||
foreach (const StaticAnalysis::Message &message, check()) {
|
foreach (const StaticAnalysis::Message &message, check()) {
|
||||||
if (message.severity == Severity::Error) {
|
if (message.severity == Severity::Error) {
|
||||||
if (message.type == StaticAnalysis::ErrUnknownComponent)
|
if (message.type == StaticAnalysis::ErrUnknownComponent)
|
||||||
warnings->append(RewriterError(message.toDiagnosticMessage(), fileNameUrl));
|
warnings->append(DocumentMessage(message.toDiagnosticMessage(), fileNameUrl));
|
||||||
else
|
else
|
||||||
errors->append(RewriterError(message.toDiagnosticMessage(), fileNameUrl));
|
errors->append(DocumentMessage(message.toDiagnosticMessage(), fileNameUrl));
|
||||||
}
|
}
|
||||||
if (message.severity == Severity::Warning) {
|
if (message.severity == Severity::Warning) {
|
||||||
if (message.type == StaticAnalysis::WarnAboutQtQuick1InsteadQtQuick2)
|
if (message.type == StaticAnalysis::WarnAboutQtQuick1InsteadQtQuick2)
|
||||||
errors->append(RewriterError(message.toDiagnosticMessage(), fileNameUrl));
|
errors->append(DocumentMessage(message.toDiagnosticMessage(), fileNameUrl));
|
||||||
else
|
else
|
||||||
warnings->append(RewriterError(message.toDiagnosticMessage(), fileNameUrl));
|
warnings->append(DocumentMessage(message.toDiagnosticMessage(), fileNameUrl));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
class RewriterView;
|
class RewriterView;
|
||||||
class RewriterError;
|
class DocumentMessage;
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ class TextToModelMerger
|
|||||||
TextToModelMerger &operator=(const TextToModelMerger&);
|
TextToModelMerger &operator=(const TextToModelMerger&);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static QmlJS::Document::MutablePtr createParsedDocument(const QUrl &url, const QString &data, QList<RewriterError> *errors);
|
static QmlJS::Document::MutablePtr createParsedDocument(const QUrl &url, const QString &data, QList<DocumentMessage> *errors);
|
||||||
|
|
||||||
TextToModelMerger(RewriterView *reWriterView);
|
TextToModelMerger(RewriterView *reWriterView);
|
||||||
bool isActive() const;
|
bool isActive() const;
|
||||||
@@ -136,10 +136,10 @@ public:
|
|||||||
private:
|
private:
|
||||||
void setupCustomParserNode(const ModelNode &node);
|
void setupCustomParserNode(const ModelNode &node);
|
||||||
void setupComponent(const ModelNode &node);
|
void setupComponent(const ModelNode &node);
|
||||||
void collectLinkErrors(QList<RewriterError> *errors, const ReadingContext &ctxt);
|
void collectLinkErrors(QList<DocumentMessage> *errors, const ReadingContext &ctxt);
|
||||||
void collectImportErrors(QList<RewriterError> *errors);
|
void collectImportErrors(QList<DocumentMessage> *errors);
|
||||||
void collectSemanticErrorsAndWarnings(QList<RewriterError> *errors,
|
void collectSemanticErrorsAndWarnings(QList<DocumentMessage> *errors,
|
||||||
QList<RewriterError> *warnings);
|
QList<DocumentMessage> *warnings);
|
||||||
void populateQrcMapping(const QString &filePath);
|
void populateQrcMapping(const QString &filePath);
|
||||||
|
|
||||||
static QString textAt(const QmlJS::Document::Ptr &doc,
|
static QString textAt(const QmlJS::Document::Ptr &doc,
|
||||||
|
@@ -232,7 +232,7 @@ void DesignModeWidget::showTextEdit()
|
|||||||
m_centralTabWidget->setCurrentIndex(m_centralTabWidget->currentIndex() == 0 ? 1 : 0);
|
m_centralTabWidget->setCurrentIndex(m_centralTabWidget->currentIndex() == 0 ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DesignModeWidget::showWarningMessageBox(const QList<RewriterError> &warnings)
|
void DesignModeWidget::showWarningMessageBox(const QList<DocumentMessage> &warnings)
|
||||||
{
|
{
|
||||||
Q_ASSERT(!warnings.isEmpty());
|
Q_ASSERT(!warnings.isEmpty());
|
||||||
warningWidget()->setWarnings(warnings);
|
warningWidget()->setWarnings(warnings);
|
||||||
|
@@ -81,7 +81,7 @@ public:
|
|||||||
void disableWidgets();
|
void disableWidgets();
|
||||||
void showTextEdit();
|
void showTextEdit();
|
||||||
|
|
||||||
void showWarningMessageBox(const QList<RewriterError> &warnings);
|
void showWarningMessageBox(const QList<DocumentMessage> &warnings);
|
||||||
bool gotoCodeWasClicked();
|
bool gotoCodeWasClicked();
|
||||||
|
|
||||||
CrumbleBar* crumbleBar() const;
|
CrumbleBar* crumbleBar() const;
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
static QString errorToString(const RewriterError &error)
|
static QString errorToString(const DocumentMessage &error)
|
||||||
{
|
{
|
||||||
return QString("Line: %1: %2").arg(error.line()).arg(error.description());
|
return QString("Line: %1: %2").arg(error.line()).arg(error.description());
|
||||||
}
|
}
|
||||||
@@ -125,8 +125,8 @@ void DocumentWarningWidget::refreshContent()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString messageString;
|
QString messageString;
|
||||||
RewriterError message = m_messages.at(m_currentMessage);
|
DocumentMessage message = m_messages.at(m_currentMessage);
|
||||||
if (message.type() == RewriterError::ParseError) {
|
if (message.type() == DocumentMessage::ParseError) {
|
||||||
messageString += errorToString(message);
|
messageString += errorToString(message);
|
||||||
m_navigateLabel->setText(generateNavigateLinks());
|
m_navigateLabel->setText(generateNavigateLinks());
|
||||||
m_navigateLabel->show();
|
m_navigateLabel->show();
|
||||||
@@ -190,7 +190,7 @@ bool DocumentWarningWidget::gotoCodeWasClicked()
|
|||||||
return m_gotoCodeWasClicked;
|
return m_gotoCodeWasClicked;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DocumentWarningWidget::emitGotoCodeClicked(const RewriterError &message)
|
void DocumentWarningWidget::emitGotoCodeClicked(const DocumentMessage &message)
|
||||||
{
|
{
|
||||||
m_gotoCodeWasClicked = true;
|
m_gotoCodeWasClicked = true;
|
||||||
emit gotoCodeClicked(message.url().toLocalFile(), message.line(), message.column() - 1);
|
emit gotoCodeClicked(message.url().toLocalFile(), message.line(), message.column() - 1);
|
||||||
@@ -209,21 +209,21 @@ void DocumentWarningWidget::ignoreCheckBoxToggled(bool b)
|
|||||||
QmlDesignerPlugin::instance()->setSettings(settings);
|
QmlDesignerPlugin::instance()->setSettings(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DocumentWarningWidget::setErrors(const QList<RewriterError> &errors)
|
void DocumentWarningWidget::setErrors(const QList<DocumentMessage> &errors)
|
||||||
{
|
{
|
||||||
Q_ASSERT(!errors.empty());
|
Q_ASSERT(!errors.empty());
|
||||||
m_mode = ErrorMode;
|
m_mode = ErrorMode;
|
||||||
setMessages(errors);
|
setMessages(errors);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DocumentWarningWidget::setWarnings(const QList<RewriterError> &warnings)
|
void DocumentWarningWidget::setWarnings(const QList<DocumentMessage> &warnings)
|
||||||
{
|
{
|
||||||
Q_ASSERT(!warnings.empty());
|
Q_ASSERT(!warnings.empty());
|
||||||
m_mode = WarningMode;
|
m_mode = WarningMode;
|
||||||
setMessages(warnings);
|
setMessages(warnings);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DocumentWarningWidget::setMessages(const QList<RewriterError> &messages)
|
void DocumentWarningWidget::setMessages(const QList<DocumentMessage> &messages)
|
||||||
{
|
{
|
||||||
m_messages.clear();
|
m_messages.clear();
|
||||||
m_messages = messages;
|
m_messages = messages;
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <utils/faketooltip.h>
|
#include <utils/faketooltip.h>
|
||||||
#include <rewritererror.h>
|
#include <documentmessage.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QLabel;
|
class QLabel;
|
||||||
@@ -49,19 +49,19 @@ class DocumentWarningWidget : public Utils::FakeToolTip
|
|||||||
public:
|
public:
|
||||||
explicit DocumentWarningWidget(QWidget *parent);
|
explicit DocumentWarningWidget(QWidget *parent);
|
||||||
|
|
||||||
void setErrors(const QList<RewriterError> &errors);
|
void setErrors(const QList<DocumentMessage> &errors);
|
||||||
void setWarnings(const QList<RewriterError> &warnings);
|
void setWarnings(const QList<DocumentMessage> &warnings);
|
||||||
|
|
||||||
bool warningsEnabled() const;
|
bool warningsEnabled() const;
|
||||||
bool gotoCodeWasClicked();
|
bool gotoCodeWasClicked();
|
||||||
void emitGotoCodeClicked(const RewriterError &message);
|
void emitGotoCodeClicked(const DocumentMessage &message);
|
||||||
signals:
|
signals:
|
||||||
void gotoCodeClicked(const QString filePath, int codeLine, int codeColumn);
|
void gotoCodeClicked(const QString filePath, int codeLine, int codeColumn);
|
||||||
protected:
|
protected:
|
||||||
bool eventFilter(QObject *object, QEvent *event) override;
|
bool eventFilter(QObject *object, QEvent *event) override;
|
||||||
void showEvent(QShowEvent *event) override;
|
void showEvent(QShowEvent *event) override;
|
||||||
private:
|
private:
|
||||||
void setMessages(const QList<RewriterError> &messages);
|
void setMessages(const QList<DocumentMessage> &messages);
|
||||||
void moveToParentCenter();
|
void moveToParentCenter();
|
||||||
void refreshContent();
|
void refreshContent();
|
||||||
QString generateNavigateLinks();
|
QString generateNavigateLinks();
|
||||||
@@ -72,7 +72,7 @@ private:
|
|||||||
QLabel *m_navigateLabel;
|
QLabel *m_navigateLabel;
|
||||||
QCheckBox *m_ignoreWarningsCheckBox;
|
QCheckBox *m_ignoreWarningsCheckBox;
|
||||||
QPushButton *m_continueButton;
|
QPushButton *m_continueButton;
|
||||||
QList<RewriterError> m_messages;
|
QList<DocumentMessage> m_messages;
|
||||||
int m_currentMessage = 0;
|
int m_currentMessage = 0;
|
||||||
Mode m_mode = NoMode;
|
Mode m_mode = NoMode;
|
||||||
bool m_gotoCodeWasClicked = false;
|
bool m_gotoCodeWasClicked = false;
|
||||||
|
@@ -272,7 +272,7 @@ Project {
|
|||||||
"include/qmlobjectnode.h",
|
"include/qmlobjectnode.h",
|
||||||
"include/qmlstate.h",
|
"include/qmlstate.h",
|
||||||
"include/removebasestateexception.h",
|
"include/removebasestateexception.h",
|
||||||
"include/rewritererror.h",
|
"include/documentmessage.h",
|
||||||
"include/rewriterview.h",
|
"include/rewriterview.h",
|
||||||
"include/rewritingexception.h",
|
"include/rewritingexception.h",
|
||||||
"include/signalhandlerproperty.h",
|
"include/signalhandlerproperty.h",
|
||||||
@@ -349,7 +349,7 @@ Project {
|
|||||||
"model/rewriteaction.h",
|
"model/rewriteaction.h",
|
||||||
"model/rewriteactioncompressor.cpp",
|
"model/rewriteactioncompressor.cpp",
|
||||||
"model/rewriteactioncompressor.h",
|
"model/rewriteactioncompressor.h",
|
||||||
"model/rewritererror.cpp",
|
"model/documentmessage.cpp",
|
||||||
"model/rewriterview.cpp",
|
"model/rewriterview.cpp",
|
||||||
"model/signalhandlerproperty.cpp",
|
"model/signalhandlerproperty.cpp",
|
||||||
"model/textmodifier.cpp",
|
"model/textmodifier.cpp",
|
||||||
|
Reference in New Issue
Block a user