1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

Fix for OP-455

This commit is contained in:
Peter Gunnarsson 2011-08-05 12:22:08 +02:00
parent a7cce25252
commit 11d5d0b6d1

View File

@ -76,11 +76,10 @@ QIODevice* LoggingConnection::openDevice(const QString &deviceName)
if (logFile.isOpen()){
logFile.close();
}
QFileDialog * fd = new QFileDialog();
fd->setAcceptMode(QFileDialog::AcceptOpen);
fd->setNameFilter("OpenPilot Log (*.opl)");
connect(fd, SIGNAL(fileSelected(QString)), this, SLOT(startReplay(QString)));
fd->exec();
QString fileName = QFileDialog::getOpenFileName(NULL, tr("Open file"), QString(""), tr("OpenPilot Log (*.opl)"));
if (!fileName.isNull()) {
startReplay(fileName);
}
return &logFile;
}