summaryrefslogtreecommitdiff
blob: a1ea502787c32fb8be6bb14a0955b6b8ced0a9ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- a/qtiplot/src/scripting/qti.sip	2017-02-13 17:01:03.123828499 +0100
+++ b/qtiplot/src/scripting/qti.sip	2017-02-13 17:02:12.628828234 +0100
@@ -148,14 +148,14 @@
     }
     break;
   case Table::Date:
-    if (sipCanConvertToType(item, sipType_QDateTime, 0)) {
+    if (sipCanConvertToType(item, sipFindType("QDateTime"), 0)) {
       int isErr = 0;
-      QDateTime* dateTime = reinterpret_cast<QDateTime*>(sipConvertToType(item, sipType_QDateTime,
+      QDateTime* dateTime = reinterpret_cast<QDateTime*>(sipConvertToType(item, sipFindType("QDateTime"),
                             0/*sipTransferObj*/, 0/*flags*/, 0/*state*/, &isErr));
       if (isErr)
         return 1;
       table->setText(row, col, dateTime->toString(table->columnFormat(col)));
-      delete dateTime;
+      //delete dateTime;
     }
     else {
       if (PyType_Ready(item_type) == 0)
@@ -164,14 +164,14 @@
     }
     break;
   case Table::Time:
-    if (sipCanConvertToType(item, sipType_QTime, 0)) {
+    if (sipCanConvertToType(item, sipFindType("QTime"), 0)) {
       int isErr = 0;
-      QTime* time = reinterpret_cast<QTime*>(sipConvertToType(item, sipType_QTime,
+      QTime* time = reinterpret_cast<QTime*>(sipConvertToType(item, sipFindType("QTime"),
                             0/*sipTransferObj*/, 0/*flags*/, 0/*state*/, &isErr));
       if (isErr)
         return 1;
       table->setText(row, col, time->toString(table->columnFormat(col)));
-      delete time;
+      //delete time;
     }
     else {
       if (PyType_Ready(item_type) == 0)