Changeset 62999 in vbox
- Timestamp:
- Aug 4, 2016 3:32:26 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
r62998 r62999 108 108 UIDesktopWidgetWatchdog::UIDesktopWidgetWatchdog(QObject *pParent) 109 109 : QObject(pParent) 110 , m_pDesktopWidget(QApplication::desktop())111 110 { 112 111 /* Prepare: */ … … 130 129 /* Make sure index is valid: */ 131 130 if (iHostScreenIndex < 0 || iHostScreenIndex >= screenCount()) 132 iHostScreenIndex = m_pDesktopWidget->primaryScreen();131 iHostScreenIndex = QApplication::desktop()->primaryScreen(); 133 132 AssertReturn(iHostScreenIndex >= 0 && iHostScreenIndex < screenCount(), QRect()); 134 133 135 134 /* Redirect call to desktop-widget: */ 136 return m_pDesktopWidget->screenGeometry(iHostScreenIndex);135 return QApplication::desktop()->screenGeometry(iHostScreenIndex); 137 136 } 138 137 … … 141 140 /* Make sure index is valid: */ 142 141 if (iHostScreenIndex < 0 || iHostScreenIndex >= screenCount()) 143 iHostScreenIndex = m_pDesktopWidget->primaryScreen();142 iHostScreenIndex = QApplication::desktop()->primaryScreen(); 144 143 AssertReturn(iHostScreenIndex >= 0 && iHostScreenIndex < screenCount(), QRect()); 145 144 … … 204 203 /* Prepare connections: */ 205 204 #if QT_VERSION < 0x050000 206 connect( m_pDesktopWidget, SIGNAL(screenCountChanged(int)), this, SLOT(sltHandleHostScreenCountChanged(int)));205 connect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), this, SLOT(sltHandleHostScreenCountChanged(int))); 207 206 #else /* QT_VERSION >= 0x050000 */ 208 207 connect(qApp, SIGNAL(screenAdded(QScreen *)), this, SLOT(sltHostScreenAdded(QScreen *))); 209 208 connect(qApp, SIGNAL(screenRemoved(QScreen *)), this, SLOT(sltHostScreenRemoved(QScreen *))); 210 209 #endif /* QT_VERSION >= 0x050000 */ 211 connect( m_pDesktopWidget, SIGNAL(resized(int)), this, SLOT(sltHandleHostScreenResized(int)));210 connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(sltHandleHostScreenResized(int))); 212 211 213 212 /* Update host-screen configuration: */ … … 219 218 /* Cleanup connections: */ 220 219 #if QT_VERSION < 0x050000 221 disconnect( m_pDesktopWidget, SIGNAL(screenCountChanged(int)), this, SLOT(sltHandleHostScreenCountChanged(int)));220 disconnect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), this, SLOT(sltHandleHostScreenCountChanged(int))); 222 221 #else /* QT_VERSION >= 0x050000 */ 223 222 disconnect(qApp, SIGNAL(screenAdded(QScreen *)), this, SLOT(sltHostScreenAdded(QScreen *))); 224 223 disconnect(qApp, SIGNAL(screenRemoved(QScreen *)), this, SLOT(sltHostScreenRemoved(QScreen *))); 225 224 #endif /* QT_VERSION >= 0x050000 */ 226 disconnect( m_pDesktopWidget, SIGNAL(resized(int)), this, SLOT(sltHandleHostScreenResized(int)));225 disconnect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(sltHandleHostScreenResized(int))); 227 226 228 227 /* Cleanup existing workers finally: */ … … 252 251 /* Make sure index is valid: */ 253 252 if (iHostScreenIndex < 0 || iHostScreenIndex >= screenCount()) 254 iHostScreenIndex = m_pDesktopWidget->primaryScreen();253 iHostScreenIndex = QApplication::desktop()->primaryScreen(); 255 254 AssertReturnVoid(iHostScreenIndex >= 0 && iHostScreenIndex < screenCount()); 256 255 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.h
r62998 r62999 89 89 void cleanupExistingWorkers(); 90 90 91 /** Holds the desktop-widget reference pointer. */92 QDesktopWidget *m_pDesktopWidget;93 94 91 /** Holds current host-screen available-geometries. */ 95 92 QVector<QRect> m_availableGeometryData;
Note:
See TracChangeset
for help on using the changeset viewer.