[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [digikam] /: fix message box from the Libtiff on Windows
From:       Maik Qualmann <null () kde ! org>
Date:       2018-09-05 17:25:30
Message-ID: E1fxbYY-0006xm-Gn () code ! kde ! org
[Download RAW message or body]

Git commit 9ffd946b20f14310a241083d929db90c27224978 by Maik Qualmann.
Committed on 05/09/2018 at 17:23.
Pushed by mqualmann into branch 'master'.

fix message box from the Libtiff on Windows

On Windows, if a handler for warnings is set, Libtiff opens a window
with the warning message that makes opening and scanning TIFF files
on Windows almost impossible. Other projects have also it fixed
in this way.
BUGS: 386653
FIXED-IN: 6.0.0

M  +2    -1    NEWS
M  +5    -0    core/libs/dimg/loaders/tiffloader.cpp

https://commits.kde.org/digikam/9ffd946b20f14310a241083d929db90c27224978

diff --git a/NEWS b/NEWS
index e39c79a2b0..5e58a0839a 100644
--- a/NEWS
+++ b/NEWS
@@ -559,4 +559,5 @@ BUGFIXES:
 498 ==> 392813 - Showfoto crashed when clicked on close button in title bar.
 499 ==> 393069 - I do not see images in the file browser, only in calendar.
 500 ==> 392189 - Database upgrade fails.
-501 ==> 
+501 ==> 386653 - Message error on face detectior.
+502 ==> 
diff --git a/core/libs/dimg/loaders/tiffloader.cpp b/core/libs/dimg/loaders/tiffloader.cpp
index 7dafdb4aae..6623071c72 100644
--- a/core/libs/dimg/loaders/tiffloader.cpp
+++ b/core/libs/dimg/loaders/tiffloader.cpp
@@ -103,7 +103,12 @@ bool TIFFLoader::load(const QString& filePath, DImgLoaderObserver* const observe
     // TIFF error handling. If an errors/warnings occurs during reading,
     // libtiff will call these methods
 
+#ifdef Q_OS_WIN
+    TIFFSetWarningHandler(NULL);
+#else
     TIFFSetWarningHandler(dimg_tiff_warning);
+#endif
+
     TIFFSetErrorHandler(dimg_tiff_error);
 
     // -------------------------------------------------------------------
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic