diff --git a/plugins/advancedviewplugin/advancedviewplugin.cpp b/plugins/advancedviewplugin/advancedviewplugin.cpp index e4124ba..12a241a 100644 --- a/plugins/advancedviewplugin/advancedviewplugin.cpp +++ b/plugins/advancedviewplugin/advancedviewplugin.cpp @@ -1,5 +1,6 @@ #include "advancedviewplugin.h" +#include #include #include "mainwindow.h" @@ -9,6 +10,7 @@ AdvancedViewPlugin::AdvancedViewPlugin(QObject *parent) : ZeiterfassungPlugin(parent) { + qDebug() << "called"; Q_INIT_RESOURCE(advancedviewplugin_resources); } diff --git a/plugins/lunchmealplugin/lunchmealplugin.cpp b/plugins/lunchmealplugin/lunchmealplugin.cpp index e1b1b92..ce70c4e 100644 --- a/plugins/lunchmealplugin/lunchmealplugin.cpp +++ b/plugins/lunchmealplugin/lunchmealplugin.cpp @@ -5,5 +5,5 @@ LunchMealPlugin::LunchMealPlugin(QObject *parent) : ZeiterfassungPlugin(parent) { - + qDebug() << "called"; } diff --git a/plugins/plugins.pro b/plugins/plugins.pro index e062acc..ceae520 100644 --- a/plugins/plugins.pro +++ b/plugins/plugins.pro @@ -3,4 +3,5 @@ TEMPLATE = subdirs SUBDIRS += advancedviewplugin \ lunchmealplugin \ presenceplugin \ + updaterplugin \ weatherplugin diff --git a/plugins/updaterplugin/updaterplugin.cpp b/plugins/updaterplugin/updaterplugin.cpp new file mode 100644 index 0000000..a19a90e --- /dev/null +++ b/plugins/updaterplugin/updaterplugin.cpp @@ -0,0 +1,14 @@ +#include "updaterplugin.h" + +#include + +UpdaterPlugin::UpdaterPlugin(QObject *parent) : + ZeiterfassungPlugin(parent) +{ + qDebug() << "called"; +} + +void UpdaterPlugin::attachTo(MainWindow &mainWindow) +{ + +} diff --git a/plugins/updaterplugin/updaterplugin.h b/plugins/updaterplugin/updaterplugin.h new file mode 100644 index 0000000..99d5c17 --- /dev/null +++ b/plugins/updaterplugin/updaterplugin.h @@ -0,0 +1,23 @@ +#ifndef UPDATERPLUGIN_H +#define UPDATERPLUGIN_H + +#include + +#include "zeiterfassungplugin.h" + +class MainWindow; + +class Q_DECL_EXPORT UpdaterPlugin : public ZeiterfassungPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "dbsoftware.zeiterfassung.plugin/1.0" FILE "updaterplugin.json") + Q_INTERFACES(ZeiterfassungPlugin) + +public: + explicit UpdaterPlugin(QObject *parent = Q_NULLPTR); + + // ZeiterfassungPlugin interface + void attachTo(MainWindow &mainWindow); +}; + +#endif // UPDATERPLUGIN_H diff --git a/plugins/updaterplugin/updaterplugin.json b/plugins/updaterplugin/updaterplugin.json new file mode 100644 index 0000000..e69de29 diff --git a/plugins/updaterplugin/updaterplugin.pro b/plugins/updaterplugin/updaterplugin.pro new file mode 100644 index 0000000..ea8097d --- /dev/null +++ b/plugins/updaterplugin/updaterplugin.pro @@ -0,0 +1,27 @@ +QT += core network gui widgets + +TARGET = advancedviewplugin +TEMPLATE = lib + +CONFIG += shared c++14 + +DESTDIR = $${OUT_PWD}/../../bin/plugins/zeiterfassung + +LIBS += -L$$OUT_PWD/../../lib -lzeiterfassunglib + +INCLUDEPATH += $$PWD/../../zeiterfassunglib +DEPENDPATH += $$PWD/../../zeiterfassunglib + +DEFINES += QT_DEPRECATED_WARNINGS QT_DISABLE_DEPRECATED_BEFORE=0x060000 QT_MESSAGELOGCONTEXT + +HEADERS += updaterplugin.h + +SOURCES += updaterplugin.cpp + +FORMS += + +RESOURCES += + +TRANSLATIONS += + +OTHER_FILES += updaterplugin.json diff --git a/plugins/weatherplugin/weatherplugin.cpp b/plugins/weatherplugin/weatherplugin.cpp index 0be043f..c30cc4c 100644 --- a/plugins/weatherplugin/weatherplugin.cpp +++ b/plugins/weatherplugin/weatherplugin.cpp @@ -5,5 +5,5 @@ WeatherPlugin::WeatherPlugin(QObject *parent) : ZeiterfassungPlugin(parent) { - + qDebug() << "called"; } diff --git a/zeiterfassung/main.cpp b/zeiterfassung/main.cpp index 788078b..61d015d 100755 --- a/zeiterfassung/main.cpp +++ b/zeiterfassung/main.cpp @@ -278,10 +278,18 @@ bool loadPlugins(QSplashScreen &splashScreen) for(const auto &fileInfo : dir.entryInfoList(QDir::Files)) { if(fileInfo.isSymLink()) + { + qWarning() << "skipping" << fileInfo.fileName() << "because symlink"; continue; // to skip unix so symlinks + } if(!QLibrary::isLibrary(fileInfo.filePath())) + { + qWarning() << "skipping" << fileInfo.fileName() << "because no QLibrary"; continue; // to skip windows junk files + } + + qDebug() << "loading" << fileInfo.fileName(); QPluginLoader loader(fileInfo.filePath()); if(!loader.load()) diff --git a/zeiterfassunglib/stripswidget.cpp b/zeiterfassunglib/stripswidget.cpp index 07814bc..34f41a8 100644 --- a/zeiterfassunglib/stripswidget.cpp +++ b/zeiterfassunglib/stripswidget.cpp @@ -23,8 +23,8 @@ StripsWidget::StripsWidget(MainWindow &mainWindow, QWidget *parent) : { auto layout = new QVBoxLayout(this); - m_headerLayout = new QHBoxLayout(this); - m_label = new QLabel(this); + m_headerLayout = new QHBoxLayout; + m_label = new QLabel; { auto font = m_label->font(); font.setBold(true); @@ -33,7 +33,7 @@ StripsWidget::StripsWidget(MainWindow &mainWindow, QWidget *parent) : m_headerLayout->addWidget(m_label, 1); layout->addLayout(m_headerLayout); - m_stripsLayout = new QVBoxLayout(this); + m_stripsLayout = new QVBoxLayout; layout->addLayout(m_stripsLayout); layout->addStretch(1); diff --git a/zeiterfassunglib/zeiterfassungapi.cpp b/zeiterfassunglib/zeiterfassungapi.cpp index 84bebfa..1d62a58 100644 --- a/zeiterfassunglib/zeiterfassungapi.cpp +++ b/zeiterfassunglib/zeiterfassungapi.cpp @@ -55,8 +55,6 @@ std::unique_ptr ZeiterfassungApi::doLoginPage() auto reply = std::unique_ptr(m_manager->get(request)); - qDebug() << reply->parent(); - return std::make_unique(std::move(reply), this); }