diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 78864d1ff..870f39d0f 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -930,7 +930,7 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima } } -DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, DCPProfileApplyState &as) +DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, DCPProfile::ApplyState &as) { if (cmp.inputProfile == "(camera)" || cmp.inputProfile == "(none)") { return nullptr; diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index f68ee3b76..f32ce35b3 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -1719,11 +1719,11 @@ private: } ProfileContent pc = ICCStore::getInstance()->getContent(params.icm.outputProfile); - readyImg->setOutputProfile(pc.getData().c_str(), pc.getData().size()); + readyImg->setOutputProfile(pc.getData()); } } else { // No ICM - readyImg->setOutputProfile(nullptr, 0); + readyImg->setOutputProfile({}); } // t2.set(); diff --git a/rtgui/controllines.cc b/rtgui/controllines.cc index 573b3263f..18da514cc 100644 --- a/rtgui/controllines.cc +++ b/rtgui/controllines.cc @@ -31,7 +31,7 @@ using namespace rtengine; ControlLineManager::ControlLineManager(): EditSubscriber(ET_OBJECTS), - canvas_area(new Rectangle()), + canvas_area(new EditRectangle()), cursor(CSHandOpen), draw_mode(false), drawing_line(false), diff --git a/rtgui/controllines.h b/rtgui/controllines.h index 0ff449092..61bc17678 100644 --- a/rtgui/controllines.h +++ b/rtgui/controllines.h @@ -26,9 +26,10 @@ class Circle; class Line; class OPIcon; -class Rectangle; +class EditRectangle; class RTSurface; + struct ControlLine { static constexpr int OBJ_COUNT = 4; std::unique_ptr line; @@ -45,7 +46,7 @@ class ControlLineManager: EditSubscriber protected: /** Hidden object for capturing mouse events. */ - std::unique_ptr canvas_area; + std::unique_ptr canvas_area; rtengine::Coord drag_delta; std::vector> control_lines; CursorShape cursor; diff --git a/rtgui/controlspotpanel.cc b/rtgui/controlspotpanel.cc index 9ed4c95ee..8a08c1d64 100644 --- a/rtgui/controlspotpanel.cc +++ b/rtgui/controlspotpanel.cc @@ -1852,8 +1852,8 @@ void ControlSpotPanel::addControlSpotCurve(Gtk::TreeModel::Row& row) shape_ellipse = new Ellipse(); shape_ellipse->datum = Geometry::IMAGE; shape_ellipse->radiusInImageSpace = true; - Rectangle* shape_rectangle; - shape_rectangle = new Rectangle(); + EditRectangle* shape_rectangle; + shape_rectangle = new EditRectangle(); shape_rectangle->datum = Geometry::IMAGE; EditSubscriber::visibleGeometry.push_back(centerCircle); // (curveid - 1) * 7 EditSubscriber::visibleGeometry.push_back(shape_ellipse); // (curveid - 1) * 7 + 1 @@ -1887,7 +1887,7 @@ void ControlSpotPanel::addControlSpotCurve(Gtk::TreeModel::Row& row) shape_ellipse = new Ellipse(); shape_ellipse->datum = Geometry::IMAGE; shape_ellipse->radiusInImageSpace = true; - shape_rectangle = new Rectangle(); + shape_rectangle = new EditRectangle(); shape_rectangle->datum = Geometry::IMAGE; EditSubscriber::mouseOverGeometry.push_back(centerCircle); // (curveid - 1) * 7 EditSubscriber::mouseOverGeometry.push_back(shape_ellipse); // (curveid - 1) * 7 + 1 @@ -1957,7 +1957,7 @@ void ControlSpotPanel::updateControlSpotCurve(const Gtk::TreeModel::Row& row) }; const auto updateRectangle = [&](Geometry * geometry) { - const auto rectangle = static_cast(geometry); + const auto rectangle = static_cast(geometry); rectangle->bottomRight.x = origin.x + decayX; rectangle->bottomRight.y = origin.y + decayY; rectangle->topLeft.x = origin.x - decayXL; diff --git a/rtgui/editwidgets.cc b/rtgui/editwidgets.cc index fccdb874a..6611ff519 100644 --- a/rtgui/editwidgets.cc +++ b/rtgui/editwidgets.cc @@ -471,31 +471,31 @@ void Polyline::drawToMOChannel (Cairo::RefPtr &cr, unsigned shor } } -void Rectangle::setXYWH(int left, int top, int width, int height) +void EditRectangle::setXYWH(int left, int top, int width, int height) { topLeft.set(left, top); bottomRight.set(left + width, top + height); } -void Rectangle::setXYXY(int left, int top, int right, int bottom) +void EditRectangle::setXYXY(int left, int top, int right, int bottom) { topLeft.set(left, top); bottomRight.set(right, bottom); } -void Rectangle::setXYWH(rtengine::Coord topLeft, rtengine::Coord widthHeight) +void EditRectangle::setXYWH(rtengine::Coord topLeft, rtengine::Coord widthHeight) { this->topLeft = topLeft; this->bottomRight = topLeft + widthHeight; } -void Rectangle::setXYXY(rtengine::Coord topLeft, rtengine::Coord bottomRight) +void EditRectangle::setXYXY(rtengine::Coord topLeft, rtengine::Coord bottomRight) { this->topLeft = topLeft; this->bottomRight = bottomRight; } -void Rectangle::drawOuterGeometry(Cairo::RefPtr &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem) +void EditRectangle::drawOuterGeometry(Cairo::RefPtr &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem) { if ((flags & F_VISIBLE) && state != INSENSITIVE) { RGBColor color; @@ -538,7 +538,7 @@ void Rectangle::drawOuterGeometry(Cairo::RefPtr &cr, ObjectMOBuf } } -void Rectangle::drawInnerGeometry(Cairo::RefPtr &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem) +void EditRectangle::drawInnerGeometry(Cairo::RefPtr &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem) { if (flags & F_VISIBLE) { if (state != INSENSITIVE) { @@ -602,7 +602,7 @@ void Rectangle::drawInnerGeometry(Cairo::RefPtr &cr, ObjectMOBuf } } -void Rectangle::drawToMOChannel(Cairo::RefPtr &cr, unsigned short id, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem) +void EditRectangle::drawToMOChannel(Cairo::RefPtr &cr, unsigned short id, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem) { if (flags & F_HOVERABLE) { cr->set_line_width( getMouseOverLineWidth() ); diff --git a/rtgui/editwidgets.h b/rtgui/editwidgets.h index c86949cb4..7add435b9 100644 --- a/rtgui/editwidgets.h +++ b/rtgui/editwidgets.h @@ -307,14 +307,14 @@ public: void drawToMOChannel (Cairo::RefPtr &cr, unsigned short id, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem) override; }; -class Rectangle : public Geometry +class EditRectangle : public Geometry // New class name to avoid conflict elsewhere (exiv2), would be nicer to put in namespace? { public: rtengine::Coord topLeft; rtengine::Coord bottomRight; bool filled; - Rectangle (); + EditRectangle (); void setXYWH(int left, int top, int width, int height); void setXYXY(int left, int top, int right, int bottom); @@ -528,7 +528,7 @@ inline Circle::Circle () : false) { } -inline Rectangle::Rectangle () : +inline EditRectangle::EditRectangle () : topLeft (0, 0), bottomRight (10, 10), filled (false) { } diff --git a/rtgui/exifpanel.cc b/rtgui/exifpanel.cc index f4ce89f77..a2217086d 100644 --- a/rtgui/exifpanel.cc +++ b/rtgui/exifpanel.cc @@ -175,9 +175,10 @@ void ExifPanel::setImageData (const FramesMetaData* id) Gtk::TreeModel::Children ExifPanel::addTag(const std::string &key, const Glib::ustring &label, const Glib::ustring &value, bool editable, bool edited) { - if (!value.validate()) { - value = "???"; - } + // TODO Re-fix #5923 if necessary + //if (!value.validate()) { + // value = "???"; + //} auto root = exifTreeModel->children(); diff --git a/rtgui/filmnegative.cc b/rtgui/filmnegative.cc index d70c2a067..c13f09320 100644 --- a/rtgui/filmnegative.cc +++ b/rtgui/filmnegative.cc @@ -124,14 +124,14 @@ FilmNegative::FilmNegative() : filmBaseSpotButton->signal_toggled().connect(sigc::mem_fun(*this, &FilmNegative::baseSpotToggled)); // Editing geometry; create the spot rectangle - Rectangle* const spotRect = new Rectangle(); + EditRectangle* const spotRect = new EditRectangle(); spotRect->filled = false; visibleGeometry.push_back(spotRect); // Stick a dummy rectangle over the whole image in mouseOverGeometry. // This is to make sure the getCursor() call is fired everywhere. - Rectangle* const imgRect = new Rectangle(); + EditRectangle* const imgRect = new EditRectangle(); imgRect->filled = true; mouseOverGeometry.push_back(imgRect); @@ -284,7 +284,7 @@ CursorShape FilmNegative::getCursor(int objectID) const bool FilmNegative::mouseOver(int modifierKey) { EditDataProvider* const provider = getEditProvider(); - Rectangle* const spotRect = static_cast(visibleGeometry.at(0)); + EditRectangle* const spotRect = static_cast(visibleGeometry.at(0)); spotRect->setXYWH(provider->posImage.x - 16, provider->posImage.y - 16, 32, 32); return true; @@ -386,7 +386,7 @@ void FilmNegative::editToggled() // Stick a dummy rectangle over the whole image in mouseOverGeometry. // This is to make sure the getCursor() call is fired everywhere. - Rectangle* const imgRect = static_cast(mouseOverGeometry.at(0)); + EditRectangle* const imgRect = static_cast(mouseOverGeometry.at(0)); imgRect->setXYWH(0, 0, w, h); } else { refSpotCoords.clear(); @@ -408,7 +408,7 @@ void FilmNegative::baseSpotToggled() // Stick a dummy rectangle over the whole image in mouseOverGeometry. // This is to make sure the getCursor() call is fired everywhere. - Rectangle* const imgRect = static_cast(mouseOverGeometry.at(0)); + EditRectangle* const imgRect = static_cast(mouseOverGeometry.at(0)); imgRect->setXYWH(0, 0, w, h); } else { refSpotCoords.clear(); diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc index fed520acd..10eb28fae 100644 --- a/rtgui/thumbnail.cc +++ b/rtgui/thumbnail.cc @@ -41,15 +41,14 @@ #include "md5helper.h" #include "pathutils.h" #include "paramsedited.h" - +#include "ppversion.h" #include "procparamchangers.h" #include "profilestorecombobox.h" #include "version.h" -#include "../rtengine/dynamicprofile.h" -#include "../rtengine/imagedata.h" #include "../rtengine/mytime.h" -#include "../rtengine/procparams.h" + +using namespace rtengine::procparams; namespace { @@ -110,8 +109,6 @@ bool CPBDump( } // namespace -using namespace rtengine::procparams; - Thumbnail::Thumbnail(CacheManager* cm, const Glib::ustring& fname, CacheImageData* cf) : fname(fname), cfs(*cf), diff --git a/rtgui/thumbnail.h b/rtgui/thumbnail.h index 834c9c297..aa9416f26 100644 --- a/rtgui/thumbnail.h +++ b/rtgui/thumbnail.h @@ -26,6 +26,7 @@ #include "cacheimagedata.h" #include "threadutils.h" #include "thumbnaillistener.h" +#include "../rtengine/procparams.h" namespace rtengine {