forked from qt-creator/qt-creator
QmlDesigner: Remove WidgetInfo::placementPriority
It was always zero. Change-Id: Ie6309fa2f9ea9211dcda6c0fdef3362be19b5914 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -125,8 +125,10 @@ QmlDesigner::WidgetInfo EffectComposerView::widgetInfo()
|
|||||||
Core::ICore::addContextObject(context);
|
Core::ICore::addContextObject(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
return createWidgetInfo(m_widget.data(), "EffectComposer",
|
return createWidgetInfo(m_widget.data(),
|
||||||
QmlDesigner::WidgetInfo::LeftPane, 0, tr("Effect Composer [beta]"));
|
"EffectComposer",
|
||||||
|
QmlDesigner::WidgetInfo::LeftPane,
|
||||||
|
tr("Effect Composer [beta]"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectComposerView::customNotification([[maybe_unused]] const AbstractView *view,
|
void EffectComposerView::customNotification([[maybe_unused]] const AbstractView *view,
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ WidgetInfo InsightView::widgetInfo()
|
|||||||
return createWidgetInfo(m_insightWidget.data(),
|
return createWidgetInfo(m_insightWidget.data(),
|
||||||
"QtInsight",
|
"QtInsight",
|
||||||
WidgetInfo::RightPane,
|
WidgetInfo::RightPane,
|
||||||
0,
|
|
||||||
tr("Qt Insight"));
|
tr("Qt Insight"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ WidgetInfo AssetsLibraryView::widgetInfo()
|
|||||||
Core::ICore::addContextObject(context);
|
Core::ICore::addContextObject(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
return createWidgetInfo(m_widget.data(), "Assets", WidgetInfo::LeftPane, 0, tr("Assets"));
|
return createWidgetInfo(m_widget.data(), "Assets", WidgetInfo::LeftPane, tr("Assets"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void AssetsLibraryView::customNotification(const AbstractView * /*view*/,
|
void AssetsLibraryView::customNotification(const AbstractView * /*view*/,
|
||||||
|
|||||||
@@ -425,10 +425,6 @@ QList<WidgetInfo> ViewManager::widgetInfos() const
|
|||||||
widgetInfoList.append(view->widgetInfo());
|
widgetInfoList.append(view->widgetInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::sort(widgetInfoList, [](const WidgetInfo &firstWidgetInfo, const WidgetInfo &secondWidgetInfo) {
|
|
||||||
return firstWidgetInfo.placementPriority < secondWidgetInfo.placementPriority;
|
|
||||||
});
|
|
||||||
|
|
||||||
return widgetInfoList;
|
return widgetInfoList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ WidgetInfo ConnectionView::widgetInfo()
|
|||||||
return createWidgetInfo(d->connectionViewQuickWidget.get(),
|
return createWidgetInfo(d->connectionViewQuickWidget.get(),
|
||||||
QLatin1String("ConnectionView"),
|
QLatin1String("ConnectionView"),
|
||||||
WidgetInfo::LeftPane,
|
WidgetInfo::LeftPane,
|
||||||
0,
|
|
||||||
tr("Connections"));
|
tr("Connections"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -145,7 +145,6 @@ WidgetInfo ContentLibraryView::widgetInfo()
|
|||||||
return createWidgetInfo(m_widget.data(),
|
return createWidgetInfo(m_widget.data(),
|
||||||
"ContentLibrary",
|
"ContentLibrary",
|
||||||
WidgetInfo::LeftPane,
|
WidgetInfo::LeftPane,
|
||||||
0,
|
|
||||||
tr("Content Library"));
|
tr("Content Library"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ bool CurveEditorView::hasWidget() const
|
|||||||
|
|
||||||
WidgetInfo CurveEditorView::widgetInfo()
|
WidgetInfo CurveEditorView::widgetInfo()
|
||||||
{
|
{
|
||||||
return createWidgetInfo(m_editor, "CurveEditorId", WidgetInfo::BottomPane, 0, tr("Curves"));
|
return createWidgetInfo(m_editor, "CurveEditorId", WidgetInfo::BottomPane, tr("Curves"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CurveEditorView::modelAttached(Model *model)
|
void CurveEditorView::modelAttached(Model *model)
|
||||||
|
|||||||
@@ -439,7 +439,6 @@ WidgetInfo DebugView::widgetInfo()
|
|||||||
return createWidgetInfo(m_debugViewWidget.data(),
|
return createWidgetInfo(m_debugViewWidget.data(),
|
||||||
QStringLiteral("DebugView"),
|
QStringLiteral("DebugView"),
|
||||||
WidgetInfo::LeftPane,
|
WidgetInfo::LeftPane,
|
||||||
0,
|
|
||||||
tr("Debug View"));
|
tr("Debug View"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,6 @@ WidgetInfo Edit3DView::widgetInfo()
|
|||||||
return createWidgetInfo(m_edit3DWidget.data(),
|
return createWidgetInfo(m_edit3DWidget.data(),
|
||||||
"Editor3D",
|
"Editor3D",
|
||||||
WidgetInfo::CentralPane,
|
WidgetInfo::CentralPane,
|
||||||
0,
|
|
||||||
tr("3D"),
|
tr("3D"),
|
||||||
tr("3D view"),
|
tr("3D view"),
|
||||||
DesignerWidgetFlags::IgnoreErrors);
|
DesignerWidgetFlags::IgnoreErrors);
|
||||||
|
|||||||
@@ -368,7 +368,6 @@ WidgetInfo FormEditorView::widgetInfo()
|
|||||||
return createWidgetInfo(m_formEditorWidget.data(),
|
return createWidgetInfo(m_formEditorWidget.data(),
|
||||||
"FormEditor",
|
"FormEditor",
|
||||||
WidgetInfo::CentralPane,
|
WidgetInfo::CentralPane,
|
||||||
0,
|
|
||||||
tr("2D"),
|
tr("2D"),
|
||||||
tr("2D view"),
|
tr("2D view"),
|
||||||
DesignerWidgetFlags::IgnoreErrors);
|
DesignerWidgetFlags::IgnoreErrors);
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ WidgetInfo ItemLibraryView::widgetInfo()
|
|||||||
return createWidgetInfo(m_widget.data(),
|
return createWidgetInfo(m_widget.data(),
|
||||||
"Components",
|
"Components",
|
||||||
WidgetInfo::LeftPane,
|
WidgetInfo::LeftPane,
|
||||||
0,
|
|
||||||
tr("Components"),
|
tr("Components"),
|
||||||
tr("Components view"));
|
tr("Components view"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -216,7 +216,6 @@ WidgetInfo MaterialBrowserView::widgetInfo()
|
|||||||
return createWidgetInfo(m_widget.data(),
|
return createWidgetInfo(m_widget.data(),
|
||||||
"MaterialBrowser",
|
"MaterialBrowser",
|
||||||
WidgetInfo::LeftPane,
|
WidgetInfo::LeftPane,
|
||||||
0,
|
|
||||||
tr("Material Browser"),
|
tr("Material Browser"),
|
||||||
tr("Material Browser view"));
|
tr("Material Browser view"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -879,7 +879,6 @@ WidgetInfo MaterialEditorView::widgetInfo()
|
|||||||
return createWidgetInfo(m_stackedWidget,
|
return createWidgetInfo(m_stackedWidget,
|
||||||
"MaterialEditor",
|
"MaterialEditor",
|
||||||
WidgetInfo::RightPane,
|
WidgetInfo::RightPane,
|
||||||
0,
|
|
||||||
tr("Material Editor"),
|
tr("Material Editor"),
|
||||||
tr("Material Editor view"));
|
tr("Material Editor view"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,6 @@ WidgetInfo NavigatorView::widgetInfo()
|
|||||||
return createWidgetInfo(m_widget.data(),
|
return createWidgetInfo(m_widget.data(),
|
||||||
QStringLiteral("Navigator"),
|
QStringLiteral("Navigator"),
|
||||||
WidgetInfo::LeftPane,
|
WidgetInfo::LeftPane,
|
||||||
0,
|
|
||||||
tr("Navigator"),
|
tr("Navigator"),
|
||||||
tr("Navigator view"));
|
tr("Navigator view"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -986,7 +986,6 @@ WidgetInfo PropertyEditorView::widgetInfo()
|
|||||||
return createWidgetInfo(m_stackedWidget,
|
return createWidgetInfo(m_stackedWidget,
|
||||||
QStringLiteral("Properties"),
|
QStringLiteral("Properties"),
|
||||||
WidgetInfo::RightPane,
|
WidgetInfo::RightPane,
|
||||||
0,
|
|
||||||
tr("Properties"),
|
tr("Properties"),
|
||||||
tr("Property Editor view"));
|
tr("Property Editor view"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ WidgetInfo StatesEditorView::widgetInfo()
|
|||||||
return createWidgetInfo(m_statesEditorWidget.data(),
|
return createWidgetInfo(m_statesEditorWidget.data(),
|
||||||
"StatesEditor",
|
"StatesEditor",
|
||||||
WidgetInfo::BottomPane,
|
WidgetInfo::BottomPane,
|
||||||
0,
|
|
||||||
tr("States"));
|
tr("States"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -135,7 +135,6 @@ WidgetInfo TextEditorView::widgetInfo()
|
|||||||
return createWidgetInfo(m_widget,
|
return createWidgetInfo(m_widget,
|
||||||
"TextEditor",
|
"TextEditor",
|
||||||
WidgetInfo::CentralPane,
|
WidgetInfo::CentralPane,
|
||||||
0,
|
|
||||||
tr("Code"),
|
tr("Code"),
|
||||||
tr("Code view"),
|
tr("Code view"),
|
||||||
DesignerWidgetFlags::IgnoreErrors);
|
DesignerWidgetFlags::IgnoreErrors);
|
||||||
|
|||||||
@@ -693,7 +693,6 @@ WidgetInfo TextureEditorView::widgetInfo()
|
|||||||
return createWidgetInfo(m_stackedWidget,
|
return createWidgetInfo(m_stackedWidget,
|
||||||
"TextureEditor",
|
"TextureEditor",
|
||||||
WidgetInfo::RightPane,
|
WidgetInfo::RightPane,
|
||||||
0,
|
|
||||||
tr("Texture Editor"),
|
tr("Texture Editor"),
|
||||||
tr("Texture Editor view"));
|
tr("Texture Editor view"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -659,7 +659,6 @@ WidgetInfo TimelineView::widgetInfo()
|
|||||||
return createWidgetInfo(createWidget(),
|
return createWidgetInfo(createWidget(),
|
||||||
QStringLiteral("Timelines"),
|
QStringLiteral("Timelines"),
|
||||||
WidgetInfo::BottomPane,
|
WidgetInfo::BottomPane,
|
||||||
0,
|
|
||||||
tr("Timeline"),
|
tr("Timeline"),
|
||||||
tr("Timeline view"));
|
tr("Timeline view"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -333,7 +333,6 @@ WidgetInfo TransitionEditorView::widgetInfo()
|
|||||||
return createWidgetInfo(createWidget(),
|
return createWidgetInfo(createWidget(),
|
||||||
"TransitionEditor",
|
"TransitionEditor",
|
||||||
WidgetInfo::BottomPane,
|
WidgetInfo::BottomPane,
|
||||||
0,
|
|
||||||
tr("Transitions"),
|
tr("Transitions"),
|
||||||
tr("Transitions view"));
|
tr("Transitions view"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ enum DesignerWidgetFlags {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class WidgetInfo {
|
class WidgetInfo {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum PlacementHint {
|
enum PlacementHint {
|
||||||
NoPane,
|
NoPane,
|
||||||
@@ -54,7 +53,6 @@ public:
|
|||||||
QString tabName;
|
QString tabName;
|
||||||
QString feedbackDisplayName;
|
QString feedbackDisplayName;
|
||||||
QWidget *widget = nullptr;
|
QWidget *widget = nullptr;
|
||||||
int placementPriority;
|
|
||||||
PlacementHint placementHint;
|
PlacementHint placementHint;
|
||||||
DesignerWidgetFlags widgetFlags = DesignerWidgetFlags::DisableOnError;
|
DesignerWidgetFlags widgetFlags = DesignerWidgetFlags::DisableOnError;
|
||||||
};
|
};
|
||||||
@@ -296,7 +294,6 @@ protected:
|
|||||||
QWidget *widget = nullptr,
|
QWidget *widget = nullptr,
|
||||||
const QString &uniqueId = QString(),
|
const QString &uniqueId = QString(),
|
||||||
WidgetInfo::PlacementHint placementHint = WidgetInfo::NoPane,
|
WidgetInfo::PlacementHint placementHint = WidgetInfo::NoPane,
|
||||||
int placementPriority = 0,
|
|
||||||
const QString &tabName = QString(),
|
const QString &tabName = QString(),
|
||||||
const QString &feedbackDisplayName = QString(),
|
const QString &feedbackDisplayName = QString(),
|
||||||
DesignerWidgetFlags widgetFlags = DesignerWidgetFlags::DisableOnError);
|
DesignerWidgetFlags widgetFlags = DesignerWidgetFlags::DisableOnError);
|
||||||
|
|||||||
@@ -132,7 +132,6 @@ void AbstractView::removeModel()
|
|||||||
WidgetInfo AbstractView::createWidgetInfo(QWidget *widget,
|
WidgetInfo AbstractView::createWidgetInfo(QWidget *widget,
|
||||||
const QString &uniqueId,
|
const QString &uniqueId,
|
||||||
WidgetInfo::PlacementHint placementHint,
|
WidgetInfo::PlacementHint placementHint,
|
||||||
int placementPriority,
|
|
||||||
const QString &tabName,
|
const QString &tabName,
|
||||||
const QString &feedbackDisplayName,
|
const QString &feedbackDisplayName,
|
||||||
DesignerWidgetFlags widgetFlags)
|
DesignerWidgetFlags widgetFlags)
|
||||||
@@ -142,7 +141,6 @@ WidgetInfo AbstractView::createWidgetInfo(QWidget *widget,
|
|||||||
widgetInfo.widget = widget;
|
widgetInfo.widget = widget;
|
||||||
widgetInfo.uniqueId = uniqueId;
|
widgetInfo.uniqueId = uniqueId;
|
||||||
widgetInfo.placementHint = placementHint;
|
widgetInfo.placementHint = placementHint;
|
||||||
widgetInfo.placementPriority = placementPriority;
|
|
||||||
widgetInfo.tabName = tabName;
|
widgetInfo.tabName = tabName;
|
||||||
widgetInfo.feedbackDisplayName = feedbackDisplayName;
|
widgetInfo.feedbackDisplayName = feedbackDisplayName;
|
||||||
widgetInfo.widgetFlags = widgetFlags;
|
widgetInfo.widgetFlags = widgetFlags;
|
||||||
|
|||||||
Reference in New Issue
Block a user