diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-11-28 10:44:52 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-11-28 10:44:52 -0500 |
commit | a375272ff5cabb97593129523d4e326cb3d0fda2 (patch) | |
tree | 955ee4dce353ba342ba46c40205ef3b442c46017 | |
parent | 810a00469aa307fcf028b4b434080dba307c392a (diff) | |
parent | fb605a047aa1c6b293b9546a06ac800c53d109ba (diff) |
merge
54 files changed, 1456 insertions, 1103 deletions
diff --git a/BuildParams b/BuildParams index 5068edb21f..3f5d6f8c6b 100755 --- a/BuildParams +++ b/BuildParams @@ -136,14 +136,6 @@ viewer-mesh.login_channel = "Project Viewer - Mesh" viewer-mesh.viewer_grid = aditi viewer-mesh.email = shining@lists.lindenlab.com - -# ======================================== -# CG -# ======================================== - -cg_viewer-development_lenny.show_changes_since = 4b140ce7839d -cg_viewer-development_lenny.email = cg@lindenlab.com - # ================ # oz # ================ @@ -151,20 +143,29 @@ cg_viewer-development_lenny.email = cg@lindenlab.com oz_viewer-devreview.build_debug_release_separately = true oz_viewer-devreview.codeticket_add_context = false oz_viewer-devreview.build_enforce_coding_policy = true +oz_viewer-devreview.email = oz@lindenlab.com oz_project-1.build_debug_release_separately = true oz_project-1.codeticket_add_context = false +oz_project-1.email = oz@lindenlab.com oz_project-2.build_debug_release_separately = true oz_project-2.codeticket_add_context = false +oz_project-2.email = oz@lindenlab.com oz_project-3.build_debug_release_separately = true oz_project-3.codeticket_add_context = false +oz_project-3.email = oz@lindenlab.com oz_project-4.build_debug_release_separately = true oz_project-4.codeticket_add_context = false +oz_project-4.email = oz@lindenlab.com +oz_project-5.build_debug_release_separately = true +oz_project-5.codeticket_add_context = false +oz_project-5.email = oz@lindenlab.com oz_viewer-beta-review.build_debug_release_separately = true oz_viewer-beta-review.codeticket_add_context = false oz_viewer-beta-review.viewer_channel = "Second Life Beta Viewer" oz_viewer-beta-review.login_channel = "Second Life Beta Viewer" +oz_viewer-beta-review.email = oz@lindenlab.com # ================================================================= # asset delivery 2010 projects diff --git a/doc/contributions.txt b/doc/contributions.txt index 2b39e15e2a..8d30c21f90 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -170,6 +170,7 @@ Ansariel Hiller STORM-1101 VWR-25480 VWR-26150 + STORM-1685 Aralara Rajal Ardy Lay STORM-859 @@ -583,9 +584,11 @@ Jonathan Yap STORM-910 STORM-1642 STORM-1105 + STORM-1679 STORM-1222 STORM-1659 STORM-1674 + STORM-1685 Kadah Coba STORM-1060 Jondan Lundquist @@ -1114,6 +1117,7 @@ Tofu Buzzard CTS-411 STORM-546 VWR-24509 + STORM-1684 Tony Kembia Torben Trautman TouchaHoney Perhaps diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt index d1042d6e86..4b1bf49d07 100644 --- a/indra/CMakeLists.txt +++ b/indra/CMakeLists.txt @@ -1,4 +1,3 @@ - # -*- cmake -*- # cmake_minimum_required should appear before any @@ -70,6 +69,9 @@ if (VIEWER) add_subdirectory(${LIBS_OPEN_PREFIX}llxuixml) add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components) + # Legacy C++ tests. Build always, run if LL_TESTS is true. + add_subdirectory(${VIEWER_PREFIX}test) + # viewer media plugins add_subdirectory(${LIBS_OPEN_PREFIX}media_plugins) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index f8b204eca0..37bf856662 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1101,20 +1101,11 @@ F32 LLAgent::clampPitchToLimits(F32 angle) LLVector3 skyward = getReferenceUpVector(); - F32 look_down_limit; - F32 look_up_limit = 10.f * DEG_TO_RAD; + const F32 look_down_limit = 179.f * DEG_TO_RAD;; + const F32 look_up_limit = 1.f * DEG_TO_RAD; F32 angle_from_skyward = acos( mFrameAgent.getAtAxis() * skyward ); - if (isAgentAvatarValid() && gAgentAvatarp->isSitting()) - { - look_down_limit = 130.f * DEG_TO_RAD; - } - else - { - look_down_limit = 170.f * DEG_TO_RAD; - } - // clamp pitch to limits if ((angle >= 0.f) && (angle_from_skyward + angle > look_down_limit)) { diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp index 90e32f973f..2f29e758c6 100644 --- a/indra/newview/llpanelsnapshot.cpp +++ b/indra/newview/llpanelsnapshot.cpp @@ -124,15 +124,11 @@ LLSideTrayPanelContainer* LLPanelSnapshot::getParentContainer() // virtual void LLPanelSnapshot::updateCustomResControls() { + // Only show width/height spinners and the aspect ratio checkbox + // when a custom resolution is chosen. LLComboBox* combo = getChild<LLComboBox>(getImageSizeComboName()); - S32 selected_idx = combo->getFirstSelectedIndex(); - const bool enable = selected_idx == (combo->getItemCount() - 1); // Current Window or Custom selected - - getChild<LLUICtrl>(getWidthSpinnerName())->setEnabled(enable); - getChild<LLSpinCtrl>(getWidthSpinnerName())->setAllowEdit(enable); - getChild<LLUICtrl>(getHeightSpinnerName())->setEnabled(enable); - getChild<LLSpinCtrl>(getHeightSpinnerName())->setAllowEdit(enable); - enableAspectRatioCheckbox(enable); + const bool show = combo->getFirstSelectedIndex() == (combo->getItemCount() - 1); + getChild<LLUICtrl>(getImageSizePanelName())->setVisible(show); } void LLPanelSnapshot::updateImageQualityLevel() diff --git a/indra/newview/llpanelsnapshot.h b/indra/newview/llpanelsnapshot.h index 7adb2fabc7..f3274cf594 100644 --- a/indra/newview/llpanelsnapshot.h +++ b/indra/newview/llpanelsnapshot.h @@ -44,6 +44,7 @@ public: virtual std::string getHeightSpinnerName() const = 0; virtual std::string getAspectRatioCBName() const = 0; virtual std::string getImageSizeComboName() const = 0; + virtual std::string getImageSizePanelName() const = 0; virtual S32 getTypedPreviewWidth() const; virtual S32 getTypedPreviewHeight() const; diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index aca0ee6700..381c11348d 100644 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -54,6 +54,7 @@ private: /*virtual*/ std::string getHeightSpinnerName() const { return "inventory_snapshot_height"; } /*virtual*/ std::string getAspectRatioCBName() const { return "inventory_keep_aspect_check"; } /*virtual*/ std::string getImageSizeComboName() const { return "texture_size_combo"; } + /*virtual*/ std::string getImageSizePanelName() const { return LLStringUtil::null; } /*virtual*/ void updateControls(const LLSD& info); void onSend(); @@ -70,6 +71,8 @@ LLPanelSnapshotInventory::LLPanelSnapshotInventory() // virtual BOOL LLPanelSnapshotInventory::postBuild() { + getChild<LLSpinCtrl>(getWidthSpinnerName())->setAllowEdit(FALSE); + getChild<LLSpinCtrl>(getHeightSpinnerName())->setAllowEdit(FALSE); getChild<LLUICtrl>(getAspectRatioCBName())->setVisible(FALSE); // we don't keep aspect ratio for inventory textures return LLPanelSnapshot::postBuild(); } @@ -90,10 +93,6 @@ void LLPanelSnapshotInventory::updateCustomResControls() getChild<LLUICtrl>(getWidthSpinnerName())->setVisible(show); getChild<LLUICtrl>(getHeightSpinnerName())->setVisible(show); - - // Editing gets often enable elsewhere in common snapshot panel code. Override that. - getChild<LLSpinCtrl>(getWidthSpinnerName())->setAllowEdit(FALSE); - getChild<LLSpinCtrl>(getHeightSpinnerName())->setAllowEdit(FALSE); } // virtual diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp index 4a2614fa7d..d153ff598d 100644 --- a/indra/newview/llpanelsnapshotlocal.cpp +++ b/indra/newview/llpanelsnapshotlocal.cpp @@ -54,6 +54,7 @@ private: /*virtual*/ std::string getHeightSpinnerName() const { return "local_snapshot_height"; } /*virtual*/ std::string getAspectRatioCBName() const { return "local_keep_aspect_check"; } /*virtual*/ std::string getImageSizeComboName() const { return "local_size_combo"; } + /*virtual*/ std::string getImageSizePanelName() const { return "local_image_size_lp"; } /*virtual*/ LLFloaterSnapshot::ESnapshotFormat getImageFormat() const; /*virtual*/ void updateControls(const LLSD& info); diff --git a/indra/newview/llpanelsnapshotpostcard.cpp b/indra/newview/llpanelsnapshotpostcard.cpp index 6867c7af4e..f2bb8f530b 100644 --- a/indra/newview/llpanelsnapshotpostcard.cpp +++ b/indra/newview/llpanelsnapshotpostcard.cpp @@ -62,6 +62,7 @@ private: /*virtual*/ std::string getHeightSpinnerName() const { return "postcard_snapshot_height"; } /*virtual*/ std::string getAspectRatioCBName() const { return "postcard_keep_aspect_check"; } /*virtual*/ std::string getImageSizeComboName() const { return "postcard_size_combo"; } + /*virtual*/ std::string getImageSizePanelName() const { return "postcard_image_size_lp"; } /*virtual*/ LLFloaterSnapshot::ESnapshotFormat getImageFormat() const { return LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG; } /*virtual*/ void updateControls(const LLSD& info); diff --git a/indra/newview/llpanelsnapshotprofile.cpp b/indra/newview/llpanelsnapshotprofile.cpp index 89245fc804..a706318369 100644 --- a/indra/newview/llpanelsnapshotprofile.cpp +++ b/indra/newview/llpanelsnapshotprofile.cpp @@ -57,6 +57,7 @@ private: /*virtual*/ std::string getHeightSpinnerName() const { return "profile_snapshot_height"; } /*virtual*/ std::string getAspectRatioCBName() const { return "profile_keep_aspect_check"; } /*virtual*/ std::string getImageSizeComboName() const { return "profile_size_combo"; } + /*virtual*/ std::string getImageSizePanelName() const { return "profile_image_size_lp"; } /*virtual*/ LLFloaterSnapshot::ESnapshotFormat getImageFormat() const { return LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG; } /*virtual*/ void updateControls(const LLSD& info); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 22d95563d8..6d45e48d23 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7701,7 +7701,14 @@ class LLWorldEnvSettings : public view_listener_t } else { - LLEnvManagerNew::instance().setUseDayCycle(LLEnvManagerNew::instance().getDayCycleName()); + LLEnvManagerNew &envmgr = LLEnvManagerNew::instance(); + // reset all environmental settings to track the region defaults, make this reset 'sticky' like the other sun settings. + bool use_fixed_sky = false; + bool use_region_settings = true; + envmgr.setUserPrefs(envmgr.getWaterPresetName(), + envmgr.getSkyPresetName(), + envmgr.getDayCycleName(), + use_fixed_sky, use_region_settings); } return true; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index bdab250b49..6af800f1d7 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -8335,7 +8335,7 @@ void LLVOAvatar::getImpostorValues(LLVector4a* extents, LLVector3& angle, F32& d void LLVOAvatar::idleUpdateRenderCost() { static const U32 ARC_BODY_PART_COST = 200; - static const U32 ARC_LIMIT = 2048; + static const U32 ARC_LIMIT = 20000; static std::set<LLUUID> all_textures; diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml index 4314c8a9e2..56d79f62c7 100644 --- a/indra/newview/skins/default/xui/en/floater_world_map.xml +++ b/indra/newview/skins/default/xui/en/floater_world_map.xml @@ -468,7 +468,7 @@ left="3" top_pad="7" mouse_opaque="true" - name="region_icon" + name="location_icon" width="16" /> <search_editor follows="top|right" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 263d961be1..575e3673c6 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -533,6 +533,14 @@ function="World.EnvSettings" parameter="midnight" /> </menu_item_call> + <menu_item_separator/> + <menu_item_call + label="Use Region Settings" + name="Use Region Settings"> + <menu_item_call.on_click + function="World.EnvSettings" + parameter="region" /> + </menu_item_call> </menu> diff --git a/indra/newview/skins/default/xui/en/panel_postcard_settings.xml b/indra/newview/skins/default/xui/en/panel_postcard_settings.xml index 84e3593798..aebbc51be1 100644 --- a/indra/newview/skins/default/xui/en/panel_postcard_settings.xml +++ b/indra/newview/skins/default/xui/en/panel_postcard_settings.xml @@ -34,69 +34,104 @@ name="Custom" value="[i-1,i-1]" /> </combo_box> - <spinner - allow_text_entry="false" - decimal_digits="0" - follows="left|top" - height="20" - increment="32" - label="Width" - label_width="40" - layout="topleft" - left="10" - max_val="6016" - min_val="32" - name="postcard_snapshot_width" + <layout_stack + animate="false" + follows="all" + height="275" + layout="bottomleft" + name="postcard_image_params_ls" + left_delta="0" + orientation="vertical" top_pad="10" - width="95" /> - <spinner - allow_text_entry="false" - decimal_digits="0" - follows="left|top" - height="20" - increment="32" - label="Height" - label_width="40" - layout="topleft" - left_pad="5" - max_val="6016" - min_val="32" - name="postcard_snapshot_height" - top_delta="0" - width="95" /> - <check_box - bottom_delta="20" - follows="left|top" - label="Constrain proportions" - layout="topleft" - left="10" - name="postcard_keep_aspect_check" /> - <slider - decimal_digits="0" - follows="left|top" - height="15" - increment="1" - initial_value="75" - label="Image quality" - label_width="80" - layout="topleft" - left="10" - max_val="100" - name="image_quality_slider" - top_pad="7" - width="200" /> - <text - type="string" - follows="left|top" - font="SansSerifSmall" - length="1" - height="14" - layout="topleft" - left_pad="-5" - halign="left" - name="image_quality_level" - top_delta="0" - width="60"> - ([QLVL]) - </text> + right="-10"> + <layout_panel + follows="top|left|right" + height="60" + layout="topleft" + left="0" + name="postcard_image_size_lp" + user_resize="false" + auto_resize="false" + top="0" + right="-1" + visible="true"> + <spinner + allow_text_entry="false" + decimal_digits="0" + follows="left|top" + height="20" + increment="32" + label="Width" + label_width="40" + layout="topleft" + left="10" + max_val="6016" + min_val="32" + name="postcard_snapshot_width" + top_pad="10" + width="95" /> + <spinner + allow_text_entry="false" + decimal_digits="0" + follows="left|top" + height="20" + increment="32" + label="Height" + label_width="40" + layout="topleft" + left_pad="5" + max_val="6016" + min_val="32" + name="postcard_snapshot_height" + top_delta="0" + width="95" /> + <check_box + bottom_delta="20" + follows="left|top" + label="Constrain proportions" + layout="topleft" + left="10" + name="postcard_keep_aspect_check" /> + </layout_panel> + <layout_panel + follows="top|left|right" + height="23" + layout="topleft" + left="0" + name="postcard_image_format_quality_lp" + user_resize="false" + auto_resize="true" + top="0" + right="-1" + visible="true"> + <slider + decimal_digits="0" + follows="left|top" + height="15" + increment="1" + initial_value="75" + label="Image quality" + label_width="80" + layout="topleft" + left="10" + max_val="100" + name="image_quality_slider" + top_pad="7" + width="200" /> + <text + type="string" + follows="left|top" + font="SansSerifSmall" + length="1" + height="14" + layout="topleft" + left_pad="-5" + halign="left" + name="image_quality_level" + top_delta="0" + width="60"> + ([QLVL]) + </text> + </layout_panel> + </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_local.xml b/indra/newview/skins/default/xui/en/panel_snapshot_local.xml index 30403a21dd..ae0215a578 100644 --- a/indra/newview/skins/default/xui/en/panel_snapshot_local.xml +++ b/indra/newview/skins/default/xui/en/panel_snapshot_local.xml @@ -80,93 +80,128 @@ name="Custom" value="[i-1,i-1]" /> </combo_box> - <spinner - allow_text_entry="false" - decimal_digits="0" - follows="left|top" - height="20" - increment="32" - label="Width" - label_width="40" - layout="topleft" - left="10" - max_val="6016" - min_val="32" - name="local_snapshot_width" - top_pad="10" - width="95" /> - <spinner - allow_text_entry="false" - decimal_digits="0" - follows="left|top" - height="20" - increment="32" - label="Height" - label_width="40" - layout="topleft" - left_pad="5" - max_val="6016" - min_val="32" - name="local_snapshot_height" - top_delta="0" - width="95" /> - <check_box - bottom_delta="20" - follows="left|top" - label="Constrain proportions" - layout="topleft" - left="10" - name="local_keep_aspect_check" /> - <combo_box - follows="left|top" - height="23" - label="Format" - layout="topleft" + <layout_stack + animate="false" + follows="all" + height="275" + layout="bottomleft" + name="local_image_params_ls" left_delta="0" - name="local_format_combo" + orientation="vertical" top_pad="10" - width="120"> - <combo_box.item - label="PNG (Lossless)" - name="PNG" - value="PNG" /> - <combo_box.item - label="JPEG" - name="JPEG" - value="JPEG" /> - <combo_box.item - label="BMP (Lossless)" - name="BMP" - value="BMP" /> - </combo_box> - <slider - decimal_digits="0" - follows="left|top" - height="15" - increment="1" - initial_value="75" - label="Image quality" - label_width="80" - layout="topleft" - left="10" - max_val="100" - name="image_quality_slider" - top_pad="7" - width="200" /> - <text - type="string" - follows="left|top" - font="SansSerifSmall" - length="1" - height="14" - layout="topleft" - left_pad="-5" - halign="left" - name="image_quality_level" - top_delta="0" - width="60"> - ([QLVL]) - </text> + right="-10"> + <layout_panel + follows="top|left|right" + height="60" + layout="topleft" + left="0" + name="local_image_size_lp" + user_resize="false" + auto_resize="false" + top="0" + right="-1" + visible="true"> + <spinner + allow_text_entry="false" + decimal_digits="0" + follows="left|top" + height="20" + increment="32" + label="Width" + label_width="40" + layout="topleft" + left="10" + max_val="6016" + min_val="32" + name="local_snapshot_width" + top_pad="10" + width="95" /> + <spinner + allow_text_entry="false" + decimal_digits="0" + follows="left|top" + height="20" + increment="32" + label="Height" + label_width="40" + layout="topleft" + left_pad="5" + max_val="6016" + min_val="32" + name="local_snapshot_height" + top_delta="0" + width="95" /> + <check_box + bottom_delta="20" + follows="left|top" + label="Constrain proportions" + layout="topleft" + left="10" + name="local_keep_aspect_check" /> + </layout_panel> + <layout_panel + follows="top|left|right" + height="23" + layout="topleft" + left="0" + name="local_image_format_quality_lp" + user_resize="false" + auto_resize="true" + top="0" + right="-1" + visible="true"> + <combo_box + follows="left|top" + height="23" + label="Format" + layout="topleft" + left_delta="0" + name="local_format_combo" + top_pad="0" + width="120"> + <combo_box.item + label="PNG (Lossless)" + name="PNG" + value="PNG" /> + <combo_box.item + label="JPEG" + name="JPEG" + value="JPEG" /> + <combo_box.item + label="BMP (Lossless)" + name="BMP" + value="BMP" /> + </combo_box> + <slider + decimal_digits="0" + follows="left|top" + height="15" + increment="1" + initial_value="75" + label="Image quality" + label_width="80" + layout="topleft" + left="10" + max_val="100" + name="image_quality_slider" + top_pad="7" + width="200" /> + <text + type="string" + follows="left|top" + font="SansSerifSmall" + length="1" + height="14" + layout="topleft" + left_pad="-5" + halign="left" + name="image_quality_level" + top_delta="0" + width="60"> + ([QLVL]) + </text> + </layout_panel> + </layout_stack> <button follows="right|bottom" height="23" diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_profile.xml b/indra/newview/skins/default/xui/en/panel_snapshot_profile.xml index ee79a4b3b8..91ac9ad658 100644 --- a/indra/newview/skins/default/xui/en/panel_snapshot_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_snapshot_profile.xml @@ -68,76 +68,111 @@ name="Custom" value="[i-1,i-1]" /> </combo_box> - <spinner - allow_text_entry="false" - decimal_digits="0" - follows="left|top" - height="20" - increment="32" - label="Width" - label_width="40" - layout="topleft" - left="10" - max_val="6016" - min_val="32" - name="profile_snapshot_width" - top_pad="10" - width="95" /> - <spinner - allow_text_entry="false" - decimal_digits="0" - follows="left|top" - height="20" - increment="32" - label="Height" - label_width="40" - layout="topleft" - left_pad="5" - max_val="6016" - min_val="32" - name="profile_snapshot_height" - top_delta="0" - width="95" /> - <check_box - bottom_delta="20" - label="Constrain proportions" - layout="topleft" - left="10" - name="profile_keep_aspect_check" /> - <text - length="1" - follows="top|left|right" - font="SansSerif" - height="16" - layout="topleft" - left="12" - name="caption_label" - right="-10" - top_pad="10" - type="string"> - Caption: - </text> - <text_editor + <layout_stack + animate="false" follows="all" - height="160" - layout="topleft" + height="270" + layout="bottomleft" + name="profile_image_params_ls" left_delta="0" - length="1" - max_length="700" - name="caption" - right="-10" - top_pad="5" - type="string" - word_wrap="true"> - </text_editor> - <check_box - follows="left|bottom" - initial_value="true" - label="Include location" - layout="topleft" - left_delta="0" - name="add_location_cb" - top_pad="15" /> + orientation="vertical" + top_pad="10" + right="-10"> + <layout_panel + follows="top|left|right" + height="55" + layout="topleft" + left="0" + name="profile_image_size_lp" + user_resize="false" + auto_resize="false" + top="0" + right="-1" + visible="true"> + <spinner + allow_text_entry="false" + decimal_digits="0" + follows="left|top" + height="20" + increment="32" + label="Width" + label_width="40" + layout="topleft" + left="10" + max_val="6016" + min_val="32" + name="profile_snapshot_width" + top_pad="10" + width="95" /> + <spinner + allow_text_entry="false" + decimal_digits="0" + follows="left|top" + height="20" + increment="32" + label="Height" + label_width="40" + layout="topleft" + left_pad="5" + max_val="6016" + min_val="32" + name="profile_snapshot_height" + top_delta="0" + width="95" /> + <check_box + bottom_delta="20" + label="Constrain proportions" + layout="topleft" + left="10" + name="profile_keep_aspect_check" /> + </layout_panel> + <layout_panel + follows="top|left|right" + height="200" + layout="topleft" + left="0" + name="profile_image_metadata_lp" + user_resize="false" + auto_resize="true" + top="0" + right="-1" + visible="true"> + <text + length="1" + follows="top|left|right" + font="SansSerif" + height="16" + layout="topleft" + left="0" + name="caption_label" + right="-10" + top_pad="0" + type="string"> + Caption: + </text> + <text_editor + follows="all" + height="155" + layout="topleft" + left_delta="0" + length="1" + max_length="700" + name="caption" + right="-10" + top_pad="5" + type="string" + word_wrap="true"> + </text_editor> + <check_box + follows="left|bottom" + initial_value="true" + label="Include location" + layout="topleft" + left_delta="0" + name="add_location_cb" + top_pad="15" /> + </layout_panel> + </layout_stack> <button follows="right|bottom" height="23" diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/fr/panel_preferences_privacy.xml index 3123a4c6fe..b122db9502 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_privacy.xml @@ -20,7 +20,7 @@ <check_box label="Inclure la date et l'heure pour chaque ligne du journal de chat" name="show_timestamps_check_im"/> <check_box label="Inclure la date dans le nom du fichier journal" name="logfile_name_datestamp"/> <text name="log_path_desc"> - Emplacement : + Emplacement des journaux : </text> <line_editor left="308" name="log_path_string" right="-20"/> <button label="Parcourir" label_selected="Parcourir" name="log_path_button" width="150"/> diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml b/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml index deaec2e14f..37eb6bbeb0 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml @@ -17,9 +17,9 @@ <check_box label="Activé" name="enable_media"/> <slider label="Chat vocal" name="Voice Volume"/> <check_box label="Activé" name="enable_voice_check"/> - <check_box label="Autoriser la lecture automatique du média" name="media_auto_play_btn" tool_tip="Cochez pour autoriser la lecture automatique du média" value="true"/> - <check_box label="Lecture du média aux autres avatars" name="media_show_on_others_btn" tool_tip="Décochez pour masquer le média aux autres avatars près de vous" value="true"/> - <check_box label="Lire les sons des gestes" name="gesture_audio_play_btn" tool_tip="Cochez cette case pour entendre les sons associés aux gestes." value="true"/> + <check_box label="Autoriser la lecture automatique du média" name="media_auto_play_btn" tool_tip="Cocher pour autoriser la lecture automatique du média." value="true"/> + <check_box label="Lire le média attaché aux autres avatars" name="media_show_on_others_btn" tool_tip="Décocher pour masquer le média attaché aux autres avatars près de vous." value="true"/> + <check_box label="Lire les sons des gestes" name="gesture_audio_play_btn" tool_tip="Cocher cette case pour entendre les sons associés aux gestes." value="true"/> <text name="voice_chat_settings"> Paramètres du chat vocal </text> diff --git a/indra/newview/skins/default/xui/fr/panel_region_debug.xml b/indra/newview/skins/default/xui/fr/panel_region_debug.xml index cb4a74e142..733c3f9a22 100644 --- a/indra/newview/skins/default/xui/fr/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/fr/panel_region_debug.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<panel label="Débugger" name="Debug"> +<panel label="Débogage" name="Debug"> <text name="region_text_lbl"> Région : </text> diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index daa31c980a..f9f3366f63 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -4837,7 +4837,7 @@ Essayez avec le chemin d'accès à l'éditeur entre guillemets doubles Parler </string> <string name="Command_View_Label"> - Vue + Affichage </string> <string name="Command_Voice_Label"> Chat près de vous diff --git a/indra/newview/skins/default/xui/tr/floater_about.xml b/indra/newview/skins/default/xui/tr/floater_about.xml index 998890b85c..993ec42958 100644 --- a/indra/newview/skins/default/xui/tr/floater_about.xml +++ b/indra/newview/skins/default/xui/tr/floater_about.xml @@ -46,16 +46,16 @@ Ses Sunucusu Sürümü: [VOICE_VERSION] </panel> <panel label="Katkıda Bulunanlar" name="credits_panel"> <text name="linden_intro"> - Second Life, Lindens'lar tarafından geliştirilmiştir: + Second Life, Linden'lar tarafından geliştirilmiştir: </text> <text name="contrib_intro"> - açık kaynak kod katkısında bulunanlar: + Açık kaynak kod katkısında bulunanlar: </text> <text_editor name="contrib_names"> Geçici Ad çalıştırma sırasında değiştirilir </text_editor> <text name="trans_intro"> - çevirileri yapanlar: + Çevirileri yapanlar: </text> <text_editor name="trans_names"> Geçici Ad çalıştırma sırasında değiştirilir diff --git a/indra/newview/skins/default/xui/tr/floater_about_land.xml b/indra/newview/skins/default/xui/tr/floater_about_land.xml index c44722f4ba..e0350964b5 100644 --- a/indra/newview/skins/default/xui/tr/floater_about_land.xml +++ b/indra/newview/skins/default/xui/tr/floater_about_land.xml @@ -102,7 +102,7 @@ <text name="For Sale: Price L$[PRICE]."> Fiyat: L$[PRICE] (L$[PRICE_PER_SQM]/m²) </text> - <button label="Arazi Sat" name="Sell Land..."/> + <button label="Araziyi Sat" name="Sell Land..."/> <text name="For sale to"> Şu Alıcıya Satılık: [BUYER] </text> @@ -307,7 +307,7 @@ Sadece büyük parseller aramada görünür. İtme Yok (Bölge Geçersiz Kılma) </panel.string> <panel.string name="see_avs_text"> - Bu parseldeki sakinleri gör ve onlarla sohbet et + Parseldeki sakinleri gör ve onlarla sohbet et </panel.string> <text name="allow_label"> Sakinlere şunun için izin ver: @@ -336,7 +336,7 @@ Sadece büyük parseller aramada görünür. <check_box label="İtme Yok" name="PushRestrictCheck" tool_tip="Komut dosyalarının itmesini önler Bu seçeneğin işaretlenmesi arazinizdeki bozucu davranışları önlemeye yardımcı olabilir."/> <check_box label="Konumu Arama sonuçlarında göster (L$30/hafta)" name="ShowDirectoryCheck" tool_tip="Arama sonuçlarında bu parsel görünsün"/> <combo_box name="land category with adult"> - <combo_box.item label="Herhangi Bir Kategori" name="item0"/> + <combo_box.item label="Herh. Bir Kategori" name="item0"/> <combo_box.item label="Linden Konumu" name="item1"/> <combo_box.item label="Yetişkin" name="item2"/> <combo_box.item label="Sanat ve Kültür" name="item3"/> @@ -352,7 +352,7 @@ Sadece büyük parseller aramada görünür. <combo_box.item label="Diğer" name="item12"/> </combo_box> <combo_box name="land category"> - <combo_box.item label="Herhangi Bir Kategori" name="item0"/> + <combo_box.item label="Herh. Bir Kategori" name="item0"/> <combo_box.item label="Linden Konumu" name="item1"/> <combo_box.item label="Sanat ve Kültür" name="item3"/> <combo_box.item label="İş" name="item4"/> @@ -372,7 +372,7 @@ Sadece büyük parseller aramada görünür. </text> <texture_picker name="snapshot_ctrl" tool_tip="Bir resim seçmek için tıklayın"/> <text name="allow_label5"> - Diğer parsellerdeki Sakinlere şunun için izin verin: + Diğer parsel Sakinlerine şunun için izin verin: </text> <check_box label="Avatarları Gör" name="SeeAvatarsCheck" tool_tip="Diğer parsellerdeki sakinlerin bu parseldeki sakinleri görmesine ve onlarla sohbet etmesine, sizin de onları görüp, onlarla sohbet etmenize imkan tanır."/> <text name="landing_point"> @@ -419,7 +419,7 @@ Sadece büyük parseller aramada görünür. piksel </text> <text name="Options:"> - Seçenekler: + Seçenklr.: </text> <check_box label="Döngü" name="media_loop" tool_tip="Ortamı döngüsel olarak oynat. Ortamın oynatılması bittiğinde baştan tekrar başlayacaktır."/> </panel> @@ -448,7 +448,7 @@ Sadece büyük parseller aramada görünür. (Gayrimenkul tarafından tanımlanır) </panel.string> <panel.string name="allow_public_access"> - Kamusal Erişime İzin Ver ([MATURITY]) (Not: Bunun işaretinin kaldırılması yasaklama çizgileri oluşturacaktır) + Kamusal Erişime İzin Ver ([MATURITY]) (Not: İşaret kaldırılırsa yasaklama çizgileri oluşur) </panel.string> <panel.string name="estate_override"> Bu seçeneklerden biri veya daha fazlası gayrimenkul düzeyinde ayarlanır @@ -462,7 +462,7 @@ Sadece büyük parseller aramada görünür. <check_box label="Dosyadaki ödeme bilgileri [ESTATE_PAYMENT_LIMIT]" name="limit_payment" tool_tip="Tanınmayan Sakinleri Yasakla."/> <check_box label="Yaş doğrulama [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="Yaşını doğrulamayan Sakinleri yasakla Daha fazla bilgi için [SUPPORT_SITE] adresini ziyaret edin."/> <check_box label="Grup Erişimine İzin Ver: [GROUP]" name="GroupCheck" tool_tip="Genel sekmesinde grup ayarla."/> - <check_box label="Geçiş haklarını şuna sat:" name="PassCheck" tool_tip="Bu parsele geçici erişim verir"/> + <check_box label="Geçiş haklr. şuna sat:" name="PassCheck" tool_tip="Bu parsele geçici erişim verir"/> <combo_box name="pass_combo"> <combo_box.item label="Herkes" name="Anyone"/> <combo_box.item label="Grup" name="Group"/> diff --git a/indra/newview/skins/default/xui/tr/floater_buy_land.xml b/indra/newview/skins/default/xui/tr/floater_buy_land.xml index 4d43157f99..7b43af2ea4 100644 --- a/indra/newview/skins/default/xui/tr/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/tr/floater_buy_land.xml @@ -53,7 +53,7 @@ Daha küçük bir alan seçmeyi deneyin. Arazi alma bilgileri çekilirken hata oluştu. </floater.string> <floater.string name="buying_will"> - Bu arazinin satın alınması sonucu: + Arazinin satın alınması sonucu: </floater.string> <floater.string name="buying_for_group"> Bu arazinin grup için satın alınması sonucu: @@ -185,7 +185,7 @@ Daha küçük bir alan seçmeyi deneyin. nesnelerle satılır </text> <text name="info_action"> - Bu arazinin satın alınması sonucu: + Arazinin satın alınması sonucu: </text> <text name="error_message"> Bir şeyler yolunda değil. diff --git a/indra/newview/skins/default/xui/tr/floater_edit_day_cycle.xml b/indra/newview/skins/default/xui/tr/floater_edit_day_cycle.xml index e2e87ddf1e..4be1068dcc 100644 --- a/indra/newview/skins/default/xui/tr/floater_edit_day_cycle.xml +++ b/indra/newview/skins/default/xui/tr/floater_edit_day_cycle.xml @@ -22,10 +22,10 @@ Not: Ön ayarınızın adını değiştirirseniz, yeni bir ön ayar oluşturursunuz ve mevcut ön ayar değişmez. </text> <text name="hint_item1"> - - Belirli gökyüzü ayarlarını ve zamanı düzenlemek için bir sekmeye tıklayın. + - Birine tıklayarak gökyüzü ayarlarını/zamanı düzenleyin. </text> <text name="hint_item2"> - - Geçiş sürelerini ayarlamak için sekmelere tıklayın ve bunları sürükleyin. + - Sekmelere tıklayıp sürükleyerek geçiş sürlrn. ayarlayın. </text> <text name="hint_item3"> - Gün döngünüzü önizlemek için fırçayı kullanın. diff --git a/indra/newview/skins/default/xui/tr/floater_environment_settings.xml b/indra/newview/skins/default/xui/tr/floater_environment_settings.xml index 943e1e810d..e702da7e1b 100644 --- a/indra/newview/skins/default/xui/tr/floater_environment_settings.xml +++ b/indra/newview/skins/default/xui/tr/floater_environment_settings.xml @@ -18,7 +18,7 @@ <combo_box.item label="-Bir ön ayar seçin-" name="item0"/> </combo_box> <text name="sky_dayc_settings_title"> - Gökyüzü / Gün Döngüsü + Gökyüzü/Gün Dön. </text> <radio_group name="sky_dayc_settings_radio_group"> <radio_item label="Sabit gökyüzü" name="my_sky_settings"/> diff --git a/indra/newview/skins/default/xui/tr/floater_god_tools.xml b/indra/newview/skins/default/xui/tr/floater_god_tools.xml index ce7f7badcc..26e5ebd18b 100644 --- a/indra/newview/skins/default/xui/tr/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/tr/floater_god_tools.xml @@ -67,7 +67,7 @@ <button label="Hedefin *Herhangi Bir* Arazideki Komut Dosyalı Nesnelerini Sil" label_selected="Hedefin *Herhangi Bir* Arazideki Komut Dosyalı Nesnelerini Sil" name="Delete Target's Scripted Objects On *Any* Land" tool_tip="Bu bölgede hedefe ait olan tüm komut dosyalı nesneleri silin. (kopya yok) nesneler geri döndürülür."/> <button label="Hedefin *TÜM* Nesnelerini Sil" label_selected="Hedefin *TÜM* Nesnelerini Sil" name="Delete *ALL* Of Target's Objects" tool_tip="Bu bölgede hedefe ait olan tüm nesneleri silin. (kopya yok) nesneler geri döndürülür."/> <button label="En Çok Çarpışanlar" label_selected="En Çok Çarpışanlar" name="Get Top Colliders" tool_tip="En dar fazda geri aramaları yaşayan nesnelerin listesini alır"/> - <button label="En Çok Komut Dosyası Çalıştıranlar" label_selected="En Çok Komut Dosyası Çalıştıranlar" name="Get Top Scripts" tool_tip="Komut dosyalarını çalıştırırken en çok zaman harcayan nesnelerin listesini alır"/> + <button label="En Çok Komut Dsy. Çalştr." label_selected="En Çok Komut Dsy. Çalştr." name="Get Top Scripts" tool_tip="Komut dosyalarını çalıştırırken en çok zaman harcayan nesnelerin listesini alır"/> <button label="Komut dosyaları özeti" label_selected="Komut dosyaları özeti" name="Scripts digest" tool_tip="Tüm komut dosyalarının ve her birinin ne kadar kullanıldığının listesini alır"/> </panel> <panel label="Talep" name="request"> diff --git a/indra/newview/skins/default/xui/tr/floater_joystick.xml b/indra/newview/skins/default/xui/tr/floater_joystick.xml index 31d819743c..4a27aac3c1 100644 --- a/indra/newview/skins/default/xui/tr/floater_joystick.xml +++ b/indra/newview/skins/default/xui/tr/floater_joystick.xml @@ -3,10 +3,10 @@ <floater.string name="NoDevice"> cihaz tespit edilmedi </floater.string> - <check_box label="Oyun Çubuğunu Etkinleştir:" name="enable_joystick"/> - <spinner label="X Eksen Haritalama" name="JoystickAxis1"/> - <spinner label="Y Eksen Haritalama" name="JoystickAxis2"/> - <spinner label="Z Eksen Haritalama" name="JoystickAxis0"/> + <check_box label="Oyun Çub. Etkşt:" name="enable_joystick"/> + <spinner label="X Eks. Haritalama" name="JoystickAxis1"/> + <spinner label="Y Eks. Haritalama" name="JoystickAxis2"/> + <spinner label="Z Eks. Haritalama" name="JoystickAxis0"/> <spinner label="Eğim Haritalama" name="JoystickAxis4"/> <spinner label="Düşey Sapma Haritalama" name="JoystickAxis5"/> <spinner label="Tilt Haritalama" name="JoystickAxis3"/> diff --git a/indra/newview/skins/default/xui/tr/floater_preferences.xml b/indra/newview/skins/default/xui/tr/floater_preferences.xml index a0be9dc53f..edb3c19b81 100644 --- a/indra/newview/skins/default/xui/tr/floater_preferences.xml +++ b/indra/newview/skins/default/xui/tr/floater_preferences.xml @@ -7,7 +7,7 @@ <panel label="Grafikler" name="display"/> <panel label="Ses ve Ortamlar" name="audio"/> <panel label="Sohbet" name="chat"/> - <panel label="Hareketler ve Görünümler" name="move"/> + <panel label="Hareket ve Görünümler" name="move"/> <panel label="Bildirimler" name="msgs"/> <panel label="Renkler" name="colors"/> <panel label="Gizlilik" name="im"/> diff --git a/indra/newview/skins/default/xui/tr/floater_preview_gesture.xml b/indra/newview/skins/default/xui/tr/floater_preview_gesture.xml index fa9fd37e6c..dc6f66f657 100644 --- a/indra/newview/skins/default/xui/tr/floater_preview_gesture.xml +++ b/indra/newview/skins/default/xui/tr/floater_preview_gesture.xml @@ -65,7 +65,7 @@ <check_box label="tüm animasyonlar bitinceye kadar" name="wait_anim_check"/> <check_box label="saniye olarak zaman:" name="wait_time_check"/> <text name="help_label"> - Bekleme adımlar eklemediğiniz sürece tüm adımlar aynı anda gerçekleşir. + Bekleme adımları eklemediğiniz sürece tüm adımlar aynı anda gerçekleşir. </text> <check_box label="Etkin" name="active_check" tool_tip="Etkin mimikleri tetiklemek için tetikleme fazları için sohbet gerçekleştirebilir veya kısayol tuşlarına basabilirsiniz. Bir anahtar bağlama ihtilafı olduğunda mimikler genellikle inaktif hale geçer."/> <button label="Önizleme" name="preview_btn"/> diff --git a/indra/newview/skins/default/xui/tr/floater_report_abuse.xml b/indra/newview/skins/default/xui/tr/floater_report_abuse.xml index ae4c3cc75e..c5765883c4 100644 --- a/indra/newview/skins/default/xui/tr/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/tr/floater_report_abuse.xml @@ -81,7 +81,7 @@ Özet: </text> <text name="dscr_title"> - Ayrıntılar: + Ayrıntl: </text> <text name="bug_aviso"> Mümkün olduğunca spesifik olun diff --git a/indra/newview/skins/default/xui/tr/floater_tools.xml b/indra/newview/skins/default/xui/tr/floater_tools.xml index cd5e6b7fac..d4ee9995dd 100644 --- a/indra/newview/skins/default/xui/tr/floater_tools.xml +++ b/indra/newview/skins/default/xui/tr/floater_tools.xml @@ -55,7 +55,7 @@ <radio_item label="Uzat (Ctrl+Shift)" name="radio stretch"/> <radio_item label="Yüzü Seç" name="radio select face"/> </radio_group> - <check_box label="Bağlantılı olanları düzenle" name="checkbox edit linked parts"/> + <check_box label="Bağlantılıları düzenle" name="checkbox edit linked parts"/> <button label="Bağla" name="link_btn"/> <button label="Bağlantıyı Kopar" name="unlink_btn"/> <text label="Her İki Tarafı Uzat" name="checkbox uniform label"> @@ -81,7 +81,7 @@ <button name="ToolGrass" tool_tip="Çimen"/> <check_box label="Seçili Aracı tut" name="checkbox sticky"/> <check_box label="Seçimi kopyala" name="checkbox copy selection"/> - <check_box initial_value="true" label="Kopyayı Merkeze Al" name="checkbox copy centers"/> + <check_box initial_value="true" label="Kopyayı Merkezle" name="checkbox copy centers"/> <check_box label="Kopyayı Döndür" name="checkbox copy rotates"/> <radio_group name="land_radio_group"> <radio_item label="Araziyi Seç" name="radio select land"/> @@ -376,7 +376,7 @@ </combo_box> <spinner label="Yerçekimi" name="Physics Gravity"/> <spinner label="Sürtünme" name="Physics Friction"/> - <spinner label="100 kg/m^3 cinsinden yoğunluk" name="Physics Density"/> + <spinner label="100 kg/m3 cinsinden yoğunluk" name="Physics Density"/> <spinner label="Restitüsyon" name="Physics Restitution"/> </panel> <panel label="Doku" name="Texture"> diff --git a/indra/newview/skins/default/xui/tr/menu_viewer.xml b/indra/newview/skins/default/xui/tr/menu_viewer.xml index efeed833a5..75294e38d5 100644 --- a/indra/newview/skins/default/xui/tr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/tr/menu_viewer.xml @@ -93,7 +93,7 @@ <menu_item_call label="Arazi Aracı" name="Land"/> </menu> <menu_item_call label="Bağla" name="Link"/> - <menu_item_call label="Bağlantıyı Kopar" name="Unlink"/> + <menu_item_call label="Bağlnty. Kopar" name="Unlink"/> <menu_item_check label="Bağlantılı Parçaları Düzenle" name="Edit Linked Parts"/> <menu label="Bağlantılı Parçaları Seç" name="Select Linked Parts"> <menu_item_call label="Sonraki Parçayı Seç" name="Select Next Part"/> @@ -118,7 +118,7 @@ <menu_item_call label="Komut Dosyalarını Çalışıyor Olarak Ayarla" name="Set Scripts to Running"/> <menu_item_call label="Komut Dosyalarını Çalışmıyor Olarak Ayarla" name="Set Scripts to Not Running"/> </menu> - <menu label="Seçenekler" name="Options"> + <menu label="Seçenklr." name="Options"> <menu_item_check label="Gelişmiş İzinleri Göster" name="DebugPermissions"/> <menu_item_check label="Sadece Nesnelerimi Seç" name="Select Only My Objects"/> <menu_item_check label="Sadece Hareket Ettirilebilir Nesneleri Seç" name="Select Only Movable Objects"/> diff --git a/indra/newview/skins/default/xui/tr/notifications.xml b/indra/newview/skins/default/xui/tr/notifications.xml index a268c103a6..b62ff01ab9 100644 --- a/indra/newview/skins/default/xui/tr/notifications.xml +++ b/indra/newview/skins/default/xui/tr/notifications.xml @@ -2270,7 +2270,7 @@ Daha küçük bir arazi parçası seçmeyi deneyin. [NAME] [DATE] <form name="form"> - <button name="Details" text="Ayrıntılar"/> + <button name="Details" text="Ayrıntl"/> <button name="Cancel" text="İptal"/> </form> </notification> diff --git a/indra/newview/skins/default/xui/tr/panel_people.xml b/indra/newview/skins/default/xui/tr/panel_people.xml index 7d42e3ab79..1a1e53bac2 100644 --- a/indra/newview/skins/default/xui/tr/panel_people.xml +++ b/indra/newview/skins/default/xui/tr/panel_people.xml @@ -24,7 +24,7 @@ Birlikte takılacak kişiler mi arıyorsunuz? [secondlife:///app/worldmap Dünya <tab_container name="tabs"> <panel label="YAKIN" name="nearby_panel"> <panel label="bottom_panel" name="bottom_panel"> - <menu_button name="nearby_view_sort_btn" tool_tip="Seçenekler"/> + <menu_button name="nearby_view_sort_btn" tool_tip="Seçenklr."/> <button name="add_friend_btn" tool_tip="Seçilen Sakini arkadaş listene ekle"/> </panel> </panel> @@ -49,14 +49,14 @@ Birlikte takılacak kişiler mi arıyorsunuz? [secondlife:///app/worldmap Dünya </panel> <panel label="GRUPLARIM" name="groups_panel"> <panel label="bottom_panel" name="bottom_panel"> - <menu_button name="groups_viewsort_btn" tool_tip="Seçenekler"/> + <menu_button name="groups_viewsort_btn" tool_tip="Seçenklr."/> <button name="plus_btn" tool_tip="Gruba katıl/yeni grup oluştur"/> <button name="activate_btn" tool_tip="Seçilen grubu etkinleştir"/> </panel> </panel> <panel label="SON" name="recent_panel"> <panel label="bottom_panel" name="bottom_panel"> - <menu_button name="recent_viewsort_btn" tool_tip="Seçenekler"/> + <menu_button name="recent_viewsort_btn" tool_tip="Seçenklr."/> <button name="add_friend_btn" tool_tip="Seçilen Sakini arkadaş listene ekle"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/tr/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/tr/panel_preferences_advanced.xml index 787efa32f4..770cdc6efd 100644 --- a/indra/newview/skins/default/xui/tr/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/tr/panel_preferences_advanced.xml @@ -6,11 +6,11 @@ <text name="Cache:"> Önbellek: </text> - <spinner label="Önbellek büyüklüğü (64 - 9984 MB)" name="cachesizespinner"/> + <spinner label="Önbellek boyutu (64-9984 MB)" name="cachesizespinner"/> <text name="text_box5"> MB </text> - <button label="Önbelleği Temizle" label_selected="Önbelleği Temizle" name="clear_cache"/> + <button label="Önbelleği Sil" label_selected="Önbelleği Sil" name="clear_cache"/> <text name="Cache location"> Önbellek konumu: </text> diff --git a/indra/newview/skins/default/xui/tr/panel_preferences_chat.xml b/indra/newview/skins/default/xui/tr/panel_preferences_chat.xml index 9c9e960715..f7f0698a31 100644 --- a/indra/newview/skins/default/xui/tr/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/tr/panel_preferences_chat.xml @@ -16,9 +16,9 @@ Aİ'leri şurada göster: </text> <text name="requires_restart_label"> - (yeniden başlatma gerektirir) + (tekrar başlatma gerekir) </text> - <radio_group name="chat_window" tool_tip="Anlık İletilerinizi ayrı gezdiricilerde veya birden çok sekmeye sahip tek bir gezdiricide gösterin (Yeniden başlatma gerektirir)"> + <radio_group name="chat_window" tool_tip="Anlık İletileri ayrı gezdiricilerde veya çoklu sekmelere sahip tek bir gezdiricide gösterin (tekrar başlatma gerekir)"> <radio_item label="Ayrı Pencereler" name="radio" value="0"/> <radio_item label="Sekmeler" name="radio2" value="1"/> </radio_group> diff --git a/indra/newview/skins/default/xui/tr/panel_preferences_general.xml b/indra/newview/skins/default/xui/tr/panel_preferences_general.xml index fbfc07c4b8..4a48b1588c 100644 --- a/indra/newview/skins/default/xui/tr/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/tr/panel_preferences_general.xml @@ -22,7 +22,7 @@ (Yeniden başlatma gerekir) </text> <text name="maturity_desired_prompt"> - Seviyelendirdiğim şu içeriğe erişim istiyorum: + Seviyelndrl. içeriğe erişim istiyorum:: </text> <combo_box name="maturity_desired_combobox"> <combo_box.item label="Genel, Orta, Yetişkin" name="Desired_Adult"/> diff --git a/indra/newview/skins/default/xui/tr/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/tr/panel_preferences_graphics1.xml index ba31640e9c..ddb83ffc69 100644 --- a/indra/newview/skins/default/xui/tr/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/tr/panel_preferences_graphics1.xml @@ -51,7 +51,7 @@ <combo_box.item label="Tüm avatarlar ve nesneler" name="3"/> <combo_box.item label="Her şey" name="4"/> </combo_box> - <slider label="Avatarın Fiziksel Özellikleri:" name="AvatarPhysicsDetail"/> + <slider label="Avatar Fzk. Özlk.:" name="AvatarPhysicsDetail"/> <text name="AvatarPhysicsDetailText"> Düşük </text> @@ -60,7 +60,7 @@ m </text> <slider label="Maks. parçacık sayısı:" name="MaxParticleCount"/> - <slider label="Düşük grafik özellikli olmayan maks. avatar sayısı:" name="MaxNumberAvatarDrawn"/> + <slider label="Düşük gr. özl. olmayan mks. avatar:" name="MaxNumberAvatarDrawn"/> <slider label="Son işleme kalitesi:" name="RenderPostProcess"/> <text name="MeshDetailText"> Örgü detayı: diff --git a/indra/newview/skins/default/xui/tr/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/tr/panel_preferences_privacy.xml index e76616f667..9111594979 100644 --- a/indra/newview/skins/default/xui/tr/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/tr/panel_preferences_privacy.xml @@ -11,7 +11,7 @@ <check_box label="Çevrimiçi olduğumu sadece arkadaşlar ve gruplar bilsin" name="online_visibility"/> <check_box label="Sadece arkadaşlar ve gruplar beni arasın veya Aİ göndersin" name="voice_call_friends_only_check"/> <check_box label="Aramaları sonlandırırken mikrofonu kapat" name="auto_disengage_mic_check"/> - <check_box label="Oturum Açarken Favori Yer İmlerimi Göster ('Buradan başla' açılır menüsünden)" name="favorites_on_login_check"/> + <check_box label="Oturum Açarken Favori Yer İmlerimi Göster ('Buradan başla' menüsünden)" name="favorites_on_login_check"/> <text name="Logs:"> Sohbet Günlükleri: </text> diff --git a/indra/newview/skins/default/xui/tr/panel_region_debug.xml b/indra/newview/skins/default/xui/tr/panel_region_debug.xml index f16c666e86..6e15e0f6f6 100644 --- a/indra/newview/skins/default/xui/tr/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/tr/panel_region_debug.xml @@ -21,14 +21,14 @@ </line_editor> <button label="Seç" name="choose_avatar_btn"/> <text name="options_text_lbl"> - Seçenekler: + Seçenklr.: </text> <check_box label="Komut dosyaları ile" name="return_scripts" tool_tip="Sadece komut dosyaları olan nesneler iade edilsin"/> <check_box label="Başkasına ait arazi üzerinde" name="return_other_land" tool_tip="Sadece başkasına ait arazi üzerinde olan nesneler iade edilsin"/> <check_box label="Bu gayrimenkulu oluşturan bölgelerin tümünde" name="return_estate_wide" tool_tip="Bu gayrimenkulu oluşturan bölgelerin tümündeki nesneler iade edilsin"/> <button label="İade Et" name="return_btn"/> <button label="En Çok Çarpışanlar..." name="top_colliders_btn" tool_tip="En çok potansiyel çarpışma yaşayan nesnelerin listesi"/> - <button label="En Çok Komut Dosyası Çalıştıranlar..." name="top_scripts_btn" tool_tip="Komut dosyalarını çalıştırırken en çok zaman harcayan nesnelerin listesi"/> + <button label="En Çok Komut Dsy. Çalştr...." name="top_scripts_btn" tool_tip="Komut dosyalarını çalıştırırken en çok zaman harcayan nesnelerin listesi"/> <button label="Bölgeyi Yeniden Başlat" name="restart_btn" tool_tip="2 dakikalık bir geri sayımdan sonra bölgeyi yeniden başlat"/> <button label="Yeniden Başlatmayı Ertele" name="cancel_restart_btn" tool_tip="Bölgenin yeniden başlatılmasını 1 saat ertele"/> </panel> diff --git a/indra/newview/skins/default/xui/tr/panel_region_environment.xml b/indra/newview/skins/default/xui/tr/panel_region_environment.xml index 851cd23f30..058ea91b70 100644 --- a/indra/newview/skins/default/xui/tr/panel_region_environment.xml +++ b/indra/newview/skins/default/xui/tr/panel_region_environment.xml @@ -15,7 +15,7 @@ <combo_box.item label="-Bir ön ayar seçin-" name="item0"/> </combo_box> <text name="sky_dayc_settings_title"> - Gökyüzü / Gün Döngüsü + Gökyüzü/Gün Dön. </text> <radio_group name="sky_dayc_settings_radio_group"> <radio_item label="Sabit gökyüzü" name="my_sky_settings"/> diff --git a/indra/newview/skins/default/xui/tr/panel_region_terrain.xml b/indra/newview/skins/default/xui/tr/panel_region_terrain.xml index 874d27abfb..3226ee008e 100644 --- a/indra/newview/skins/default/xui/tr/panel_region_terrain.xml +++ b/indra/newview/skins/default/xui/tr/panel_region_terrain.xml @@ -7,7 +7,7 @@ bilinmiyor </text> <spinner label="Su Yüksekliği" name="water_height_spin"/> - <spinner label="Yüzey Yükseltme Limiti" name="terrain_raise_spin"/> + <spinner label="Yüzey Yükslt. Limiti" name="terrain_raise_spin"/> <spinner label="Yüzey Alçatma Limiti" name="terrain_lower_spin"/> <text name="detail_texture_text"> Yüzey Dokuları (512x512, 24 bit .tga dosyalar gerektirir) diff --git a/indra/newview/skins/default/xui/tr/role_actions.xml b/indra/newview/skins/default/xui/tr/role_actions.xml index 18f7d6dca2..655ac64172 100644 --- a/indra/newview/skins/default/xui/tr/role_actions.xml +++ b/indra/newview/skins/default/xui/tr/role_actions.xml @@ -44,7 +44,7 @@ <action_set description="Bu Yeteneklere, grubun sahip olduğu parsellere erişime izin verme veya buralara erişimi yasaklama ve Second Life Sakinlerini dondurma veya parselden dışarı çıkarma da dahildir." name="Parcel Access"> <action description="Parselin Erişim listelerini yönet" longdescription="Parselin Erişim listelerini Arazi Hakkında > Erişim sekmesinden yönetin." name="land manage allowed" value="29"/> <action description="Parselin Yasaklama listelerini yönet" longdescription="Parselin Yasaklama listelerini Arazi Hakkında > Erişim sekmesinden yönetin." name="land manage banned" value="30"/> - <action description="Parselin 'Geçiş haklarını şuna sat' ayarlarını değiştir" longdescription="Parselin 'Geçiş haklarını şuna sat' ayarlarını Arazi Hakkında > Erişim sekmesinden değiştirin." name="land manage passes" value="31"/> + <action description="Parselin 'Geçiş haklr. şuna sat' ayarlarını değiştir" longdescription="Parselin 'Geçiş haklr. şuna sat' ayarlarını Arazi Hakkında > Erişim sekmesinden değiştirin." name="land manage passes" value="31"/> <action description="Parsel üzerindeki Second Life Sakinlerini dışarı çıkar veya dondur" longdescription="Bu Yeteneğe sahip olan bir Roldeki Üyeler, grubun sahip olduğu bir parsel üzerinde olmasını istemedikleri bir Second Life sakininin üzerini sağ tıklatıp 'Dışarı Çıkar' veya 'Dondur'u seçebilirler." name="land admin" value="32"/> </action_set> <action_set description="Bu Yeteneklere üyelerin nesneleri iade etmelerine, Linden bitkilerini yerleştirmelerine ve bu bitkilerin yerlerini değiştirmelerine izin veren güçler de dahildir. Bu özellik, Üyelerin çöpleri temizlemeleri ve bahçe düzenlemesi yapmaları için kullanışlıdır; fakat dikkatle kullanılmalıdır, çünkü nesneleri iade etmenin geri alınma imkanı yoktur." name="Parcel Content"> diff --git a/indra/newview/skins/default/xui/tr/sidepanel_task_info.xml b/indra/newview/skins/default/xui/tr/sidepanel_task_info.xml index 28eeef02d3..2fa6281f05 100644 --- a/indra/newview/skins/default/xui/tr/sidepanel_task_info.xml +++ b/indra/newview/skins/default/xui/tr/sidepanel_task_info.xml @@ -118,6 +118,6 @@ <button label="Aç" name="open_btn"/> <button label="Öde" name="pay_btn"/> <button label="Satın Al" name="buy_btn"/> - <button label="Ayrıntılar" name="details_btn"/> + <button label="Ayrıntl" name="details_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/tr/strings.xml b/indra/newview/skins/default/xui/tr/strings.xml index a17d78486d..bf331dc3cf 100644 --- a/indra/newview/skins/default/xui/tr/strings.xml +++ b/indra/newview/skins/default/xui/tr/strings.xml @@ -2160,7 +2160,7 @@ Lütfen bir dakika içerisinde tekrar oturum açmayı deneyin. Aşağı </string> <string name="Any Category"> - Herhangi Bir Kategori + Herh. Bir Kategori </string> <string name="Shopping"> Alışveriş @@ -2190,7 +2190,7 @@ Lütfen bir dakika içerisinde tekrar oturum açmayı deneyin. Kişisel </string> <string name="None"> - Hiçbiri + Renksiz </string> <string name="Linden Location"> Linden Konumu @@ -2390,7 +2390,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Arka Perçem </string> <string name="Baggy"> - Lüleler + Torbalı </string> <string name="Bangs"> Kahküller @@ -2480,7 +2480,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Geniş </string> <string name="Brow Size"> - Kaş Büyüklüğü + Alın Genişliği </string> <string name="Bug Eyes"> Patlak Gözlü @@ -2777,7 +2777,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Kaş Yüksekliği </string> <string name="Eyebrow Points"> - Kaş Noktaları + Kaş Yapısı </string> <string name="Eyebrow Size"> Kaş Büyüklüğü @@ -2846,13 +2846,13 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Ön Perçem </string> <string name="Full Back"> - Saçlar Arkada + Arkası Düz </string> <string name="Full Eyeliner"> Çift Taraflı Göz Kalemi </string> <string name="Full Front"> - Saçlar Önde + Önü Düz </string> <string name="Full Hair Sides"> Saçlar Yanda @@ -2936,13 +2936,13 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Yüksek Topuklar </string> <string name="High Jaw"> - Yüksek Çene Ucu + Ayrık </string> <string name="High Platforms"> - Yüksek Topuklu Ayakkabılar + Yüksek Topuklu </string> <string name="High and Tight"> - Tepede Bırakılmış Saç + Düşük </string> <string name="Higher"> Daha Yüksek @@ -2954,7 +2954,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Kalça Genişliği </string> <string name="In"> - İç + İçeri </string> <string name="In Shdw Color"> İç Gölge Rengi @@ -2978,19 +2978,19 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Ceket Kırışıklıkları </string> <string name="Jaw Angle"> - Çene Ucu Açısı + Çenenin Boyuna Uzaklığı </string> <string name="Jaw Jut"> - Çene Ucu Çıkıntısı + Alt Çene Uzunluğu </string> <string name="Jaw Shape"> - Çene Ucu Şekli + Çene Kemiği Genişliği </string> <string name="Join"> - Birleştir + Birleşik </string> <string name="Jowls"> - Gıdıklar + Avurtlar </string> <string name="Knee Angle"> Diz Açısı @@ -3029,7 +3029,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Daha Az Dolgun </string> <string name="Less Gravity"> - Daha Az Yerçekimi + Dik Göğüs </string> <string name="Less Love"> Daha İnce Bel @@ -3047,7 +3047,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Daha Az Yuvarlak </string> <string name="Less Saddle"> - Daha Dar Kalça + Basensiz </string> <string name="Less Square"> Daha Az Küt @@ -3098,7 +3098,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Uzun Kafa </string> <string name="Long Hips"> - Geniş Kalçalar + Yüksek kalça </string> <string name="Long Legs"> Uzun Bacaklar @@ -3107,7 +3107,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Uzun Boyun </string> <string name="Long Pigtails"> - Uzun Saç Örgüleri + Yandan Uzun Kuyruk </string> <string name="Long Ponytail"> Uzun Atkuyruğu @@ -3137,13 +3137,13 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Alçak Topuklar </string> <string name="Low Jaw"> - Düşük Çene Ucu + Bitişik </string> <string name="Low Platforms"> Alçak Topuklu </string> <string name="Low and Loose"> - Serbest At Kuyruğu + Yüksek </string> <string name="Lower"> Daha Alçak @@ -3182,7 +3182,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Daha Dolgun </string> <string name="More Gravity"> - Daha Çok Yerçekimi + Sarkık Göğüs </string> <string name="More Lipstick"> Daha Çok Ruj @@ -3191,7 +3191,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Daha Kalın Bel </string> <string name="More Lower Lip"> - Daha Çok Alt Dudak + Daha Dolgun Alt Dudak </string> <string name="More Muscles"> Daha Çok Kas @@ -3206,7 +3206,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Daha Yuvarlak </string> <string name="More Saddle"> - Daha Geniş Kalça + Basenli </string> <string name="More Sloped"> Daha Eğimli @@ -3215,7 +3215,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Daha Küt </string> <string name="More Upper Lip"> - Daha Çok Üst Dudak + Daha Dolgun Üst Dudak </string> <string name="More Vertical"> Daha Dikey @@ -3260,7 +3260,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Önü Dar </string> <string name="Narrow Lips"> - İnce Dudaklar + Küçük Dudaklar </string> <string name="Natural"> Doğal @@ -3359,7 +3359,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Turuncu </string> <string name="Out"> - Dış + Dışarı </string> <string name="Out Shdw Color"> Dış Gölge Rengi @@ -3377,7 +3377,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Dış Gölge </string> <string name="Overbite"> - Üst Dişler Önde + Öne Doğru </string> <string name="Package"> Apış Arası Şişkinliği @@ -3416,7 +3416,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Pigment </string> <string name="Pigtails"> - Saç Örgüleri + Yan Kuyruklar </string> <string name="Pink"> Pembe @@ -3431,7 +3431,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Topuk Genişliği </string> <string name="Pointy"> - Sivri + Dar </string> <string name="Pointy Heels"> Sivri Topuklar @@ -3482,25 +3482,25 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Dağınık Saç </string> <string name="Saddle Bags"> - Kalça Kalınlığı + Basen Genişliği </string> <string name="Scrawny Leg"> Sıska Bacak </string> <string name="Separate"> - Ayrı + Ayrık </string> <string name="Shallow"> Sığ </string> <string name="Shear Back"> - Arkayı Dikey Kaydır + Arka Dolgunluğu </string> <string name="Shear Face"> Yüzü Dikey Kaydır </string> <string name="Shear Front"> - Önü Dikey Kaydır + Ön Dolgunluğu </string> <string name="Shear Left Up"> Solu Yukarı Kaydır @@ -3509,10 +3509,10 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Sağı Yukarı Kaydır </string> <string name="Sheared Back"> - Arkası Dikey Kaydırılmış + Arkası Dolgun </string> <string name="Sheared Front"> - Önü Dikey Kaydırılmış + Önü Dolgun </string> <string name="Shift Left"> Sola Kaydır @@ -3548,7 +3548,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Kısa Boyun </string> <string name="Short Pigtails"> - Kısa Atkuyrukları + Yandan Kısa Kuyruk </string> <string name="Short Ponytail"> Kısa Atkuyruğu @@ -3560,7 +3560,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Kısa Gövde </string> <string name="Short hips"> - Dar kalçalar + Düşük kalça </string> <string name="Shoulders"> Omuzlar @@ -3638,7 +3638,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Dikleştirilmiş Saç </string> <string name="Square"> - Kare + Geniş </string> <string name="Square Toe"> Küt Burunlu @@ -3680,7 +3680,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Kalın Boyun </string> <string name="Thick Toe"> - Kalın kabu Burnu + Kalın Ayak Ucu </string> <string name="Thin"> İnce @@ -3695,7 +3695,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. İnce Burun </string> <string name="Tight Chin"> - Dar Çene + Çift Çene </string> <string name="Tight Cuffs"> Dar Paçalar @@ -3710,7 +3710,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Dar Etek </string> <string name="Tight Sleeves"> - Dar Kollar + Dar Kollu </string> <string name="Toe Shape"> Ayakkabu Burnu Şekli @@ -3728,13 +3728,13 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Sıska Gövde </string> <string name="Unattached"> - Bağımsız + Ayrık </string> <string name="Uncreased"> Buruşuk olmayan </string> <string name="Underbite"> - Alt Dişler Önde + Geriye Doğru </string> <string name="Unnatural"> Doğal Olmayan @@ -3770,7 +3770,7 @@ Bu iletiyi almaya devam ederseniz, lütfen [SUPPORT_SITE] bölümüne başvurun. Geniş </string> <string name="Wide Back"> - Geniş Sırt + Geniş Arka </string> <string name="Wide Front"> Geniş Ön diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index e9eb3c1884..328ab4ca51 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -4,7 +4,6 @@ project (test) include(00-Common) include(LLCommon) -include(LLDatabase) include(LLInventory) include(LLMath) include(LLMessage) @@ -32,7 +31,7 @@ include_directories( set(test_SOURCE_FILES io.cpp -# llapp_tut.cpp # Temporarily removed until thread issues can be solved + llapp_tut.cpp llblowfish_tut.cpp llbuffer_tut.cpp lldoubledispatch_tut.cpp @@ -53,8 +52,6 @@ set(test_SOURCE_FILES llservicebuilder_tut.cpp llstreamtools_tut.cpp lltemplatemessagebuilder_tut.cpp - lltimestampcache_tut.cpp - lltranscode_tut.cpp lltut.cpp lluuidhashmap_tut.cpp message_tut.cpp @@ -76,12 +73,6 @@ if (NOT WINDOWS) ) endif (NOT WINDOWS) -if (NOT DARWIN) - list(APPEND test_SOURCE_FILES - lldatabase_tut.cpp - ) -endif (NOT DARWIN) - set_source_files_properties(${test_HEADER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) @@ -100,7 +91,6 @@ target_link_libraries(test ${LLCOMMON_LIBRARIES} ${EXPAT_LIBRARIES} ${GOOGLEMOCK_LIBRARIES} - ${APRICONV_LIBRARIES} ${PTHREAD_LIBRARY} ${WINDOWS_LIBRARIES} ${BOOST_PROGRAM_OPTIONS_LIBRARY} @@ -119,38 +109,28 @@ endif (WINDOWS) get_target_property(TEST_EXE test LOCATION) -SET_TEST_PATH(LD_LIBRARY_PATH) -LL_TEST_COMMAND(command "${LD_LIBRARY_PATH}" - "${TEST_EXE}" "--output=${CMAKE_CURRENT_BINARY_DIR}/cpp_test_results.txt" "--touch=${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt") +SET_TEST_PATH(DYLD_LIBRARY_PATH) + +LL_TEST_COMMAND(command + "${DYLD_LIBRARY_PATH}" + "${TEST_EXE}" + "--output=${CMAKE_CURRENT_BINARY_DIR}/cpp_test_results.txt" + "--touch=${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt") + ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt COMMAND ${command} DEPENDS test WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "C++ unit tests" - ) + ) set(test_results ${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt) -if (EXISTS /etc/debian_version_FAIL) - # The Python tests have all kinds of wacky non-portable assumptions - # built in. - - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/py_tests_ok.txt - COMMAND ${PYTHON_EXECUTABLE} - ARGS - ${CMAKE_CURRENT_SOURCE_DIR}/test.py - --mode=static - --output=${CMAKE_CURRENT_BINARY_DIR}/py_test_results.txt - --touch=${CMAKE_CURRENT_BINARY_DIR}/py_tests_ok.txt - --mode=static - DEPENDS test.py - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMENT "Python unit tests" - ) - - list(APPEND test_results ${CMAKE_CURRENT_BINARY_DIR}/py_tests_ok.txt) -endif (EXISTS /etc/debian_version_FAIL) - -add_custom_target(tests_ok ALL DEPENDS ${test_results}) +# This should cause the test executable to be built, but not +# run if LL_TESTS is disabled. This will hopefully keep the +# tests up to date with any code changes changes even if +# developers choose to disable LL_TESTS. +if (LL_TESTS) + add_custom_target(tests_ok ALL DEPENDS ${test_results}) +endif (LL_TESTS) diff --git a/indra/test/io.cpp b/indra/test/io.cpp index c06c1b153b..ce747f667d 100644 --- a/indra/test/io.cpp +++ b/indra/test/io.cpp @@ -909,7 +909,7 @@ namespace tut pipe_and_pump_fitness() { - LLFrameTimer::updateFrameTime(); + LLFrameTimer::updateFrameTime(); apr_pool_create(&mPool, NULL); mPump = new LLPumpIO(mPool); mSocket = LLSocket::create( diff --git a/indra/test/llapp_tut.cpp b/indra/test/llapp_tut.cpp new file mode 100644 index 0000000000..aa5c0672e6 --- /dev/null +++ b/indra/test/llapp_tut.cpp @@ -0,0 +1,162 @@ +/** + * @file llapp_tut.cpp + * @author Phoenix + * @date 2006-09-12 + * + * $LicenseInfo:firstyear=2006&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2006-2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include <tut/tut.hpp> + +#include "linden_common.h" +#include "llapp.h" +#include "lltut.h" + + +namespace tut +{ + struct application + { + class LLTestApp : public LLApp + { + public: + virtual bool init() { return true; } + virtual bool cleanup() { return true; } + virtual bool mainLoop() { return true; } + }; + LLTestApp* mApp; + application() + { + mApp = new LLTestApp; + } + ~application() + { + delete mApp; + } + }; + + typedef test_group<application> application_t; + typedef application_t::object application_object_t; + tut::application_t tut_application("application"); + + template<> template<> + void application_object_t::test<1>() + { + LLSD defaults; + defaults["template"] = "../../../scripts/messages/message_template.msg"; + defaults["configdir"] = "."; + defaults["datadir"] = "data"; + mApp->setOptionData(LLApp::PRIORITY_DEFAULT, defaults); + + LLSD datadir_sd = mApp->getOption("datadir"); + ensure_equals("data type", datadir_sd.type(), LLSD::TypeString); + ensure_equals( + "data value", datadir_sd.asString(), std::string("data")); + } + + template<> template<> + void application_object_t::test<2>() + { + const int ARGC = 13; + const char* ARGV[ARGC] = + { + "", // argv[0] is usually the application name + "-crashcount", + "2", + "-space", + "spaceserver.grid.lindenlab.com", + "-db_host", + "localhost", + "--allowlslhttprequests", + "-asset-uri", + "http://test.lindenlab.com/assets", + "-data", + "127.0.0.1", + "--smtp" + }; + bool ok = mApp->parseCommandOptions(ARGC, const_cast<char**>(ARGV)); + ensure("command line parsed", ok); + ensure_equals( + "crashcount", mApp->getOption("crashcount").asInteger(), 2); + ensure_equals( + "space", + mApp->getOption("space").asString(), + std::string("spaceserver.grid.lindenlab.com")); + ensure_equals( + "db_host", + mApp->getOption("db_host").asString(), + std::string("localhost")); + ensure("allowlshlttprequests", mApp->getOption("smtp")); + ensure_equals( + "asset-uri", + mApp->getOption("asset-uri").asString(), + std::string("http://test.lindenlab.com/assets")); + ensure_equals( + "data", + mApp->getOption("data").asString(), + std::string("127.0.0.1")); + ensure("smtp", mApp->getOption("smtp")); + } + + template<> template<> + void application_object_t::test<3>() + { + const int ARGC = 4; + const char* ARGV[ARGC] = + { + "", // argv[0] is usually the application name + "crashcount", + "2", + "--space" + }; + bool ok = mApp->parseCommandOptions(ARGC, const_cast<char**>(ARGV)); + ensure("command line parse failure", !ok); + } + + template<> template<> + void application_object_t::test<4>() + { + const int ARGC = 4; + const char* ARGV[ARGC] = + { + "", // argv[0] is usually the application name + "--crashcount", + "2", + "space" + }; + bool ok = mApp->parseCommandOptions(ARGC, const_cast<char**>(ARGV)); + ensure("command line parse failure", !ok); + } + + + template<> template<> + void application_object_t::test<5>() + { + LLSD options; + options["boolean-test"] = true; + mApp->setOptionData(LLApp::PRIORITY_GENERAL_CONFIGURATION, options); + ensure("bool set", mApp->getOption("boolean-test").asBoolean()); + options["boolean-test"] = false; + mApp->setOptionData(LLApp::PRIORITY_RUNTIME_OVERRIDE, options); + ensure("bool unset", !mApp->getOption("boolean-test").asBoolean()); + } +} diff --git a/indra/test/llevents_tut.cpp b/indra/test/llevents_tut.cpp index 57e22bbb56..4699bb1827 100644 --- a/indra/test/llevents_tut.cpp +++ b/indra/test/llevents_tut.cpp @@ -54,686 +54,730 @@ using boost::assign::list_of; +#ifdef LL_LINUX +#define CATCH_MISSED_LINUX_EXCEPTION(exception, threw) \ +catch (const std::runtime_error& ex) \ +{ \ + /* This clause is needed on Linux, on the viewer side, because the */ \ + /* exception isn't caught by the clause above. Warn the user... */ \ + std::cerr << "Failed to catch " << typeid(ex).name() << std::endl; \ + /* But if the expected exception was thrown, allow the test to */ \ + /* succeed anyway. Not sure how else to handle this odd case. */ \ + /* This approach is also used in llsdmessage_test.cpp. */ \ + if (std::string(typeid(ex).name()) == typeid(exception).name()) \ + { \ + threw = ex.what(); \ + /*std::cout << ex.what() << std::endl;*/ \ + } \ + else \ + { \ + /* We don't even recognize this exception. Let it propagate */ \ + /* out to TUT to fail the test. */ \ + throw; \ + } \ +} \ +catch (...) \ +{ \ + std::cerr << "Utterly failed to catch expected exception " << #exception << "!" << \ + std::endl; \ + /* This indicates a problem in the test that should be addressed. */ \ + throw; \ +} + +#else // LL_LINUX +#define CATCH_MISSED_LINUX_EXCEPTION(exception, threw) \ + /* Not needed on other platforms */ +#endif // LL_LINUX + template<typename T> -T make(const T& value) { return value; } +T make(const T& value) +{ + return value; +} /***************************************************************************** -* tut test group -*****************************************************************************/ + * tut test group + *****************************************************************************/ namespace tut { - struct events_data - { - events_data(): - pumps(LLEventPumps::instance()), - listener0("first"), - listener1("second") - {} - LLEventPumps& pumps; - Listener listener0; - Listener listener1; - - void check_listener(const std::string& desc, const Listener& listener, LLSD::Integer got) - { - ensure_equals(STRINGIZE(listener << ' ' << desc), - listener.getLastEvent().asInteger(), got); - } - }; - typedef test_group<events_data> events_group; - typedef events_group::object events_object; - tut::events_group evgr("events"); - - template<> template<> - void events_object::test<1>() - { - set_test_name("basic operations"); - // Now there's a static constructor in llevents.cpp that registers on - // the "mainloop" pump to call LLEventPumps::flush(). - // Actually -- having to modify this to track the statically- - // constructed pumps in other TUT modules in this giant monolithic test - // executable isn't such a hot idea. -// ensure_equals("initial pump", pumps.mPumpMap.size(), 1); - size_t initial_pumps(pumps.mPumpMap.size()); - LLEventPump& per_frame(pumps.obtain("per-frame")); - ensure_equals("first explicit pump", pumps.mPumpMap.size(), initial_pumps+1); - // Verify that per_frame was instantiated as an LLEventStream. - ensure("LLEventStream leaf class", dynamic_cast<LLEventStream*>(&per_frame)); - ensure("enabled", per_frame.enabled()); - // Trivial test, but posting an event to an EventPump with no - // listeners should not blow up. The test is relevant because defining - // a boost::signal with a non-void return signature, using the default - // combiner, blows up if there are no listeners. This is because the - // default combiner is defined to return the value returned by the - // last listener, which is meaningless if there were no listeners. - per_frame.post(0); - LLBoundListener connection = listener0.listenTo(per_frame); - ensure("connected", connection.connected()); - ensure("not blocked", ! connection.blocked()); - per_frame.post(1); - check_listener("received", listener0, 1); - { // block the connection - LLEventPump::Blocker block(connection); - ensure("blocked", connection.blocked()); - per_frame.post(2); - check_listener("not updated", listener0, 1); - } // unblock - ensure("unblocked", ! connection.blocked()); - per_frame.post(3); - check_listener("unblocked", listener0, 3); - LLBoundListener sameConnection = per_frame.getListener(listener0.getName()); - ensure("still connected", sameConnection.connected()); - ensure("still not blocked", ! sameConnection.blocked()); - { // block it again - LLEventPump::Blocker block(sameConnection); - ensure("re-blocked", sameConnection.blocked()); - per_frame.post(4); - check_listener("re-blocked", listener0, 3); - } // unblock - bool threw = false; - try - { - // NOTE: boost::bind() saves its arguments by VALUE! If you pass - // an object instance rather than a pointer, you'll end up binding - // to an internal copy of that instance! Use boost::ref() to - // capture a reference instead. - per_frame.listen(listener0.getName(), // note bug, dup name - boost::bind(&Listener::call, boost::ref(listener1), _1)); - } - catch (const LLEventPump::DupListenerName& e) - { - threw = true; - ensure_equals(e.what(), - std::string("DupListenerName: " - "Attempt to register duplicate listener name '") + - listener0.getName() + - "' on " + typeid(per_frame).name() + " '" + per_frame.getName() + "'"); - } - ensure("threw DupListenerName", threw); - // do it right this time - listener1.listenTo(per_frame); - per_frame.post(5); - check_listener("got", listener0, 5); - check_listener("got", listener1, 5); - per_frame.enable(false); - per_frame.post(6); - check_listener("didn't get", listener0, 5); - check_listener("didn't get", listener1, 5); - per_frame.enable(); - per_frame.post(7); - check_listener("got", listener0, 7); - check_listener("got", listener1, 7); - per_frame.stopListening(listener0.getName()); - ensure("disconnected 0", ! connection.connected()); - ensure("disconnected 1", ! sameConnection.connected()); - per_frame.post(8); - check_listener("disconnected", listener0, 7); - check_listener("still connected", listener1, 8); - per_frame.stopListening(listener1.getName()); - per_frame.post(9); - check_listener("disconnected", listener1, 8); - } - - template<> template<> - void events_object::test<2>() - { - set_test_name("callstop() returning true"); - LLEventPump& per_frame(pumps.obtain("per-frame")); - listener0.reset(0); - listener1.reset(0); - LLBoundListener bound0 = listener0.listenTo(per_frame, &Listener::callstop); - LLBoundListener bound1 = listener1.listenTo(per_frame, &Listener::call, - // after listener0 - make<LLEventPump::NameList>(list_of(listener0.getName()))); - ensure("enabled", per_frame.enabled()); - ensure("connected 0", bound0.connected()); - ensure("unblocked 0", ! bound0.blocked()); - ensure("connected 1", bound1.connected()); - ensure("unblocked 1", ! bound1.blocked()); - per_frame.post(1); - check_listener("got", listener0, 1); - // Because listener0.callstop() returns true, control never reaches listener1.call(). - check_listener("got", listener1, 0); - } - - bool chainEvents(Listener& someListener, const LLSD& event) - { - // Make this call so we can watch for side effects for test purposes. - someListener.call(event); - // This function represents a recursive event chain -- or some other - // scenario in which an event handler raises additional events. - int value = event.asInteger(); - if (value) - { - LLEventPumps::instance().obtain("login").post(value - 1); - } - return false; - } - - template<> template<> - void events_object::test<3>() - { - set_test_name("LLEventQueue delayed action"); - // This access is NOT legal usage: we can do it only because we're - // hacking private for test purposes. Normally we'd either compile in - // a particular name, or (later) edit a config file. - pumps.mQueueNames.insert("login"); - LLEventPump& login(pumps.obtain("login")); - // The "mainloop" pump is special: posting on that implicitly calls - // LLEventPumps::flush(), which in turn should flush our "login" - // LLEventQueue. - LLEventPump& mainloop(pumps.obtain("mainloop")); - ensure("LLEventQueue leaf class", dynamic_cast<LLEventQueue*>(&login)); - listener0.listenTo(login); - listener0.reset(0); - login.post(1); - check_listener("waiting for queued event", listener0, 0); - mainloop.post(LLSD()); - check_listener("got queued event", listener0, 1); - login.stopListening(listener0.getName()); - // Verify that when an event handler posts a new event on the same - // LLEventQueue, it doesn't get processed in the same flush() call -- - // it waits until the next flush() call. - listener0.reset(17); - login.listen("chainEvents", boost::bind(chainEvents, boost::ref(listener0), _1)); - login.post(1); - check_listener("chainEvents(1) not yet called", listener0, 17); - mainloop.post(LLSD()); - check_listener("chainEvents(1) called", listener0, 1); - mainloop.post(LLSD()); - check_listener("chainEvents(0) called", listener0, 0); - mainloop.post(LLSD()); - check_listener("chainEvents(-1) not called", listener0, 0); - login.stopListening("chainEvents"); - } - - template<> template<> - void events_object::test<4>() - { - set_test_name("explicitly-instantiated LLEventStream"); - // Explicitly instantiate an LLEventStream, and verify that it - // self-registers with LLEventPumps - size_t registered = pumps.mPumpMap.size(); - size_t owned = pumps.mOurPumps.size(); - LLEventPump* localInstance; - { - LLEventStream myEventStream("stream"); - localInstance = &myEventStream; - LLEventPump& stream(pumps.obtain("stream")); - ensure("found named LLEventStream instance", &stream == localInstance); - ensure_equals("registered new instance", pumps.mPumpMap.size(), registered + 1); - ensure_equals("explicit instance not owned", pumps.mOurPumps.size(), owned); - } // destroy myEventStream -- should unregister - ensure_equals("destroyed instance unregistered", pumps.mPumpMap.size(), registered); - ensure_equals("destroyed instance not owned", pumps.mOurPumps.size(), owned); - LLEventPump& stream(pumps.obtain("stream")); - ensure("new LLEventStream instance", &stream != localInstance); - ensure_equals("obtain()ed instance registered", pumps.mPumpMap.size(), registered + 1); - ensure_equals("obtain()ed instance owned", pumps.mOurPumps.size(), owned + 1); - } - - template<> template<> - void events_object::test<5>() - { - set_test_name("stopListening()"); - LLEventPump& login(pumps.obtain("login")); - listener0.listenTo(login); - login.stopListening(listener0.getName()); - // should not throw because stopListening() should have removed name - listener0.listenTo(login, &Listener::callstop); - LLBoundListener wrong = login.getListener("bogus"); - ensure("bogus connection disconnected", ! wrong.connected()); - ensure("bogus connection blocked", wrong.blocked()); - } - - template<> template<> - void events_object::test<6>() - { - set_test_name("chaining LLEventPump instances"); - LLEventPump& upstream(pumps.obtain("upstream")); - // One potentially-useful construct is to chain LLEventPumps together. - // Among other things, this allows you to turn subsets of listeners on - // and off in groups. - LLEventPump& filter0(pumps.obtain("filter0")); - LLEventPump& filter1(pumps.obtain("filter1")); - upstream.listen(filter0.getName(), - boost::bind(&LLEventPump::post, boost::ref(filter0), _1)); - upstream.listen(filter1.getName(), - boost::bind(&LLEventPump::post, boost::ref(filter1), _1)); - listener0.listenTo(filter0); - listener1.listenTo(filter1); - listener0.reset(0); - listener1.reset(0); - upstream.post(1); - check_listener("got unfiltered", listener0, 1); - check_listener("got unfiltered", listener1, 1); - filter0.enable(false); - upstream.post(2); - check_listener("didn't get filtered", listener0, 1); - check_listener("got filtered", listener1, 2); - } - - template<> template<> - void events_object::test<7>() - { - set_test_name("listener dependency order"); - typedef LLEventPump::NameList NameList; - typedef Collect::StringList StringList; - LLEventPump& button(pumps.obtain("button")); - Collect collector; - button.listen("Mary", - boost::bind(&Collect::add, boost::ref(collector), "Mary", _1), - // state that "Mary" must come after "checked" - make<NameList>(list_of("checked"))); - button.listen("checked", - boost::bind(&Collect::add, boost::ref(collector), "checked", _1), - // "checked" must come after "spot" - make<NameList>(list_of("spot"))); - button.listen("spot", - boost::bind(&Collect::add, boost::ref(collector), "spot", _1)); - button.post(1); - ensure_equals(collector.result, make<StringList>(list_of("spot")("checked")("Mary"))); - collector.clear(); - button.stopListening("Mary"); - button.listen("Mary", - boost::bind(&Collect::add, boost::ref(collector), "Mary", _1), - LLEventPump::empty, // no after dependencies - // now "Mary" must come before "spot" - make<NameList>(list_of("spot"))); - button.post(2); - ensure_equals(collector.result, make<StringList>(list_of("Mary")("spot")("checked"))); - collector.clear(); - button.stopListening("spot"); - std::string threw; - try - { - button.listen("spot", - boost::bind(&Collect::add, boost::ref(collector), "spot", _1), - // after "Mary" and "checked" -- whoops! - make<NameList>(list_of("Mary")("checked"))); - } - catch (const LLEventPump::Cycle& e) - { - threw = e.what(); -// std::cout << "Caught: " << e.what() << '\n'; - } - // Obviously the specific wording of the exception text can - // change; go ahead and change the test to match. - // Establish that it contains: - // - the name and runtime type of the LLEventPump - ensure_contains("LLEventPump type", threw, typeid(button).name()); - ensure_contains("LLEventPump name", threw, "'button'"); - // - the name of the new listener that caused the problem - ensure_contains("new listener name", threw, "'spot'"); - // - a synopsis of the problematic dependencies. - ensure_contains("cyclic dependencies", threw, - "\"Mary\" -> before (\"spot\")"); - ensure_contains("cyclic dependencies", threw, - "after (\"spot\") -> \"checked\""); - ensure_contains("cyclic dependencies", threw, - "after (\"Mary\", \"checked\") -> \"spot\""); - button.listen("yellow", - boost::bind(&Collect::add, boost::ref(collector), "yellow", _1), - make<NameList>(list_of("checked"))); - button.listen("shoelaces", - boost::bind(&Collect::add, boost::ref(collector), "shoelaces", _1), - make<NameList>(list_of("checked"))); - button.post(3); - ensure_equals(collector.result, make<StringList>(list_of("Mary")("checked")("yellow")("shoelaces"))); - collector.clear(); - threw.clear(); - try - { - button.listen("of", - boost::bind(&Collect::add, boost::ref(collector), "of", _1), - make<NameList>(list_of("shoelaces")), - make<NameList>(list_of("yellow"))); - } - catch (const LLEventPump::OrderChange& e) - { - threw = e.what(); -// std::cout << "Caught: " << e.what() << '\n'; - } - // Same remarks about the specific wording of the exception. Just - // ensure that it contains enough information to clarify the - // problem and what must be done to resolve it. - ensure_contains("LLEventPump type", threw, typeid(button).name()); - ensure_contains("LLEventPump name", threw, "'button'"); - ensure_contains("new listener name", threw, "'of'"); - ensure_contains("prev listener name", threw, "'yellow'"); - ensure_contains("old order", threw, "was: Mary, checked, yellow, shoelaces"); - ensure_contains("new order", threw, "now: Mary, checked, shoelaces, of, yellow"); - button.post(4); - ensure_equals(collector.result, make<StringList>(list_of("Mary")("checked")("yellow")("shoelaces"))); - } - - template<> template<> - void events_object::test<8>() - { - set_test_name("tweaked and untweaked LLEventPump instance names"); - { // nested scope - // Hand-instantiate an LLEventStream... - LLEventStream bob("bob"); - bool threw = false; - try - { - // then another with a duplicate name. - LLEventStream bob2("bob"); - } - catch (const LLEventPump::DupPumpName& /*e*/) - { - threw = true; -// std::cout << "Caught: " << e.what() << '\n'; - } - ensure("Caught DupPumpName", threw); - } // delete first 'bob' - LLEventStream bob("bob"); // should work, previous one unregistered - LLEventStream bob1("bob", true); // allowed to tweak name - ensure_equals("tweaked LLEventStream name", bob1.getName(), "bob1"); - std::vector< boost::shared_ptr<LLEventStream> > streams; - for (int i = 2; i <= 10; ++i) - { - streams.push_back(boost::shared_ptr<LLEventStream>(new LLEventStream("bob", true))); - } - ensure_equals("last tweaked LLEventStream name", streams.back()->getName(), "bob10"); - } - - // Define a function that accepts an LLListenerOrPumpName - void eventSource(const LLListenerOrPumpName& listener) - { - // Pretend that some time has elapsed. Call listener immediately. - listener(17); - } - - template<> template<> - void events_object::test<9>() - { - set_test_name("LLListenerOrPumpName"); - // Passing a boost::bind() expression to LLListenerOrPumpName - listener0.reset(0); - eventSource(boost::bind(&Listener::call, boost::ref(listener0), _1)); - check_listener("got by listener", listener0, 17); - // Passing a string LLEventPump name to LLListenerOrPumpName - listener0.reset(0); - LLEventStream random("random"); - listener0.listenTo(random); - eventSource("random"); - check_listener("got by pump name", listener0, 17); - bool threw = false; - try - { - LLListenerOrPumpName empty; - empty(17); - } - catch (const LLListenerOrPumpName::Empty&) - { - threw = true; - } - ensure("threw Empty", threw); - } - - class TempListener: public Listener - { - public: - TempListener(const std::string& name, bool& liveFlag): - Listener(name), - mLiveFlag(liveFlag) - { - mLiveFlag = true; - } - - virtual ~TempListener() - { - mLiveFlag = false; - } - - private: - bool& mLiveFlag; - }; - - template<> template<> - void events_object::test<10>() - { - set_test_name("listen(boost::bind(...TempListener...))"); - // listen() can't do anything about a plain TempListener instance: - // it's not managed with shared_ptr, nor is it an LLEventTrackable subclass - bool live = false; - LLEventPump& heaptest(pumps.obtain("heaptest")); - LLBoundListener connection; - { - TempListener tempListener("temp", live); - ensure("TempListener constructed", live); - connection = heaptest.listen(tempListener.getName(), - boost::bind(&Listener::call, - boost::ref(tempListener), - _1)); - heaptest.post(1); - check_listener("received", tempListener, 1); - } // presumably this will make newListener go away? - // verify that - ensure("TempListener destroyed", ! live); - // This is the case against which we can't defend. Don't even try to - // post to heaptest -- that would engage Undefined Behavior. - // Cautiously inspect connection... - ensure("misleadingly connected", connection.connected()); - // then disconnect by hand. - heaptest.stopListening("temp"); - } - - template<> template<> - void events_object::test<11>() - { - set_test_name("listen(boost::bind(...weak_ptr...))"); - // listen() detecting weak_ptr<TempListener> in boost::bind() object - bool live = false; - LLEventPump& heaptest(pumps.obtain("heaptest")); - LLBoundListener connection; - ensure("default state", ! connection.connected()); - { - boost::shared_ptr<TempListener> newListener(new TempListener("heap", live)); - newListener->reset(); - ensure("TempListener constructed", live); - connection = heaptest.listen(newListener->getName(), - boost::bind(&Listener::call, weaken(newListener), _1)); - ensure("new connection", connection.connected()); - heaptest.post(1); - check_listener("received", *newListener, 1); - } // presumably this will make newListener go away? - // verify that - ensure("TempListener destroyed", ! live); - ensure("implicit disconnect", ! connection.connected()); - // now just make sure we don't blow up trying to access a freed object! - heaptest.post(2); - } - - template<> template<> - void events_object::test<12>() - { - set_test_name("listen(boost::bind(...shared_ptr...))"); -/*==========================================================================*| - // DISABLED because I've made this case produce a compile error. - // Following the error leads the disappointed dev to a comment - // instructing her to use the weaken() function to bind a weak_ptr<T> - // instead of binding a shared_ptr<T>, and explaining why. I know of - // no way to use TUT to code a repeatable test in which the expected - // outcome is a compile error. The interested reader is invited to - // uncomment this block and build to see for herself. - - // listen() detecting shared_ptr<TempListener> in boost::bind() object - bool live = false; - LLEventPump& heaptest(pumps.obtain("heaptest")); - LLBoundListener connection; - std::string listenerName("heap"); - ensure("default state", ! connection.connected()); - { - boost::shared_ptr<TempListener> newListener(new TempListener(listenerName, live)); - ensure_equals("use_count", newListener.use_count(), 1); - newListener->reset(); - ensure("TempListener constructed", live); - connection = heaptest.listen(newListener->getName(), - boost::bind(&Listener::call, newListener, _1)); - ensure("new connection", connection.connected()); - ensure_equals("use_count", newListener.use_count(), 2); - heaptest.post(1); - check_listener("received", *newListener, 1); - } // this should make newListener go away... - // Unfortunately, the fact that we've bound a shared_ptr by value into - // our LLEventPump means that copy will keep the referenced object alive. - ensure("TempListener still alive", live); - ensure("still connected", connection.connected()); - // disconnecting explicitly should delete the TempListener... - heaptest.stopListening(listenerName); +struct events_data +{ + events_data() : + pumps(LLEventPumps::instance()), + listener0("first"), + listener1("second") + { + } + LLEventPumps& pumps; + Listener listener0; + Listener listener1; + + void check_listener(const std::string& desc, const Listener& listener, LLSD::Integer got) + { + ensure_equals(STRINGIZE(listener << ' ' << desc), + listener.getLastEvent().asInteger(), got); + } +}; +typedef test_group<events_data> events_group; +typedef events_group::object events_object; +tut::events_group evgr("events"); + +template<> template<> +void events_object::test<1>() +{ + set_test_name("basic operations"); + // Now there's a static constructor in llevents.cpp that registers on + // the "mainloop" pump to call LLEventPumps::flush(). + // Actually -- having to modify this to track the statically- + // constructed pumps in other TUT modules in this giant monolithic test + // executable isn't such a hot idea. + // ensure_equals("initial pump", pumps.mPumpMap.size(), 1); + size_t initial_pumps(pumps.mPumpMap.size()); + LLEventPump& per_frame(pumps.obtain("per-frame")); + ensure_equals("first explicit pump", pumps.mPumpMap.size(), initial_pumps + 1); + // Verify that per_frame was instantiated as an LLEventStream. + ensure("LLEventStream leaf class", dynamic_cast<LLEventStream*> (&per_frame)); + ensure("enabled", per_frame.enabled()); + // Trivial test, but posting an event to an EventPump with no + // listeners should not blow up. The test is relevant because defining + // a boost::signal with a non-void return signature, using the default + // combiner, blows up if there are no listeners. This is because the + // default combiner is defined to return the value returned by the + // last listener, which is meaningless if there were no listeners. + per_frame.post(0); + LLBoundListener connection = listener0.listenTo(per_frame); + ensure("connected", connection.connected()); + ensure("not blocked", !connection.blocked()); + per_frame.post(1); + check_listener("received", listener0, 1); + { // block the connection + LLEventPump::Blocker block(connection); + ensure("blocked", connection.blocked()); + per_frame.post(2); + check_listener("not updated", listener0, 1); + } // unblock + ensure("unblocked", !connection.blocked()); + per_frame.post(3); + check_listener("unblocked", listener0, 3); + LLBoundListener sameConnection = per_frame.getListener(listener0.getName()); + ensure("still connected", sameConnection.connected()); + ensure("still not blocked", !sameConnection.blocked()); + { // block it again + LLEventPump::Blocker block(sameConnection); + ensure("re-blocked", sameConnection.blocked()); + per_frame.post(4); + check_listener("re-blocked", listener0, 3); + } // unblock + std::string threw; + try + { + // NOTE: boost::bind() saves its arguments by VALUE! If you pass + // an object instance rather than a pointer, you'll end up binding + // to an internal copy of that instance! Use boost::ref() to + // capture a reference instead. + per_frame.listen(listener0.getName(), // note bug, dup name + boost::bind(&Listener::call, boost::ref(listener1), _1)); + } + catch (const LLEventPump::DupListenerName& e) + { + threw = e.what(); + } + CATCH_MISSED_LINUX_EXCEPTION(LLEventPump::DupListenerName, threw) + ensure_equals(threw, + std::string("DupListenerName: " + "Attempt to register duplicate listener name '") + + listener0.getName() + "' on " + typeid(per_frame).name() + + " '" + per_frame.getName() + "'"); + // do it right this time + listener1.listenTo(per_frame); + per_frame.post(5); + check_listener("got", listener0, 5); + check_listener("got", listener1, 5); + per_frame.enable(false); + per_frame.post(6); + check_listener("didn't get", listener0, 5); + check_listener("didn't get", listener1, 5); + per_frame.enable(); + per_frame.post(7); + check_listener("got", listener0, 7); + check_listener("got", listener1, 7); + per_frame.stopListening(listener0.getName()); + ensure("disconnected 0", ! connection.connected()); + ensure("disconnected 1", ! sameConnection.connected()); + per_frame.post(8); + check_listener("disconnected", listener0, 7); + check_listener("still connected", listener1, 8); + per_frame.stopListening(listener1.getName()); + per_frame.post(9); + check_listener("disconnected", listener1, 8); +} + +template<> template<> +void events_object::test<2>() +{ + set_test_name("callstop() returning true"); + LLEventPump& per_frame(pumps.obtain("per-frame")); + listener0.reset(0); + listener1.reset(0); + LLBoundListener bound0 = listener0.listenTo(per_frame, &Listener::callstop); + LLBoundListener bound1 = listener1.listenTo(per_frame, &Listener::call, + // after listener0 + make<LLEventPump::NameList>(list_of(listener0.getName()))); + ensure("enabled", per_frame.enabled()); + ensure("connected 0", bound0.connected()); + ensure("unblocked 0", !bound0.blocked()); + ensure("connected 1", bound1.connected()); + ensure("unblocked 1", !bound1.blocked()); + per_frame.post(1); + check_listener("got", listener0, 1); + // Because listener0.callstop() returns true, control never reaches listener1.call(). + check_listener("got", listener1, 0); +} + +bool chainEvents(Listener& someListener, const LLSD& event) +{ + // Make this call so we can watch for side effects for test purposes. + someListener.call(event); + // This function represents a recursive event chain -- or some other + // scenario in which an event handler raises additional events. + int value = event.asInteger(); + if (value) + { + LLEventPumps::instance().obtain("login").post(value - 1); + } + return false; +} + +template<> template<> +void events_object::test<3>() +{ + set_test_name("LLEventQueue delayed action"); + // This access is NOT legal usage: we can do it only because we're + // hacking private for test purposes. Normally we'd either compile in + // a particular name, or (later) edit a config file. + pumps.mQueueNames.insert("login"); + LLEventPump& login(pumps.obtain("login")); + // The "mainloop" pump is special: posting on that implicitly calls + // LLEventPumps::flush(), which in turn should flush our "login" + // LLEventQueue. + LLEventPump& mainloop(pumps.obtain("mainloop")); + ensure("LLEventQueue leaf class", dynamic_cast<LLEventQueue*> (&login)); + listener0.listenTo(login); + listener0.reset(0); + login.post(1); + check_listener("waiting for queued event", listener0, 0); + mainloop.post(LLSD()); + check_listener("got queued event", listener0, 1); + login.stopListening(listener0.getName()); + // Verify that when an event handler posts a new event on the same + // LLEventQueue, it doesn't get processed in the same flush() call -- + // it waits until the next flush() call. + listener0.reset(17); + login.listen("chainEvents", boost::bind(chainEvents, boost::ref(listener0), _1)); + login.post(1); + check_listener("chainEvents(1) not yet called", listener0, 17); + mainloop.post(LLSD()); + check_listener("chainEvents(1) called", listener0, 1); + mainloop.post(LLSD()); + check_listener("chainEvents(0) called", listener0, 0); + mainloop.post(LLSD()); + check_listener("chainEvents(-1) not called", listener0, 0); + login.stopListening("chainEvents"); +} + +template<> template<> +void events_object::test<4>() +{ + set_test_name("explicitly-instantiated LLEventStream"); + // Explicitly instantiate an LLEventStream, and verify that it + // self-registers with LLEventPumps + size_t registered = pumps.mPumpMap.size(); + size_t owned = pumps.mOurPumps.size(); + LLEventPump* localInstance; + { + LLEventStream myEventStream("stream"); + localInstance = &myEventStream; + LLEventPump& stream(pumps.obtain("stream")); + ensure("found named LLEventStream instance", &stream == localInstance); + ensure_equals("registered new instance", pumps.mPumpMap.size(), registered + 1); + ensure_equals("explicit instance not owned", pumps.mOurPumps.size(), owned); + } // destroy myEventStream -- should unregister + ensure_equals("destroyed instance unregistered", pumps.mPumpMap.size(), registered); + ensure_equals("destroyed instance not owned", pumps.mOurPumps.size(), owned); + LLEventPump& stream(pumps.obtain("stream")); + ensure("new LLEventStream instance", &stream != localInstance); + ensure_equals("obtain()ed instance registered", pumps.mPumpMap.size(), registered + 1); + ensure_equals("obtain()ed instance owned", pumps.mOurPumps.size(), owned + 1); +} + +template<> template<> +void events_object::test<5>() +{ + set_test_name("stopListening()"); + LLEventPump& login(pumps.obtain("login")); + listener0.listenTo(login); + login.stopListening(listener0.getName()); + // should not throw because stopListening() should have removed name + listener0.listenTo(login, &Listener::callstop); + LLBoundListener wrong = login.getListener("bogus"); + ensure("bogus connection disconnected", !wrong.connected()); + ensure("bogus connection blocked", wrong.blocked()); +} + +template<> template<> +void events_object::test<6>() +{ + set_test_name("chaining LLEventPump instances"); + LLEventPump& upstream(pumps.obtain("upstream")); + // One potentially-useful construct is to chain LLEventPumps together. + // Among other things, this allows you to turn subsets of listeners on + // and off in groups. + LLEventPump& filter0(pumps.obtain("filter0")); + LLEventPump& filter1(pumps.obtain("filter1")); + upstream.listen(filter0.getName(), boost::bind(&LLEventPump::post, boost::ref(filter0), _1)); + upstream.listen(filter1.getName(), boost::bind(&LLEventPump::post, boost::ref(filter1), _1)); + listener0.listenTo(filter0); + listener1.listenTo(filter1); + listener0.reset(0); + listener1.reset(0); + upstream.post(1); + check_listener("got unfiltered", listener0, 1); + check_listener("got unfiltered", listener1, 1); + filter0.enable(false); + upstream.post(2); + check_listener("didn't get filtered", listener0, 1); + check_listener("got filtered", listener1, 2); +} + +template<> template<> +void events_object::test<7>() +{ + set_test_name("listener dependency order"); + typedef LLEventPump::NameList NameList; + typedef Collect::StringList StringList; + LLEventPump& button(pumps.obtain("button")); + Collect collector; + button.listen("Mary", + boost::bind(&Collect::add, boost::ref(collector), "Mary", _1), + // state that "Mary" must come after "checked" + make<NameList> (list_of("checked"))); + button.listen("checked", + boost::bind(&Collect::add, boost::ref(collector), "checked", _1), + // "checked" must come after "spot" + make<NameList> (list_of("spot"))); + button.listen("spot", + boost::bind(&Collect::add, boost::ref(collector), "spot", _1)); + button.post(1); + ensure_equals(collector.result, make<StringList>(list_of("spot")("checked")("Mary"))); + collector.clear(); + button.stopListening("Mary"); + button.listen("Mary", + boost::bind(&Collect::add, boost::ref(collector), "Mary", _1), + LLEventPump::empty, // no after dependencies + // now "Mary" must come before "spot" + make<NameList>(list_of("spot"))); + button.post(2); + ensure_equals(collector.result, make<StringList>(list_of("Mary")("spot")("checked"))); + collector.clear(); + button.stopListening("spot"); + std::string threw; + try + { + button.listen("spot", + boost::bind(&Collect::add, boost::ref(collector), "spot", _1), + // after "Mary" and "checked" -- whoops! + make<NameList>(list_of("Mary")("checked"))); + } + catch (const LLEventPump::Cycle& e) + { + threw = e.what(); + // std::cout << "Caught: " << e.what() << '\n'; + } + CATCH_MISSED_LINUX_EXCEPTION(LLEventPump::Cycle, threw) + // Obviously the specific wording of the exception text can + // change; go ahead and change the test to match. + // Establish that it contains: + // - the name and runtime type of the LLEventPump + ensure_contains("LLEventPump type", threw, typeid(button).name()); + ensure_contains("LLEventPump name", threw, "'button'"); + // - the name of the new listener that caused the problem + ensure_contains("new listener name", threw, "'spot'"); + // - a synopsis of the problematic dependencies. + ensure_contains("cyclic dependencies", threw, + "\"Mary\" -> before (\"spot\")"); + ensure_contains("cyclic dependencies", threw, + "after (\"spot\") -> \"checked\""); + ensure_contains("cyclic dependencies", threw, + "after (\"Mary\", \"checked\") -> \"spot\""); + button.listen("yellow", + boost::bind(&Collect::add, boost::ref(collector), "yellow", _1), + make<NameList>(list_of("checked"))); + button.listen("shoelaces", + boost::bind(&Collect::add, boost::ref(collector), "shoelaces", _1), + make<NameList>(list_of("checked"))); + button.post(3); + ensure_equals(collector.result, make<StringList>(list_of("Mary")("checked")("yellow")("shoelaces"))); + collector.clear(); + threw.clear(); + try + { + button.listen("of", + boost::bind(&Collect::add, boost::ref(collector), "of", _1), + make<NameList>(list_of("shoelaces")), + make<NameList>(list_of("yellow"))); + } + catch (const LLEventPump::OrderChange& e) + { + threw = e.what(); + // std::cout << "Caught: " << e.what() << '\n'; + } + CATCH_MISSED_LINUX_EXCEPTION(LLEventPump::OrderChange, threw) + // Same remarks about the specific wording of the exception. Just + // ensure that it contains enough information to clarify the + // problem and what must be done to resolve it. + ensure_contains("LLEventPump type", threw, typeid(button).name()); + ensure_contains("LLEventPump name", threw, "'button'"); + ensure_contains("new listener name", threw, "'of'"); + ensure_contains("prev listener name", threw, "'yellow'"); + // std::cout << "Thrown Exception: " << threw << std::endl; + ensure_contains("old order", threw, "was: Mary, checked, yellow, shoelaces"); + ensure_contains("new order", threw, "now: Mary, checked, shoelaces, of, yellow"); + button.post(4); + ensure_equals(collector.result, make<StringList>(list_of("Mary")("checked")("yellow")("shoelaces"))); +} + +template<> template<> +void events_object::test<8>() +{ + set_test_name("tweaked and untweaked LLEventPump instance names"); + { // nested scope + // Hand-instantiate an LLEventStream... + LLEventStream bob("bob"); + std::string threw; + try + { + // then another with a duplicate name. + LLEventStream bob2("bob"); + } + catch (const LLEventPump::DupPumpName& e) + { + threw = e.what(); + // std::cout << "Caught: " << e.what() << '\n'; + } + CATCH_MISSED_LINUX_EXCEPTION(LLEventPump::DupPumpName, threw) + ensure("Caught DupPumpName", !threw.empty()); + } // delete first 'bob' + LLEventStream bob("bob"); // should work, previous one unregistered + LLEventStream bob1("bob", true);// allowed to tweak name + ensure_equals("tweaked LLEventStream name", bob1.getName(), "bob1"); + std::vector<boost::shared_ptr<LLEventStream> > streams; + for (int i = 2; i <= 10; ++i) + { + streams.push_back(boost::shared_ptr<LLEventStream>(new LLEventStream("bob", true))); + } + ensure_equals("last tweaked LLEventStream name", streams.back()->getName(), "bob10"); +} + +// Define a function that accepts an LLListenerOrPumpName +void eventSource(const LLListenerOrPumpName& listener) +{ + // Pretend that some time has elapsed. Call listener immediately. + listener(17); +} + +template<> template<> +void events_object::test<9>() +{ + set_test_name("LLListenerOrPumpName"); + // Passing a boost::bind() expression to LLListenerOrPumpName + listener0.reset(0); + eventSource(boost::bind(&Listener::call, boost::ref(listener0), _1)); + check_listener("got by listener", listener0, 17); + // Passing a string LLEventPump name to LLListenerOrPumpName + listener0.reset(0); + LLEventStream random("random"); + listener0.listenTo(random); + eventSource("random"); + check_listener("got by pump name", listener0, 17); + std::string threw; + try + { + LLListenerOrPumpName empty; + empty(17); + } + catch (const LLListenerOrPumpName::Empty& e) + { + threw = e.what(); + } + CATCH_MISSED_LINUX_EXCEPTION(LLListenerOrPumpName::Empty, threw) + + ensure("threw Empty", !threw.empty()); +} + +class TempListener: public Listener +{ +public: + TempListener(const std::string& name, bool& liveFlag) : + Listener(name), mLiveFlag(liveFlag) + { + mLiveFlag = true; + } + + virtual ~TempListener() + { + mLiveFlag = false; + } + +private: + bool& mLiveFlag; +}; + +template<> template<> +void events_object::test<10>() +{ + set_test_name("listen(boost::bind(...TempListener...))"); + // listen() can't do anything about a plain TempListener instance: + // it's not managed with shared_ptr, nor is it an LLEventTrackable subclass + bool live = false; + LLEventPump& heaptest(pumps.obtain("heaptest")); + LLBoundListener connection; + { + TempListener tempListener("temp", live); + ensure("TempListener constructed", live); + connection = heaptest.listen(tempListener.getName(), + boost::bind(&Listener::call, + boost::ref(tempListener), + _1)); + heaptest.post(1); + check_listener("received", tempListener, 1); + } // presumably this will make newListener go away? + // verify that + ensure("TempListener destroyed", !live); + // This is the case against which we can't defend. Don't even try to + // post to heaptest -- that would engage Undefined Behavior. + // Cautiously inspect connection... + ensure("misleadingly connected", connection.connected()); + // then disconnect by hand. + heaptest.stopListening("temp"); +} + +template<> template<> +void events_object::test<11>() +{ + set_test_name("listen(boost::bind(...weak_ptr...))"); + // listen() detecting weak_ptr<TempListener> in boost::bind() object + bool live = false; + LLEventPump& heaptest(pumps.obtain("heaptest")); + LLBoundListener connection; + ensure("default state", !connection.connected()); + { + boost::shared_ptr<TempListener> newListener(new TempListener("heap", live)); + newListener->reset(); + ensure("TempListener constructed", live); + connection = heaptest.listen(newListener->getName(), + boost::bind(&Listener::call, + weaken(newListener), + _1)); + ensure("new connection", connection.connected()); + heaptest.post(1); + check_listener("received", *newListener, 1); + } // presumably this will make newListener go away? + // verify that + ensure("TempListener destroyed", !live); + ensure("implicit disconnect", !connection.connected()); + // now just make sure we don't blow up trying to access a freed object! + heaptest.post(2); +} + +template<> template<> +void events_object::test<12>() +{ + set_test_name("listen(boost::bind(...shared_ptr...))"); + /*==========================================================================*| + // DISABLED because I've made this case produce a compile error. + // Following the error leads the disappointed dev to a comment + // instructing her to use the weaken() function to bind a weak_ptr<T> + // instead of binding a shared_ptr<T>, and explaining why. I know of + // no way to use TUT to code a repeatable test in which the expected + // outcome is a compile error. The interested reader is invited to + // uncomment this block and build to see for herself. + + // listen() detecting shared_ptr<TempListener> in boost::bind() object + bool live = false; + LLEventPump& heaptest(pumps.obtain("heaptest")); + LLBoundListener connection; + std::string listenerName("heap"); + ensure("default state", !connection.connected()); + { + boost::shared_ptr<TempListener> newListener(new TempListener(listenerName, live)); + ensure_equals("use_count", newListener.use_count(), 1); + newListener->reset(); + ensure("TempListener constructed", live); + connection = heaptest.listen(newListener->getName(), + boost::bind(&Listener::call, newListener, _1)); + ensure("new connection", connection.connected()); + ensure_equals("use_count", newListener.use_count(), 2); + heaptest.post(1); + check_listener("received", *newListener, 1); + } // this should make newListener go away... + // Unfortunately, the fact that we've bound a shared_ptr by value into + // our LLEventPump means that copy will keep the referenced object alive. + ensure("TempListener still alive", live); + ensure("still connected", connection.connected()); + // disconnecting explicitly should delete the TempListener... + heaptest.stopListening(listenerName); #if 0 // however, in my experience, it does not. I don't know why not. - // Ah: on 2009-02-19, Frank Mori Hess, author of the Boost.Signals2 - // library, stated on the boost-users mailing list: - // http://www.nabble.com/Re%3A--signals2--review--The-review-of-the-signals2-library-(formerly-thread_safe_signals)-begins-today%2C-Nov-1st-p22102367.html - // "It will get destroyed eventually. The signal cleans up its slot - // list little by little during connect/invoke. It doesn't immediately - // remove disconnected slots from the slot list since other threads - // might be using the same slot list concurrently. It might be - // possible to make it immediately reset the shared_ptr owning the - // slot though, leaving an empty shared_ptr in the slot list, since - // that wouldn't invalidate any iterators." - ensure("TempListener destroyed", ! live); - ensure("implicit disconnect", ! connection.connected()); + // Ah: on 2009-02-19, Frank Mori Hess, author of the Boost.Signals2 + // library, stated on the boost-users mailing list: + // http://www.nabble.com/Re%3A--signals2--review--The-review-of-the-signals2-library-(formerly-thread_safe_signals)-begins-today%2C-Nov-1st-p22102367.html + // "It will get destroyed eventually. The signal cleans up its slot + // list little by little during connect/invoke. It doesn't immediately + // remove disconnected slots from the slot list since other threads + // might be using the same slot list concurrently. It might be + // possible to make it immediately reset the shared_ptr owning the + // slot though, leaving an empty shared_ptr in the slot list, since + // that wouldn't invalidate any iterators." + ensure("TempListener destroyed", ! live); + ensure("implicit disconnect", ! connection.connected()); #endif // 0 - // now just make sure we don't blow up trying to access a freed object! - heaptest.post(2); + // now just make sure we don't blow up trying to access a freed object! + heaptest.post(2); |*==========================================================================*/ - } - - class TempTrackableListener: public TempListener, public LLEventTrackable - { - public: - TempTrackableListener(const std::string& name, bool& liveFlag): - TempListener(name, liveFlag) - {} - }; - - template<> template<> - void events_object::test<13>() - { - set_test_name("listen(boost::bind(...TempTrackableListener ref...))"); - bool live = false; - LLEventPump& heaptest(pumps.obtain("heaptest")); - LLBoundListener connection; - { - TempTrackableListener tempListener("temp", live); - ensure("TempTrackableListener constructed", live); - connection = heaptest.listen(tempListener.getName(), - boost::bind(&TempTrackableListener::call, - boost::ref(tempListener), _1)); - heaptest.post(1); - check_listener("received", tempListener, 1); - } // presumably this will make tempListener go away? - // verify that - ensure("TempTrackableListener destroyed", ! live); - ensure("implicit disconnect", ! connection.connected()); - // now just make sure we don't blow up trying to access a freed object! - heaptest.post(2); - } - - template<> template<> - void events_object::test<14>() - { - set_test_name("listen(boost::bind(...TempTrackableListener pointer...))"); - bool live = false; - LLEventPump& heaptest(pumps.obtain("heaptest")); - LLBoundListener connection; - { - TempTrackableListener* newListener(new TempTrackableListener("temp", live)); - ensure("TempTrackableListener constructed", live); - connection = heaptest.listen(newListener->getName(), - boost::bind(&TempTrackableListener::call, - newListener, _1)); - heaptest.post(1); - check_listener("received", *newListener, 1); - // explicitly destroy newListener - delete newListener; - } - // verify that - ensure("TempTrackableListener destroyed", ! live); - ensure("implicit disconnect", ! connection.connected()); - // now just make sure we don't blow up trying to access a freed object! - heaptest.post(2); - } - - template<> template<> - void events_object::test<15>() - { - // This test ensures that using an LLListenerWrapper subclass doesn't - // block Boost.Signals2 from recognizing a bound LLEventTrackable - // subclass. - set_test_name("listen(llwrap<LLLogListener>(boost::bind(...TempTrackableListener ref...)))"); - bool live = false; - LLEventPump& heaptest(pumps.obtain("heaptest")); - LLBoundListener connection; - { - TempTrackableListener tempListener("temp", live); - ensure("TempTrackableListener constructed", live); - connection = heaptest.listen(tempListener.getName(), - llwrap<LLLogListener>( - boost::bind(&TempTrackableListener::call, - boost::ref(tempListener), _1))); - heaptest.post(1); - check_listener("received", tempListener, 1); - } // presumably this will make tempListener go away? - // verify that - ensure("TempTrackableListener destroyed", ! live); - ensure("implicit disconnect", ! connection.connected()); - // now just make sure we don't blow up trying to access a freed object! - heaptest.post(2); - } - - class TempSharedListener: public TempListener, - public boost::enable_shared_from_this<TempSharedListener> - { - public: - TempSharedListener(const std::string& name, bool& liveFlag): - TempListener(name, liveFlag) - {} - }; - - template<> template<> - void events_object::test<16>() - { - set_test_name("listen(boost::bind(...TempSharedListener ref...))"); +} + +class TempTrackableListener: public TempListener, public LLEventTrackable +{ +public: +TempTrackableListener(const std::string& name, bool& liveFlag): + TempListener(name, liveFlag) +{} +}; + +template<> template<> +void events_object::test<13>() +{ +set_test_name("listen(boost::bind(...TempTrackableListener ref...))"); +bool live = false; +LLEventPump& heaptest(pumps.obtain("heaptest")); +LLBoundListener connection; +{ + TempTrackableListener tempListener("temp", live); + ensure("TempTrackableListener constructed", live); + connection = heaptest.listen(tempListener.getName(), + boost::bind(&TempTrackableListener::call, + boost::ref(tempListener), _1)); + heaptest.post(1); + check_listener("received", tempListener, 1); +} // presumably this will make tempListener go away? +// verify that +ensure("TempTrackableListener destroyed", ! live); +ensure("implicit disconnect", ! connection.connected()); +// now just make sure we don't blow up trying to access a freed object! +heaptest.post(2); +} + +template<> template<> +void events_object::test<14>() +{ +set_test_name("listen(boost::bind(...TempTrackableListener pointer...))"); +bool live = false; +LLEventPump& heaptest(pumps.obtain("heaptest")); +LLBoundListener connection; +{ + TempTrackableListener* newListener(new TempTrackableListener("temp", live)); + ensure("TempTrackableListener constructed", live); + connection = heaptest.listen(newListener->getName(), + boost::bind(&TempTrackableListener::call, + newListener, _1)); + heaptest.post(1); + check_listener("received", *newListener, 1); + // explicitly destroy newListener + delete newListener; +} +// verify that +ensure("TempTrackableListener destroyed", ! live); +ensure("implicit disconnect", ! connection.connected()); +// now just make sure we don't blow up trying to access a freed object! +heaptest.post(2); +} + +template<> template<> +void events_object::test<15>() +{ +// This test ensures that using an LLListenerWrapper subclass doesn't +// block Boost.Signals2 from recognizing a bound LLEventTrackable +// subclass. +set_test_name("listen(llwrap<LLLogListener>(boost::bind(...TempTrackableListener ref...)))"); +bool live = false; +LLEventPump& heaptest(pumps.obtain("heaptest")); +LLBoundListener connection; +{ + TempTrackableListener tempListener("temp", live); + ensure("TempTrackableListener constructed", live); + connection = heaptest.listen(tempListener.getName(), + llwrap<LLLogListener>( + boost::bind(&TempTrackableListener::call, + boost::ref(tempListener), _1))); + heaptest.post(1); + check_listener("received", tempListener, 1); +} // presumably this will make tempListener go away? +// verify that +ensure("TempTrackableListener destroyed", ! live); +ensure("implicit disconnect", ! connection.connected()); +// now just make sure we don't blow up trying to access a freed object! +heaptest.post(2); +} + +class TempSharedListener: public TempListener, +public boost::enable_shared_from_this<TempSharedListener> +{ +public: +TempSharedListener(const std::string& name, bool& liveFlag): + TempListener(name, liveFlag) +{} +}; + +template<> template<> +void events_object::test<16>() +{ + set_test_name("listen(boost::bind(...TempSharedListener ref...))"); #if 0 - bool live = false; - LLEventPump& heaptest(pumps.obtain("heaptest")); - LLBoundListener connection; - { - // We MUST have at least one shared_ptr to an - // enable_shared_from_this subclass object before - // shared_from_this() can work. - boost::shared_ptr<TempSharedListener> - tempListener(new TempSharedListener("temp", live)); - ensure("TempSharedListener constructed", live); - // However, we're not passing either the shared_ptr or its - // corresponding weak_ptr -- instead, we're passing a reference to - // the TempSharedListener. +bool live = false; +LLEventPump& heaptest(pumps.obtain("heaptest")); +LLBoundListener connection; +{ + // We MUST have at least one shared_ptr to an + // enable_shared_from_this subclass object before + // shared_from_this() can work. + boost::shared_ptr<TempSharedListener> + tempListener(new TempSharedListener("temp", live)); + ensure("TempSharedListener constructed", live); + // However, we're not passing either the shared_ptr or its + // corresponding weak_ptr -- instead, we're passing a reference to + // the TempSharedListener. /*==========================================================================*| - std::cout << "Capturing const ref" << std::endl; - const boost::enable_shared_from_this<TempSharedListener>& cref(*tempListener); - std::cout << "Capturing const ptr" << std::endl; - const boost::enable_shared_from_this<TempSharedListener>* cp(&cref); - std::cout << "Capturing non-const ptr" << std::endl; - boost::enable_shared_from_this<TempSharedListener>* p(const_cast<boost::enable_shared_from_this<TempSharedListener>*>(cp)); - std::cout << "Capturing shared_from_this()" << std::endl; - boost::shared_ptr<TempSharedListener> sp(p->shared_from_this()); - std::cout << "Capturing weak_ptr" << std::endl; - boost::weak_ptr<TempSharedListener> wp(weaken(sp)); - std::cout << "Binding weak_ptr" << std::endl; + std::cout << "Capturing const ref" << std::endl; + const boost::enable_shared_from_this<TempSharedListener>& cref(*tempListener); + std::cout << "Capturing const ptr" << std::endl; + const boost::enable_shared_from_this<TempSharedListener>* cp(&cref); + std::cout << "Capturing non-const ptr" << std::endl; + boost::enable_shared_from_this<TempSharedListener>* p(const_cast<boost::enable_shared_from_this<TempSharedListener>*>(cp)); + std::cout << "Capturing shared_from_this()" << std::endl; + boost::shared_ptr<TempSharedListener> sp(p->shared_from_this()); + std::cout << "Capturing weak_ptr" << std::endl; + boost::weak_ptr<TempSharedListener> wp(weaken(sp)); + std::cout << "Binding weak_ptr" << std::endl; |*==========================================================================*/ - connection = heaptest.listen(tempListener->getName(), - boost::bind(&TempSharedListener::call, *tempListener, _1)); - heaptest.post(1); - check_listener("received", *tempListener, 1); - } // presumably this will make tempListener go away? - // verify that - ensure("TempSharedListener destroyed", ! live); - ensure("implicit disconnect", ! connection.connected()); - // now just make sure we don't blow up trying to access a freed object! - heaptest.post(2); + connection = heaptest.listen(tempListener->getName(), + boost::bind(&TempSharedListener::call, *tempListener, _1)); + heaptest.post(1); + check_listener("received", *tempListener, 1); +} // presumably this will make tempListener go away? +// verify that +ensure("TempSharedListener destroyed", ! live); +ensure("implicit disconnect", ! connection.connected()); +// now just make sure we don't blow up trying to access a freed object! +heaptest.post(2); #endif // 0 - } +} } // namespace tut diff --git a/indra/test/llhttpclient_tut.cpp b/indra/test/llhttpclient_tut.cpp index 03759001ae..4b4046632c 100644 --- a/indra/test/llhttpclient_tut.cpp +++ b/indra/test/llhttpclient_tut.cpp @@ -40,6 +40,7 @@ #include "llhttpclient.h" #include "llformat.h" #include "llpipeutil.h" +#include "llproxy.h" #include "llpumpio.h" #include "llsdhttpserver.h" @@ -85,9 +86,10 @@ namespace tut HTTPClientTestData() { apr_pool_create(&mPool, NULL); + LLCurl::initClass(false); mServerPump = new LLPumpIO(mPool); mClientPump = new LLPumpIO(mPool); - + LLHTTPClient::setPump(*mClientPump); } @@ -95,6 +97,7 @@ namespace tut { delete mServerPump; delete mClientPump; + LLProxy::cleanupClass(); apr_pool_destroy(mPool); } diff --git a/indra/test/llsd_new_tut.cpp b/indra/test/llsd_new_tut.cpp index dd93b36f04..b2fa54a688 100644 --- a/indra/test/llsd_new_tut.cpp +++ b/indra/test/llsd_new_tut.cpp @@ -5,7 +5,7 @@ * * $LicenseInfo:firstyear=2006&license=viewerlgpl$ * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2006-2011, Linden Research, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -32,6 +32,19 @@ #include "llsdtraits.h" #include "llstring.h" +#if LL_WINDOWS +#include <float.h> +namespace +{ + int fpclassify(double x) + { + return _fpclass(x); + } +} +#else +using std::fpclassify; +#endif + namespace tut { class SDCleanupCheck @@ -218,19 +231,16 @@ namespace tut } else { -// TODO: Fix on windows.... -#ifndef LL_WINDOWS -# if !defined(fpclassify) && __GNUC__ >= 3 -# define FPCLASSIFY_NAMESPACE std:: -# else -# define FPCLASSIFY_NAMESPACE -# endif - int left = FPCLASSIFY_NAMESPACE fpclassify(v.asReal()); - int right = FPCLASSIFY_NAMESPACE fpclassify(eReal); + int left = fpclassify(v.asReal()); + int right = fpclassify(eReal); ensure_equals(s+" to real", left, right); - ensure_equals(s+" to string", v.asString(), eString); -#endif + // ensure_equals(s+" to string", v.asString(), eString); + // I've commented this check out, since there doesn't + // seem to be uniform string representation for NaN on + // all platforms. For example, on my Ubuntu 8.10 laptop + // with libc 2.11.1, sqrt(-1.0) will return '-nan', not + // 'nan'. } } @@ -742,6 +752,42 @@ namespace tut LLSD w = v; w = "nice day"; } + + { + SDAllocationCheck check("shared values test for threaded work", 9); + + //U32 start_llsd_count = LLSD::outstandingCount(); + + LLSD m = LLSD::emptyMap(); + + m["one"] = 1; + m["two"] = 2; + m["one_copy"] = m["one"]; // 3 (m, "one" and "two") + + m["undef_one"] = LLSD(); + m["undef_two"] = LLSD(); + m["undef_one_copy"] = m["undef_one"]; + + { // Ensure first_array gets freed to avoid counting it + LLSD first_array = LLSD::emptyArray(); + first_array.append(1.0f); + first_array.append(2.0f); + first_array.append(3.0f); // 7 + + m["array"] = first_array; + m["array_clone"] = first_array; + m["array_copy"] = m["array"]; // 7 + } + + m["string_one"] = "string one value"; + m["string_two"] = "string two value"; + m["string_one_copy"] = m["string_one"]; // 9 + + //U32 llsd_object_count = LLSD::outstandingCount(); + //std::cout << "Using " << (llsd_object_count - start_llsd_count) << " LLSD objects" << std::endl; + + //m.dumpStats(); + } } template<> template<> @@ -769,4 +815,3 @@ namespace tut test serializations */ } - diff --git a/indra/test/llsdmessagebuilder_tut.cpp b/indra/test/llsdmessagebuilder_tut.cpp index cc6f78decd..be0692557a 100644 --- a/indra/test/llsdmessagebuilder_tut.cpp +++ b/indra/test/llsdmessagebuilder_tut.cpp @@ -33,6 +33,7 @@ #include "llsdmessagebuilder.h" #include "llsdmessagereader.h" #include "llsdtraits.h" +#include "llmath.h" #include "llquaternion.h" #include "u64.h" #include "v3dmath.h" @@ -86,17 +87,17 @@ namespace tut return createTemplateBlock(_PREHASH_Test0, type, size, block); } - static LLMessageBlock* createTemplateBlock(char* name, const EMsgVariableType type = MVT_NULL, const S32 size = 0, EMsgBlockType block = MBT_VARIABLE) + static LLMessageBlock* createTemplateBlock(const char* name, const EMsgVariableType type = MVT_NULL, const S32 size = 0, EMsgBlockType block = MBT_VARIABLE) { LLMessageBlock* result = new LLMessageBlock(name, block); if(type != MVT_NULL) { - result->addVariable(_PREHASH_Test0, type, size); + result->addVariable(const_cast<char*>(_PREHASH_Test0), type, size); } return result; } - static LLTemplateMessageBuilder* defaultTemplateBuilder(LLMessageTemplate& messageTemplate, char* name = _PREHASH_Test0) + static LLTemplateMessageBuilder* defaultTemplateBuilder(LLMessageTemplate& messageTemplate, char* name = const_cast<char*>(_PREHASH_Test0)) { templateNameMap[_PREHASH_TestMessage] = &messageTemplate; LLTemplateMessageBuilder* builder = new LLTemplateMessageBuilder(templateNameMap); diff --git a/indra/test/lltemplatemessagebuilder_tut.cpp b/indra/test/lltemplatemessagebuilder_tut.cpp index 09beb53869..6e1c82bb24 100644 --- a/indra/test/lltemplatemessagebuilder_tut.cpp +++ b/indra/test/lltemplatemessagebuilder_tut.cpp @@ -31,6 +31,7 @@ #include "llapr.h" #include "llmessagetemplate.h" +#include "llmath.h" #include "llquaternion.h" #include "lltemplatemessagebuilder.h" #include "lltemplatemessagereader.h" @@ -75,7 +76,7 @@ namespace tut static LLMessageBlock* defaultBlock(const EMsgVariableType type = MVT_NULL, const S32 size = 0, EMsgBlockType block = MBT_VARIABLE) { - return createBlock(_PREHASH_Test0, type, size, block); + return createBlock(const_cast<char*>(_PREHASH_Test0), type, size, block); } static LLMessageBlock* createBlock(char* name, const EMsgVariableType type = MVT_NULL, const S32 size = 0, EMsgBlockType block = MBT_VARIABLE) @@ -83,12 +84,12 @@ namespace tut LLMessageBlock* result = new LLMessageBlock(name, block); if(type != MVT_NULL) { - result->addVariable(_PREHASH_Test0, type, size); + result->addVariable(const_cast<char*>(_PREHASH_Test0), type, size); } return result; } - static LLTemplateMessageBuilder* defaultBuilder(LLMessageTemplate& messageTemplate, char* name = _PREHASH_Test0) + static LLTemplateMessageBuilder* defaultBuilder(LLMessageTemplate& messageTemplate, char* name = const_cast<char*>(_PREHASH_Test0)) { nameMap[_PREHASH_TestMessage] = &messageTemplate; LLTemplateMessageBuilder* builder = new LLTemplateMessageBuilder(nameMap); @@ -403,11 +404,11 @@ namespace tut // build template: Test0 before Test1 LLMessageTemplate messageTemplate = defaultTemplate(); - messageTemplate.addBlock(createBlock(_PREHASH_Test0, MVT_U32, 4, MBT_SINGLE)); - messageTemplate.addBlock(createBlock(_PREHASH_Test1, MVT_U32, 4, MBT_SINGLE)); + messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test0), MVT_U32, 4, MBT_SINGLE)); + messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test1), MVT_U32, 4, MBT_SINGLE)); // build message: 1st declared block var == 0xaaaa, 2nd declared block var == 0xbbbb - LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate, _PREHASH_Test0); + LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate, const_cast<char*>(_PREHASH_Test0)); builder->addU32(_PREHASH_Test0, 0xaaaa); builder->nextBlock(_PREHASH_Test1); builder->addU32(_PREHASH_Test0, 0xbbbb); @@ -416,11 +417,11 @@ namespace tut // build template: Test1 before Test0 messageTemplate = defaultTemplate(); - messageTemplate.addBlock(createBlock(_PREHASH_Test1, MVT_U32, 4, MBT_SINGLE)); - messageTemplate.addBlock(createBlock(_PREHASH_Test0, MVT_U32, 4, MBT_SINGLE)); + messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test1), MVT_U32, 4, MBT_SINGLE)); + messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test0), MVT_U32, 4, MBT_SINGLE)); // build message: 1st declared block var == 0xaaaa, 2nd declared block var == 0xbbbb - builder = defaultBuilder(messageTemplate, _PREHASH_Test1); + builder = defaultBuilder(messageTemplate, const_cast<char*>(_PREHASH_Test1)); builder->addU32(_PREHASH_Test0, 0xaaaa); builder->nextBlock(_PREHASH_Test0); builder->addU32(_PREHASH_Test0, 0xbbbb); @@ -443,11 +444,11 @@ namespace tut // build template: Test0 before Test1 LLMessageTemplate messageTemplate = defaultTemplate(); - messageTemplate.addBlock(createBlock(_PREHASH_Test0, MVT_U32, 4, MBT_SINGLE)); - messageTemplate.addBlock(createBlock(_PREHASH_Test1, MVT_U32, 4, MBT_SINGLE)); + messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test0), MVT_U32, 4, MBT_SINGLE)); + messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test1), MVT_U32, 4, MBT_SINGLE)); // build message: 1st declared block var == 0xaaaa, 2nd declared block var == 0xbbbb - LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate, _PREHASH_Test0); + LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate, const_cast<char*>(_PREHASH_Test0)); builder->addU32(_PREHASH_Test0, 0xaaaa); builder->nextBlock(_PREHASH_Test1); builder->addU32(_PREHASH_Test0, 0xbbbb); @@ -455,7 +456,7 @@ namespace tut delete builder; // build message: 1st declared block var == 0xaaaa, 2nd declared block var == 0xbbbb - builder = defaultBuilder(messageTemplate, _PREHASH_Test1); + builder = defaultBuilder(messageTemplate, const_cast<char*>(_PREHASH_Test1)); builder->addU32(_PREHASH_Test0, 0xbbbb); builder->nextBlock(_PREHASH_Test0); builder->addU32(_PREHASH_Test0, 0xaaaa); @@ -478,21 +479,21 @@ namespace tut // Build template: Test0 only LLMessageTemplate messageTemplate = defaultTemplate(); - messageTemplate.addBlock(createBlock(_PREHASH_Test0, MVT_U32, 4, MBT_SINGLE)); + messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test0), MVT_U32, 4, MBT_SINGLE)); // Build message - LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate, _PREHASH_Test0); + LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate, const_cast<char*>(_PREHASH_Test0)); builder->addU32(_PREHASH_Test0, 0xaaaa); bufferSize1 = builder->buildMessage(buffer1, MAX_BUFFER_SIZE, 0); delete builder; // Build template: Test0 before Test1 messageTemplate = defaultTemplate(); - messageTemplate.addBlock(createBlock(_PREHASH_Test0, MVT_U32, 4, MBT_SINGLE)); - messageTemplate.addBlock(createBlock(_PREHASH_Test1, MVT_U32, 4, MBT_SINGLE)); + messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test0), MVT_U32, 4, MBT_SINGLE)); + messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test1), MVT_U32, 4, MBT_SINGLE)); // Build message - builder = defaultBuilder(messageTemplate, _PREHASH_Test0); + builder = defaultBuilder(messageTemplate, const_cast<char*>(_PREHASH_Test0)); builder->addU32(_PREHASH_Test0, 0xaaaa); builder->nextBlock(_PREHASH_Test1); builder->addU32(_PREHASH_Test0, 0xbbbb); @@ -511,8 +512,8 @@ namespace tut U32 inTest00 = 0, inTest01 = 1, inTest1 = 2; U32 outTest00, outTest01, outTest1; LLMessageTemplate messageTemplate = defaultTemplate(); - messageTemplate.addBlock(createBlock(_PREHASH_Test0, MVT_U32, 4)); - messageTemplate.addBlock(createBlock(_PREHASH_Test1, MVT_U32, 4)); + messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test0), MVT_U32, 4)); + messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test1), MVT_U32, 4)); LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate); builder->addU32(_PREHASH_Test0, inTest00); builder->nextBlock(_PREHASH_Test0); @@ -536,15 +537,15 @@ namespace tut U32 inTest = 1, outTest; LLMessageTemplate messageTemplate = defaultTemplate(); messageTemplate.addBlock( - createBlock(_PREHASH_Test0, MVT_U32, 4, MBT_SINGLE)); - messageTemplate.addBlock(createBlock(_PREHASH_Test1, MVT_U32, 4)); + createBlock(const_cast<char*>(_PREHASH_Test0), MVT_U32, 4, MBT_SINGLE)); + messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test1), MVT_U32, 4)); LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate); builder->addU32(_PREHASH_Test0, inTest); LLTemplateMessageReader* reader = setReader(messageTemplate, builder); reader->getU32(_PREHASH_Test0, _PREHASH_Test0, outTest); - S32 blockCount = reader->getNumberOfBlocks(_PREHASH_Test1); + S32 blockCount = reader->getNumberOfBlocks(const_cast<char*>(_PREHASH_Test1)); ensure_equals("Ensure block count", blockCount, 0); ensure_equals("Ensure Test0", inTest, outTest); delete reader; @@ -556,7 +557,7 @@ namespace tut { // build template LLMessageTemplate messageTemplate = defaultTemplate(); - messageTemplate.addBlock(createBlock(_PREHASH_Test0, MVT_U32, 4)); + messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test0), MVT_U32, 4)); // build message LLTemplateMessageBuilder* builder = defaultBuilder(messageTemplate); @@ -881,7 +882,7 @@ namespace tut delete builder; // add block to reader template - messageTemplate.addBlock(createBlock(_PREHASH_Test1, MVT_U32, 4, MBT_SINGLE)); + messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test1), MVT_U32, 4, MBT_SINGLE)); // read message value and default value numberMap[1] = &messageTemplate; @@ -914,7 +915,7 @@ namespace tut delete builder; // add variable block to reader template - messageTemplate.addBlock(createBlock(_PREHASH_Test1, MVT_U32, 4)); + messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test1), MVT_U32, 4)); // read message value and check block repeat count numberMap[1] = &messageTemplate; @@ -947,7 +948,7 @@ namespace tut delete builder; // add variable block to reader template - messageTemplate.addBlock(createBlock(_PREHASH_Test1, MVT_VARIABLE, 4, + messageTemplate.addBlock(createBlock(const_cast<char*>(_PREHASH_Test1), MVT_VARIABLE, 4, MBT_SINGLE)); // read message value and default string |