- Timestamp:
- Aug 4, 2016 1:58:32 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 109599
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
r62989 r62990 23 23 # include <QApplication> 24 24 # include <QDesktopWidget> 25 # if QT_VERSION >= 0x050000 26 # include <QScreen> 27 # endif /* QT_VERSION >= 0x050000 */ 25 28 26 29 /* GUI includes: */ … … 140 143 } 141 144 145 #if QT_VERSION < 0x050000 146 142 147 void UIDesktopWidgetWatchdog::sltHandleHostScreenCountChanged(int cHostScreenCount) 143 148 { … … 147 152 updateHostScreenConfiguration(cHostScreenCount); 148 153 } 154 155 #else /* QT_VERSION >= 0x050000 */ 156 157 void UIDesktopWidgetWatchdog::sltHostScreenAdded(QScreen *pHostScreen) 158 { 159 // printf("UIDesktopWidgetWatchdog::sltHostScreenAdded(%d)\n", m_pDesktopWidget->screenCount()); 160 161 /* Update host-screen configuration: */ 162 updateHostScreenConfiguration(); 163 } 164 165 void UIDesktopWidgetWatchdog::sltHostScreenRemoved(QScreen *pHostScreen) 166 { 167 // printf("UIDesktopWidgetWatchdog::sltHostScreenRemoved(%d)\n", m_pDesktopWidget->screenCount()); 168 169 /* Update host-screen configuration: */ 170 updateHostScreenConfiguration(); 171 } 172 173 #endif /* QT_VERSION >= 0x050000 */ 149 174 150 175 void UIDesktopWidgetWatchdog::sltHandleHostScreenResized(int iHostScreenIndex) … … 173 198 { 174 199 /* Prepare connections: */ 200 #if QT_VERSION < 0x050000 175 201 connect(m_pDesktopWidget, SIGNAL(screenCountChanged(int)), this, SLOT(sltHandleHostScreenCountChanged(int))); 202 #else /* QT_VERSION >= 0x050000 */ 203 connect(qApp, SIGNAL(screenAdded(QScreen *)), this, SLOT(sltHostScreenAdded(QScreen *))); 204 connect(qApp, SIGNAL(screenRemoved(QScreen *)), this, SLOT(sltHostScreenRemoved(QScreen *))); 205 #endif /* QT_VERSION >= 0x050000 */ 176 206 connect(m_pDesktopWidget, SIGNAL(resized(int)), this, SLOT(sltHandleHostScreenResized(int))); 177 207 … … 183 213 { 184 214 /* Cleanup connections: */ 215 #if QT_VERSION < 0x050000 185 216 disconnect(m_pDesktopWidget, SIGNAL(screenCountChanged(int)), this, SLOT(sltHandleHostScreenCountChanged(int))); 217 #else /* QT_VERSION >= 0x050000 */ 218 disconnect(qApp, SIGNAL(screenAdded(QScreen *)), this, SLOT(sltHostScreenAdded(QScreen *))); 219 disconnect(qApp, SIGNAL(screenRemoved(QScreen *)), this, SLOT(sltHostScreenRemoved(QScreen *))); 220 #endif /* QT_VERSION >= 0x050000 */ 186 221 disconnect(m_pDesktopWidget, SIGNAL(resized(int)), this, SLOT(sltHandleHostScreenResized(int))); 187 222 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.h
r62989 r62990 26 26 /* Forward declarations: */ 27 27 class QDesktopWidget; 28 #if QT_VERSION >= 0x050000 29 class QScreen; 30 #endif /* QT_VERSION >= 0x050000 */ 28 31 29 32 /** QObject extension used as … … 50 53 private slots: 51 54 55 #if QT_VERSION < 0x050000 52 56 /** Handles host-screen count change to @a cHostScreenCount. */ 53 57 void sltHandleHostScreenCountChanged(int cHostScreenCount); 58 #else /* QT_VERSION >= 0x050000 */ 59 /** Handles @a pHostScreen adding. */ 60 void sltHostScreenAdded(QScreen *pHostScreen); 61 /** Handles @a pHostScreen removing. */ 62 void sltHostScreenRemoved(QScreen *pHostScreen); 63 #endif /* QT_VERSION >= 0x050000 */ 54 64 55 65 /** Handles resize for the host-screen with @a iHostScreenIndex. */
Note:
See TracChangeset
for help on using the changeset viewer.