Changeset View
Changeset View
Standalone View
Standalone View
effects/glide/glide.h
Show All 19 Lines | |||||
20 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 20 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
21 | *********************************************************************/ | 21 | *********************************************************************/ | ||
22 | 22 | | |||
23 | #ifndef KWIN_GLIDE_H | 23 | #ifndef KWIN_GLIDE_H | ||
24 | #define KWIN_GLIDE_H | 24 | #define KWIN_GLIDE_H | ||
25 | 25 | | |||
26 | #include <kwineffects.h> | 26 | #include <kwineffects.h> | ||
27 | 27 | | |||
28 | class QTimeLine; | 28 | #include <QSet> | ||
29 | #include <QString> | ||||
30 | #include <QTimeLine> | ||||
broulik: Unrelated, forward-declaration of `QTimeLine` is fine given it's only stored as a pointer | |||||
QTimeLine is external stuff, that's not part of KWin. What if definition of QTimeLine will be changed in the future? zzag: QTimeLine is external stuff, that's not part of KWin. What if definition of QTimeLine will be… | |||||
It can only in Qt 6 and a pointer is still a pointer, all that the compiler needs to know is "this class exists" for this member variable. broulik: It can only in Qt 6 and a pointer is still a pointer, all that the compiler needs to know is… | |||||
Some time ago, Hugo Pereira Da Costa added a good comment on forward-declaring Qt stuff:
Anyway, if you still think QTimeLine should be forward-declared, I'll update the diff. zzag: Some time ago, Hugo Pereira Da Costa added a good comment on forward-declaring Qt stuff:
> I… | |||||
romangg: Pls forward-declare. | |||||
29 | 31 | | |||
30 | namespace KWin | 32 | namespace KWin | ||
31 | { | 33 | { | ||
32 | 34 | | |||
33 | class GlideEffect | 35 | class GlideEffect | ||
34 | : public Effect | 36 | : public Effect | ||
35 | { | 37 | { | ||
36 | Q_OBJECT | 38 | Q_OBJECT | ||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 73 | private: | |||
80 | int angle; | 82 | int angle; | ||
81 | enum EffectStyle { | 83 | enum EffectStyle { | ||
82 | GlideIn = 0, | 84 | GlideIn = 0, | ||
83 | GlideInOut = 1, | 85 | GlideInOut = 1, | ||
84 | GlideOutIn = 2, | 86 | GlideOutIn = 2, | ||
85 | GlideOut = 3 | 87 | GlideOut = 3 | ||
86 | }; | 88 | }; | ||
87 | EffectStyle effect; | 89 | EffectStyle effect; | ||
90 | QSet<QString> blacklist; | ||||
88 | }; | 91 | }; | ||
89 | 92 | | |||
90 | class GlideEffect::WindowInfo | 93 | class GlideEffect::WindowInfo | ||
91 | { | 94 | { | ||
92 | public: | 95 | public: | ||
93 | WindowInfo(); | 96 | WindowInfo(); | ||
94 | ~WindowInfo(); | 97 | ~WindowInfo(); | ||
95 | bool deleted; | 98 | bool deleted; | ||
96 | bool added; | 99 | bool added; | ||
97 | bool closed; | 100 | bool closed; | ||
98 | QTimeLine *timeLine; | 101 | QTimeLine *timeLine; | ||
99 | }; | 102 | }; | ||
100 | 103 | | |||
101 | } // namespace | 104 | } // namespace | ||
102 | 105 | | |||
103 | #endif | 106 | #endif |
Unrelated, forward-declaration of QTimeLine is fine given it's only stored as a pointer