Commit Graph

19429 Commits

Author SHA1 Message Date
Emmanuele Bassi
86ab6ffa8d Merge branch '303-list-store-tests' into 'master'
Add more GListStore/GListModel tests

See merge request GNOME/glib!304
2018-09-05 11:11:58 +00:00
Philip Withnall
d2f412590e Merge branch 'wip/gtimeval-document-year-2038-problem' into 'master'
Document that GTimeVal is subject to the year 2038 problem on 32-bit systems

See merge request GNOME/glib!302
2018-09-05 10:55:43 +00:00
Philip Withnall
574e2c8a99 Merge branch 'wip/otte/simplify-liststore-splice' into 'master'
liststore: Simplify code

See merge request GNOME/glib!303
2018-09-05 10:38:59 +00:00
Philip Withnall
53a6689ebf tests: Test g_list_model_get_object()
It wasn’t being tested. It should behave the same as
g_list_model_get_item(), so write a wrapper for the two.

This brings the code coverage of glistmodel.c up to 100%.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-09-05 11:36:13 +01:00
Philip Withnall
7e33c50dd3 tests: Add more GListStore tests to get it too 100% coverage
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-09-05 11:27:06 +01:00
Philip Withnall
35d1ef678a gliststore: Simplify a GType check on construction
When setting the GListStore:item-type property we need to check the
GType is a GObject (or subclass). There was some explicit code for this,
but when actually testing it and looking at the code coverage, it turns
out that the GObject property type check coming from
g_param_spec_gtype() does everything we want, and the custom
g_critical() can never be hit. So turn it into an assertion.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-09-05 11:25:58 +01:00
Philip Withnall
dfa2a4ae75 gtestutils: Print non-matching stderr/stdout output on trap failure
When running a test as a subprocess and matching its output, it’s very
annoying for GLib to tell you that the output didn’t match your pattern,
*but not actually say what the output was*. Fix that.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-09-05 11:25:03 +01:00
Emmanuele Bassi
46c1a45dc1 Merge branch '277-closure-docs' into 'master'
gclosure: Clarify when destroy notifiers are called in documentation

Closes #277

See merge request GNOME/glib!246
2018-09-05 10:13:48 +00:00
Emmanuele Bassi
515c39b0a9 Merge branch '1493-dtrace-consts' into 'master'
dtrace: Add missing const attributes to types in glib_probes.d

See merge request GNOME/glib!272
2018-09-05 10:13:14 +00:00
Emmanuele Bassi
3da4314205 Merge branch 'hash-table-tests' into 'master'
tests: Add more tests to finish branch coverage of GHashTable

See merge request GNOME/glib!289
2018-09-05 10:12:07 +00:00
Emmanuele Bassi
fd2d94dca5 Merge branch '656-format-security' into 'master'
build: Set -Wformat when testing for -Wformat-security

Closes #656

See merge request GNOME/glib!300
2018-09-05 09:42:33 +00:00
Philip Withnall
98f326a020 Merge branch 'wip/otte/fallthrough' into 'master'
Add G_GNUC_FALLTHROUGH for __attribute__(fallthrough))

See merge request GNOME/glib!296
2018-09-04 22:06:26 +00:00
Philip Withnall
fbe8f247cc Merge branch 'remove-changelogs' into 'master'
Remove all ChangeLog files

See merge request GNOME/glib!292
2018-09-04 22:04:40 +00:00
Benjamin Otte
e1cec0fb11 liststore: Simplify code
This is also faster, though I doubt anyone's able to measure it.

The previous code was a more complicted way to do the same thing and it
was likely written the more complicated way because it fell out commit
758d7073a9 when fixing
https://bugzilla.gnome.org/show_bug.cgi?id=795307
2018-09-04 20:31:51 +02:00
Benjamin Otte
93b9f22369 build: Enable -Wimplicit-fallthrough by default 2018-09-04 20:24:25 +02:00
Benjamin Otte
3aff811d13 Use G_GNUC_FALLTHROUGH where appropriate 2018-09-04 20:24:25 +02:00
Benjamin Otte
95477a4e35 macros: Add G_GNUC_FALLTHROUGH
Expands to the GNU C fallthrough statement attribute if the compiler is gcc.
This allows declaring case statement to explicitly fall through in switch
statements. To enable this feature, use -Wimplicit-fallthrough during
compilation.
2018-09-04 20:24:21 +02:00
Christoph Reiter
24a95056b4 autotools: stop generating a ChangeLog file for the dist tarball
We have git for that.

