| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
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.
|
|
|
|
| |
Instead of Glib::RefPtr<>::cast_dynamic().
|
| |
|
|
|
|
|
|
|
|
| |
Specifying a Deleter in make_refptr_for_instance().
And changing RefPtr::cast_dynamic<>() to std::dynamic_pointer_cast<>().
The glibmm_refptr test then becomes rather silly, and should maybe
just be removed.
|
|
|
|
| |
This will make it easier to change the underlying RefPtr type.
|
|
|
|
|
|
| |
Using Glib::ArrayHandler<>::vector_to_array() and
Glib::ArrayHandler<>::array_to_vector() instead, and only in the
implementatoin instead of in the API.
|
|
|
|
|
|
|
|
|
|
|
| |
make_valid replaces all non-UTF8 characters with replacement
character (U+FFFD). Allows manipulating with ustring after you find
out by ustring::validate() that it's not an UTF-8 string and you
need to rescue it somehow.
This wraps g_utf8_make_valid().
Bug #780075
|
|
|
|
| |
Bug 777791
|
|
|
|
| |
Noticed by cppcheck.
|
|
|
|
| |
Noticed by cppcheck.
|
|
|
|
| |
Noticed by cppcheck.
|
|
|
|
|
|
|
| |
* tests/Makefile.am: Add giomm_stream_vfuncs.
* tests/giomm_stream_vfuncs/main.cc: New file.
An updated version of a patch by Krzysztof KosiĆski <tweenk.pl@gmail.com>
Bug #572471
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To deal with this clang warning when building with --enable-warnings=fatal.
TODO: However, this doesn't actually seem to disable the error.
glibmm_interface_move/main.cc:9:1: error: unused function 'glib_autoptr_cleanup_TestIface' [-Werror,-Wunused-function]
G_DECLARE_INTERFACE(TestIface, test_Iface, TEST, IFACE, GObject)
^
/opt/gnome/include/glib-2.0/gobject/gtype.h:1565:3: note: expanded from macro 'G_DECLARE_INTERFACE'
_GLIB_DEFINE_AUTOPTR_CHAINUP (ModuleObjName, PrerequisiteName) \
^
/opt/gnome/include/glib-2.0/glib/gmacros.h:421:22: note: expanded from macro '_GLIB_DEFINE_AUTOPTR_CHAINUP'
static inline void _GLIB_AUTOPTR_FUNC_NAME(ModuleObjName) (ModuleObjName **_ptr) { \
^
/opt/gnome/include/glib-2.0/glib/gmacros.h:415:43: note: expanded from macro '_GLIB_AUTOPTR_FUNC_NAME'
^
<scratch space>:224:1: note: expanded from here
glib_autoptr_cleanup_TestIface
|
|
|
|
|
| |
Similar to glib/gio/tests/glistmodel.c
Bug #755307
|
|
|
|
| |
The older libsigc++ syntax is deprecated.
|
| |
|
| |
|
|
|
|
| |
As required by the latest (not yet released) libsigc++.
|
|
|
|
|
| |
I need to make a subsequent commit to fix the now-unaligned
trailing comments.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
As suggested by Kjell Ahlstedt:
https://bugzilla.gnome.org/show_bug.cgi?id=757674#c10
|
|
|
|
|
| |
Instead of using a lambda. As suggested by Kjell Ahlstedt:
https://bugzilla.gnome.org/show_bug.cgi?id=757674#c10
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* glib/glibmm/interface.cc: Don't call ObjectBase's move assignment operator
from Interface's move assignment operator.
* glib/glibmm/object.cc: Perform of job of sigc::trackable's move constructor
in Object's move constructor.
* glib/glibmm/objectbase.cc: Move constructor: Set gobject_ = nullptr.
Fix the assignment of cpp_destruction_in_progress_.
Move assignment: Add self-assignment guard. Avoid the risk of accidentally
deleting *this. Let a call to initialize_move() do most of the job.
* tests/glibmm_interface_move/main.cc:
* tests/glibmm_object_move/main.cc:
* tests/glibmm_objectbase_move/main.cc: Really test move assignment.
Test that the wrapped C object has been moved, and not copied.
Bug #756962.
|
|
|
|
|
|
|
| |
* glib/glibmm/weakref.h: Add noexcept.
* glib/glibmm.h: Add weakref.h.
* tests/glibmm_weakref/main.cc: Remove #include <glibmm/weakref.h>.
Bug #583399.
|
|
|
|
|
|
|
|
|
|
| |
* glib/glibmm/filelist.am: Add weakref.h.
* glib/glibmm/weakref.h: New file.
* glib/glibmm.h: Add weakref.h. (Not yet. I'll do it before I push weakref.h.)
* tests/Makefile.am: Add test case glibmm_weakref.
* tests/glibmm_weakref/main.cc: New test case. Bug #583399.
Thanks to worknesday, who attached a first version of WeakRef to
the bug report. Bug #583399
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This code got unpleasantly big because I wanted to test a C++
class that wraps a GObject while also implementing a C++ Interface
that wraps a GInterface that the GObject implements. But it seems
to work.
However, the code to test a raw TestInterface is commented out
because the move constructor does not pass the test. I am not sure
if this should even be expected to work:
Interface interface = std::move(object);
or:
Base base = std::move(derived);
Surely that would lose the data (and virtual method table) from the
Derived class anyway?
|
|
|
|
| |
To test ObjectBase separately.
|
| |
|
|
|
|
|
|
| |
The *with_parent* tests test much the same thing, but these ones
are simpler, based on Marcin Kolny's simpler tests for the
universal reference versions.
|
|
|
|
|
| |
test_refptr_universal_reference_move_constructor(): Make even
more sure that its the copy constructor that the compiler uses.
|
|
|
|
|
|
|
|
| |
* glib/glibmm/refptr.h: add move constructor and move assignment
operator which allow to set underlying object to castable type.
* tests/glibmm_refptr/main.cc: add tests for move constructor and
move assignment operator containing universal reference as an
argument.
|
|
|
|
|
| |
The && was const, which was a silly typo. Thanks to Marcin Kolny
for noticing.
|
|
|
|
|
| |
To test refcounting, though I'm not sure that the test for the
move constructor is quite right.
|
|
|
|
|
|
|
|
|
|
|
| |
Because I recently find that the connection often, but not always,
times out. Maybe Google has changed something about its servers.
I was seeing this output when running the test:
$ ./giomm_tls_client/test
Successfully resolved address of test host 'www.google.com'.
First address of test host is 2a00:1450:4016:802::1011.
Could not connect socket to 2a00:1450:4016:802::1011:443. Exception: Connection timed out
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Because this generally invites programming errors, though I am
less concerned about shadowing of method names by parameter or
variable names, which requires some tedious parameter renaming.
In MatchInfo::set_gobject() the confusion between take_ownership and
this.take_ownership does seem to have caused a programming error,
hopefully now corrected.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* glib/src/variant.[ccg|hg]: Add VariantBase::is_castable_to() and
VariantContainerBase::get_iter(). Accept casts of complicated types
containing object paths and DBus type signatures to Variant<> types
containing Glib::ustring and std::string. Change some get(), get_child()
and get_iter() methods similarly.
* tests/glibmm_variant/main.cc: Add test_dynamic_cast_composite_types().
Bug #747508.
|
|
|
|
|
| |
* tests/glibmm_interface_implementation/main.cc: Return EXIT_FAILURE if some
test fails. Add more tests of virtual functions. Bug #705124.
|
|
|
|
| |
Because it's currently timing out for me.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
/etc/fstab is a *nix only file, which would not normally exist under
Windows unless one is under Cygwin. Use the path for the Wordpad
application on Windows, which is a standard part of Windows; and use
/etc/fstab otherwise.
* tests/giomm_ioerror/main.cc:
* tests/giomm_simple/main.cc: Test for c:/windows/write.exe
(Wordpad application) on Windows, and use /etc/fstab otherwise.
https://bugzilla.gnome.org/show_bug.cgi?id=736778
https://bugzilla.gnome.org/show_bug.cgi?id=736778
|