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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
|
Index: kexi/plugins/forms/kexidataprovider.cpp
===================================================================
--- kexi/plugins/forms/kexidataprovider.cpp (revision 688747)
+++ kexi/plugins/forms/kexidataprovider.cpp (revision 688748)
@@ -153,7 +153,7 @@
count = it_dup.data();
tmpDuplicatedItems.insert( it.current()->columnInfo()->field, ++count );
}
- m_duplicatedItems = new TQPtrDict<char>(101);
+ m_duplicatedItems = new TQPtrDict<char>(1009);
for (it_dup = tmpDuplicatedItems.begin(); it_dup!=tmpDuplicatedItems.end(); ++it_dup) {
if (it_dup.data() > 1) {
m_duplicatedItems->insert( it_dup.key(), (char*)1 );
@@ -260,7 +260,7 @@
// m_fieldNumbersForDataItems = newFieldNumbersForDataItems;
//update data sources set (some of them may be removed)
- TQDict<char> tmpUsedDataSources(1013);
+ TQDict<char> tmpUsedDataSources(1009);
if (query)
query->debug();
Index: kexi/plugins/tables/kexitabledesignerview.cpp
===================================================================
--- kexi/plugins/tables/kexitabledesignerview.cpp (revision 688747)
+++ kexi/plugins/tables/kexitabledesignerview.cpp (revision 688748)
@@ -1262,7 +1262,7 @@
KoProperty::Set *b = 0;
bool no_fields = true;
int i;
- TQDict<char> names(101, false);
+ TQDict<char> names(1009, false);
char dummy;
for (i=0;i<(int)d->sets->size();i++) {
b = d->sets->at(i);
Index: kexi/plugins/queries/kexiquerydesignerguieditor.cpp
===================================================================
--- kexi/plugins/queries/kexiquerydesignerguieditor.cpp (revision 688747)
+++ kexi/plugins/queries/kexiquerydesignerguieditor.cpp (revision 688748)
@@ -77,7 +77,7 @@
{
public:
Private()
- : fieldColumnIdentifiers(101, false/*case insens.*/)
+ : fieldColumnIdentifiers(1009, false/*case insens.*/)
{
droppedNewItem = 0;
slotTableAdded_enabled = true;
@@ -809,7 +809,7 @@
//2. Collect information about criterias
// --this must be top level chain of AND's
// --this will also show joins as: [table1.]field1 = [table2.]field2
- TQDict<KexiDB::BaseExpr> criterias(101, false);
+ TQDict<KexiDB::BaseExpr> criterias(1009, false);
KexiDB::BaseExpr* e = query->whereExpression();
KexiDB::BaseExpr* eItem = 0;
while (e) {
@@ -877,7 +877,7 @@
//3. show fields (including * and table.*)
uint row_num = 0;
KexiDB::Field *field;
- TQPtrDict<char> usedCriterias(101); // <-- used criterias will be saved here
+ TQPtrDict<char> usedCriterias(1009); // <-- used criterias will be saved here
// so in step 4. we will be able to add
// remaining invisible columns with criterias
for (KexiDB::Field::ListIterator it(*query->fields());
@@ -1270,7 +1270,7 @@
const TQCString expStr
= i18n("short for 'expression' word (only latin letters, please)", "expr").latin1();
//TODO: optimization: cache it?
- TQAsciiDict<char> aliases(101);
+ TQAsciiDict<char> aliases(1009);
for (int r = 0; r<(int)d->sets->size(); r++) {
KoProperty::Set *set = d->sets->at(r);
if (set) {
Index: kexi/widget/tableview/kexidataawarepropertyset.cpp
===================================================================
--- kexi/widget/tableview/kexidataawarepropertyset.cpp (revision 688747)
+++ kexi/widget/tableview/kexidataawarepropertyset.cpp (revision 688748)
@@ -24,7 +24,7 @@
#include <koproperty/property.h>
#include <kexiviewbase.h>
-#define MAX_FIELDS 101 //nice prime number (default prop. set vector size)
+#define MAX_FIELDS 1009 //nice prime number (default prop. set vector size)
KexiDataAwarePropertySet::KexiDataAwarePropertySet(KexiViewBase *view,
KexiDataAwareObjectInterface* dataObject)
Index: kexi/widget/utils/kexisharedactionclient.cpp
===================================================================
--- kexi/widget/utils/kexisharedactionclient.cpp (revision 688747)
+++ kexi/widget/utils/kexisharedactionclient.cpp (revision 688748)
@@ -22,7 +22,7 @@
#include <kaction.h>
KexiSharedActionClient::KexiSharedActionClient()
- : m_sharedActions(101, false)
+ : m_sharedActions(1009, false)
{
}
Index: kexi/main/keximainwindowimpl.cpp
===================================================================
--- kexi/main/keximainwindowimpl.cpp (revision 688747)
+++ kexi/main/keximainwindowimpl.cpp (revision 688748)
@@ -4203,8 +4203,10 @@
data = new KexiProjectData(*d->prj->data()); // a copy
drv = d->prj->dbConnection()->driver();
const tristate res = closeProject();
- if (~res || !res)
+ if (~res || !res) {
+ delete data;
return;
+ }
}
if (!drv->adminTools().vacuum(*data->connectionData(), data->databaseName())) {
@@ -4212,10 +4214,9 @@
showErrorMessage( &drv->adminTools() );
}
- if (data && projectWasOpened) {
+ if (projectWasOpened)
openProject(*data);
- delete data;
- }
+ delete data;
}
tristate KexiMainWindowImpl::showProjectMigrationWizard(
Index: kexi/core/kexidbconnectionset.cpp
===================================================================
--- kexi/core/kexidbconnectionset.cpp (revision 688747)
+++ kexi/core/kexidbconnectionset.cpp (revision 688748)
@@ -30,7 +30,7 @@
{
public:
KexiDBConnectionSetPrivate()
- : dataForFilenames(101)
+ : dataForFilenames(1009)
{
list.setAutoDelete(true);
maxid=-1;
Index: kexi/migration/keximigrate.cpp
===================================================================
--- kexi/migration/keximigrate.cpp (revision 688747)
+++ kexi/migration/keximigrate.cpp (revision 688748)
@@ -491,7 +491,6 @@
// Prompt the user to choose a field type
KexiDB::Field::Type KexiMigrate::userType(const TQString& fname)
{
- KInputDialog *dlg;
TQStringList types;
TQString res;
@@ -509,7 +508,7 @@
types << "Long Text";
types << "Binary Large Object";
- res = dlg->getItem( i18n("Field Type"),
+ res = KInputDialog::getItem( i18n("Field Type"),
i18n("The data type for %1 could not be determined. "
"Please select one of the following data "
"types").tqarg(fname),
Index: kexi/kexidb/connection.cpp
===================================================================
--- kexi/kexidb/connection.cpp (revision 688747)
+++ kexi/kexidb/connection.cpp (revision 688748)
@@ -83,10 +83,10 @@
ConnectionPrivate(Connection* const conn, ConnectionData &conn_data)
: conn(conn)
, conn_data(&conn_data)
- , tableSchemaChangeListeners(101)
+ , tableSchemaChangeListeners(1009)
, m_parser(0)
- , tables_byname(101, false)
- , queries_byname(101, false)
+ , tables_byname(1009, false)
+ , queries_byname(1009, false)
, kexiDBSystemTables(101)
, dont_remove_transactions(false)
, skip_databaseExists_check_in_useDatabase(false)
@@ -104,8 +104,8 @@
queries_byname.setAutoDelete(false);//queries is owner, not me
//reasonable sizes: TODO
- tables.resize(101);
- queries.resize(101);
+ tables.resize(1009);
+ queries.resize(1009);
}
~ConnectionPrivate()
{
Index: kexi/kexidb/fieldvalidator.cpp
===================================================================
--- kexi/kexidb/fieldvalidator.cpp (revision 688747)
+++ kexi/kexidb/fieldvalidator.cpp (revision 688748)
@@ -36,7 +36,7 @@
if (field.isIntegerType()) {
TQValidator *validator = 0;
const bool u = field.isUnsigned();
- int bottom, top;
+ int bottom = 0, top = 0;
if (t==Field::Byte) {
bottom = u ? 0 : -0x80;
top = u ? 0xff : 0x7f;
Index: kexi/kexidb/alter.cpp
===================================================================
--- kexi/kexidb/alter.cpp (revision 688747)
+++ kexi/kexidb/alter.cpp (revision 688748)
@@ -223,7 +223,7 @@
static AlterTableHandler::ActionDict* createActionDict(
AlterTableHandler::ActionDictDict &fieldActions, int forFieldUID )
{
- AlterTableHandler::ActionDict* dict = new AlterTableHandler::ActionDict(101, false);
+ AlterTableHandler::ActionDict* dict = new AlterTableHandler::ActionDict(1009, false);
dict->setAutoDelete(true);
fieldActions.insert( forFieldUID, dict );
return dict;
Index: kexi/kexidb/queryschema.cpp
===================================================================
--- kexi/kexidb/queryschema.cpp (revision 688747)
+++ kexi/kexidb/queryschema.cpp (revision 688748)
@@ -1439,7 +1439,7 @@
}
//remove duplicates for lookup fields
- TQDict<uint> lookup_dict(101); //used to fight duplicates and to update QueryColumnInfo::indexForVisibleLookupValue()
+ TQDict<uint> lookup_dict(1009); //used to fight duplicates and to update QueryColumnInfo::indexForVisibleLookupValue()
// (a mapping from table.name string to uint* lookupFieldIndex
lookup_dict.setAutoDelete(true);
i=0;
Index: kexi/kexidb/fieldlist.cpp
===================================================================
--- kexi/kexidb/fieldlist.cpp (revision 688747)
+++ kexi/kexidb/fieldlist.cpp (revision 688748)
@@ -28,7 +28,7 @@
FieldList::FieldList(bool owner)
//reasonable sizes: TODO
- : m_fields_by_name(101, false)
+ : m_fields_by_name(1009, false)
{
m_fields.setAutoDelete( owner );
m_fields_by_name.setAutoDelete( false );
Index: kexi/formeditor/widgetlibrary.cpp
===================================================================
--- kexi/formeditor/widgetlibrary.cpp (revision 688747)
+++ kexi/formeditor/widgetlibrary.cpp (revision 688748)
@@ -55,7 +55,7 @@
{
public:
WidgetLibraryPrivate()
- : widgets(101)
+ : widgets(1009)
// , alternateWidgets(101)
, services(101, false)
, supportedFactoryGroups(17, false)
|