1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +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()){ if (logFile.isOpen()){
logFile.close(); logFile.close();
} }
QFileDialog * fd = new QFileDialog(); QString fileName = QFileDialog::getOpenFileName(NULL, tr("Open file"), QString(""), tr("OpenPilot Log (*.opl)"));
fd->setAcceptMode(QFileDialog::AcceptOpen); if (!fileName.isNull()) {
fd->setNameFilter("OpenPilot Log (*.opl)"); startReplay(fileName);
connect(fd, SIGNAL(fileSelected(QString)), this, SLOT(startReplay(QString))); }
fd->exec();
return &logFile; return &logFile;
} }