Commit 68842839 authored by Martin Tobias Holmedahl Sandsmark's avatar Martin Tobias Holmedahl Sandsmark Committed by Kurt Hindenburg
Browse files

Add the thing to do the launch time measurements, so I don't need to add it again later

parent c78f45de
......@@ -17,6 +17,10 @@
02110-1301 USA.
// To time the creation and total launch time (i. e. until window is
// visible/responsive):
// Own
#include "Application.h"
#include "MainWindow.h"
......@@ -43,6 +47,12 @@
using Konsole::Application;
#include <QElapsedTimer>
#include <QTimer>
#include <QDebug>
// 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[])
QElapsedTimer timer; timer.start();
// 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[])
qDebug() << "Construction completed in" << timer.elapsed() << "ms";
QTimer::singleShot(0, [&timer]() {
qDebug() << "Startup complete in" << timer.elapsed() << "ms";
// 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();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment