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

@ -38,8 +38,8 @@ bool readPhotoFile(const QString &filename, QMainWindow *mainWindow, QLabel *pho
RagePhoto ragePhoto;
const bool loaded = ragePhoto.load(fileData.data(), static_cast<size_t>(fileData.size()));
if (!loaded) {
const RagePhoto::Error error = ragePhoto.error();
if (error <= RagePhoto::Error::PhotoReadError) {
const uint8_t error = ragePhoto.error();
if (error <= RagePhoto::PhotoReadError) {
QMessageBox::warning(mainWindow, "Open Photo", "Failed to read photo: " + filename);
return false;
}