Mercurial > projects > qtd
annotate cpp/qt_qtd/qtd_core.cpp @ 354:18bd68f586c6
removed superfluous destructors
author | Max Samukha <maxter@spambox.com> |
---|---|
date | Mon, 24 May 2010 23:43:30 +0300 |
parents | 073b9153ed8a |
children | 08c1ca7975ab |
rev | line source |
---|---|
1 | 1 /** |
2 * | |
3 * Copyright: Copyright QtD Team, 2008-2009 | |
4 * License: <a href="http://www.boost.org/LICENSE_1_0.txt>Boost License 1.0</a> | |
5 * | |
6 * Copyright QtD Team, 2008-2009 | |
7 * Distributed under the Boost Software License, Version 1.0. | |
8 * (See accompanying file boost-license-1.0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
9 * | |
10 */ | |
11 | |
12 #include "qtd_core.h" | |
13 #include <iostream> | |
14 | |
15 extern "C" DLL_PUBLIC QModelIndex qtd_to_QModelIndex(QModelIndexAccessor mia) | |
16 { | |
17 return * (QModelIndex *) (&mia) ; | |
18 } | |
19 | |
20 extern "C" DLL_PUBLIC QModelIndexAccessor qtd_from_QModelIndex(const QModelIndex &index) | |
21 { | |
22 QModelIndexAccessor mia = { | |
23 index.row(), | |
24 index.column(), | |
25 index.internalPointer(), | |
26 (QAbstractItemModel *) index.model() | |
27 }; | |
28 | |
29 return mia; | |
30 } | |
31 | |
247 | 32 extern "C" DLL_PUBLIC const char* qtd_qVersion() |
33 { | |
34 return qVersion(); | |
35 } | |
36 | |
37 extern "C" DLL_PUBLIC bool qtd_qSharedBuild() | |
38 { | |
39 return qSharedBuild(); | |
40 } | |
41 | |
354
18bd68f586c6
removed superfluous destructors
Max Samukha <maxter@spambox.com>
parents:
253
diff
changeset
|
42 //TODO: this has to be replaced with something that makes some sense |
1 | 43 #ifdef CPP_SHARED |
253 | 44 QTD_EXPORT_VAR(qtd_toUtf8); |
354
18bd68f586c6
removed superfluous destructors
Max Samukha <maxter@spambox.com>
parents:
253
diff
changeset
|
45 QTD_EXPORT_VAR(qtd_QtdObject_delete); |
1 | 46 |
354
18bd68f586c6
removed superfluous destructors
Max Samukha <maxter@spambox.com>
parents:
253
diff
changeset
|
47 extern "C" DLL_PUBLIC void qtd_core_initCallBacks(pfunc_abstr d_func, pfunc_abstr del_d_qobj) { |
253 | 48 QTD_EXPORT_VAR_SET(qtd_toUtf8, d_func); |
354
18bd68f586c6
removed superfluous destructors
Max Samukha <maxter@spambox.com>
parents:
253
diff
changeset
|
49 QTD_EXPORT_VAR_SET(qtd_QtdObject_delete, del_d_qobj); |
1 | 50 } |
51 #endif | |
57 | 52 |
53 extern bool qRegisterResourceData | |
54 (int, const unsigned char *, const unsigned char *, const unsigned char *); | |
55 | |
56 extern bool qUnregisterResourceData | |
57 (int, const unsigned char *, const unsigned char *, const unsigned char *); | |
58 | |
59 extern "C" DLL_PUBLIC bool qtd_register_resource_data(int version, const unsigned char *tree, | |
60 const unsigned char *name, const unsigned char *data) | |
61 { | |
62 return qRegisterResourceData(version, tree, name, data); | |
63 } | |
64 | |
65 extern "C" DLL_PUBLIC bool qtd_unregister_resource_data(int version, const unsigned char *tree, | |
66 const unsigned char *name, const unsigned char *data) | |
67 { | |
68 return qUnregisterResourceData(version, tree, name, data); | |
69 } |