Salome HOME
Moved some functionality to VTKViewer_Utilities.h
[modules/kernel.git] / src / PatchQt / BUGS_DESCRIPTION
1 *********************************************************************
2 * File    : BUGS_DESCRIPTION
3 * Project : PAL/SALOME
4 * Module  : PatchQt
5 * Author  : Vadim SANDLER
6 * Created : 03/11/2004
7 *********************************************************************
8
9 This file contains description of bugs found in Qt 3.0.5 classes and patches with bug-fixes and improvements done for Qt classes
10 in frames of PAL/SALOME project.
11
12 Main principles of the patches creation:
13 * the original classes are renamed by adding "P" suffix to the class name;
14 * private Qt classes are copied to patched files in order to avoid compilation/linking problems;
15 * classes definitions are moved from *.cpp implementation to *.h header in order to avoid additional moc preprocessing for *.cpp files.
16
17 *********************************************************************
18
19 Bug: keyboard accelerators for actions (menu, toolbar, etc) are not disabled when action itself is disabled (grayed).
20
21 Gravity: medium
22
23 Patched file(s): 
24 * qactionP.cxx:
25 1) void QActionPrivate::update()
26 - enable/disable key accelerator according to the action state
27
28 *********************************************************************
29
30 Bug: Wrong MDI behaviour
31 To reproduce in SALOME:
32 1. Create new study
33 - Window Study1#1 appears and becomes active
34 2. Create one more study
35 - Window Study2#1 appears and becomes active (Study1#1 becames inactive)
36 3. Minimize Study2#1 window
37 - Window Study2#1 is minimized, Study1#1 becames active
38 4. Minimize Study1#1 window
39 - Window Study1#1 is minimized but stays still active (highlighted title)
40 5. Menu command "File/Close"
41 - Study2 document is closed, but should Study1 !!!
42
43 Gravity: high
44
45 Bug: Crash on close study window
46 To reproduce in SALOME:
47 1. Launch application.
48 2. Create new study with any Viewer.
49 3. Create second new study.
50 4. Close second study.
51 -> crash
52
53 Gravity: high
54
55 Bug: crash when leaving a study
56 To reproduce in SALOME:
57 1. Create new study
58 2. Load VISU component
59 3. Menu Window / New Window / Plot2d Viewer
60 4. Miximize Study 1#2 window (with Plot2d viewer)
61 5. Menu File / Close
62 6. Press "Close w/o saving" button in "Close Active Study" dialog box.
63 -> crash
64
65 Gravity: high
66
67 Patched files(s): 
68 * qworkspaceP.h:
69 - methods
70 void QWorkspace::activateNextWindow()
71 void QWorkspace::activatePreviousWindow()
72 void QWorkspace::activateWindow( QWidget* w, bool change_focus = TRUE ) 
73 are made public
74
75 * qworkspaceP.cxx:
76 - methods
77 void QWorkspace::childEvent( QChildEvent * e)
78 void QWorkspace::activateWindow( QWidget* w, bool change_focus )
79 void QWorkspace::minimizeWindow( QWidget* w)
80 bool QWorkspace::eventFilter( QObject *o, QEvent * e)
81 void QWorkspace::activatePreviousWindow()
82 are modified to activate correct child window on maximizing/minimizing/closing etc operations and to avoid crashes.
83
84 *********************************************************************
85
86 Improvement: Add controls to allow collapse/expand parts of view frame.
87 The patch adds buttons with small arrows for splitter which allow to collapse/restore splitter in both (left/right or top/botton) directions.
88
89 Gravity: medium
90
91 Bug: Splitter is not shown in python console
92 To reproduce in SALOME:
93 1. Create new study
94 2. Open new window (VTK or OCC) -> python console and message console is hidden
95 3. Restore normal size of low frames (python and message consoles) by clicking corresponding splitter button.
96 -> horizontal scrolbars for this windows are not shown, i.e. python and message frames are clipped.
97
98 Gravity: medium
99
100 Bug: Splitter does not restore its original position after collapsing/expanding operations.
101 To reproduce try to collapse/expand repeatedly any splitter (e.g. that one between Python and Message consoles).
102
103 Gravity: medium
104
105 Improvement: Implement a functionality (for VISU module) to control the Viewers behavior from python console - concerning QSplitter it means a possibility
106 to show/hide different parts of view frame (Object Browser, Python Console, 3d/2d viewer, Python console, Message window).
107
108 Gravity: high
109
110 Patched file(s): 
111 * qsplitterP.h
112 1) to process correctly resizing events:
113 - methods
114 QSizePolicy QSplitter::sizePolicy() const
115 QSizePolicy QSplitterHandle::sizePolicy() const;
116 are added 
117
118 2) to allow collapse/expand functionality:
119 - methods
120 bool QSplitter::isCompressEnabled() const;
121 void QSplitter::setCompressEnabled(bool on);
122 void QSplitter::compress(QWidget*);
123 void QSplitter::unCompress(QWidget*);
124 QSplitterHandle* QSplitter::getHandleAfter(QWidget* w);
125 QSplitterHandle* QSplitter::getHandleBefore(QWidget* w);
126 bool QSplitter::isCompressed( const QWidget* ) const;
127 QWidget* QSplitter::widgetBefore( int id ) const;
128 QWidget* QSplitter::widgetAfter( int id ) const;
129 QSize QSplitter::minSize( const QWidget *w ) const;
130 QSize QSplitter::maxSize( const QWidget *w ) const;
131 int QSplitter::hit( QPoint p );
132 void QSplitter::updateSplitterHandles() const;
133 and
134 void QSplitterHandle::updateButtonState();
135 void QSplitterHandle::compressAfter();
136 void QSplitterHandle::unCompressAfter();
137 void QSplitterHandle::compressBefore();
138 void QSplitterHandle::unCompressBefore();
139 void QSplitterHandle::onBeforeCompress();
140 void QSplitterHandle::onAfterCompress();
141 void QSplitterHandle::onBeforeUnCompress();
142 void QSplitterHandle::onAfterUnCompress();
143 are added
144
145 - fields:
146 QWidgetList QSplitter::compressed_widgets;
147 bool QSplitter::compress_flag;
148 and
149 int QSplitterHandle::oldpos;
150 QPushButton* QSplitterHandle::left;
151 QPushButton* QSplitterHandle::right;
152 QPushButton* QSplitterHandle::unleft;
153 QPushButton* QSplitterHandle::unright;
154 are added
155
156 - method
157 void QSplitter::setG( QWidget *w, int p, int s );
158 is modified 
159
160 * qsplitterP.cxx:
161 1) to draw button arrows: 
162 static const char* splitter_left_xpm[];
163 static const char* splitter_right_xpm[];
164 static const char* splitter_up_xpm[];
165 static const char* splitter_down_xpm[];
166 are added
167
168 2) to process correctly resizing events:
169 - methods
170 QSizePolicy QSplitter::sizePolicy() const
171 QSizePolicy QSplitterHandle::sizePolicy() const;
172 are added 
173
174 3) to allow collapse/expand functionality:
175 - methods
176 bool QSplitter::isCompressEnabled() const;
177 void QSplitter::setCompressEnabled(bool on);
178 void QSplitter::compress(QWidget*);
179 void QSplitter::unCompress(QWidget*);
180 QSplitterHandle* QSplitter::getHandleAfter(QWidget* w);
181 QSplitterHandle* QSplitter::getHandleBefore(QWidget* w);
182 bool QSplitter::isCompressed( const QWidget* ) const;
183 QWidget* QSplitter::widgetBefore( int id ) const;
184 QWidget* QSplitter::widgetAfter( int id ) const;
185 QSize QSplitter::minSize( const QWidget *w ) const;
186 QSize QSplitter::maxSize( const QWidget *w ) const;
187 int QSplitter::hit( QPoint p );
188 void QSplitter::updateSplitterHandles() const;
189 and
190 void QSplitterHandle::updateButtonState();
191 void QSplitterHandle::compressAfter();
192 void QSplitterHandle::unCompressAfter();
193 void QSplitterHandle::compressBefore();
194 void QSplitterHandle::unCompressBefore();
195 void QSplitterHandle::onBeforeCompress();
196 void QSplitterHandle::onAfterCompress();
197 void QSplitterHandle::onBeforeUnCompress();
198 void QSplitterHandle::onAfterUnCompress();
199 are added
200
201 - methods
202 QSplitterHandle::QSplitterHandle()
203 void QSplitter::setG( QWidget *w, int p, int s );
204 QSize QSplitterHandle::sizeHint() const
205 void QSplitterHandle::setOrientation( Qt::Orientation o )
206 void QSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
207 void QSplitterHandle::paintEvent( QPaintEvent * )
208 void QSplitter::init()
209 void QSplitter::setOrientation( Orientation o )
210 QSplitterLayoutStruct *QSplitter::addWidget( QWidget *w, bool first )
211 void QSplitter::setRubberband( int p )
212 void QSplitter::drawSplitter( QPainter *p, QCOORD x, QCOORD y, QCOORD w, QCOORD h )
213 void QSplitter::moveSplitter( QCOORD p, int id )
214 void QSplitter::moveBefore( int pos, int id, bool upLeft )
215 void QSplitter::moveAfter( int pos, int id, bool upLeft )
216 void QSplitter::getRange( int id, int *min, int *max )
217 void QSplitter::doResize()
218 void QSplitter::recalc( bool update )
219 void QSplitter::styleChange( QStyle& old )
220 are modified:
221
222 *********************************************************************
223
224 Bug: File names filter of the "Open" and "Save" dialog boxes is broken
225 To reproduce in SALOME:
226 1) start PAL/SALOME
227 2) open new study with the help of OCC Viewer and load Geometry module
228 3) Menu File / Import / BRep
229 4) Browse to any directory may be changed by yourself
230 5) Press "Create New Folder" button of the "Import" dialog box
231 6) Browse to created directory "New Folder 1"
232 7) Press "Create New Folder" button of the "Import" dialog box
233 8) Browse to created directory "New Folder 1"
234 9) Delete first created "New Folder 1" directory externally (e.g. from any terminal window)
235 10) Press "One directory up" button of the "Import" dialog box
236 11) Error message box appears: "Could not read directory .../New Folder 1/New Folder 1" - press OK button to close message box.
237 -> Result: "BREP Files (*.brep)" filter is set as "File type" in the "Import" dialog box, but non-BREP files are also visible and available for the selection
238 in the browser window of the "Import" dialog box
239 -> The same situation takes place for the "Export" dialog box.
240
241 Gravity: low
242
243 Patch: 
244 * qfiledialogP.cxx:
245 1) methods 
246 void QFileDialogP::urlFinished( QNetworkOperation *op )
247 is modified to fix bug
248
249 *********************************************************************
250