Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
KRuler
Commits
daa16e00
Commit
daa16e00
authored
Dec 22, 2021
by
Laurent Montel
Browse files
Fix against qt6
parent
a94386c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
klineal.cpp
View file @
daa16e00
...
...
@@ -11,7 +11,7 @@
#include
<QAction>
#include
<QApplication>
#include
<QBrush>
#include
<Q
DesktopWidget
>
#include
<Q
Screen
>
#include
<QInputDialog>
#include
<QMenu>
#include
<QMouseEvent>
...
...
@@ -35,7 +35,11 @@
#include
"krulerconfig.h"
#ifdef KRULER_HAVE_X11
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include
<QX11Info>
#else
#include
<private/qtx11extras_p.h>
#endif
#include
<netwm.h>
#endif
...
...
@@ -294,7 +298,7 @@ void KLineal::setHorizontal( bool horizontal )
QPoint
newTopLeft
=
QPoint
(
center
.
x
()
-
height
()
/
2
,
center
.
y
()
-
width
()
/
2
);
r
.
moveTo
(
newTopLeft
);
QRect
desktop
=
QApplication
::
desktop
()
->
screenG
eometry
(
this
);
QRect
desktop
=
Q
Gui
Application
::
primaryScreen
()
->
g
eometry
();
if
(
r
.
width
()
>
desktop
.
width
()
)
{
r
.
setWidth
(
desktop
.
width
()
);
...
...
main.cpp
View file @
daa16e00
...
...
@@ -18,12 +18,16 @@
int
main
(
int
argc
,
char
*
argv
[])
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QCoreApplication
::
setAttribute
(
Qt
::
AA_UseHighDpiPixmaps
);
#endif
QApplication
app
(
argc
,
argv
);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
Kdelibs4ConfigMigrator
migrate
(
QStringLiteral
(
"kruler"
));
migrate
.
setConfigFiles
(
QStringList
()
<<
QStringLiteral
(
"krulerrc"
)
<<
QStringLiteral
(
"kruler.notifyrc"
));
migrate
.
setUiFiles
(
QStringList
()
<<
QStringLiteral
(
"krulerui.rc"
));
migrate
.
migrate
();
#endif
KAboutData
aboutData
(
QStringLiteral
(
"kruler"
),
i18n
(
"KDE Screen Ruler"
),
QStringLiteral
(
KRULER_VERSION_STRING
),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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