2017-12-21 21:16:37 +01:00
|
|
|
#include "devtoolsplugin.h"
|
|
|
|
|
|
|
|
|
|
#include <QDebug>
|
|
|
|
|
#include <QDir>
|
|
|
|
|
#include <QCoreApplication>
|
|
|
|
|
#include <QLocale>
|
|
|
|
|
|
|
|
|
|
#include "mainwindow.h"
|
|
|
|
|
|
2017-12-21 21:22:01 +01:00
|
|
|
void registerMessageHandler()
|
|
|
|
|
{
|
|
|
|
|
qDebug() << "called";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Q_COREAPP_STARTUP_FUNCTION(registerMessageHandler)
|
|
|
|
|
|
2017-12-21 21:16:37 +01:00
|
|
|
DevToolsPlugin::DevToolsPlugin(QObject *parent) :
|
|
|
|
|
ZeiterfassungPlugin(parent)
|
|
|
|
|
{
|
|
|
|
|
qDebug() << "called";
|
|
|
|
|
|
|
|
|
|
static auto dir = QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(QStringLiteral("translations"));
|
|
|
|
|
|
|
|
|
|
if(m_translator.load(QLocale(), QStringLiteral("devtoolsplugin"), QStringLiteral("_"), dir))
|
|
|
|
|
{
|
|
|
|
|
if(!QCoreApplication::installTranslator(&m_translator))
|
|
|
|
|
{
|
|
|
|
|
qWarning() << "could not install translation devtoolsplugin";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
qWarning() << "could not load translation devtoolsplugin";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DevToolsPlugin::attachTo(MainWindow &mainWindow)
|
|
|
|
|
{
|
|
|
|
|
//TODO
|
|
|
|
|
}
|