Changeset - b390600dec07
[Not reviewed]
default
0 2 0
Hasan Yavuz Ă–ZDERYA - 7 years ago 2018-07-07 12:58:08
hy@ozderya.net
revert record button if recording fails to start (file can't be opened etc)
2 files changed with 10 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/recordpanel.cpp
Show inline comments
 
@@ -210,7 +210,9 @@ void RecordPanel::onRecord(bool start)
 
    else
 
    {
 
        overwriteSelected = false;
 
        startRecording(fn);
 
        // TODO: show more visible error message when recording fails
 
        if (!startRecording(fn))
 
            recordAction.setChecked(false);
 
    }
 
}
 

	
 
@@ -289,7 +291,7 @@ bool RecordPanel::confirmOverwrite(QStri
 
    }
 
}
 

	
 
void RecordPanel::startRecording(QString fileName)
 
bool RecordPanel::startRecording(QString fileName)
 
{
 
    QStringList channelNames;
 
    if (ui->cbHeader->isChecked())
 
@@ -300,6 +302,11 @@ void RecordPanel::startRecording(QString
 
                                channelNames, ui->cbTimestamp->isChecked()))
 
    {
 
        _stream->connectFollower(&recorder);
 
        return true;
 
    }
 
    else
 
    {
 
        return false;
 
    }
 
}
 

	
src/recordpanel.h
Show inline comments
 
@@ -108,7 +108,7 @@ private:
 
    /// Formats timestamp in given text
 
    QString formatTimeStamp(QString t) const;
 

	
 
    void startRecording(QString fileName);
 
    bool startRecording(QString fileName);
 
    void stopRecording(void);
 

	
 
    /// Returns separator text from ui. "\t" is converted to TAB
0 comments (0 inline, 0 general)