diff options
| author | Cerapter <cerap@protonmail.com> | 2018-09-23 11:19:14 +0200 |
|---|---|---|
| committer | Cerapter <cerap@protonmail.com> | 2018-09-23 11:19:14 +0200 |
| commit | 3c07f27be79f1f72eec731218ba7dd3fd6470153 (patch) | |
| tree | 1f08d8b2574da4edcb9b7b87e4a2bc3fc43f0775 | |
| parent | 21aaa90c44408942ec77236cfc1a721f08ad7b55 (diff) | |
Generalised the music extension remover.
| -rw-r--r-- | courtroom.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/courtroom.cpp b/courtroom.cpp index 109ffa60..3547532a 100644 --- a/courtroom.cpp +++ b/courtroom.cpp @@ -915,7 +915,7 @@ void Courtroom::list_music() { QString i_song = music_list.at(n_song); QString i_song_listname = i_song; - i_song_listname.replace(".mp3",""); + i_song_listname = i_song_listname.left(i_song_listname.lastIndexOf(".")); if (i_song.toLower().contains(ui_music_search->text().toLower())) { @@ -2599,7 +2599,7 @@ void Courtroom::handle_song(QStringList *p_contents) QString f_song = f_contents.at(0); QString f_song_clear = f_song; - f_song_clear.replace(".mp3", ""); + f_song_clear = f_song_clear.left(f_song_clear.lastIndexOf(".")); int n_char = f_contents.at(1).toInt(); if (n_char < 0 || n_char >= char_list.size()) |
