Merge branch 'master' of git://github.com/siana/SingularityViewer
This commit is contained in:
@@ -30,7 +30,10 @@
|
||||
#include "v3math.h"
|
||||
#include "llstring.h"
|
||||
#include "llxmltree.h"
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
|
||||
class LLPolyMesh;
|
||||
class LLXmlTreeNode;
|
||||
|
||||
@@ -39,7 +39,10 @@
|
||||
#include <boost/iterator/transform_iterator.hpp>
|
||||
#include <boost/iterator/indirect_iterator.hpp>
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
/*****************************************************************************
|
||||
|
||||
@@ -58,7 +58,10 @@ static const int& nil(nil_);
|
||||
|
||||
#include <string>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/iterator/transform_iterator.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
@@ -32,7 +32,10 @@
|
||||
#include "llevents.h"
|
||||
#include "stdtypes.h"
|
||||
#include "lltimer.h"
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Generic base class
|
||||
|
||||
@@ -56,7 +56,10 @@
|
||||
#include <boost/visit_each.hpp>
|
||||
#include <boost/ref.hpp> // reference_wrapper
|
||||
#include <boost/type_traits/is_pointer.hpp>
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include <boost/static_assert.hpp>
|
||||
#include "llsd.h"
|
||||
#include "llsingleton.h"
|
||||
|
||||
@@ -157,6 +157,7 @@
|
||||
|
||||
#if LL_WINDOWS
|
||||
#include "lltimer.h"
|
||||
#include <intrin.h>
|
||||
#elif LL_LINUX || LL_SOLARIS
|
||||
#include <sys/time.h>
|
||||
#include <sched.h>
|
||||
@@ -184,7 +185,7 @@ LLMutex* LLFastTimer::sLogLock = NULL;
|
||||
std::queue<LLSD> LLFastTimer::sLogQueue;
|
||||
const int LLFastTimer::NamedTimer::HISTORY_NUM = 300;
|
||||
|
||||
#if defined(LL_WINDOWS) && !defined(_WIN64)
|
||||
#if defined(LL_WINDOWS)
|
||||
#define USE_RDTSC 1
|
||||
#endif
|
||||
|
||||
@@ -952,34 +953,15 @@ LLFastTimer::LLFastTimer(LLFastTimer::FrameState* state)
|
||||
#if USE_RDTSC
|
||||
U32 LLFastTimer::getCPUClockCount32()
|
||||
{
|
||||
U32 ret_val;
|
||||
__asm
|
||||
{
|
||||
_emit 0x0f
|
||||
_emit 0x31
|
||||
shr eax,8
|
||||
shl edx,24
|
||||
or eax, edx
|
||||
mov dword ptr [ret_val], eax
|
||||
}
|
||||
return ret_val;
|
||||
return (U32)(__rdtsc()>>8);
|
||||
}
|
||||
|
||||
// return full timer value, *not* shifted by 8 bits
|
||||
U64 LLFastTimer::getCPUClockCount64()
|
||||
{
|
||||
U64 ret_val;
|
||||
__asm
|
||||
{
|
||||
_emit 0x0f
|
||||
_emit 0x31
|
||||
mov eax,eax
|
||||
mov edx,edx
|
||||
mov dword ptr [ret_val+4], edx
|
||||
mov dword ptr [ret_val], eax
|
||||
}
|
||||
return ret_val;
|
||||
return (U64)__rdtsc();
|
||||
}
|
||||
|
||||
#else
|
||||
//LL_COMMON_API U64 get_clock_count(); // in lltimer.cpp
|
||||
// These use QueryPerformanceCounter, which is arguably fine and also works on AMD architectures.
|
||||
|
||||
@@ -30,7 +30,10 @@
|
||||
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/is_enum.hpp>
|
||||
|
||||
@@ -34,7 +34,10 @@
|
||||
#include "llstringtable.h"
|
||||
#include "llerror.h" // llassert_always
|
||||
#include <boost/utility.hpp>
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/iterator/transform_iterator.hpp>
|
||||
#include <boost/iterator/indirect_iterator.hpp>
|
||||
|
||||
@@ -29,7 +29,9 @@
|
||||
|
||||
#include <list>
|
||||
|
||||
#include <boost/type_traits.hpp>
|
||||
//#include <boost/type_traits.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
#include <boost/type_traits/add_pointer.hpp>
|
||||
#include "llsingleton.h"
|
||||
#include "llstl.h"
|
||||
|
||||
|
||||
@@ -35,11 +35,8 @@
|
||||
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <set>
|
||||
#include <deque>
|
||||
#include <typeinfo>
|
||||
|
||||
// Use to compare the first element only of a pair
|
||||
@@ -410,7 +407,7 @@ OutputIter ll_transform_n(
|
||||
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;
|
||||
return __x.first;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -418,7 +415,7 @@ 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;
|
||||
return __x.second;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -438,10 +435,10 @@ protected:
|
||||
_Operation2 __op2;
|
||||
public:
|
||||
ll_unary_compose(const _Operation1& __x, const _Operation2& __y)
|
||||
: __op1(__x), __op2(__y) {}
|
||||
: __op1(__x), __op2(__y) {}
|
||||
typename _Operation1::result_type
|
||||
operator()(const typename _Operation2::argument_type& __x) const {
|
||||
return __op1(__op2(__x));
|
||||
return __op1(__op2(__x));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -463,20 +460,20 @@ protected:
|
||||
public:
|
||||
ll_binary_compose(const _Operation1& __x, const _Operation2& __y,
|
||||
const _Operation3& __z)
|
||||
: _M_op1(__x), _M_op2(__y), _M_op3(__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));
|
||||
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)
|
||||
const _Operation3& __op3)
|
||||
{
|
||||
return ll_binary_compose<_Operation1,_Operation2,_Operation3>
|
||||
(__op1, __op2, __op3);
|
||||
(__op1, __op2, __op3);
|
||||
}
|
||||
|
||||
// helpers to deal with the fact that MSDev does not package
|
||||
@@ -491,7 +488,7 @@ protected:
|
||||
public:
|
||||
llbinder1st(const _Operation& __x,
|
||||
const typename _Operation::first_argument_type& __y)
|
||||
: op(__x), value(__y) {}
|
||||
: op(__x), value(__y) {}
|
||||
typename _Operation::result_type
|
||||
operator()(const typename _Operation::second_argument_type& __x) const {
|
||||
return op(value, __x);
|
||||
@@ -539,16 +536,16 @@ inline
|
||||
bool before(const std::type_info* lhs, const std::type_info* rhs)
|
||||
{
|
||||
#if LL_LINUX && defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
|
||||
// If we're building on Linux with gcc, and it's either gcc 3.x or
|
||||
// 4.{0,1,2,3}, then we have to use a workaround. Note that we use gcc on
|
||||
// Mac too, and some people build with gcc on Windows (cygwin or mingw).
|
||||
// On Linux, different load modules may produce different type_info*
|
||||
// pointers for the same type. Have to compare name strings to get good
|
||||
// results.
|
||||
return strcmp(lhs->name(), rhs->name()) < 0;
|
||||
// If we're building on Linux with gcc, and it's either gcc 3.x or
|
||||
// 4.{0,1,2,3}, then we have to use a workaround. Note that we use gcc on
|
||||
// Mac too, and some people build with gcc on Windows (cygwin or mingw).
|
||||
// On Linux, different load modules may produce different type_info*
|
||||
// pointers for the same type. Have to compare name strings to get good
|
||||
// results.
|
||||
return strcmp(lhs->name(), rhs->name()) < 0;
|
||||
#else // not Linux, or gcc 4.4+
|
||||
// Just use before(), as we normally would
|
||||
return lhs->before(*rhs);
|
||||
// Just use before(), as we normally would
|
||||
return lhs->before(*rhs);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -592,10 +589,10 @@ namespace std
|
||||
template <typename T, typename U>
|
||||
struct ll_template_cast_impl
|
||||
{
|
||||
T operator()(U)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
T operator()(U)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -637,7 +634,7 @@ struct ll_template_cast_impl
|
||||
template <typename T, typename U>
|
||||
T ll_template_cast(U value)
|
||||
{
|
||||
return ll_template_cast_impl<T, U>()(value);
|
||||
return ll_template_cast_impl<T, U>()(value);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -648,10 +645,10 @@ T ll_template_cast(U value)
|
||||
template <typename T>
|
||||
struct ll_template_cast_impl<T, T>
|
||||
{
|
||||
T operator()(T value)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
T operator()(T value)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -721,10 +718,10 @@ struct ll_template_cast_impl<T, T>
|
||||
template <> \
|
||||
struct ll_template_cast_impl<DEST, SOURCE> \
|
||||
{ \
|
||||
DEST operator()(SOURCE wrapper) \
|
||||
{ \
|
||||
return wrapper; \
|
||||
} \
|
||||
DEST operator()(SOURCE wrapper) \
|
||||
{ \
|
||||
return wrapper; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -81,10 +81,10 @@ void ms_sleep(U32 ms)
|
||||
|
||||
U32 micro_sleep(U64 us, U32 max_yields)
|
||||
{
|
||||
// max_yields is unused; just fiddle with it to avoid warnings.
|
||||
max_yields = 0;
|
||||
ms_sleep(us / 1000);
|
||||
return 0;
|
||||
// max_yields is unused; just fiddle with it to avoid warnings.
|
||||
max_yields = 0;
|
||||
ms_sleep(us / 1000);
|
||||
return 0;
|
||||
}
|
||||
#elif LL_LINUX || LL_SOLARIS || LL_DARWIN
|
||||
static void _sleep_loop(struct timespec& thiswait)
|
||||
@@ -103,8 +103,8 @@ static void _sleep_loop(struct timespec& thiswait)
|
||||
if (sleep_more)
|
||||
{
|
||||
if ( nextwait.tv_sec > thiswait.tv_sec ||
|
||||
(nextwait.tv_sec == thiswait.tv_sec &&
|
||||
nextwait.tv_nsec >= thiswait.tv_nsec) )
|
||||
(nextwait.tv_sec == thiswait.tv_sec &&
|
||||
nextwait.tv_nsec >= thiswait.tv_nsec) )
|
||||
{
|
||||
// if the remaining time isn't actually going
|
||||
// down then we're being shafted by low clock
|
||||
@@ -130,31 +130,31 @@ static void _sleep_loop(struct timespec& thiswait)
|
||||
|
||||
U32 micro_sleep(U64 us, U32 max_yields)
|
||||
{
|
||||
U64 start = get_clock_count();
|
||||
// This is kernel dependent. Currently, our kernel generates software clock
|
||||
// interrupts at 250 Hz (every 4,000 microseconds).
|
||||
const U64 KERNEL_SLEEP_INTERVAL_US = 4000;
|
||||
U64 start = get_clock_count();
|
||||
// This is kernel dependent. Currently, our kernel generates software clock
|
||||
// interrupts at 250 Hz (every 4,000 microseconds).
|
||||
const U64 KERNEL_SLEEP_INTERVAL_US = 4000;
|
||||
|
||||
S32 num_sleep_intervals = (us - (KERNEL_SLEEP_INTERVAL_US >> 1)) / KERNEL_SLEEP_INTERVAL_US;
|
||||
if (num_sleep_intervals > 0)
|
||||
{
|
||||
U64 sleep_time = (num_sleep_intervals * KERNEL_SLEEP_INTERVAL_US) - (KERNEL_SLEEP_INTERVAL_US >> 1);
|
||||
struct timespec thiswait;
|
||||
thiswait.tv_sec = sleep_time / 1000000;
|
||||
thiswait.tv_nsec = (sleep_time % 1000000) * 1000l;
|
||||
_sleep_loop(thiswait);
|
||||
}
|
||||
S32 num_sleep_intervals = (us - (KERNEL_SLEEP_INTERVAL_US >> 1)) / KERNEL_SLEEP_INTERVAL_US;
|
||||
if (num_sleep_intervals > 0)
|
||||
{
|
||||
U64 sleep_time = (num_sleep_intervals * KERNEL_SLEEP_INTERVAL_US) - (KERNEL_SLEEP_INTERVAL_US >> 1);
|
||||
struct timespec thiswait;
|
||||
thiswait.tv_sec = sleep_time / 1000000;
|
||||
thiswait.tv_nsec = (sleep_time % 1000000) * 1000l;
|
||||
_sleep_loop(thiswait);
|
||||
}
|
||||
|
||||
U64 current_clock = get_clock_count();
|
||||
U32 yields = 0;
|
||||
while ( (yields < max_yields)
|
||||
&& (current_clock - start < us) )
|
||||
{
|
||||
sched_yield();
|
||||
++yields;
|
||||
current_clock = get_clock_count();
|
||||
}
|
||||
return yields;
|
||||
U64 current_clock = get_clock_count();
|
||||
U32 yields = 0;
|
||||
while ( (yields < max_yields)
|
||||
&& (current_clock - start < us) )
|
||||
{
|
||||
sched_yield();
|
||||
++yields;
|
||||
current_clock = get_clock_count();
|
||||
}
|
||||
return yields;
|
||||
}
|
||||
|
||||
void ms_sleep(U32 ms)
|
||||
@@ -163,7 +163,7 @@ void ms_sleep(U32 ms)
|
||||
struct timespec thiswait;
|
||||
thiswait.tv_sec = ms / 1000;
|
||||
thiswait.tv_nsec = (mslong % 1000) * 1000000l;
|
||||
_sleep_loop(thiswait);
|
||||
_sleep_loop(thiswait);
|
||||
}
|
||||
#else
|
||||
# error "architecture not supported"
|
||||
@@ -411,15 +411,15 @@ BOOL LLTimer::knownBadTimer()
|
||||
|
||||
#if LL_WINDOWS
|
||||
WCHAR bad_pci_list[][10] = {L"1039:0530",
|
||||
L"1039:0620",
|
||||
L"10B9:0533",
|
||||
L"10B9:1533",
|
||||
L"1106:0596",
|
||||
L"1106:0686",
|
||||
L"1166:004F",
|
||||
L"1166:0050",
|
||||
L"8086:7110",
|
||||
L"\0"
|
||||
L"1039:0620",
|
||||
L"10B9:0533",
|
||||
L"10B9:1533",
|
||||
L"1106:0596",
|
||||
L"1106:0686",
|
||||
L"1166:004F",
|
||||
L"1166:0050",
|
||||
L"8086:7110",
|
||||
L"\0"
|
||||
};
|
||||
|
||||
HKEY hKey = NULL;
|
||||
|
||||
@@ -63,7 +63,10 @@
|
||||
#include <vector>
|
||||
#include <deque>
|
||||
#include <boost/iterator/iterator_facade.hpp>
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
namespace LLTreeIter
|
||||
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
BOOL set(const std::string& in_string, BOOL emit = TRUE); // Convert from string, if emit is FALSE, do not emit warnings
|
||||
void setNull(); // Faster than setting to LLUUID::null.
|
||||
|
||||
S32 cmpTime(uuid_time_t *t1, uuid_time_t *t2);
|
||||
S32 cmpTime(uuid_time_t *t1, uuid_time_t *t2);
|
||||
static void getSystemTime(uuid_time_t *timestamp);
|
||||
void getCurrentTime(uuid_time_t *timestamp);
|
||||
|
||||
|
||||
@@ -35,7 +35,10 @@
|
||||
#define LL_LLLANDMARK_H
|
||||
|
||||
#include <map>
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include "llframetimer.h"
|
||||
#include "lluuid.h"
|
||||
#include "v3dmath.h"
|
||||
|
||||
@@ -32,7 +32,10 @@
|
||||
#include "llrefcount.h"
|
||||
#include "llrefcount.h"
|
||||
#include "llrect.h"
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include <boost/signals2.hpp>
|
||||
#include "llinitparam.h"
|
||||
#include "lltexture.h"
|
||||
|
||||
@@ -35,7 +35,10 @@
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
|
||||
class LLCallbackMap
|
||||
{
|
||||
|
||||
@@ -37,8 +37,6 @@
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#include <boost/function.hpp>
|
||||
|
||||
#include "llsd.h"
|
||||
#include "llsingleton.h"
|
||||
|
||||
@@ -140,5 +138,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif//LL_LLFUNCTORREGISTRY_H
|
||||
|
||||
|
||||
@@ -92,7 +92,6 @@
|
||||
#include <boost/utility.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
// we want to minimize external dependencies, but this one is important
|
||||
@@ -307,7 +306,7 @@ public:
|
||||
|
||||
// after someone responds to a notification (usually by clicking a button,
|
||||
// but sometimes by filling out a little form and THEN clicking a button),
|
||||
// the result of the response (the name and value of the button clicked,
|
||||
// the result of the response (the name and value of the button clicked,
|
||||
// plus any other data) should be packaged up as LLSD, then passed as a
|
||||
// parameter to the notification's respond() method here. This will look up
|
||||
// and call the appropriate responder.
|
||||
@@ -320,7 +319,7 @@ public:
|
||||
// ["payload"] = transaction specific data, such as ["source_id"] (originator of notification),
|
||||
// ["item_id"] (attached inventory item), etc.
|
||||
// ["substitutions"] = string substitutions used to generate notification message
|
||||
// from the template
|
||||
// from the template
|
||||
// ["time"] = time at which notification was generated;
|
||||
// ["expiry"] = time at which notification expires;
|
||||
// ["responseFunctor"] = name of registered functor that handles responses to notification;
|
||||
@@ -514,7 +513,7 @@ namespace LLNotificationComparators
|
||||
struct orderBy
|
||||
{
|
||||
typedef boost::function<T (LLNotificationPtr)> field_t;
|
||||
orderBy(field_t field, EDirection direction = ORDER_INCREASING) : mField(field), mDirection(direction) {}
|
||||
orderBy(field_t field, EDirection direction = ORDER_INCREASING) : mField(field), mDirection(direction) {}
|
||||
bool operator()(LLNotificationPtr lhs, LLNotificationPtr rhs)
|
||||
{
|
||||
if (mDirection == ORDER_DECREASING)
|
||||
@@ -632,18 +631,18 @@ class LLNotificationChannel :
|
||||
public:
|
||||
virtual ~LLNotificationChannel() {}
|
||||
typedef LLNotificationSet::iterator Iterator;
|
||||
|
||||
|
||||
std::string getName() const { return mName; }
|
||||
std::string getParentChannelName() { return mParent; }
|
||||
|
||||
bool isEmpty() const;
|
||||
|
||||
Iterator begin();
|
||||
Iterator end();
|
||||
|
||||
bool isEmpty() const;
|
||||
|
||||
Iterator begin();
|
||||
Iterator end();
|
||||
|
||||
// Channels have a comparator to control sort order;
|
||||
// Channels have a comparator to control sort order;
|
||||
// the default sorts by arrival date
|
||||
void setComparator(LLNotificationComparator comparator);
|
||||
void setComparator(LLNotificationComparator comparator);
|
||||
|
||||
std::string summarize();
|
||||
|
||||
@@ -654,7 +653,7 @@ public:
|
||||
LLNotificationComparator comparator=LLNotificationComparators::orderByUUID());
|
||||
|
||||
protected:
|
||||
// Notification Channels have a filter, which determines which notifications
|
||||
// Notification Channels have a filter, which determines which notifications
|
||||
// will be added to this channel.
|
||||
// Channel filters cannot change.
|
||||
// Channels have a protected constructor so you can't make smart pointers that don't
|
||||
|
||||
@@ -32,7 +32,10 @@
|
||||
#include "llnotificationptr.h"
|
||||
#include "aialert.h"
|
||||
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
|
||||
class LLSD;
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include "llcoord.h"
|
||||
#include "v2math.h"
|
||||
#include "llinitparam.h"
|
||||
#include "llregistry.h"
|
||||
#include "llrender2dutils.h"
|
||||
#include "llpointer.h"
|
||||
#include "lluicolor.h"
|
||||
@@ -206,7 +205,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~LLUIFactory()
|
||||
virtual ~LLUIFactory()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -406,7 +406,7 @@ BOOL LLUICtrl::isCtrl() const
|
||||
//virtual
|
||||
void LLUICtrl::setValue(const LLSD& value)
|
||||
{
|
||||
mViewModel->setValue(value);
|
||||
mViewModel->setValue(value);
|
||||
}
|
||||
|
||||
//virtual
|
||||
@@ -419,10 +419,10 @@ LLSD LLUICtrl::getValue() const
|
||||
/// change), share their ViewModel.
|
||||
void LLUICtrl::shareViewModelFrom(const LLUICtrl& other)
|
||||
{
|
||||
// Because mViewModel is an LLViewModelPtr, this assignment will quietly
|
||||
// dispose of the previous LLViewModel -- unless it's already shared by
|
||||
// somebody else.
|
||||
mViewModel = other.mViewModel;
|
||||
// Because mViewModel is an LLViewModelPtr, this assignment will quietly
|
||||
// dispose of the previous LLViewModel -- unless it's already shared by
|
||||
// somebody else.
|
||||
mViewModel = other.mViewModel;
|
||||
}
|
||||
|
||||
//virtual
|
||||
@@ -635,7 +635,7 @@ BOOL LLUICtrl::isDirty() const
|
||||
//virtual
|
||||
void LLUICtrl::resetDirty()
|
||||
{
|
||||
mViewModel->resetDirty();
|
||||
mViewModel->resetDirty();
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
||||
@@ -36,7 +36,12 @@
|
||||
|
||||
#include "llrect.h"
|
||||
#include "llsd.h"
|
||||
#include "llregistry.h"
|
||||
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
#include "llinitparam.h"
|
||||
@@ -128,7 +133,7 @@ public:
|
||||
void initFromParams(const Params& p);
|
||||
static const Params& getDefaultParams();
|
||||
LLUICtrl(const Params& p = getDefaultParams(),
|
||||
const LLViewModelPtr& viewmodel=LLViewModelPtr(new LLViewModel));
|
||||
const LLViewModelPtr& viewmodel=LLViewModelPtr(new LLViewModel));
|
||||
// Singu Note: This constructor is deprecated:
|
||||
LLUICtrl( const std::string& name, const LLRect rect = LLRect(), BOOL mouse_opaque = TRUE,
|
||||
commit_callback_t commit_callback = NULL,
|
||||
@@ -139,8 +144,8 @@ public:
|
||||
|
||||
// We need this virtual so we can override it with derived versions
|
||||
virtual LLViewModel* getViewModel() const;
|
||||
// We shouldn't ever need to set this directly
|
||||
//virtual void setViewModel(const LLViewModelPtr&);
|
||||
// We shouldn't ever need to set this directly
|
||||
//virtual void setViewModel(const LLViewModelPtr&);
|
||||
|
||||
virtual BOOL postBuild();
|
||||
|
||||
@@ -179,9 +184,9 @@ public:
|
||||
virtual BOOL getTentative() const;
|
||||
virtual void setValue(const LLSD& value);
|
||||
virtual LLSD getValue() const;
|
||||
/// When two widgets are displaying the same data (e.g. during a skin
|
||||
/// change), share their ViewModel.
|
||||
virtual void shareViewModelFrom(const LLUICtrl& other);
|
||||
/// When two widgets are displaying the same data (e.g. during a skin
|
||||
/// change), share their ViewModel.
|
||||
virtual void shareViewModelFrom(const LLUICtrl& other);
|
||||
|
||||
virtual BOOL setTextArg( const std::string& key, const LLStringExplicit& text );
|
||||
virtual void setIsChrome(BOOL is_chrome);
|
||||
@@ -259,12 +264,12 @@ public:
|
||||
};
|
||||
|
||||
template <typename F, typename DERIVED> class CallbackRegistry : public LLRegistrySingleton<std::string, F, DERIVED >
|
||||
{};
|
||||
{};
|
||||
|
||||
class CommitCallbackRegistry : public CallbackRegistry<commit_callback_t, CommitCallbackRegistry>{};
|
||||
// the enable callback registry is also used for visiblity callbacks
|
||||
class EnableCallbackRegistry : public CallbackRegistry<enable_callback_t, EnableCallbackRegistry>{};
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
static bool controlListener(const LLSD& newvalue, LLHandle<LLUICtrl> handle, std::string type);
|
||||
@@ -282,7 +287,7 @@ protected:
|
||||
|
||||
mouse_signal_t* mDoubleClickSignal;
|
||||
|
||||
LLViewModelPtr mViewModel;
|
||||
LLViewModelPtr mViewModel;
|
||||
|
||||
LLControlVariable* mEnabledControlVariable;
|
||||
boost::signals2::connection mEnabledControlConnection;
|
||||
|
||||
@@ -29,7 +29,10 @@
|
||||
#define LL_LLURLACTION_H
|
||||
|
||||
#include <string>
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
|
||||
///
|
||||
/// The LLUrlAction class provides a number of static functions that
|
||||
|
||||
@@ -31,7 +31,10 @@
|
||||
#include "llregistry.h"
|
||||
#include "llxmlnode.h"
|
||||
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include <iosfwd>
|
||||
#include <stack>
|
||||
#include <set>
|
||||
|
||||
@@ -28,7 +28,10 @@
|
||||
#define LL_LLKEYBOARD_H
|
||||
|
||||
#include <map>
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
|
||||
#include "llstringtable.h"
|
||||
#include "lltimer.h"
|
||||
|
||||
@@ -192,13 +192,13 @@ LLFloaterAO::LLFloaterAO()
|
||||
{
|
||||
// init();
|
||||
llassert_always(sInstance == NULL);
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_ao.xml");
|
||||
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_ao.xml");
|
||||
sInstance = this;
|
||||
}
|
||||
|
||||
LLFloaterAO::~LLFloaterAO()
|
||||
{
|
||||
sInstance=NULL;
|
||||
sInstance=NULL;
|
||||
mcomboBox_stands = 0;
|
||||
mcomboBox_walks = 0;
|
||||
mcomboBox_runs = 0;
|
||||
@@ -221,7 +221,7 @@ LLFloaterAO::~LLFloaterAO()
|
||||
|
||||
void LLFloaterAO::show(void*)
|
||||
{
|
||||
if (!sInstance)
|
||||
if (!sInstance)
|
||||
{
|
||||
sInstance = new LLFloaterAO();
|
||||
updateLayout(sInstance);
|
||||
|
||||
@@ -46,7 +46,10 @@
|
||||
#include "llinventorymodel.h"
|
||||
#include "v3dmath.h"
|
||||
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
|
||||
@@ -563,7 +563,7 @@ LLAppViewer::LLAppViewer() :
|
||||
LL_ERRS() << "Oh no! An instance of LLAppViewer already exists! LLAppViewer is sort of like a singleton." << LL_ENDL;
|
||||
}
|
||||
|
||||
mDumpPath ="";
|
||||
mDumpPath ="";
|
||||
|
||||
// Need to do this initialization before we do anything else, since anything
|
||||
// that touches files should really go through the lldir API
|
||||
@@ -703,9 +703,9 @@ bool LLAppViewer::init()
|
||||
mDumpPath = logdir;
|
||||
setMiniDumpDir(logdir);
|
||||
logdir += gDirUtilp->getDirDelimiter();
|
||||
setDebugFileNames(logdir);
|
||||
setDebugFileNames(logdir);
|
||||
|
||||
mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling"));
|
||||
mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling"));
|
||||
{
|
||||
// Viewer metrics initialization
|
||||
//static LLCachedControl<bool> metrics_submode(gSavedSettings,
|
||||
@@ -721,7 +721,7 @@ bool LLAppViewer::init()
|
||||
LLViewerAssetStatsFF::init();
|
||||
}
|
||||
|
||||
initThreads();
|
||||
initThreads();
|
||||
LL_INFOS("InitInfo") << "Threads initialized." << LL_ENDL ;
|
||||
|
||||
// Load art UUID information, don't require these strings to be declared in code.
|
||||
@@ -756,15 +756,15 @@ bool LLAppViewer::init()
|
||||
LLNotifications::instance().createDefaultChannels();
|
||||
LL_INFOS("InitInfo") << "Notifications initialized." << LL_ENDL ;
|
||||
|
||||
writeSystemInfo();
|
||||
writeSystemInfo();
|
||||
|
||||
// Build a string representing the current version number.
|
||||
gCurrentVersion = llformat("%s %d.%d.%d.%d",
|
||||
gVersionChannel,
|
||||
gVersionMajor,
|
||||
gVersionMinor,
|
||||
gVersionPatch,
|
||||
gVersionBuild );
|
||||
gCurrentVersion = llformat("%s %d.%d.%d.%d",
|
||||
gVersionChannel,
|
||||
gVersionMajor,
|
||||
gVersionMinor,
|
||||
gVersionPatch,
|
||||
gVersionBuild );
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
@@ -774,7 +774,7 @@ bool LLAppViewer::init()
|
||||
|
||||
//
|
||||
// Various introspection concerning the libs we're using - particularly
|
||||
// the libs involved in getting to a full login screen.
|
||||
// the libs involved in getting to a full login screen.
|
||||
//
|
||||
LL_INFOS("InitInfo") << "J2C Engine is: " << LLImageJ2C::getEngineInfo() << LL_ENDL;
|
||||
LL_INFOS("InitInfo") << "libcurl version is: " << LLCurl::getVersionString() << LL_ENDL;
|
||||
@@ -1055,16 +1055,16 @@ void LLAppViewer::initMaxHeapSize()
|
||||
|
||||
HKEY hKey;
|
||||
|
||||
if(fnIsWow64Process && fnIsWow64Process(GetCurrentProcess(), &bWow64Process) && bWow64Process)
|
||||
if(fnIsWow64Process && fnIsWow64Process(GetCurrentProcess(), &bWow64Process) && bWow64Process)
|
||||
{
|
||||
max_heap_size_gb = 3.7f;
|
||||
}
|
||||
else if(ERROR_SUCCESS == RegOpenKey(HKEY_LOCAL_MACHINE, TEXT("SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Memory Management"), &hKey))
|
||||
{
|
||||
DWORD dwSize = sizeof(DWORD);
|
||||
DWORD dwSize = sizeof(DWORD);
|
||||
DWORD dwResult = 0;
|
||||
if(ERROR_SUCCESS == RegQueryValueEx(hKey, TEXT("PhysicalAddressExtension"), NULL, NULL, (LPBYTE)&dwResult, &dwSize))
|
||||
{
|
||||
if(ERROR_SUCCESS == RegQueryValueEx(hKey, TEXT("PhysicalAddressExtension"), NULL, NULL, (LPBYTE)&dwResult, &dwSize))
|
||||
{
|
||||
if(dwResult)
|
||||
max_heap_size_gb = 3.7f;
|
||||
}
|
||||
@@ -1149,17 +1149,17 @@ bool LLAppViewer::mainLoop()
|
||||
LLViewerJoystick* joystick(LLViewerJoystick::getInstance());
|
||||
joystick->setNeedsReset(true);
|
||||
|
||||
LLEventPump& mainloop(LLEventPumps::instance().obtain("mainloop"));
|
||||
LLEventPump& mainloop(LLEventPumps::instance().obtain("mainloop"));
|
||||
|
||||
// merge grid info from web site, if newer.
|
||||
if (gSavedSettings.getBOOL("CheckForGridUpdates"))
|
||||
gHippoGridManager->parseUrl();
|
||||
|
||||
// As we do not (yet) send data on the mainloop LLEventPump that varies
|
||||
// with each frame, no need to instantiate a new LLSD event object each
|
||||
// time. Obviously, if that changes, just instantiate the LLSD at the
|
||||
// point of posting.
|
||||
LLSD newFrame;
|
||||
// As we do not (yet) send data on the mainloop LLEventPump that varies
|
||||
// with each frame, no need to instantiate a new LLSD event object each
|
||||
// time. Obviously, if that changes, just instantiate the LLSD at the
|
||||
// point of posting.
|
||||
LLSD newFrame;
|
||||
|
||||
BOOL restore_rendering_masks = FALSE;
|
||||
|
||||
@@ -1235,8 +1235,8 @@ bool LLAppViewer::mainLoop()
|
||||
mem_leak_instance->idle() ;
|
||||
}
|
||||
|
||||
// canonical per-frame event
|
||||
mainloop.post(newFrame);
|
||||
// canonical per-frame event
|
||||
mainloop.post(newFrame);
|
||||
|
||||
if (!LLApp::isExiting())
|
||||
{
|
||||
@@ -1368,24 +1368,24 @@ bool LLAppViewer::mainLoop()
|
||||
S32 io_pending = 0;
|
||||
{
|
||||
LLFastTimer ftm(FTM_TEXTURE_CACHE);
|
||||
work_pending += LLAppViewer::getTextureCache()->update(1); // unpauses the texture cache thread
|
||||
work_pending += LLAppViewer::getTextureCache()->update(1); // unpauses the texture cache thread
|
||||
}
|
||||
{
|
||||
LLFastTimer ftm(FTM_DECODE);
|
||||
work_pending += LLAppViewer::getImageDecodeThread()->update(1); // unpauses the image thread
|
||||
work_pending += LLAppViewer::getImageDecodeThread()->update(1); // unpauses the image thread
|
||||
}
|
||||
{
|
||||
LLFastTimer ftm(FTM_DECODE);
|
||||
work_pending += LLAppViewer::getTextureFetch()->update(1); // unpauses the texture fetch thread
|
||||
work_pending += LLAppViewer::getTextureFetch()->update(1); // unpauses the texture fetch thread
|
||||
}
|
||||
|
||||
{
|
||||
LLFastTimer ftm(FTM_VFS);
|
||||
io_pending += LLVFSThread::updateClass(1);
|
||||
io_pending += LLVFSThread::updateClass(1);
|
||||
}
|
||||
{
|
||||
LLFastTimer ftm(FTM_LFS);
|
||||
io_pending += LLLFSThread::updateClass(1);
|
||||
io_pending += LLLFSThread::updateClass(1);
|
||||
}
|
||||
|
||||
if (io_pending > 1000)
|
||||
@@ -1536,7 +1536,7 @@ bool LLAppViewer::cleanup()
|
||||
LL_INFOS() << "HUD Objects cleaned up" << LL_ENDL;
|
||||
}
|
||||
|
||||
// End TransferManager before deleting systems it depends on (Audio, VFS, AssetStorage)
|
||||
// End TransferManager before deleting systems it depends on (Audio, VFS, AssetStorage)
|
||||
#if 0 // this seems to get us stuck in an infinite loop...
|
||||
gTransferManager.cleanup();
|
||||
#endif
|
||||
@@ -1667,7 +1667,7 @@ bool LLAppViewer::cleanup()
|
||||
|
||||
// *Note: this is where gViewerStats used to be deleted.
|
||||
|
||||
//end_messaging_system();
|
||||
//end_messaging_system();
|
||||
|
||||
LLFollowCamMgr::cleanupClass();
|
||||
//LLVolumeMgr::cleanupClass();
|
||||
@@ -1797,11 +1797,11 @@ bool LLAppViewer::cleanup()
|
||||
sTextureFetch->shutDownTextureCacheThread();
|
||||
sTextureFetch->shutDownImageDecodeThread();
|
||||
delete sTextureCache;
|
||||
sTextureCache = NULL;
|
||||
sTextureCache = NULL;
|
||||
delete sTextureFetch;
|
||||
sTextureFetch = NULL;
|
||||
sTextureFetch = NULL;
|
||||
delete sImageDecodeThread;
|
||||
sImageDecodeThread = NULL;
|
||||
sImageDecodeThread = NULL;
|
||||
|
||||
|
||||
LL_INFOS() << "Cleaning up Media and Textures" << LL_ENDL;
|
||||
@@ -1884,7 +1884,7 @@ bool LLAppViewer::cleanup()
|
||||
|
||||
MEM_TRACK_RELEASE
|
||||
|
||||
LL_INFOS() << "Goodbye!" << LL_ENDL;
|
||||
LL_INFOS() << "Goodbye!" << LL_ENDL;
|
||||
|
||||
// return 0;
|
||||
return true;
|
||||
@@ -2001,8 +2001,8 @@ bool init_logging()
|
||||
}
|
||||
|
||||
bool LLAppViewer::loadSettingsFromDirectory(AIReadAccess<settings_map_type> const& settings_r,
|
||||
std::string const& location_key,
|
||||
bool set_defaults)
|
||||
std::string const& location_key,
|
||||
bool set_defaults)
|
||||
{
|
||||
// Find and vet the location key.
|
||||
if(!mSettingsLocationList.has(location_key))
|
||||
@@ -2033,7 +2033,7 @@ bool LLAppViewer::loadSettingsFromDirectory(AIReadAccess<settings_map_type> cons
|
||||
settings_map_type::const_iterator const settings_group_iter = settings_r->find(settings_group);
|
||||
|
||||
LL_INFOS() << "Attempting to load settings for the group " << settings_group
|
||||
<< " - from location " << location_key << LL_ENDL;
|
||||
<< " - from location " << location_key << LL_ENDL;
|
||||
|
||||
if(settings_group_iter == settings_r->end())
|
||||
{
|
||||
@@ -2125,7 +2125,7 @@ bool LLAppViewer::initConfiguration()
|
||||
LL_INFOS() << "Loading settings file list" << settings_file_list << LL_ENDL;
|
||||
if (0 == settings_control.loadFromFile(settings_file_list))
|
||||
{
|
||||
LL_ERRS() << "Cannot load default configuration file " << settings_file_list << LL_ENDL;
|
||||
LL_ERRS() << "Cannot load default configuration file " << settings_file_list << LL_ENDL;
|
||||
}
|
||||
|
||||
mSettingsLocationList = settings_control.getLLSD("Locations");
|
||||
@@ -2136,7 +2136,7 @@ bool LLAppViewer::initConfiguration()
|
||||
// - set procedural settings values
|
||||
// - read command line settings
|
||||
// - selectively apply settings needed to load user settings.
|
||||
// - load overrides from user_settings
|
||||
// - load overrides from user_settings
|
||||
// - apply command line settings (to override the overrides)
|
||||
// - load per account settings (happens in llstartup
|
||||
|
||||
@@ -2159,7 +2159,7 @@ bool LLAppViewer::initConfiguration()
|
||||
|
||||
// - set procedural settings
|
||||
gSavedSettings.setString("ClientSettingsFile",
|
||||
gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global")));
|
||||
gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global")));
|
||||
|
||||
gSavedSettings.setString("VersionChannelName", gVersionChannel);
|
||||
|
||||
@@ -2305,33 +2305,33 @@ bool LLAppViewer::initConfiguration()
|
||||
return false;
|
||||
}
|
||||
|
||||
if(clp.hasOption("set"))
|
||||
{
|
||||
const LLCommandLineParser::token_vector_t& set_values = clp.getOption("set");
|
||||
if(0x1 & set_values.size())
|
||||
{
|
||||
LL_WARNS() << "Invalid '--set' parameter count." << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
LLCommandLineParser::token_vector_t::const_iterator itr = set_values.begin();
|
||||
for(; itr != set_values.end(); ++itr)
|
||||
{
|
||||
const std::string& name = *itr;
|
||||
const std::string& value = *(++itr);
|
||||
LLControlVariable* c = settings[sGlobalSettingsName]->getControl(name);
|
||||
if(c)
|
||||
{
|
||||
c->setValue(value, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS() << "'--set' specified with unknown setting: '"
|
||||
<< name << "'." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(clp.hasOption("set"))
|
||||
{
|
||||
const LLCommandLineParser::token_vector_t& set_values = clp.getOption("set");
|
||||
if(0x1 & set_values.size())
|
||||
{
|
||||
LL_WARNS() << "Invalid '--set' parameter count." << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
LLCommandLineParser::token_vector_t::const_iterator itr = set_values.begin();
|
||||
for(; itr != set_values.end(); ++itr)
|
||||
{
|
||||
const std::string& name = *itr;
|
||||
const std::string& value = *(++itr);
|
||||
LLControlVariable* c = settings[sGlobalSettingsName]->getControl(name);
|
||||
if(c)
|
||||
{
|
||||
c->setValue(value, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS() << "'--set' specified with unknown setting: '"
|
||||
<< name << "'." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!gHippoGridManager)
|
||||
{
|
||||
@@ -2359,40 +2359,40 @@ bool LLAppViewer::initConfiguration()
|
||||
|
||||
// Handle slurl use. NOTE: Don't let SL-55321 reappear.
|
||||
|
||||
// *FIX: This init code should be made more robust to prevent
|
||||
// the issue SL-55321 from returning. One thought is to allow
|
||||
// only select options to be set from command line when a slurl
|
||||
// is specified. More work on the settings system is needed to
|
||||
// achieve this. For now...
|
||||
// *FIX: This init code should be made more robust to prevent
|
||||
// the issue SL-55321 from returning. One thought is to allow
|
||||
// only select options to be set from command line when a slurl
|
||||
// is specified. More work on the settings system is needed to
|
||||
// achieve this. For now...
|
||||
|
||||
// *NOTE:Mani The command line parser parses tokens and is
|
||||
// setup to bail after parsing the '--url' option or the
|
||||
// first option specified without a '--option' flag (or
|
||||
// any other option that uses the 'last_option' setting -
|
||||
// see LLControlGroupCLP::configure())
|
||||
// *NOTE:Mani The command line parser parses tokens and is
|
||||
// setup to bail after parsing the '--url' option or the
|
||||
// first option specified without a '--option' flag (or
|
||||
// any other option that uses the 'last_option' setting -
|
||||
// see LLControlGroupCLP::configure())
|
||||
|
||||
// What can happen is that someone can use IE (or potentially
|
||||
// other browsers) and do the rough equivalent of command
|
||||
// injection and steal passwords. Phoenix. SL-55321
|
||||
if(clp.hasOption("url"))
|
||||
{
|
||||
// What can happen is that someone can use IE (or potentially
|
||||
// other browsers) and do the rough equivalent of command
|
||||
// injection and steal passwords. Phoenix. SL-55321
|
||||
if(clp.hasOption("url"))
|
||||
{
|
||||
LLStartUp::setStartSLURL(LLSLURL(clp.getOption("url")[0]));
|
||||
if(LLStartUp::getStartSLURL().getType() == LLSLURL::LOCATION)
|
||||
{
|
||||
gHippoGridManager->setCurrentGrid(LLStartUp::getStartSLURL().getGrid());
|
||||
}
|
||||
}
|
||||
else if(clp.hasOption("slurl"))
|
||||
{
|
||||
}
|
||||
else if(clp.hasOption("slurl"))
|
||||
{
|
||||
LLSLURL start_slurl(clp.getOption("slurl")[0]);
|
||||
LLStartUp::setStartSLURL(start_slurl);
|
||||
}
|
||||
}
|
||||
|
||||
const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent");
|
||||
if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString())
|
||||
{
|
||||
gDirUtilp->setSkinFolder(skinfolder->getValue().asString());
|
||||
}
|
||||
const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent");
|
||||
if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString())
|
||||
{
|
||||
gDirUtilp->setSkinFolder(skinfolder->getValue().asString());
|
||||
}
|
||||
|
||||
// XUI:translate
|
||||
gSecondLife = "Singularity Viewer";
|
||||
@@ -2460,9 +2460,9 @@ bool LLAppViewer::initConfiguration()
|
||||
|
||||
if (!gSavedSettings.getBOOL("AllowMultipleViewers"))
|
||||
{
|
||||
//
|
||||
// Check for another instance of the app running
|
||||
//
|
||||
//
|
||||
// Check for another instance of the app running
|
||||
//
|
||||
|
||||
mSecondInstance = anotherInstanceRunning();
|
||||
|
||||
@@ -2478,8 +2478,8 @@ bool LLAppViewer::initConfiguration()
|
||||
}
|
||||
|
||||
initMarkerFile();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
mSecondInstance = anotherInstanceRunning();
|
||||
@@ -2497,10 +2497,10 @@ bool LLAppViewer::initConfiguration()
|
||||
}
|
||||
|
||||
initMarkerFile();
|
||||
|
||||
|
||||
}
|
||||
|
||||
// need to do this here - need to have initialized global settings first
|
||||
// need to do this here - need to have initialized global settings first
|
||||
std::string nextLoginLocation = gSavedSettings.getString( "NextLoginLocation" );
|
||||
if ( !nextLoginLocation.empty() )
|
||||
{
|
||||
@@ -2584,19 +2584,19 @@ bool LLAppViewer::initWindow()
|
||||
|
||||
void LLAppViewer::writeDebugInfo(bool isStatic)
|
||||
{
|
||||
//Try to do the minimum when writing data during a crash.
|
||||
std::string* debug_filename;
|
||||
debug_filename = ( isStatic
|
||||
? getStaticDebugFile()
|
||||
: getDynamicDebugFile() );
|
||||
|
||||
//Try to do the minimum when writing data during a crash.
|
||||
std::string* debug_filename;
|
||||
debug_filename = ( isStatic
|
||||
? getStaticDebugFile()
|
||||
: getDynamicDebugFile() );
|
||||
|
||||
LL_INFOS() << "Opening debug file " << *debug_filename << LL_ENDL;
|
||||
llofstream out_file(*debug_filename);
|
||||
|
||||
isStatic ? LLSDSerialize::toPrettyXML(gDebugInfo, out_file)
|
||||
: LLSDSerialize::toPrettyXML(gDebugInfo["Dynamic"], out_file);
|
||||
|
||||
|
||||
|
||||
isStatic ? LLSDSerialize::toPrettyXML(gDebugInfo, out_file)
|
||||
: LLSDSerialize::toPrettyXML(gDebugInfo["Dynamic"], out_file);
|
||||
|
||||
|
||||
out_file.close();
|
||||
}
|
||||
|
||||
@@ -2647,10 +2647,10 @@ void LLAppViewer::removeCacheFiles(const std::string& file_mask)
|
||||
|
||||
void LLAppViewer::writeSystemInfo()
|
||||
{
|
||||
|
||||
if (! gDebugInfo.has("Dynamic") )
|
||||
gDebugInfo["Dynamic"] = LLSD::emptyMap();
|
||||
|
||||
|
||||
if (! gDebugInfo.has("Dynamic") )
|
||||
gDebugInfo["Dynamic"] = LLSD::emptyMap();
|
||||
|
||||
gDebugInfo["SLLog"] = LLError::logFileName();
|
||||
|
||||
gDebugInfo["ClientInfo"]["Name"] = gVersionChannel;
|
||||
@@ -2821,7 +2821,7 @@ void LLAppViewer::handleViewerCrash()
|
||||
// The crash is being handled here so set this value to false.
|
||||
// Otherwise the crash logger will think this crash was a freeze.
|
||||
gDebugInfo["Dynamic"]["CrashNotHandled"] = (LLSD::Boolean)false;
|
||||
|
||||
|
||||
//Write out the crash status file
|
||||
//Use marker file style setup, as that's the simplest, especially since
|
||||
//we're already in a crash situation
|
||||
@@ -2848,7 +2848,7 @@ void LLAppViewer::handleViewerCrash()
|
||||
gDebugInfo["Dynamic"]["MinidumpPath"] = minidump_file;
|
||||
}
|
||||
|
||||
gDebugInfo["Dynamic"]["CrashType"]="crash";
|
||||
gDebugInfo["Dynamic"]["CrashType"]="crash";
|
||||
|
||||
if (gMessageSystem && gDirUtilp)
|
||||
{
|
||||
@@ -3021,10 +3021,10 @@ void LLAppViewer::removeMarkerFile(bool leave_logout_marker)
|
||||
|
||||
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);
|
||||
//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);
|
||||
}
|
||||
|
||||
void LLAppViewer::forceQuit()
|
||||
@@ -3130,7 +3130,7 @@ static bool finish_early_exit(const LLSD& notification, const LLSD& response)
|
||||
|
||||
void LLAppViewer::earlyExit(const std::string& name, const LLSD& substitutions)
|
||||
{
|
||||
LL_WARNS() << "app_early_exit: " << name << LL_ENDL;
|
||||
LL_WARNS() << "app_early_exit: " << name << LL_ENDL;
|
||||
gDoDisconnect = TRUE;
|
||||
LLNotificationsUtil::add(name, substitutions, LLSD(), finish_early_exit);
|
||||
}
|
||||
@@ -3138,7 +3138,7 @@ void LLAppViewer::earlyExit(const std::string& name, const LLSD& substitutions)
|
||||
|
||||
void LLAppViewer::abortQuit()
|
||||
{
|
||||
LL_INFOS() << "abortQuit()" << LL_ENDL;
|
||||
LL_INFOS() << "abortQuit()" << LL_ENDL;
|
||||
mQuitRequested = false;
|
||||
}
|
||||
|
||||
@@ -3215,39 +3215,39 @@ void LLAppViewer::migrateCacheDirectory()
|
||||
|
||||
void dumpVFSCaches()
|
||||
{
|
||||
LL_INFOS() << "======= Static VFS ========" << LL_ENDL;
|
||||
gStaticVFS->listFiles();
|
||||
LL_INFOS() << "======= Static VFS ========" << LL_ENDL;
|
||||
gStaticVFS->listFiles();
|
||||
#if LL_WINDOWS
|
||||
LL_INFOS() << "======= Dumping static VFS to StaticVFSDump ========" << LL_ENDL;
|
||||
WCHAR w_str[MAX_PATH];
|
||||
GetCurrentDirectory(MAX_PATH, w_str);
|
||||
S32 res = LLFile::mkdir("StaticVFSDump");
|
||||
if (res == -1)
|
||||
{
|
||||
if (errno != EEXIST)
|
||||
{
|
||||
LL_WARNS() << "Couldn't create dir StaticVFSDump" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
SetCurrentDirectory(utf8str_to_utf16str("StaticVFSDump").c_str());
|
||||
gStaticVFS->dumpFiles();
|
||||
SetCurrentDirectory(w_str);
|
||||
LL_INFOS() << "======= Dumping static VFS to StaticVFSDump ========" << LL_ENDL;
|
||||
WCHAR w_str[MAX_PATH];
|
||||
GetCurrentDirectory(MAX_PATH, w_str);
|
||||
S32 res = LLFile::mkdir("StaticVFSDump");
|
||||
if (res == -1)
|
||||
{
|
||||
if (errno != EEXIST)
|
||||
{
|
||||
LL_WARNS() << "Couldn't create dir StaticVFSDump" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
SetCurrentDirectory(utf8str_to_utf16str("StaticVFSDump").c_str());
|
||||
gStaticVFS->dumpFiles();
|
||||
SetCurrentDirectory(w_str);
|
||||
#endif
|
||||
LL_INFOS() << "========= Dynamic VFS ====" << LL_ENDL;
|
||||
gVFS->listFiles();
|
||||
LL_INFOS() << "========= Dynamic VFS ====" << LL_ENDL;
|
||||
gVFS->listFiles();
|
||||
#if LL_WINDOWS
|
||||
LL_INFOS() << "========= Dumping dynamic VFS to VFSDump ====" << LL_ENDL;
|
||||
res = LLFile::mkdir("VFSDump");
|
||||
if (res == -1)
|
||||
{
|
||||
if (errno != EEXIST)
|
||||
{
|
||||
LL_WARNS() << "Couldn't create dir VFSDump" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
SetCurrentDirectory(utf8str_to_utf16str("VFSDump").c_str());
|
||||
gVFS->dumpFiles();
|
||||
SetCurrentDirectory(w_str);
|
||||
LL_INFOS() << "========= Dumping dynamic VFS to VFSDump ====" << LL_ENDL;
|
||||
res = LLFile::mkdir("VFSDump");
|
||||
if (res == -1)
|
||||
{
|
||||
if (errno != EEXIST)
|
||||
{
|
||||
LL_WARNS() << "Couldn't create dir VFSDump" << LL_ENDL;
|
||||
}
|
||||
}
|
||||
SetCurrentDirectory(utf8str_to_utf16str("VFSDump").c_str());
|
||||
gVFS->dumpFiles();
|
||||
SetCurrentDirectory(w_str);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -3544,7 +3544,7 @@ bool finish_disconnect(const LLSD& notification, const LLSD& response)
|
||||
|
||||
if (1 == option)
|
||||
{
|
||||
LLAppViewer::instance()->forceQuit();
|
||||
LLAppViewer::instance()->forceQuit();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -3560,11 +3560,11 @@ bool finish_forced_disconnect(const LLSD& notification, const LLSD& response)
|
||||
void LLAppViewer::forceDisconnect(const std::string& mesg)
|
||||
{
|
||||
if (gDoDisconnect)
|
||||
{
|
||||
{
|
||||
// Already popped up one of these dialogs, don't
|
||||
// do this again.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Translate the message if possible
|
||||
std::string big_reason = LLAgent::sTeleportErrorMessages[mesg];
|
||||
@@ -4297,7 +4297,7 @@ void LLAppViewer::sendLogoutRequest()
|
||||
if (mLogoutMarkerFile)
|
||||
{
|
||||
LL_INFOS() << "Created logout marker file " << mLogoutMarkerFileName << LL_ENDL;
|
||||
apr_file_close(mLogoutMarkerFile);
|
||||
apr_file_close(mLogoutMarkerFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4333,15 +4333,15 @@ void LLAppViewer::idleNameCache()
|
||||
if (have_capability)
|
||||
{
|
||||
// we have support for display names, use it
|
||||
U32 url_size = name_lookup_url.size();
|
||||
// capabilities require URLs with slashes before query params:
|
||||
// https://<host>:<port>/cap/<uuid>/?ids=<blah>
|
||||
// but the caps are granted like:
|
||||
// https://<host>:<port>/cap/<uuid>
|
||||
if (url_size > 0 && name_lookup_url[url_size-1] != '/')
|
||||
{
|
||||
name_lookup_url += '/';
|
||||
}
|
||||
U32 url_size = name_lookup_url.size();
|
||||
// capabilities require URLs with slashes before query params:
|
||||
// https://<host>:<port>/cap/<uuid>/?ids=<blah>
|
||||
// but the caps are granted like:
|
||||
// https://<host>:<port>/cap/<uuid>
|
||||
if (url_size > 0 && name_lookup_url[url_size-1] != '/')
|
||||
{
|
||||
name_lookup_url += '/';
|
||||
}
|
||||
LLAvatarNameCache::setNameLookupURL(name_lookup_url);
|
||||
}
|
||||
else
|
||||
@@ -4476,7 +4476,7 @@ void LLAppViewer::idleNetwork()
|
||||
LLUUID this_region_id = agent_region->getRegionID();
|
||||
bool this_region_alive = agent_region->isAlive();
|
||||
if ((mAgentRegionLastAlive && !this_region_alive) // newly dead
|
||||
&& (mAgentRegionLastID == this_region_id)) // same region
|
||||
&& (mAgentRegionLastID == this_region_id)) // same region
|
||||
{
|
||||
forceDisconnect(LLTrans::getString("AgentLostConnection"));
|
||||
}
|
||||
@@ -4492,7 +4492,7 @@ void LLAppViewer::idleAudio()
|
||||
|
||||
if (gAudiop)
|
||||
{
|
||||
audio_update_volume();
|
||||
audio_update_volume();
|
||||
audio_update_listener();
|
||||
|
||||
// this line actually commits the changes we've made to source positions, etc.
|
||||
@@ -4632,37 +4632,37 @@ void LLAppViewer::disconnectViewer()
|
||||
|
||||
void LLAppViewer::forceErrorLLError()
|
||||
{
|
||||
LL_ERRS() << "This is an llerror" << LL_ENDL;
|
||||
LL_ERRS() << "This is an llerror" << LL_ENDL;
|
||||
}
|
||||
|
||||
void LLAppViewer::forceErrorBreakpoint()
|
||||
{
|
||||
#ifdef LL_WINDOWS
|
||||
DebugBreak();
|
||||
DebugBreak();
|
||||
#endif
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
void LLAppViewer::forceErrorBadMemoryAccess()
|
||||
{
|
||||
S32* crash = NULL;
|
||||
*crash = 0xDEADBEEF;
|
||||
return;
|
||||
S32* crash = NULL;
|
||||
*crash = 0xDEADBEEF;
|
||||
return;
|
||||
}
|
||||
|
||||
void LLAppViewer::forceErrorInfiniteLoop()
|
||||
{
|
||||
while(true)
|
||||
{
|
||||
;
|
||||
}
|
||||
return;
|
||||
while(true)
|
||||
{
|
||||
;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void LLAppViewer::forceErrorSoftwareException()
|
||||
{
|
||||
// *FIX: Any way to insure it won't be handled?
|
||||
throw;
|
||||
// *FIX: Any way to insure it won't be handled?
|
||||
throw;
|
||||
}
|
||||
|
||||
void LLAppViewer::forceErrorDriverCrash()
|
||||
|
||||
@@ -48,7 +48,10 @@
|
||||
#include "llfloater.h"
|
||||
#include "llinstancetracker.h"
|
||||
#include <map>
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
class LLUICtrl;
|
||||
|
||||
@@ -27,7 +27,10 @@
|
||||
#ifndef LL_LLLANDMARKLIST_H
|
||||
#define LL_LLLANDMARKLIST_H
|
||||
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include <map>
|
||||
#include "lllandmark.h"
|
||||
#include "lluuid.h"
|
||||
|
||||
@@ -30,7 +30,10 @@
|
||||
|
||||
|
||||
#include <llsd.h>
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
#include "llsingleton.h"
|
||||
|
||||
@@ -30,7 +30,10 @@
|
||||
|
||||
|
||||
#include <llsd.h>
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
|
||||
@@ -39,7 +39,10 @@
|
||||
#include "lluploadfloaterobservers.h"
|
||||
#include "aistatemachinethread.h"
|
||||
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
|
||||
class LLVOVolume;
|
||||
class LLMeshResponder;
|
||||
|
||||
@@ -65,7 +65,10 @@
|
||||
#include "llwearablelist.h"
|
||||
#include "llinventoryicon.h"
|
||||
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
|
||||
// subparts of the UI for focus, camera position, etc.
|
||||
enum ESubpart
|
||||
|
||||
@@ -34,7 +34,10 @@
|
||||
#include <map>
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
|
||||
@@ -30,7 +30,10 @@
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
#include "llpathfindinglinkset.h"
|
||||
|
||||
@@ -30,7 +30,10 @@
|
||||
#include <string>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
#include "llpathfindingnavmeshstatus.h"
|
||||
|
||||
@@ -30,7 +30,10 @@
|
||||
#include <string>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
#include "llavatarname.h"
|
||||
|
||||
@@ -73,8 +73,8 @@ LLPreviewTexture::LLPreviewTexture(const std::string& name,
|
||||
mLoadingFullImage( FALSE ),
|
||||
mShowKeepDiscard(show_keep_discard),
|
||||
mCopyToInv(FALSE),
|
||||
mIsCopyable(FALSE),
|
||||
mUpdateDimensions(TRUE),
|
||||
mIsCopyable(FALSE),
|
||||
mUpdateDimensions(TRUE),
|
||||
mLastHeight(0),
|
||||
mLastWidth(0),
|
||||
mAspectRatio(0.f),
|
||||
|
||||
@@ -33,7 +33,10 @@
|
||||
#include "llparcelselection.h"
|
||||
#include "llui.h"
|
||||
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
class LLUUID;
|
||||
|
||||
@@ -33,7 +33,10 @@
|
||||
#ifndef LL_LLTHREADWATCHDOG_H
|
||||
#define LL_LLTHREADWATCHDOG_H
|
||||
|
||||
#ifndef BOOST_FUNCTION_HPP_INCLUDED
|
||||
#include <boost/function.hpp>
|
||||
#define BOOST_FUNCTION_HPP_INCLUDED
|
||||
#endif
|
||||
|
||||
#ifndef LL_TIMER_H
|
||||
#include "lltimer.h"
|
||||
|
||||
Reference in New Issue
Block a user