Changeset 63002 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Aug 4, 2016 4:31:02 PM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp
r62999 r63002 147 147 } 148 148 149 void UIDesktopWidgetWatchdog::sltHandleHostScreenCountChanged(int cHostScreenCount) 150 { 151 Q_UNUSED(cHostScreenCount); 152 149 153 #if QT_VERSION < 0x050000 150 151 void UIDesktopWidgetWatchdog::sltHandleHostScreenCountChanged(int cHostScreenCount)152 {153 154 // printf("UIDesktopWidgetWatchdog::sltHandleHostScreenCountChanged(%d)\n", cHostScreenCount); 154 155 155 156 /* Update host-screen configuration: */ 156 157 updateHostScreenConfiguration(cHostScreenCount); 157 } 158 159 #else /* QT_VERSION >= 0x050000 */ 158 #endif /* QT_VERSION < 0x050000 */ 159 } 160 160 161 161 void UIDesktopWidgetWatchdog::sltHostScreenAdded(QScreen *pHostScreen) 162 162 { 163 Q_UNUSED(pHostScreen); 164 165 #if QT_VERSION >= 0x050000 163 166 // printf("UIDesktopWidgetWatchdog::sltHostScreenAdded(%d)\n", screenCount()); 164 167 165 168 /* Update host-screen configuration: */ 166 169 updateHostScreenConfiguration(); 170 #endif /* QT_VERSION >= 0x050000 */ 167 171 } 168 172 169 173 void UIDesktopWidgetWatchdog::sltHostScreenRemoved(QScreen *pHostScreen) 170 174 { 175 Q_UNUSED(pHostScreen); 176 177 #if QT_VERSION >= 0x050000 171 178 // printf("UIDesktopWidgetWatchdog::sltHostScreenRemoved(%d)\n", screenCount()); 172 179 173 180 /* Update host-screen configuration: */ 174 181 updateHostScreenConfiguration(); 175 }176 177 182 #endif /* QT_VERSION >= 0x050000 */ 183 } 178 184 179 185 void UIDesktopWidgetWatchdog::sltHandleHostScreenResized(int iHostScreenIndex) … … 202 208 { 203 209 /* Prepare connections: */ 204 #if QT_VERSION < 0x050000205 210 connect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), this, SLOT(sltHandleHostScreenCountChanged(int))); 206 #else /* QT_VERSION >= 0x050000 */207 211 connect(qApp, SIGNAL(screenAdded(QScreen *)), this, SLOT(sltHostScreenAdded(QScreen *))); 208 212 connect(qApp, SIGNAL(screenRemoved(QScreen *)), this, SLOT(sltHostScreenRemoved(QScreen *))); 209 #endif /* QT_VERSION >= 0x050000 */210 213 connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(sltHandleHostScreenResized(int))); 211 214 … … 217 220 { 218 221 /* Cleanup connections: */ 219 #if QT_VERSION < 0x050000220 222 disconnect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), this, SLOT(sltHandleHostScreenCountChanged(int))); 221 #else /* QT_VERSION >= 0x050000 */222 223 disconnect(qApp, SIGNAL(screenAdded(QScreen *)), this, SLOT(sltHostScreenAdded(QScreen *))); 223 224 disconnect(qApp, SIGNAL(screenRemoved(QScreen *)), this, SLOT(sltHostScreenRemoved(QScreen *))); 224 #endif /* QT_VERSION >= 0x050000 */225 225 disconnect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(sltHandleHostScreenResized(int))); 226 226 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.h
r62999 r63002 56 56 private slots: 57 57 58 #if QT_VERSION < 0x05000059 58 /** Handles host-screen count change to @a cHostScreenCount. */ 60 59 void sltHandleHostScreenCountChanged(int cHostScreenCount); 61 #else /* QT_VERSION >= 0x050000 */62 60 /** Handles @a pHostScreen adding. */ 63 61 void sltHostScreenAdded(QScreen *pHostScreen); 64 62 /** Handles @a pHostScreen removing. */ 65 63 void sltHostScreenRemoved(QScreen *pHostScreen); 66 #endif /* QT_VERSION >= 0x050000 */67 64 68 65 /** Handles resize for the host-screen with @a iHostScreenIndex. */
Note:
See TracChangeset
for help on using the changeset viewer.