Thanks again, Ted.

Coming back with another request because the code also needs to have startsWith() instead of front(). Not your fault because you wouldn't have seen the error building with Qt5 5.10+ on your system.

I'm attaching a patch. Could you apply it and push to master:HEAD here and/or at the other repository? Or I can branch mine (haven't made my fork yet but will be doing so) and submit a merge request.

Thanks.


On 2/17/22 2:58 PM, mark_at_yahoo via Rosegarden-devel wrote:
On 2/17/22 11:52 AM, Ted Felix wrote:
   Thanks, David.  I've committed and pushed.  Also pushed the switch to QString::endsWith().

Thanks, Ted. (From me -- really just a spectator on the sidelines -- in reference to what I wrote in my response to David's message.)


_______________________________________________
Rosegarden-devel mailing list
Rosegarden-devel@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
diff --git a/src/sound/AudioFileManager.cpp b/src/sound/AudioFileManager.cpp
index 57c55d1a0..b1c63922d 100644
--- a/src/sound/AudioFileManager.cpp
+++ b/src/sound/AudioFileManager.cpp
@@ -335,9 +335,9 @@ AudioFileManager::setRelativeAudioPath(
         newRelativePath = ".";
 
     // If the path doesn't start with "~", "/", or "."...
-    if (newRelativePath.front() != '/'  &&
-        newRelativePath.front() != '~'  &&
-        newRelativePath.front() != '.') {
+    if (!newRelativePath.startsWith('/') &&
+        !newRelativePath.startsWith('~') &&
+        !newRelativePath.startsWith('.')) {
         // Use the document path.
         newRelativePath = "./" + newRelativePath;
     }
_______________________________________________
Rosegarden-devel mailing list
Rosegarden-devel@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to