Skip to content

Commit b9f55cc

Browse files
committed
fix: 完全正式支持 wayland ;
1 parent bf08d0b commit b9f55cc

19 files changed

Lines changed: 394 additions & 368 deletions

3rdparty/AngelScript

Submodule AngelScript updated 34 files

3rdparty/as-debugger/as_debugger.cpp

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,17 +1211,43 @@ void asIDBFileWorkspace::CompileBreakpointPositions() {
12111211
// Check if a given breakpoint fall on a line with code or
12121212
// else adjust it to the next line
12131213
if (bp.needAdjust) {
1214-
int line = func->FindNextLineWithCode(bp.line);
1215-
if (line >= 0) {
1214+
// Use GetLineEntryCount and GetLineEntry to build a
1215+
// list of valid lines This will also work for functions
1216+
// compiled from multiple sections, e.g. inlined
1217+
// functions, injected code, etc.
1218+
int lowestLine = bp.line + 1;
1219+
int nextLine = bp.line - 1;
1220+
1221+
// The function may be declared earlier than the
1222+
// breakpoint even though the first line of code is only
1223+
// after it
1224+
int row;
1225+
const char *sectionName;
1226+
func->GetDeclaredAt(&sectionName, &row, 0);
1227+
1228+
if (row < lowestLine)
1229+
lowestLine = row;
1230+
1231+
int lineEntries = func->GetLineEntryCount();
1232+
for (int i = 0; i < lineEntries; i++) {
1233+
func->GetLineEntry(i, &row, 0, &sectionName, 0);
1234+
if (row < lowestLine)
1235+
lowestLine = row;
1236+
if (row >= bp.line &&
1237+
(row < nextLine || nextLine < bp.line))
1238+
nextLine = row;
1239+
}
1240+
1241+
if (lowestLine <= bp.line && nextLine >= bp.line) {
12161242
bp.needAdjust = false;
1217-
if (line != bp.line) {
1243+
if (nextLine != bp.line) {
12181244
// Moving break point to next line with code
12191245
auto old = bp.line;
12201246
// Move the breakpoint to the next line
1221-
bp.line = line;
1247+
bp.line = nextLine;
12221248

12231249
if (debugger->onAdjustBreakPoint) {
1224-
debugger->onAdjustBreakPoint(old, line,
1250+
debugger->onAdjustBreakPoint(old, nextLine,
12251251
section);
12261252
}
12271253
}
@@ -1246,12 +1272,14 @@ void asIDBFileWorkspace::CompileBreakpointPositions() {
12461272
auto func = ctx->GetFunction(0);
12471273

12481274
if (func) {
1249-
func->GetDeclaredAt(nullptr, &decl_row, nullptr);
1250-
12511275
if (debugger->function_breakpoints.find(func->GetName()) !=
1252-
debugger->function_breakpoints.end() &&
1253-
row == func->FindNextLineWithCode(decl_row))
1254-
break_from_bp = true;
1276+
debugger->function_breakpoints.end()) {
1277+
auto curRow = 0;
1278+
func->GetLineEntry(0, &curRow, nullptr, nullptr, nullptr);
1279+
if (curRow == row) {
1280+
break_from_bp = true;
1281+
}
1282+
}
12551283
}
12561284
}
12571285
}

lang/en_US/winghex_en_US.ts

Lines changed: 102 additions & 103 deletions
Large diffs are not rendered by default.

lang/zh_CN/winghex_zh_CN.ts

Lines changed: 102 additions & 103 deletions
Large diffs are not rendered by default.

lang/zh_TW/winghex_zh_TW.ts

Lines changed: 102 additions & 103 deletions
Large diffs are not rendered by default.

mkinstaller/config.ini

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,3 @@ WING_DISABLE_EXTDRV=0
5454
WING_DISABLE_PLUGIN=0
5555
WING_DISABLE_HEXEXT=0
5656
WING_DEBUG=0
57-
58-
[$XDG_SESSION_TYPE="wayland"]
59-
QT_QPA_PLATFORM=xcb
60-
QT_IM_MODULE=fcitx
61-
62-

src/dialog/aboutsoftwaredialog.ui

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
<property name="windowTitle">
1414
<string>About</string>
1515
</property>
16+
<property name="windowIcon">
17+
<iconset resource="../../resources.qrc">
18+
<normaloff>:/com.wingsummer.winghex/images/soft.png</normaloff>:/com.wingsummer.winghex/images/soft.png</iconset>
19+
</property>
1620
<layout class="QVBoxLayout" name="verticalLayout_2">
1721
<item>
1822
<layout class="QHBoxLayout" name="horizontalLayout_3">

src/dialog/checksumdialog.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ CheckSumDialog::CheckSumDialog(QWidget *parent) : FramelessDialogBase(parent) {
5151
layout->addWidget(dbbox);
5252

5353
buildUpContent(widget);
54-
this->setWindowTitle(tr("CheckSum"));
54+
setWindowTitle(tr("CheckSum"));
55+
setWindowIcon(ICONRES("sum"));
5556
}
5657

5758
const QVector<int> &CheckSumDialog::getResults() { return _result; }

src/dialog/colorpickerdialog.ui

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>262</width>
9+
<width>272</width>
1010
<height>294</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
1414
<string>ColorPicker</string>
1515
</property>
16+
<property name="windowIcon">
17+
<iconset resource="../../resources.qrc">
18+
<normaloff>:/com.wingsummer.winghex/images/defines.png</normaloff>:/com.wingsummer.winghex/images/defines.png</iconset>
19+
</property>
1620
<layout class="QVBoxLayout" name="verticalLayout_2">
1721
<item>
1822
<widget class="QWidget" name="wcolor" native="true">
@@ -33,7 +37,7 @@
3337
<item>
3438
<widget class="QLineEdit" name="leColor">
3539
<property name="alignment">
36-
<set>Qt::AlignCenter</set>
40+
<set>Qt::AlignmentFlag::AlignCenter</set>
3741
</property>
3842
</widget>
3943
</item>
@@ -71,7 +75,7 @@
7175
<number>180</number>
7276
</property>
7377
<property name="orientation">
74-
<enum>Qt::Horizontal</enum>
78+
<enum>Qt::Orientation::Horizontal</enum>
7579
</property>
7680
</widget>
7781
</item>
@@ -111,7 +115,7 @@
111115
<number>255</number>
112116
</property>
113117
<property name="orientation">
114-
<enum>Qt::Horizontal</enum>
118+
<enum>Qt::Orientation::Horizontal</enum>
115119
</property>
116120
</widget>
117121
</item>
@@ -151,7 +155,7 @@
151155
<number>255</number>
152156
</property>
153157
<property name="orientation">
154-
<enum>Qt::Horizontal</enum>
158+
<enum>Qt::Orientation::Horizontal</enum>
155159
</property>
156160
</widget>
157161
</item>
@@ -178,7 +182,7 @@
178182
<item>
179183
<widget class="QDialogButtonBox" name="buttonBox">
180184
<property name="standardButtons">
181-
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset</set>
185+
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok|QDialogButtonBox::StandardButton::Reset</set>
182186
</property>
183187
</widget>
184188
</item>
@@ -193,7 +197,9 @@
193197
<header>control/qcolorpicker_slider.hpp</header>
194198
</customwidget>
195199
</customwidgets>
196-
<resources/>
200+
<resources>
201+
<include location="../../resources.qrc"/>
202+
</resources>
197203
<connections>
198204
<connection>
199205
<sender>hueSlider</sender>

0 commit comments

Comments
 (0)