[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: KBugReport patch
From: Matthias Kretz <kretz () kde ! org>
Date: 2000-12-23 21:31:26
[Download RAW message or body]
Hi,
since I had some bad luck with reporting bugs, I prepared a patch that
should keep me, and perhaps some other people, from too much trouble.
As a vi user I'm used to pressing ESC after typing some text. That's
why I had to write my last bugreport three times :-(
I changed KBugReport to ask for confirmation when "Cancel" gets
pressed. Just like KMail does. Now... I don't have a clue about binary
incompatibility - is this patch OK? All I know is, that I didn't have
to recompile anything except kdelibs/kdeui to make it work.
Happy Holidays, and a merry Christmas to y'all!
Matthias Kretz
---------------------------------------------------------------------
Matthias Kretz Tel: +49 2771 35291
Nassaustr. 40 Email: MatthiasKretz@gmx.net
35683 Dillenburg kretz@kde.org
Germany http://www.Kretz.dyn.ns1.net/~mkretz/
---------------------------------------------------------------------
["kbugreport.patch" (text/plain)]
Index: kbugreport.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdeui/kbugreport.cpp,v
retrieving revision 1.37
diff -u -3 -p -r1.37 kbugreport.cpp
--- kbugreport.cpp 2000/11/24 19:38:18 1.37
+++ kbugreport.cpp 2000/12/23 21:20:55
@@ -301,6 +301,18 @@ void KBugReport::slotOk( void )
accept();
}
+void KBugReport::slotCancel()
+{
+ if( m_lineedit->edited() || m_subject->edited() )
+ {
+ int rc = KMessageBox::warningContinueCancel( this,
+ i18n( "Close and discard\nedited message?" ),
+ i18n( "Close message" ), i18n( "&Discard" ) );
+ if( rc == KMessageBox::Cancel )
+ return;
+ }
+ KDialogBase::slotCancel();
+}
QString KBugReport::text()
Index: kbugreport.h
===================================================================
RCS file: /home/kde/kdelibs/kdeui/kbugreport.h,v
retrieving revision 1.8
diff -u -3 -p -r1.8 kbugreport.h
--- kbugreport.h 2000/05/28 01:03:58 1.8
+++ kbugreport.h 2000/12/23 21:20:55
@@ -73,6 +73,10 @@ protected slots:
* OK has been clicked
*/
virtual void slotOk( void );
+ /**
+ * Cancel has been clicked
+ */
+ virtual void slotCancel();
protected:
QString text();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic