subsurface/desktop-widgets
Linus Torvalds a9b1fbdcc5 Don't expose 'detach_buffer()' to membuffer users
The native buffer of a membuffer is not NUL-terminated, so when you want
to detach it and use it as a C string, you had to first do
'mb_cstring()' that adds the proper termination/

This was all documented in the header files, and all but two users did
it correctly.

But there were those two users, and the exported interface was
unnecessarily hard to use.  We do want the "just detach the raw buffer"
internally in the membuffer code, but let's not make the exported
interface be that hard to use.

So this switches the exported interface to be 'detach_cstring()', which
does that 'mb_cstring()' for you, and avoids the possibility that you'd
use a non-terminated memory buffer as a C string.

The old 'detach_buffer()' is now purely the internal membuffer
implementation, and not used by others.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-10-27 12:42:54 -07:00
..
css Move qt-ui to desktop-widgets 2015-10-30 10:36:49 -07:00
preferences Cleanup: move error reporting function declarations to errorhelper.h 2019-08-08 16:26:30 -07:00
statistics Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
tab-widgets Don't expose 'detach_buffer()' to membuffer users 2019-10-27 12:42:54 -07:00
about.cpp update year to 2019 in about screens 2019-01-02 09:45:01 -08:00
about.h Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
about.ui Use icons relative path. 2017-11-30 23:14:46 -08:00
btdeviceselectiondialog.cpp Cleanup: remove unnecessary QRegularExpression copies 2019-06-06 14:52:42 +03:00
btdeviceselectiondialog.h Bluetooth: use standard Qt code on Windows 2018-09-30 08:09:37 -07:00
btdeviceselectiondialog.ui Desktop: add checkbox to show all BT devices 2019-02-14 09:05:58 -08:00
CMakeLists.txt Create DivesiteImportDialog to select sites to import 2019-05-06 10:48:44 +02:00
command.cpp Undo: implement ReplanDive command 2019-10-26 11:36:23 -07:00
command.h Undo: implement ReplanDive command 2019-10-26 11:36:23 -07:00
command_base.cpp Undo: hide multi-dive-edit warning message on subsequent edit 2019-06-15 11:20:49 -07:00
command_base.h Cleanup: move trip-related functions into own translation unit 2019-06-19 13:11:10 -07:00
command_divelist.cpp Cleanup: prevent uninitialized pointer 2019-10-27 07:35:46 -07:00
command_divelist.h Cleanup: remove selectionChanged logic from dive-list commands 2019-06-23 20:08:46 +02:00
command_divesite.cpp Dive site: don't emit divesChanged signals when editing dive site 2019-09-06 11:48:47 -07:00
command_divesite.h Add undo/redo commands for importing dive sites 2019-05-06 10:48:44 +02:00
command_edit.cpp Undo: turn dive- and trip-fields into flags 2019-10-26 11:36:23 -07:00
command_edit.h Undo: implement ReplanDive command 2019-10-26 11:36:23 -07:00
command_edit_trip.cpp Undo: use QUndoStack::isClean() to determine unsaved changes 2019-04-12 18:19:07 +03:00
command_edit_trip.h Undo: implement undo of dive trip editing 2019-04-12 18:19:07 +03:00
command_private.cpp Cleanup: unify selection signals 2019-06-23 20:08:46 +02:00
command_private.h Cleanup: remove selectionChanged logic from dive-list commands 2019-06-23 20:08:46 +02:00
configuredivecomputerdialog.cpp Cleanup: we don't support configuring a Uemis SDA 2018-08-28 12:03:03 -07:00
configuredivecomputerdialog.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
configuredivecomputerdialog.ui Configure ostc3: Remove obsoleted setting 2018-04-27 21:33:47 +03:00
divecomponentselection.ui Add various enhancements to profile export and dive data copy 2019-02-07 16:06:43 +01:00
divecomputermanagementdialog.cpp Dive computers: turn QMultiMap into sorted vector 2018-06-17 06:53:13 +09:00
divecomputermanagementdialog.h Cleanup: fold DiveComputerManagementDialog::update() into init() 2018-06-17 06:53:13 +09:00
divecomputermanagementdialog.ui Use icons relative path. 2017-11-30 23:14:46 -08:00
divelistview.cpp Cleanup: use pointer-to-member-function in addAction() calls 2019-10-20 03:51:11 -04:00
divelistview.h Cleanup: unify selection signals 2019-06-23 20:08:46 +02:00
divelogexportdialog.cpp Cleanup: NULL check pointer before dereferencing 2019-10-27 07:35:46 -07:00
divelogexportdialog.h Add various enhancements to profile export and dive data copy 2019-02-07 16:06:43 +01:00
divelogexportdialog.ui Add export option to export dive sites. 2019-04-13 08:18:32 -07:00
divelogimportdialog.cpp Cleanup: avoid out of bounds access 2019-10-27 07:35:46 -07:00
divelogimportdialog.h Import: Make DiveLogImportDialog modal 2018-10-04 10:22:11 +02:00
divelogimportdialog.ui Use icons relative path. 2017-11-30 23:14:46 -08:00
divepicturewidget.cpp Dive media: transport dive-id in drag'n'drop events 2018-07-18 09:06:37 -07:00
divepicturewidget.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
diveplanner.cpp Cleanup: use pointer-to-member-function in addAction() calls 2019-10-20 03:51:11 -04:00
diveplanner.h Planner: Add checkbox to force OC bailout 2019-01-13 15:02:07 -08:00
diveplanner.ui Choose water presets from a qcombobox in planner, custom value possible 2018-03-02 08:38:22 -08:00
diveshareexportdialog.cpp Revert "desktop-widgets: remove QSettings from desktop-widgets" 2018-08-29 03:09:10 -07:00
diveshareexportdialog.h Random whitespace cleanup 2017-05-27 11:07:20 -07:00
diveshareexportdialog.ui Move qt-ui to desktop-widgets 2015-10-30 10:36:49 -07:00
divesiteimportdialog.cpp Create DivesiteImportDialog to select sites to import 2019-05-06 10:48:44 +02:00
divesiteimportdialog.h Create DivesiteImportDialog to select sites to import 2019-05-06 10:48:44 +02:00
divesiteimportdialog.ui Create DivesiteImportDialog to select sites to import 2019-05-06 10:48:44 +02:00
downloadfromdivecomputer.cpp Import: extract number of dives from model not from thread 2019-10-02 08:04:49 -07:00
downloadfromdivecomputer.h Import: Make DownloadThread a subobject of DiveImportedModel 2019-10-02 08:04:49 -07:00
downloadfromdivecomputer.ui Desktop/remember DCs: avoid highlighted button 2018-09-23 11:49:30 -07:00
filterwidget2.cpp Turn application state into enum 2019-05-12 12:33:55 -07:00
filterwidget2.h Filter: call update title directly in filter model 2019-04-12 18:19:07 +03:00
filterwidget2.ui Desktop: correct tooltip for filter close button 2019-07-29 07:24:05 +02:00
findmovedimagesdialog.cpp Desktop: fix another variable name conflict 2019-03-18 19:40:32 -07:00
findmovedimagesdialog.h Dive pictures: implement FindMovedImagesDialog 2018-07-04 02:27:36 +08:00
findmovedimagesdialog.ui UI change of "images"/"photo" to "media" or "media files" 2018-07-15 09:38:12 -07:00
groupedlineedit.cpp Unused code: GroupedLineEdit::removeAllColors() 2018-01-10 16:45:42 +01:00
groupedlineedit.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
kmessagewidget.cpp Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
kmessagewidget.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
listfilter.ui Start to implement a simplified version of the filter widget 2018-12-14 01:05:18 +08:00
locationinformation.cpp Cleanup: use pointer-to-member-function in addAction() calls 2019-10-20 03:51:11 -04:00
locationinformation.h Dive site: close dive site edit widget when dive site is deleted 2019-09-07 08:28:29 -07:00
locationinformation.ui Dive site: add proximity field to dive site list 2019-04-12 18:19:07 +03:00
mainwindow.cpp Revert the singleton PR 2019-09-27 16:26:58 -07:00
mainwindow.h Revert the singleton PR 2019-09-27 16:26:58 -07:00
mainwindow.ui Reword configure dive computer 2019-06-03 19:55:19 +02:00
mapwidget.cpp Undo: turn dive- and trip-fields into flags 2019-10-26 11:36:23 -07:00
mapwidget.h Cleanup: remove unused MapWidget::repopulateLabels() function 2019-09-06 11:48:47 -07:00
modeldelegates.cpp Dive site: show distance to current dive using extra data 2019-05-11 12:35:11 -07:00
modeldelegates.h Dive site: show distance to current dive using extra data 2019-05-11 12:35:11 -07:00
notificationwidget.cpp Use queued connection to thread-safe MainWindow error handling 2018-01-31 14:47:26 +01:00
notificationwidget.h Use queued connection to thread-safe MainWindow error handling 2018-01-31 14:47:26 +01:00
plannerDetails.ui Bring back style sheet HTML for planner output 2017-02-24 01:06:09 -08:00
plannerSettings.ui Show correct notes entry when switching on stops 2019-09-11 14:55:33 +01:00
printdialog.cpp Add the ability to export print template as html 2019-09-11 17:21:50 +01:00
printdialog.h Add the ability to export print template as html 2019-09-11 17:21:50 +01:00
printer.cpp Add the ability to export print template as html 2019-09-11 17:21:50 +01:00
printer.h Add the ability to export print template as html 2019-09-11 17:21:50 +01:00
printoptions.cpp replace deprecated qSort() with std::sort() 2019-04-12 12:59:17 +03:00
printoptions.h Cleanup: remove all Q_NULLPTR instances 2019-04-02 07:34:46 -07:00
printoptions.ui Move qt-ui to desktop-widgets 2015-10-30 10:36:49 -07:00
qtwaitingspinner.cpp Move qt-ui to desktop-widgets 2015-10-30 10:36:49 -07:00
qtwaitingspinner.h Move qt-ui to desktop-widgets 2015-10-30 10:36:49 -07:00
renumber.ui Use icons relative path. 2017-11-30 23:14:46 -08:00
searchbar.ui Use better aliases for icons. 2017-11-30 23:14:46 -08:00
setpoint.ui Use icons relative path. 2017-11-30 23:14:46 -08:00
shiftimagetimes.ui UI change of "images"/"photo" to "media" or "media files" 2018-07-15 09:38:12 -07:00
shifttimes.ui Use icons relative path. 2017-11-30 23:14:46 -08:00
simplewidgets.cpp Core: dynamically resize weight table 2019-07-18 06:01:07 -07:00
simplewidgets.h Cleanup: remove Q_PROPERTYs from MinMaxWidget 2019-06-10 17:59:35 +03:00
starwidget.cpp Cleanup: remove parameter from currentDiveChanged signal 2018-07-30 12:20:26 -07:00
starwidget.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
subsurfacewebservices.cpp Cleanup: move file-related function declarations to file.h 2019-08-08 16:26:31 -07:00
subsurfacewebservices.h Cleanup: Devirtualize WebServices::downloadTimedOut() 2018-09-29 15:16:11 -07:00
tableview.cpp Use better aliases for icons. 2017-11-30 23:14:46 -08:00
tableview.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
tableview.ui Move qt-ui to desktop-widgets 2015-10-30 10:36:49 -07:00
tagwidget.cpp Desktop: remove edit-check in tag-widget completer 2019-04-14 03:38:22 +12:00
tagwidget.h Undo: implement undo of tag editing 2019-04-12 18:19:07 +03:00
templateedit.cpp Warnings: replace memcpy by assignment 2018-11-19 13:51:03 -08:00
templateedit.h Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
templateedit.ui templateedit.ui: give the layout for "Border width" unique name 2017-03-12 09:19:03 -07:00
templatelayout.cpp Grantlee: split out grantlee-only property from DiveObjectHelper 2019-09-14 13:20:59 +02:00
templatelayout.h Grantlee: split out grantlee-only property from DiveObjectHelper 2019-09-14 13:20:59 +02:00
textedit.cpp Desktop: create new custom TextEdit widget for notes-field 2019-04-12 18:19:07 +03:00
textedit.h Desktop: create new custom TextEdit widget for notes-field 2019-04-12 18:19:07 +03:00
updatemanager.cpp core: move updatecheck to its own domain 2019-02-09 10:37:55 -08:00
updatemanager.h Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
urldialog.ui UI change of "images"/"photo" to "media" or "media files" 2018-07-15 09:38:12 -07:00
usermanual.cpp Coding style: remove Java-style function definition 2019-04-12 18:19:07 +03:00
usermanual.h Remove partial support for QWebEngine 2019-03-20 08:45:02 -07:00
usersurvey.cpp Revert "desktop-widgets: remove QSettings from desktop-widgets" 2018-08-29 03:09:10 -07:00
usersurvey.h Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
usersurvey.ui fix: User survey UI. 2017-03-06 06:40:00 -08:00
webservices.ui Use icons relative path. 2017-11-30 23:14:46 -08:00