mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 15:04:44 +01:00
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 <QApplication>
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QDesktopWidget>
|
|
||||||
#include <QDragEnterEvent>
|
#include <QDragEnterEvent>
|
||||||
#include <QListWidget>
|
#include <QListWidget>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
@ -48,6 +47,7 @@
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QMimeData>
|
#include <QMimeData>
|
||||||
#include <QProgressDialog>
|
#include <QProgressDialog>
|
||||||
|
#include <QScreen>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QShortcut>
|
#include <QShortcut>
|
||||||
#include <QStackedWidget>
|
#include <QStackedWidget>
|
||||||
|
@ -81,7 +81,7 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
if (!restoreGeometry(settings.value("MainWindowGeometry").toByteArray())) {
|
if (!restoreGeometry(settings.value("MainWindowGeometry").toByteArray())) {
|
||||||
// Restore failed (perhaps missing setting), center the window
|
// 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
|
#ifdef ENABLE_WALLET
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QDesktopWidget>
|
|
||||||
#include <QDoubleValidator>
|
#include <QDoubleValidator>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QFont>
|
#include <QFont>
|
||||||
|
|
|
@ -28,11 +28,11 @@
|
||||||
#include <wallet/wallet.h>
|
#include <wallet/wallet.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <QDesktopWidget>
|
|
||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
|
#include <QScreen>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QSignalMapper>
|
#include <QSignalMapper>
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
|
@ -451,7 +451,7 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
if (!restoreGeometry(settings.value("RPCConsoleWindowGeometry").toByteArray())) {
|
if (!restoreGeometry(settings.value("RPCConsoleWindowGeometry").toByteArray())) {
|
||||||
// Restore failed (perhaps missing setting), center the window
|
// 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);
|
QChar nonbreaking_hyphen(8209);
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QCloseEvent>
|
#include <QCloseEvent>
|
||||||
#include <QDesktopWidget>
|
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QRadialGradient>
|
#include <QRadialGradient>
|
||||||
|
#include <QScreen>
|
||||||
|
|
||||||
|
|
||||||
SplashScreen::SplashScreen(interfaces::Node& node, Qt::WindowFlags f, const NetworkStyle *networkStyle) :
|
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));
|
QRect r(QPoint(), QSize(pixmap.size().width()/devicePixelRatio,pixmap.size().height()/devicePixelRatio));
|
||||||
resize(r.size());
|
resize(r.size());
|
||||||
setFixedSize(r.size());
|
setFixedSize(r.size());
|
||||||
move(QApplication::desktop()->screenGeometry().center() - r.center());
|
move(QGuiApplication::primaryScreen()->geometry().center() - r.center());
|
||||||
|
|
||||||
subscribeToCoreSignals();
|
subscribeToCoreSignals();
|
||||||
installEventFilter(this);
|
installEventFilter(this);
|
||||||
|
|
Loading…
Add table
Reference in a new issue