Commit Graph

21447 Commits

Author SHA1 Message Date
Nirbheek Chauhan
338203e04e Merge branch '198-fopen-docs' into 'master'
docs: Improve g_fopen description for Win32

Closes #198

See merge request GNOME/glib!1292
2019-12-23 10:07:08 +00:00
Piotr Drąg
135c04608c Update Polish translation 2019-12-19 18:05:39 +01:00
Philip Withnall
f4ff348546 Merge branch 'fix-prop-set-error' into 'master'
tests: Fix an error message set by foo_set_property()

See merge request GNOME/glib!1279
2019-12-18 16:39:56 +00:00
Matthew Leeds
a28c34ba88 tests: Fix an error message set by foo_set_property()
The property name and value were mistakenly swapped.
2019-12-18 16:39:56 +00:00
Philip Withnall
51c3921022 Merge branch 'appinfo-doc-portal-test' into 'master'
gio: test that launch_uris() exports files with the document portal when launching a flatpak

See merge request GNOME/glib!1111
2019-12-17 15:30:11 +00:00
Emmanuele Bassi
78fa941c86 Merge branch '833-gobject-set-docs' into 'master'
docs: Clarify handling of 64-bit integer literals with g_object_new()

Closes #833

See merge request GNOME/glib!1293
2019-12-17 13:16:29 +00:00
James Henstridge
e24db62363 gio: do not cache document portal D-Bus proxy
By removing the cached global proxy in gdocumentportal.c, we can
re-enable the checks for proper shutdown of the session bus connection
in the dbus-appinfo.c test.
2019-12-17 21:03:03 +08:00
James Henstridge
926ff8c6a7 gio/tests: add a test for document portal use when launching flatpaks
We can't use session_bus_down() in the test since gdocumentportal.c
holds a reference to the session bus connection, preventing it from
being finalised.
2019-12-17 20:59:22 +08:00
James Henstridge
27db702ceb gio/tests: add a fake implementation of the document portal 2019-12-17 20:56:49 +08:00
James Henstridge
457d4c9fe0 gio: update dbus interfaces from xdg-desktop-portal tree
This removes the need to manually specify org.gtk.GDBus.C.UnixFD
annotations in the gdbus-codegen invocations.
2019-12-17 20:48:22 +08:00
Philip Withnall
2474c65037 docs: Clarify handling of 64-bit integer literals with g_object_new()
As with `g_variant_new()` (or any varargs function which takes integer
literals of differing widths), callers need to be careful to ensure
their integer literals have the right width.

Tweak the documentation for `g_object_new()`, `g_object_set()` and
`g_object_get()` to clarify this. The documentation for `g_object_get()`
shows that it is not subject to the same caveats, since it operates on
pointers.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Closes: #833
2019-12-17 12:23:19 +00:00
Philip Withnall
78be7f5022 docs: Improve documentation formatting for g_fopen()
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #198
2019-12-17 11:37:09 +00:00
David King
6d3f67dae8 docs: Improve g_fopen description for Win32
Tweaked by Philip Withnall.

Closes: #198
2019-12-17 11:36:06 +00:00
Philip Withnall
c597b0e552 Merge branch 'wip/oholy/gio-tool-list-display-names' into 'master'
gio-tool-list: Add an option to print display names

