Commit Graph

25 Commits (afdcd356db0a496e8916645eeebc8a03755ee0bd)

Author SHA1 Message Date
Andrey Lihatskiy 1b68f71348 #824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed 2024-04-29 07:56:09 +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 c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Richard Linden a2e22732f1 Summer cleaning - removed a lot of llcommon dependencies to speed up build times
consolidated most indra-specific constants in llcommon under indra_constants.h
fixed issues with operations on mixed unit types (implicit and explicit)
made LL_INFOS() style macros variadic in order to subsume other logging methods
such as ll_infos
added optional tag output to error recorders
2013-07-30 19:13:45 -07:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Merov Linden 9dfb6284df EXP-1924 : Relax the cconsistency policy between text and UUID on the clipboard. 2012-03-13 21:37:54 -07:00
Merov Linden 5170f18d3c EXP-1917 : Suppress clean up callback now that we move things to the trash immediately 2012-03-08 21:06:00 -08:00
Merov Linden a41507eef0 EXP-1841 : change mState to mGeneration in LLClipboard. 2012-03-01 23:10:06 -08:00
Merov Linden 44c66e11cc EXP-1841 : Use std::vector instead of LLDynamicArray in LLClipboard. 2012-03-01 21:57:16 -08:00
Merov Linden f0a1b43f22 EXP-1841 : Use instance instead of getInstance on LLClipboard singleton. 2012-03-01 21:35:05 -08:00
Merov Linden bb6ace0672 EXP-1902, EXP-1903 : Move items cut to the trash when clipboard reset. 2012-02-17 14:42:12 -08:00
Merov Linden 91f77318db EXP-1873 : Implement the hiding of cut items on the clipboard 2012-02-08 15:44:02 -08:00
Merov Linden ee3c3c15b7 EXP-1841 : Final deep scrub on LLClipboard API, clean up the use of copy and cut everywhere. 2012-02-07 22:46:04 -08:00
Merov Linden c744603af9 EXP-1873 : Implement cut in the inventory contextual menu. Works without deleting the items but simply dimming them and moving them. Doesn't work for folders yet. 2012-02-07 17:13:24 -08:00
Merov Linden 9761375ac2 EXP-1841 : Refactoring of LLClipboard, simplify the API and make it behave like a normal clipboard. 2012-02-06 15:43:53 -08:00
Merov Linden db824cff75 EXP-1862 : Suppress LLInventoryClipboard, move its functions to the unified LLClipboard and use this only 2012-02-03 18:38:03 -08:00
Merov Linden c1636911c8 EXP-1862 : Make LLClipboard an LLSingleton and clean up the internals (set up for toolbar and never used) 2012-02-01 19:09:29 -08:00
Merov Linden cd467cc34f EXP-1286 : First pass at Drag and Drop of tools. Not functional. Most hooks into the LLToolDragAndDrop system in to support the new AT_WIDGET and SOURCE_VIEWER 2011-10-03 16:27:24 -07:00
Oz Linden 06b0d72efa Change license from GPL to LGPL (version 2.1) 2010-08-13 07:24:57 -04:00
Steven Bennetts 0bf4b5f222 merge https://svn.aws.productengine.com/secondlife/export-from-ll@1277 https://svn.aws.productengine.com/secondlife/pe/stable-1@1297 -> viewer-2-0
Fixes:
EXT 208 EXT 366 EXT-211 EXT-245 EXT-246 EXT-278 EXT-279 EXT-280 EXT-298 EXT-301 EXT-304 EXT-311 EXT-317 EXT-318 EXT-319 EXT-339 EXT-343 EXT-344 EXT-346 EXT-349 EXT-350 EXT-351 EXT-354 EXT-355 EXT-358 EXT-360 EXT-362 EXT-369 EXT-372 EXT-374 EXT-381 EXT-382 EXT-383 EXT-395 EXT-396 EXT-412
Other changes:
Movement & Caemra controls work
Profile and Me panel refactoring
Notification refactoring
2009-08-12 01:12:27 +00:00
Adam Moss b01c75cb42 svn merge -r117314:117337
svn+ssh://svn.lindenlab.com/svn/linden/branches/moss/mv13a-merge-1

QAR-1343 maint-viewer-13a+libcurlexploitfix-3-3 combo merge
2009-04-16 23:45:35 +00:00
Aaron Brashears e3cf284388 Result of svn merge -r107256:107258 svn+ssh://svn/svn/user/phoenix/license_2009_merge into trunk. QAR-1165 2009-01-08 00:05:06 +00:00
Steven Bennetts 2e32d44e71 merge svn+ssh://svn.lindenlab.com/svn/linden/qa/combo-merge-ui-2008-02-13 -r 79986 : 80178 -> release.
QAR-290 = QAR-271 + QAR-191
2008-02-19 21:42:32 +00:00
Aaron Brashears 5595a99623 Result of svn merge -r71162:71205 svn+ssh://svn/svn/linden/branches/new-license into release. only changes files which are not deployed or the comments section of code. 2007-10-04 23:19:43 +00:00
James Cook 420b91db29 Print done when done. 2007-01-02 08:33:20 +00:00