File tree 4 files changed +15
-4
lines changed
4 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ if(BUILD_WITH_TELNET_LOGGING)
239
239
target_compile_definitions (log4qt
240
240
PRIVATE
241
241
LOG4QT_TELNET_LOGGING_SUPPORT
242
- )
242
+ )
243
243
target_link_libraries (log4qt PRIVATE Qt${QT_VERSION_MAJOR} ::Network)
244
244
target_include_directories (log4qt
245
245
PUBLIC
Original file line number Diff line number Diff line change @@ -56,19 +56,25 @@ class LOG4QT_EXPORT DateTime : public QDateTime
56
56
57
57
DateTime (const DateTime &other);
58
58
59
+ #if QT_VERSION < 0x060500
59
60
/* !
60
61
* Constructs a datetime with the given \a date and \a time, using
61
62
* the time specification defined by \a timeSpec.
62
63
*
63
64
* \sa QDateTime::QDateTime(const QDate &date, const QTime &time,
64
65
* Qt::TimeSpec timeSpec = Qt::LocalTime)
65
66
*/
66
- #if QT_VERSION < 0x060500
67
67
DateTime (QDate date,
68
68
QTime time,
69
69
Qt::TimeSpec timeSpec = Qt::LocalTime);
70
70
#else
71
-
71
+ /* !
72
+ * Constructs a datetime with the given \a date and \a time, using
73
+ * the time zone defined by \a QTimeZone.
74
+ *
75
+ * \sa QDateTime::QDateTime(const QDate &date, const QTime &time,
76
+ * QTimeZone = QTimeZone(QTimeZone::LocalTime))
77
+ */
72
78
DateTime (QDate date,
73
79
QTime time,
74
80
QTimeZone = QTimeZone(QTimeZone::LocalTime));
Original file line number Diff line number Diff line change @@ -353,7 +353,7 @@ void LogManager::welcome()
353
353
{
354
354
QDateTime utc = start_time.toUTC ();
355
355
QDateTime local = start_time.toLocalTime ();
356
- QDateTime local_as_utc = QDateTime (local.date (), local.time (), QTimeZone (Qt::UTC ));
356
+ QDateTime local_as_utc = QDateTime (local.date (), local.time (), QTimeZone::utc ( ));
357
357
int min = utc.secsTo (local_as_utc) / 60 ;
358
358
if (min < 0 )
359
359
offset += QLatin1Char (' -' );
Original file line number Diff line number Diff line change 26
26
#include " level.h"
27
27
28
28
#include < QObject>
29
+ #if QT_VERSION >= 0x060500
29
30
#include < QtQml/qqmlregistration.h>
31
+ #endif
30
32
31
33
namespace Log4Qt
32
34
{
@@ -57,7 +59,10 @@ class LOG4QT_EXPORT QmlLogger : public QObject
57
59
Q_PROPERTY (QString name READ name WRITE setName NOTIFY nameChanged)
58
60
Q_PROPERTY (QString context READ context WRITE setContext NOTIFY contextChanged)
59
61
Q_PROPERTY (Level level READ level WRITE setLevel NOTIFY levelChanged)
62
+ #if QT_VERSION >= 0x060500
60
63
QML_NAMED_ELEMENT (Logger)
64
+ #endif
65
+
61
66
62
67
public:
63
68
enum Level
You can’t perform that action at this time.
0 commit comments