[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Re: KIO/KHTML Error Handling Update
From: Hamish Rodda <meddie () yoyo ! cc ! monash ! edu ! au>
Date: 2002-01-27 13:21:14
[Download RAW message or body]
>On Sunday 27 January 2002 13:40, Hamish Rodda wrote:
>> Let me know one way or the other, whether it's commit or revert...
>
>+ //only problem is that the detailed error message box cannot be queued:
> KDE3.1 + //KMessageBox::queuedMessageBox( parent, KMessageBox::Error,
> errorString() ); + KMessageBox::detailedError( parent, err, detail,
> caption );
>
>Ouch, this is quite critical.
>The queuing prevents crashes.
>You need to implement queueing for detailed message boxes, or to get Waldo
> to do it ;), or to drop detailed error messages for now.
>Better have a non-crashing dialog with no details than a dialog with details
>that makes KHTML crash.
>(The "why does it crash" question has a long answer, related to
>event loops, redirection timers etc.)
Oh, I actually did both, but when the non-queued one was fine here, decided
not to rock the kdeui boat... here's the fix, again if this gets Dirk's
approval...
change this in job.cpp and apply below in kdeui:
- KMessageBox::detailedError( parent, err, detail, caption );
+ KMessageBox::queuedDetailedError( parent, err, detail, caption );
Hamish.
["queued.patch" (text/x-diff)]
Index: kmessagebox.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdeui/kmessagebox.cpp,v
retrieving revision 1.46
diff -u -3 -p -r1.46 kmessagebox.cpp
--- kmessagebox.cpp 2002/01/23 01:30:01 1.46
+++ kmessagebox.cpp 2002/01/27 13:12:52
@@ -575,6 +575,17 @@ KMessageBox::detailedError(QWidget *pare
}
void
+KMessageBox::queuedDetailedError(QWidget *parent, const QString &text,
+ const QString &details,
+ const QString &caption)
+{
+ KMessageBox_queue = true;
+ (void) detailedError(parent, text, details, caption);
+ KMessageBox_queue = false;
+}
+
+
+void
KMessageBox::sorry(QWidget *parent, const QString &text,
const QString &caption, bool /*notify*/)
{
Index: kmessagebox.h
===================================================================
RCS file: /home/kde/kdelibs/kdeui/kmessagebox.h,v
retrieving revision 1.29
diff -u -3 -p -r1.29 kmessagebox.h
--- kmessagebox.h 2002/01/17 06:18:08 1.29
+++ kmessagebox.h 2002/01/27 13:12:52
@@ -364,6 +364,14 @@ public:
const QString &details,
const QString &caption = QString::null, bool notify=true);
+ /**
+ * The same as @ref detailedError except that the dialog is queued, and
+ * thus notification is not possible.
+ */
+ static void queuedDetailedError( QWidget *parent,
+ const QString &text,
+ const QString &details,
+ const QString &caption = QString::null);
/**
* Display an "Sorry" dialog.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic