tools/hhtracer/main.cpp
author unC0Rr
Fri, 10 Jan 2025 17:37:34 +0100
changeset 16084 2d65bd46c92f
child 16085 9ad74696ddec
permissions -rw-r--r--
Start work on hedgehog tracer
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16084
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
     1
#include <QGuiApplication>
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
     2
#include <QQmlApplicationEngine>
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
     3
#include <QQmlContext>
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
     4
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
     5
#include "tracer.h"
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
     6
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
     7
int main(int argc, char *argv[]) {
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
     8
  QGuiApplication app(argc, argv);
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
     9
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
    10
  QQmlApplicationEngine engine;
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
    11
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
    12
  // Tracer tracer;
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
    13
  // engine.rootContext()->setContextProperty(QStringLiteral("tracer"),
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
    14
  // &tracer);
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
    15
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
    16
  QObject::connect(
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
    17
      &engine, &QQmlApplicationEngine::objectCreationFailed, &app,
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
    18
      []() { QCoreApplication::exit(-1); }, Qt::QueuedConnection);
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
    19
  engine.loadFromModule("hhtracer", "Main");
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
    20
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
    21
  return app.exec();
2d65bd46c92f Start work on hedgehog tracer
unC0Rr
parents:
diff changeset
    22
}