Commit 215a90a
fix: [Editor] Improve Qt5 compatibility and code cleanup
This commit includes the following changes:
1. **Qt5 Compatibility Fix in dtextedit.cpp**:
- Replaced `QList::removeIf()` (Qt6 only) with Qt5-compatible approach using `QSet::toSet()` and reverse iteration with `removeAt()`
- This fixes compilation issues on Qt5-based systems
2. **Code Cleanup in tabbar.cpp**:
- Removed dead code block wrapped in `#if 0` preprocessor directive
- Removed orphaned debug output `qDebug() << "Exit createDragPixmapFromTab"`
3. **Header Fixes**:
- Added `Q_DECLARE_METATYPE(DockRect)` macro in com_deepin_dde_daemon_dock.h to properly register DockRect type with Qt's meta-object system
- Added `mousePressEvent` declaration in tabbar.h
- Added `slotStopReadingAction` slot declaration in dtextedit.h
4. **Include Fixes**:
- Added missing `#include <QDebug>` to multiple source files where qDebug() is used
- Removed duplicate `#include "bottombar.h"` in bottombar.cpp
Log: Fix Qt5 compilation compatibility issue and clean up unused code in tab bar component
Task: https://pms.uniontech.com/task-view-383499.html1 parent 893a041 commit 215a90a
17 files changed
Lines changed: 30 additions & 9 deletions
File tree
- src
- common
- controls
- dbus
- editor
- thememodule
- widgets
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | 499 | | |
508 | 500 | | |
509 | 501 | | |
| |||
749 | 741 | | |
750 | 742 | | |
751 | 743 | | |
| 744 | + | |
752 | 745 | | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
753 | 749 | | |
754 | 750 | | |
755 | 751 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6516 | 6516 | | |
6517 | 6517 | | |
6518 | 6518 | | |
| 6519 | + | |
| 6520 | + | |
| 6521 | + | |
| 6522 | + | |
| 6523 | + | |
| 6524 | + | |
| 6525 | + | |
| 6526 | + | |
| 6527 | + | |
6519 | 6528 | | |
6520 | 6529 | | |
6521 | 6530 | | |
6522 | 6531 | | |
6523 | 6532 | | |
6524 | 6533 | | |
| 6534 | + | |
6525 | 6535 | | |
6526 | 6536 | | |
6527 | 6537 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
| 533 | + | |
533 | 534 | | |
534 | 535 | | |
535 | 536 | | |
| |||
0 commit comments