forked from macports/macports-ports
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8e1b91f
commit 101ed3a
Showing
3 changed files
with
96 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- lib/exiv2imageloader.cpp 2014-09-30 17:11:42.000000000 +0800 | ||
+++ lib/exiv2imageloader.cpp 2024-07-14 14:12:10.000000000 +0800 | ||
@@ -57,17 +57,8 @@ | ||
try { | ||
d->mImage = Exiv2::ImageFactory::open((unsigned char*)data.constData(), data.size()); | ||
d->mImage->readMetadata(); | ||
-#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0, 14, 0) | ||
- // For some unknown reason, trying to catch Exiv2::Error fails with Exiv2 | ||
- // >=0.14. For now, just catch std::exception. I would welcome any | ||
- // explanation. | ||
} catch (const std::exception& error) { | ||
d->mErrorMessage = error.what(); | ||
-#else | ||
- // In libexiv2 0.12, Exiv2::Error::what() returns an std::string. | ||
- } catch (const Exiv2::Error& error) { | ||
- d->mErrorMessage = error.what().c_str(); | ||
-#endif | ||
return false; | ||
} | ||
return true; | ||
|
||
--- lib/imagemetainfomodel.cpp 2014-09-30 17:11:42.000000000 +0800 | ||
+++ lib/imagemetainfomodel.cpp 2024-07-14 14:13:06.000000000 +0800 | ||
@@ -280,7 +280,7 @@ | ||
} else { | ||
hash.insert(key, new MetaInfoGroup::Entry(key, label, value)); | ||
} | ||
- } catch (const Exiv2::Error& error) { | ||
+ } catch (const std::exception& error) { | ||
kWarning() << "Failed to read some meta info:" << error.what(); | ||
} | ||
} | ||
|
||
--- lib/timeutils.cpp 2014-09-30 17:11:42.000000000 +0800 | ||
+++ lib/timeutils.cpp 2024-07-14 14:25:02.000000000 +0800 | ||
@@ -125,7 +125,7 @@ | ||
|
||
realTime = dt; | ||
return true; | ||
- } catch (const Exiv2::Error& error) { | ||
+ } catch (const std::exception& error) { | ||
kWarning() << "Failed to read date from exif header of" << path << ". Error:" << error.what(); | ||
return false; | ||
} | ||
|
||
--- lib/jpegcontent.cpp 2014-09-30 17:11:42.000000000 +0800 | ||
+++ lib/jpegcontent.cpp 2024-07-14 14:22:28.000000000 +0800 | ||
@@ -540,12 +540,8 @@ | ||
{ | ||
QImage image; | ||
if (!d->mExifData.empty()) { | ||
-#if(EXIV2_TEST_VERSION(0,17,91)) | ||
Exiv2::ExifThumbC thumb(d->mExifData); | ||
Exiv2::DataBuf thumbnail = thumb.copy(); | ||
-#else | ||
- Exiv2::DataBuf thumbnail = d->mExifData.copyThumbnail(); | ||
-#endif | ||
image.loadFromData(thumbnail.pData_, thumbnail.size_); | ||
} | ||
return image; | ||
@@ -566,12 +562,8 @@ | ||
return; | ||
} | ||
|
||
-#if (EXIV2_TEST_VERSION(0,17,91)) | ||
Exiv2::ExifThumb thumb(d->mExifData); | ||
thumb.setJpegThumbnail((unsigned char*)array.data(), array.size()); | ||
-#else | ||
- d->mExifData.setJpegThumbnail((unsigned char*)array.data(), array.size()); | ||
-#endif | ||
} | ||
|
||
bool JpegContent::save(const QString& path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- CMakeLists.txt 2014-09-30 17:11:42.000000000 +0800 | ||
+++ CMakeLists.txt 2024-07-14 13:59:01.000000000 +0800 | ||
@@ -84,6 +84,9 @@ | ||
) | ||
endif() | ||
|
||
+string(REGEX REPLACE "-fno-exceptions -DQT_NO_EXCEPTIONS" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) | ||
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions") | ||
+ | ||
## dirs to build | ||
add_subdirectory(lib) | ||
add_subdirectory(app) |