1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Revert "Attempt to fix QDataStream operator<< ODR violation"

This reverts commit afe2dbd128.
This commit is contained in:
tux3 2015-11-10 15:57:55 +01:00
parent 3c51928473
commit 5b42b9984b
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -17,9 +17,6 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#define QT_NO_DATASTREAM
#include <QString>
#undef QT_NO_DATASTREAM
#include "settingsserializer.h"
#include "serialize.h"
#include "src/nexus.h"
@ -39,7 +36,12 @@ inline QDataStream& operator<<(QDataStream& dataStream, const SettingsSerializer
return dataStream << static_cast<uint8_t>(tag);
}
static inline QDataStream& operator<<(QDataStream& dataStream, const QByteArray& data)
inline QDataStream& operator<<(QDataStream& dataStream, const QString& str)
{
return dataStream << str.toUtf8();
}
inline QDataStream& operator<<(QDataStream& dataStream, const QByteArray& data)
{
QByteArray size = vuintToData(data.size());
dataStream.writeRawData(size.data(), size.size());
@ -47,17 +49,12 @@ static inline QDataStream& operator<<(QDataStream& dataStream, const QByteArray&
return dataStream;
}
static inline QDataStream& operator<<(QDataStream& dataStream, const QString& str)
{
return dataStream << str.toUtf8();
}
QDataStream& operator>>(QDataStream& dataStream, SettingsSerializer::RecordTag& tag)
{
return dataStream.operator >>((uint8_t&)tag);
}
static inline QDataStream& operator>>(QDataStream& dataStream, QByteArray& data)
inline QDataStream& operator>>(QDataStream& dataStream, QByteArray& data)
{
unsigned char num3;
size_t num = 0;