Commit Graph

7576 Commits

Author SHA1 Message Date
John Scipione
a892df239f Tracker: Fix several unchecked return values
CID611191, CID611192, CID611193
2014-07-18 17:58:07 -04:00
John Scipione
5969c5d779 Tracker: Fix use after free
CID510586
2014-07-18 17:58:05 -04:00
John Scipione
1933335b06 Tracker: fix 2 uninitialized scalers
CID610119
2014-07-18 17:58:04 -04:00
John Scipione
ba24adb272 Tracker: fix 2 unbounded copies
CID609045
2014-07-18 17:58:02 -04:00
John Scipione
d308d1fa82 Tracker: fix unchecked dynamic_casts
CID603130, CID603131, CID603132
2014-07-18 17:58:01 -04:00
John Scipione
62de0e04be Tracker: fix unchecked return values
Check that LockLooper() succeeds

CID611190, CID611194, CID602477
2014-07-18 17:57:43 -04:00
John Scipione
dc3cfca45b Tracker: fix unused pointers
CID610474, CID610475
2014-07-18 17:53:03 -04:00
John Scipione
20e3467eae Tracker: fix dereference after NULL checks
CID600503, CID600504, CID600505
2014-07-18 17:52:37 -04:00
John Scipione
0db0308b08 Tracker: style fixes to PoseView.cpp
Compare with NULL explictly
2014-07-18 17:51:25 -04:00
John Scipione
565cd805b4 Tracker: whitespace fix, spaces to tab 2014-07-18 17:49:51 -04:00
John Scipione
4deecac061 Tracker: Fix BuildMimeTypeList(), styleish and correct
Thanks Axel for pointing out my error.
2014-07-18 17:18:12 -04:00
John Scipione
29c145bcbe Tracker: Check LockLooper() return value.
Fixes CID602468 and CID602469

Thanks waddlesplash for pointing this out.
2014-07-18 14:12:25 -04:00
John Scipione
b992df8968 Tracker: Don't crash clicking Open with... menu item
This bug was introduced in hrev47498

The reason Tracker crashed was because OpenWithContainerWindow
had a NULL TargetModel() which we were trying to dereference.

Fix this by creating an empty model in OpenWithContainerWindow. Add an
ASSERT to check that the TargetModel() is not NULL in the future.

Another way to fix this bug would have been to check that TargetModel() wasn't
NULL each time before we use it. I didn't go with that solution because we
assume TargetModel() is not NULL in a lot of places so it would be a lot of work
to check them all. I think it's better to give OpenWithContainerWindow a dummy
model even though it doesn't make sense for it to have one just so that we don't
crash when we try to dereference the pointer.
2014-07-18 10:58:30 -04:00
John Scipione
bb804d092e Tracker: Make sure count > 0
... in a more stylish way, no negative counts allowed.
2014-07-18 10:47:11 -04:00
John Scipione
6527415d5a Tracker: obligatory round of style fixes
* Explicit NULL checks
* whitespace
* single line if gets no {}'s
*
2014-07-18 10:47:09 -04:00
John Scipione
61dec7d2ec Tracker: fix bug introduced in hrev17795
Ticket #298 for context.

