bluetoothengine/btnotif/btdevicedialogplugin/src/btrecvcompleteddialogwidget.cpp
changeset 71 083fd884d7dd
parent 70 f5508c13dfe0
equal deleted inserted replaced
70:f5508c13dfe0 71:083fd884d7dd
   108         //Format the file size into a more readable format
   108         //Format the file size into a more readable format
   109         if ( mFileSz >> 20 )    // size in MB
   109         if ( mFileSz >> 20 )    // size in MB
   110             {       
   110             {       
   111             float sizeInMB = 0;
   111             float sizeInMB = 0;
   112             sizeInMB = ((float)mFileSz ) / (1024*1024);
   112             sizeInMB = ((float)mFileSz ) / (1024*1024);
   113             QString fileSzMb;
   113             QString fileSzMb = QString(hbTrId("txt_common_info_l1_mb")).arg(sizeInMB);
   114             fileSzMb.setNum(sizeInMB);
       
   115             //TODO - check for localization
       
   116             fileSzMb.append(QString(" Mb"));
       
   117             mFileSize->setPlainText(fileSzMb);
   114             mFileSize->setPlainText(fileSzMb);
   118             }
   115             }
   119         
   116         
   120         else if( mFileSz >> 10 )        // size in KB
   117         else if( mFileSz >> 10 )        // size in KB
   121             {
   118             {
   122             TInt64 sizeInKB = 0;
   119             TInt64 sizeInKB = 0;
   123             sizeInKB = mFileSz >> 10;
   120             sizeInKB = mFileSz >> 10;
   124             QString fileSzKb;
   121             QString fileSzKb = QString(hbTrId("txt_common_info_l1_kb")).arg(sizeInKB);
   125             fileSzKb.setNum(sizeInKB);
       
   126             //TODO - check for localization
       
   127             fileSzKb.append(QString(" Kb"));
       
   128             mFileSize->setPlainText(fileSzKb);
   122             mFileSize->setPlainText(fileSzKb);
   129             }
   123             }
   130 
   124 
   131         else                              // size is unknown or less than 1K
   125         else                              // size is unknown or less than 1K
   132             {
   126             {
   133             QString fileSzB;
   127             QString fileSzB = QString(hbTrId("txt_common_info_l1_byte")).arg(mFileSz);
   134             fileSzB.setNum(mFileSz);
       
   135             //TODO - check for localization
       
   136             fileSzB.append(QString(" Bytes"));
       
   137             mFileSize->setPlainText(fileSzB);
   128             mFileSize->setPlainText(fileSzB);
   138             }
   129             }
   139 
   130 
   140         //Set the received file count
   131         //Set the received file count
   141         int fCnt = parameters.value(QString::number(TBluetoothDeviceDialog::EReceivedFileCount)).toInt();
   132         int fCnt = parameters.value(QString::number(TBluetoothDeviceDialog::EReceivedFileCount)).toInt();