SANKORE-519 Runtime error on D'n'D process.

Now sankore copy locally stored files correctly.
preferencesAboutTextFull
Aleksei Kanash 13 years ago
parent 32cd8b9a85
commit ceca63c42e
  1. 2
      src/board/UBLibraryController.cpp
  2. 10
      src/gui/UBLibraryWidget.cpp

@ -155,7 +155,7 @@ void UBLibraryController::routeItem(QString& pItem, QString pMiddleDirectory)
}
destination = UBFileSystemUtils::normalizeFilePath(destination + "/" + itemToRoute.fileName());
QFile::copy(pItem, destination);
UBFileSystemUtils::copyFile(QUrl(pItem).toLocalFile(), destination, false);
}
}

@ -362,16 +362,8 @@ void UBLibraryWidget::dropEvent(QDropEvent *event)
if (pMimeData->hasUrls()){
QList<QUrl> urlList = pMimeData->urls();
for (int i = 0; i < urlList.size() && i < 32; ++i){
QString filePath;
QString crntPath = urlList.at(i).toString();
if(crntPath.startsWith("file:") || crntPath.startsWith("/")){
filePath = QUrl(crntPath).toLocalFile();
}else{
filePath = crntPath;
}
mLibraryController->importItemOnLibrary(filePath);
mLibraryController->importItemOnLibrary(crntPath);
bDropAccepted = true;
}
}

Loading…
Cancel
Save