Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/scripting/kexidb/kexidbcursor.h
Show All 18 Lines | |||||
19 | 19 | | |||
20 | #ifndef SCRIPTING_KEXIDBCURSOR_H | 20 | #ifndef SCRIPTING_KEXIDBCURSOR_H | ||
21 | #define SCRIPTING_KEXIDBCURSOR_H | 21 | #define SCRIPTING_KEXIDBCURSOR_H | ||
22 | 22 | | |||
23 | #include <QObject> | 23 | #include <QObject> | ||
24 | 24 | | |||
25 | #include <KDbCursor> | 25 | #include <KDbCursor> | ||
26 | #include <KDbRecordEditBuffer> | 26 | #include <KDbRecordEditBuffer> | ||
27 | #include <KDbRecordData> | ||||
27 | 28 | | |||
28 | namespace Scripting | 29 | namespace Scripting | ||
29 | { | 30 | { | ||
30 | 31 | | |||
31 | // Forward declaration. | 32 | // Forward declaration. | ||
32 | class KexiDBConnection; | 33 | class KexiDBConnection; | ||
33 | 34 | | |||
34 | /** | 35 | /** | ||
▲ Show 20 Lines • Show All 94 Lines • ▼ Show 20 Line(s) | |||||
129 | private: | 130 | private: | ||
130 | class Record | 131 | class Record | ||
131 | { | 132 | { | ||
132 | public: | 133 | public: | ||
133 | KDbRecordData rowdata; | 134 | KDbRecordData rowdata; | ||
134 | KDbRecordEditBuffer* buffer; | 135 | KDbRecordEditBuffer* buffer; | ||
135 | Record(KDbCursor* cursor) | 136 | Record(KDbCursor* cursor) | ||
136 | : buffer(new KDbRecordEditBuffer(true)) { | 137 | : buffer(new KDbRecordEditBuffer(true)) { | ||
137 | cursor->storeCurrentRow(rowdata); | 138 | cursor->storeCurrentRecord(&rowdata); | ||
138 | } | 139 | } | ||
139 | ~Record() { | 140 | ~Record() { | ||
140 | delete buffer; | 141 | delete buffer; | ||
141 | } | 142 | } | ||
142 | }; | 143 | }; | ||
143 | QMap<qint64, Record*> m_modifiedrecords; | 144 | QMap<qint64, Record*> m_modifiedrecords; | ||
144 | void clearBuffers(); | 145 | void clearBuffers(); | ||
145 | 146 | | |||
146 | KDbCursor* m_cursor; | 147 | KDbCursor* m_cursor; | ||
147 | bool m_owner; | 148 | bool m_owner; | ||
148 | }; | 149 | }; | ||
149 | 150 | | |||
150 | } | 151 | } | ||
151 | 152 | | |||
152 | #endif | 153 | #endif |