Add test for drag and drop database files into main window

This commit is contained in:
frostasm 2017-12-22 20:05:33 +02:00
parent 165d664524
commit 3720c5ef79
3 changed files with 41 additions and 0 deletions

View file

@ -1035,6 +1035,9 @@ void MainWindow::dropEvent(QDropEvent* event)
const QMimeData* mimeData = event->mimeData();
if (mimeData->hasUrls()) {
const QStringList kdbxFiles = kdbxFilesFromUrls(mimeData->urls());
if (!kdbxFiles.isEmpty()) {
event->acceptProposedAction();
}
for (const QString& kdbxFile: kdbxFiles) {
openDatabase(kdbxFile);
}