Link Here
|
|
|
1 |
--- src_VBox_Frontends_VirtualBox_src_widgets_UIMiniToolBar.cpp.orig 2017-04-19 16:51:18 UTC |
2 |
+++ src_VBox_Frontends_VirtualBox_src_widgets_UIMiniToolBar.cpp |
3 |
@@ -29,7 +29,9 @@ |
4 |
# include <QToolButton> |
5 |
# include <QStateMachine> |
6 |
# include <QPainter> |
7 |
+# if QT_VERSION >= 0x050000 |
8 |
# include <QWindow> |
9 |
+# endif |
10 |
# ifdef VBOX_WS_X11 |
11 |
# include <QWindowStateChangeEvent> |
12 |
# endif |
13 |
@@ -404,7 +406,7 @@ Qt::WindowFlags UIMiniToolBar::defaultWi |
14 |
/* Not everywhere: */ |
15 |
Q_UNUSED(geometryType); |
16 |
|
17 |
-#ifdef VBOX_WS_X11 |
18 |
+#ifdef VBOX_WS_X11 && # QT_VERSION >= 0x050000 |
19 |
/* Depending on current WM: */ |
20 |
switch (vboxGlobal().typeOfWindowManager()) |
21 |
{ |
22 |
@@ -614,10 +616,12 @@ void UIMiniToolBar::sltHide() |
23 |
|
24 |
void UIMiniToolBar::sltShow() |
25 |
{ |
26 |
+# if QT_VERSION >= 0x050000 |
27 |
LogRel2(("GUI: UIMiniToolBar::sltShow\n")); |
28 |
|
29 |
/* Update transience: */ |
30 |
sltAdjustTransience(); |
31 |
+#endif |
32 |
|
33 |
#if defined(VBOX_WS_MAC) |
34 |
|
35 |
@@ -806,8 +810,10 @@ void UIMiniToolBar::sltAdjust() |
36 |
#endif |
37 |
} |
38 |
|
39 |
+ |
40 |
void UIMiniToolBar::sltAdjustTransience() |
41 |
{ |
42 |
+# if QT_VERSION >= 0x050000 |
43 |
// WORKAROUND: |
44 |
// Make sure win id is generated, |
45 |
// else Qt5 can crash otherwise. |
46 |
@@ -816,8 +822,10 @@ void UIMiniToolBar::sltAdjustTransience( |
47 |
|
48 |
/* Add the transience dependency: */ |
49 |
windowHandle()->setTransientParent(m_pParent->windowHandle()); |
50 |
+#endif |
51 |
} |
52 |
|
53 |
+ |
54 |
void UIMiniToolBar::prepare() |
55 |
{ |
56 |
/* Install event-filters: */ |