~mateo-salta/nitroshare/nitroshare

« back to all changes in this revision

Viewing changes to src/file/CFileHeader.cpp

  • Committer: Nathan Osman
  • Date: 2012-06-28 00:44:25 UTC
  • Revision ID: admin@quickmediasolutions.com-20120628004425-k7sozkt1raz215qh
Added progress display in the share box for multiple file transfers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
#include <file/CFileHeader.h>
21
21
 
22
 
bool CFileHeader::GetContents(QByteArray & contents)
 
22
bool CFileHeader::GetContents(QByteArray & contents, qint64 & uncompressed_size)
23
23
{
24
24
    QFile file(m_full_filename);
25
25
 
26
26
    /* Attempt to open the file for reading. */
27
27
    if(file.open(QIODevice::ReadOnly))
28
28
    {
29
 
        /* Read the file contents. */
30
 
        contents = file.readAll();
 
29
        /* Grab the file size and read the file contents. */
 
30
        uncompressed_size = file.size();
 
31
        contents          = file.readAll();
31
32
 
32
33
        /* If the user has requested compression, then perform that. */
33
34
        if(m_compressed)