Removed utils as they are now moved into common lib

This commit is contained in:
Daniel Brunner
2018-09-17 20:27:58 +02:00
parent 3081d7de2d
commit 09141b1a59
7 changed files with 5 additions and 39 deletions

View File

@@ -1,23 +0,0 @@
#include "timeutils.h"
int timeToSeconds(const QTime &time)
{
return QTime(0, 0).secsTo(time);
}
QTime timeBetween(const QTime &l, const QTime &r)
{
Q_ASSERT(l <= r);
return QTime(0, 0).addSecs(l.secsTo(r));
}
QTime timeAdd(const QTime &l, const QTime &r)
{
Q_ASSERT(timeToSeconds(l) + timeToSeconds(r) < 86400);
return l.addSecs(QTime(0, 0).secsTo(r));
}
QTime timeNormalise(const QTime &time)
{
return QTime(time.hour(), time.minute());
}

View File

@@ -1,10 +0,0 @@
#pragma once
#include <QTime>
#include "zeiterfassungcorelib_global.h"
int ZEITERFASSUNGCORELIB_EXPORT timeToSeconds(const QTime &time);
QTime ZEITERFASSUNGCORELIB_EXPORT timeBetween(const QTime &l, const QTime &r);
QTime ZEITERFASSUNGCORELIB_EXPORT timeAdd(const QTime &l, const QTime &r);
QTime ZEITERFASSUNGCORELIB_EXPORT timeNormalise(const QTime &time);

View File

@@ -9,7 +9,7 @@ PROJECT_ROOT = ../..
DEFINES += ZEITERFASSUNGCORELIB_LIBRARY
SOURCES += timeutils.cpp \
SOURCES += \
zeiterfassungapi.cpp \
zeiterfassungsettings.cpp \
replies/createbookingreply.cpp \
@@ -31,7 +31,6 @@ SOURCES += timeutils.cpp \
replies/zeiterfassungreply.cpp
HEADERS += cpp14polyfills.h \
timeutils.h \
zeiterfassungapi.h \
zeiterfassungcorelib_global.h \
zeiterfassungsettings.h \

View File

@@ -17,7 +17,7 @@
#include <QDebug>
#include "zeiterfassungapi.h"
#include "timeutils.h"
#include "utils/timeutils.h"
#include "zeiterfassungsettings.h"
#include "stripfactory.h"
#include "stripswidget.h"

View File

@@ -10,7 +10,7 @@
#include "mainwindow.h"
#include "zeiterfassungapi.h"
#include "timeutils.h"
#include "utils/timeutils.h"
#include "stripfactory.h"
StripsWidget::StripsWidget(MainWindow &mainWindow, QWidget *parent) :

View File

@@ -1,6 +1,6 @@
QT += core network gui widgets uitools
DBLIBS += zeiterfassungcore
DBLIBS += dbcore zeiterfassungcore
TARGET = zeiterfassunggui