MCPcopy Create free account
hub / github.com/bumptop/BumpTop / resolveDropOperationString

Method resolveDropOperationString

trunk/win/Source/BT_FileSystemActor.cpp:896–926  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

894}
895
896QString FileSystemActor::resolveDropOperationString(vector<BumpObject *>& objList)
897{
898 // if this is a recycle bin, then show "delete files"
899 if (isFileSystemType(Virtual) &&
900 winOS->GetIconTypeFromFileName(getFullPath()) == RecycleBin)
901 {
902 return QT_TR_NOOP("Delete");
903 }
904 else if (isFileSystemType(Executable))
905 {
906 return QT_TR_NOOP("Launch %1").arg(getFileName(true));
907 }
908 else if (isFileSystemType(Link))
909 {
910 // check if we are pointing to a folder or not
911 if (!QFileInfo(getTargetPath()).isDir())
912 {
913 return QT_TR_NOOP("Launch %1").arg(getFileName(true));
914 }
915 }
916 else
917 {
918 // check if the root of the items in the object list is different
919 // than that of this item
920 if (isCopyIntoActor(objList)) // Shift forces move, Ctrl forces copy, common root defaults to move
921 {
922 return QT_TR_NOOP("Copy");
923 }
924 }
925 return Actor::resolveDropOperationString(objList);
926}
927
928bool FileSystemActor::isValidDropTarget()
929{

Callers

nothing calls this directly

Calls 5

getFileNameFunction · 0.85
QFileInfoClass · 0.85
isDirMethod · 0.80
argMethod · 0.45

Tested by

no test coverage detected