From e73e00117dfa435d782b2e9989a4b6782cb8f16d Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Tue, 31 May 2005 20:22:08 +0000 Subject: [PATCH] Don't crash when receive null qfocusevent * svn path=/branches/work/kde4/kdegraphics/kpdf/; revision=420339 --- part.cpp | 2 -- ui/minibar.cpp | 7 ++++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/part.cpp b/part.cpp index c3a739443..cd7d235c4 100644 --- a/part.cpp +++ b/part.cpp @@ -790,8 +790,6 @@ void Part::slotPrint() if (width > height) landscape++; else portrait++; } -#warning whoever ported Kprinter messed, setOrientation is QPrinted::Orientation not Qt::Orientation -#warning change it // if (landscape > portrait) printer.setOrientation(KPrinter::Landscape); if (printer.setup(widget())) doPrint( printer ); diff --git a/ui/minibar.cpp b/ui/minibar.cpp index 524784d9f..ceb152730 100644 --- a/ui/minibar.cpp +++ b/ui/minibar.cpp @@ -366,9 +366,14 @@ void PagesEdit::focusInEvent( QFocusEvent * e ) // call default handler QLineEdit::focusInEvent( e ); } - +#include void PagesEdit::focusOutEvent( QFocusEvent * e ) { + if (!e) + { + kdDebug() << "Got a null QFocusEvent, investigate" << endl; + return; + } // change background color to a dark tone #warning setLineWidth does not exists in Qt4 // setLineWidth( 1 );