| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
* gio/src/file.[ccg|hg]: Add create_tmp().
Document create_for_parse_name().
* tests/giomm_simple/main.cc: Test File::create_tmp().
|
| |
|
|
|
|
|
|
| |
* gio/src/liststore.[ccg|hg]: Add two ListStoreBase::find() and
two ListStore::find().
* tests/giomm_listmodel/main.cc: Test ListStore::find().
|
|
|
|
|
|
| |
The default value will be changed in future Meson releases.
Don't use deprecated python3.path() and execute(..., gui_app: ...).
|
|
|
|
| |
Fixes #89
|
|
|
|
|
|
|
| |
Make 3 tests, where the 2 new tests check that the disallowed comparisons
between std::string and Glib::ustring don't compile.
The new tests are added only in Meson builds (ninja test).
See MR !50
|
| |
|
|
|
|
| |
glib and sigc++ can be subprojects of glibmm.
|
|
|
|
|
|
| |
Multithreaded examples and tests depend on 'threads'.
I noticed this when I started experimenting with subprojects.
Strange that it was not reported as a missing dependency long ago.
|
|
|
|
|
| |
This test sometimes fails in CI runs, probably for a reason that's out
of glibmm's control.
|
|
|
|
|
| |
Gio::Socket::create() can throw an exception. Put it in a try block.
See #84
|
|
|
|
| |
Use std::map or std::unordered_map instead.
|
|
|
|
| |
See issue #71
|
|
|
|
|
| |
Deprecated GLIBMM and GIOMM API are disabled when example programs and test
programs are built with Autotools. Do the same when building with Meson.
|
|
|
|
|
| |
It was (probably by mistake) disabled by commit
729b1ae95d5d05b78741eeef1d635f95b19d790b
|
|
|
|
|
|
| |
...for Visual Studio builds, since we don't really get unused function
warnings from the TEST_IFACE items. Plus, we don't have glib autoptr
support in Visual Studio builds, either.
|
|
|
|
|
|
| |
glibmm can be built with either Autotools or Meson.
See MR !27
|
|
|
|
|
|
|
|
| |
A binding between properties can remain even after all RefPtr<Binding>s
are gone. This is similar to how Gtk::Widget::set_controller() works
in gtkmm4.
Fixes #62, see !21
|
|
|
|
|
|
| |
Glib::Error::what() returns const char* (was Glib::ustring). It overrides
std::exception::what() that returns const char* and is noexcept.
Fixes #23
|
|
|
|
|
|
|
|
| |
and with the comparison operators, operator==(), etc.
Add the glibmm_ustring_compare test case.
https://gitlab.gnome.org/GNOME/glibmm/issues/64
https://gitlab.gnome.org/GNOME/glibmm/issues/65
|
|
|
|
| |
Fixes #66
|
|
|
|
|
| |
A few implicit conversions in tests/ have been kept. They are probably
deliberate, to test implicit conversion. Inspired by issue #65
|
|
|
|
|
| |
A basic test is better than nothing, and I just changed how the
transform function works and want to be confident it still does.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add another way to produce formatted ustrings, this time using printf
syntax, by forwarding arguments to g_strdup_printf() and then copying
the result into the returned ustring.
This includes a private ustring::sprintify() function that by default
just forward its argument but can be overloaded to do something else.
In this commit, that is overloaded for ustring and std::string so that
their .c_str() is passed to printf instead, avoiding the ugliness of
users always having to write .c_str() in their own lists of arguments.
Note that the same lack of type safety as plagues printf() and all its
variants (in both C and GLib) applies here: the arguments are just
forwarded on, so if you include too few or the wrong types for the
placeholders you specify, you invoke undefined behaviour just as in C.
For reasons like that, C++'s preference of streams over stdio, and the
hope that we'll eventually get an actual nice string-formatting solution
in the C++ Standard, I don't go out of my way to shout about this in the
documentation. Users who really want sprintf() will find it, without us
having to shout too loudly about it and risk being seen as recommending
it more than anything else. It's here for those who know they need it.
https://gitlab.gnome.org/GNOME/glibmm/issues/21
|
|
|
|
|
|
| |
* gio/src/asyncresult.ccg: Replace a TODO comment with an explanation.
* tests/giomm_asyncresult_sourceobject/main.cc: Add code that demonstrates
why Glib::wrap(GObject* object, bool take_copy) returns an empty RefPtr.
|
|
|
|
|
|
|
|
|
|
|
| |
>>>
when I tested it, the glibmm_ustring_format test failed. It failed
because my chosen language in Ubuntu is Swedish. The expected "42.00"
became "42,00". The decimal delimiter is a comma in most European
languages. English is an exception.
>>>
https://gitlab.gnome.org/GNOME/glibmm/merge_requests/4#note_352960
|
|
|
|
|
|
|
|
|
| |
We only tested here whether single arguments got formatted without
throwing exceptions, but not whether they got formatted into the
expected output or combinations of multiple types and I/O manipulators.
This adds a test for that, so we at least have something to ensure that
things are working correctly, e.g. if refactoring format() as I just did
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gcc8 -Wextra prints a warning when a single reinterpret_cast is used for
conversion between different types of function pointers. The previous fix
with a union in Glib::bitwise_equivalent_cast<>() is not standard C++.
Rename the function to Glib::function_pointer_cast<>(), and use two
reinterpret_casts as recommended in gcc's documentation.
* glib/src/optiongroup.ccg: Use a reinterpret_cast to convert from
a function pointer to void*. That's possible now. It's "conditionally
supported", starting with C++11.
See https://github.com/libsigcplusplus/libsigcplusplus/issues/8
|
|
|
|
|
|
|
|
|
|
|
|
| |
gcc8 -Wextra prints a warning when reinterpret_cast is used for conversion
between different types of function pointers. Avoid that by adding
Glib::bitwise_equivalent_cast<>() with a union with members of
the two types of function pointers.
* glib/src/optiongroup.ccg: Use Glib::bitwise_equivalent_cast<>() to convert
from a function pointer to void*.
See https://github.com/libsigcplusplus/libsigcplusplus/issues/1
|
|
|
|
|
|
| |
This reverts commit fa85bd1161d5d914095d1a3f9b620da294c9af79.
This can be done in a better way by keeping the union in a template function.
|
|
|
|
|
|
|
|
| |
gcc8 -Wextra prints a warning when reinterpret_cast is used for conversion
between different types of function pointers. Avoid that by instead using
a union with members of the two types of function pointers.
See https://github.com/libsigcplusplus/libsigcplusplus/issues/1
|
|
|
|
|
|
| |
This reverts commit 732df7d9cb709f6fd96099654fb83a00d99f26cf.
This doesn't seem to be a problem any more.
|
|
|
|
| |
Bug 789330
|
|
|
|
| |
Bug 786824
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/glibmm/filelist.am: Add variantdbusstring.h and variantdbusstring.cc.
* glib/glibmm/variantdbusstring.[cc|h]: New files. String classes meant
only for Variants with D-Bus object paths or D-Bus signatures.
* glib/src/variant.[ccg|hg]: Add specializations for
Variant<Glib::DBusObjectPathString>, Variant<Glib::DBusSignatureString>
and Variant<std::vector<Glib::DBusObjectPathString>>.
* glib/src/varianttype.[ccg|hg]: Add VARIANT_TYPE_OBJECT_PATH_ARRAY.
* tests/glibmm_variant/main.cc: Add test_object_path().
Make it possible to create a composite Variant containing variant type
o (D-Bus object path) or g (D-Bus signature). Bug 785700
|
|
|
|
| |
Probably overlooked in commit 696685eeaa639ae5e41a9eaa761250368af492db
|
|
|
|
| |
to avoid some warnings when Makefile is generated from Makefile.am.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Make specializations of SignalProxy<> and SignalProxyDetailed<> for signal
handlers that return void. The specializations have no connect_notify()
method, and the 'after' parameter in the connect() method has a default
value only in the specializations. Bug 126213
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
For instance, RefPtr to ObjectBase-derived types, or other types that
try to have a similar API.
Previously, this assumed that any Value<RefPtr<T>> was for a T that had
a get_base_type() (wrapping an underlying glib/gtk C type).
|
|
|
|
| |
Bug 86864
|
| |
|
|
|
|
| |
This allows further reuse of the DerivedObject and DerivedObjectBase test classes.
|
| |
|
| |
|
|
|
|
| |
Which was previously almost empty.
|
|
|
|
|
|
|
|
|
|
|
| |
Now that RefPtr is really a std::shared_ptr<>, we should use
std::weak_ref<> instead.
Note that a std::weak_ptr<> tells you nothing about whether
the underlying GObject is still alive, which Glib::RefPtr did.
It just tells you whether our std::shared_ptr<> still holds
a reference to it. That's why I removed one of the checks in
tests/giomm_listmodel/main.cc.
|