From 0573929ec51e3a58aa30da4b4b8f9cf8c069e6f8 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Wed, 22 Jan 2020 09:42:12 -0500 Subject: Added CIs in readme --- player.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'player.cpp') diff --git a/player.cpp b/player.cpp index b707aa7..dd95b23 100644 --- a/player.cpp +++ b/player.cpp @@ -1,10 +1,11 @@ -#include "player.h" -#include "ui_player.h" -#include "about.h" #include #include #include #include +#include "player.h" +#include "ui_player.h" +#include "about.h" + void Player::mFileDialog() @@ -14,13 +15,17 @@ void Player::mFileDialog() mFile = QFileDialog::getOpenFileName(this, "Open any audio file", QDir::homePath(), tr("Audio Files (*.mp3 *.wav *.ogg)")); if (mFile == NULL) { qDebug() << "File cannot be found"; - msgbox.setText("File is invalid."); + msgbox.setWindowTitle("Uh oh! An error has occured!"); + msgbox.setText("File is invalid. Maybe try loading a valid audio file."); + msgbox.setIcon(QMessageBox::Critical); msgbox.exec(); return; } else { mPlayer->setMedia(QUrl::fromLocalFile(mFile)); qDebug() << "Opening" << mFile; + msgbox.setWindowTitle("Success!"); msgbox.setText("This audio file has been loaded."); + msgbox.setIcon(QMessageBox::Information); msgbox.exec(); return; } -- cgit v1.2.3