In BContainerWindow::AddWindowContextMenus() pasteItem is used but
not declared if CUT_COPY_PASTE_IN_CONTEXT_MENU is defined.
2014-07-18 09:15:23 -04:00
John Scipione
5ddedec51a Tracker: more style fixes to ContainerWindow.cpp
* Rename templateMenu to templatesMenu.
* 80 char limit fixes
* whitespace fixes
* Declare 1 item per line.
* Don't set variables inline, set, then use.
* Explicit NULL comparisons
* {}'s around if statment with multi-line appearance
2014-07-18 09:04:19 -04:00
John Scipione
bc1739a5c5 Tracker: A few more style fixes to Utilities
* icon_size size => icon_size which (I've settled on which)
* fOrigBitmap => fOriginalBitmap
* resizeMask/resizeFlags => resizingMode (header and cpp match)
* error => result
* explicit NULL checks for pointers
* multi-line conditional ifs get {}'s
* rename result to more descriptive name when not status_t
2014-07-17 20:13:54 -04:00
John Scipione
c6433b0b3c Tracker: A few more style fixes to IconCache
* Hilight => Highlight
2014-07-17 19:36:48 -04:00
John Scipione
9f2a3f6f47 Tracker: Move opening Desktop window to constructor
BRoster::Launch() sends B_REFS_RECEIVED before B_READY_TO_RUN
if the application is not running, so, when B_REFS_RECEIVED looked for
the Desktop window it wasn't created yet since that happen in ReadyToRun().

By creating the Desktop window in the constructor instead it is available
in RefsReceived() so an extra Desktop windows isn't opened.
2014-07-17 15:11:15 -04:00
John Scipione
3f2239f6b6 Storage Kit: Style fixes to mime database
* Update doxygen docs a bit, especially returns.
* Some variable renaming for consistency and clarity, err/error => result.
* Remove some dead code that isn't coming back. (code moved to IconUtils)
* OpenType() returns a status_t, put it in a status_t, not a ssize_t.
  and then later create a new ssize_t to hold the read bytes read
  and use that, saves a lot of casting and confusion.
2014-07-17 14:51:35 -04:00
John Scipione
9bbfee0fd5 BNodeInfo: Style fixes
* Remove public method docs, they are in Haiku Book only.
* Format private method docs as doxygen.
* Other style fixes like explicit NULL checks.
* Remove dead code in GetIcon() that isn't coming back.
* Pointer style.
2014-07-17 14:51:32 -04:00
John Scipione
8e5c1f2394 Tracker: style, reorder includes in DeskWindow.cpp 2014-07-17 14:51:29 -04:00
John Scipione
670b729d65 Tracker: style fixe, update comment, spelling
...and fits on 1 line
2014-07-17 14:51:28 -04:00
John Scipione
8b9604572e Tracker: style fixes to ContainerWindow 2014-07-17 14:51:27 -04:00
John Scipione
537e1fff3e Tracker: Write Trash icon attrs only once
Also create Trash if does not exist but check the if the icon
attrs are set separately.

Only set the vector trash icon #ifdef __HAIKU__ does this
even matter anymore?
2014-07-17 14:51:26 -04:00
John Scipione
7f68dcb4a7 Tracker: Write Desktop icon attrs only once 2014-07-17 14:51:24 -04:00
John Scipione
dd3359ae8f Tracker: return B_BAD_VALUE if you pass in a NULL dir 2014-07-17 14:51:23 -04:00
John Scipione
c2d07d9988 Tracker: yet more style fixes 2014-07-17 14:51:22 -04:00
John Scipione
ae7d51b28a Tracker: Style fixes to IconCache and Utilities 2014-07-17 14:51:20 -04:00
John Scipione
ee196640fb Tracker: Update Tracker nav bitmaps and layout 2014-07-17 14:51:16 -04:00
John Scipione
bd41bc5105 Tracker: Style fixes in Tracker (app) 2014-07-17 14:51:15 -04:00
John Scipione
f6d495501e Tracker: include ContainerWindow.h in Navigator.h 2014-07-17 14:51:14 -04:00
John Scipione
e17179d381 Tracker: Style fixes to Navigator.h 2014-07-17 14:51:12 -04:00
John Scipione
b77cc9391a Tracker: Style fix, move headers down in Navigator.cpp 2014-07-17 14:51:11 -04:00
John Scipione
f13a47d224 Tracker: Pose style fixes kind => which 2014-07-17 14:51:10 -04:00
John Scipione
d5868b5976 Tracker: style fixes to PoseView
Variable renaming for consistency and clarity
2014-07-17 14:51:09 -04:00
John Scipione
8dd0b0aeac Tracker: style fixes to Model 2014-07-17 14:51:08 -04:00
John Scipione
d7e6821137 Tracker: miscellaneous style fixes 2014-07-17 14:23:33 -04:00
John Scipione
6ab2085f7b Tracker: Style fixes to ContainerWindow 2014-07-17 14:23:33 -04:00
John Scipione
49d37d9438 Tracker: tiny style fix, explicit NULL check 2014-07-17 14:23:32 -04:00
John Scipione
6c424fff1e Tracker: Tiny style fix to Bitmaps.cpp 2014-07-17 14:23:32 -04:00
John Scipione
021aaa43d0 Tracker: Style fix, capitalize share icons hex
... just to make them consistent with the rest.
2014-07-17 14:23:32 -04:00
Adrien Destugues
92dd9f7360 Style fixes, no functional changes. 2014-07-16 17:57:47 +02:00
Adrien Destugues
3528905be6 Parse multiple HTTP at once
Instead of relying on the global protocol loop to call _ParseHeaders
once for each header, extract as much as possible from the current
buffer.

This saves memory, avoids useless operations on the socket and various
processing steps, and fixes #10245.

Also improve the handling of 0-size requests to make sure they terminate
properly.
2014-07-16 17:34:31 +02:00
Adrien Destugues
ceb65ce14e Extend Tracker scripting capabilities
* Allow EXECUTE on the Folder property to open a window for the passed
ref and return a BMEssenger targetting that window.
* Allog GET on the Folder property to return a messenger to the matching
window, if one is already open.
* Make scripting support mandatory and remove the define allowing to
disable it.
2014-07-16 15:53:49 +02:00
Adrien Destugues
dd03c93fbf Move automount settings to the Tracker preferences
* Avoids the ugly "button that opens another window" UI paradigm in
Tracker preferences.
* Makes it possible to revert changes to the automount settings as the
Tracker preferences window has a revert button.
2014-07-16 14:46:27 +02:00
Puck Meerburg
62f70e6f0a Fix Coverity bug 1108392: Stray semicolon
Signed-off-by: Philippe Saint-Pierre <stpere@gmail.com>
2014-07-15 16:17:46 -04:00
Puck Meerburg
d32cb23734 Fix Coverity bug 603941: Negative array index read
Signed-off-by: Philippe Saint-Pierre <stpere@gmail.com>
2014-07-15 15:14:56 -04:00
Philippe Saint-Pierre
fcd2bfb773 Style fix, no functional changes
Thanks Axel!
2014-07-15 14:06:49 -04:00