|
2010-09-04
, 14:51
|
Posts: 222 |
Thanked: 205 times |
Joined on Jul 2009
@ Finland
|
#22
|
C++ and C&GObject, not so much. They're very similar, only GObject is more advanced because it came later and learnt from the silly mistakes C++ made (no reflection, no properties (and by that, no automatic notification or monitor pattern), no reference counting, broken virtual methods, making copies all over the place, no Variant datatype, no signals, ...)
typedef struct _HDPluginLoader HDPluginLoader; typedef struct _HDPluginLoaderClass HDPluginLoaderClass; typedef struct _HDPluginLoaderPrivate HDPluginLoaderPrivate; #define HD_TYPE_PLUGIN_LOADER (hd_plugin_loader_get_type ()) #define HD_PLUGIN_LOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), HD_TYPE_PLUGIN_LOADER, HDPluginLoader)) #define HD_PLUGIN_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), HD_TYPE_PLUGIN_LOADER, HDPluginLoaderClass)) #define HD_IS_PLUGIN_LOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HD_TYPE_PLUGIN_LOADER)) #define HD_IS_PLUGIN_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HD_TYPE_PLUGIN_LOADER)) #define HD_PLUGIN_LOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), HD_TYPE_PLUGIN_LOADER, HDPluginLoaderClass)) struct _HDPluginLoader { GObject gobject; HDPluginLoaderPrivate *priv; }; struct _HDPluginLoaderClass { GObjectClass parent_class; GObject *(* load) (HDPluginLoader *loader, const gchar *plugin_id, GKeyFile *keyfile, GError **error); }; ...
class HDPluginLoader { QObject* load(...) ... };
|
2010-09-04
, 15:40
|
Posts: 3,464 |
Thanked: 5,107 times |
Joined on Feb 2010
@ Gothenburg in Sweden
|
#23
|
thanks, I want to start developing something for my N900, but I do not know C++ so I cannot use QT. I know well C so I chosed GTK
|
2010-09-04
, 15:59
|
Posts: 3,319 |
Thanked: 5,610 times |
Joined on Aug 2008
@ Finland
|
#24
|
Could this have something to do with the ability for "listeners" to monitor the access and changing of properties. If so, that's a powerful mechanism that I wouldn't want to lose.
|
2010-09-04
, 16:41
|
Posts: 222 |
Thanked: 205 times |
Joined on Jul 2009
@ Finland
|
#25
|
|
2010-09-04
, 17:25
|
|
Posts: 2,427 |
Thanked: 2,986 times |
Joined on Dec 2007
|
#26
|
A common problem in comparisons like this is that people compare what GObject gives them with C++ (and go ranting on how this or that is ugly in C++ ). That is is the wrong comparison, as Qt is not just a set of libraries, but a full-blown framework (even more so than GObject/GTK) - if you're using Qt, the valid question is if Qt addresses the problems C++ has/had, and often the answer is yes, like in the case or various monitor patters, reference counting, etc (in fact, sometimes I feel as if it's a C++ compatible C derivative of it's own, given all the syntactic sugar and patterns it introduces)
Qt is not particularly slow on N900 (I have no reason to think Hildon would be any faster). Even startup time is quite tolerable, less than 3 secs for a small Qt application.
|
2010-09-04
, 17:36
|
|
Posts: 1,391 |
Thanked: 4,272 times |
Joined on Sep 2007
@ Vienna, Austria
|
#27
|
|
2010-09-05
, 06:21
|
Posts: 138 |
Thanked: 164 times |
Joined on Aug 2009
@ Chateauroux, FRANCE
|
#28
|
|
2010-09-10
, 21:57
|
|
Posts: 44 |
Thanked: 26 times |
Joined on Jan 2006
@ Rockville, MD, USA
|
#29
|
Seems like you are trying to taste a food by reading a list of ingredients. Proof of the programming environment is in the pain of using it.
N9: Go white or go home