forked from qt-creator/qt-creator
Revert "Merge remote-tracking branch 'origin/4.15'"
This reverts commit 888ca0dd20.
Reason for revert: wrong patchset
Change-Id: I1291789938601aaf606c59917ff938e3c24c78dd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -49,7 +49,6 @@
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/iversioncontrol.h>
|
||||
#include <coreplugin/vcsmanager.h>
|
||||
#include <coreplugin/editormanager/documentmodel.h>
|
||||
|
||||
#include <projectexplorer/buildmanager.h>
|
||||
#include <projectexplorer/kitmanager.h>
|
||||
@@ -1074,23 +1073,6 @@ QStringList Project::availableQmlPreviewTranslations(QString *errorMessage)
|
||||
});
|
||||
}
|
||||
|
||||
QList<Core::IDocument *> Project::modifiedDocuments() const
|
||||
{
|
||||
QList<Core::IDocument *> modifiedProjectDocuments;
|
||||
|
||||
for (Core::IDocument *doc : Core::DocumentModel::openedDocuments()) {
|
||||
if (doc->isModified() && isKnownFile(doc->filePath()))
|
||||
modifiedProjectDocuments.append(doc);
|
||||
}
|
||||
|
||||
return modifiedProjectDocuments;
|
||||
}
|
||||
|
||||
bool Project::isModified() const
|
||||
{
|
||||
return !modifiedDocuments().isEmpty();
|
||||
}
|
||||
|
||||
#if defined(WITH_TESTS)
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
@@ -185,9 +185,6 @@ public:
|
||||
|
||||
QStringList availableQmlPreviewTranslations(QString *errorMessage);
|
||||
|
||||
QList<Core::IDocument *> modifiedDocuments() const;
|
||||
bool isModified() const;
|
||||
|
||||
signals:
|
||||
void projectFileIsDirty(const Utils::FilePath &path);
|
||||
|
||||
|
||||
@@ -25,23 +25,22 @@
|
||||
|
||||
#include "quick2propertyeditorview.h"
|
||||
|
||||
#include "aligndistribute.h"
|
||||
#include "annotationeditor/annotationeditor.h"
|
||||
#include "bindingeditor/actioneditor.h"
|
||||
#include "bindingeditor/bindingeditor.h"
|
||||
#include "propertyeditorvalue.h"
|
||||
#include "fileresourcesmodel.h"
|
||||
#include "gradientmodel.h"
|
||||
#include "gradientpresetcustomlistmodel.h"
|
||||
#include "gradientpresetdefaultlistmodel.h"
|
||||
#include "gradientpresetcustomlistmodel.h"
|
||||
#include "itemfiltermodel.h"
|
||||
#include "propertyeditorcontextobject.h"
|
||||
#include "propertyeditorqmlbackend.h"
|
||||
#include "propertyeditorvalue.h"
|
||||
#include "qmlanchorbindingproxy.h"
|
||||
#include "richtexteditor/richtexteditorproxy.h"
|
||||
#include "simplecolorpalettemodel.h"
|
||||
#include "bindingeditor/bindingeditor.h"
|
||||
#include "bindingeditor/actioneditor.h"
|
||||
#include "annotationeditor/annotationeditor.h"
|
||||
#include "qmlanchorbindingproxy.h"
|
||||
#include "theme.h"
|
||||
#include "aligndistribute.h"
|
||||
#include "propertyeditorcontextobject.h"
|
||||
#include "tooltip.h"
|
||||
#include "richtexteditor/richtexteditorproxy.h"
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
@@ -72,11 +71,6 @@ void Quick2PropertyEditorView::registerQmlTypes()
|
||||
Tooltip::registerDeclarativeType();
|
||||
EasingCurveEditor::registerDeclarativeType();
|
||||
RichTextEditorProxy::registerDeclarativeType();
|
||||
QUrl regExpUrl = QUrl::fromLocalFile(PropertyEditorQmlBackend::propertyEditorResourcesPath()
|
||||
+ "/RegExpValidator.qml");
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
qmlRegisterType(regExpUrl, "HelperWidgets", 2, 0, "RegExpValidator");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -66,4 +66,8 @@ private:
|
||||
mutable QVariant m_value;
|
||||
};
|
||||
|
||||
QMLDESIGNERCORE_EXPORT QDataStream &operator<<(QDataStream &stream, const QList<PropertyContainer> &propertyContainerList);
|
||||
QMLDESIGNERCORE_EXPORT QDataStream &operator>>(QDataStream &stream, QList<PropertyContainer> &propertyContainerList);
|
||||
QMLDESIGNERCORE_EXPORT QDebug operator<<(QDebug debug, QList<PropertyContainer> &propertyContainerList);
|
||||
|
||||
} //namespace QmlDesigner
|
||||
|
||||
@@ -203,7 +203,7 @@ static bool isIdToAvoid(const QString& id)
|
||||
|
||||
static bool idContainsWrongLetter(const QString& id)
|
||||
{
|
||||
static QRegularExpression idExpr(QStringLiteral("^[a-z_][a-zA-Z0-9_]*$"));
|
||||
static QRegularExpression idExpr(QStringLiteral("^[a-z_][a-zA-Z0-9_]+$"));
|
||||
return !id.contains(idExpr);
|
||||
}
|
||||
|
||||
|
||||
@@ -113,5 +113,37 @@ QDebug operator<<(QDebug debug, const PropertyContainer &propertyContainer)
|
||||
return debug.space();
|
||||
}
|
||||
|
||||
QDataStream &operator<<(QDataStream &stream, const QList<PropertyContainer> &propertyContainerList)
|
||||
{
|
||||
stream << propertyContainerList.count();
|
||||
foreach (const PropertyContainer &propertyContainer, propertyContainerList)
|
||||
stream << propertyContainer;
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
QDataStream &operator>>(QDataStream &stream, QList<PropertyContainer> &propertyContainerList)
|
||||
{
|
||||
int count;
|
||||
stream >> count;
|
||||
Q_ASSERT(count >= 0);
|
||||
for ( int i = 0; i < count; i++) {
|
||||
PropertyContainer propertyContainer;
|
||||
stream >> propertyContainer;
|
||||
propertyContainerList.append(propertyContainer);
|
||||
}
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug debug, QList<PropertyContainer> &propertyContainerList)
|
||||
{
|
||||
foreach (const PropertyContainer &propertyContainer, propertyContainerList)
|
||||
debug << propertyContainer;
|
||||
|
||||
return debug.space();
|
||||
}
|
||||
|
||||
|
||||
} //namespace QmlDesigner
|
||||
|
||||
|
||||
@@ -55,19 +55,18 @@
|
||||
#include <coreplugin/actionmanager/command.h>
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/designmode.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/idocument.h>
|
||||
#include <coreplugin/messagebox.h>
|
||||
#include <coreplugin/modemanager.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <extensionsystem/pluginspec.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/session.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <sqlitelibraryinitializer.h>
|
||||
#include <qmljs/qmljsmodelmanagerinterface.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <projectexplorer/session.h>
|
||||
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/qtcassert.h>
|
||||
@@ -212,9 +211,7 @@ QmlDesignerPlugin::~QmlDesignerPlugin()
|
||||
////////////////////////////////////////////////////
|
||||
bool QmlDesignerPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage/* = 0*/)
|
||||
{
|
||||
Sqlite::LibraryInitializer::initialize();
|
||||
|
||||
QDir{}.mkpath(Core::ICore::cacheResourcePath());
|
||||
QDir{}.mkpath(Core::ICore::cacheResourcePath().toString());
|
||||
|
||||
if (!Utils::HostOsInfo::canCreateOpenGLContext(errorMessage))
|
||||
return false;
|
||||
@@ -222,8 +219,10 @@ bool QmlDesignerPlugin::initialize(const QStringList & /*arguments*/, QString *e
|
||||
if (DesignerSettings::getValue(DesignerSettingsKey::STANDALONE_MODE).toBool())
|
||||
GenerateResource::generateMenuEntry();
|
||||
|
||||
QString fontPath = Core::ICore::resourcePath() +
|
||||
QStringLiteral("/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/icons.ttf");
|
||||
const QString fontPath
|
||||
= Core::ICore::resourcePath(
|
||||
"qmldesigner/propertyEditorQmlSources/imports/StudioTheme/icons.ttf")
|
||||
.toString();
|
||||
if (QFontDatabase::addApplicationFont(fontPath) < 0)
|
||||
qCWarning(qmldesignerLog) << "Could not add font " << fontPath << "to font database";
|
||||
|
||||
|
||||
@@ -26,8 +26,6 @@
|
||||
#include "qmldebugtranslationclient.h"
|
||||
#include <qmldebug/qpacketprotocol.h>
|
||||
|
||||
#include <QUrl>
|
||||
|
||||
#ifdef FOUND_QML_DEBUG_TRANSLATION_PROTOCOL
|
||||
#include <private/qqmldebugtranslationprotocol_p.h>
|
||||
#endif
|
||||
|
||||
@@ -407,7 +407,7 @@ void CodeAssistantPrivate::finalizeProposal()
|
||||
|
||||
bool CodeAssistantPrivate::isDisplayingProposal() const
|
||||
{
|
||||
return m_proposalWidget != nullptr && m_proposalWidget->proposalIsVisible();
|
||||
return m_proposalWidget != nullptr && m_proposalWidget->isVisible();
|
||||
}
|
||||
|
||||
bool CodeAssistantPrivate::isWaitingForProposal() const
|
||||
|
||||
@@ -219,15 +219,10 @@ void FunctionHintProposalWidget::closeProposal()
|
||||
abort();
|
||||
}
|
||||
|
||||
bool FunctionHintProposalWidget::proposalIsVisible() const
|
||||
{
|
||||
return d->m_popupFrame->isVisible();
|
||||
}
|
||||
|
||||
void FunctionHintProposalWidget::abort()
|
||||
{
|
||||
qApp->removeEventFilter(this);
|
||||
if (proposalIsVisible())
|
||||
if (d->m_popupFrame->isVisible())
|
||||
d->m_popupFrame->close();
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
@@ -52,8 +52,6 @@ public:
|
||||
void updateProposal(const QString &prefix) override;
|
||||
void closeProposal() override;
|
||||
|
||||
bool proposalIsVisible() const override;
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject *o, QEvent *e) override;
|
||||
|
||||
|
||||
@@ -57,8 +57,6 @@ public:
|
||||
virtual void updateProposal(const QString &prefix) = 0;
|
||||
virtual void closeProposal() = 0;
|
||||
|
||||
virtual bool proposalIsVisible() const { return isVisible(); }
|
||||
|
||||
int basePosition() const;
|
||||
void setBasePosition(int basePosition);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user