https://bugzilla.novell.com/show_bug.cgi?id=382202
User sh@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=382202#c11
Stefan Hundhammer changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dmueller@novell.com, coolo@novell.com
--- Comment #11 from Stefan Hundhammer 2008-04-25 07:38:31 MST ---
I made a debugging version of this that shows the same effect.
406 bool YQPackageSelectorBase::eventFilter( QObject * obj, QEvent * event )
407 {
408 if ( event->type() == QEvent::Close )
409 {
410 // Handle WM_CLOSE like "Cancel"
411 reject();
412
413 return true; // Stop processing this event
414 }
415
416 return false; // Don't stop processing this event
417 }
198 YQPackageSelectorBase::reject()
199 {
200 bool changes =
201 zyppPool().diffState() ||
202 zyppPool().diffState() ||
203 zyppPool().diffState();
204
205 if ( changes )
206 {
207 if ( zyppPool().diffStatezypp::Package() )
208 yuiMilestone() << "diffState() reports changed packages" <<
endl;
209
210 if ( zyppPool().diffStatezypp::Pattern() )
211 yuiMilestone() << "diffState() reports changed patterns" <<
endl;
212
213 if ( zyppPool().diffStatezypp::Patch() )
214 yuiMilestone() << "diffState() reports changed patches" <<
endl;
215 }
216
217 #warning DEBUG - remove this before check-in!
218 changes = true;
219
220 bool doCancel = true;
221
222 if ( changes )
223 {
224 yuiMilestone() << "Packages changed - asking for confirmation" <<
endl;
225
226 int button = QMessageBox::warning( this, "",
227 _( "Abandon all changes?" ),
228 _( "&Abandon" ), _( "&Cancel" ),
"",
229 1, // defaultButtonNumber
(from 0)
230 1 ); // escapeButtonNumber
231
232 yuiMilestone() << "\"Abandon all changes\" dialog closed with " <<
button << endl;
233 doCancel = ( button == 0 ); // OK
234 }
235 else
236 {
237 yuiMilestone() << "No changes" << endl;
238 }
239
240 if ( doCancel )
241 {
242 zyppPool().restoreState();
243 zyppPool().restoreState();
244 zyppPool().restoreState();
245
246 yuiMilestone() << "Closing PackageSelector with \"Cancel\"" <<
endl;
247 YQUI::ui()->sendEvent( new YCancelEvent() );
248 }
249 else
250 {
251 yuiMilestone() << "NOT closing PackageSelector" << endl;
252 }
253 }
y2log from the sample GDB session that will follow:
2008-04-25 15:26:38 <1> snell(7945) [qt-pkg]
YQPackageSelector.cc(YQPackageSelector):193 PackageSelector init done
2008-04-25 15:26:38 <1> snell(7945) [ui] YCP_UI.cc(RunPkgSelection):1386
Running package selection...
2008-04-25 15:26:49 <1> snell(7945) [qt-pkg]
YQPackageSelectorBase.cc(reject):224 Packages changed - asking for confirmation
2008-04-25 15:26:58 <1> snell(7945) [qt-pkg]
YQPackageSelectorBase.cc(reject):232 "Abandon all changes" dialog closed with 1
2008-04-25 15:27:03 <1> snell(7945) [qt-pkg]
YQPackageSelectorBase.cc(reject):251 NOT closing PackageSelector
GDB session:
[sh @ snell] ...trunk/ycp-ui-bindings/examples 3 % gdb =y2base
GNU gdb 6.5
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i586-suse-linux"...Using host libthread_db library
"/lib/libthread_db.so.1".
(gdb) break YQPackageSelectorBase::251
Can't find member of namespace, class, struct, or union named
"YQPackageSelectorBase::251"
Hint: try 'YQPackageSelectorBase::251<TAB> or
'YQPackageSelectorBase::251
(Note leading single quote.)
(gdb) break YQPackageSelectorBase.cc:251
No source file named YQPackageSelectorBase.cc.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (YQPackageSelectorBase.cc:251) pending.
(gdb) run ./PackageSelector-empty.ycp qt
Starting program: /suse/sh/util/y2base ./PackageSelector-empty.ycp qt
Failed to read a valid object file image from memory.
[Thread debugging using libthread_db enabled]
[New Thread -1214175536 (LWP 7945)]
[New Thread -1231852656 (LWP 7951)]
Breakpoint 2 at 0xb5f6371c: file
/local_home/sh/yast2/trunk/qt-pkg/src/YQPackageSelectorBase.cc, line 251.
Pending breakpoint "YQPackageSelectorBase.cc:251" resolved
[Switching to Thread -1231852656 (LWP 7951)]
Breakpoint 2, YQPackageSelectorBase::reject (this=0x807dd38)
at /local_home/sh/yast2/trunk/qt-pkg/src/YQPackageSelectorBase.cc:251
251 yuiMilestone() << "NOT closing PackageSelector" << endl;
Current language: auto; currently c++
(gdb) n
253 }
(gdb) s
YQPackageSelectorBase::eventFilter (this=0x807dd38, obj=0x80ae608,
event=0xb6935724)
at /local_home/sh/yast2/trunk/qt-pkg/src/YQPackageSelectorBase.cc:413
413 return true; // Stop processing this event
(gdb) s
417 }
(gdb) s
0xb6ce0341 in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
(gdb) s
Single stepping until exit from function
_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent,
which has no line number information.
0xb6ce653e in QApplication::notify () from /usr/lib/libQtGui.so.4
(gdb) s
Single stepping until exit from function
_ZN12QApplication6notifyEP7QObjectP6QEvent,
which has no line number information.
0xb7338c8b in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
The main window (!) closes here. IMHO this is a bug in Qt.
Coolo? Dirk? Any hint?
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.