Changeset 64440 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Oct 27, 2016 2:52:13 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
r64437 r64440 284 284 #endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */ 285 285 286 #if QT_VERSION < 0x050000 287 286 288 void UIDesktopWidgetWatchdog::sltHandleHostScreenCountChanged(int cHostScreenCount) 287 289 { 288 Q_UNUSED(cHostScreenCount);289 290 #if QT_VERSION < 0x050000291 290 // printf("UIDesktopWidgetWatchdog::sltHandleHostScreenCountChanged(%d)\n", cHostScreenCount); 292 291 … … 298 297 /* Notify listeners: */ 299 298 emit sigHostScreenCountChanged(cHostScreenCount); 300 #endif /* QT_VERSION < 0x050000 */ 301 } 299 } 300 301 #else /* QT_VERSION >= 0x050000 */ 302 302 303 303 void UIDesktopWidgetWatchdog::sltHostScreenAdded(QScreen *pHostScreen) 304 304 { 305 Q_UNUSED(pHostScreen);306 307 #if QT_VERSION >= 0x050000308 305 // printf("UIDesktopWidgetWatchdog::sltHostScreenAdded(%d)\n", screenCount()); 309 306 … … 315 312 /* Notify listeners: */ 316 313 emit sigHostScreenCountChanged(screenCount()); 317 #endif /* QT_VERSION >= 0x050000 */318 314 } 319 315 320 316 void UIDesktopWidgetWatchdog::sltHostScreenRemoved(QScreen *pHostScreen) 321 317 { 322 Q_UNUSED(pHostScreen);323 324 #if QT_VERSION >= 0x050000325 318 // printf("UIDesktopWidgetWatchdog::sltHostScreenRemoved(%d)\n", screenCount()); 326 319 … … 332 325 /* Notify listeners: */ 333 326 emit sigHostScreenCountChanged(screenCount()); 327 } 328 334 329 #endif /* QT_VERSION >= 0x050000 */ 335 }336 330 337 331 void UIDesktopWidgetWatchdog::sltHandleHostScreenResized(int iHostScreenIndex) … … 385 379 { 386 380 /* Prepare connections: */ 381 #if QT_VERSION < 0x050000 387 382 connect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), this, SLOT(sltHandleHostScreenCountChanged(int))); 383 #else /* QT_VERSION >= 0x050000 */ 388 384 connect(qApp, SIGNAL(screenAdded(QScreen *)), this, SLOT(sltHostScreenAdded(QScreen *))); 389 385 connect(qApp, SIGNAL(screenRemoved(QScreen *)), this, SLOT(sltHostScreenRemoved(QScreen *))); 386 #endif /* QT_VERSION >= 0x050000 */ 390 387 connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(sltHandleHostScreenResized(int))); 391 388 connect(QApplication::desktop(), SIGNAL(workAreaResized(int)), this, SLOT(sltHandleHostScreenWorkAreaResized(int))); … … 400 397 { 401 398 /* Cleanup connections: */ 399 #if QT_VERSION < 0x050000 402 400 disconnect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), this, SLOT(sltHandleHostScreenCountChanged(int))); 401 #else /* QT_VERSION >= 0x050000 */ 403 402 disconnect(qApp, SIGNAL(screenAdded(QScreen *)), this, SLOT(sltHostScreenAdded(QScreen *))); 404 403 disconnect(qApp, SIGNAL(screenRemoved(QScreen *)), this, SLOT(sltHostScreenRemoved(QScreen *))); 404 #endif /* QT_VERSION >= 0x050000 */ 405 405 disconnect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(sltHandleHostScreenResized(int))); 406 406 disconnect(QApplication::desktop(), SIGNAL(workAreaResized(int)), this, SLOT(sltHandleHostScreenWorkAreaResized(int))); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.h
r63344 r64440 108 108 private slots: 109 109 110 #if QT_VERSION < 0x050000 110 111 /** Handles host-screen count change to @a cHostScreenCount. */ 111 112 void sltHandleHostScreenCountChanged(int cHostScreenCount); 113 #else /* QT_VERSION >= 0x050000 */ 112 114 /** Handles @a pHostScreen adding. */ 113 115 void sltHostScreenAdded(QScreen *pHostScreen); 114 116 /** Handles @a pHostScreen removing. */ 115 117 void sltHostScreenRemoved(QScreen *pHostScreen); 118 #endif /* QT_VERSION >= 0x050000 */ 116 119 117 120 /** Handles resize for the host-screen with @a iHostScreenIndex. */ 118 121 void sltHandleHostScreenResized(int iHostScreenIndex); 119 120 122 /** Handles work-area resize for the host-screen with @a iHostScreenIndex. */ 121 123 void sltHandleHostScreenWorkAreaResized(int iHostScreenIndex);
Note:
See TracChangeset
for help on using the changeset viewer.