Finished modified shuffling algorithm

Here's a brief description of how the algorithm now works:
Loop through the set of tracks to be shuffled:
    1) Set Track A as the current point in the shuffle set
    2) Repeat a maximum of 10 times or until a good place (1/4 of the
       playlist away from a conflict) is reached:
        a) Pick a random track within the shuffle set (Track B)
        b) Check 1/4 of the playlist up and down (clamped at the
           beginning and end) from Track B's position for Track A
        c) Check 1/4 of the playlist up and down (clamped at the
           beginning and end) from Track A's position for Track B
        d) If there was a conflict, store the position if it was better
           than the already stored best position. The position is deemed
           "better" if the distance (square of the difference) of
           the closest conflict (Track B near Track A's position and vv)
           is larger than previous iterations.
3) If no good place was found, use the stored best position
4) Swap Track A and Track B

The "tempTrackDistance" variable in the following might be confusing:
...
            for (int count=startPosition; count < endPosition; count++) {
                if (trackPositionIds.value(count) == trackBId && count != trackBPosition) {
                    conflictFound = true;
                    int tempTrackDistance =
                        (trackAPosition - count) * (trackAPosition - count);
                    if (tempTrackDistance < trackDistance || trackDistance == -1)
                        trackDistance = tempTrackDistance;
                }
            }
...
The reason it is there is to prevent a longer distance from being saved in
the case that there are multiple conflicts within the range.

The section of code that checks around Track A's and Track B's position is
repetitive; I chose to leave it that way for clarity for now but perhaps
it would be better to extract it into a private function?

I have also renamed a few variables and fixed some comment typos for clarity.