unicode.cmake improvements, RagePhoto API changes

RagePhoto: remove class from Error enum
RagePhotoA: error() uint32_t -> uint8_t
RagePhoto-Extract: remove Error:: from Error enums
ragephoto-gtkviewer: RagePhoto::Error -> uint8_t, remove Error:: from
Error enum
ragephoto-qtviewer: RagePhoto::Error -> uint8_t, remove Error:: from
Error enum
This commit is contained in:
Syping 2021-12-02 05:55:50 +01:00
parent eed3290633
commit 7326cc26c7
7 changed files with 135 additions and 123 deletions

View file

@ -39,8 +39,8 @@ bool readPhotoFile(const std::string &filename, Gtk::Window *win, Gtk::Image *im
RagePhoto ragePhoto;
const bool loaded = ragePhoto.load(data);
if (!loaded) {
const RagePhoto::Error error = ragePhoto.error();
if (error <= RagePhoto::Error::PhotoReadError) {
const uint8_t error = ragePhoto.error();
if (error <= RagePhoto::PhotoReadError) {
Gtk::MessageDialog msg(*win, "Failed to read photo: " + filename, false, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_OK, true);
msg.set_title("Open Photo");
msg.run();