mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-11-30 12:26:39 -05:00
Removed deprecated QDesktopWidget for Qt 6
This commit is contained in:
parent
3a8f7d5a2d
commit
b93a31a33b
12 changed files with 44 additions and 17 deletions
|
|
@ -35,6 +35,7 @@
|
|||
#include <QStyleFactory>
|
||||
#include <QTextStream>
|
||||
#include <QTimer>
|
||||
#include <QScreen>
|
||||
#ifdef __APPLE__
|
||||
#include <QUrl>
|
||||
#endif
|
||||
|
|
@ -676,3 +677,25 @@ bool RsApplication::updateLocalServer()
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Get available geometry of primary screen */
|
||||
QRect RsApplication::availablePrimaryScreenGeometry()
|
||||
{
|
||||
QScreen *primaryScreen = QGuiApplication::primaryScreen();
|
||||
if (!primaryScreen) {
|
||||
return QRect(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
return primaryScreen->availableGeometry();
|
||||
}
|
||||
|
||||
/** Get geometry of primary screen */
|
||||
QRect RsApplication::primaryScreenGeometry()
|
||||
{
|
||||
QScreen *primaryScreen = QGuiApplication::primaryScreen();
|
||||
if (!primaryScreen) {
|
||||
return QRect(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
return primaryScreen->geometry();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue