VirtualBox

Changeset 71537 in vbox


Ignore:
Timestamp:
Mar 28, 2018 12:44:40 PM (7 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6699 Build fix

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime/guestctrl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/guestctrl/UIGuestFileTable.cpp

    r71509 r71537  
    246246        QString destinationFilePath =  UIPathOperations::mergePaths(guestDestinationPath, UIPathOperations::getObjectName(hostSourcePath));
    247247        /** @todo listen to CProgress object to monitor copy operation: */
    248         /*CProgress comProgress =*/ m_comGuestSession.FileCopyFromGuest(hostSourcePath, destinationFilePath, flags);
     248        /*CProgress comProgress =*/ m_comGuestSession.FileCopyToGuest(hostSourcePath, destinationFilePath, flags);
    249249    }
    250250    else if(hostFileInfo.isDir())
    251251    {
    252         QVector<KDirectoryCopyFlag> aFlags(KDirectoryCopyFlag_CopyIntoExisting);
     252        QVector<KDirectoryCopyFlag> aFlags(KDirectoryCopyFlag_None/*CopyIntoExisting*/);
    253253        /** @todo listen to CProgress object to monitor copy operation: */
    254254        /*CProgress comProgress = */ m_comGuestSession.DirectoryCopyToGuest(hostSourcePath, guestDestinationPath, aFlags);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/guestctrl/UIHostFileTable.cpp

    r71531 r71537  
    335335        return propertyString;
    336336    }
    337     else
    338     {
    339         int fileCount = 0;
    340         int directoryCount = 0;
    341         ULONG64 totalSize = 0;
    342 
    343         for(int i = 0; i < selectedObjects.size(); ++i)
    344         {
    345             QFileInfo fileInfo(selectedObjects.at(i));
    346             if (!fileInfo.exists())
    347                 continue;
    348             if (fileInfo.isFile())
    349                 ++fileCount;
    350             if (fileInfo.isDir())
    351                 ++directoryCount;
    352             totalSize += fileInfo.size();
    353         }
    354         QString propertyString;
    355         propertyString += "<b>Selected:</b> " + QString::number(fileCount) + " files ";
    356         propertyString += "and " + QString::number(directoryCount) + " directories";
    357         propertyString += "<br/>";
    358         propertyString += "<b>Size:</b> " + QString::number(totalSize) + QString(" bytes");
    359         if (totalSize >= m_iKiloByte)
    360             propertyString += " (" + humanReadableSize(totalSize) + ")";
    361 
    362 
    363         return propertyString;
    364     }
    365     return QString();
     337
     338    int fileCount = 0;
     339    int directoryCount = 0;
     340    ULONG64 totalSize = 0;
     341
     342    for(int i = 0; i < selectedObjects.size(); ++i)
     343    {
     344        QFileInfo fileInfo(selectedObjects.at(i));
     345        if (!fileInfo.exists())
     346            continue;
     347        if (fileInfo.isFile())
     348            ++fileCount;
     349        if (fileInfo.isDir())
     350            ++directoryCount;
     351        totalSize += fileInfo.size();
     352    }
     353    QString propertyString;
     354    propertyString += "<b>Selected:</b> " + QString::number(fileCount) + " files ";
     355    propertyString += "and " + QString::number(directoryCount) + " directories";
     356    propertyString += "<br/>";
     357    propertyString += "<b>Size:</b> " + QString::number(totalSize) + QString(" bytes");
     358    if (totalSize >= m_iKiloByte)
     359        propertyString += " (" + humanReadableSize(totalSize) + ")";
     360
     361    return propertyString;
    366362}
    367363
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette