Merge pull request #24 from arturo182/master

Improvement and a fix
This commit is contained in:
Roman Isaikin
2017-02-16 23:02:49 +03:00
committed by GitHub
3 changed files with 20 additions and 10 deletions

View File

@ -1,4 +1,4 @@
QT += core location QT += core
DEFINES += MSGPACK_MAKE_LIB DEFINES += MSGPACK_MAKE_LIB
@ -12,8 +12,7 @@ SOURCES += \
$$PWD/src/private/qt_types_p.cpp \ $$PWD/src/private/qt_types_p.cpp \
$$PWD/src/msgpackstream.cpp \ $$PWD/src/msgpackstream.cpp \
$$PWD/src/stream/time.cpp \ $$PWD/src/stream/time.cpp \
$$PWD/src/stream/geometry.cpp \ $$PWD/src/stream/geometry.cpp
$$PWD/src/stream/location.cpp
HEADERS += \ HEADERS += \
$$PWD/src/msgpack.h \ $$PWD/src/msgpack.h \
@ -24,6 +23,12 @@ HEADERS += \
$$PWD/src/msgpack_export.h \ $$PWD/src/msgpack_export.h \
$$PWD/src/private/qt_types_p.h \ $$PWD/src/private/qt_types_p.h \
$$PWD/src/msgpackstream.h \ $$PWD/src/msgpackstream.h \
$$PWD/src/stream/location.h \
$$PWD/src/stream/time.h \ $$PWD/src/stream/time.h \
$$PWD/src/stream/geometry.h $$PWD/src/stream/geometry.h
qtHaveModule(location) {
QT += location
SOURCES += $$PWD/src/stream/location.cpp
HEADERS += $$PWD/src/stream/location.h
}

View File

@ -1,4 +1,4 @@
QT += core gui location QT += core gui
TARGET = qmsgpack TARGET = qmsgpack
CONFIG -= app_bundle CONFIG -= app_bundle
@ -21,8 +21,7 @@ SOURCES += msgpack.cpp \
private/qt_types_p.cpp \ private/qt_types_p.cpp \
msgpackstream.cpp \ msgpackstream.cpp \
stream/time.cpp \ stream/time.cpp \
stream/geometry.cpp \ stream/geometry.cpp
stream/location.cpp
HEADERS += \ HEADERS += \
msgpack.h \ msgpack.h \
@ -33,7 +32,6 @@ HEADERS += \
msgpack_export.h \ msgpack_export.h \
private/qt_types_p.h \ private/qt_types_p.h \
msgpackstream.h \ msgpackstream.h \
stream/location.h \
stream/time.h \ stream/time.h \
stream/geometry.h stream/geometry.h
@ -45,9 +43,16 @@ HEADERS_INSTALL = \
msgpackstream.h \ msgpackstream.h \
STREAM_HEADERS_INSTALL = \ STREAM_HEADERS_INSTALL = \
stream/location.h \
stream/time.h stream/time.h
location {
QT += location
SOURCES += stream/location.cpp
HEADERS += stream/location.h
STREAM_HEADERS_INSTALL += stream/location.h
}
unix { unix {
header_files.files = $$HEADERS_INSTALL header_files.files = $$HEADERS_INSTALL
header_files.path = /usr/include/qmsgpack header_files.path = /usr/include/qmsgpack

View File

@ -79,7 +79,7 @@ MsgPackStream& operator>>(MsgPackStream& s, QTime &t)
return s; return s;
} }
if (len == 1) { if (len == 1) {
t == QTime(); t = QTime();
return s; return s;
} }
quint8 p[4]; quint8 p[4];