Skip to content

Commit 9e682a1

Browse files
committed
fix: keep Lazarus forms designer-compatible
Keep TLazVirtualStringTree in .lfm resources so forms open in the Lazarus IDE without a design-time package. On Linux Qt, map the streamed class to THeidiVirtualStringTree at runtime to preserve the Qt-specific rendering and hint fixes.
1 parent dca7a9a commit 9e682a1

12 files changed

Lines changed: 30 additions & 26 deletions

source/connections.lfm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,7 @@ object connform: Tconnform
11481148
Constraints.MinWidth = 100
11491149
ParentBackground = False
11501150
TabOrder = 2
1151-
object ListSessions: THeidiVirtualStringTree
1151+
object ListSessions: TLazVirtualStringTree
11521152
Left = 0
11531153
Height = 427
11541154
Top = 28

source/copytable.lfm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ object CopyTableForm: TCopyTableForm
113113
TabOrder = 4
114114
OnClick = btnOKClick
115115
end
116-
object TreeElements: THeidiVirtualStringTree
116+
object TreeElements: TLazVirtualStringTree
117117
AnchorSideLeft.Control = comboDatabase
118118
AnchorSideTop.Control = lblItems
119119
AnchorSideTop.Side = asrBottom

source/insertfiles.lfm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ object frmInsertFiles: TfrmInsertFiles
121121
TabOrder = 1
122122
OnChange = comboTablesChange
123123
end
124-
object ListColumns: THeidiVirtualStringTree
124+
object ListColumns: TLazVirtualStringTree
125125
AnchorSideLeft.Control = grpSelectObject
126126
AnchorSideTop.Control = lblFilecontents
127127
AnchorSideTop.Side = asrBottom
@@ -221,7 +221,7 @@ object frmInsertFiles: TfrmInsertFiles
221221
BorderSpacing.Around = 5
222222
Caption = '0 files'
223223
end
224-
object ListFiles: THeidiVirtualStringTree
224+
object ListFiles: TLazVirtualStringTree
225225
AnchorSideLeft.Control = GroupBox2
226226
AnchorSideTop.Control = ToolBar1
227227
AnchorSideTop.Side = asrBottom

source/lazaruscompat.pas

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,11 @@ function TStringsHelper.IsEmpty: Boolean;
569569
end;
570570

571571
initialization
572+
{$IFDEF HEIDI_LINUX_QT}
572573
RegisterClass(THeidiVirtualStringTree);
574+
UnRegisterClass(TLazVirtualStringTree);
575+
RegisterClassAlias(THeidiVirtualStringTree, 'TLazVirtualStringTree');
576+
{$ENDIF}
573577

574578
end.
575579

source/main.lfm

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ object MainForm: TMainForm
940940
OnKeyPress = editDatabaseTableFilterKeyPress
941941
end
942942
end
943-
object DBtree: THeidiVirtualStringTree
943+
object DBtree: TLazVirtualStringTree
944944
AnchorSideTop.Side = asrBottom
945945
AnchorSideRight.Side = asrBottom
946946
Left = 0
@@ -1127,7 +1127,7 @@ object MainForm: TMainForm
11271127
ClientHeight = 176
11281128
ClientWidth = 607
11291129
ImageIndex = 5
1130-
object ListDatabases: THeidiVirtualStringTree
1130+
object ListDatabases: TLazVirtualStringTree
11311131
Left = 0
11321132
Height = 176
11331133
Top = 0
@@ -1211,7 +1211,7 @@ object MainForm: TMainForm
12111211
ClientHeight = 176
12121212
ClientWidth = 607
12131213
ImageIndex = 137
1214-
object ListVariables: THeidiVirtualStringTree
1214+
object ListVariables: TLazVirtualStringTree
12151215
Left = 0
12161216
Height = 176
12171217
Top = 0
@@ -1268,7 +1268,7 @@ object MainForm: TMainForm
12681268
ClientHeight = 176
12691269
ClientWidth = 607
12701270
ImageIndex = 13
1271-
object ListStatus: THeidiVirtualStringTree
1271+
object ListStatus: TLazVirtualStringTree
12721272
Left = 0
12731273
Height = 176
12741274
Top = 0
@@ -1843,7 +1843,7 @@ object MainForm: TMainForm
18431843
Align = alBottom
18441844
ResizeAnchor = akBottom
18451845
end
1846-
object ListProcesses: THeidiVirtualStringTree
1846+
object ListProcesses: TLazVirtualStringTree
18471847
Left = 0
18481848
Height = 116
18491849
Top = 0
@@ -1925,7 +1925,7 @@ object MainForm: TMainForm
19251925
ClientHeight = 176
19261926
ClientWidth = 607
19271927
ImageIndex = 145
1928-
object ListCommandStats: THeidiVirtualStringTree
1928+
object ListCommandStats: TLazVirtualStringTree
19291929
Left = 0
19301930
Height = 176
19311931
Top = 0
@@ -1996,7 +1996,7 @@ object MainForm: TMainForm
19961996
ClientHeight = 204
19971997
ClientWidth = 615
19981998
ImageIndex = 5
1999-
object ListTables: THeidiVirtualStringTree
1999+
object ListTables: TLazVirtualStringTree
20002000
Left = 0
20012001
Height = 204
20022002
Top = 0
@@ -2844,7 +2844,7 @@ object MainForm: TMainForm
28442844
end
28452845
end
28462846
end
2847-
object DataGrid: THeidiVirtualStringTree
2847+
object DataGrid: TLazVirtualStringTree
28482848
Left = 2
28492849
Height = 95
28502850
Top = 107
@@ -2938,7 +2938,7 @@ object MainForm: TMainForm
29382938
OnButtonClick = buttonedEditClear
29392939
OnChange = filterQueryHelpersChange
29402940
end
2941-
object treeQueryHelpers: THeidiVirtualStringTree
2941+
object treeQueryHelpers: TLazVirtualStringTree
29422942
AnchorSideTop.Side = asrBottom
29432943
Left = 0
29442944
Height = 81
@@ -3508,7 +3508,7 @@ object MainForm: TMainForm
35083508
ShowHint = True
35093509
TabOrder = 2
35103510
end
3511-
object QueryGrid: THeidiVirtualStringTree
3511+
object QueryGrid: TLazVirtualStringTree
35123512
Left = 0
35133513
Height = 69
35143514
Top = 135

