diff --git a/headers/libs/print/libprint/JSDSlider.h b/headers/libs/print/libprint/JSDSlider.h index c69ab49c0e..2c1a042bc3 100644 --- a/headers/libs/print/libprint/JSDSlider.h +++ b/headers/libs/print/libprint/JSDSlider.h @@ -21,9 +21,11 @@ public: BMessage *msg, int32 min, int32 max, thumb_style t); virtual ~JSDSlider(); - +#ifdef __HAIKU__ virtual const char* UpdateText() const; - +#else + virtual char* UpdateText() const; +#endif private: mutable BString fResult; }; diff --git a/src/add-ons/print/drivers/pdf/source/AdvancedSettingsWindow.cpp b/src/add-ons/print/drivers/pdf/source/AdvancedSettingsWindow.cpp index aedd014d92..d842eeb6e6 100644 --- a/src/add-ons/print/drivers/pdf/source/AdvancedSettingsWindow.cpp +++ b/src/add-ons/print/drivers/pdf/source/AdvancedSettingsWindow.cpp @@ -81,7 +81,7 @@ AdvancedSettingsWindow::AdvancedSettingsWindow(BMessage *settings) if (settings->FindBool("create_xrefs", &fCreateXRefs) != B_OK) fCreateXRefs = false; - if (settings->FindInt32("close_option", (int32)&fCloseOption) != B_OK) + if (settings->FindInt32("close_option", (int32*)&fCloseOption) != B_OK) fCloseOption = kNever; BRect bounds(Bounds()); diff --git a/src/libs/print/libprint/JSDSlider.cpp b/src/libs/print/libprint/JSDSlider.cpp index 296915a478..bb4a858bed 100644 --- a/src/libs/print/libprint/JSDSlider.cpp +++ b/src/libs/print/libprint/JSDSlider.cpp @@ -26,7 +26,10 @@ JSDSlider::~JSDSlider() } -const char* +#ifdef __HAIKU__ +const +#endif +char* JSDSlider::UpdateText() const { // When the slider's Draw method is called, this method will also be called. @@ -46,5 +49,9 @@ JSDSlider::UpdateText() const } fResult.SetTo(string); +#ifdef __HAIKU__ return fResult.String(); +#else + return const_cast(fResult.String()); +#endif }