Changeset - 766ff372c5cb
[Not reviewed]
recording
0 1 0
Hasan Yavuz Ă–ZDERYA - 9 years ago 2017-02-16 06:33:21
hy@ozderya.net
show warning if separator is empty
1 file changed with 12 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/recordpanel.cpp
Show inline comments
 
@@ -108,14 +108,22 @@ void RecordPanel::onRecord(bool start)
 
        return;
 
    }
 

	
 
    bool canceled = false;
 
    if (ui->leSeparator->text().isEmpty())
 
    {
 
        QMessageBox::critical(this, "Error",
 
                              "Column separator cannot be empty! Please select a separator.");
 
        ui->leSeparator->setFocus(Qt::OtherFocusReason);
 
        canceled = true;
 
    }
 

	
 
    // check file name
 
    bool canceled = false;
 
    if (selectedFile.isEmpty() && !selectFile())
 
    if (!canceled && selectedFile.isEmpty() && !selectFile())
 
    {
 
        canceled = true;
 
    }
 

	
 
    if (!overwriteSelected && QFile::exists(selectedFile))
 
    if (!canceled && !overwriteSelected && QFile::exists(selectedFile))
 
    {
 
        if (ui->cbAutoIncrement->isChecked())
 
        {
 
@@ -127,7 +135,6 @@ void RecordPanel::onRecord(bool start)
 
            canceled = !confirmOverwrite(selectedFile);
 
        }
 
    }
 
    overwriteSelected = false;
 

	
 
    if (canceled)
 
    {
 
@@ -135,6 +142,7 @@ void RecordPanel::onRecord(bool start)
 
    }
 
    else
 
    {
 
        overwriteSelected = false;
 
        startRecording();
 
    }
 
}
0 comments (0 inline, 0 general)