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
Education
KBruch
Commits
58946148
Commit
58946148
authored
Jan 23, 2022
by
Laurent Montel
Browse files
It will be removed in qt6
parent
cd0abd82
Pipeline
#127621
passed with stage
in 55 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/KBruch.cpp
View file @
58946148
...
...
@@ -21,7 +21,9 @@
#include
<KLocalizedString>
/* these includes are needed for Qt support */
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include
<Kdelibs4ConfigMigrator>
#endif
#include
<QApplication>
#include
<QCommandLineParser>
#include
<QObject>
...
...
@@ -31,18 +33,20 @@ int main(int argc, char * argv[])
{
// init random generator
qsrand
(
time
(
nullptr
));
#if QT_VERSION
>=
QT_VERSION_CHECK(6, 0, 0)
#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)
app
.
setAttribute
(
Qt
::
AA_UseHighDpiPixmaps
,
true
);
#endif
KLocalizedString
::
setApplicationDomain
(
"kbruch"
);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
Kdelibs4ConfigMigrator
migrate
(
QStringLiteral
(
"kbruch"
));
migrate
.
setConfigFiles
(
QStringList
()
<<
QStringLiteral
(
"kbruchrc"
));
migrate
.
setUiFiles
(
QStringList
()
<<
QStringLiteral
(
"AppMenuWidgetui.rc"
)
<<
QStringLiteral
(
"FractionRingWidgetui.rc"
)
<<
QStringLiteral
(
"kbruchui.rc"
));
migrate
.
migrate
();
#endif
/* fill the about data; the common KDE about dialog will show it to the
...
...
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