source/preferences.lfm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1667,7 +1667,7 @@ object frmPreferences: TfrmPreferences
16671667
BorderSpacing.Around = 5
16681668
Caption = 'Secondary shortcut:'
16691669
end
1670-
object TreeShortcutItems: THeidiVirtualStringTree
1670+
object TreeShortcutItems: TLazVirtualStringTree
16711671
AnchorSideLeft.Control = tabShortcuts
16721672
AnchorSideTop.Control = editShortcutsFilter
16731673
AnchorSideTop.Side = asrBottom

source/routine_editor.lfm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ object frmRoutineEditor: TfrmRoutineEditor
411411
ClientHeight = 142
412412
ClientWidth = 682
413413
ImageIndex = 122
414-
object listParameters: THeidiVirtualStringTree
414+
object listParameters: TLazVirtualStringTree
415415
Left = 83
416416
Height = 142
417417
Top = 0

source/selectdbobject.lfm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ object frmSelectDBObject: TfrmSelectDBObject
3232
BorderSpacing.Around = 5
3333
Caption = '... or wildcard database (% and _ allowed):'
3434
end
35-
object TreeDBO: THeidiVirtualStringTree
35+
object TreeDBO: TLazVirtualStringTree
3636
AnchorSideTop.Control = lblSelect
3737
AnchorSideTop.Side = asrBottom
3838
Left = 8

source/sqlhelp.lfm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ object frmSQLhelp: TfrmSQLhelp
7373
OnButtonClick = editFilterRightButtonClick
7474
OnChange = editFilterChange
7575
end
76-
object treeTopics: THeidiVirtualStringTree
76+
object treeTopics: TLazVirtualStringTree
7777
AnchorSideLeft.Control = pnlLeft
7878
AnchorSideTop.Control = editFilter
7979
AnchorSideRight.Control = pnlLeft

source/table_editor.lfm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ object frmTableEditor: TfrmTableEditor
344344
ClientHeight = 142
345345
ClientWidth = 692
346346
ImageIndex = 13
347-
object treeIndexes: THeidiVirtualStringTree
347+
object treeIndexes: TLazVirtualStringTree
348348
Left = 67
349349
Height = 142
350350
Top = 0
@@ -536,7 +536,7 @@ object frmTableEditor: TfrmTableEditor
536536
OnClick = btnShowReverseForeignKeysClick
537537
end
538538
end
539-
object listForeignKeys: THeidiVirtualStringTree
539+
object listForeignKeys: TLazVirtualStringTree
540540
AnchorSideLeft.Control = tlbForeignKeys
541541
AnchorSideLeft.Side = asrBottom
542542
AnchorSideTop.Control = tabForeignKeys
@@ -699,7 +699,7 @@ object frmTableEditor: TfrmTableEditor
699699
OnClick = btnClearCheckConstraintsClick
700700
end
701701
end
702-
object listCheckConstraints: THeidiVirtualStringTree
702+
object listCheckConstraints: TLazVirtualStringTree
703703
Left = 67
704704
Height = 142
705705
Top = 0
@@ -1097,7 +1097,7 @@ object frmTableEditor: TfrmTableEditor
10971097
end
10981098
end
10991099
end
1100-
object listColumns: THeidiVirtualStringTree
1100+
object listColumns: TLazVirtualStringTree
11011101
AnchorSideBottom.Control = btnSave
11021102
Left = 0
11031103
Height = 260

0 commit comments

Comments
 (0)