Merge branch 'master' of https://vcs.firestormviewer.org/viewer-merges/phoenix-firestorm-522
commit
7a845ee23b
|
|
@ -542,9 +542,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>02e6a8207dcdaf243dcb6da19b8c3534</string>
|
||||
<string>f5a81594374c8a7f0825e2177510e079</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/64099/601302/colladadom-2.3.545362-darwin64-545362.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/82030/770590/colladadom-2.3.559710-darwin64-559710.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -578,9 +578,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>8a02a10fc69c8f504dc5335644db184a</string>
|
||||
<string>5d0729b835d63b7fe69acdc6b7c60188</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/64104/601313/colladadom-2.3.545362-windows-545362.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/82050/770692/colladadom-2.3.559710-windows-559710.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
|
|
@ -590,16 +590,16 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>742180324fca7ab92b6a61a36aab4f9d</string>
|
||||
<string>985e3081e41c76b6176d39e44d7fb4b8</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/64103/601314/colladadom-2.3.545362-windows64-545362.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/82049/770686/colladadom-2.3.559710-windows64-559710.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows64</string>
|
||||
</map>
|
||||
</map>
|
||||
<key>version</key>
|
||||
<string>2.3.545362</string>
|
||||
<string>2.3.559710</string>
|
||||
</map>
|
||||
<key>curl</key>
|
||||
<map>
|
||||
|
|
@ -3412,9 +3412,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>6989053898b8e81e904e75553e378820</string>
|
||||
<string>97fac6d88480445c856083ed20d78093</string>
|
||||
<key>url</key>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/77523/735051/viewer_manager-2.0.556340-darwin64-556340.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/85206/790666/viewer_manager-2.0.562101-darwin64-562101.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -3448,9 +3448,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>3446c1e54bb32542677caad0ec0d42ac</string>
|
||||
<string>3f6271ec0e2e2f0cc1067d4c4102bb4c</string>
|
||||
<key>url</key>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/77525/735058/viewer_manager-2.0.556340-windows-556340.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/85208/790681/viewer_manager-2.0.562101-windows-562101.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>windows</string>
|
||||
|
|
@ -3461,7 +3461,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
|||
<key>source_type</key>
|
||||
<string>hg</string>
|
||||
<key>version</key>
|
||||
<string>2.0.556340</string>
|
||||
<string>2.0.562101</string>
|
||||
</map>
|
||||
<key>vlc-bin</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
secondlife-viewer (0.3) unstable; urgency=low
|
||||
|
||||
* Initial debian configuration
|
||||
|
||||
-- Don Kjer <don@lindenlab.com> Wed, 04 Jul 2012 00:43:03 +0000
|
||||
|
||||
secondlife-viewer (0.2) unstable; urgency=low
|
||||
|
||||
* Adding default LSB headers for squeeze
|
||||
|
||||
-- Tyler Kohler <tyler@lindenlab.com> Thu, 24 Mar 2011 09:43:36 -0700
|
||||
|
||||
secondlife-viewer (0.1) unstable; urgency=low
|
||||
|
||||
* Cloned from debian package skeleton.
|
||||
|
||||
-- Lex Linden <lex@lindenlab.com> Mon, 20 Sep 2010 08:01:59 -0700
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
5
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
Source: secondlife-viewer
|
||||
Section: unknown
|
||||
Priority: extra
|
||||
Maintainer: Don Linden <don@lindenlab.com>
|
||||
Build-Depends: debhelper (>= 5)
|
||||
Homepage: http://secondlife.com
|
||||
Standards-Version: 3.7.2
|
||||
|
||||
Package: secondlife-viewer
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends},
|
||||
ia32-libs,
|
||||
ia32-libs-gtk
|
||||
Description: Second Life Viewer
|
||||
Second Life is an online virtual world developed by Linden Lab.
|
||||
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
Second Life Viewer Copyright: 2000-2012 Linden Research, Inc.
|
||||
|
||||
License:
|
||||
|
||||
3Dconnexion SDK Copyright (C) 1992-2009 3Dconnexion
|
||||
APR Copyright (C) 2011 The Apache Software Foundation
|
||||
Collada DOM Copyright 2006 Sony Computer Entertainment Inc.
|
||||
cURL Copyright (C) 1996-2010, Daniel Stenberg, (daniel@haxx.se)
|
||||
DBus/dbus-glib Copyright (C) 2002, 2003 CodeFactory AB / Copyright (C) 2003, 2004 Red Hat, Inc.
|
||||
expat Copyright (C) 1998, 1999, 2000 Thai Open Source Software Center Ltd.
|
||||
FreeType Copyright (C) 1996-2002, 2006 David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
GL Copyright (C) 1999-2004 Brian Paul.
|
||||
GLOD Copyright (C) 2003-04 Jonathan Cohen, Nat Duca, Chris Niski, Johns Hopkins University and David Luebke, Brenden Schubert, University of Virginia.
|
||||
google-perftools Copyright (c) 2005, Google Inc.
|
||||
Havok.com(TM) Copyright (C) 1999-2001, Telekinesys Research Limited.
|
||||
jpeg2000 Copyright (C) 2001, David Taubman, The University of New South Wales (UNSW)
|
||||
jpeglib Copyright (C) 1991-1998, Thomas G. Lane.
|
||||
ogg/vorbis Copyright (C) 2002, Xiphophorus
|
||||
OpenSSL Copyright (C) 1998-2008 The OpenSSL Project.
|
||||
PCRE Copyright (c) 1997-2012 University of Cambridge
|
||||
SDL Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga
|
||||
SSLeay Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
||||
xmlrpc-epi Copyright (C) 2000 Epinions, Inc.
|
||||
zlib Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler.
|
||||
|
||||
Second Life Viewer uses Havok (TM) Physics. (c)Copyright 1999-2010 Havok.com Inc. (and its Licensors). All Rights Reserved. See www.havok.com for details.
|
||||
|
||||
This software contains source code provided by NVIDIA Corporation.
|
||||
|
||||
All rights reserved. See licenses.txt for details.
|
||||
|
||||
Voice chat Audio coding: Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C)
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
#!/bin/sh
|
||||
# postinst script for secondlife-viewer
|
||||
#
|
||||
# Delete this file if you don't need it.
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postinst> `configure' <most-recently-configured-version>
|
||||
# * <old-postinst> `abort-upgrade' <new version>
|
||||
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||
# <new-version>
|
||||
# * <postinst> `abort-remove'
|
||||
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||
# <failed-install-package> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts. Don't delete this!
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
#!/bin/sh
|
||||
# postrm script for secondlife-viewer
|
||||
#
|
||||
# Delete this file if you don't need it.
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <postrm> `remove'
|
||||
# * <postrm> `purge'
|
||||
# * <old-postrm> `upgrade' <new-version>
|
||||
# * <new-postrm> `failed-upgrade' <old-version>
|
||||
# * <new-postrm> `abort-install'
|
||||
# * <new-postrm> `abort-install' <old-version>
|
||||
# * <new-postrm> `abort-upgrade' <old-version>
|
||||
# * <disappearer's-postrm> `disappear' <overwriter>
|
||||
# <overwriter-version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postrm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts. Don't delete this!
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
#!/bin/sh
|
||||
# preinst script for secondlife-viewer
|
||||
#
|
||||
# Delete this file if you don't need it.
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <new-preinst> `install'
|
||||
# * <new-preinst> `install' <old-version>
|
||||
# * <new-preinst> `upgrade' <old-version>
|
||||
# * <old-preinst> `abort-upgrade' <new-version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
install|upgrade)
|
||||
;;
|
||||
|
||||
abort-upgrade)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "preinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts. Don't delete this!
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
#!/bin/sh
|
||||
# prerm script for secondlife-viewer
|
||||
#
|
||||
# Delete this file if you don't need it.
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
# * <prerm> `remove'
|
||||
# * <old-prerm> `upgrade' <new-version>
|
||||
# * <new-prerm> `failed-upgrade' <old-version>
|
||||
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
|
||||
# * <deconfigured's-prerm> `deconfigure' `in-favour'
|
||||
# <package-being-installed> <version> `removing'
|
||||
# <conflicting-package> <version>
|
||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||
# the debian-policy package
|
||||
|
||||
|
||||
case "$1" in
|
||||
remove|upgrade|deconfigure)
|
||||
;;
|
||||
|
||||
failed-upgrade)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "prerm called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# dh_installdeb will replace this with shell code automatically
|
||||
# generated by other debhelper scripts. Don't delete this!
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
# Sample debian/rules that uses debhelper.
|
||||
# This file was originally written by Joey Hess and Craig Small.
|
||||
# As a special exception, when this file is copied by dh-make into a
|
||||
# dh-make output file, you may use that output file without restriction.
|
||||
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
BASEDIR=opt/linden
|
||||
|
||||
VIEWER_PKG=secondlife-viewer
|
||||
VIEWER_PACKAGEDIR=build-linux-i686/newview/packaged
|
||||
VIEWER_DESTDIR=$(CURDIR)/debian/$(VIEWER_PKG)
|
||||
VIEWER_VERSION:=$(shell dpkg-parsechangelog | grep ^Version | sed 's/^Version: //')
|
||||
VIEWER_INSTALLDIR:=$(BASEDIR)/viewer/SecondLife-i686-$(VIEWER_VERSION)
|
||||
|
||||
configure: configure-stamp
|
||||
configure-stamp:
|
||||
dh_testdir
|
||||
# Add here commands to configure the package.
|
||||
|
||||
touch configure-stamp
|
||||
|
||||
build: build-stamp
|
||||
|
||||
build-stamp: configure-stamp
|
||||
dh_testdir
|
||||
|
||||
# Add here commands to compile the package.
|
||||
#$(MAKE)
|
||||
#docbook-to-man debian/secondlife-viewer.sgml > secondlife-viewer.1
|
||||
|
||||
touch $@
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-stamp configure-stamp
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
#-$(MAKE) clean
|
||||
|
||||
dh_clean
|
||||
|
||||
install: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_installdirs
|
||||
|
||||
# Add here commands to install the package into debian/secondlife-viewer.
|
||||
for file in $$(find $(VIEWER_PACKAGEDIR) -type f -o -type l | sed 's~$(VIEWER_PACKAGEDIR)/~~'); do \
|
||||
# create containing directory \
|
||||
install -v -m 755 -o root -g root -d "$$(dirname "$(VIEWER_DESTDIR)/$(VIEWER_INSTALLDIR)/$$file")"; \
|
||||
PERM=644; \
|
||||
if [ -x "$(VIEWER_PACKAGEDIR)/$$file" ]; then \
|
||||
PERM=755; \
|
||||
fi; \
|
||||
if [ -L "$(VIEWER_PACKAGEDIR)/$$file" ]; then \
|
||||
REAL="$$( readlink -f $(VIEWER_PACKAGEDIR)/$$file )"; \
|
||||
RELATIVE="$$( echo $$REAL | sed 's~$(CURDIR)/$(VIEWER_PACKAGEDIR)/~~' )"; \
|
||||
echo dh_link -p $(VIEWER_PKG) "$(VIEWER_INSTALLDIR)/$$RELATIVE" "$(VIEWER_INSTALLDIR)/$$file" ; \
|
||||
dh_link -p $(VIEWER_PKG) "$(VIEWER_INSTALLDIR)/$$RELATIVE" "$(VIEWER_INSTALLDIR)/$$file" ; \
|
||||
else \
|
||||
install -v -m $$PERM -o root -g root "$(VIEWER_PACKAGEDIR)/$$file" "$(VIEWER_DESTDIR)/$(VIEWER_INSTALLDIR)/$$file"; \
|
||||
fi; \
|
||||
done
|
||||
dh_link -p $(VIEWER_PKG) /$(VIEWER_INSTALLDIR)/secondlife /usr/bin/secondlife
|
||||
dh_link -p $(VIEWER_PKG) $(BASEDIR)/viewer/SecondLife-i686-$(VIEWER_VERSION) $(BASEDIR)/viewer/SecondLife
|
||||
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install
|
||||
# We have nothing to do by default.
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs
|
||||
dh_installdocs
|
||||
dh_installexamples
|
||||
# dh_install
|
||||
# dh_installmenu
|
||||
# dh_installdebconf
|
||||
# dh_installlogrotate
|
||||
# dh_installemacsen
|
||||
# dh_installpam
|
||||
# dh_installmime
|
||||
# dh_python
|
||||
|
||||
# To add an init script, uncomment this line and edit debian/init.d and
|
||||
# customize debian/secondlife-viewer.default to suit your needs.
|
||||
# dh_installinit
|
||||
|
||||
# To add cron jobs, uncomment this line and make a crontab file named
|
||||
# debian/cron.d, and it will be installed in /etc/cron.d/
|
||||
# dh_installcron
|
||||
|
||||
# dh_installinfo
|
||||
dh_installman
|
||||
dh_link
|
||||
# dh_strip
|
||||
dh_compress
|
||||
# dh_fixperms
|
||||
# dh_perl
|
||||
# dh_makeshlibs
|
||||
dh_installdeb
|
||||
# dh_shlibdeps
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary install configure
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
# Linden packages install in opt/linden
|
||||
secondlife-viewer: dir-or-file-in-opt
|
||||
secondlife-viewer: section-is-dh_make-template
|
||||
secondlife-viewer: binary-without-manpage
|
||||
secondlife-viewer: maintainer-script-empty postrm
|
||||
secondlife-viewer: maintainer-script-empty preinst
|
||||
secondlife-viewer: maintainer-script-empty prerm
|
||||
secondlife-viewer: unstripped-binary-or-object
|
||||
|
|
@ -272,6 +272,7 @@ Beq Janus
|
|||
SL-13583
|
||||
SL-14766
|
||||
SL-14927
|
||||
SL-11300
|
||||
Beth Walcher
|
||||
Bezilon Kasei
|
||||
Biancaluce Robbiani
|
||||
|
|
@ -812,6 +813,7 @@ Jonathan Yap
|
|||
STORM-2142
|
||||
STORM-2145
|
||||
SL-10089
|
||||
BUG-229818
|
||||
Kadah Coba
|
||||
STORM-1060
|
||||
STORM-1843
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
|
|
@ -82,7 +82,8 @@ if (WINDOWS)
|
|||
# CP changed to only append the flag for 32bit builds - on 64bit builds,
|
||||
# locally at least, the build output is spammed with 1000s of 'D9002'
|
||||
# warnings about this switch being ignored.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
||||
# We need std::string_view, but that's not available without /std:c++17.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /std:c++17")
|
||||
# <FS:ND> Remove this, it's no option to cl.exe and causes a massive amount of warnings.
|
||||
#if( ADDRESS_SIZE EQUAL 32 )
|
||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /p:PreferredToolArchitecture=x64")
|
||||
|
|
@ -245,7 +246,7 @@ if (DARWIN)
|
|||
# Until we decide to set -std=c++14 in viewer-build-variables/variables, set
|
||||
# it locally here: we want to at least prevent inadvertently reintroducing
|
||||
# viewer code that would fail with C++14.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags} -std=c++14")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags} -std=c++17")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}")
|
||||
# NOTE: it's critical that the optimization flag is put in front.
|
||||
# NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
|
||||
|
|
|
|||
|
|
@ -210,9 +210,9 @@ set(llcommon_HEADER_FILES
|
|||
llqueuedthread.h
|
||||
llrand.h
|
||||
llrefcount.h
|
||||
llregex.h
|
||||
llregistry.h
|
||||
llrun.h
|
||||
llrefcount.h
|
||||
llsafehandle.h
|
||||
llsd.h
|
||||
llsdjson.h
|
||||
|
|
|
|||
|
|
@ -0,0 +1,89 @@
|
|||
/**
|
||||
* @file llregex.h
|
||||
*
|
||||
* $LicenseInfo:firstyear=2021&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2021, 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$
|
||||
*/
|
||||
|
||||
#ifndef LLREGEX_H
|
||||
#define LLREGEX_H
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
template <typename S, typename M, typename R>
|
||||
LL_COMMON_API bool ll_regex_match(const S& string, M& match, const R& regex)
|
||||
{
|
||||
try
|
||||
{
|
||||
return boost::regex_match(string, match, regex);
|
||||
}
|
||||
catch (const std::runtime_error& e)
|
||||
{
|
||||
LL_WARNS() << "error matching with '" << regex.str() << "': "
|
||||
<< e.what() << ":\n'" << string << "'" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename S, typename R>
|
||||
LL_COMMON_API bool ll_regex_match(const S& string, const R& regex)
|
||||
{
|
||||
try
|
||||
{
|
||||
return boost::regex_match(string, regex);
|
||||
}
|
||||
catch (const std::runtime_error& e)
|
||||
{
|
||||
LL_WARNS() << "error matching with '" << regex.str() << "': "
|
||||
<< e.what() << ":\n'" << string << "'" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename S, typename M, typename R>
|
||||
bool ll_regex_search(const S& string, M& match, const R& regex)
|
||||
{
|
||||
try
|
||||
{
|
||||
return boost::regex_search(string, match, regex);
|
||||
}
|
||||
catch (const std::runtime_error& e)
|
||||
{
|
||||
LL_WARNS() << "error searching with '" << regex.str() << "': "
|
||||
<< e.what() << ":\n'" << string << "'" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename S, typename R>
|
||||
bool ll_regex_search(const S& string, const R& regex)
|
||||
{
|
||||
try
|
||||
{
|
||||
return boost::regex_search(string, regex);
|
||||
}
|
||||
catch (const std::runtime_error& e)
|
||||
{
|
||||
LL_WARNS() << "error searching with '" << regex.str() << "': "
|
||||
<< e.what() << ":\n'" << string << "'" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif // LLREGEX_H
|
||||
|
|
@ -413,49 +413,6 @@ public:
|
|||
static std::string typeString(Type type); // Return human-readable type as a string
|
||||
};
|
||||
|
||||
struct llsd_select_bool : public std::unary_function<LLSD, LLSD::Boolean>
|
||||
{
|
||||
LLSD::Boolean operator()(const LLSD& sd) const
|
||||
{
|
||||
return sd.asBoolean();
|
||||
}
|
||||
};
|
||||
struct llsd_select_integer : public std::unary_function<LLSD, LLSD::Integer>
|
||||
{
|
||||
LLSD::Integer operator()(const LLSD& sd) const
|
||||
{
|
||||
return sd.asInteger();
|
||||
}
|
||||
};
|
||||
struct llsd_select_real : public std::unary_function<LLSD, LLSD::Real>
|
||||
{
|
||||
LLSD::Real operator()(const LLSD& sd) const
|
||||
{
|
||||
return sd.asReal();
|
||||
}
|
||||
};
|
||||
struct llsd_select_float : public std::unary_function<LLSD, F32>
|
||||
{
|
||||
F32 operator()(const LLSD& sd) const
|
||||
{
|
||||
return (F32)sd.asReal();
|
||||
}
|
||||
};
|
||||
struct llsd_select_uuid : public std::unary_function<LLSD, LLSD::UUID>
|
||||
{
|
||||
LLSD::UUID operator()(const LLSD& sd) const
|
||||
{
|
||||
return sd.asUUID();
|
||||
}
|
||||
};
|
||||
struct llsd_select_string : public std::unary_function<LLSD, LLSD::String>
|
||||
{
|
||||
LLSD::String operator()(const LLSD& sd) const
|
||||
{
|
||||
return sd.asString();
|
||||
}
|
||||
};
|
||||
|
||||
LL_COMMON_API std::ostream& operator<<(std::ostream& s, const LLSD& llsd);
|
||||
|
||||
namespace llsd
|
||||
|
|
|
|||
|
|
@ -40,30 +40,6 @@
|
|||
// <ND> For strcmp
|
||||
#include <string.h>
|
||||
#endif
|
||||
// Use to compare the first element only of a pair
|
||||
// e.g. typedef std::set<std::pair<int, Data*>, compare_pair<int, Data*> > some_pair_set_t;
|
||||
template <typename T1, typename T2>
|
||||
struct compare_pair_first
|
||||
{
|
||||
bool operator()(const std::pair<T1, T2>& a, const std::pair<T1, T2>& b) const
|
||||
{
|
||||
return a.first < b.first;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T1, typename T2>
|
||||
struct compare_pair_greater
|
||||
{
|
||||
bool operator()(const std::pair<T1, T2>& a, const std::pair<T1, T2>& b) const
|
||||
{
|
||||
if (!(a.first < b.first))
|
||||
return true;
|
||||
else if (!(b.first < a.first))
|
||||
return false;
|
||||
else
|
||||
return !(a.second < b.second);
|
||||
}
|
||||
};
|
||||
|
||||
// Use to compare the contents of two pointers (e.g. std::string*)
|
||||
template <typename T>
|
||||
|
|
@ -123,58 +99,6 @@ struct DeletePairedPointerArray
|
|||
};
|
||||
|
||||
|
||||
// Alternate version of the above so that has a more cumbersome
|
||||
// syntax, but it can be used with compositional functors.
|
||||
// NOTE: The functor retuns a bool because msdev bombs during the
|
||||
// composition if you return void. Once we upgrade to a newer
|
||||
// compiler, the second unary_function template parameter can be set
|
||||
// to void.
|
||||
//
|
||||
// Here's a snippet showing how you use this object:
|
||||
//
|
||||
// typedef std::map<int, widget*> map_type;
|
||||
// map_type widget_map;
|
||||
// ... // add elements
|
||||
// // delete them all
|
||||
// for_each(widget_map.begin(),
|
||||
// widget_map.end(),
|
||||
// llcompose1(DeletePointerFunctor<widget>(),
|
||||
// llselect2nd<map_type::value_type>()));
|
||||
|
||||
template<typename T>
|
||||
struct DeletePointerFunctor : public std::unary_function<T*, bool>
|
||||
{
|
||||
bool operator()(T* ptr) const
|
||||
{
|
||||
delete ptr;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
// See notes about DeleteArray for why you should consider avoiding this.
|
||||
template<typename T>
|
||||
struct DeleteArrayFunctor : public std::unary_function<T*, bool>
|
||||
{
|
||||
bool operator()(T* ptr) const
|
||||
{
|
||||
delete[] ptr;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
// CopyNewPointer is a simple helper which accepts a pointer, and
|
||||
// returns a new pointer built with the copy constructor. Example:
|
||||
//
|
||||
// transform(in.begin(), in.end(), out.end(), CopyNewPointer());
|
||||
|
||||
struct CopyNewPointer
|
||||
{
|
||||
template<typename T> T* operator()(const T* ptr) const
|
||||
{
|
||||
return new T(*ptr);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T, typename ALLOC>
|
||||
void delete_and_clear(std::list<T*, ALLOC>& list)
|
||||
{
|
||||
|
|
@ -363,161 +287,6 @@ OutputIter ll_transform_n(
|
|||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1994
|
||||
* Hewlett-Packard Company
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Hewlett-Packard Company makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*
|
||||
* Copyright (c) 1996-1998
|
||||
* Silicon Graphics Computer Systems, Inc.
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Silicon Graphics makes no
|
||||
* representations about the suitability of this software for any
|
||||
* purpose. It is provided "as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
|
||||
// helper to deal with the fact that MSDev does not package
|
||||
// select... with the stl. Look up usage on the sgi website.
|
||||
|
||||
template <class _Pair>
|
||||
struct _LLSelect1st : public std::unary_function<_Pair, typename _Pair::first_type> {
|
||||
const typename _Pair::first_type& operator()(const _Pair& __x) const {
|
||||
return __x.first;
|
||||
}
|
||||
};
|
||||
|
||||
template <class _Pair>
|
||||
struct _LLSelect2nd : public std::unary_function<_Pair, typename _Pair::second_type>
|
||||
{
|
||||
const typename _Pair::second_type& operator()(const _Pair& __x) const {
|
||||
return __x.second;
|
||||
}
|
||||
};
|
||||
|
||||
template <class _Pair> struct llselect1st : public _LLSelect1st<_Pair> {};
|
||||
template <class _Pair> struct llselect2nd : public _LLSelect2nd<_Pair> {};
|
||||
|
||||
// helper to deal with the fact that MSDev does not package
|
||||
// compose... with the stl. Look up usage on the sgi website.
|
||||
|
||||
template <class _Operation1, class _Operation2>
|
||||
class ll_unary_compose :
|
||||
public std::unary_function<typename _Operation2::argument_type,
|
||||
typename _Operation1::result_type>
|
||||
{
|
||||
protected:
|
||||
_Operation1 __op1;
|
||||
_Operation2 __op2;
|
||||
public:
|
||||
ll_unary_compose(const _Operation1& __x, const _Operation2& __y)
|
||||
: __op1(__x), __op2(__y) {}
|
||||
typename _Operation1::result_type
|
||||
operator()(const typename _Operation2::argument_type& __x) const {
|
||||
return __op1(__op2(__x));
|
||||
}
|
||||
};
|
||||
|
||||
template <class _Operation1, class _Operation2>
|
||||
inline ll_unary_compose<_Operation1,_Operation2>
|
||||
llcompose1(const _Operation1& __op1, const _Operation2& __op2)
|
||||
{
|
||||
return ll_unary_compose<_Operation1,_Operation2>(__op1, __op2);
|
||||
}
|
||||
|
||||
template <class _Operation1, class _Operation2, class _Operation3>
|
||||
class ll_binary_compose
|
||||
: public std::unary_function<typename _Operation2::argument_type,
|
||||
typename _Operation1::result_type> {
|
||||
protected:
|
||||
_Operation1 _M_op1;
|
||||
_Operation2 _M_op2;
|
||||
_Operation3 _M_op3;
|
||||
public:
|
||||
ll_binary_compose(const _Operation1& __x, const _Operation2& __y,
|
||||
const _Operation3& __z)
|
||||
: _M_op1(__x), _M_op2(__y), _M_op3(__z) { }
|
||||
typename _Operation1::result_type
|
||||
operator()(const typename _Operation2::argument_type& __x) const {
|
||||
return _M_op1(_M_op2(__x), _M_op3(__x));
|
||||
}
|
||||
};
|
||||
|
||||
template <class _Operation1, class _Operation2, class _Operation3>
|
||||
inline ll_binary_compose<_Operation1, _Operation2, _Operation3>
|
||||
llcompose2(const _Operation1& __op1, const _Operation2& __op2,
|
||||
const _Operation3& __op3)
|
||||
{
|
||||
return ll_binary_compose<_Operation1,_Operation2,_Operation3>
|
||||
(__op1, __op2, __op3);
|
||||
}
|
||||
|
||||
// helpers to deal with the fact that MSDev does not package
|
||||
// bind... with the stl. Again, this is from sgi.
|
||||
template <class _Operation>
|
||||
class llbinder1st :
|
||||
public std::unary_function<typename _Operation::second_argument_type,
|
||||
typename _Operation::result_type> {
|
||||
protected:
|
||||
_Operation op;
|
||||
typename _Operation::first_argument_type value;
|
||||
public:
|
||||
llbinder1st(const _Operation& __x,
|
||||
const typename _Operation::first_argument_type& __y)
|
||||
: op(__x), value(__y) {}
|
||||
typename _Operation::result_type
|
||||
operator()(const typename _Operation::second_argument_type& __x) const {
|
||||
return op(value, __x);
|
||||
}
|
||||
};
|
||||
|
||||
template <class _Operation, class _Tp>
|
||||
inline llbinder1st<_Operation>
|
||||
llbind1st(const _Operation& __oper, const _Tp& __x)
|
||||
{
|
||||
typedef typename _Operation::first_argument_type _Arg1_type;
|
||||
return llbinder1st<_Operation>(__oper, _Arg1_type(__x));
|
||||
}
|
||||
|
||||
template <class _Operation>
|
||||
class llbinder2nd
|
||||
: public std::unary_function<typename _Operation::first_argument_type,
|
||||
typename _Operation::result_type> {
|
||||
protected:
|
||||
_Operation op;
|
||||
typename _Operation::second_argument_type value;
|
||||
public:
|
||||
llbinder2nd(const _Operation& __x,
|
||||
const typename _Operation::second_argument_type& __y)
|
||||
: op(__x), value(__y) {}
|
||||
typename _Operation::result_type
|
||||
operator()(const typename _Operation::first_argument_type& __x) const {
|
||||
return op(__x, value);
|
||||
}
|
||||
};
|
||||
|
||||
template <class _Operation, class _Tp>
|
||||
inline llbinder2nd<_Operation>
|
||||
llbind2nd(const _Operation& __oper, const _Tp& __x)
|
||||
{
|
||||
typedef typename _Operation::second_argument_type _Arg2_type;
|
||||
return llbinder2nd<_Operation>(__oper, _Arg2_type(__x));
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare std::type_info* pointers a la std::less. We break this out as a
|
||||
* separate function for use in two different std::less specializations.
|
||||
|
|
@ -548,8 +317,7 @@ bool before(const std::type_info* lhs, const std::type_info* rhs)
|
|||
namespace std
|
||||
{
|
||||
template <>
|
||||
struct less<const std::type_info*>:
|
||||
public std::binary_function<const std::type_info*, const std::type_info*, bool>
|
||||
struct less<const std::type_info*>
|
||||
{
|
||||
bool operator()(const std::type_info* lhs, const std::type_info* rhs) const
|
||||
{
|
||||
|
|
@ -558,8 +326,7 @@ namespace std
|
|||
};
|
||||
|
||||
template <>
|
||||
struct less<std::type_info*>:
|
||||
public std::binary_function<std::type_info*, std::type_info*, bool>
|
||||
struct less<std::type_info*>
|
||||
{
|
||||
bool operator()(std::type_info* lhs, std::type_info* rhs) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,12 +43,12 @@
|
|||
#include "llerrorcontrol.h"
|
||||
#include "llevents.h"
|
||||
#include "llformat.h"
|
||||
#include "llregex.h"
|
||||
#include "lltimer.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llsdutil.h"
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/circular_buffer.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/range.hpp>
|
||||
|
|
@ -101,39 +101,6 @@ static const F32 MEM_INFO_THROTTLE = 20;
|
|||
// dropped below the login framerate, we'd have very little additional data.
|
||||
static const F32 MEM_INFO_WINDOW = 10*60;
|
||||
|
||||
// Wrap boost::regex_match() with a function that doesn't throw.
|
||||
template <typename S, typename M, typename R>
|
||||
static bool regex_match_no_exc(const S& string, M& match, const R& regex)
|
||||
{
|
||||
try
|
||||
{
|
||||
return boost::regex_match(string, match, regex);
|
||||
}
|
||||
catch (const std::runtime_error& e)
|
||||
{
|
||||
LL_WARNS("LLMemoryInfo") << "error matching with '" << regex.str() << "': "
|
||||
<< e.what() << ":\n'" << string << "'" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Wrap boost::regex_search() with a function that doesn't throw.
|
||||
template <typename S, typename M, typename R>
|
||||
static bool regex_search_no_exc(const S& string, M& match, const R& regex)
|
||||
{
|
||||
try
|
||||
{
|
||||
return boost::regex_search(string, match, regex);
|
||||
}
|
||||
catch (const std::runtime_error& e)
|
||||
{
|
||||
LL_WARNS("LLMemoryInfo") << "error searching with '" << regex.str() << "': "
|
||||
<< e.what() << ":\n'" << string << "'" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
LLOSInfo::LLOSInfo() :
|
||||
mMajorVer(0), mMinorVer(0), mBuild(0), mOSVersionString("")
|
||||
{
|
||||
|
|
@ -384,7 +351,7 @@ LLOSInfo::LLOSInfo() :
|
|||
boost::smatch matched;
|
||||
|
||||
std::string glibc_version(gnu_get_libc_version());
|
||||
if ( regex_match_no_exc(glibc_version, matched, os_version_parse) )
|
||||
if ( ll_regex_match(glibc_version, matched, os_version_parse) )
|
||||
{
|
||||
LL_INFOS("AppInit") << "Using glibc version '" << glibc_version << "' as OS version" << LL_ENDL;
|
||||
|
||||
|
|
@ -1061,7 +1028,7 @@ LLSD LLMemoryInfo::loadStatsMap()
|
|||
while (std::getline(meminfo, line))
|
||||
{
|
||||
LL_DEBUGS("LLMemoryInfo") << line << LL_ENDL;
|
||||
if (regex_match_no_exc(line, matched, stat_rx))
|
||||
if (ll_regex_match(line, matched, stat_rx))
|
||||
{
|
||||
// e.g. "MemTotal: 4108424 kB"
|
||||
LLSD::String key(matched[1].first, matched[1].second);
|
||||
|
|
|
|||
|
|
@ -530,7 +530,7 @@ namespace tut
|
|||
result.ensure();
|
||||
}
|
||||
|
||||
struct TestLargeMessage: public std::binary_function<size_t, size_t, bool>
|
||||
struct TestLargeMessage
|
||||
{
|
||||
TestLargeMessage(const std::string& PYTHON_, const std::string& reader_module_,
|
||||
const std::string& test_name_):
|
||||
|
|
|
|||
|
|
@ -343,6 +343,11 @@ const std::string &LLDir::getDumpDir() const
|
|||
return LLDir::sDumpDir;
|
||||
}
|
||||
|
||||
bool LLDir::dumpDirExists() const
|
||||
{
|
||||
return !sDumpDir.empty();
|
||||
}
|
||||
|
||||
const std::string &LLDir::getPerAccountChatLogsDir() const
|
||||
{
|
||||
return mPerAccountChatLogsDir;
|
||||
|
|
|
|||
|
|
@ -128,6 +128,7 @@ class LLDir
|
|||
const std::string &getLindenUserDir() const; // Location of the Linden user dir.
|
||||
const std::string &getChatLogsDir() const; // Location of the chat logs dir.
|
||||
const std::string &getDumpDir() const; // Location of the per-run dump dir.
|
||||
bool dumpDirExists() const;
|
||||
const std::string &getPerAccountChatLogsDir() const; // Location of the per account chat logs dir.
|
||||
const std::string &getTempDir() const; // Common temporary directory
|
||||
const std::string getCacheDir(bool get_default = false) const; // Location of the cache.
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@
|
|||
#include "lldiriterator.h"
|
||||
|
||||
#include "fix_macros.h"
|
||||
#include "llregex.h"
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ bool LLDirIterator::Impl::next(std::string &fname)
|
|||
{
|
||||
boost::smatch match;
|
||||
std::string name = mIter->path().filename().string();
|
||||
found = boost::regex_match(name, match, mFilterExp);
|
||||
found = ll_regex_match(name, match, mFilterExp);
|
||||
if (found)
|
||||
{
|
||||
fname = name;
|
||||
|
|
|
|||
|
|
@ -1498,7 +1498,7 @@ bool LLImageRaw::scale( S32 new_width, S32 new_height, bool scale_image_data )
|
|||
setDataAndSize(new_data, new_width, new_height, components);
|
||||
}
|
||||
}
|
||||
else
|
||||
else try
|
||||
{
|
||||
// copy out existing image data
|
||||
S32 temp_data_size = old_width * old_height * components;
|
||||
|
|
@ -1532,6 +1532,11 @@ bool LLImageRaw::scale( S32 new_width, S32 new_height, bool scale_image_data )
|
|||
}
|
||||
}
|
||||
}
|
||||
catch (std::bad_alloc&) // for temp_buffer
|
||||
{
|
||||
LL_WARNS() << "Failed to allocate temporary image buffer" << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1269,5 +1269,5 @@ U32 LLParcel::countExperienceKeyType( U32 type )
|
|||
return std::count_if(
|
||||
boost::begin(mExperienceKeys | boost::adaptors::map_values),
|
||||
boost::end(mExperienceKeys | boost::adaptors::map_values),
|
||||
std::bind2nd(std::equal_to<U32>(), type));
|
||||
[type](U32 key){ return key == type; });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -395,7 +395,7 @@ bool LLSettingsBase::validate()
|
|||
|
||||
LLSD LLSettingsBase::settingValidation(LLSD &settings, validation_list_t &validations, bool partial)
|
||||
{
|
||||
static Validator validateName(SETTING_NAME, false, LLSD::TypeString, boost::bind(&Validator::verifyStringLength, _1, 63));
|
||||
static Validator validateName(SETTING_NAME, false, LLSD::TypeString, boost::bind(&Validator::verifyStringLength, _1, _2, 63));
|
||||
static Validator validateId(SETTING_ID, false, LLSD::TypeUUID);
|
||||
static Validator validateHash(SETTING_HASH, false, LLSD::TypeInteger);
|
||||
static Validator validateType(SETTING_TYPE, false, LLSD::TypeString);
|
||||
|
|
@ -534,7 +534,7 @@ bool LLSettingsBase::Validator::verify(LLSD &data, U32 flags)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!mVerify.empty() && !mVerify(data[mName]))
|
||||
if (!mVerify.empty() && !mVerify(data[mName], flags))
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Setting '" << mName << "' fails validation." << LL_ENDL;
|
||||
return false;
|
||||
|
|
@ -543,17 +543,17 @@ bool LLSettingsBase::Validator::verify(LLSD &data, U32 flags)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool LLSettingsBase::Validator::verifyColor(LLSD &value)
|
||||
bool LLSettingsBase::Validator::verifyColor(LLSD &value, U32)
|
||||
{
|
||||
return (value.size() == 3 || value.size() == 4);
|
||||
}
|
||||
|
||||
bool LLSettingsBase::Validator::verifyVector(LLSD &value, S32 length)
|
||||
bool LLSettingsBase::Validator::verifyVector(LLSD &value, U32, S32 length)
|
||||
{
|
||||
return (value.size() == length);
|
||||
}
|
||||
|
||||
bool LLSettingsBase::Validator::verifyVectorNormalized(LLSD &value, S32 length)
|
||||
bool LLSettingsBase::Validator::verifyVectorNormalized(LLSD &value, U32, S32 length)
|
||||
{
|
||||
if (value.size() != length)
|
||||
return false;
|
||||
|
|
@ -596,7 +596,7 @@ bool LLSettingsBase::Validator::verifyVectorNormalized(LLSD &value, S32 length)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool LLSettingsBase::Validator::verifyVectorMinMax(LLSD &value, LLSD minvals, LLSD maxvals)
|
||||
bool LLSettingsBase::Validator::verifyVectorMinMax(LLSD &value, U32, LLSD minvals, LLSD maxvals)
|
||||
{
|
||||
for (S32 index = 0; index < value.size(); ++index)
|
||||
{
|
||||
|
|
@ -619,12 +619,12 @@ bool LLSettingsBase::Validator::verifyVectorMinMax(LLSD &value, LLSD minvals, LL
|
|||
return true;
|
||||
}
|
||||
|
||||
bool LLSettingsBase::Validator::verifyQuaternion(LLSD &value)
|
||||
bool LLSettingsBase::Validator::verifyQuaternion(LLSD &value, U32)
|
||||
{
|
||||
return (value.size() == 4);
|
||||
}
|
||||
|
||||
bool LLSettingsBase::Validator::verifyQuaternionNormal(LLSD &value)
|
||||
bool LLSettingsBase::Validator::verifyQuaternionNormal(LLSD &value, U32)
|
||||
{
|
||||
if (value.size() != 4)
|
||||
return false;
|
||||
|
|
@ -642,7 +642,7 @@ bool LLSettingsBase::Validator::verifyQuaternionNormal(LLSD &value)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool LLSettingsBase::Validator::verifyFloatRange(LLSD &value, LLSD range)
|
||||
bool LLSettingsBase::Validator::verifyFloatRange(LLSD &value, U32, LLSD range)
|
||||
{
|
||||
F64 real = value.asReal();
|
||||
|
||||
|
|
@ -655,7 +655,7 @@ bool LLSettingsBase::Validator::verifyFloatRange(LLSD &value, LLSD range)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool LLSettingsBase::Validator::verifyIntegerRange(LLSD &value, LLSD range)
|
||||
bool LLSettingsBase::Validator::verifyIntegerRange(LLSD &value, U32, LLSD range)
|
||||
{
|
||||
S32 ival = value.asInteger();
|
||||
|
||||
|
|
@ -668,7 +668,7 @@ bool LLSettingsBase::Validator::verifyIntegerRange(LLSD &value, LLSD range)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool LLSettingsBase::Validator::verifyStringLength(LLSD &value, S32 length)
|
||||
bool LLSettingsBase::Validator::verifyStringLength(LLSD &value, U32, S32 length)
|
||||
{
|
||||
std::string sval = value.asString();
|
||||
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ public:
|
|||
public:
|
||||
static const U32 VALIDATION_PARTIAL;
|
||||
|
||||
typedef boost::function<bool(LLSD &)> verify_pr;
|
||||
typedef boost::function<bool(LLSD &, U32)> verify_pr;
|
||||
|
||||
Validator(std::string name, bool required, LLSD::Type type, verify_pr verify = verify_pr(), LLSD defval = LLSD()) :
|
||||
mName(name),
|
||||
|
|
@ -287,15 +287,15 @@ public:
|
|||
bool verify(LLSD &data, U32 flags);
|
||||
|
||||
// Some basic verifications
|
||||
static bool verifyColor(LLSD &value);
|
||||
static bool verifyVector(LLSD &value, S32 length);
|
||||
static bool verifyVectorMinMax(LLSD &value, LLSD minvals, LLSD maxvals);
|
||||
static bool verifyVectorNormalized(LLSD &value, S32 length);
|
||||
static bool verifyQuaternion(LLSD &value);
|
||||
static bool verifyQuaternionNormal(LLSD &value);
|
||||
static bool verifyFloatRange(LLSD &value, LLSD range);
|
||||
static bool verifyIntegerRange(LLSD &value, LLSD range);
|
||||
static bool verifyStringLength(LLSD &value, S32 length);
|
||||
static bool verifyColor(LLSD &value, U32 flags);
|
||||
static bool verifyVector(LLSD &value, U32 flags, S32 length);
|
||||
static bool verifyVectorMinMax(LLSD &value, U32 flags, LLSD minvals, LLSD maxvals);
|
||||
static bool verifyVectorNormalized(LLSD &value, U32 flags, S32 length);
|
||||
static bool verifyQuaternion(LLSD &value, U32 flags);
|
||||
static bool verifyQuaternionNormal(LLSD &value, U32 flags);
|
||||
static bool verifyFloatRange(LLSD &value, U32 flags, LLSD range);
|
||||
static bool verifyIntegerRange(LLSD &value, U32 flags, LLSD range);
|
||||
static bool verifyStringLength(LLSD &value, U32 flags, S32 length);
|
||||
|
||||
private:
|
||||
std::string mName;
|
||||
|
|
|
|||
|
|
@ -461,7 +461,7 @@ void LLSettingsDay::blend(const LLSettingsBase::ptr_t &other, F64 mix)
|
|||
|
||||
namespace
|
||||
{
|
||||
bool validateDayCycleTrack(LLSD &value)
|
||||
bool validateDayCycleTrack(LLSD &value, U32 flags)
|
||||
{
|
||||
// Trim extra tracks.
|
||||
while (value.size() > LLSettingsDay::TRACK_MAX)
|
||||
|
|
@ -532,7 +532,7 @@ namespace
|
|||
return true;
|
||||
}
|
||||
|
||||
bool validateDayCycleFrames(LLSD &value)
|
||||
bool validateDayCycleFrames(LLSD &value, U32 flags)
|
||||
{
|
||||
bool hasSky(false);
|
||||
bool hasWater(false);
|
||||
|
|
@ -545,7 +545,7 @@ namespace
|
|||
if (ftype == "sky")
|
||||
{
|
||||
LLSettingsSky::validation_list_t valid_sky = LLSettingsSky::validationList();
|
||||
LLSD res_sky = LLSettingsBase::settingValidation(frame, valid_sky);
|
||||
LLSD res_sky = LLSettingsBase::settingValidation(frame, valid_sky, flags);
|
||||
|
||||
if (res_sky["success"].asInteger() == 0)
|
||||
{
|
||||
|
|
@ -558,7 +558,7 @@ namespace
|
|||
else if (ftype == "water")
|
||||
{
|
||||
LLSettingsWater::validation_list_t valid_h2o = LLSettingsWater::validationList();
|
||||
LLSD res_h2o = LLSettingsBase::settingValidation(frame, valid_h2o);
|
||||
LLSD res_h2o = LLSettingsBase::settingValidation(frame, valid_h2o, flags);
|
||||
if (res_h2o["success"].asInteger() == 0)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Water setting named '" << (*itf).first << "' validation failed!: " << res_h2o << LL_ENDL;
|
||||
|
|
@ -574,18 +574,20 @@ namespace
|
|||
}
|
||||
}
|
||||
|
||||
if (!hasSky)
|
||||
if ((flags & LLSettingsBase::Validator::VALIDATION_PARTIAL) == 0)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "No skies defined." << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
if (!hasSky)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "No skies defined." << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!hasWater)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "No waters defined." << LL_ENDL;
|
||||
return false;
|
||||
if (!hasWater)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "No waters defined." << LL_ENDL;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,29 +156,29 @@ LLSettingsSky::validation_list_t legacyHazeValidationList()
|
|||
if (legacyHazeValidation.empty())
|
||||
{
|
||||
legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_AMBIENT, false, LLSD::TypeArray,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
|
||||
LLSD(LLSDArray(3.0f)(3.0f)(3.0f)("*")))));
|
||||
legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_BLUE_DENSITY, false, LLSD::TypeArray,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
|
||||
LLSD(LLSDArray(3.0f)(3.0f)(3.0f)("*")))));
|
||||
legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_BLUE_HORIZON, false, LLSD::TypeArray,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
|
||||
LLSD(LLSDArray(3.0f)(3.0f)(3.0f)("*")))));
|
||||
legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_HAZE_DENSITY, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(5.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(5.0f)))));
|
||||
legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_HAZE_HORIZON, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(5.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(5.0f)))));
|
||||
// <FS:Beq> FIRE-29682 Allow full range density multipliers
|
||||
// legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_MULTIPLIER, false, LLSD::TypeReal,
|
||||
// boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0001f)(2.0f)))));
|
||||
// boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0001f)(2.0f)))));
|
||||
legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_MULTIPLIER, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0000001f)(2.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0000001f)(2.0f)))));
|
||||
// </FS:Beq>
|
||||
legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DISTANCE_MULTIPLIER, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0001f)(1000.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0001f)(1000.0f)))));
|
||||
}
|
||||
return legacyHazeValidation;
|
||||
}
|
||||
|
|
@ -189,19 +189,19 @@ LLSettingsSky::validation_list_t rayleighValidationList()
|
|||
if (rayleighValidation.empty())
|
||||
{
|
||||
rayleighValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(32768.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(32768.0f)))));
|
||||
|
||||
rayleighValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
|
||||
rayleighValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(-1.0f)(1.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(-1.0f)(1.0f)))));
|
||||
|
||||
rayleighValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
|
||||
rayleighValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
}
|
||||
return rayleighValidation;
|
||||
}
|
||||
|
|
@ -212,19 +212,19 @@ LLSettingsSky::validation_list_t absorptionValidationList()
|
|||
if (absorptionValidation.empty())
|
||||
{
|
||||
absorptionValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(32768.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(32768.0f)))));
|
||||
|
||||
absorptionValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
|
||||
absorptionValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(-1.0f)(1.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(-1.0f)(1.0f)))));
|
||||
|
||||
absorptionValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
|
||||
absorptionValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
}
|
||||
return absorptionValidation;
|
||||
}
|
||||
|
|
@ -235,31 +235,31 @@ LLSettingsSky::validation_list_t mieValidationList()
|
|||
if (mieValidation.empty())
|
||||
{
|
||||
mieValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_WIDTH, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(32768.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(32768.0f)))));
|
||||
|
||||
mieValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_TERM, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
|
||||
mieValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(-1.0f)(1.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(-1.0f)(1.0f)))));
|
||||
|
||||
mieValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_LINEAR_TERM, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(2.0f)))));
|
||||
|
||||
mieValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_PROFILE_CONSTANT_TERM, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
|
||||
mieValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_MIE_ANISOTROPY_FACTOR, false, LLSD::TypeReal,
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
}
|
||||
return mieValidation;
|
||||
}
|
||||
|
||||
bool validateLegacyHaze(LLSD &value)
|
||||
bool validateLegacyHaze(LLSD &value, U32 flags)
|
||||
{
|
||||
LLSettingsSky::validation_list_t legacyHazeValidations = legacyHazeValidationList();
|
||||
llassert(value.type() == LLSD::TypeMap);
|
||||
LLSD result = LLSettingsBase::settingValidation(value, legacyHazeValidations);
|
||||
LLSD result = LLSettingsBase::settingValidation(value, legacyHazeValidations, flags);
|
||||
if (result["errors"].size() > 0)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Legacy Haze Config Validation errors: " << result["errors"] << LL_ENDL;
|
||||
|
|
@ -273,7 +273,7 @@ bool validateLegacyHaze(LLSD &value)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool validateRayleighLayers(LLSD &value)
|
||||
bool validateRayleighLayers(LLSD &value, U32 flags)
|
||||
{
|
||||
LLSettingsSky::validation_list_t rayleighValidations = rayleighValidationList();
|
||||
if (value.isArray())
|
||||
|
|
@ -284,24 +284,24 @@ bool validateRayleighLayers(LLSD &value)
|
|||
LLSD& layerConfig = (*itf);
|
||||
if (layerConfig.type() == LLSD::TypeMap)
|
||||
{
|
||||
if (!validateRayleighLayers(layerConfig))
|
||||
if (!validateRayleighLayers(layerConfig, flags))
|
||||
{
|
||||
allGood = false;
|
||||
}
|
||||
}
|
||||
else if (layerConfig.type() == LLSD::TypeArray)
|
||||
{
|
||||
return validateRayleighLayers(layerConfig);
|
||||
return validateRayleighLayers(layerConfig, flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
return LLSettingsBase::settingValidation(value, rayleighValidations);
|
||||
return LLSettingsBase::settingValidation(value, rayleighValidations, flags);
|
||||
}
|
||||
}
|
||||
return allGood;
|
||||
}
|
||||
llassert(value.type() == LLSD::TypeMap);
|
||||
LLSD result = LLSettingsBase::settingValidation(value, rayleighValidations);
|
||||
LLSD result = LLSettingsBase::settingValidation(value, rayleighValidations, flags);
|
||||
if (result["errors"].size() > 0)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Rayleigh Config Validation errors: " << result["errors"] << LL_ENDL;
|
||||
|
|
@ -315,7 +315,7 @@ bool validateRayleighLayers(LLSD &value)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool validateAbsorptionLayers(LLSD &value)
|
||||
bool validateAbsorptionLayers(LLSD &value, U32 flags)
|
||||
{
|
||||
LLSettingsBase::validation_list_t absorptionValidations = absorptionValidationList();
|
||||
if (value.isArray())
|
||||
|
|
@ -326,24 +326,24 @@ bool validateAbsorptionLayers(LLSD &value)
|
|||
LLSD& layerConfig = (*itf);
|
||||
if (layerConfig.type() == LLSD::TypeMap)
|
||||
{
|
||||
if (!validateAbsorptionLayers(layerConfig))
|
||||
if (!validateAbsorptionLayers(layerConfig, flags))
|
||||
{
|
||||
allGood = false;
|
||||
}
|
||||
}
|
||||
else if (layerConfig.type() == LLSD::TypeArray)
|
||||
{
|
||||
return validateAbsorptionLayers(layerConfig);
|
||||
return validateAbsorptionLayers(layerConfig, flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
return LLSettingsBase::settingValidation(value, absorptionValidations);
|
||||
return LLSettingsBase::settingValidation(value, absorptionValidations, flags);
|
||||
}
|
||||
}
|
||||
return allGood;
|
||||
}
|
||||
llassert(value.type() == LLSD::TypeMap);
|
||||
LLSD result = LLSettingsBase::settingValidation(value, absorptionValidations);
|
||||
LLSD result = LLSettingsBase::settingValidation(value, absorptionValidations, flags);
|
||||
if (result["errors"].size() > 0)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Absorption Config Validation errors: " << result["errors"] << LL_ENDL;
|
||||
|
|
@ -357,7 +357,7 @@ bool validateAbsorptionLayers(LLSD &value)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool validateMieLayers(LLSD &value)
|
||||
bool validateMieLayers(LLSD &value, U32 flags)
|
||||
{
|
||||
LLSettingsBase::validation_list_t mieValidations = mieValidationList();
|
||||
if (value.isArray())
|
||||
|
|
@ -368,23 +368,23 @@ bool validateMieLayers(LLSD &value)
|
|||
LLSD& layerConfig = (*itf);
|
||||
if (layerConfig.type() == LLSD::TypeMap)
|
||||
{
|
||||
if (!validateMieLayers(layerConfig))
|
||||
if (!validateMieLayers(layerConfig, flags))
|
||||
{
|
||||
allGood = false;
|
||||
}
|
||||
}
|
||||
else if (layerConfig.type() == LLSD::TypeArray)
|
||||
{
|
||||
return validateMieLayers(layerConfig);
|
||||
return validateMieLayers(layerConfig, flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
return LLSettingsBase::settingValidation(value, mieValidations);
|
||||
return LLSettingsBase::settingValidation(value, mieValidations, flags);
|
||||
}
|
||||
}
|
||||
return allGood;
|
||||
}
|
||||
LLSD result = LLSettingsBase::settingValidation(value, mieValidations);
|
||||
LLSD result = LLSettingsBase::settingValidation(value, mieValidations, flags);
|
||||
if (result["errors"].size() > 0)
|
||||
{
|
||||
LL_WARNS("SETTINGS") << "Mie Config Validation errors: " << result["errors"] << LL_ENDL;
|
||||
|
|
@ -563,80 +563,80 @@ LLSettingsSky::validation_list_t LLSettingsSky::validationList()
|
|||
validation.push_back(Validator(SETTING_HALO_TEXTUREID, false, LLSD::TypeUUID));
|
||||
|
||||
validation.push_back(Validator(SETTING_CLOUD_COLOR, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
|
||||
LLSD(LLSDArray(1.0f)(1.0f)(1.0f)("*")))));
|
||||
validation.push_back(Validator(SETTING_CLOUD_POS_DENSITY1, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
|
||||
LLSD(LLSDArray(1.0f)(1.0f)(3.0f)("*")))));
|
||||
validation.push_back(Validator(SETTING_CLOUD_POS_DENSITY2, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
|
||||
LLSD(LLSDArray(1.0f)(1.0f)(1.0f)("*")))));
|
||||
validation.push_back(Validator(SETTING_CLOUD_SCALE, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.001f)(3.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.001f)(3.0f)))));
|
||||
validation.push_back(Validator(SETTING_CLOUD_SCROLL_RATE, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(-50.0f)(-50.0f)),
|
||||
LLSD(LLSDArray(50.0f)(50.0f)))));
|
||||
validation.push_back(Validator(SETTING_CLOUD_SHADOW, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
validation.push_back(Validator(SETTING_CLOUD_TEXTUREID, false, LLSD::TypeUUID));
|
||||
validation.push_back(Validator(SETTING_CLOUD_VARIANCE, false, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
|
||||
validation.push_back(Validator(SETTING_DOME_OFFSET, false, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
validation.push_back(Validator(SETTING_DOME_RADIUS, false, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(1000.0f)(2000.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(1000.0f)(2000.0f)))));
|
||||
validation.push_back(Validator(SETTING_GAMMA, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(20.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(20.0f)))));
|
||||
validation.push_back(Validator(SETTING_GLOW, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.2f)("*")(-10.0f)("*")),
|
||||
LLSD(LLSDArray(40.0f)("*")(10.0f)("*")))));
|
||||
|
||||
validation.push_back(Validator(SETTING_MAX_Y, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(10000.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(10000.0f)))));
|
||||
validation.push_back(Validator(SETTING_MOON_ROTATION, true, LLSD::TypeArray, &Validator::verifyQuaternionNormal));
|
||||
validation.push_back(Validator(SETTING_MOON_SCALE, false, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.25f)(20.0f))), LLSD::Real(1.0)));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.25f)(20.0f))), LLSD::Real(1.0)));
|
||||
validation.push_back(Validator(SETTING_MOON_TEXTUREID, false, LLSD::TypeUUID));
|
||||
validation.push_back(Validator(SETTING_MOON_BRIGHTNESS, false, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
|
||||
validation.push_back(Validator(SETTING_STAR_BRIGHTNESS, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(500.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(500.0f)))));
|
||||
validation.push_back(Validator(SETTING_SUNLIGHT_COLOR, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
|
||||
LLSD(LLSDArray(3.0f)(3.0f)(3.0f)("*")))));
|
||||
validation.push_back(Validator(SETTING_SUN_ROTATION, true, LLSD::TypeArray, &Validator::verifyQuaternionNormal));
|
||||
validation.push_back(Validator(SETTING_SUN_SCALE, false, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.25f)(20.0f))), LLSD::Real(1.0)));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.25f)(20.0f))), LLSD::Real(1.0)));
|
||||
validation.push_back(Validator(SETTING_SUN_TEXTUREID, false, LLSD::TypeUUID));
|
||||
|
||||
validation.push_back(Validator(SETTING_PLANET_RADIUS, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(1000.0f)(32768.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(1000.0f)(32768.0f)))));
|
||||
|
||||
validation.push_back(Validator(SETTING_SKY_BOTTOM_RADIUS, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(1000.0f)(32768.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(1000.0f)(32768.0f)))));
|
||||
|
||||
validation.push_back(Validator(SETTING_SKY_TOP_RADIUS, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(1000.0f)(32768.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(1000.0f)(32768.0f)))));
|
||||
|
||||
validation.push_back(Validator(SETTING_SUN_ARC_RADIANS, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(0.1f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(0.1f)))));
|
||||
|
||||
validation.push_back(Validator(SETTING_SKY_MOISTURE_LEVEL, false, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
|
||||
validation.push_back(Validator(SETTING_SKY_DROPLET_RADIUS, false, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(5.0f)(1000.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(5.0f)(1000.0f)))));
|
||||
|
||||
validation.push_back(Validator(SETTING_SKY_ICE_LEVEL, false, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
|
||||
validation.push_back(Validator(SETTING_RAYLEIGH_CONFIG, true, LLSD::TypeArray, &validateRayleighLayers));
|
||||
validation.push_back(Validator(SETTING_ABSORPTION_CONFIG, true, LLSD::TypeArray, &validateAbsorptionLayers));
|
||||
|
|
|
|||
|
|
@ -236,34 +236,34 @@ LLSettingsWater::validation_list_t LLSettingsWater::validationList()
|
|||
// in deeply nested arrays like this [[[[[[[[[[v1,v2,v3]]]]]]]]]]
|
||||
|
||||
validation.push_back(Validator(SETTING_BLUR_MULTIPLIER, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(-0.5f)(0.5f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(-0.5f)(0.5f)))));
|
||||
validation.push_back(Validator(SETTING_FOG_COLOR, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)(1.0f)),
|
||||
LLSD(LLSDArray(1.0f)(1.0f)(1.0f)(1.0f)))));
|
||||
validation.push_back(Validator(SETTING_FOG_DENSITY, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(-10.0f)(10.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(-10.0f)(10.0f)))));
|
||||
validation.push_back(Validator(SETTING_FOG_MOD, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(20.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(20.0f)))));
|
||||
validation.push_back(Validator(SETTING_FRESNEL_OFFSET, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
validation.push_back(Validator(SETTING_FRESNEL_SCALE, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(1.0f)))));
|
||||
validation.push_back(Validator(SETTING_NORMAL_MAP, true, LLSD::TypeUUID));
|
||||
validation.push_back(Validator(SETTING_NORMAL_SCALE, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)),
|
||||
LLSD(LLSDArray(10.0f)(10.0f)(10.0f)))));
|
||||
validation.push_back(Validator(SETTING_SCALE_ABOVE, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(3.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(3.0f)))));
|
||||
validation.push_back(Validator(SETTING_SCALE_BELOW, true, LLSD::TypeReal,
|
||||
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(3.0f)))));
|
||||
boost::bind(&Validator::verifyFloatRange, _1, _2, LLSD(LLSDArray(0.0f)(3.0f)))));
|
||||
validation.push_back(Validator(SETTING_WAVE1_DIR, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(-20.0f)(-20.0f)),
|
||||
LLSD(LLSDArray(20.0f)(20.0f)))));
|
||||
validation.push_back(Validator(SETTING_WAVE2_DIR, true, LLSD::TypeArray,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1,
|
||||
boost::bind(&Validator::verifyVectorMinMax, _1, _2,
|
||||
LLSD(LLSDArray(-20.0f)(-20.0f)),
|
||||
LLSD(LLSDArray(20.0f)(20.0f)))));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -443,12 +443,11 @@ LLCircuit::LLCircuit(const F32Seconds circuit_heartbeat_interval, const F32Secon
|
|||
|
||||
LLCircuit::~LLCircuit()
|
||||
{
|
||||
// delete pointers in the map.
|
||||
std::for_each(mCircuitData.begin(),
|
||||
mCircuitData.end(),
|
||||
llcompose1(
|
||||
DeletePointerFunctor<LLCircuitData>(),
|
||||
llselect2nd<circuit_data_map::value_type>()));
|
||||
// delete pointers in the map.
|
||||
for (auto circ_pair : mCircuitData)
|
||||
{
|
||||
delete circ_pair.second;
|
||||
}
|
||||
}
|
||||
|
||||
LLCircuitData *LLCircuit::addCircuitData(const LLHost &host, TPACKETID in_id)
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ void LLDispatcher::copyAllHandlerNames(keys_t& names) const
|
|||
mHandlers.begin(),
|
||||
mHandlers.end(),
|
||||
std::back_insert_iterator<keys_t>(names),
|
||||
llselect1st<dispatch_map_t::value_type>());
|
||||
[](const dispatch_map_t::value_type& pair){ return pair.first; });
|
||||
}
|
||||
|
||||
bool LLDispatcher::dispatch(
|
||||
|
|
|
|||
|
|
@ -32,18 +32,8 @@
|
|||
#include "llframetimer.h"
|
||||
|
||||
// This is used for the stl search_n function.
|
||||
#if _MSC_VER >= 1500 // VC9 has a bug in search_n
|
||||
struct eq_message_throttle_entry : public std::binary_function< LLMessageThrottleEntry, LLMessageThrottleEntry, bool >
|
||||
{
|
||||
bool operator()(const LLMessageThrottleEntry& a, const LLMessageThrottleEntry& b) const
|
||||
{
|
||||
return a.getHash() == b.getHash();
|
||||
}
|
||||
};
|
||||
#else
|
||||
bool eq_message_throttle_entry(LLMessageThrottleEntry a, LLMessageThrottleEntry b)
|
||||
{ return a.getHash() == b.getHash(); }
|
||||
#endif
|
||||
|
||||
const U64 SEC_TO_USEC = 1000000;
|
||||
|
||||
|
|
@ -118,14 +108,8 @@ BOOL LLMessageThrottle::addViewerAlert(const LLUUID& to, const std::string& mesg
|
|||
LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime());
|
||||
|
||||
// Check if this message is already in the list.
|
||||
#if _MSC_VER >= 1500 // VC9 has a bug in search_n
|
||||
// SJB: This *should* work but has not been tested yet *TODO: Test!
|
||||
message_list_iterator_t found = std::find_if(message_list->begin(), message_list->end(),
|
||||
std::bind2nd(eq_message_throttle_entry(), entry));
|
||||
#else
|
||||
message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(),
|
||||
1, entry, eq_message_throttle_entry);
|
||||
#endif
|
||||
if (found == message_list->end())
|
||||
{
|
||||
// This message was not found. Add it to the list.
|
||||
|
|
@ -152,14 +136,8 @@ BOOL LLMessageThrottle::addAgentAlert(const LLUUID& agent, const LLUUID& task, c
|
|||
LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime());
|
||||
|
||||
// Check if this message is already in the list.
|
||||
#if _MSC_VER >= 1500 // VC9 has a bug in search_n
|
||||
// SJB: This *should* work but has not been tested yet *TODO: Test!
|
||||
message_list_iterator_t found = std::find_if(message_list->begin(), message_list->end(),
|
||||
std::bind2nd(eq_message_throttle_entry(), entry));
|
||||
#else
|
||||
message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(),
|
||||
1, entry, eq_message_throttle_entry);
|
||||
#endif
|
||||
|
||||
if (found == message_list->end())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,8 +27,7 @@
|
|||
#include "linden_common.h"
|
||||
#include "llmediaentry.h"
|
||||
#include "lllslconstants.h"
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
#include "llregex.h"
|
||||
|
||||
// LLSD key defines
|
||||
// DO NOT REORDER OR REMOVE THESE!
|
||||
|
|
@ -456,7 +455,7 @@ static bool pattern_match(const std::string &candidate_str, const std::string &p
|
|||
|
||||
// case-insensitive matching:
|
||||
boost::regex regexp(expression, boost::regex::perl|boost::regex::icase);
|
||||
return boost::regex_match(candidate_str, regexp);
|
||||
return ll_regex_match(candidate_str, regexp);
|
||||
}
|
||||
|
||||
bool LLMediaEntry::checkCandidateUrl(const std::string& url) const
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ public:
|
|||
*
|
||||
* By default returns false.
|
||||
*/
|
||||
virtual bool overlapsScreenChannel() { return mOverlapsScreenChannel && getVisible() && isDocked(); }
|
||||
virtual bool overlapsScreenChannel() const { return mOverlapsScreenChannel && getVisible() && isDocked(); }
|
||||
virtual void setOverlapsScreenChannel(bool overlaps) { mOverlapsScreenChannel = overlaps; }
|
||||
|
||||
bool getUniqueDocking() { return mUniqueDocking; }
|
||||
|
|
@ -131,7 +131,7 @@ protected:
|
|||
boost::function<BOOL ()> mIsDockedStateForcedCallback;
|
||||
|
||||
//private: // <FS:Ansariel> Make mDockControl accessible from children because of FIRE-16803
|
||||
std::auto_ptr<LLDockControl> mDockControl;
|
||||
std::unique_ptr<LLDockControl> mDockControl;
|
||||
private: // <FS:Ansariel> Make mDockControl accessible from children because of FIRE-16803
|
||||
LLUIImagePtr mDockTongue;
|
||||
static LLHandle<LLFloater> sInstanceHandle;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llcachename.h"
|
||||
#include "llregex.h"
|
||||
#include "lltrans.h"
|
||||
#include "lluicolortable.h"
|
||||
#include "message.h"
|
||||
|
|
@ -1643,7 +1644,7 @@ std::string LLUrlEntryIcon::getIcon(const std::string &url)
|
|||
// Grep icon info between <icon>...</icon> tags
|
||||
// matches[1] contains the icon name/path
|
||||
boost::match_results<std::string::const_iterator> matches;
|
||||
mIcon = (boost::regex_match(url, matches, mPattern) && matches[1].matched)
|
||||
mIcon = (ll_regex_match(url, matches, mPattern) && matches[1].matched)
|
||||
? matches[1]
|
||||
: LLStringUtil::null;
|
||||
LLStringUtil::trim(mIcon);
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@
|
|||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
#include "llregex.h"
|
||||
#include "llurlregistry.h"
|
||||
#include "lluriparser.h"
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/algorithm/string/find.hpp> //for boost::ifind_first -KC
|
||||
|
||||
// default dummy callback that ignores any label updates from the server
|
||||
|
|
@ -127,15 +127,7 @@ static bool matchRegex(const char *text, boost::regex regex, U32 &start, U32 &en
|
|||
boost::cmatch result;
|
||||
bool found;
|
||||
|
||||
// regex_search can potentially throw an exception, so check for it
|
||||
try
|
||||
{
|
||||
found = boost::regex_search(text, result, regex);
|
||||
}
|
||||
catch (std::runtime_error &)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
found = ll_regex_search(text, result, regex);
|
||||
|
||||
if (! found)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -504,7 +504,8 @@ attributedStringInfo getSegments(NSAttributedString *str)
|
|||
// e.g. OS Window for upload something or Input Window...
|
||||
// mModifiers instance variable is for insertText: or insertText:replacementRange: (by Pell Smit)
|
||||
mModifiers = [theEvent modifierFlags];
|
||||
bool acceptsText = mHasMarkedText ? false : callKeyDown(&eventData, keycode, mModifiers);
|
||||
|
||||
bool acceptsText = mHasMarkedText ? false : callKeyDown(&eventData, keycode, mModifiers, [[theEvent characters] characterAtIndex:0]);
|
||||
unichar ch;
|
||||
if (acceptsText &&
|
||||
!mMarkedTextAllowed &&
|
||||
|
|
@ -547,7 +548,7 @@ attributedStringInfo getSegments(NSAttributedString *str)
|
|||
if (mModifiers & mask)
|
||||
{
|
||||
eventData.mKeyEvent = NativeKeyEventData::KEYDOWN;
|
||||
callKeyDown(&eventData, [theEvent keyCode], 0);
|
||||
callKeyDown(&eventData, [theEvent keyCode], 0, [[theEvent characters] characterAtIndex:0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ void setupInputWindow(NSWindowRef window, GLViewRef view);
|
|||
// These are all implemented in llwindowmacosx.cpp.
|
||||
// This is largely for easier interop between Obj-C and C++ (at least in the viewer's case due to the BOOL vs. BOOL conflict)
|
||||
bool callKeyUp(NSKeyEventRef event, unsigned short key, unsigned int mask);
|
||||
bool callKeyDown(NSKeyEventRef event, unsigned short key, unsigned int mask);
|
||||
bool callKeyDown(NSKeyEventRef event, unsigned short key, unsigned int mask, wchar_t character);
|
||||
void callResetKeys();
|
||||
bool callUnicodeCallback(wchar_t character, unsigned int mask);
|
||||
void callRightMouseDown(float *pos, unsigned int mask);
|
||||
|
|
|
|||
|
|
@ -217,8 +217,17 @@ bool callKeyUp(NSKeyEventRef event, unsigned short key, unsigned int mask)
|
|||
return retVal;
|
||||
}
|
||||
|
||||
bool callKeyDown(NSKeyEventRef event, unsigned short key, unsigned int mask)
|
||||
bool callKeyDown(NSKeyEventRef event, unsigned short key, unsigned int mask, wchar_t character)
|
||||
{
|
||||
if((key == gKeyboard->inverseTranslateKey('Z')) && (character == 'y'))
|
||||
{
|
||||
key = gKeyboard->inverseTranslateKey('Y');
|
||||
}
|
||||
else if ((key == gKeyboard->inverseTranslateKey('Y')) && (character == 'z'))
|
||||
{
|
||||
key = gKeyboard->inverseTranslateKey('Z');
|
||||
}
|
||||
|
||||
mRawKeyEvent = event;
|
||||
bool retVal = gKeyboard->handleKeyDown(key, mask);
|
||||
mRawKeyEvent = NULL;
|
||||
|
|
|
|||
|
|
@ -3187,10 +3187,11 @@
|
|||
<key>Value</key>
|
||||
<real>1.0</real>
|
||||
</map>
|
||||
<key>CameraPreset</key> <!-- deprecated (see SL-12429) -->
|
||||
<key>CameraPreset</key>
|
||||
<!-- deprecated (see SL-12429) -->
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Preset camera position - view (0 - rear, 1 - front, 2 - group)</string>
|
||||
<string>(Deprecated) Preset camera position - view (0 - rear, 1 - front, 2 - group)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -4216,10 +4217,11 @@
|
|||
<key>Backup</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>DEPRECATED: DebugShowPrivateMem</key> <!-- deprecated (see MAINT-8091) -->
|
||||
<key>DebugShowPrivateMem</key>
|
||||
<!-- deprecated (see MAINT-8091) -->
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Show Private Mem Info</string>
|
||||
<string>(Deprecated) Show Private Mem Info</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -8191,7 +8193,7 @@
|
|||
<key>LoginSRVPump</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Name of the message pump that handles SRV request (deprecated)</string>
|
||||
<string>(Deprecated) Name of the message pump that handles SRV request)</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -9049,10 +9051,11 @@
|
|||
<key>Value</key>
|
||||
<real>600.0</real>
|
||||
</map>
|
||||
<key>MemoryPrivatePoolEnabled</key> <!-- deprecated (see MAINT-8091) -->
|
||||
<key>MemoryPrivatePoolEnabled</key>
|
||||
<!-- deprecated (see MAINT-8091) -->
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>DEPRECATED: Enable the private memory pool management</string>
|
||||
<string>(Deprecated) Enable the private memory pool management</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -9062,10 +9065,11 @@
|
|||
<key>Backup</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>MemoryPrivatePoolSize</key> <!-- deprecated (see MAINT-8091) -->
|
||||
<key>MemoryPrivatePoolSize</key>
|
||||
<!-- deprecated (see MAINT-8091) -->
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>DEPRECATED: Size of the private memory pool in MB (min. value is 256)</string>
|
||||
<string>(Deprecated) Size of the private memory pool in MB (min. value is 256)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -11130,7 +11134,7 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>QAModeEventHostPort</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>DEPRECATED: Port on which lleventhost should listen</string>
|
||||
<string>(Deprecated) Port on which lleventhost should listen</string>
|
||||
<key>Persist</key>
|
||||
<integer>0</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -17599,10 +17603,11 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<string>Default</string>
|
||||
</map>
|
||||
<key>UseExternalBrowser</key> <!-- deprecated (see MAINT-4127) -->
|
||||
<key>UseExternalBrowser</key>
|
||||
<!-- deprecated (see MAINT-4127) -->
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Use default browser when opening web pages instead of in-world browser.</string>
|
||||
<string>(Deprecated) Use default browser when opening web pages instead of in-world browser.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -18109,6 +18114,7 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<integer>0</integer>
|
||||
</map>
|
||||
<key>VoiceCallsRejectGroup</key>
|
||||
<!-- deprecated (see SL-12871) -->
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Silently reject all incoming group voice calls.</string>
|
||||
|
|
|
|||
|
|
@ -282,20 +282,13 @@ void LLAppCoreHttp::init()
|
|||
<< LL_ENDL;
|
||||
}
|
||||
|
||||
// Signal for global pipelining preference from settings
|
||||
// Global pipelining setting
|
||||
static const std::string http_pipelining("HttpPipelining");
|
||||
if (gSavedSettings.controlExists(http_pipelining))
|
||||
{
|
||||
LLPointer<LLControlVariable> cntrl_ptr = gSavedSettings.getControl(http_pipelining);
|
||||
if (cntrl_ptr.isNull())
|
||||
{
|
||||
LL_WARNS("Init") << "Unable to set signal on global setting '" << http_pipelining
|
||||
<< "'" << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
mPipelinedSignal = cntrl_ptr->getCommitSignal()->connect(boost::bind(&setting_changed));
|
||||
}
|
||||
// Default to true (in ctor) if absent.
|
||||
mPipelined = gSavedSettings.getBOOL(http_pipelining);
|
||||
LL_INFOS("Init") << "HTTP Pipelining " << (mPipelined ? "enabled" : "disabled") << "!" << LL_ENDL;
|
||||
}
|
||||
|
||||
// Register signals for settings and state changes
|
||||
|
|
@ -409,21 +402,6 @@ void LLAppCoreHttp::refreshSettings(bool initial)
|
|||
{
|
||||
LLCore::HttpStatus status;
|
||||
|
||||
// Global pipelining setting
|
||||
bool pipeline_changed(false);
|
||||
static const std::string http_pipelining("HttpPipelining");
|
||||
if (gSavedSettings.controlExists(http_pipelining))
|
||||
{
|
||||
// Default to true (in ctor) if absent.
|
||||
bool pipelined(gSavedSettings.getBOOL(http_pipelining));
|
||||
if (pipelined != mPipelined)
|
||||
{
|
||||
mPipelined = pipelined;
|
||||
pipeline_changed = true;
|
||||
}
|
||||
LL_INFOS("Init") << "HTTP Pipelining " << (mPipelined ? "enabled" : "disabled") << "!" << LL_ENDL;
|
||||
}
|
||||
|
||||
for (int i(0); i < LL_ARRAY_SIZE(init_data); ++i)
|
||||
{
|
||||
const EAppPolicy app_policy(static_cast<EAppPolicy>(i));
|
||||
|
|
@ -452,7 +430,7 @@ void LLAppCoreHttp::refreshSettings(bool initial)
|
|||
// Init- or run-time settings. Must use the queued request API.
|
||||
|
||||
// Pipelining changes
|
||||
if (initial || pipeline_changed)
|
||||
if (initial)
|
||||
{
|
||||
const bool to_pipeline(mPipelined && init_data[i].mPipelined);
|
||||
if (to_pipeline != mHttpClasses[app_policy].mPipelined)
|
||||
|
|
@ -495,7 +473,7 @@ void LLAppCoreHttp::refreshSettings(bool initial)
|
|||
}
|
||||
}
|
||||
|
||||
if (initial || setting != mHttpClasses[app_policy].mConnLimit || pipeline_changed)
|
||||
if (initial || setting != mHttpClasses[app_policy].mConnLimit)
|
||||
{
|
||||
// Set it and report. Strategies depend on pipelining:
|
||||
//
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ private:
|
|||
|
||||
LLUUID mCOFImageID;
|
||||
|
||||
std::auto_ptr<LLOutfitUnLockTimer> mUnlockOutfitTimer;
|
||||
std::unique_ptr<LLOutfitUnLockTimer> mUnlockOutfitTimer;
|
||||
|
||||
// Set of temp attachment UUIDs that should be removed
|
||||
typedef std::set<LLUUID> doomed_temp_attachments_t;
|
||||
|
|
|
|||
|
|
@ -1294,19 +1294,27 @@ bool LLAppViewer::init()
|
|||
if (count > 0 && v1 <= 10)
|
||||
{
|
||||
LL_INFOS("AppInit") << "Detected obsolete intel driver: " << driver << LL_ENDL;
|
||||
LLUIString details = LLNotifications::instance().getGlobalString("UnsupportedIntelDriver");
|
||||
std::string gpu_name = ll_safe_string((const char *)glGetString(GL_RENDERER));
|
||||
details.setArg("[VERSION]", driver);
|
||||
details.setArg("[GPUNAME]", gpu_name);
|
||||
S32 button = OSMessageBox(details.getString(),
|
||||
LLStringUtil::null,
|
||||
OSMB_YESNO);
|
||||
if (OSBTN_YES == button && gViewerWindow)
|
||||
|
||||
if (!gViewerWindow->getInitAlert().empty() // graphic initialization crashed on last run
|
||||
|| LLVersionInfo::getInstance()->getChannelAndVersion() != gLastRunVersion // viewer was updated
|
||||
|| mNumSessions % 20 == 0 //periodically remind user to update driver
|
||||
)
|
||||
{
|
||||
std::string url = LLWeb::escapeURL(LLTrans::getString("IntelDriverPage"));
|
||||
if (gViewerWindow->getWindow())
|
||||
LLUIString details = LLNotifications::instance().getGlobalString("UnsupportedIntelDriver");
|
||||
std::string gpu_name = ll_safe_string((const char *)glGetString(GL_RENDERER));
|
||||
LL_INFOS("AppInit") << "Notifying user about obsolete intel driver for " << gpu_name << LL_ENDL;
|
||||
details.setArg("[VERSION]", driver);
|
||||
details.setArg("[GPUNAME]", gpu_name);
|
||||
S32 button = OSMessageBox(details.getString(),
|
||||
LLStringUtil::null,
|
||||
OSMB_YESNO);
|
||||
if (OSBTN_YES == button && gViewerWindow)
|
||||
{
|
||||
gViewerWindow->getWindow()->spawnWebBrowser(url, false);
|
||||
std::string url = LLWeb::escapeURL(LLTrans::getString("IntelDriverPage"));
|
||||
if (gViewerWindow->getWindow())
|
||||
{
|
||||
gViewerWindow->getWindow()->spawnWebBrowser(url, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3672,6 +3680,15 @@ bool LLAppViewer::initWindow()
|
|||
|
||||
void LLAppViewer::writeDebugInfo(bool isStatic)
|
||||
{
|
||||
#if LL_WINDOWS && LL_BUGSPLAT
|
||||
// bugsplat does not create dump folder and debug logs are written directly
|
||||
// to logs folder, so it conflicts with main instance
|
||||
if (mSecondInstance)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
//Try to do the minimum when writing data during a crash.
|
||||
std::string* debug_filename;
|
||||
debug_filename = ( isStatic
|
||||
|
|
@ -4174,7 +4191,7 @@ void LLAppViewer::writeSystemInfo()
|
|||
gDebugInfo["Dynamic"] = LLSD::emptyMap();
|
||||
|
||||
// <FS:ND> we don't want this (otherwise set filename to Firestorm.old/log
|
||||
// #if LL_WINDOWS
|
||||
// #if LL_WINDOWS && !LL_BUGSPLAT
|
||||
// gDebugInfo["SLLog"] = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,"SecondLife.log");
|
||||
// #else
|
||||
// //Not ideal but sufficient for good reporting.
|
||||
|
|
@ -4727,10 +4744,13 @@ void LLAppViewer::removeMarkerFiles()
|
|||
|
||||
void LLAppViewer::removeDumpDir()
|
||||
{
|
||||
//Call this routine only on clean exit. Crash reporter will clean up
|
||||
//its locking table for us.
|
||||
std::string dump_dir = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "");
|
||||
gDirUtilp->deleteDirAndContents(dump_dir);
|
||||
if (gDirUtilp->dumpDirExists())
|
||||
{
|
||||
//Call this routine only on clean exit. Crash reporter will clean up
|
||||
//its locking table for us.
|
||||
std::string dump_dir = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "");
|
||||
gDirUtilp->deleteDirAndContents(dump_dir);
|
||||
}
|
||||
|
||||
if (mSecondInstance && !isError())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -141,24 +141,25 @@ namespace
|
|||
::CopyFileW(FS::LogfileIn.c_str(), FS::LogfileOut.c_str(), FALSE);
|
||||
// </FS:ND>
|
||||
|
||||
// send the main viewer log file
|
||||
// widen to wstring, convert to __wchar_t, then pass c_str()
|
||||
|
||||
// <FS:ND> We don't send log files
|
||||
// sBugSplatSender->sendAdditionalFile(
|
||||
// WCSTR(LLError::logFileName()));
|
||||
// </FS:ND>
|
||||
// second instance does not have own log files
|
||||
if (!LLAppViewer::instance()->isSecondInstance())
|
||||
{
|
||||
// send the main viewer log file
|
||||
// widen to wstring, convert to __wchar_t, then pass c_str()
|
||||
// <FS:ND> We don't send log files
|
||||
// sBugSplatSender->sendAdditionalFile(
|
||||
// WCSTR(LLError::logFileName()));
|
||||
// </FS:ND>
|
||||
|
||||
sBugSplatSender->sendAdditionalFile(
|
||||
WCSTR(*LLAppViewer::instance()->getStaticDebugFile()));
|
||||
}
|
||||
|
||||
// sBugSplatSender->sendAdditionalFile(
|
||||
// WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings.xml")));
|
||||
|
||||
if (gCrashSettings.getBOOL("CrashSubmitSettings"))
|
||||
sBugSplatSender->sendAdditionalFile( WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings.xml")));
|
||||
|
||||
|
||||
sBugSplatSender->sendAdditionalFile(
|
||||
WCSTR(*LLAppViewer::instance()->getStaticDebugFile()));
|
||||
|
||||
// We don't have an email address for any user. Hijack this
|
||||
// metadata field for the platform identifier.
|
||||
// sBugSplatSender->setDefaultUserEmail(
|
||||
|
|
|
|||
|
|
@ -2209,7 +2209,15 @@ void LLEnvironment::coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInf
|
|||
LL_WARNS("ENVIRONMENT") << "Couldn't update Windlight settings for " << ((parcel_id == INVALID_PARCEL_ID) ? ("region!") : ("parcel!")) << LL_ENDL;
|
||||
|
||||
notify = LLSD::emptyMap();
|
||||
notify["FAIL_REASON"] = result["message"].asString();
|
||||
std::string reason = result["message"].asString();
|
||||
if (reason.empty())
|
||||
{
|
||||
notify["FAIL_REASON"] = status.toString();
|
||||
}
|
||||
else
|
||||
{
|
||||
notify["FAIL_REASON"] = reason;
|
||||
}
|
||||
}
|
||||
else if (LLApp::isExiting())
|
||||
{
|
||||
|
|
@ -2275,7 +2283,15 @@ void LLEnvironment::coroResetEnvironment(S32 parcel_id, S32 track_no, environmen
|
|||
LL_WARNS("ENVIRONMENT") << "Couldn't reset Windlight settings in " << ((parcel_id == INVALID_PARCEL_ID) ? ("region!") : ("parcel!")) << LL_ENDL;
|
||||
|
||||
notify = LLSD::emptyMap();
|
||||
notify["FAIL_REASON"] = result["message"].asString();
|
||||
std::string reason = result["message"].asString();
|
||||
if (reason.empty())
|
||||
{
|
||||
notify["FAIL_REASON"] = status.toString();
|
||||
}
|
||||
else
|
||||
{
|
||||
notify["FAIL_REASON"] = reason;
|
||||
}
|
||||
}
|
||||
else if (LLApp::isExiting())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -149,10 +149,6 @@ std::string LLExperienceLog::getPermissionString( const LLSD& message, const std
|
|||
{
|
||||
buf.str(entry);
|
||||
}
|
||||
else
|
||||
{
|
||||
buf.str();
|
||||
}
|
||||
}
|
||||
|
||||
if(buf.str().empty())
|
||||
|
|
|
|||
|
|
@ -994,7 +994,7 @@ void LLFavoritesBarCtrl::updateButtons(bool force_update)
|
|||
{
|
||||
//find last visible child to get the rightest button offset
|
||||
child_list_const_reverse_iter_t last_visible_it = std::find_if(childs->rbegin(), childs->rend(),
|
||||
std::mem_fun(&LLView::getVisible));
|
||||
[](child_list_t::value_type child){ return child->getVisible(); });
|
||||
if(last_visible_it != childs->rend())
|
||||
{
|
||||
last_right_edge = (*last_visible_it)->getRect().mRight;
|
||||
|
|
|
|||
|
|
@ -1005,7 +1005,8 @@ void LLFloaterBuyLandUI::draw()
|
|||
// virtual
|
||||
BOOL LLFloaterBuyLandUI::canClose()
|
||||
{
|
||||
bool can_close = (mTransaction ? FALSE : TRUE) && mCurrency.canCancel();
|
||||
// mTransactionType check for pre-buy estimation stage and mCurrency to allow exit after transaction
|
||||
bool can_close = !mTransaction && (mTransactionType != TransactionBuy || mCurrency.canCancel());
|
||||
if (!can_close)
|
||||
{
|
||||
// explain to user why they can't do this, see DEV-9605
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
#include "llwindow.h"
|
||||
|
||||
#include "llnotificationsutil.h" // <FS:Zi> Add float LSL color entry widgets
|
||||
#include <boost/algorithm/string_regex.hpp>
|
||||
#include "llregex.h"
|
||||
|
||||
// System includes
|
||||
#include <sstream>
|
||||
|
|
@ -773,7 +773,7 @@ void LLFloaterColorPicker::onTextEntryChanged ( LLUICtrl* ctrl )
|
|||
|
||||
std::string reg_ex("[[:xdigit:]]{6}");
|
||||
boost::regex pattern(reg_ex.c_str());
|
||||
if (!boost::regex_match(hex_string, pattern))
|
||||
if (!ll_regex_match(hex_string, pattern))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -719,9 +719,7 @@ void LLFloaterRegionInfo::refreshFromRegion(LLViewerRegion* region)
|
|||
std::for_each(
|
||||
mInfoPanels.begin(),
|
||||
mInfoPanels.end(),
|
||||
llbind2nd(
|
||||
std::mem_fun(&LLPanelRegionInfo::refreshFromRegion),
|
||||
region));
|
||||
[region](info_panels_t::value_type panel){ panel->refreshFromRegion(region); });
|
||||
mEnvironmentPanel->refreshFromRegion(region);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,19 +34,17 @@
|
|||
#include "llcombobox.h"
|
||||
#include "llfloater.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llregex.h"
|
||||
#include "lluictrl.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
||||
// System libraries
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
// Extract from strings of the form "<width> x <height>", e.g. "640 x 480".
|
||||
bool extractWindowSizeFromString(const std::string& instr, U32 *width, U32 *height)
|
||||
{
|
||||
boost::cmatch what;
|
||||
// matches (any number)(any non-number)(any number)
|
||||
const boost::regex expression("([0-9]+)[^0-9]+([0-9]+)");
|
||||
if (boost::regex_match(instr.c_str(), what, expression))
|
||||
if (ll_regex_match(instr.c_str(), what, expression))
|
||||
{
|
||||
*width = atoi(what[1].first);
|
||||
*height = atoi(what[2].first);
|
||||
|
|
|
|||
|
|
@ -768,7 +768,7 @@ S32 LLGestureMgr::getPlayingCount() const
|
|||
}
|
||||
|
||||
|
||||
struct IsGesturePlaying : public std::unary_function<LLMultiGesture*, bool>
|
||||
struct IsGesturePlaying
|
||||
{
|
||||
bool operator()(const LLMultiGesture* gesture) const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
#include "llnotificationsutil.h"
|
||||
#include "llnotificationmanager.h"
|
||||
#include "llpanelgroup.h"
|
||||
#include "llregex.h"
|
||||
#include "llregionhandle.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "llslurl.h"
|
||||
|
|
@ -58,7 +59,6 @@
|
|||
#include "llviewerregion.h"
|
||||
#include "llvoavatarself.h"
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
#include "boost/lexical_cast.hpp"
|
||||
|
||||
// [RLVa:KB] - Checked: 2010-03-09 (RLVa-1.2.0a)
|
||||
|
|
@ -146,7 +146,7 @@ static std::string clean_name_from_task_im(const std::string& msg,
|
|||
boost::smatch match;
|
||||
static const boost::regex returned_exp(
|
||||
"(.*been returned to your inventory lost and found folder by )(.+)( (from|near).*)");
|
||||
if (boost::regex_match(msg, match, returned_exp))
|
||||
if (ll_regex_match(msg, match, returned_exp))
|
||||
{
|
||||
// match objects are 1-based for groups
|
||||
std::string final = match[1].str();
|
||||
|
|
|
|||
|
|
@ -36,13 +36,14 @@
|
|||
#include "llinventorymodelbackgroundfetch.h"
|
||||
#include "llinventoryfunctions.h"
|
||||
#include "llmarketplacefunctions.h"
|
||||
#include "llregex.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llfolderview.h"
|
||||
#include "llinventorybridge.h"
|
||||
#include "llviewerfoldertype.h"
|
||||
#include "llradiogroup.h"
|
||||
#include "llstartup.h"
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
// linden library includes
|
||||
#include "llclipboard.h"
|
||||
#include "lltrans.h"
|
||||
|
|
@ -931,7 +932,7 @@ void LLInventoryFilter::setFilterSubString(const std::string& string)
|
|||
boost::regex mPattern = boost::regex("\"\\s*([^<]*)?\\s*\"",
|
||||
boost::regex::perl | boost::regex::icase);
|
||||
boost::match_results<std::string::const_iterator> matches;
|
||||
mExactToken = (boost::regex_match(filter_sub_string_new, matches, mPattern) && matches[1].matched)
|
||||
mExactToken = (ll_regex_match(filter_sub_string_new, matches, mPattern) && matches[1].matched)
|
||||
? matches[1]
|
||||
: LLStringUtil::null;
|
||||
if ((old_token.empty() && !mExactToken.empty())
|
||||
|
|
|
|||
|
|
@ -520,7 +520,8 @@ const LLUUID LLInventoryModel::findCategoryUUIDForTypeInRoot(
|
|||
S32 count = cats->size();
|
||||
for(S32 i = 0; i < count; ++i)
|
||||
{
|
||||
if(cats->at(i)->getPreferredType() == preferred_type)
|
||||
LLViewerInventoryCategory* p_cat = cats->at(i);
|
||||
if(p_cat && p_cat->getPreferredType() == preferred_type)
|
||||
{
|
||||
const LLUUID& folder_id = cats->at(i)->getUUID();
|
||||
if (rv.isNull() || folder_id < rv)
|
||||
|
|
@ -1814,9 +1815,18 @@ void LLInventoryModel::notifyObservers(const LLUUID& transaction_id)
|
|||
iter = mObservers.upper_bound(observer);
|
||||
}
|
||||
|
||||
mModifyMask = LLInventoryObserver::NONE;
|
||||
// If there were any changes that arrived during notifyObservers,
|
||||
// shedule them for next loop
|
||||
mModifyMask = mModifyMaskBacklog;
|
||||
mChangedItemIDs.clear();
|
||||
mChangedItemIDs.insert(mChangedItemIDsBacklog.begin(), mChangedItemIDsBacklog.end());
|
||||
mAddedItemIDs.clear();
|
||||
mAddedItemIDs.insert(mAddedItemIDsBacklog.begin(), mAddedItemIDsBacklog.end());
|
||||
|
||||
mModifyMaskBacklog = LLInventoryObserver::NONE;
|
||||
mChangedItemIDsBacklog.clear();
|
||||
mAddedItemIDsBacklog.clear();
|
||||
|
||||
// [SL:KB] - Patch: UI-Notifications | Checked: Catznip-6.5
|
||||
mTransactionId.setNull();
|
||||
// [/SL:KB]
|
||||
|
|
@ -1831,8 +1841,10 @@ void LLInventoryModel::addChangedMask(U32 mask, const LLUUID& referent)
|
|||
{
|
||||
// Something marked an item for change within a call to notifyObservers
|
||||
// (which is in the process of processing the list of items marked for change).
|
||||
// This means the change may fail to be processed.
|
||||
LL_WARNS(LOG_INV) << "Adding changed mask within notify observers! Change will likely be lost." << LL_ENDL;
|
||||
// This means the change will have to be processed later.
|
||||
// It's preferable for this not to happen, but it's not an issue unless code
|
||||
// specifically wants to notifyObservers immediately (changes won't happen untill later)
|
||||
LL_WARNS(LOG_INV) << "Adding changed mask within notify observers! Change's processing will be performed on idle." << LL_ENDL;
|
||||
LLViewerInventoryItem *item = getItem(referent);
|
||||
if (item)
|
||||
{
|
||||
|
|
@ -1847,17 +1859,40 @@ void LLInventoryModel::addChangedMask(U32 mask, const LLUUID& referent)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
mModifyMask |= mask;
|
||||
|
||||
if (mIsNotifyObservers)
|
||||
{
|
||||
mModifyMaskBacklog |= mask;
|
||||
}
|
||||
else
|
||||
{
|
||||
mModifyMask |= mask;
|
||||
}
|
||||
|
||||
if (referent.notNull() && (mChangedItemIDs.find(referent) == mChangedItemIDs.end()))
|
||||
{
|
||||
mChangedItemIDs.insert(referent);
|
||||
if (mIsNotifyObservers)
|
||||
{
|
||||
mChangedItemIDsBacklog.insert(referent);
|
||||
}
|
||||
else
|
||||
{
|
||||
mChangedItemIDs.insert(referent);
|
||||
}
|
||||
|
||||
update_marketplace_category(referent, false);
|
||||
|
||||
if (mask & LLInventoryObserver::ADD)
|
||||
{
|
||||
mAddedItemIDs.insert(referent);
|
||||
}
|
||||
if (mask & LLInventoryObserver::ADD)
|
||||
{
|
||||
if (mIsNotifyObservers)
|
||||
{
|
||||
mAddedItemIDsBacklog.insert(referent);
|
||||
}
|
||||
else
|
||||
{
|
||||
mAddedItemIDs.insert(referent);
|
||||
}
|
||||
}
|
||||
|
||||
// Update all linked items. Starting with just LABEL because I'm
|
||||
// not sure what else might need to be accounted for this.
|
||||
|
|
@ -2880,7 +2915,10 @@ void LLInventoryModel::createCommonSystemCategories()
|
|||
gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE,true);
|
||||
gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD,true);
|
||||
gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS,true);
|
||||
gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT, true);
|
||||
gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK, true); // folder should exist before user tries to 'landmark this'
|
||||
gInventory.findCategoryUUIDForType(LLFolderType::FT_SETTINGS, true);
|
||||
gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, true);
|
||||
}
|
||||
|
||||
struct LLUUIDAndName
|
||||
|
|
@ -4179,17 +4217,18 @@ void LLInventoryModel::dumpInventory() const
|
|||
// returning an overall good/bad flag.
|
||||
bool LLInventoryModel::validate() const
|
||||
{
|
||||
bool valid = true;
|
||||
const S32 MAX_VERBOSE_ERRORS = 40; // too many errors can cause disconect or freeze
|
||||
S32 error_count = 0;
|
||||
|
||||
if (getRootFolderID().isNull())
|
||||
{
|
||||
LL_WARNS() << "no root folder id" << LL_ENDL;
|
||||
valid = false;
|
||||
error_count++;
|
||||
}
|
||||
if (getLibraryRootFolderID().isNull())
|
||||
{
|
||||
LL_WARNS() << "no root folder id" << LL_ENDL;
|
||||
valid = false;
|
||||
error_count++;
|
||||
}
|
||||
|
||||
if (mCategoryMap.size() + 1 != mParentChildCategoryTree.size())
|
||||
|
|
@ -4197,7 +4236,7 @@ bool LLInventoryModel::validate() const
|
|||
// ParentChild should be one larger because of the special entry for null uuid.
|
||||
LL_INFOS() << "unexpected sizes: cat map size " << mCategoryMap.size()
|
||||
<< " parent/child " << mParentChildCategoryTree.size() << LL_ENDL;
|
||||
valid = false;
|
||||
error_count++;
|
||||
}
|
||||
S32 cat_lock = 0;
|
||||
S32 item_lock = 0;
|
||||
|
|
@ -4209,23 +4248,32 @@ bool LLInventoryModel::validate() const
|
|||
const LLViewerInventoryCategory *cat = cit->second;
|
||||
if (!cat)
|
||||
{
|
||||
LL_WARNS() << "invalid cat" << LL_ENDL;
|
||||
valid = false;
|
||||
if (error_count < MAX_VERBOSE_ERRORS)
|
||||
{
|
||||
LL_WARNS() << "invalid cat" << LL_ENDL;
|
||||
}
|
||||
error_count++;
|
||||
continue;
|
||||
}
|
||||
if (cat_id != cat->getUUID())
|
||||
{
|
||||
LL_WARNS() << "cat id/index mismatch " << cat_id << " " << cat->getUUID() << LL_ENDL;
|
||||
valid = false;
|
||||
if (error_count < MAX_VERBOSE_ERRORS)
|
||||
{
|
||||
LL_WARNS() << "cat id/index mismatch " << cat_id << " " << cat->getUUID() << LL_ENDL;
|
||||
}
|
||||
error_count++;
|
||||
}
|
||||
|
||||
if (cat->getParentUUID().isNull())
|
||||
{
|
||||
if (cat_id != getRootFolderID() && cat_id != getLibraryRootFolderID())
|
||||
{
|
||||
LL_WARNS() << "cat " << cat_id << " has no parent, but is not root ("
|
||||
<< getRootFolderID() << ") or library root ("
|
||||
<< getLibraryRootFolderID() << ")" << LL_ENDL;
|
||||
if (error_count < MAX_VERBOSE_ERRORS)
|
||||
{
|
||||
LL_WARNS() << "cat " << cat_id << " has no parent, but is not root ("
|
||||
<< getRootFolderID() << ") or library root ("
|
||||
<< getLibraryRootFolderID() << ")" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
cat_array_t* cats;
|
||||
|
|
@ -4233,8 +4281,11 @@ bool LLInventoryModel::validate() const
|
|||
getDirectDescendentsOf(cat_id,cats,items);
|
||||
if (!cats || !items)
|
||||
{
|
||||
LL_WARNS() << "invalid direct descendents for " << cat_id << LL_ENDL;
|
||||
valid = false;
|
||||
if (error_count < MAX_VERBOSE_ERRORS)
|
||||
{
|
||||
LL_WARNS() << "invalid direct descendents for " << cat_id << LL_ENDL;
|
||||
}
|
||||
error_count++;
|
||||
continue;
|
||||
}
|
||||
if (cat->getDescendentCount() == LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN)
|
||||
|
|
@ -4243,12 +4294,15 @@ bool LLInventoryModel::validate() const
|
|||
}
|
||||
else if (cats->size() + items->size() != cat->getDescendentCount())
|
||||
{
|
||||
LL_WARNS() << "invalid desc count for " << cat_id << " name [" << cat->getName()
|
||||
<< "] parent " << cat->getParentUUID()
|
||||
<< " cached " << cat->getDescendentCount()
|
||||
<< " expected " << cats->size() << "+" << items->size()
|
||||
<< "=" << cats->size() +items->size() << LL_ENDL;
|
||||
valid = false;
|
||||
if (error_count < MAX_VERBOSE_ERRORS)
|
||||
{
|
||||
LL_WARNS() << "invalid desc count for " << cat_id << " name [" << cat->getName()
|
||||
<< "] parent " << cat->getParentUUID()
|
||||
<< " cached " << cat->getDescendentCount()
|
||||
<< " expected " << cats->size() << "+" << items->size()
|
||||
<< "=" << cats->size() + items->size() << LL_ENDL;
|
||||
}
|
||||
error_count++;
|
||||
}
|
||||
if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)
|
||||
{
|
||||
|
|
@ -4268,8 +4322,11 @@ bool LLInventoryModel::validate() const
|
|||
|
||||
if (!item)
|
||||
{
|
||||
LL_WARNS() << "null item at index " << i << " for cat " << cat_id << LL_ENDL;
|
||||
valid = false;
|
||||
if (error_count < MAX_VERBOSE_ERRORS)
|
||||
{
|
||||
LL_WARNS() << "null item at index " << i << " for cat " << cat_id << LL_ENDL;
|
||||
}
|
||||
error_count++;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -4277,10 +4334,13 @@ bool LLInventoryModel::validate() const
|
|||
|
||||
if (item->getParentUUID() != cat_id)
|
||||
{
|
||||
LL_WARNS() << "wrong parent for " << item_id << " found "
|
||||
<< item->getParentUUID() << " expected " << cat_id
|
||||
<< LL_ENDL;
|
||||
valid = false;
|
||||
if (error_count < MAX_VERBOSE_ERRORS)
|
||||
{
|
||||
LL_WARNS() << "wrong parent for " << item_id << " found "
|
||||
<< item->getParentUUID() << " expected " << cat_id
|
||||
<< LL_ENDL;
|
||||
}
|
||||
error_count++;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -4288,17 +4348,24 @@ bool LLInventoryModel::validate() const
|
|||
item_map_t::const_iterator it = mItemMap.find(item_id);
|
||||
if (it == mItemMap.end())
|
||||
{
|
||||
LL_WARNS() << "item " << item_id << " found as child of "
|
||||
<< cat_id << " but not in top level mItemMap" << LL_ENDL;
|
||||
valid = false;
|
||||
|
||||
if (error_count < MAX_VERBOSE_ERRORS)
|
||||
{
|
||||
LL_WARNS() << "item " << item_id << " found as child of "
|
||||
<< cat_id << " but not in top level mItemMap" << LL_ENDL;
|
||||
}
|
||||
error_count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
LLViewerInventoryItem *top_item = it->second;
|
||||
if (top_item != item)
|
||||
{
|
||||
LL_WARNS() << "item mismatch, item_id " << item_id
|
||||
<< " top level entry is different, uuid " << top_item->getUUID() << LL_ENDL;
|
||||
if (error_count < MAX_VERBOSE_ERRORS)
|
||||
{
|
||||
LL_WARNS() << "item mismatch, item_id " << item_id
|
||||
<< " top level entry is different, uuid " << top_item->getUUID() << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4307,19 +4374,25 @@ bool LLInventoryModel::validate() const
|
|||
bool found = getObjectTopmostAncestor(item_id, topmost_ancestor_id);
|
||||
if (!found)
|
||||
{
|
||||
LL_WARNS() << "unable to find topmost ancestor for " << item_id << LL_ENDL;
|
||||
valid = false;
|
||||
if (error_count < MAX_VERBOSE_ERRORS)
|
||||
{
|
||||
LL_WARNS() << "unable to find topmost ancestor for " << item_id << LL_ENDL;
|
||||
}
|
||||
error_count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (topmost_ancestor_id != getRootFolderID() &&
|
||||
topmost_ancestor_id != getLibraryRootFolderID())
|
||||
{
|
||||
LL_WARNS() << "unrecognized top level ancestor for " << item_id
|
||||
<< " got " << topmost_ancestor_id
|
||||
<< " expected " << getRootFolderID()
|
||||
<< " or " << getLibraryRootFolderID() << LL_ENDL;
|
||||
valid = false;
|
||||
if (error_count < MAX_VERBOSE_ERRORS)
|
||||
{
|
||||
LL_WARNS() << "unrecognized top level ancestor for " << item_id
|
||||
<< " got " << topmost_ancestor_id
|
||||
<< " expected " << getRootFolderID()
|
||||
<< " or " << getLibraryRootFolderID() << LL_ENDL;
|
||||
}
|
||||
error_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4333,9 +4406,12 @@ bool LLInventoryModel::validate() const
|
|||
getDirectDescendentsOf(parent_id,cats,items);
|
||||
if (!cats)
|
||||
{
|
||||
LL_WARNS() << "cat " << cat_id << " name [" << cat->getName()
|
||||
<< "] orphaned - no child cat array for alleged parent " << parent_id << LL_ENDL;
|
||||
valid = false;
|
||||
if (error_count < MAX_VERBOSE_ERRORS)
|
||||
{
|
||||
LL_WARNS() << "cat " << cat_id << " name [" << cat->getName()
|
||||
<< "] orphaned - no child cat array for alleged parent " << parent_id << LL_ENDL;
|
||||
}
|
||||
error_count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -4351,8 +4427,11 @@ bool LLInventoryModel::validate() const
|
|||
}
|
||||
if (!found)
|
||||
{
|
||||
LL_WARNS() << "cat " << cat_id << " name [" << cat->getName()
|
||||
<< "] orphaned - not found in child cat array of alleged parent " << parent_id << LL_ENDL;
|
||||
if (error_count < MAX_VERBOSE_ERRORS)
|
||||
{
|
||||
LL_WARNS() << "cat " << cat_id << " name [" << cat->getName()
|
||||
<< "] orphaned - not found in child cat array of alleged parent " << parent_id << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4364,24 +4443,33 @@ bool LLInventoryModel::validate() const
|
|||
LLViewerInventoryItem *item = iit->second;
|
||||
if (item->getUUID() != item_id)
|
||||
{
|
||||
LL_WARNS() << "item_id " << item_id << " does not match " << item->getUUID() << LL_ENDL;
|
||||
valid = false;
|
||||
if (error_count < MAX_VERBOSE_ERRORS)
|
||||
{
|
||||
LL_WARNS() << "item_id " << item_id << " does not match " << item->getUUID() << LL_ENDL;
|
||||
}
|
||||
error_count++;
|
||||
}
|
||||
|
||||
const LLUUID& parent_id = item->getParentUUID();
|
||||
if (parent_id.isNull())
|
||||
{
|
||||
LL_WARNS() << "item " << item_id << " name [" << item->getName() << "] has null parent id!" << LL_ENDL;
|
||||
if (error_count < MAX_VERBOSE_ERRORS)
|
||||
{
|
||||
LL_WARNS() << "item " << item_id << " name [" << item->getName() << "] has null parent id!" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (error_count < MAX_VERBOSE_ERRORS)
|
||||
{
|
||||
cat_array_t* cats;
|
||||
item_array_t* items;
|
||||
getDirectDescendentsOf(parent_id,cats,items);
|
||||
if (!items)
|
||||
{
|
||||
LL_WARNS() << "item " << item_id << " name [" << item->getName()
|
||||
<< "] orphaned - alleged parent has no child items list " << parent_id << LL_ENDL;
|
||||
if (error_count < MAX_VERBOSE_ERRORS)
|
||||
{
|
||||
LL_WARNS() << "item " << item_id << " name [" << item->getName()
|
||||
<< "] orphaned - alleged parent has no child items list " << parent_id << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -4396,63 +4484,70 @@ bool LLInventoryModel::validate() const
|
|||
}
|
||||
if (!found)
|
||||
{
|
||||
LL_WARNS() << "item " << item_id << " name [" << item->getName()
|
||||
<< "] orphaned - not found as child of alleged parent " << parent_id << LL_ENDL;
|
||||
if (error_count < MAX_VERBOSE_ERRORS)
|
||||
{
|
||||
LL_WARNS() << "item " << item_id << " name [" << item->getName()
|
||||
<< "] orphaned - not found as child of alleged parent " << parent_id << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// Link checking
|
||||
if (item->getIsLinkType())
|
||||
{
|
||||
const LLUUID& link_id = item->getUUID();
|
||||
const LLUUID& target_id = item->getLinkedUUID();
|
||||
LLViewerInventoryItem *target_item = getItem(target_id);
|
||||
LLViewerInventoryCategory *target_cat = getCategory(target_id);
|
||||
// Linked-to UUID should have back reference to this link.
|
||||
if (!hasBacklinkInfo(link_id, target_id))
|
||||
{
|
||||
LL_WARNS() << "link " << item->getUUID() << " type " << item->getActualType()
|
||||
<< " missing backlink info at target_id " << target_id
|
||||
<< LL_ENDL;
|
||||
}
|
||||
// Links should have referents.
|
||||
if (item->getActualType() == LLAssetType::AT_LINK && !target_item)
|
||||
{
|
||||
LL_WARNS() << "broken item link " << item->getName() << " id " << item->getUUID() << LL_ENDL;
|
||||
}
|
||||
else if (item->getActualType() == LLAssetType::AT_LINK_FOLDER && !target_cat)
|
||||
{
|
||||
LL_WARNS() << "broken folder link " << item->getName() << " id " << item->getUUID() << LL_ENDL;
|
||||
}
|
||||
if (target_item && target_item->getIsLinkType())
|
||||
{
|
||||
LL_WARNS() << "link " << item->getName() << " references a link item "
|
||||
<< target_item->getName() << " " << target_item->getUUID() << LL_ENDL;
|
||||
}
|
||||
|
||||
// Links should not have backlinks.
|
||||
std::pair<backlink_mmap_t::const_iterator, backlink_mmap_t::const_iterator> range = mBacklinkMMap.equal_range(link_id);
|
||||
if (range.first != range.second)
|
||||
{
|
||||
LL_WARNS() << "Link item " << item->getName() << " has backlinks!" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check the backlinks of a non-link item.
|
||||
const LLUUID& target_id = item->getUUID();
|
||||
std::pair<backlink_mmap_t::const_iterator, backlink_mmap_t::const_iterator> range = mBacklinkMMap.equal_range(target_id);
|
||||
for (backlink_mmap_t::const_iterator it = range.first; it != range.second; ++it)
|
||||
{
|
||||
const LLUUID& link_id = it->second;
|
||||
LLViewerInventoryItem *link_item = getItem(link_id);
|
||||
if (!link_item || !link_item->getIsLinkType())
|
||||
{
|
||||
LL_WARNS() << "invalid backlink from target " << item->getName() << " to " << link_id << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Link checking
|
||||
if (error_count < MAX_VERBOSE_ERRORS)
|
||||
{
|
||||
if (item->getIsLinkType())
|
||||
{
|
||||
const LLUUID& link_id = item->getUUID();
|
||||
const LLUUID& target_id = item->getLinkedUUID();
|
||||
LLViewerInventoryItem *target_item = getItem(target_id);
|
||||
LLViewerInventoryCategory *target_cat = getCategory(target_id);
|
||||
// Linked-to UUID should have back reference to this link.
|
||||
if (!hasBacklinkInfo(link_id, target_id))
|
||||
{
|
||||
LL_WARNS() << "link " << item->getUUID() << " type " << item->getActualType()
|
||||
<< " missing backlink info at target_id " << target_id
|
||||
<< LL_ENDL;
|
||||
}
|
||||
// Links should have referents.
|
||||
if (item->getActualType() == LLAssetType::AT_LINK && !target_item)
|
||||
{
|
||||
LL_WARNS() << "broken item link " << item->getName() << " id " << item->getUUID() << LL_ENDL;
|
||||
}
|
||||
else if (item->getActualType() == LLAssetType::AT_LINK_FOLDER && !target_cat)
|
||||
{
|
||||
LL_WARNS() << "broken folder link " << item->getName() << " id " << item->getUUID() << LL_ENDL;
|
||||
}
|
||||
if (target_item && target_item->getIsLinkType())
|
||||
{
|
||||
LL_WARNS() << "link " << item->getName() << " references a link item "
|
||||
<< target_item->getName() << " " << target_item->getUUID() << LL_ENDL;
|
||||
}
|
||||
|
||||
// Links should not have backlinks.
|
||||
std::pair<backlink_mmap_t::const_iterator, backlink_mmap_t::const_iterator> range = mBacklinkMMap.equal_range(link_id);
|
||||
if (range.first != range.second)
|
||||
{
|
||||
LL_WARNS() << "Link item " << item->getName() << " has backlinks!" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check the backlinks of a non-link item.
|
||||
const LLUUID& target_id = item->getUUID();
|
||||
std::pair<backlink_mmap_t::const_iterator, backlink_mmap_t::const_iterator> range = mBacklinkMMap.equal_range(target_id);
|
||||
for (backlink_mmap_t::const_iterator it = range.first; it != range.second; ++it)
|
||||
{
|
||||
const LLUUID& link_id = it->second;
|
||||
LLViewerInventoryItem *link_item = getItem(link_id);
|
||||
if (!link_item || !link_item->getIsLinkType())
|
||||
{
|
||||
LL_WARNS() << "invalid backlink from target " << item->getName() << " to " << link_id << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cat_lock > 0 || item_lock > 0)
|
||||
|
|
@ -4469,9 +4564,9 @@ bool LLInventoryModel::validate() const
|
|||
LL_INFOS() << "Found " << version_unknown_count << " cats with unknown version" << LL_ENDL;
|
||||
}
|
||||
|
||||
LL_INFOS() << "Validate done, valid = " << (U32) valid << LL_ENDL;
|
||||
LL_INFOS() << "Validate done, found " << error_count << " errors" << LL_ENDL;
|
||||
|
||||
return valid;
|
||||
return error_count == 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -590,6 +590,11 @@ private:
|
|||
U32 mModifyMask;
|
||||
changed_items_t mChangedItemIDs;
|
||||
changed_items_t mAddedItemIDs;
|
||||
// Fallback when notifyObservers is in progress
|
||||
U32 mModifyMaskBacklog;
|
||||
changed_items_t mChangedItemIDsBacklog;
|
||||
changed_items_t mAddedItemIDsBacklog;
|
||||
|
||||
// [SL:KB] - Patch: UI-Notifications | Checked: Catznip-6.5
|
||||
LLUUID mTransactionId;
|
||||
// [/SL:KB]
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
#include "llinventoryfunctions.h"
|
||||
#include "llinventorymodelbackgroundfetch.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llpanelmaininventory.h"
|
||||
#include "llpreview.h"
|
||||
#include "llsidepanelinventory.h"
|
||||
#include "llstartup.h"
|
||||
|
|
@ -1804,7 +1805,7 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
|
|||
bool show_inbox = gSavedSettings.getBOOL("FSShowInboxFolder"); // <FS:Ansariel> Optional hiding of Received Items folder aka Inbox
|
||||
|
||||
// <FS:Ansariel> FIRE-22167: Make "Show in Main View" work properly
|
||||
//if (main_panel && !in_inbox)
|
||||
//if (!in_inbox && (main_panel || !sidepanel_inventory->getMainInventoryPanel()->isRecentItemsPanelSelected())) //if (main_panel && !in_inbox)
|
||||
//{
|
||||
// sidepanel_inventory->selectAllItemsPanel();
|
||||
//}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include "llagentui.h"
|
||||
#include "llavatarnamecache.h"
|
||||
#include "lllogchat.h"
|
||||
#include "llregex.h"
|
||||
#include "lltrans.h"
|
||||
#include "llviewercontrol.h"
|
||||
|
||||
|
|
@ -43,7 +44,6 @@
|
|||
|
||||
#include <boost/algorithm/string/trim.hpp>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/regex/v4/match_results.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
|
|
@ -321,8 +321,8 @@ std::string LLLogChat::makeLogFileName(std::string filename)
|
|||
**/
|
||||
|
||||
boost::match_results<std::string::const_iterator> matches;
|
||||
bool inboundConf = boost::regex_match(filename, matches, INBOUND_CONFERENCE);
|
||||
bool outboundConf = boost::regex_match(filename, matches, OUTBOUND_CONFERENCE);
|
||||
bool inboundConf = ll_regex_match(filename, matches, INBOUND_CONFERENCE);
|
||||
bool outboundConf = ll_regex_match(filename, matches, OUTBOUND_CONFERENCE);
|
||||
if (!(inboundConf || outboundConf))
|
||||
{
|
||||
if( gSavedPerAccountSettings.getBOOL("LogFileNamewithDate") )
|
||||
|
|
@ -949,8 +949,8 @@ bool LLLogChat::isTranscriptFileFound(std::string fullname)
|
|||
//matching a timestamp
|
||||
boost::match_results<std::string::const_iterator> matches;
|
||||
// <FS:Ansariel> Seconds in timestamp
|
||||
//if (boost::regex_match(remove_utf8_bom(buffer), matches, TIMESTAMP))
|
||||
if (boost::regex_match(remove_utf8_bom(buffer), matches, TIMESTAMP) || boost::regex_match(remove_utf8_bom(buffer), matches, TIMESTAMP_AND_SEC))
|
||||
//if (ll_regex_match(remove_utf8_bom(buffer), matches, TIMESTAMP))
|
||||
if (ll_regex_match(remove_utf8_bom(buffer), matches, TIMESTAMP) || ll_regex_match(remove_utf8_bom(buffer), matches, TIMESTAMP_AND_SEC))
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
result = true;
|
||||
|
|
@ -1037,15 +1037,15 @@ bool LLChatLogParser::parse(std::string& raw, LLSD& im, const LLSD& parse_params
|
|||
// So we use the original regex for timestamps without seconds to find out what
|
||||
// case it is. For this to work, the timestamp part in the TIMESTAMP_AND_STUFF_SEC
|
||||
// regex is NOT optional!
|
||||
//if (!boost::regex_match(raw, matches, TIMESTAMP_AND_STUFF)) return false;
|
||||
//if (!ll_regex_match(raw, matches, TIMESTAMP_AND_STUFF)) return false;
|
||||
bool has_sec = false;
|
||||
if (boost::regex_match(raw, matches, TIMESTAMP_AND_STUFF_SEC))
|
||||
if (ll_regex_match(raw, matches, TIMESTAMP_AND_STUFF_SEC))
|
||||
{
|
||||
has_sec = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!boost::regex_match(raw, matches, TIMESTAMP_AND_STUFF))
|
||||
if (!ll_regex_match(raw, matches, TIMESTAMP_AND_STUFF))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1093,7 +1093,7 @@ bool LLChatLogParser::parse(std::string& raw, LLSD& im, const LLSD& parse_params
|
|||
//matching a name and a text
|
||||
std::string stuff = matches[IDX_STUFF];
|
||||
boost::match_results<std::string::const_iterator> name_and_text;
|
||||
if (!boost::regex_match(stuff, name_and_text, NAME_AND_TEXT)) return false;
|
||||
if (!ll_regex_match(stuff, name_and_text, NAME_AND_TEXT)) return false;
|
||||
|
||||
bool has_name = name_and_text[IDX_NAME].matched;
|
||||
std::string name = LLURI::unescape(name_and_text[IDX_NAME]);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
#if LL_WINDOWS
|
||||
#define _WIN32_DCOM
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
#include <comdef.h>
|
||||
#include <Wbemidl.h>
|
||||
#elif LL_DARWIN
|
||||
|
|
@ -89,7 +88,7 @@ void LLWMIMethods::initCOMObjects()
|
|||
mHR = CoInitializeEx(0, COINIT_MULTITHREADED);
|
||||
if (FAILED(mHR))
|
||||
{
|
||||
LL_DEBUGS("AppInit") << "Failed to initialize COM library. Error code = 0x" << hex << mHR << LL_ENDL;
|
||||
LL_DEBUGS("AppInit") << "Failed to initialize COM library. Error code = 0x" << std::hex << mHR << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -114,7 +113,7 @@ void LLWMIMethods::initCOMObjects()
|
|||
|
||||
if (FAILED(mHR))
|
||||
{
|
||||
LL_WARNS("AppInit") << "Failed to initialize security. Error code = 0x" << hex << mHR << LL_ENDL;
|
||||
LL_WARNS("AppInit") << "Failed to initialize security. Error code = 0x" << std::hex << mHR << LL_ENDL;
|
||||
CoUninitialize();
|
||||
return; // Program has failed.
|
||||
}
|
||||
|
|
@ -130,7 +129,7 @@ void LLWMIMethods::initCOMObjects()
|
|||
|
||||
if (FAILED(mHR))
|
||||
{
|
||||
LL_WARNS("AppInit") << "Failed to create IWbemLocator object." << " Err code = 0x" << hex << mHR << LL_ENDL;
|
||||
LL_WARNS("AppInit") << "Failed to create IWbemLocator object." << " Err code = 0x" << std::hex << mHR << LL_ENDL;
|
||||
CoUninitialize();
|
||||
return; // Program has failed.
|
||||
}
|
||||
|
|
@ -154,7 +153,7 @@ void LLWMIMethods::initCOMObjects()
|
|||
|
||||
if (FAILED(mHR))
|
||||
{
|
||||
LL_WARNS("AppInit") << "Could not connect. Error code = 0x" << hex << mHR << LL_ENDL;
|
||||
LL_WARNS("AppInit") << "Could not connect. Error code = 0x" << std::hex << mHR << LL_ENDL;
|
||||
pLoc->Release();
|
||||
CoUninitialize();
|
||||
return; // Program has failed.
|
||||
|
|
@ -178,7 +177,7 @@ void LLWMIMethods::initCOMObjects()
|
|||
|
||||
if (FAILED(mHR))
|
||||
{
|
||||
LL_WARNS("AppInit") << "Could not set proxy blanket. Error code = 0x" << hex << mHR << LL_ENDL;
|
||||
LL_WARNS("AppInit") << "Could not set proxy blanket. Error code = 0x" << std::hex << mHR << LL_ENDL;
|
||||
cleanCOMObjects();
|
||||
return; // Program has failed.
|
||||
}
|
||||
|
|
@ -247,7 +246,7 @@ bool LLWMIMethods::getGenericSerialNumber(const BSTR &select, const LPCWSTR &var
|
|||
|
||||
if (FAILED(hres))
|
||||
{
|
||||
LL_WARNS("AppInit") << "Query for operating system name failed." << " Error code = 0x" << hex << hres << LL_ENDL;
|
||||
LL_WARNS("AppInit") << "Query for operating system name failed." << " Error code = 0x" << std::hex << hres << LL_ENDL;
|
||||
return false; // Program has failed.
|
||||
}
|
||||
|
||||
|
|
@ -274,7 +273,7 @@ bool LLWMIMethods::getGenericSerialNumber(const BSTR &select, const LPCWSTR &var
|
|||
hr = pclsObj->Get(variable, 0, &vtProp, 0, 0);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
LL_WARNS() << "Failed to get SerialNumber. Error code = 0x" << hex << hres << LL_ENDL;
|
||||
LL_WARNS() << "Failed to get SerialNumber. Error code = 0x" << std::hex << hres << LL_ENDL;
|
||||
pclsObj->Release();
|
||||
pclsObj = NULL;
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@
|
|||
#include "llcombobox.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llfloater.h"
|
||||
#include "llregex.h"
|
||||
#include "lltrans.h"
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
#define BTN_FIND "find"
|
||||
#define BTN_OK "ok_btn"
|
||||
|
|
@ -116,7 +116,7 @@ void LLPanelExperiencePicker::onBtnFind()
|
|||
boost::cmatch what;
|
||||
std::string text = getChild<LLUICtrl>(TEXT_EDIT)->getValue().asString();
|
||||
const boost::regex expression("secondlife:///app/experience/[\\da-f-]+/profile");
|
||||
if (boost::regex_match(text.c_str(), what, expression))
|
||||
if (ll_regex_match(text.c_str(), what, expression))
|
||||
{
|
||||
LLURI uri(text);
|
||||
LLSD path_array = uri.pathArray();
|
||||
|
|
|
|||
|
|
@ -71,15 +71,11 @@ bool LLPanelMainInventory::sSaveFilters = true;
|
|||
|
||||
const std::string FILTERS_FILENAME("filters.xml");
|
||||
|
||||
static LLPanelInjector<LLPanelMainInventory> t_inventory("panel_main_inventory");
|
||||
const std::string ALL_ITEMS("All Items");
|
||||
const std::string RECENT_ITEMS("Recent Items");
|
||||
const std::string WORN_ITEMS("Worn Items");
|
||||
|
||||
void on_file_loaded_for_save(BOOL success,
|
||||
LLViewerFetchedTexture *src_vi,
|
||||
LLImageRaw* src,
|
||||
LLImageRaw* aux_src,
|
||||
S32 discard_level,
|
||||
BOOL final,
|
||||
void* userdata);
|
||||
static LLPanelInjector<LLPanelMainInventory> t_inventory("panel_main_inventory");
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// LLFloaterInventoryFinder
|
||||
|
|
@ -222,7 +218,7 @@ BOOL LLPanelMainInventory::postBuild()
|
|||
//panel->getFilter().markDefault();
|
||||
|
||||
// Set up the default inv. panel/filter settings.
|
||||
mActivePanel = getChild<LLInventoryPanel>("All Items");
|
||||
mActivePanel = getChild<LLInventoryPanel>(ALL_ITEMS);
|
||||
if (mActivePanel)
|
||||
{
|
||||
// "All Items" is the previous only view, so it gets the InventorySortOrder
|
||||
|
|
@ -232,7 +228,7 @@ BOOL LLPanelMainInventory::postBuild()
|
|||
mActivePanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mActivePanel, _1, _2));
|
||||
mResortActivePanel = true;
|
||||
}
|
||||
LLInventoryPanel* recent_items_panel = getChild<LLInventoryPanel>("Recent Items");
|
||||
LLInventoryPanel* recent_items_panel = getChild<LLInventoryPanel>(RECENT_ITEMS);
|
||||
if (recent_items_panel)
|
||||
{
|
||||
// assign default values until we will be sure that we have setting to restore
|
||||
|
|
@ -250,7 +246,7 @@ BOOL LLPanelMainInventory::postBuild()
|
|||
recent_items_panel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, recent_items_panel, _1, _2));
|
||||
}
|
||||
|
||||
LLInventoryPanel* mWornItemsPanel = getChild<LLInventoryPanel>("Worn Items");
|
||||
mWornItemsPanel = getChild<LLInventoryPanel>(WORN_ITEMS);
|
||||
if (mWornItemsPanel)
|
||||
{
|
||||
U32 filter_types = 0x0;
|
||||
|
|
@ -376,7 +372,7 @@ LLPanelMainInventory::~LLPanelMainInventory( void )
|
|||
// for example, LLParamSDParser doesn't know about U64,
|
||||
// so some FilterOps params should be revised.
|
||||
LLSD filterRoot;
|
||||
LLInventoryPanel* all_items_panel = getChild<LLInventoryPanel>("All Items");
|
||||
LLInventoryPanel* all_items_panel = getChild<LLInventoryPanel>(ALL_ITEMS);
|
||||
if (all_items_panel)
|
||||
{
|
||||
LLSD filterState;
|
||||
|
|
@ -390,7 +386,7 @@ LLPanelMainInventory::~LLPanelMainInventory( void )
|
|||
}
|
||||
}
|
||||
|
||||
LLInventoryPanel* panel = findChild<LLInventoryPanel>("Recent Items");
|
||||
LLInventoryPanel* panel = findChild<LLInventoryPanel>(RECENT_ITEMS);
|
||||
if (panel)
|
||||
{
|
||||
LLSD filterState;
|
||||
|
|
@ -428,7 +424,7 @@ LLPanelMainInventory::~LLPanelMainInventory( void )
|
|||
|
||||
LLInventoryPanel* LLPanelMainInventory::getAllItemsPanel()
|
||||
{
|
||||
return getChild<LLInventoryPanel>("All Items");
|
||||
return getChild<LLInventoryPanel>(ALL_ITEMS);
|
||||
}
|
||||
|
||||
void LLPanelMainInventory::selectAllItemsPanel()
|
||||
|
|
@ -436,6 +432,11 @@ void LLPanelMainInventory::selectAllItemsPanel()
|
|||
mFilterTabs->selectFirstTab();
|
||||
}
|
||||
|
||||
bool LLPanelMainInventory::isRecentItemsPanelSelected()
|
||||
{
|
||||
return (RECENT_ITEMS == getActivePanel()->getName());
|
||||
}
|
||||
|
||||
void LLPanelMainInventory::startSearch()
|
||||
{
|
||||
// this forces focus to line editor portion of search editor
|
||||
|
|
@ -623,7 +624,7 @@ void LLPanelMainInventory::setSortBy(const LLSD& userdata)
|
|||
|
||||
getActivePanel()->setSortOrder(sort_order_mask);
|
||||
// <FS:Zi> Recent items panel should save sort order
|
||||
//if ("Recent Items" == getActivePanel()->getName())
|
||||
//if (isRecentItemsPanelSelected())
|
||||
//{
|
||||
// gSavedSettings.setU32("RecentItemsSortOrder", sort_order_mask);
|
||||
//}
|
||||
|
|
@ -1176,8 +1177,8 @@ void LLPanelMainInventory::toggleFindOptions()
|
|||
|
||||
void LLPanelMainInventory::setSelectCallback(const LLFolderView::signal_t::slot_type& cb)
|
||||
{
|
||||
getChild<LLInventoryPanel>("All Items")->setSelectCallback(cb);
|
||||
getChild<LLInventoryPanel>("Recent Items")->setSelectCallback(cb);
|
||||
getChild<LLInventoryPanel>(ALL_ITEMS)->setSelectCallback(cb);
|
||||
getChild<LLInventoryPanel>(RECENT_ITEMS)->setSelectCallback(cb);
|
||||
getChild<LLInventoryPanel>("Worn Items")->setSelectCallback(cb);
|
||||
}
|
||||
|
||||
|
|
@ -1647,11 +1648,11 @@ void LLPanelMainInventory::onAddButtonClick()
|
|||
{
|
||||
// Gray out the "New Folder" option when the Recent tab is active as new folders will not be displayed
|
||||
// unless "Always show folders" is checked in the filter options.
|
||||
bool recent_active = ("Recent Items" == mActivePanel->getName());
|
||||
|
||||
LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get();
|
||||
if (menu)
|
||||
{
|
||||
menu->getChild<LLMenuItemGL>("New Folder")->setEnabled(!recent_active);
|
||||
menu->getChild<LLMenuItemGL>("New Folder")->setEnabled(!isRecentItemsPanelSelected());
|
||||
|
||||
setUploadCostIfNeeded();
|
||||
|
||||
|
|
|
|||
|
|
@ -88,6 +88,8 @@ public:
|
|||
void showAllItemsPanel();
|
||||
// </FS:Ansariel>
|
||||
|
||||
bool isRecentItemsPanelSelected();
|
||||
|
||||
const std::string& getFilterText() const { return mFilterText; }
|
||||
|
||||
void setSelectCallback(const LLFolderView::signal_t::slot_type& cb);
|
||||
|
|
|
|||
|
|
@ -1142,7 +1142,7 @@ void LLPanelObject::getState( )
|
|||
mSpinScaleY->setMaxValue(OBJECT_MAX_HOLE_SIZE_Y);
|
||||
break;
|
||||
default:
|
||||
if (editable)
|
||||
if (editable && single_volume)
|
||||
{
|
||||
// <FS> Make sure to use the correct values for the LL default types. These
|
||||
// should be handled by the explicit cases and the ones in this if-condition.
|
||||
|
|
|
|||
|
|
@ -38,13 +38,12 @@
|
|||
#include "llfloatersnapshot.h" // FIXME: replace with a snapshot storage model
|
||||
#include "llpanelsnapshot.h"
|
||||
#include "llpostcard.h"
|
||||
#include "llregex.h"
|
||||
#include "llsnapshotlivepreview.h"
|
||||
#include "llviewercontrol.h" // gSavedSettings
|
||||
#include "llviewerwindow.h"
|
||||
#include "llviewerregion.h"
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
#include "llviewernetwork.h"
|
||||
|
||||
/**
|
||||
|
|
@ -268,14 +267,14 @@ void LLPanelSnapshotPostcard::onSend()
|
|||
|
||||
boost::regex email_format("[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(,[ \t]*[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})*");
|
||||
|
||||
if (to.empty() || !boost::regex_match(to, email_format))
|
||||
if (to.empty() || !ll_regex_match(to, email_format))
|
||||
{
|
||||
LLNotificationsUtil::add("PromptRecipientEmail");
|
||||
return;
|
||||
}
|
||||
|
||||
// <FS:Ansariel> For OpenSim compatibility
|
||||
if (!LLGridManager::instance().isInSecondLife() && (mAgentEmail.empty() || !boost::regex_match(mAgentEmail, email_format)))
|
||||
if (!LLGridManager::instance().isInSecondLife() && (mAgentEmail.empty() || !ll_regex_match(mAgentEmail, email_format)))
|
||||
{
|
||||
LLNotificationsUtil::add("PromptSelfEmail");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -264,7 +264,9 @@ public:
|
|||
virtual void validate(int validation_policy,
|
||||
LLPointer<LLCertificateChain> cert_chain,
|
||||
const LLSD& validation_params) =0;
|
||||
|
||||
|
||||
// Clear cache if any
|
||||
virtual void clearSertCache()=0;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -177,7 +177,10 @@ public:
|
|||
virtual void validate(int validation_policy,
|
||||
LLPointer<LLCertificateChain> ca_chain,
|
||||
const LLSD& validation_params);
|
||||
|
||||
|
||||
// Clears cache of certs validated agains store
|
||||
virtual void clearSertCache() { mTrustedCertCache.clear(); }
|
||||
|
||||
protected:
|
||||
std::vector<LLPointer<LLCertificate> > mCerts;
|
||||
|
||||
|
|
|
|||
|
|
@ -1454,11 +1454,8 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 &
|
|||
}
|
||||
break;
|
||||
case SELECT_TYPE_HUD:
|
||||
// use HUD-scaled grid
|
||||
mGridScale = LLVector3(0.25f, 0.25f, 0.25f);
|
||||
break;
|
||||
case SELECT_TYPE_WORLD:
|
||||
mGridScale = LLVector3(1.f, 1.f, 1.f) * gSavedSettings.getF32("GridResolution");
|
||||
mGridScale = LLVector3(1.f, 1.f, 1.f) * llmin(gSavedSettings.getF32("GridResolution"), 0.5f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3741,6 +3741,11 @@ void reset_login()
|
|||
}
|
||||
LLFloaterReg::hideVisibleInstances();
|
||||
LLStartUp::setStartupState( STATE_BROWSER_INIT );
|
||||
|
||||
// Clear any verified certs and verify them again on next login
|
||||
// to ensure cert matches server instead of just getting reused
|
||||
LLPointer<LLCertificateStore> store = gSecAPIHandler->getCertificateStore("");
|
||||
store->clearSertCache();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ private:
|
|||
LLPanel* mWrapperPanel;
|
||||
|
||||
// timer counts a lifetime of a toast
|
||||
std::auto_ptr<LLToastLifeTimer> mTimer;
|
||||
std::unique_ptr<LLToastLifeTimer> mTimer;
|
||||
|
||||
F32 mToastLifetime; // in seconds
|
||||
F32 mToastFadingTime; // in seconds
|
||||
|
|
|
|||
|
|
@ -524,8 +524,9 @@ BOOL LLToolPie::useClickAction(MASK mask,
|
|||
&& object
|
||||
&& !object->isAttachment()
|
||||
&& LLPrimitive::isPrimitive(object->getPCode())
|
||||
&& (object->getClickAction()
|
||||
|| parent->getClickAction());
|
||||
// useClickAction does not handle Touch (0) or Disabled action
|
||||
&& ((object->getClickAction() && object->getClickAction() != CLICK_ACTION_DISABLED)
|
||||
|| (parent && parent->getClickAction() && parent->getClickAction() != CLICK_ACTION_DISABLED));
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -536,18 +537,18 @@ U8 final_click_action(LLViewerObject* obj)
|
|||
|
||||
U8 click_action = CLICK_ACTION_TOUCH;
|
||||
LLViewerObject* parent = obj->getRootEdit();
|
||||
if (obj->getClickAction()
|
||||
|| (parent && parent->getClickAction()))
|
||||
{
|
||||
if (obj->getClickAction())
|
||||
{
|
||||
click_action = obj->getClickAction();
|
||||
}
|
||||
else if (parent && parent->getClickAction())
|
||||
{
|
||||
click_action = parent->getClickAction();
|
||||
}
|
||||
}
|
||||
U8 object_action = obj->getClickAction();
|
||||
U8 parent_action = parent ? parent->getClickAction() : CLICK_ACTION_TOUCH;
|
||||
if (parent_action == CLICK_ACTION_DISABLED || object_action)
|
||||
{
|
||||
// CLICK_ACTION_DISABLED ("None" in UI) is intended for child action to
|
||||
// override parent's action when assigned to parent or to child
|
||||
click_action = object_action;
|
||||
}
|
||||
else if (parent_action)
|
||||
{
|
||||
click_action = parent_action;
|
||||
}
|
||||
return click_action;
|
||||
}
|
||||
|
||||
|
|
@ -752,12 +753,13 @@ bool LLToolPie::teleportToClickedLocation()
|
|||
bool is_land = mHoverPick.mPickType == LLPickInfo::PICK_LAND;
|
||||
bool pos_non_zero = !mHoverPick.mPosGlobal.isExactlyZero();
|
||||
bool has_touch_handler = (objp && objp->flagHandleTouch()) || (parentp && parentp->flagHandleTouch());
|
||||
bool has_click_action = final_click_action(objp);
|
||||
U8 click_action = final_click_action(objp); // default action: 0 - touch
|
||||
bool has_click_action = (click_action || has_touch_handler) && click_action != CLICK_ACTION_DISABLED;
|
||||
|
||||
// <FS:Ansariel> FIRE-1765: Allow double-click walk/teleport to scripted objects
|
||||
//if (pos_non_zero && (is_land || (is_in_world && !has_touch_handler && !has_click_action)))
|
||||
//if (pos_non_zero && (is_land || (is_in_world && !has_click_action)))
|
||||
bool allowDoubleClickOnScriptedObjects = gSavedSettings.getBOOL("FSAllowDoubleClickOnScriptedObjects");
|
||||
if (pos_non_zero && (is_land || (is_in_world && ((allowDoubleClickOnScriptedObjects && objp->getClickAction() != CLICK_ACTION_SIT) || (!has_touch_handler && !has_click_action)))))
|
||||
if (pos_non_zero && (is_land || (is_in_world && ((allowDoubleClickOnScriptedObjects && objp->getClickAction() != CLICK_ACTION_SIT) || !has_click_action))))
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.0
|
||||
|
|
@ -917,7 +919,8 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
|
|||
LL_DEBUGS("UserInput") << "hover handled by LLToolPie (inactive)" << LL_ENDL;
|
||||
}
|
||||
else if ((!object || !object->isAttachment() || object->getClickAction() != CLICK_ACTION_DISABLED)
|
||||
&& ((object && object->flagHandleTouch()) || (parent && parent->flagHandleTouch())))
|
||||
&& ((object && object->flagHandleTouch()) || (parent && parent->flagHandleTouch()))
|
||||
&& (!object || !object->isAvatar()))
|
||||
{
|
||||
show_highlight = true;
|
||||
gViewerWindow->setCursor(UI_CURSOR_HAND);
|
||||
|
|
|
|||
|
|
@ -197,6 +197,11 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s
|
|||
|
||||
LLSD result = httpAdapter->getRawAndSuspend(httpRequest, url, httpOpts, httpHeaders);
|
||||
|
||||
if (LLApp::isQuitting())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
|
||||
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
|
||||
|
||||
|
|
@ -207,7 +212,22 @@ void LLTranslationAPIHandler::translateMessageCoro(LanguagePair_t fromTo, std::s
|
|||
const LLSD::Binary &rawBody = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_RAW].asBinary();
|
||||
std::string body(rawBody.begin(), rawBody.end());
|
||||
|
||||
if (this->parseResponse(parseResult, body, translation, detected_lang, err_msg))
|
||||
bool res = false;
|
||||
|
||||
try
|
||||
{
|
||||
res = this->parseResponse(parseResult, body, translation, detected_lang, err_msg);
|
||||
}
|
||||
catch (std::out_of_range&)
|
||||
{
|
||||
LL_WARNS() << "Out of range exception on string " << body << LL_ENDL;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
LOG_UNHANDLED_EXCEPTION( "Exception on string " + body );
|
||||
}
|
||||
|
||||
if (res)
|
||||
{
|
||||
// Fix up the response
|
||||
LLStringUtil::replaceString(translation, "<", "<");
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@
|
|||
#include "llviewerprecompiledheaders.h"
|
||||
#include "llevents.h"
|
||||
#include "lleventfilter.h"
|
||||
#include "llregex.h"
|
||||
#include "llversioninfo.h"
|
||||
#include "stringize.h"
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
// <FS:TS> Use configured file instead of compile time definitions to avoid
|
||||
// rebuilding the world with every Mercurial pull
|
||||
|
|
@ -184,19 +184,19 @@ LLVersionInfo::ViewerMaturity LLVersionInfo::getViewerMaturity()
|
|||
static const boost::regex is_project_channel("\\bProject\\b");
|
||||
static const boost::regex is_release_channel("\\bRelease\\b");
|
||||
|
||||
if (boost::regex_search(channel, is_release_channel))
|
||||
if (ll_regex_search(channel, is_release_channel))
|
||||
{
|
||||
maturity = RELEASE_VIEWER;
|
||||
}
|
||||
else if (boost::regex_search(channel, is_beta_channel))
|
||||
else if (ll_regex_search(channel, is_beta_channel))
|
||||
{
|
||||
maturity = BETA_VIEWER;
|
||||
}
|
||||
else if (boost::regex_search(channel, is_project_channel))
|
||||
else if (ll_regex_search(channel, is_project_channel))
|
||||
{
|
||||
maturity = PROJECT_VIEWER;
|
||||
}
|
||||
else if (boost::regex_search(channel, is_test_channel))
|
||||
else if (ll_regex_search(channel, is_test_channel))
|
||||
{
|
||||
maturity = TEST_VIEWER;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -846,7 +846,7 @@ void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoreHttpUtil::HttpCorouti
|
|||
// </FS:Ansariel>
|
||||
|
||||
// <FS:Testy> FIRE-22943: Don't switch away from the "Recent Items" tab.
|
||||
//LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, serverInventoryItem, TRUE, TAKE_FOCUS_NO, (panel == NULL));
|
||||
//LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, serverInventoryItem, FALSE, TAKE_FOCUS_NO, (panel == NULL));
|
||||
BOOL show_main_panel = (!panel || panel->getName() != "Recent Items");
|
||||
LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, serverInventoryItem, show_main_panel, TAKE_FOCUS_NO, (panel == NULL));
|
||||
// </FS:Testy>
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ void LLViewerAudio::registerIdleListener()
|
|||
}
|
||||
}
|
||||
|
||||
void LLViewerAudio::startInternetStreamWithAutoFade(std::string streamURI)
|
||||
void LLViewerAudio::startInternetStreamWithAutoFade(const std::string &streamURI)
|
||||
{
|
||||
// Old and new stream are identical
|
||||
if (mNextStreamURI == streamURI)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public:
|
|||
FADE_OUT,
|
||||
};
|
||||
|
||||
void startInternetStreamWithAutoFade(std::string streamURI);
|
||||
void startInternetStreamWithAutoFade(const std::string &streamURI);
|
||||
void stopInternetStreamWithAutoFade();
|
||||
|
||||
bool onIdleUpdate();
|
||||
|
|
@ -65,7 +65,8 @@ public:
|
|||
F32 getFadeVolume();
|
||||
bool getForcedTeleportFade() { return mForcedTeleportFade; };
|
||||
void setForcedTeleportFade(bool fade) { mForcedTeleportFade = fade;} ;
|
||||
void setNextStreamURI(std::string stream) { mNextStreamURI = stream; } ;
|
||||
std::string getNextStreamURI() { return mNextStreamURI; };
|
||||
void setNextStreamURI(const std::string &stream) { mNextStreamURI = stream; } ;
|
||||
void setWasPlaying(bool playing) { mWasPlaying = playing;} ;
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -9039,7 +9039,7 @@ namespace
|
|||
};
|
||||
}
|
||||
|
||||
void queue_actions(LLFloaterScriptQueue* q, const std::string& msg)
|
||||
bool queue_actions(LLFloaterScriptQueue* q, const std::string& msg)
|
||||
{
|
||||
QueueObjects func(q);
|
||||
LLSelectMgr *mgr = LLSelectMgr::getInstance();
|
||||
|
|
@ -9061,6 +9061,7 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& msg)
|
|||
{
|
||||
LL_ERRS() << "Bad logic." << LL_ENDL;
|
||||
}
|
||||
q->closeFloater();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -9069,6 +9070,7 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& msg)
|
|||
LL_WARNS() << "Unexpected script compile failure." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
return !fail;
|
||||
}
|
||||
|
||||
class LLToolsSelectedScriptAction : public view_listener_t
|
||||
|
|
@ -9117,8 +9119,10 @@ class LLToolsSelectedScriptAction : public view_listener_t
|
|||
//if (queue)
|
||||
//{
|
||||
// queue->setMono(mono);
|
||||
// queue_actions(queue, msg);
|
||||
// queue->setTitle(title);
|
||||
// if (queue_actions(queue, msg))
|
||||
// {
|
||||
// queue->setTitle(title);
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
|
|
@ -9192,8 +9196,10 @@ void handle_selected_script_action(const std::string& action)
|
|||
if (queue)
|
||||
{
|
||||
queue->setMono(mono);
|
||||
queue_actions(queue, msg);
|
||||
queue->setTitle(title);
|
||||
if (queue_actions(queue, msg))
|
||||
{
|
||||
queue->setTitle(title);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1973,7 +1973,8 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
|
|||
if (parcel)
|
||||
{
|
||||
// Only update stream if parcel changed (recreated) or music is playing (enabled)
|
||||
if (!agent_parcel_update || gSavedSettings.getBOOL("MediaTentativeAutoPlay"))
|
||||
static LLCachedControl<bool> already_playing(gSavedSettings, "MediaTentativeAutoPlay", true);
|
||||
if (!agent_parcel_update || already_playing)
|
||||
{
|
||||
LLViewerParcelAskPlay::getInstance()->cancelNotification();
|
||||
std::string music_url_raw = parcel->getMusicURL();
|
||||
|
|
@ -1991,7 +1992,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
|
|||
LLViewerRegion *region = LLWorld::getInstance()->getRegion(msg->getSender());
|
||||
if (region)
|
||||
{
|
||||
optionally_start_music(music_url, parcel->mLocalID, region->getRegionID());
|
||||
optionallyStartMusic(music_url, parcel->mLocalID, region->getRegionID(), !agent_parcel_update);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -2029,9 +2030,13 @@ void LLViewerParcelMgr::onStartMusicResponse(const LLUUID ®ion_id, const S32
|
|||
LL_INFOS("ParcelMgr") << "Starting parcel music " << url << LL_ENDL;
|
||||
LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(url);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
|
||||
}
|
||||
}
|
||||
|
||||
void LLViewerParcelMgr::optionally_start_music(const std::string &music_url, const S32 &local_id, const LLUUID ®ion_id)
|
||||
void LLViewerParcelMgr::optionallyStartMusic(const std::string &music_url, const S32 &local_id, const LLUUID ®ion_id, bool switched_parcel)
|
||||
{
|
||||
static LLCachedControl<bool> streaming_music(gSavedSettings, "AudioStreamingMusic", true);
|
||||
if (streaming_music)
|
||||
|
|
@ -2042,25 +2047,35 @@ void LLViewerParcelMgr::optionally_start_music(const std::string &music_url, con
|
|||
// was not *explicitly* stopped by the user. (part of SL-4878)
|
||||
// <FS> Media/Stream separation
|
||||
//LLPanelNearByMedia* nearby_media_panel = gStatusBar->getNearbyMediaPanel();
|
||||
LLViewerAudio* viewer_audio = LLViewerAudio::getInstance();
|
||||
|
||||
//// ask mode //todo constants
|
||||
// ask mode //todo constants
|
||||
//if (autoplay_mode == 2)
|
||||
//{
|
||||
// // stop previous stream
|
||||
// LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
|
||||
|
||||
// // if user set media to play - ask
|
||||
// if ((nearby_media_panel && nearby_media_panel->getParcelAudioAutoStart())
|
||||
// || (!nearby_media_panel && tentative_autoplay))
|
||||
// {
|
||||
// LLViewerParcelAskPlay::getInstance()->askToPlay(region_id,
|
||||
// local_id,
|
||||
// music_url,
|
||||
// onStartMusicResponse);
|
||||
// // user did not stop audio
|
||||
// if (switched_parcel || music_url != viewer_audio->getNextStreamURI())
|
||||
// {
|
||||
// viewer_audio->startInternetStreamWithAutoFade(LLStringUtil::null);
|
||||
|
||||
// LLViewerParcelAskPlay::getInstance()->askToPlay(region_id,
|
||||
// local_id,
|
||||
// music_url,
|
||||
// onStartMusicResponse);
|
||||
// }
|
||||
// // else do nothing:
|
||||
// // Parcel properties changed, but not url.
|
||||
// // We are already playing this url and asked about it when agent entered parcel
|
||||
// // or user started audio manually at some point
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // stopped by the user, do not autoplay
|
||||
// LLViewerParcelAskPlay::getInstance()->cancelNotification();
|
||||
// viewer_audio->startInternetStreamWithAutoFade(LLStringUtil::null);
|
||||
// }
|
||||
//}
|
||||
// autoplay
|
||||
|
|
@ -2082,12 +2097,13 @@ void LLViewerParcelMgr::optionally_start_music(const std::string &music_url, con
|
|||
else
|
||||
{
|
||||
LL_INFOS("ParcelMgr") << "Starting parcel music " << music_url << LL_ENDL;
|
||||
LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(music_url);
|
||||
viewer_audio->startInternetStreamWithAutoFade(music_url);
|
||||
}
|
||||
}
|
||||
else
|
||||
// autoplay off
|
||||
else if(switched_parcel || music_url != viewer_audio->getNextStreamURI())
|
||||
{
|
||||
LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
|
||||
viewer_audio->startInternetStreamWithAutoFade(LLStringUtil::null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ public:
|
|||
//void makeLandmarkAtSelection();
|
||||
|
||||
static void onStartMusicResponse(const LLUUID ®ion_id, const S32 &parcel_id, const std::string &url, const bool &play);
|
||||
static void optionally_start_music(const std::string &music_url, const S32 &local_id, const LLUUID ®ion_id);
|
||||
static void optionallyStartMusic(const std::string &music_url, const S32 &local_id, const LLUUID ®ion_id, bool switched_parcel);
|
||||
|
||||
static void processParcelOverlay(LLMessageSystem *msg, void **user_data);
|
||||
static void processParcelProperties(LLMessageSystem *msg, void **user_data);
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ public:
|
|||
mLandp(NULL)
|
||||
{}
|
||||
|
||||
void buildCapabilityNames(LLSD& capabilityNames);
|
||||
static void buildCapabilityNames(LLSD& capabilityNames);
|
||||
|
||||
// The surfaces and other layers
|
||||
LLSurface* mLandp;
|
||||
|
|
@ -267,6 +267,12 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle)
|
|||
// This loop is used for retrying a capabilities request.
|
||||
do
|
||||
{
|
||||
if (STATE_WORLD_INIT > LLStartUp::getStartupState())
|
||||
{
|
||||
LL_INFOS("AppInit", "Capabilities") << "Aborting capabilities request, reason: returned to login screen" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle);
|
||||
if (!regionp) //region was removed
|
||||
{
|
||||
|
|
@ -315,14 +321,19 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle)
|
|||
regionp = NULL;
|
||||
result = httpAdapter->postAndSuspend(httpRequest, url, capabilityNames);
|
||||
|
||||
// <FS:Ansariel> Fix seed cap retry count
|
||||
//++mSeedCapAttempts;
|
||||
if (STATE_WORLD_INIT > LLStartUp::getStartupState())
|
||||
{
|
||||
LL_INFOS("AppInit", "Capabilities") << "Aborting capabilities request, reason: returned to login screen" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (LLApp::isExiting())
|
||||
if (LLApp::isExiting() || gDisconnected)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
++mSeedCapAttempts;
|
||||
|
||||
regionp = LLWorld::getInstance()->getRegionFromHandle(regionHandle);
|
||||
if (!regionp) //region was removed
|
||||
{
|
||||
|
|
@ -440,7 +451,7 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCompleteCoro(U64 regionHandle)
|
|||
break; // no retry
|
||||
}
|
||||
|
||||
if (LLApp::isExiting())
|
||||
if (LLApp::isExiting() || gDisconnected)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
@ -548,7 +559,7 @@ void LLViewerRegionImpl::requestSimulatorFeatureCoro(std::string url, U64 region
|
|||
continue;
|
||||
}
|
||||
|
||||
if (LLApp::isExiting())
|
||||
if (LLApp::isExiting() || gDisconnected)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
@ -3138,6 +3149,7 @@ void LLViewerRegion::unpackRegionHandshake()
|
|||
mRegionTimer.reset(); //reset region timer.
|
||||
}
|
||||
|
||||
// static
|
||||
void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
|
||||
{
|
||||
capabilityNames.append("AbuseCategories");
|
||||
|
|
|
|||
|
|
@ -397,6 +397,18 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
|
|||
{
|
||||
delete mTextureAnimp;
|
||||
mTextureAnimp = NULL;
|
||||
|
||||
for (S32 i = 0; i < getNumTEs(); i++)
|
||||
{
|
||||
LLFace* facep = mDrawable->getFace(i);
|
||||
if (facep && facep->mTextureMatrix)
|
||||
{
|
||||
// delete or reset
|
||||
delete facep->mTextureMatrix;
|
||||
facep->mTextureMatrix = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
gPipeline.markTextured(mDrawable);
|
||||
mFaceMappingChanged = TRUE;
|
||||
mTexAnimMode = 0;
|
||||
|
|
@ -593,6 +605,18 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys,
|
|||
{
|
||||
delete mTextureAnimp;
|
||||
mTextureAnimp = NULL;
|
||||
|
||||
for (S32 i = 0; i < getNumTEs(); i++)
|
||||
{
|
||||
LLFace* facep = mDrawable->getFace(i);
|
||||
if (facep && facep->mTextureMatrix)
|
||||
{
|
||||
// delete or reset
|
||||
delete facep->mTextureMatrix;
|
||||
facep->mTextureMatrix = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
gPipeline.markTextured(mDrawable);
|
||||
mFaceMappingChanged = TRUE;
|
||||
mTexAnimMode = 0;
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ void LLWatchdog::run()
|
|||
LL_INFOS() << "Watchdog thread delayed: resetting entries." << LL_ENDL;
|
||||
std::for_each(mSuspects.begin(),
|
||||
mSuspects.end(),
|
||||
std::mem_fun(&LLWatchdogEntry::reset)
|
||||
[](SuspectsRegistry::value_type suspect){ suspect->reset(); }
|
||||
);
|
||||
}
|
||||
else
|
||||
|
|
@ -239,7 +239,7 @@ void LLWatchdog::run()
|
|||
SuspectsRegistry::iterator result =
|
||||
std::find_if(mSuspects.begin(),
|
||||
mSuspects.end(),
|
||||
std::not1(std::mem_fun(&LLWatchdogEntry::isAlive))
|
||||
[](SuspectsRegistry::value_type suspect){ return ! suspect->isAlive(); }
|
||||
);
|
||||
if(result != mSuspects.end())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#include "llfloaterreg.h"
|
||||
#include "lllogininstance.h"
|
||||
#include "llparcel.h"
|
||||
#include "llregex.h"
|
||||
#include "llsd.h"
|
||||
#include "llui.h"
|
||||
#include "lluri.h"
|
||||
|
|
@ -51,8 +52,6 @@
|
|||
#include "lluriparser.h"
|
||||
#include "uriparser/Uri.h"
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
bool on_load_url_external_response(const LLSD& notification, const LLSD& response, bool async );
|
||||
|
||||
|
||||
|
|
@ -246,13 +245,13 @@ bool LLWeb::useExternalBrowser(const std::string &url)
|
|||
boost::regex pattern = boost::regex("\\b(lindenlab.com|secondlife.com|secondlife.io|secondlifegrid.net|secondlife-status.statuspage.io)$", boost::regex::perl|boost::regex::icase);
|
||||
// </FS:Ansariel>
|
||||
boost::match_results<std::string::const_iterator> matches;
|
||||
return !(boost::regex_search(uri_string, matches, pattern));
|
||||
return !(ll_regex_search(uri_string, matches, pattern));
|
||||
}
|
||||
else
|
||||
{
|
||||
boost::regex pattern = boost::regex("^mailto:", boost::regex::perl | boost::regex::icase);
|
||||
boost::match_results<std::string::const_iterator> matches;
|
||||
return boost::regex_search(url, matches, pattern);
|
||||
return ll_regex_search(url, matches, pattern);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#include "llimview.h"
|
||||
#include "llinstantmessage.h"
|
||||
#include "llnotificationsutil.h"
|
||||
#include "llregex.h"
|
||||
#include "llregionhandle.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "lltrans.h"
|
||||
|
|
@ -43,7 +44,6 @@
|
|||
#include <boost/algorithm/string/predicate.hpp> // icontains
|
||||
#include <boost/algorithm/string/regex.hpp> // regex_replace_all
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
|
||||
// ============================================================================
|
||||
|
|
@ -220,7 +220,7 @@ bool RlvSettings::isCompatibilityModeObject(const LLUUID& idRlvObject)
|
|||
for (const std::string& strCompatName : s_CompatItemNames)
|
||||
{
|
||||
boost::regex regexp(strCompatName, boost::regex::perl | boost::regex::icase);
|
||||
if (boost::regex_match(strAttachName, regexp))
|
||||
if (ll_regex_match(strAttachName, regexp))
|
||||
{
|
||||
fCompatMode = true;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -135,10 +135,10 @@ namespace tut
|
|||
|
||||
// Instantiate a few GameObjects. Make sure we refer to them
|
||||
// polymorphically, and don't let them leak.
|
||||
std::auto_ptr<GameObject> home;
|
||||
std::auto_ptr<GameObject> obstacle;
|
||||
std::auto_ptr<GameObject> tug;
|
||||
std::auto_ptr<GameObject> patrol;
|
||||
std::unique_ptr<GameObject> home;
|
||||
std::unique_ptr<GameObject> obstacle;
|
||||
std::unique_ptr<GameObject> tug;
|
||||
std::unique_ptr<GameObject> patrol;
|
||||
|
||||
// prototype objects
|
||||
Asteroid dummyAsteroid;
|
||||
|
|
|
|||
Loading…
Reference in New Issue