g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/include -I. -I. -o main.o main.cppIn file included from main.cpp:6:thread.h:8:25: error: QElapsedTimer: No such file or directorymake: *** [main.o] Error 1
functions.cpp:311: error: no matching function for call to 'QByteArray::append(char [1024], unsigned int)'/usr/include/qt4/QtCore/qbytearray.h:210: note: candidates are: QByteArray& QByteArray::append(char)/usr/include/qt4/QtCore/qbytearray.h:211: note: QByteArray& QByteArray::append(const char*)/usr/include/qt4/QtCore/qbytearray.h:212: note: QByteArray& QByteArray::append(const QByteArray&)/usr/include/qt4/QtCore/qstring.h:939: note: QByteArray& QByteArray::append(const QString&)functions.cpp:687: error: 'currentMSecsSinceEpoch' is not a member of 'QDateTime'
C++ (Qt)QByteArray Functions::uncompress(const QByteArray &data){ if (data.size() <= 4) { qWarning("uncompress: Input data is truncated"); return QByteArray(); } QByteArray result; int ret; z_stream strm; static const int CHUNK_SIZE = 1024; char out[CHUNK_SIZE]; /* allocate inflate state */ strm.zalloc = Z_NULL; strm.zfree = Z_NULL; strm.opaque = Z_NULL; strm.avail_in = data.size(); strm.next_in = (Bytef*)(data.data()); ret = inflateInit2(&strm, 15 + 32); // gzip decoding if (ret != Z_OK) return QByteArray(); // run inflate() do { strm.avail_out = CHUNK_SIZE; strm.next_out = (Bytef*)(out); ret = inflate(&strm, Z_NO_FLUSH); Q_ASSERT(ret != Z_STREAM_ERROR); // state not clobbered switch (ret) { case Z_NEED_DICT: ret = Z_DATA_ERROR; // and fall through case Z_DATA_ERROR: case Z_MEM_ERROR: (void)inflateEnd(&strm); return QByteArray(); } result.append(out, CHUNK_SIZE - strm.avail_out); } while (strm.avail_out == 0); // clean up and return inflateEnd(&strm); return result;}
как заменить мне старые либы на новые?