Commit 5f23c8f0 authored by Ahmad Samir's avatar Ahmad Samir
Browse files

Port away from deprecated Qt methods

parent 537269eb
......@@ -33,6 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <QtMath>
#include <QLineEdit>
#include <QFontDatabase>
#include <QScreen>
// KF
#include <KLocalizedString>
......@@ -199,10 +200,7 @@ struct CropWidgetPrivate : public QWidget
mCurrentImageComboBoxIndex = ratioComboBox->count() - 1; // We need to refer to this ratio later
addRatioToComboBox(QSizeF(1, 1), i18n("Square"));
addRatioToComboBox(ratio(QApplication::desktop()->screenGeometry().size()), i18n("This Screen"));
// The previous string should be changed to
// addRatioToComboBox(ratio(QGuiApplication::screenAt(QCursor::pos())->geometry().size()), i18n("This Screen"));
// after switching to Qt > 5.9
addRatioToComboBox(ratio(QGuiApplication::screenAt(QCursor::pos())->geometry().size()), i18n("This Screen"));
addSectionHeaderToComboBox(i18n("Landscape"));
for (const QSizeF& size : qAsConst(ratioList)) {
......
......@@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
#include <QMouseEvent>
#include <QElapsedTimer>
#include <QIcon>
#include <QTime>
#include <QElapsedTimer>
#include <QLabel>
// Phonon
......@@ -71,7 +71,7 @@ struct VideoViewAdapterPrivate
QGraphicsProxyWidget* mProxy;
HudSlider* mVolumeSlider;
QTime mLastVolumeSliderChangeTime;
QElapsedTimer mLastVolumeSliderChangeTime;
Document::Ptr mDocument;
......
......@@ -29,6 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <QEvent>
#include <QMouseEvent>
#include <QLayout>
#include <QScreen>
#include <QTimeLine>
#include <QTimer>
#include <QToolButton>
......@@ -84,11 +85,7 @@ struct FullScreenBarPrivate
*/
QRect slideInTriggerRect() const
{
QRect rect = QApplication::desktop()->screenGeometry(QApplication::desktop()->screenNumber(q->parentWidget()));
// The previous string should be changed to
// QRect rect = QGuiApplication::screenAt(QCursor::pos())->geometry();
// after switching to Qt > 5.9
QRect rect = QGuiApplication::screenAt(QCursor::pos())->geometry();
// Take parent widget position into account because it may not be at
// the top of the screen, for example when the save bar warning is
// shown.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment