Commit Graph

115 Commits (bd008a170898e69beeb8bc0481b4bfd94de86c55)

Author SHA1 Message Date
Nat Goodspeed 94a50320fb DRTVWR-476: Remove special case for listen(boost::bind(weak_ptr)).
LLEventDetail::visit_and_connect() promised special treatment for the
specific case when an LLEventPump::listen() listener was composed of (possibly
nested) boost::bind() objects storing boost::weak_ptr values -- specifically
boost::bind() rather than std::bind or lambdas, specifically boost::weak_ptr
rather than std::weak_ptr.

Outside of self-tests, it does not appear that anyone actually uses that
support.

There is good reason not to: it's a silent side effect of a complicated
compile-time inspection that could be silently derailed by use of std::bind()
or a lambda or a std::weak_ptr. Can you be sure you've engaged that promise?
How?

A more robust guarantee can be achieved by storing an LLTempBoundConnection in
the transient object itself. When the object is destroyed, the listener is
disconnected. Normal C++ rules around object destruction guarantee it. This
idiom is widely used.

There are a couple good reasons to remove the visit_and_connect() machinery:

* boost::bind() and boost::weak_ptr do not constitute the wave of the future.
  Preferring those constructs to lambdas and std::weak_ptr penalizes new code,
  whether by silently failing or by discouraging use of modern idioms.
* The visit_and_connect() machinery was always complicated, and apparently
  never very robust. Most of its promised features have been commented out
  over the years. Making the code base simpler, clearer and more maintainable
  is always a useful effect.

LLEventDetail::visit_and_connect() was also used by the four
LLNotificationChannelBase::connectMumble() methods. Streamline those as well.

Of course, remove related test code.
2019-10-15 23:06:04 -04:00
Nat Goodspeed f82548b931 MAINT-8474: Xcode 9.3 insists that comparators use const operator(). 2018-03-31 10:59:39 -04:00
AndreyL ProductEngine dcb6a850aa MAINT-7356 Improved the notification appearance 2017-07-25 03:18:59 +03:00
AndreyL ProductEngine 2efa40fa60 MAINT-7356 Logic fix and cleanup 2017-07-21 05:29:51 +03:00
Kitty Barnett d7edeb2df8 STORM-2149: Add a warning notification when deleting a folder of filtered content 2017-06-02 16:44:00 +02:00
Mnikolenko Productengine 561cee12d8 MAINT-2585 Make permission request notifications permanent until action taken 2017-05-25 16:51:45 +03:00
Nat Goodspeed d2c3c2f9fe MAINT-5232: Normalize LLSingleton subclasses.
A shocking number of LLSingleton subclasses had public constructors -- and in
several instances, were being explicitly instantiated independently of the
LLSingleton machinery. This breaks the new LLSingleton dependency-tracking
machinery. It seems only fair that if you say you want an LLSingleton, there
should only be ONE INSTANCE!

Introduce LLSINGLETON() and LLSINGLETON_EMPTY_CTOR() macros. These handle the
friend class LLSingleton<whatevah>;
and explicitly declare a private nullary constructor.

To try to enforce the LLSINGLETON() convention, introduce a new pure virtual
LLSingleton method you_must_use_LLSINGLETON_macro() which is, as you might
suspect, defined by the macro. If you declare an LLSingleton subclass without
using LLSINGLETON() or LLSINGLETON_EMPTY_CTOR() in the class body, you can't
instantiate the subclass for lack of a you_must_use_LLSINGLETON_macro()
implementation -- which will hopefully remind the coder.

Trawl through ALL LLSingleton subclass definitions, sprinkling in
LLSINGLETON() or LLSINGLETON_EMPTY_CTOR() as appropriate. Remove all explicit
constructor declarations, public or private, along with relevant 'friend class
LLSingleton<myself>' declarations. Where destructors are declared, move them
into private section as well. Where the constructor was inline but nontrivial,
move out of class body.

Fix several LLSingleton abuses revealed by making ctors/dtors private:

LLGlobalEconomy was both an LLSingleton and the base class for
LLRegionEconomy, a non-LLSingleton. (Therefore every LLRegionEconomy instance
contained another instance of the LLGlobalEconomy "singleton.") Extract
LLBaseEconomy; LLGlobalEconomy is now a trivial subclass of that.
LLRegionEconomy, as you might suspect, now derives from LLBaseEconomy.

LLToolGrab, an LLSingleton, was also explicitly instantiated by
LLToolCompGun's constructor. Extract LLToolGrabBase, explicitly instantiated,
with trivial subclass LLToolGrab, the LLSingleton instance.

