Skip to content

Commit

Permalink
Ensure the watch file name ends with .dmw
Browse files Browse the repository at this point in the history
idk why, putting the filter doesn't do that.....
  • Loading branch information
aldelaro5 committed Nov 3, 2017
1 parent 63a6cc7 commit 2b4ffaa
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Source/GUI/MemWatcher/MemWatchWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ void MemWatchWidget::saveAsWatchFile()
"Dolphin memory watches file (*.dmw)");
if (fileName != "")
{
if (!fileName.endsWith(".dmw"))
fileName.append(".dmw");
QFile watchFile(fileName);
if (!watchFile.open(QIODevice::WriteOnly))
{
Expand Down Expand Up @@ -493,10 +495,10 @@ void MemWatchWidget::exportWatchListAsCSV()
QFile csvFile(fileName);
if (!csvFile.open(QIODevice::WriteOnly))
{
QMessageBox* errorBox = new QMessageBox(
QMessageBox::Critical, "Error while creating file",
"An error occured while creating and opening the csv file for writting",
QMessageBox::Ok, this);
QMessageBox* errorBox =
new QMessageBox(QMessageBox::Critical, "Error while creating file",
"An error occured while creating and opening the csv file for writting",
QMessageBox::Ok, this);
errorBox->exec();
return;
}
Expand Down

0 comments on commit 2b4ffaa

Please sign in to comment.