Class QDesktopWidget is obsolete.

Missed two more usages.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-05-27 12:08:02 +03:00
parent 71e1cc33c0
commit 4109848349
2 changed files with 5 additions and 4 deletions

View File

@ -36,7 +36,7 @@
#include <QMessageBox>
#include <QPushButton>
#include <QSettings>
#include <QDesktopWidget>
#include <QScreen>
//---------------------------------------------------------------------------------------------------------------------
DialogNewPattern::DialogNewPattern(VContainer *data, const QString &patternPieceName, QWidget *parent)
@ -49,7 +49,7 @@ DialogNewPattern::DialogNewPattern(VContainer *data, const QString &patternPiece
qApp->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c());
QRect position = this->frameGeometry();
position.moveCenter(QDesktopWidget().availableGeometry().center());
position.moveCenter(QGuiApplication::primaryScreen()->availableGeometry().center());
move(position.topLeft());
ui->lineEditName->setText(patternPieceName);

View File

@ -28,8 +28,9 @@
#include "vwidgetpopup.h"
#include <QDesktopWidget>
#include <QScreen>
#include <QFont>
#include <QGuiApplication>
#include <QLabel>
#include <QLayout>
#include <QMessageLogger>
@ -109,7 +110,7 @@ void VWidgetPopup::Show(QPoint coord)
// important to do this before following adjustments!
QFrame::show();
const QRect screen(QDesktopWidget().availableGeometry());
const QRect screen(QGuiApplication::primaryScreen()->availableGeometry());
coord.setX(coord.x() - width()/2);
if (coord.x() < screen.x())