automake requires a ChangLog file in gnu mode so switch to the less strict
foreign mode instead.
2018-09-04 17:43:37 +02:00
Christoph Reiter
912581340e Remove all static ChangeLog files
They only contain old information which is also available in git
2018-09-04 15:56:54 +02:00
Iain Lane
68a4e273b4 Document that GTimeVal is subject to the year 2038 problem on 32-bit systems
It might not be immediately obvious that this is the case. Let's record
it in the description of `GTimeVal` itself and also in
`g_time_val_from_iso8601`.

We also drop an incorrect statement in the documentation for
`g_time_val_from_iso8601` stating that years up to 3000 were supported;
this is also not true for the same reason.

Related: #1509
2018-09-04 11:15:25 +01:00
Iain Lane
5b7a16a3c6 Merge branch 'wip/test_timeval_to_iso8601_overflow-skip-on-32-bit' into 'master'
tests/timer: Skip test_timeval_to_iso8601_overflow if we can't overflow a GTimeVal

Closes #1509

See merge request GNOME/glib!299
2018-09-04 09:42:35 +00:00
Iain Lane
f697f6aa08 tests/timer: Skip test_timeval_to_iso8601_overflow if we can't overflow a GTimeVal
On 32 bit systems, the size of a long might be the same as the size of
an int. In that case, we won't be able to get an overflow when
converting from a GTimeVal to a time_t. Skip the test for this in that
case.

Closes #1509
2018-09-04 10:31:52 +01:00
Philip Withnall
9e9db46a49 build: Drop pointless -Wformat-security warning flag
We already set -Wformat=2, which implies -Wformat-security, so there’s
no need to test for and set -Wformat-security separately.

The test for -Wformat-security never worked anyway, since gcc complains
if it’s specified without also setting -Wformat to some value. The
complaint causes configure.ac/meson.build to assume the option doesn’t
work.

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

https://gitlab.gnome.org/GNOME/glib/issues/656
2018-09-04 09:51:49 +01:00
Ondrej Holy
6ae061b74d Merge branch 'add-identifier-class-loop' into 'master'
Document new volume class `loop`

See merge request GNOME/glib!293
2018-09-04 08:29:01 +00:00
Christoph Reiter
0232cf64c6 Merge branch '1313-die-ac-c-const' into 'master'
build: Drop AC_C_CONST from configure.ac

See merge request GNOME/glib!297
2018-09-03 14:29:12 +00:00
Philip Withnall
d3656705fa Merge branch 'default-tls-database' into 'master'
gtlsbackend: add support for setting the default TLS database

Closes glib-networking#35

See merge request GNOME/glib!273
2018-09-03 13:22:39 +00:00
Philip Withnall
b79bafccfe Merge branch 'glib-gettextize' into 'master'
meson: fix typo

See merge request GNOME/glib!295
2018-09-03 12:18:36 +00:00
Philip Withnall
8f157d0274 Merge branch 'wip/fmuellner/nm-portal-changed-signal' into 'master'
portal network monitor: Always emit changed signal on changed

See merge request GNOME/glib!294
2018-09-03 12:14:18 +00:00
Philip Withnall
6e03a05a9e Merge branch 'meson-bindir-fix' into 'master'
build: fix installation dir of glib-gettextize

See merge request GNOME/glib!290
2018-09-03 12:10:15 +00:00
Philip Withnall
bac504e32f build: Drop AC_C_CONST from configure.ac
Any compiler we care about now supports the `const` keyword, so we no
longer need to check for it. autoconf has recommended this macro is
obsolete:

https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/C-Compiler.html#index-AC_005fC_005fCONST-755

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

https://gitlab.gnome.org/GNOME/glib/issues/1313
2018-09-03 13:04:21 +01:00
Philip Withnall
17ae9f36da Merge branch 'O_CLOEXEC' into 'master'
gspawn: Fix build on systems without O_CLOEXEC

See merge request GNOME/glib!286
2018-09-03 11:51:06 +00:00
Philip Withnall
f63bc3072c Merge branch 'GKqueueFileMonitor' into 'master'
gio: Don't redefine GKqueueFileMonitor

Closes #1506

