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
Utilities
KEditBookmarks
Commits
06a013de
Commit
06a013de
authored
Dec 24, 2021
by
Laurent Montel
😁
Browse files
Fix compile against qt6
parent
66131a99
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main.cpp
View file @
06a013de
...
...
@@ -91,9 +91,14 @@ static bool askUser(const QString &filename, bool &readonly)
int
main
(
int
argc
,
char
**
argv
)
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QCoreApplication
::
setAttribute
(
Qt
::
AA_EnableHighDpiScaling
);
#endif
QApplication
app
(
argc
,
argv
);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
// enable high dpi support
app
.
setAttribute
(
Qt
::
AA_UseHighDpiPixmaps
,
true
);
#endif
Kdelibs4ConfigMigrator
migrate
(
QStringLiteral
(
"keditbookmarks"
));
migrate
.
setConfigFiles
(
QStringList
()
<<
QStringLiteral
(
"keditbookmarksrc"
));
migrate
.
setUiFiles
(
QStringList
()
<<
QStringLiteral
(
"keditbookmarksuirc"
));
...
...
@@ -150,10 +155,6 @@ int main(int argc, char **argv)
||
parser
.
isSet
(
QStringLiteral
(
"importkde3"
))
||
parser
.
isSet
(
QStringLiteral
(
"importgaleon"
)));
const
bool
browser
=
!
parser
.
isSet
(
QStringLiteral
(
"nobrowser"
));
// enable high dpi support
app
.
setAttribute
(
Qt
::
AA_UseHighDpiPixmaps
,
true
);
const
bool
gotFilenameArg
=
(
parser
.
positionalArguments
().
count
()
==
1
);
QString
filename
=
gotFilenameArg
?
parser
.
positionalArguments
().
at
(
0
)
...
...
src/toplevel.cpp
View file @
06a013de
...
...
@@ -308,10 +308,18 @@ static bool lessAddress(const QString &first, const QString &second)
uint
bNext
=
b
.
indexOf
(
QLatin1String
(
"/"
),
bLast
+
1
);
bool
okay
;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
uint
aNum
=
a
.
midRef
(
aLast
+
1
,
aNext
-
aLast
-
1
).
toUInt
(
&
okay
);
#else
uint
aNum
=
QStringView
(
a
).
mid
(
aLast
+
1
,
aNext
-
aLast
-
1
).
toUInt
(
&
okay
);
#endif
if
(
!
okay
)
return
false
;
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
uint
bNum
=
b
.
midRef
(
bLast
+
1
,
bNext
-
bLast
-
1
).
toUInt
(
&
okay
);
#else
uint
bNum
=
QStringView
(
b
).
mid
(
bLast
+
1
,
bNext
-
bLast
-
1
).
toUInt
(
&
okay
);
#endif
if
(
!
okay
)
return
true
;
...
...
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