qt: Replace obsolete functions of QDesktopWidget
This commit is contained in:
parent
1260ecd812
commit
c6dd32da69
4 changed files with 6 additions and 7 deletions
|
@ -40,7 +40,6 @@
|
|||
#include <QApplication>
|
||||
#include <QComboBox>
|
||||
#include <QDateTime>
|
||||
#include <QDesktopWidget>
|
||||
#include <QDragEnterEvent>
|
||||
#include <QListWidget>
|
||||
#include <QMenu>
|
||||
|
@ -48,6 +47,7 @@
|
|||
#include <QMessageBox>
|
||||
#include <QMimeData>
|
||||
#include <QProgressDialog>
|
||||
#include <QScreen>
|
||||
#include <QSettings>
|
||||
#include <QShortcut>
|
||||
#include <QStackedWidget>
|
||||
|
@ -81,7 +81,7 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
|
|||
QSettings settings;
|
||||
if (!restoreGeometry(settings.value("MainWindowGeometry").toByteArray())) {
|
||||
// Restore failed (perhaps missing setting), center the window
|
||||
move(QApplication::desktop()->availableGeometry().center() - frameGeometry().center());
|
||||
move(QGuiApplication::primaryScreen()->availableGeometry().center() - frameGeometry().center());
|
||||
}
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include <QClipboard>
|
||||
#include <QDateTime>
|
||||
#include <QDesktopServices>
|
||||
#include <QDesktopWidget>
|
||||
#include <QDoubleValidator>
|
||||
#include <QFileDialog>
|
||||
#include <QFont>
|
||||
|
|
|
@ -28,11 +28,11 @@
|
|||
#include <wallet/wallet.h>
|
||||
#endif
|
||||
|
||||
#include <QDesktopWidget>
|
||||
#include <QKeyEvent>
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
#include <QScrollBar>
|
||||
#include <QScreen>
|
||||
#include <QSettings>
|
||||
#include <QSignalMapper>
|
||||
#include <QTime>
|
||||
|
@ -451,7 +451,7 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
|
|||
QSettings settings;
|
||||
if (!restoreGeometry(settings.value("RPCConsoleWindowGeometry").toByteArray())) {
|
||||
// Restore failed (perhaps missing setting), center the window
|
||||
move(QApplication::desktop()->availableGeometry().center() - frameGeometry().center());
|
||||
move(QGuiApplication::primaryScreen()->availableGeometry().center() - frameGeometry().center());
|
||||
}
|
||||
|
||||
QChar nonbreaking_hyphen(8209);
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
|
||||
#include <QApplication>
|
||||
#include <QCloseEvent>
|
||||
#include <QDesktopWidget>
|
||||
#include <QPainter>
|
||||
#include <QRadialGradient>
|
||||
#include <QScreen>
|
||||
|
||||
|
||||
SplashScreen::SplashScreen(interfaces::Node& node, Qt::WindowFlags f, const NetworkStyle *networkStyle) :
|
||||
|
@ -124,7 +124,7 @@ SplashScreen::SplashScreen(interfaces::Node& node, Qt::WindowFlags f, const Netw
|
|||
QRect r(QPoint(), QSize(pixmap.size().width()/devicePixelRatio,pixmap.size().height()/devicePixelRatio));
|
||||
resize(r.size());
|
||||
setFixedSize(r.size());
|
||||
move(QApplication::desktop()->screenGeometry().center() - r.center());
|
||||
move(QGuiApplication::primaryScreen()->geometry().center() - r.center());
|
||||
|
||||
subscribeToCoreSignals();
|
||||
installEventFilter(this);
|
||||
|
|
Loading…
Reference in a new issue