See merge request GNOME/glib!291
2018-09-03 11:47:33 +00:00
Efstathios Iosifidis
0d2644812e Update Greek translation
(cherry picked from commit 6a3fb3438d)
2018-09-03 09:05:22 +00:00
Matthew Waters
27fca3474c gtlsdatabase: document that implementations must be thread-safe 2018-09-03 13:55:57 +10:00
Matthew Waters
b84951eb6f gtlsbackend: add support for setting the default TLS database
There are many cases where a default TLS database is not able to be
defined within the constraints of a system.  For example glib-networking
(or glib-openssl) cannot retrieve the default certificate store on iOS
or Android and need to be initialized from a cert file of certificates
bundled with the application.

Previously GStreamer was relying on a custom patch to glib-networking to
populate the default database from the file pointed to by the
CA_CERTIFICATES environment variable however the mechanism that enabled
this was recently remove from glib-networking.

Adding a more generic g_tls_backend_set_default_database() API allows
application developers to override the default database using their own
certificates as well as allowing equivalent functionality on Android/iOS
(or others) as on the default database handling Linux.

Fixes https://gitlab.gnome.org/GNOME/glib-networking/issues/35
2018-09-03 13:55:57 +10:00
Matthew Waters
6545e7558c gversionmacros: add version macros for GLib 2.60 2018-09-03 13:55:57 +10:00
Ask Hjorth Larsen
2a34e66daf Updated Danish translation 2018-09-02 23:19:34 +02:00
Jan Tojnar
b3da2b4064
meson: install glib-gettextize to bindir 2018-09-02 20:36:04 +02:00
Jan Tojnar
48821a50b4
meson: fix typo 2018-09-02 20:35:26 +02:00
Balázs Meskó
b0e239c26e Update Hungarian translation
(cherry picked from commit 1d6909c234)
2018-09-01 22:19:45 +00:00
Florian Müllner
423a2936ea portal network monitor: Always emit changed signal on changed
The ::network-changed signal is documented to indicate any change in
network configuration, which doesn't necessarily imply a property
change - additional services becoming available after connecting to
a VPN comes to mind for instance.

In order to match the "native" network monitor's behavior, always
emit the signal when it's in response to the 'changed' D-Bus signal.

Also emit the signal unconditionally when loading the initial property
values, to allow clients to differentiate between "offline" meaning
"offline" and "offline" meaning "uninitialized".
2018-09-01 19:31:45 +02:00
Rafael Fontenelle
1b0aa8b663 Update Brazilian Portuguese translation
(cherry picked from commit 2a64690cd9)
2018-09-01 15:22:39 +00:00
segfault
c341479c23 Document new loop class 2018-08-31 22:02:02 +02:00
Ryan Schmidt
612c450bd4 gio: Don't redefine GKqueueFileMonitor
Fixes build on old compilers that don't allow type redefinitions.

Closes: https://gitlab.gnome.org/GNOME/glib/issues/1506
2018-08-31 09:52:29 -05:00
Rasmus Thomsen
44704b7a49
build: fix installation dir of glib-gettextize 2018-08-31 15:58:38 +02:00
Xavier Claessens
b2375471cc Merge branch '1313-config-cleanups' into 'master'
More config.h fixups for Meson

Closes #1313

See merge request GNOME/glib!283
2018-08-31 12:56:26 +00:00
Emmanuele Bassi
0d00713fb2 Merge branch 'compile-resources-cxx' into 'master'
glib-compile-resources: Fix generated code compiling with C++ compilers

See merge request GNOME/glib!287
2018-08-31 12:50:36 +00:00
Philip Withnall
3fd9f83ae4 build: Bump version to 2.59.0
Ready for the new unstable release series.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Reviewed-by: nobody
2018-08-31 12:51:38 +01:00
Philip Withnall
0e5f9aa143 tests: Add more tests to finish branch coverage of GHashTable
Test a few situations where NULL values for optional out parameters
weren’t being tested. This takes the branch coverage of GHashTable up to
100% (ignoring g_return_if_fail() branches).

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-31 12:46:48 +01:00
Philip Withnall
8dc8b33dfa ghash: Clear out arguments to NULL in g_hash_table_lookup_extended()
If the given key is not found, clear the orig_key and value arguments to
NULL as well as returning FALSE. Then the caller can unconditionally
check them.

This makes the behaviour of g_hash_table_lookup_extended() consistent
with g_hash_table_steal_extended().

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-08-31 12:46:48 +01:00