forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.14'
Change-Id: Id4c4c06b086dfe38960f4d68694ae23f3e00109f
This commit is contained in:
@@ -627,7 +627,7 @@ private:
|
||||
void Internal::CorePlugin::testOutputFormatter()
|
||||
{
|
||||
const QString input =
|
||||
"B to be handled by B\r\n"
|
||||
"B to be handled by B\r\r\n"
|
||||
"not to be handled\n\n\n\n"
|
||||
"A to be handled by A\n"
|
||||
"continuation for A\r\n"
|
||||
|
||||
@@ -198,6 +198,9 @@ QString GdbMi::parseCString(const QChar *&from, const QChar *to)
|
||||
|
||||
void GdbMi::parseValue(const QChar *&from, const QChar *to)
|
||||
{
|
||||
if (from == to)
|
||||
return;
|
||||
|
||||
//qDebug() << "parseValue: " << QString(from, to - from);
|
||||
switch (from->unicode()) {
|
||||
case '{':
|
||||
|
||||
@@ -568,12 +568,8 @@ void LineEditField::setup(JsonFieldPage *page, const QString &name)
|
||||
|
||||
bool LineEditField::validate(MacroExpander *expander, QString *message)
|
||||
{
|
||||
if (!JsonFieldPage::Field::validate(expander, message))
|
||||
return false;
|
||||
|
||||
if (m_isValidating)
|
||||
return true;
|
||||
|
||||
m_isValidating = true;
|
||||
|
||||
auto w = qobject_cast<FancyLineEdit *>(widget());
|
||||
@@ -594,9 +590,9 @@ bool LineEditField::validate(MacroExpander *expander, QString *message)
|
||||
m_currentText = w->text();
|
||||
}
|
||||
|
||||
const bool baseValid = JsonFieldPage::Field::validate(expander, message);
|
||||
m_isValidating = false;
|
||||
|
||||
return !w->text().isEmpty();
|
||||
return baseValid && !w->text().isEmpty();
|
||||
}
|
||||
|
||||
void LineEditField::initializeData(MacroExpander *expander)
|
||||
|
||||
@@ -113,14 +113,9 @@ double ZoomAction::setPreviousZoomFactor(double zoom)
|
||||
return zoom;
|
||||
}
|
||||
|
||||
bool parentIsFormEditor(QWidget *parent)
|
||||
bool parentIsToolBar(QWidget *parent)
|
||||
{
|
||||
while (parent) {
|
||||
if (qobject_cast<FormEditorWidget *>(parent))
|
||||
return true;
|
||||
parent = qobject_cast<QWidget *>(parent->parent());
|
||||
}
|
||||
return false;
|
||||
return qobject_cast<QToolBar *>(parent) != nullptr;
|
||||
}
|
||||
|
||||
QComboBox *createZoomComboBox(QWidget *parent)
|
||||
@@ -135,7 +130,7 @@ QComboBox *createZoomComboBox(QWidget *parent)
|
||||
|
||||
QWidget *ZoomAction::createWidget(QWidget *parent)
|
||||
{
|
||||
if (!m_combo && parentIsFormEditor(parent)) {
|
||||
if (!m_combo && parentIsToolBar(parent)) {
|
||||
m_combo = createZoomComboBox(parent);
|
||||
m_combo->setProperty("hideborder", true);
|
||||
m_combo->setCurrentIndex(indexOf(1.0));
|
||||
|
||||
@@ -101,6 +101,7 @@ void BindingModel::bindingRemoved(const BindingProperty &bindingProperty)
|
||||
|
||||
void BindingModel::selectionChanged(const QList<ModelNode> &selectedNodes)
|
||||
{
|
||||
Q_UNUSED(selectedNodes)
|
||||
m_handleDataChanged = false;
|
||||
resetModel();
|
||||
m_handleDataChanged = true;
|
||||
|
||||
@@ -512,8 +512,13 @@ QPicture FormEditorWidget::renderToPicture() const
|
||||
QPainter painter{&picture};
|
||||
|
||||
const QTransform viewportTransform = m_graphicsView->viewportTransform();
|
||||
const QRectF boundingRect = rootItemRect();
|
||||
auto items = m_formEditorView->scene()->allFormEditorItems();
|
||||
|
||||
QRectF boundingRect;
|
||||
for (auto &item : items)
|
||||
boundingRect |= item->childrenBoundingRect();
|
||||
|
||||
picture.setBoundingRect(boundingRect.toRect());
|
||||
m_graphicsView->render(&painter, boundingRect, viewportTransform.mapRect(boundingRect.toRect()));
|
||||
|
||||
return picture;
|
||||
|
||||
@@ -38,6 +38,7 @@ void BaseConnectionManager::setUp(NodeInstanceServerInterface *nodeInstanceServe
|
||||
ProjectExplorer::Target *,
|
||||
AbstractView *view)
|
||||
{
|
||||
Q_UNUSED(view)
|
||||
m_nodeInstanceServer = nodeInstanceServer;
|
||||
m_isActive = true;
|
||||
}
|
||||
|
||||
@@ -258,6 +258,9 @@ bool QmlDesignerPlugin::delayedInitialize()
|
||||
d->viewManager.registerFormEditorToolTakingOwnership(new QmlDesigner::PathTool);
|
||||
d->viewManager.registerFormEditorToolTakingOwnership(new QmlDesigner::TransitionTool);
|
||||
|
||||
if (DesignerSettings::getValue(DesignerSettingsKey::STANDALONE_MODE).toBool())
|
||||
emitUsageStatistics("StandaloneMode");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user