Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
Gwenview
Commits
5f23c8f0
Commit
5f23c8f0
authored
Jun 27, 2021
by
Ahmad Samir
Browse files
Port away from deprecated Qt methods
parent
537269eb
Changes
3
Hide whitespace changes
Inline
Side-by-side
lib/crop/cropwidget.cpp
View file @
5f23c8f0
...
...
@@ -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
))
{
...
...
lib/documentview/videoviewadapter.cpp
View file @
5f23c8f0
...
...
@@ -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 <Q
Elapsed
Time
r
>
#include <QLabel>
// Phonon
...
...
@@ -71,7 +71,7 @@ struct VideoViewAdapterPrivate
QGraphicsProxyWidget
*
mProxy
;
HudSlider
*
mVolumeSlider
;
QTime
mLastVolumeSliderChangeTime
;
Q
Elapsed
Time
r
mLastVolumeSliderChangeTime
;
Document
::
Ptr
mDocument
;
...
...
lib/fullscreenbar.cpp
View file @
5f23c8f0
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment