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:
parent
eed3290633
commit
7326cc26c7
7 changed files with 135 additions and 123 deletions
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue