From 38d4ef2f26545c630fe80e7edc59b0a77641938a Mon Sep 17 00:00:00 2001 From: Aleric Inglewood Date: Sun, 7 Nov 2010 18:38:46 +0100 Subject: IMP-692: SNOW-713: Fixed compile bug fixes. Changes: * Added changes from snowglobe 1.5 to indra/llcommon/llstring.h (compile errors as a result of a missing include, but I copied everything else too). * Added #include "linden_common.h" to emeraldboobutils.cpp. Really it's one the header files that needed that, but that's how this header works: every source file should include it as first header anyway, then there is no need for other headers to do that. * Renamed LLPanelRegionOpenSettingsInfo::sendUpdate(void*) to LLPanelRegionOpenSettingsInfo::onClickOrs because it was hiding a virtual function (BOOL sendUpdate(void)). * Made cutToClipboard more equal to copyToClipboard (was also hiding a virtual function). * Install libllcommon.so in lib64 on Linux_x86_64, instead of lib. --- linden/indra/llcommon/llstring.h | 25 ++++++++++++++++++++----- linden/indra/newview/emeraldboobutils.cpp | 1 + linden/indra/newview/llfloaterregioninfo.cpp | 6 +++--- linden/indra/newview/llfloaterregioninfo.h | 2 +- linden/indra/newview/llfolderview.h | 2 +- linden/indra/newview/llinventorybridge.h | 2 +- linden/indra/newview/llpanelinventory.cpp | 5 +++-- linden/indra/newview/viewer_manifest.py | 10 ++++++---- 8 files changed, 36 insertions(+), 17 deletions(-) diff --git a/linden/indra/llcommon/llstring.h b/linden/indra/llcommon/llstring.h index 3f2c8d8..44f5f07 100644 --- a/linden/indra/llcommon/llstring.h +++ b/linden/indra/llcommon/llstring.h @@ -34,12 +34,13 @@ #define LL_LLSTRING_H #include +#include +#include #if LL_LINUX || LL_SOLARIS #include #include #endif -#include "linden_common.h" #include @@ -173,6 +174,8 @@ public: static S32 collate(const char* a, const char* b) { return strcoll(a, b); } static S32 collate(const llwchar* a, const llwchar* b); + + static bool isHexString(const std::string& str); }; /** @@ -236,7 +239,8 @@ public: static void replaceTabsWithSpaces( std::basic_string& string, size_type spaces_per_tab ); static void replaceNonstandardASCII( std::basic_string& string, T replacement ); static void replaceChar( std::basic_string& string, T target, T replacement ); - + static void replaceString( std::basic_string& string, std::basic_string target, std::basic_string replacement ); + static BOOL containsNonprintable(const std::basic_string& string); static void stripNonprintable(std::basic_string& string); @@ -908,11 +912,22 @@ template void LLStringUtilBase::replaceChar( std::basic_string& string, T target, T replacement ) { size_type found_pos = 0; - for (found_pos = string.find(target, found_pos); - found_pos != std::basic_string::npos; - found_pos = string.find(target, found_pos)) + while( (found_pos = string.find(target, found_pos)) != std::basic_string::npos ) { string[found_pos] = replacement; + found_pos++; // avoid infinite defeat if target == replacement + } +} + +//static +template +void LLStringUtilBase::replaceString( std::basic_string& string, std::basic_string target, std::basic_string replacement ) +{ + size_type found_pos = 0; + while( (found_pos = string.find(target, found_pos)) != std::basic_string::npos ) + { + string.replace( found_pos, target.length(), replacement ); + found_pos += replacement.length(); // avoid infinite defeat if replacement contains target } } diff --git a/linden/indra/newview/emeraldboobutils.cpp b/linden/indra/newview/emeraldboobutils.cpp index f68d6a7..f440940 100644 --- a/linden/indra/newview/emeraldboobutils.cpp +++ b/linden/indra/newview/emeraldboobutils.cpp @@ -1,3 +1,4 @@ +#include "linden_common.h" #include "emeraldboobutils.h" std::ostream &operator<<(std::ostream &os, const EmeraldGlobalBoobConfig &v) diff --git a/linden/indra/newview/llfloaterregioninfo.cpp b/linden/indra/newview/llfloaterregioninfo.cpp index 8ae3fa2..d4ffe22 100644 --- a/linden/indra/newview/llfloaterregioninfo.cpp +++ b/linden/indra/newview/llfloaterregioninfo.cpp @@ -908,7 +908,7 @@ BOOL LLPanelRegionOpenSettingsInfo::postBuild() initHelpBtn("show_tags_help", "HelpShowTags"); initHelpBtn("allow_parcel_windlight_help", "HelpAllowParcelWindLight"); - childSetAction("apply_ors_btn", sendUpdate, this); + childSetAction("apply_ors_btn", onClickOrs, this); refreshFromRegion(gAgent.getRegion()); @@ -926,12 +926,12 @@ BOOL LLPanelRegionOpenSettingsInfo::postBuild() // strings[7] = restrict pushobject // strings[8] = 'Y' - allow parcel subdivide, 'N' - not // strings[9] = 'Y' - block parcel search, 'N' - allow -void LLPanelRegionOpenSettingsInfo::sendUpdate(void* userdata) +void LLPanelRegionOpenSettingsInfo::onClickOrs(void* userdata) { LLPanelRegionOpenSettingsInfo* self; self = (LLPanelRegionOpenSettingsInfo*)userdata; - llinfos << "LLPanelRegionOpenSettingsInfo::sendUpdate()" << llendl; + llinfos << "LLPanelRegionOpenSettingsInfo::onClickOrs()" << llendl; LLSD body; std::string url = gAgent.getRegion()->getCapability("DispatchOpenRegionSettings"); diff --git a/linden/indra/newview/llfloaterregioninfo.h b/linden/indra/newview/llfloaterregioninfo.h index ee01c7c..ae0c993 100644 --- a/linden/indra/newview/llfloaterregioninfo.h +++ b/linden/indra/newview/llfloaterregioninfo.h @@ -188,7 +188,7 @@ public: virtual BOOL postBuild(); protected: - static void sendUpdate(void* userdata); + static void onClickOrs(void* userdata); }; ///////////////////////////////////////////////////////////////////////////// diff --git a/linden/indra/newview/llfolderview.h b/linden/indra/newview/llfolderview.h index 9fad72e..40da669 100644 --- a/linden/indra/newview/llfolderview.h +++ b/linden/indra/newview/llfolderview.h @@ -97,7 +97,7 @@ public: virtual void move( LLFolderViewEventListener* parent_listener ) = 0; virtual BOOL isItemCopyable() const = 0; virtual BOOL copyToClipboard() const = 0; - virtual void cutToClipboard() = 0; + virtual BOOL cutToClipboard() const = 0; virtual BOOL isClipboardPasteable() const = 0; virtual void pasteFromClipboard() = 0; virtual void buildContextMenu(LLMenuGL& menu, U32 flags) = 0; diff --git a/linden/indra/newview/llinventorybridge.h b/linden/indra/newview/llinventorybridge.h index 2004678..5a53aa5 100644 --- a/linden/indra/newview/llinventorybridge.h +++ b/linden/indra/newview/llinventorybridge.h @@ -221,7 +221,7 @@ public: virtual void move(LLFolderViewEventListener* new_parent_bridge) {} virtual BOOL isItemCopyable() const { return FALSE; } virtual BOOL copyToClipboard() const { return FALSE; } - virtual void cutToClipboard() {} + virtual BOOL cutToClipboard() const { return FALSE; } virtual BOOL isClipboardPasteable() const; virtual void pasteFromClipboard() {} void getClipboardEntries(bool show_asset_id, std::vector &items, diff --git a/linden/indra/newview/llpanelinventory.cpp b/linden/indra/newview/llpanelinventory.cpp index 9cd2759..277ab15 100644 --- a/linden/indra/newview/llpanelinventory.cpp +++ b/linden/indra/newview/llpanelinventory.cpp @@ -145,7 +145,7 @@ public: virtual void move(LLFolderViewEventListener* parent_listener); virtual BOOL isItemCopyable() const; virtual BOOL copyToClipboard() const; - virtual void cutToClipboard(); + virtual BOOL cutToClipboard() const; virtual BOOL isClipboardPasteable() const; virtual void pasteFromClipboard(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); @@ -594,8 +594,9 @@ BOOL LLTaskInvFVBridge::copyToClipboard() const return FALSE; } -void LLTaskInvFVBridge::cutToClipboard() +BOOL LLTaskInvFVBridge::cutToClipboard() const { + return FALSE; } BOOL LLTaskInvFVBridge::isClipboardPasteable() const diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py index a93e058..f631d1f 100755 --- a/linden/indra/newview/viewer_manifest.py +++ b/linden/indra/newview/viewer_manifest.py @@ -228,7 +228,7 @@ class WindowsManifest(ViewerManifest): self.path("LICENSE-libraries.txt") self.end_prefix("../..") - + self.path("imprudence.url") # Plugin host application @@ -741,7 +741,7 @@ class DarwinManifest(ViewerManifest): #self.path("vivox-runtime/universal-darwin/SLVoiceAgent.app", "SLVoiceAgent.app") libdir = "../../libraries/universal-darwin/lib_release" - dylibs = {} + dylibs = {} #for lib in "llkdu", "llcommon": for lib in "llcommon": @@ -940,8 +940,6 @@ class LinuxManifest(ViewerManifest): # Per platform MIME config on the cheap. See SNOW-307 / DEV-41388 self.path("skins/default/xui/en-us/mime_types_linux.xml", "skins/default/xui/en-us/mime_types.xml") - self.path("../llcommon/libllcommon.so", "lib/libllcommon.so") - self.path("featuretable_linux.txt") @@ -997,6 +995,8 @@ class Linux_i686Manifest(LinuxManifest): super(Linux_i686Manifest, self).construct() self.path("imprudence-stripped","bin/do-not-directly-run-imprudence-bin") + self.path("../llcommon/libllcommon.so", "lib/libllcommon.so") + if (not self.standalone()) and self.prefix("../../libraries/i686-linux/lib_release_client", dst="lib"): self.path("libapr-1.so.0") self.path("libaprutil-1.so.0") @@ -1114,6 +1114,8 @@ class Linux_x86_64Manifest(LinuxManifest): self.path("imprudence-stripped","bin/do-not-directly-run-imprudence-bin") # self.path("../linux_crash_logger/linux-crash-logger-stripped","linux-crash-logger.bin") + self.path("../llcommon/libllcommon.so", "lib64/libllcommon.so") + self.path("linux_tools/launch_url.sh","launch_url.sh") if self.prefix("res-sdl"): self.path("*") -- cgit v1.1