(WARNING: LLToolGrabBase methods have an unnerving tendency to go after
LLToolGrab::getInstance(). I DO NOT KNOW what should be the relationship
between the instance in LLToolCompGun and the LLToolGrab singleton instance.)

LLGridManager declared a variant constructor accepting (const std::string&),
with the comment:
// initialize with an explicity grid file for testing.
As there is no evidence of this being called from anywhere, delete it.

LLChicletBar's constructor accepted an optional (const LLSD&). As the LLSD
parameter wasn't used, and as there is no evidence of it being passed from
anywhere, delete the parameter.

LLViewerWindow::shutdownViews() was checking LLNavigationBar::
instanceExists(), then deleting its getInstance() pointer -- leaving a
dangling LLSingleton instance pointer, a land mine if any subsequent code
should attempt to reference it. Use deleteSingleton() instead.

~LLAppViewer() was calling LLViewerEventRecorder::instance() and then
explicitly calling ~LLViewerEventRecorder() on that instance -- leaving the
LLSingleton instance pointer pointing to an allocated-but-destroyed instance.
Use deleteSingleton() instead.
2016-09-15 20:18:12 -04:00
Oz Linden 950c41d184 merge 4.0.4-release and MAINT-5974 2016-05-06 10:28:42 -04:00
andreykproductengine 230fc28d8a MAINT-6097 FIXED On required update, clicking link to release notes opens browser behind menu 2016-03-11 20:16:03 +02:00
Oz Linden bc22e58743 merge changes for 4.0.1-release 2016-01-15 16:55:04 -05:00
AndreyL ProductEngine 30446d6afc MAINT-6018 Open URL dialog spam
Added the ability to close all notifications from one owner at once
2016-01-11 03:24:36 +02:00
AndreyL ProductEngine 29cb3a4a93 MAINT-6018 Open URL dialog spam
Added the ability to close all notifications from one owner at once
2016-01-11 03:24:36 +02:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
dolphin 487fce4afa Merge with 3.7.11-release 2014-07-09 15:22:12 -07:00
Cho 43d12faffe Added COMBINE_WITH_NEW for notifications for ACME-1471 2014-05-17 04:21:56 +01:00
Nat Goodspeed b4796595f2 Automated merge with http://hg.secondlife.com/viewer-release 2014-05-06 16:03:07 -04:00
Nat Goodspeed ba892274b3 DRTVWR-363: Fix LLNotificationsListener::listChannels() channel walk.
LLNotifications::ChannelMap went away when LLNotificationChannel became an
LLInstanceTracker subclass. Iterate the universe of channels using
LLNotificationChannel::beginInstances(), endInstances() instead.
More troubling is that LLNotificationChannel::getParentChannelName() went away
too. When LLNotificationChannel acquired a Params block and corresponding
constructor, it acquired the ability to listen on multiple upstream sources.
That meant that a single mParent string became inapplicable, and its access
method was removed. (Curiously, mParent was not itself removed, but it was
left unused.) Change mParent to mParents, a vector<string>, built by
connectToChannel(). Introduce getParents(), an accessor returning an
iterator_range over that vector.
Change LLNotificationsListener::listChannels() to collect a "parents" key in
the map returned for each channel, and -- for backwards compatibility --
capture the first entry in the "parents" array as "parent".
2014-03-28 10:30:03 -04:00
Richard Linden fe518bde8e merge with release 2013-11-06 17:22:04 -08:00
Oz Linden 9c313aea13 merge changes for DRTVWR-336 2013-10-15 17:47:37 -04:00
Richard Linden 80dfbbaacd merge from viewer-release 2013-10-08 11:59:24 -07:00
Graham Madarasz (Graham Linden) 19726783cd MAINT-3046 make LLNotifications clear out vecs of LLNotificationChannelPtr so singleton cleanup doesn't do things it really ought not do 2013-08-23 14:44:46 -07:00
Jeff (Gioffredo Linden) 24db277777 Restore VITA LLNotiication API 2013-07-25 16:11:26 -04:00
Richard Linden 1e8f9fd80d SH-4376 FIX: Interesting: in Statistics, replace the text "0" with "n/a" when
there are no samples during the time period.
added hasValue to SampleAccumulator so we don't print a value when we don't have
a single sample yet
added some disabled log output for scene load timing
2013-07-24 19:36:43 -07:00
Richard Linden 0a96b47663 merge with viewer-release 2013-06-05 19:05:43 -07:00
Richard Linden 7b86d10c2d BUILDFIX: attempted fix for gcc build 2013-05-14 13:24:14 -07:00
simon ee2fce8790 Merge downstream code and viewer-beta 2013-05-09 14:10:45 -07:00
Richard Linden 6b81b8629e Spring cleaning: removed unused .cpp and.h files, and cleaned up header dependencies 2013-05-05 17:45:35 -07:00
simon 87ba85eaab diff -r 59c7bed66dfd indra/llcommon/lleventapi.h 2013-04-24 09:35:38 -07:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Simon Linden d5561a1ada Merge in viewer-beta to get CHUI code 2013-03-19 16:20:53 -07:00
Graham Madarasz (Graham) 93eaccae6f Modify LLInstanceTracker to avoid using a map of strings to find a map of foo to find some pointers 2013-02-28 15:35:14 -08:00
Merov Linden faae38daaa Pull merge from lindenlab/viewer-developement 2013-01-30 20:01:03 -08:00
Cho b7f4916b3e CHUI-679 FIX Crash when script floater appears in CHUI viewer
LLPostponedNotification now inherits from LLMortician so it can postpone its deletion. This prevents a crash when looking up an avatar name in the case where the name already exists in the cache.
2013-01-15 02:48:52 +00:00
Gilbert Gonzales b5172de28f CHUI-660: Post code review changes 2013-01-08 17:06:49 -08:00
Gilbert Gonzales 974720373d CHUI-660: Problem: Upon auto-existing DND mode upon startup, the notification form elements (buttonts) were added to the form. But then deserialized form elements were also being added to the form causing duplicate buttons. As a solution, only add on the deserialized form elements that exceed the amount in the template. 2013-01-08 12:21:47 -08:00
Gilbert Gonzales 02ca16c133 CHUI-499: Now when existing DND mode, stored IM's will not show a toast but instead flash the conversation line item and Chat FUI button. 2013-01-04 17:58:30 -08:00
Gilbert Gonzales aa6fee292d CHUI-499: Fixed a serialization problem where the a notification's objectInfo was not being serialized/deserialized. 2013-01-03 14:19:04 -08:00
William Todd Stinson c73947ac1f CHUI-499: Adding ability to serialize the communication notifications to local disk per user. 2012-12-18 18:48:15 -08:00
William Todd Stinson 5df9d52d48 CHUI-499: Refactoring the persistent notification storage so that I can reuse the functionality for do-not-disturb mode. 2012-12-12 18:49:07 -08:00
William Todd Stinson 54380ed6d7 Pull and merge ssh://stinson@hg.lindenlab.com/richard/viewer-chui/. 2012-12-05 11:23:37 -08:00
maksymsproductengine fc000880b4 CHUI-519 FIXED Do not put offered items into the trash while in Busy / DND mode 2012-12-05 20:47:21 +02:00
William Todd Stinson 60c72c85e2 Cleaning up some unreferenced member variables and related types from LLNotifications. 2012-12-03 19:06:52 -08:00
Gilbert Gonzales d3474c6eaf CHUI-489: Now sounds exist for teleport and inventory offers. The sound is specified in notifications.xml. Also changes for CHUI 486, which allow the user to set preferences for hearing sounds for a New Conversation, Incoming Voice Call, Teleport Offer and Inventory Offer. 2012-11-15 15:42:22 -08:00
William Todd Stinson 6e2b3527cc CHUI-475: Ensuring that objects that query the avatar name cache with a callback store the connection and disconnect on object destruction. This should help resolve some of the heap corruption we are seeing. 2012-11-02 13:22:48 -07:00
Kelly Washington c6a5b62152 MAINT-994 Oskar Linden login issues
* Set max persistent notifications to 250
* Don't register for notification callbacks until after peristent ones are loaded.
reviewed with Simon
2012-09-26 14:40:16 -07:00
Todd Stinson 3e038cd71b Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-release. 2012-07-27 12:53:54 -07:00
Paul ProductEngine 4dffa33514 Linux build fix
GCC does not allow local functor classes to be used with template algorithms, because template arguments must refer to an entity with external linkage.
2012-05-22 20:34:34 +03:00
Richard Linden 61bc25211b CHUI-111 FIX Saved notifications are not sorted in same order after logout and relog.
sort notifications in separate list
llnotification now uses param block to serialize to llsd
2012-05-21 17:16:11 -07:00
Richard Linden 296e55c1b3 CHUI-112 FIX Clicking Show or Discard in an inventory offer toast does not dismiss toast
removed special case logic for dealing with user online/offline collisions
added ability to cancel old duplicate notifications
2012-05-18 13:20:32 -07:00
Paul ProductEngine f4edcdd409 MAINT-938 FIXED (Make debit-permissions dialog give a stronger warning)
- Added new tag called "footer" to the notification. This tag allows to display messages under the buttons in toasts.
- Created new class LLToastScriptQuestion for the "ScriptQuestionCaution" notification. This notification supports tag <footer>.
2012-05-17 21:02:53 +03:00