Replaced use of AutoPtr with std::unique_ptr in GeoImageDock.cpp.
authorLadislav Láska <krakonos@krakonos.org>
Wed, 13 Mar 2024 14:22:13 +0000 (15:22 +0100)
committerBas Couwenberg <sebastic@debian.org>
Wed, 13 Mar 2024 14:22:13 +0000 (15:22 +0100)
Origin: https://github.com/openstreetmap/merkaartor/commit/1e20d2ccd743ea5f8c2358e4ae36fead8b9390fd
Forwarded: not-needed

Gbp-Pq: Name upstream_Replaced-use-of-AutoPtr-with-std-unique_ptr-in-GeoIm.patch

src/Docks/GeoImageDock.cpp

index 97bdd4cad7f9c4db16c820f2804eeb6173590ae9..28f330a50e2da1c34d2c49ddf8521383e7d900ec 100644 (file)
@@ -457,7 +457,7 @@ void GeoImageDock::loadImages(QStringList fileNames)
     Document *theDocument = Main->document();
     MapView *theView = Main->view();
 
-    Exiv2::Image::AutoPtr image;
+    std::unique_ptr<Exiv2::Image> image;
     Exiv2::ExifData exifData;
     bool positionValid = false;
 
@@ -869,7 +869,7 @@ void GeoImageDock::saveImage()
 //    fn = QFileDialog::getSaveFileName(0, "Specify output filename", fn, tr("JPEG Images (*.jpg)"));
     qDebug() << fn;
     if (!fn.isEmpty()) {
-        Exiv2::Image::AutoPtr imageIn, imageOut;
+        std::unique_ptr<Exiv2::Image> imageIn, imageOut;
         Exiv2::ExifData exifData;
         try {
             imageIn = Exiv2::ImageFactory::open(usedTrackPoints.at(index).filename.toStdString());
@@ -893,7 +893,7 @@ Coord GeoImageDock::getGeoDataFromImage(const QString & file)
 {
     Coord pos;
     double lat = 0.0, lon = 0.0;
-    Exiv2::Image::AutoPtr image;
+    std::unique_ptr<Exiv2::Image> image;
     Exiv2::ExifData exifData;
     bool positionValid = false;
 
@@ -933,7 +933,7 @@ Coord GeoImageDock::getGeoDataFromImage(const QString & file)
 
 void GeoImageDock::addGeoDataToImage(Coord position, const QString & file)
 {
-    Exiv2::Image::AutoPtr image;
+    std::unique_ptr<Exiv2::Image> image;
 
     try {
         image = Exiv2::ImageFactory::open(file.toStdString());