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
Konsole
Commits
68842839
Commit
68842839
authored
Aug 23, 2020
by
Martin Tobias Holmedahl Sandsmark
Committed by
Kurt Hindenburg
Sep 05, 2020
Browse files
Add the thing to do the launch time measurements, so I don't need to add it again later
parent
c78f45de
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main.cpp
View file @
68842839
...
...
@@ -17,6 +17,10 @@
02110-1301 USA.
*/
// To time the creation and total launch time (i. e. until window is
// visible/responsive):
//#define PROFILE_STARTUP
// Own
#include "Application.h"
#include "MainWindow.h"
...
...
@@ -43,6 +47,12 @@
using
Konsole
::
Application
;
#ifdef PROFILE_STARTUP
#include <QElapsedTimer>
#include <QTimer>
#include <QDebug>
#endif
// fill the KAboutData structure with information about contributors to Konsole.
void
fillAboutData
(
KAboutData
&
aboutData
);
...
...
@@ -84,6 +94,10 @@ public:
// ***
extern
"C"
int
Q_DECL_EXPORT
kdemain
(
int
argc
,
char
*
argv
[])
{
#ifdef PROFILE_STARTUP
QElapsedTimer
timer
;
timer
.
start
();
#endif
// enable high dpi support
QCoreApplication
::
setAttribute
(
Qt
::
AA_UseHighDpiPixmaps
,
true
);
QCoreApplication
::
setAttribute
(
Qt
::
AA_EnableHighDpiScaling
,
true
);
...
...
@@ -225,6 +239,13 @@ extern "C" int Q_DECL_EXPORT kdemain(int argc, char *argv[])
}
}
#ifdef PROFILE_STARTUP
qDebug
()
<<
"Construction completed in"
<<
timer
.
elapsed
()
<<
"ms"
;
QTimer
::
singleShot
(
0
,
[
&
timer
]()
{
qDebug
()
<<
"Startup complete in"
<<
timer
.
elapsed
()
<<
"ms"
;
});
#endif
// Since we've allocated the QApplication on the heap for the KDBusService workaround,
// we need to delete it manually before returning from main().
int
ret
=
app
->
exec
();
...
...
Write
Preview
Supports
Markdown
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