cmake plugin cleanups
This commit is contained in:
@@ -12,7 +12,13 @@ set(SOURCES
|
|||||||
weatherwidget.cpp
|
weatherwidget.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(zeiterfassung-plugins-weatherplugin SHARED ${HEADERS} ${SOURCES})
|
set(OTHER_FILES
|
||||||
|
weatherplugin.json
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(zeiterfassung-plugins-weatherplugin SHARED ${HEADERS} ${SOURCES} ${OTHER_FILES})
|
||||||
|
|
||||||
|
set_target_properties(zeiterfassung-plugins-weatherplugin PROPERTIES OUTPUT_NAME weatherplugin PREFIX "")
|
||||||
|
|
||||||
target_link_libraries(zeiterfassung-plugins-weatherplugin Qt5::Core Qt5::Gui Qt5::Widgets zeiterfassungguilib zeiterfassungnetworklib)
|
target_link_libraries(zeiterfassung-plugins-weatherplugin Qt5::Core Qt5::Gui Qt5::Widgets zeiterfassungguilib zeiterfassungnetworklib)
|
||||||
|
|
||||||
|
@@ -6,6 +6,8 @@
|
|||||||
#include <QLocale>
|
#include <QLocale>
|
||||||
#include <QStatusBar>
|
#include <QStatusBar>
|
||||||
|
|
||||||
|
#include "utils/fileutils.h"
|
||||||
|
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
#include "weatherwidget.h"
|
#include "weatherwidget.h"
|
||||||
@@ -16,9 +18,7 @@ WeatherPlugin::WeatherPlugin(QObject *parent) :
|
|||||||
{
|
{
|
||||||
qDebug() << "called";
|
qDebug() << "called";
|
||||||
|
|
||||||
static auto dir = QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(QStringLiteral("translations"));
|
if(m_translator.load(QLocale(), QStringLiteral("weatherplugin"), QStringLiteral("_"), translationsDir()))
|
||||||
|
|
||||||
if(m_translator.load(QLocale(), QStringLiteral("weatherplugin"), QStringLiteral("_"), dir))
|
|
||||||
{
|
{
|
||||||
if(!QCoreApplication::installTranslator(&m_translator))
|
if(!QCoreApplication::installTranslator(&m_translator))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user