See merge request GNOME/glib!1291
2019-12-17 10:56:33 +00:00
Ondrej Holy
e6f5b9bf89 gio-tool-list: Add an option to print display names
There are some GVfs locations (i.e. google-drive://, recent://), where
G_FILE_ATTRIBUTE_STANDARD_NAME is something tottaly different than
G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME. Thus it would be nice to have
an easy way to show the display names. The only way currently to show
the display names is to use --attributes option, which is a bit
cumbersome. Let's add new --show-display-names option.

https://gitlab.gnome.org/GNOME/gvfs/issues/402
2019-12-17 11:07:10 +01:00
Simon McVittie
5bae85eccc Merge branch 'ossfuzz-14870-dbus-message-variant-nesting' into 'master'
gdbusmessage: Limit recursion of variants in D-Bus messages

See merge request GNOME/glib!1201
2019-12-16 19:50:38 +00:00
Philip Withnall
de7d7dbd6c 2.63.3
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-12-16 13:57:28 +00:00
Philip Withnall
eda096243b docs: Add g_source_set_dispose_function() to documentation
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-12-16 13:57:28 +00:00
Philip Withnall
467b4d6789 docs: Update GMemoryMonitor listings in docs
Fix a few things missed in code review.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-12-16 13:57:28 +00:00
Emmanuele Bassi
988dd6adf8 Merge branch 'ci-docker-fun-times' into 'master'
ci: Build Docker images rather than OCI images if using podman

See merge request GNOME/glib!1255
2019-12-16 12:44:16 +00:00
Emmanuele Bassi
b3981e97ac Merge branch 'format-diff-many-files-better-than-one' into 'master'
clang-format-diff: Output diff for multiple files, not just one

See merge request GNOME/glib!1280
2019-12-16 12:41:55 +00:00
Emmanuele Bassi
829ec978ed Merge branch '650-signal-lookup-warnings' into 'master'
gsignal: Drop unnecessary warnings from g_signal_lookup()

Closes #650

See merge request GNOME/glib!1247
2019-12-16 12:41:31 +00:00
Emmanuele Bassi
a172aa3662 Merge branch '1130-codegen-docs' into 'master'
Resolve "gdbus-codegen: Add an option to strictly generate markdown in source comments"

Closes #1130

See merge request GNOME/glib!1264
2019-12-16 12:39:23 +00:00
Emmanuele Bassi
4ad429c7ca Merge branch 'revert-1277-i-got-it-wrong' into 'master'
Revert "Revert "docs: remove GDBusObjectManager example""

See merge request GNOME/glib!1282
2019-12-16 12:37:34 +00:00
Philip Withnall
a097342ae9 Merge branch 'autocleanup-class' into 'master'
gtype: Define auto-cleanup functions for Module class

See merge request GNOME/glib!1289
2019-12-16 12:13:08 +00:00
Philip Withnall
7aa91a0289 Merge branch 'th/atomic-compare-and-exchange' into 'master'
atomic/tests: test g_atomic_pointer_compare_and_exchange() with const pointers

See merge request GNOME/glib!1287
2019-12-16 11:14:58 +00:00
Philip Withnall
8deebeca17 Merge branch 'master' into 'master'
Fix typo: threfore -> therefore

Closes #1961

See merge request GNOME/glib!1285
2019-12-13 23:48:25 +00:00
Marco Trevisan (Treviño)
ab25fa42cc gtype: Define auto-cleanup functions for Module class
While we automatically define cleanup functions for the module, we don't
do it for the module class.

This will allow to manage the ownership of the class when reffing it
without having to cast it to GTypeClass.
2019-12-13 20:07:51 +01:00
Thomas Haller
ef9ce8ea00 atomic/tests: test g_atomic_pointer_compare_and_exchange() with const pointers
g_atomic_pointer_compare_and_exchange() should work with const pointers.
Add a test for that.

It seems clang 9.0.0-2.fc32 does not like this:

    ../glib/tests/atomic.c:93:9: warning: incompatible pointer types passing 'typeof ((((void *)0))) *' (aka 'void **') to parameter of type 'const char **' [-Wincompatible-pointer-types]
      res = g_atomic_pointer_compare_and_exchange (&vp_str, NULL, str);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../glib/gatomic.h:192:44: note: expanded from macro 'g_atomic_pointer_compare_and_exchange'
        __atomic_compare_exchange_n ((atomic), &gapcae_oldval, (newval), FALSE, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ? TRUE : FALSE; \
                                               ^~~~~~~~~~~~~~
    ../glib/tests/atomic.c:96:9: warning: incompatible pointer types passing 'typeof ((((void *)0))) *' (aka 'void **') to parameter of type 'const char **' [-Wincompatible-pointer-types]
      res = g_atomic_pointer_compare_and_exchange (&vp_str_vol, NULL, str);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../glib/gatomic.h:192:44: note: expanded from macro 'g_atomic_pointer_compare_and_exchange'
        __atomic_compare_exchange_n ((atomic), &gapcae_oldval, (newval), FALSE, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ? TRUE : FALSE; \
                                               ^~~~~~~~~~~~~~

Note that this clang version already issues various compiler warnings for
this test. This merely adds another case to check.

Eventually g_atomic_pointer_compare_and_exchange() should be fixed to
avoid compiler warnings.

Actually there is a problem. When you try to use g_atomic_pointer_compare_and_exchange()
with const pointers, it is also not working, because the implementation
as a function expects "void *" arguments. As the test also shows. As such,
it's probably not portable to use g_atomic_pointer_compare_and_exchange()
with const pointers at all. However, the macro implementation is (with the right
compiler) fine with that, so it's an easy "mistake" to make.
2019-12-13 15:07:35 +01:00
Christoph Reiter
a8263add45 Merge branch 'fix-gio-module-path-msvc' into 'master'
giomodule: gio modules are no longer installed in bindir on MSVC

See merge request GNOME/glib!1254
2019-12-12 18:29:07 +00:00
Philip Withnall
1810c80832 Merge branch 'piotrdrag/update-potfiles-191212' into 'master'
Update POTFILES.in 191212

See merge request GNOME/glib!1284
2019-12-12 16:39:47 +00:00
Yaobin Wen
639b426742 Fix typo: threfore -> therefore
Closes GNOME/glib#1961
2019-12-12 16:33:33 +00:00
Piotr Drąg
aeb85dd3cf Update POTFILES.in 2019-12-12 17:13:00 +01:00
Philip Withnall
407eae1969 Merge branch 'ptr-array-steal-example' into 'master'
gptrarray: Add an example to the g_ptr_array_steal() docs

See merge request GNOME/glib!1172
2019-12-12 13:08:03 +00:00
Philip Withnall
a07bc20557 gsignal: Drop unnecessary warnings from g_signal_lookup()
The `G_TYPE_IS_INSTANTIATABLE()` check is redundant with a precondition
on the function.

The `g_type_class_peek()` check seems like a pointless restriction: it
should be possible to check for a signal from a class init function.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #650
2019-12-12 13:00:54 +00:00
Emmanuele Bassi
f9bbee7db2 Merge branch '1726-codegen-glib-min-version' into 'master'
gdbus-codegen: Emit GUnixFDLists if an arg has type `h` w/ min-version

Closes #1726

See merge request GNOME/glib!1263
2019-12-12 12:49:34 +00:00
Emmanuele Bassi
ec3589b93f Merge branch 'signal-underscores' into 'master'
Signal name handling improvements

See merge request GNOME/glib!1224
2019-12-12 12:10:55 +00:00
Philip Withnall
4c20fb990a gptrarray: Add an example to the g_ptr_array_steal() docs
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-12-12 11:59:59 +00:00
Philip Withnall
9ec69ae6af clang-format-diff: Output diff for multiple files, not just one
A bug in `clang-format-diff.py` was causing it to only output the
formatting diff for the first incorrectly-formatted file, rather than
the diffs for all files.

That’s not so helpful for reformatting an entire MR in one go. Fix it.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-12-12 11:43:23 +00:00
Philip Withnall
742a7b125e clang-format-diff: Reformat script to satisfy PEP8 and pylint
This introduces no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-12-12 11:43:23 +00:00
Philip Withnall
df8745fabc Revert "Revert "docs: remove GDBusObjectManager example""
This reverts commit df4fb2cd32.

It needed to be coupled with the other commit from !978, and introduces
breakage into the documentation when compiled by itself. My mistake for
not testing properly.

See discussion on https://gitlab.gnome.org/GNOME/glib/merge_requests/1277#note_666761
2019-12-12 11:30:36 +00:00
Philip Withnall
2efa399abd Merge branch 'wip/hadess/update-installed-tests-ci' into 'master'
Update installed tests CI

See merge request GNOME/glib!1278
2019-12-12 10:34:37 +00:00
Bastien Nocera
5a174d105d ci: Fix permission error in valgrind analysis stage
The valgrind analysis stage inherits from existing artefacts, so make
sure to reset the permissions on the glib build directory to avoid a new
build failing.

$ meson ${MESON_COMMON_OPTIONS} --werror -Dsystemtap=true -Ddtrace=true -Dfam=true -Dinstalled_tests=true _build
<snip>
PermissionError: [Errno 13] Permission denied: '/builds/GNOME/glib/_build/meson-logs/meson-log.txt'
2019-12-12 10:59:47 +01:00
Bastien Nocera
c782042087 ci: Disable xdg-desktop-portal tests
They're not needed to actually run xdg-desktop-portal itself, and
we won't need libportal then.
2019-12-11 15:23:31 +01:00
Bastien Nocera
4b6ad93c86 ci: GMemoryMonitor support is now merged in gobject-introspection 2019-12-11 15:12:01 +01:00
Bastien Nocera
5a58da36d2 ci: Fix installed-tests until a newer GLib is released
Force-enable portal memory monitor until 2.63.3 is released
2019-12-11 14:15:54 +01:00
Bastien Nocera
bf91e3adf7 ci: GMemoryMonitor support is now merged in xdg-desktop-portal 2019-12-11 14:15:54 +01:00
Philip Withnall
fcc1367383 Merge branch 'gtkdoc-check-fix' into 'master'
Various gtk-doc improvements

See merge request GNOME/glib!1277
2019-12-11 13:02:20 +00:00
Philip Withnall
2f6010eabf Merge branch 'wip/hadess/add-dbus-tests-debug' into 'master'
tests: Enable GDBus debug for a number of unreliable tests

See merge request GNOME/glib!1271
2019-12-11 12:52:55 +00:00
Philip Withnall
cedeccec85 Merge branch 'wip/hadess/add-memory-monitor' into 'master'
gio: Add GMemoryMonitor to monitor for low-memory

See merge request GNOME/glib!1005
2019-12-11 12:31:53 +00:00