#include <ctime>

#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>

#include "System/management.h"

int main(int argc, char *argv[]) {
    srand((unsigned)time(NULL));

    QGuiApplication app(argc, argv);

    QQmlApplicationEngine engine;
    // Create management object and register it as context property
    Management *man = new Management();
    engine.rootContext()->setContextProperty("management", man);
    engine.load(QUrl(QStringLiteral("qrc:/main.qml")));

    QObject *canvas = engine.rootObjects().first()->findChild<QObject*>("canvas");
    man->initialize(&engine, canvas);

    return app.exec();
}

#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>

#include "System/management.h"

int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QQmlApplicationEngine engine;
    // Create management object and register it as context property
    Management *man = new Management();
    engine.rootContext()->setContextProperty("management", man);
    engine.load(QUrl(QStringLiteral("qrc:/main.qml")));

    QObject *canvas = engine.rootObjects().first()->findChild<QObject*>("canvas");
    man->initialize(&engine, canvas);

    return app.exec();
}

--- 
+++ 
@@ -1,11 +1,14 @@
+#include <ctime>
+
 #include <QGuiApplication>
 #include <QQmlApplicationEngine>
 #include <QQmlContext>
 
 #include "System/management.h"
 
-int main(int argc, char *argv[])
-{
+int main(int argc, char *argv[]) {
+    srand((unsigned)time(NULL));
+
     QGuiApplication app(argc, argv);
 
     QQmlApplicationEngine engine;
Initialize seed for better random numbers.

Signed-off-by: TheSniperFan <db7563122c08a03c83ae47e44bdc9bc661a824b1@gmail.com>
