| Summary: | kontact crashes pressing backspace on new mail with multiple recipients | ||
|---|---|---|---|
| Product: | [Applications] kontact | Reporter: | Stefano Rosanelli <s.rosanelli> |
| Component: | contacts | Assignee: | kdepim bugs <pim-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | schumacher |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Stefano Rosanelli
2005-04-07 17:50:25 UTC
it seems you can trick the widget into deleting two widget before the timer is fired, which will then try to call activate() on a 0 widget. (recpientseditor.cpp, around line 482). I have a hard time to reproduce it though. Cornelius, any idea for a sane workaround? SVN commit 449530 by tokoe:
Prevent crashes when the lineedit is deleted before the slot is called.
BUG:103439
M +3 -0 recipientseditor.cpp
M +2 -1 recipientseditor.h
--- branches/KDE/3.5/kdepim/kmail/recipientseditor.cpp #449529:449530
@@ -477,6 +477,9 @@
void RecipientsView::slotDeleteLine()
{
+ if ( !mCurDelLine )
+ return;
+
RecipientLine *line = mCurDelLine;
int pos = mLines.find( line );
--- branches/KDE/3.5/kdepim/kmail/recipientseditor.h #449529:449530
@@ -26,6 +26,7 @@
#include <qwidget.h>
#include <qscrollview.h>
+#include <qguardedptr.h>
#include <qlineedit.h>
#include <qtooltip.h>
@@ -232,7 +233,7 @@
private:
QPtrList<RecipientLine> mLines;
- RecipientLine* mCurDelLine;
+ QGuardedPtr<RecipientLine> mCurDelLine;
int mLineHeight;
int mFirstColumnWidth;
bool mModified;
|