Skip to content

Commit c132cd3

Browse files
committed
Fix bugs
1 parent d79adbb commit c132cd3

File tree

6 files changed

+45
-30
lines changed

6 files changed

+45
-30
lines changed

src/libs/application/uishell/src/qml/ProjectWindow.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Window {
176176
id: titleBarArea
177177
Layout.fillWidth: true
178178
Layout.fillHeight: !window.isMacOS
179-
Layout.preferredHeight: window.isMacOS ? titleBar.height + toolBar.height : undefined
179+
Layout.preferredHeight: window.isMacOS ? titleBar.height + toolBar.height : 0
180180
RowLayout {
181181
anchors.right: parent.right
182182
visible: !window.isMacOS

src/plugins/coreplugin/qml/panels/LoadingFailedFallbackPanel.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ DockingPane {
4848
icon.color: Theme.errorColor
4949
spacing: 12
5050
Accessible.role: Accessible.staticText
51-
Accessible.name: text
51+
Accessible.name: qsTr("Failed to load component")
5252
}
5353
Label {
5454
visible: !panel.componentRegistered

src/plugins/coreplugin/res/org.diffscope.core_actions.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@
350350

351351
<menu id="org.diffscope.core.mainToolBarMiddle">
352352
<group id="org.diffscope.core.toolBarTimelineNavigationActions">
353-
<action id="org.diffscope.core.widget.digitalClock" />
354353
<action id="org.diffscope.core.widget.tempoTimeSignatureIndicator" />
354+
<action id="org.diffscope.core.widget.digitalClock" />
355355
<action id="org.diffscope.core.timeline.goToStart" />
356356
<action id="org.diffscope.core.timeline.goToEnd" />
357357
</group>

src/plugins/coreplugin/windows/ActionWindowInterfaceBase.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,6 @@ namespace Core {
4242
actionContext->setMenuComponent(new QQmlComponent(RuntimeInterface::qmlEngine(), "SVSCraft.UIComponents", "Menu", q));
4343
actionContext->setSeparatorComponent(new QQmlComponent(RuntimeInterface::qmlEngine(), "SVSCraft.UIComponents", "MenuSeparator", q));
4444
actionContext->setStretchComponent(new QQmlComponent(RuntimeInterface::qmlEngine(), "SVSCraft.UIComponents", "MenuSeparator", q));
45-
{
46-
QQmlComponent component(RuntimeInterface::qmlEngine(), "DiffScope.Core", "GlobalActions");
47-
if (component.isError()) {
48-
qFatal() << component.errorString();
49-
}
50-
auto o = component.createWithInitialProperties({
51-
{"windowHandle", QVariant::fromValue(q)}
52-
});
53-
o->setParent(q);
54-
QMetaObject::invokeMethod(o, "registerToContext", actionContext);
55-
}
5645
}
5746
};
5847

src/plugins/coreplugin/windows/HomeWindowInterface.cpp

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,28 @@ namespace Core {
2424
void initActionContext() {
2525
Q_Q(HomeWindowInterface);
2626
auto actionContext = q->actionContext();
27-
QQmlComponent component(RuntimeInterface::qmlEngine(), "DiffScope.Core", "HomeActions");
28-
if (component.isError()) {
29-
qFatal() << component.errorString();
27+
{
28+
QQmlComponent component(RuntimeInterface::qmlEngine(), "DiffScope.Core", "GlobalActions");
29+
if (component.isError()) {
30+
qFatal() << component.errorString();
31+
}
32+
auto o = component.createWithInitialProperties({
33+
{"windowHandle", QVariant::fromValue(q)},
34+
});
35+
o->setParent(q);
36+
QMetaObject::invokeMethod(o, "registerToContext", actionContext);
37+
}
38+
{
39+
QQmlComponent component(RuntimeInterface::qmlEngine(), "DiffScope.Core", "HomeActions");
40+
if (component.isError()) {
41+
qFatal() << component.errorString();
42+
}
43+
auto o = component.createWithInitialProperties({
44+
{"windowHandle", QVariant::fromValue(q)},
45+
});
46+
o->setParent(q);
47+
QMetaObject::invokeMethod(o, "registerToContext", actionContext);
3048
}
31-
auto o = component.createWithInitialProperties({
32-
{"windowHandle", QVariant::fromValue(q)},
33-
});
34-
o->setParent(q);
35-
QMetaObject::invokeMethod(o, "registerToContext", actionContext);
3649
}
3750
};
3851

src/plugins/coreplugin/windows/ProjectWindowInterface.cpp

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,28 @@ namespace Core {
5656
void initActionContext() {
5757
Q_Q(ProjectWindowInterface);
5858
auto actionContext = q->actionContext();
59-
QQmlComponent component(RuntimeInterface::qmlEngine(), "DiffScope.Core", "ProjectActions");
60-
if (component.isError()) {
61-
qFatal() << component.errorString();
59+
{
60+
QQmlComponent component(RuntimeInterface::qmlEngine(), "DiffScope.Core", "GlobalActions");
61+
if (component.isError()) {
62+
qFatal() << component.errorString();
63+
}
64+
auto o = component.createWithInitialProperties({
65+
{"windowHandle", QVariant::fromValue(q)}
66+
});
67+
o->setParent(q);
68+
QMetaObject::invokeMethod(o, "registerToContext", actionContext);
69+
}
70+
{
71+
QQmlComponent component(RuntimeInterface::qmlEngine(), "DiffScope.Core", "ProjectActions");
72+
if (component.isError()) {
73+
qFatal() << component.errorString();
74+
}
75+
auto o = component.createWithInitialProperties({
76+
{"windowHandle", QVariant::fromValue(q)},
77+
});
78+
o->setParent(q);
79+
QMetaObject::invokeMethod(o, "registerToContext", actionContext);
6280
}
63-
auto o = component.createWithInitialProperties({
64-
{"windowHandle", QVariant::fromValue(q)},
65-
});
66-
o->setParent(q);
67-
QMetaObject::invokeMethod(o, "registerToContext", actionContext);
6881
}
6982

7083
void updateRecentFile() const {

0 commit comments

Comments
 (0)