diff options
| author | Crystalwarrior <varsash@gmail.com> | 2019-09-13 11:37:06 +0300 |
|---|---|---|
| committer | Crystalwarrior <varsash@gmail.com> | 2019-09-13 11:37:06 +0300 |
| commit | 8027bbffadc63b269091567f2557b8cd81abee56 (patch) | |
| tree | b01295bc755d4deaaa30c3fe18b4040ec350dd1d /src/aomovie.cpp | |
| parent | 5c69d10cd5fface32aea04cea1d288783d376179 (diff) | |
Use brace constructors instead of << append operator for path lists
Diffstat (limited to 'src/aomovie.cpp')
| -rw-r--r-- | src/aomovie.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/aomovie.cpp b/src/aomovie.cpp index 2598bb76..726a5159 100644 --- a/src/aomovie.cpp +++ b/src/aomovie.cpp @@ -35,17 +35,21 @@ void AOMovie::play(QString p_gif, QString p_char, QString p_custom_theme, int du QString shout_path; QList<QString> pathlist; + + pathlist = { + ao_app->get_image_suffix(ao_app->get_base_path() + "misc/" + p_custom_theme + "/" + p_gif + "_bubble"), //Misc path + ao_app->get_image_suffix(ao_app->get_custom_theme_path(p_custom_theme, p_gif)), //Custom theme path + ao_app->get_image_suffix(ao_app->get_theme_path(p_gif)), //Theme path + ao_app->get_image_suffix(ao_app->get_default_theme_path(p_gif)), //Default theme path + ao_app->get_image_suffix(ao_app->get_theme_path("placeholder")), //Placeholder path + ao_app->get_image_suffix( ao_app->get_default_theme_path("placeholder")), //Default placeholder path + }; + + //Add this at the beginning of the list - order matters. if (p_gif == "custom") - pathlist << ao_app->get_image_suffix(ao_app->get_character_path(p_char, p_gif)); + pathlist.prepend(ao_app->get_image_suffix(ao_app->get_character_path(p_char, p_gif))); else - pathlist << ao_app->get_image_suffix(ao_app->get_character_path(p_char, p_gif + "_bubble")); - - pathlist << ao_app->get_image_suffix(ao_app->get_base_path() + "misc/" + p_custom_theme + "/" + p_gif + "_bubble") << //Misc path - ao_app->get_image_suffix(ao_app->get_custom_theme_path(p_custom_theme, p_gif)) << //Custom theme path - ao_app->get_image_suffix(ao_app->get_theme_path(p_gif)) << //Theme path - ao_app->get_image_suffix(ao_app->get_default_theme_path(p_gif)) << //Default theme path - ao_app->get_image_suffix(ao_app->get_theme_path("placeholder")) << //Placeholder path - ao_app->get_image_suffix( ao_app->get_default_theme_path("placeholder")); //Default placeholder path + pathlist.prepend(ao_app->get_image_suffix(ao_app->get_character_path(p_char, p_gif + "_bubble"))); for (QString path : pathlist) { |
