← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

Re: [Merge] lp:~nik90/ubuntu-clock-app/improve-sound-detection into lp:ubuntu-clock-app

 

Review: Needs Fixing

Really awesome work!
You also improved variable names. It is not more intuitive.

Some small commend, and we are ready to go.

Diff comments:

> 
> === renamed file 'backend/modules/Clock/Utility/customalarmsound.cpp' => 'backend/modules/Clock/Utility/alarmsound.cpp'
> --- backend/modules/Clock/Utility/customalarmsound.cpp	2015-08-22 21:19:54 +0000
> +++ backend/modules/Clock/Utility/alarmsound.cpp	2015-08-24 16:45:32 +0000
> @@ -59,3 +60,33 @@
>  
>      dir.mkpath(m_customAlarmDir);
>  }
> +
> +bool AlarmSound::isAlarmSoundValid(const QString &soundFileName)
> +{
> +    QFileInfo soundFile;
> +
> +    if (soundFile.exists(m_defaultAlarmDir + soundFileName)) {

You mixed here two code styles.

You should move "{" into new line.

> +        return true;
> +    } else if (soundFile.exists(m_customAlarmDir + soundFileName)) {
> +        return true;
> +    } else {
> +        return false;
> +    }
> +}
> +
> +bool AlarmSound::isAlarmSoundValid(const QUrl &soundUrl)
> +{
> +    QFileInfo soundFile;
> +    return soundFile.exists(soundUrl.path());
> +}
> +
> +QString AlarmSound::getDefaultAlarmSoundPath(const QString &soundFileName) const
> +{
> +    return m_defaultAlarmDir + soundFileName;
> +}
> +
> +QString AlarmSound::getSoundName(const QString &soundPath) const
> +{
> +    QFileInfo soundFile(soundPath);
> +    return soundFile.baseName();
> +}


-- 
https://code.launchpad.net/~nik90/ubuntu-clock-app/improve-sound-detection/+merge/268931
Your team Ubuntu Clock Developers is subscribed to branch lp:ubuntu-clock-app.


References