Bug 66142 - KWord: crash when saving (destroying file dialog)
Summary: KWord: crash when saving (destroying file dialog)
Status: RESOLVED FIXED
Alias: None
Product: kword
Classification: Miscellaneous
Component: general (show other bugs)
Version: 1.5 or before
Platform: Compiled Sources Linux
: VHI major
Target Milestone: ---
Assignee: Thomas Zander
URL:
Keywords:
: 63946 65229 66046 66359 69620 70177 71682 86227 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-17 01:06 UTC by Nicolas Goutte
Modified: 2004-12-31 16:55 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
GDB output (4.49 KB, text/plain)
2003-10-17 01:07 UTC, Nicolas Goutte
Details
patch_klineedit.diff (1.03 KB, text/x-diff)
2003-10-23 00:31 UTC, Nicolas Goutte
Details
patch2.diff (2.98 KB, text/x-diff)
2003-12-14 04:08 UTC, Nicolas Goutte
Details
valgrind.txt (171.12 KB, text/plain)
2003-12-06 21:21 UTC, Nicolas Goutte
Details
Valgrind-confirmed anti-crash hack for KOffice 1.3 on KDE 3.1 (3.11 KB, patch)
2003-12-14 04:08 UTC, Clarence Dang
Details
Valgrind-confirmed anti-crash hack for KOffice 1.2 on KDE 3.1 (1.43 KB, patch)
2003-12-14 04:09 UTC, Clarence Dang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Goutte 2003-10-17 01:06:46 UTC
Version:           KOffice CVS HEAD 2003-10-16 (using KDE KDE 3.1.4)
Installed from:    Compiled From Sources
Compiler:          gcc 3.2 -march=pentium2
OS:          Linux

When trying to save any document (even A4 template), KWord crashes after having clisked "Ok" in the file dailog.

I have discovered this behaviour yesterday, but I have not saved anything in KWord for days. (KOffice has been build from cvs-clean, after having brought kdelibs to the KDE_3_1_BRANCH (just after KDE 3.1.4.) (So I have not any KDE 3.2 modification in kdelibs anymore.))

Have a nice day!
Comment 1 Nicolas Goutte 2003-10-17 01:07:41 UTC
Created attachment 2796 [details]
GDB output
Comment 2 David Faure 2003-10-17 12:06:59 UTC
Subject: Re:  New: KWord: crash when saving (destroying file dialog)

> KWord crashes after having clisked "Ok" in the file dailog.

I thought at least *you* would check for duplicates first...
So for the 10th time:
Fixed in kdelibs-3.1-branch (post 3.1.4) and in CVS HEAD.

Comment 3 Nicolas Goutte 2003-10-20 00:38:09 UTC
I am sorry, David but the bugs is *not* solved. :-( It still crashes, with exact the same result.

Have a nice day!

Comment 4 David Faure 2003-10-20 00:58:55 UTC
Subject: Re:  KWord: crash when saving (destroying file dialog)

> I am sorry, David but the bugs is *not* solved. :-( It still crashes, with exact the same result.

Which version of kdelibs do you have, exactly?
Is your version of kdelibs/kdeui/klineedit.cpp 1.153.2.5, from KDE_3_1_BRANCH?

Comment 5 Nicolas Goutte 2003-10-20 01:06:30 UTC
Subject: Re:  KWord: crash when saving (destroying file dialog)

From the CVS/Entries:
/klineedit.cpp/1.153.2.5/Sat Sep 27 18:35:42 2003//TKDE_3_1_BRANCH

I have downloaded the file again, there is no difference with the file that 
was there and compiled.

On Monday 20 October 2003 00:58, David Faure wrote:
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
> http://bugs.kde.org/show_bug.cgi?id=66142
>
>
>
>
> ------- Additional Comments From faure@kde.org  2003-10-20 00:58 -------
> Subject: Re:  KWord: crash when saving (destroying file dialog)
>
> > I am sorry, David but the bugs is *not* solved. :-( It still crashes,
> > with exact the same result.
>
> Which version of kdelibs do you have, exactly?
> Is your version of kdelibs/kdeui/klineedit.cpp 1.153.2.5, from
> KDE_3_1_BRANCH?

Comment 6 Clarence Dang 2003-10-20 04:50:59 UTC
*** Bug 63946 has been marked as a duplicate of this bug. ***
Comment 7 Clarence Dang 2003-10-20 04:53:44 UTC
*** Bug 66046 has been marked as a duplicate of this bug. ***
Comment 8 Clarence Dang 2003-10-20 05:08:00 UTC
Also duplicate of 61225 (which has been closed so I won't redirect this bug there).

This is not a KDE bug.  It's a QT 3.2 bug that only causes problems in a specific situation:

http://lists.kde.org/?l=koffice-devel&m=106553685018372&w=2

I can't comment on whether it still happens for me (haven't updated kdelibs for a while).  But since it clearly still happens for others, I guess I'll have to drag out my QWidget debugging code again and try to write a patch.  Tracking down the cause of this bug was a nightmare in itself...
Comment 9 Clarence Dang 2003-10-22 09:08:52 UTC
Subject: Dangling pointer dereference in focus data list

Hi TT,

See http://bugs.kde.org/show_bug.cgi?id=66142 (but ignore the koffice-devel ML 
link -- there was a "bug" in that description of the cause; corrected below).  
It can only be reproduced when the filterWidget is not set to be editable 
(i.e. saving a file with a mimefilter list, with a default type e.g. in 
KOffice).

IIRC, this crash (or at least, valgrind error) is due to a bug in qwidget.cpp:

setFocus() and setTabOrder() added one of the KComboBox's (locationEdit?) to 2 
separate focusData's (because of the focusProxy() changing, IIRC).  And so 
when this KComboBox destructed, it only removed itself from one focusData 
list and hence a dangling pointer was left in the other, which later got 
dereferenced by the other KComboBox (filterWidget?) upon its destruction, 
causing the crash.

I can't reduce the code to a small QT program because it's an _incredible_ 
pain.  So you'll have to try it from KDE_3_1_BRANCH.

Thanks,
Clarence

Comment 10 Nicolas Goutte 2003-10-23 00:31:14 UTC
Subject: [PATCH] Fixing KLineEdit's use of KCompletionBox

The attached patch is for kdelibs/kdeui/klineedit.cpp (The patch is not 
committed.)

It fixes the use of KCompletionBox in KLineEdit. In the documentation of 
KCompletionBox's constructor is told that the parent *must* be null and that 
the box *must* be deleted manually.

This seems to fix the KOffice CVS HEAD problem at save on KDE 3.1.x. (It is 
hard to tell, as it did not crahed always anymore.) Clarence, can you 
confirm?

This was tested on KDE KDE_3_1_BRANCH but I suppose that it must be applied on 
KDE CVS HEAD too.

Have a nice day!


Created an attachment (id=2855)
patch_klineedit.diff
Comment 11 Nicolas Goutte 2003-10-23 01:18:52 UTC
Subject: Re: [PATCH] Fixing KLineEdit's use of KCompletionBox

The idea was nice, as it fixed KOffice. However it breaks Konqueror, which 
becomes unusable (You cannot enter any URL, and the completion list is in the 
middle of the window.)

Have a nice day!

On Thursday 23 October 2003 00:28, Nicolas Goutte wrote:
> The attached patch is for kdelibs/kdeui/klineedit.cpp (The patch is not
> committed.)
>
> It fixes the use of KCompletionBox in KLineEdit. In the documentation of
> KCompletionBox's constructor is told that the parent *must* be null and
> that the box *must* be deleted manually.
>
> This seems to fix the KOffice CVS HEAD problem at save on KDE 3.1.x. (It is
> hard to tell, as it did not crahed always anymore.) Clarence, can you
> confirm?
>
> This was tested on KDE KDE_3_1_BRANCH but I suppose that it must be applied
> on KDE CVS HEAD too.
>
> Have a nice day!

Comment 12 qt-bugs 2003-10-23 15:34:30 UTC
Subject: Re: [Issue N33571] Dangling pointer dereference in focus data list

On Wednesday, 22. Oct 2003 17:13 Clarence Dang wrote:

> See http://bugs.kde.org/show_bug.cgi?id=66142 (but ignore the
> koffice-devel ML link -- there was a "bug" in that description of the
> cause; corrected below). It can only be reproduced when the
> filterWidget is not set to be editable (i.e. saving a file with a
> mimefilter list, with a default type e.g. in KOffice).
>
> IIRC, this crash (or at least, valgrind error) is due to a bug in
> qwidget.cpp:
>
> setFocus() and setTabOrder() added one of the KComboBox's
> (locationEdit?) to 2 separate focusData's (because of the focusProxy()
> changing, IIRC). And so when this KComboBox destructed, it only
> removed itself from one focusData list and hence a dangling pointer
> was left in the other, which later got dereferenced by the other
> KComboBox (filterWidget?) upon its destruction, causing the crash.
>
> I can't reduce the code to a small QT program because it's an
> _incredible_
> pain.  So you'll have to try it from KDE_3_1_BRANCH.

Hi Clarence,

We do not think that there is a problem in the Qt code, but we maybe
wrong. A widget should never be in more than one list. Can you please
provide a Qt only example program the has this crash.

Regards

Pascal
Technical Support
Trolltech AS, Waldemar Thranes gate 98, NO-0175 Oslo, Norway

Comment 13 Nicolas Goutte 2003-10-24 16:43:31 UTC
Subject: koffice/lib/kofficecore

CVS commit by goutte: 

HACK: give back a mimimum of functionality to the save dialog when compiled
under KDE 3.1.x. (For KDE 3.2.x nothing is touched.)

This disables the saving to KOffice 1.1 format and to directories.
(The entries are now labeled "Empty file". Do *not* use them!)
However this permits now people to continue tracking bugs while using
KOffice CVS HEAD on KDE 3.1.x.

I repeat: this is a *hack*.

I am sorry for the inconveniences.
CCMAIL:66142@bugs.kde.org


  M +14 -0     koMainWindow.cc   1.315


--- koffice/lib/kofficecore/koMainWindow.cc  #1.314:1.315
@@ -92,4 +92,5 @@ public:
         Q_ASSERT( mimeFilter[0] == nativeFormat );
 
+#if KDE_IS_VERSION(3,1,92)
         // Insert two entries with native mimetypes, for the special entries.
         QStringList::Iterator mimeFilterIt = mimeFilter.at( 1 );
@@ -120,4 +121,17 @@ public:
                 filterWidget->changeItem (i18n ("%1 (%2 Compatible)").arg (mime->comment ()).arg (compatString), i);
         }
+#else
+        // ### FIXME: KDE 3.1.x crashes on filterWidget->changeItem
+        // ### FIXME:   So we must provide a hack to have back a minimum of functionality.
+        // ### FIXME:   (Saving to KOffice 1.1 format and to directory are not supported.)
+
+        // Insert two entries with native mimetypes, for the special entries.
+        QStringList::Iterator mimeFilterIt = mimeFilter.at( 1 );
+        mimeFilter.insert( mimeFilterIt /* before 1 -> after 0 */, 2, "application/x-zerosize" );
+        // Fill in filter combo
+        // Note: if currentFormat doesn't exist in mimeFilter, filterWidget
+        //       will default to the first item (native format)
+        setMimeFilter( mimeFilter, currentFormat.isEmpty() ? nativeFormat : currentFormat );
+#endif
     }
 


Comment 14 Nicolas Goutte 2003-10-25 18:36:02 UTC
Subject: [PATCH] A little more for KDE 3.1.x

The attached patch is for the file koffice/lib/kofficecore/koMainWindow.cc

It gives back, to KOffice CVS HEAD compiled on KDE 3.1.x, the possibility to 
save to KOffice 1.1 format and to a directory, however now coded as 
application/x-tgz and text/xml. (Ugly GUI but not any risk anymore to lose 
the document by choosing the "empty file" entries.)

Of course this patch does not fix bug #66142, it is still part of a 
work-around.

Please check if there is anything that I would have missed. (Loading seems to 
work when choosing the KOffice format.)

I think that this patch will give the possibility to release a KOffice 1.3 
Beta 5 next week. (I am not sure if Luk
Comment 15 David Faure 2003-10-25 19:16:34 UTC
Subject: Re:  KWord: crash when saving (destroying file dialog)

On Saturday 25 October 2003 18:36, you wrote:
> It gives back, to KOffice CVS HEAD compiled on KDE 3.1.x, the possibility to 
> save to KOffice 1.1 format and to a directory, however now coded as 
> application/x-tgz and text/xml. (Ugly GUI but not any risk anymore to lose 
> the document by choosing the "empty file" entries.)
> 
> Of course this patch does not fix bug #66142, it is still part of a 
> work-around.

Cool. Thanks a lot. I'd say apply for now, this makes is possible to release
koffice, for the rest we need a kdelibs fix.

Comment 16 Clarence Dang 2003-10-26 02:17:45 UTC
*** Bug 65229 has been marked as a duplicate of this bug. ***
Comment 17 Nicolas Goutte 2003-10-27 14:42:00 UTC
*** Bug 66359 has been marked as a duplicate of this bug. ***
Comment 18 Nicolas Goutte 2003-10-27 14:53:05 UTC
Let us change its status, as this bug is getting very annoying.

Have a nice day!
Comment 19 Nicolas Goutte 2003-11-19 22:09:57 UTC
Subject: Re: KDE Problem (was: Re: KSpread bugs)

Very bad news: bug #66142 seems to affect KOffice 1.2.1 too. :-(

So either I have to backport the workaround or we have to speed up the release 
of KOffice 1.3. (Or of course someone could find a solution for KDE 3.1.x but 
it seems more difficult.)

I get more and more the feeling that some behaviour in Qt 3.2 changed and is 
therefore triggering the bug.

(Sigh, I hoped that I was wrong when I wrote that the RTF filter export bug 
with Qt 3.2 could be the start of such kinds of bugs.)

Have a nice day!

On Monday 20 October 2003 10:22, Luk
Comment 20 Clarence Dang 2003-11-27 09:07:05 UTC
Hi,

Can anyone still reproduce this exact problem with valgrind?:

=22769== Invalid read of size 4
==22769==    at 0x402BD21E: ??? (/home/kdevel/cvs/qt-copy/include/qobject.h)
==22769==    by 0x40E7755A: QWidget::~QWidget() (kernel/qwidget.cpp)
==22769==    by 0x40F617DE: QScrollBar::~QScrollBar() (widgets/qscrollbar.cpp)
==22769==    by 0x40F650AA: QScrollView::~QScrollView() (widgets/qscrollview.cpp)
(...)

See, after upgrading from Qt 3.2.0 to near Qt 3.2.3 (recent qt-copy), I can no longer reproduce those memory errors (even with my contrived program) and have not seen the filedialog crash since.

For this reason (and because I had a complete valgrind backtrace sometime ago), I'm confident that it was a qwidget/qfocusdata bug and so I doubt that Nicolas' patches would have made a difference for KDE 3.1 as they didn't attack the source of the problem.  Having said this, it seems a new, unrelated bug has appeared :(

==6311== Invalid read of size 2
==6311==    at 0x4047068C: ??? (../include/qstring.h:214)
==6311==    by 0x407FD048: QChar::isPrint() const (tools/qstring.cpp:437)
==6311==    by 0x40D35A35: KLineEdit::keyPressEvent(QKeyEvent*) (in /home/kdevel/dist/lib/libkdeui.so.4.2.0)
==6311==    by 0x405600A2: QWidget::event(QEvent*) (kernel/qwidget.cpp:4472)
==6311==    by 0x405F5D24: QLineEdit::event(QEvent*) (widgets/qlineedit.cpp:1406)
==6311==    by 0x404C55F7: QApplication::internalNotify(QObject*, QEvent*) (kernel/qapplication.cpp:2582)
==6311==    by 0x404C4C12: QApplication::notify(QObject*, QEvent*) (kernel/qapplication.cpp:2339)
==6311==    by 0x40A753D0: KApplication::notify(QObject*, QEvent*) (in /home/kdevel/dist/lib/libkdecore.so.4.2.0)
==6311==    by 0x4045B189: ??? (kernel/qapplication.h:495)
==6311==    by 0x4045611F: QETWidget::translateKeyEvent(_XEvent const*, bool) (kernel/qapplication_x11.cpp:5499)
==6311==    by 0x404528E9: QApplication::x11ProcessEvent(_XEvent*) (kernel/qapplication_x11.cpp:3655)
==6311==    by 0x4046C786: QEventLoop::processEvents(unsigned) (kernel/qeventloop_x11.cpp:192)
==6311==    by 0x404DAEB0: QEventLoop::enterLoop() (kernel/qeventloop.cpp:198)
==6311==    by 0x404C57DD: QApplication::enter_loop() (kernel/qapplication.cpp:2737)
==6311==    by 0x406BDEAB: QDialog::exec() (dialogs/qdialog.cpp:370)
==6311==    by 0x8049C96: main (in /home/kdevel/krash/krash)
==6311==    by 0x411FE082: __libc_start_main (in /lib/i686/libc-2.2.5.so)
==6311==    by 0x80498A1: free (in /home/kdevel/krash/krash)
Comment 21 Nicolas Goutte 2003-11-27 16:55:24 UTC
Subject: Re:  KWord: crash when saving (destroying file dialog)

(...)
>
> For this reason (and because I had a complete valgrind backtrace sometime
> ago), I'm confident that it was a qwidget/qfocusdata bug and so I doubt
> that Nicolas' patches would have made a difference for KDE 3.1 as they
> didn't attack the source of the problem.  Having said this, it seems a new,
> unrelated bug has appeared :(

I have always told that it was a work-around to avoid triggering the problem. 
Nothing is fixed, which gives the problem that some file names seems to 
trigger the bug too (see one of the duplicated bugs.)

>
(...)

Comment 22 Nicolas Goutte 2003-12-04 17:17:27 UTC
*** Bug 69620 has been marked as a duplicate of this bug. ***
Comment 23 Nicolas Goutte 2003-12-06 21:21:56 UTC
Subject: Valgrind log

Attached is the log of Valgrind over KWord (with work-around, on KDE 3.1.x)

Content: loading KWord, choosing the A4 template, saving as /var/tmp/test.kwd 
(file already existing) and closing KWord.

Perhaps someone experimented with Valgrind can find something out of the data.
Also perhaps other Valgrind user could use it as a reference to help debugging 
this bug.

Have a nice day!




Created an attachment (id=3584)
valgrind.txt
Comment 24 David Faure 2003-12-06 23:14:50 UTC
Subject: Re:  KWord: crash when saving (destroying file dialog)

On Saturday 06 December 2003 21:21, you wrote:
> Perhaps someone experimented with Valgrind can find something out of the data.
> Also perhaps other Valgrind user could use it as a reference to help debugging 
> this bug.

It's just the usual "crash in KCompletionBox accessing already-deleted data",
there's no other info there :(

(BTW to get better reports from valgrind, compile everything with --enable-debug
or adddebug, and export VALGRIND_OPTS="--num-callers=20"
However on this particular problem, it won't help (I've seen the full backtraces
already...)

Comment 25 Nicolas Goutte 2003-12-13 00:33:15 UTC
*** Bug 70177 has been marked as a duplicate of this bug. ***
Comment 26 Clarence Dang 2003-12-14 04:08:30 UTC
Created attachment 3692 [details]
Valgrind-confirmed anti-crash hack for KOffice 1.3 on KDE 3.1
Comment 27 Clarence Dang 2003-12-14 04:09:41 UTC
Created attachment 3693 [details]
Valgrind-confirmed anti-crash hack for KOffice 1.2 on KDE 3.1
Comment 28 Clarence Dang 2003-12-14 04:19:04 UTC
Patch initially written by me; valgrind-tested, corrected and backported to 1.2 by Nicolas Goutte.  Works by removing one of the possible "cannon triggers" (filterWidget->setEditable (false) which plays with the focusdata lists).

It turns out that the crash disappeared for me because I upgraded both Qt _and_ KDE at the same time.  So still a Qt 3.2 bug.

On Sat, 13 Dec 2003 08:29 am, Nicolas Goutte wrote:
> The question is now if this hack is good enough for a direct KOffice 1.3 or
> do we need a KOffice 1.3 RC2? I am not convienced that some of the bugs are
> really the same problem.
Comment 29 Nicolas Goutte 2003-12-14 18:29:21 UTC
Subject: KOFFICE_1_2_BRANCH: koffice/lib/kofficecore

CVS commit by goutte: 

HACK: avoid triggering the crash in the file dialog by putting the
mime type combo box as editable (only for KDE 3.1.x on Qt 3.2.x)
(The hack passes Valgrind. This is a backport of a patch made by Clarence Dang)
CCMAIL:66142@bugs.kde.org


  M +21 -0     koMainWindow.cc   1.268.2.2


--- koffice/lib/kofficecore/koMainWindow.cc  #1.268.2.1:1.268.2.2
@@ -53,4 +53,20 @@
 #include <kstatusbar.h>
 
+
+
+// The file dialog bug #66142 happens with KDE 3.1.x on QT 3.2.x
+#include <kdeversion.h>
+#if KDE_VERSION >= 0x030100 && KDE_VERSION < 0x030190
+# if QT_VERSION >= 0x030200
+#  ifdef __GNUC__
+#   warning "Including File Dialog Hack!"
+#  endif
+#  define FILE_DIALOG_BUG
+#  include <kpushbutton.h>
+# endif
+#endif
+
+
+
 class KoPartManager : public KParts::PartManager
 {
@@ -554,5 +570,10 @@ bool KoMainWindow::saveDocument( bool sa
         dialog->setCaption( i18n("Save Document As") );
         dialog->setKeepLocation( true );
+#ifdef FILE_DIALOG_BUG
+        dialog->setOperationMode( KFileDialog::Other );
+        dialog->okButton()->setGuiItem( KStdGuiItem::save() );
+#else
         dialog->setOperationMode( KFileDialog::Saving );
+#endif
         QStringList mimeFilter = KoFilterManager::mimeFilter( _native_format, KoFilterManager::Export );
         dialog->setSpecialMimeFilter( mimeFilter, _native_format );


Comment 30 Clarence Dang 2003-12-15 03:51:44 UTC
Subject: koffice/lib/kofficecore

CVS commit by dang: 

apply 1.3 version of HACK:

don't crash on save filedialog destruction (KDE 3.1 on Qt 3.2)

CCMAIL: 66142@bugs.kde.org


  M +7 -38     koMainWindow.cc   1.319


--- koffice/lib/kofficecore/koMainWindow.cc  #1.318:1.319
@@ -41,4 +41,5 @@
 #include <kedittoolbar.h>
 #include <kprogress.h>
+#include <kpushbutton.h>
 #include <kdebug.h>
 #if ! KDE_IS_VERSION( 3,1,90 )
@@ -85,5 +86,4 @@ public:
         : KFileDialog( startDir, filter, parent, name, modal ) { }
 
-#if KDE_IS_VERSION(3,1,92)
     void setSpecialMimeFilter( QStringList& mimeFilter,
                                const QString& currentFormat, const int specialOutputFlag,
@@ -123,41 +123,4 @@ public:
     }
 
-#else
-
-    QString m_nativeFormat;
-
-    void setSpecialMimeFilter( QStringList& mimeFilter,
-                               const QString& currentFormat, const int specialOutputFlag,
-                               const QString& nativeFormat )
-    {
-        Q_ASSERT( !mimeFilter.isEmpty() );
-        Q_ASSERT( mimeFilter[0] == nativeFormat );
-
-        // ### FIXME: KDE 3.1.x crashes on filterWidget->changeItem
-        // ### FIXME:   So we must provide a hack to have back a minimum of functionality.
-        // ### FIXME:   (Saving to KOffice 1.1 format and to directory are not supported.)
-
-        // Insert two entries with native mimetypes, for the special entries.
-        QStringList::Iterator mimeFilterIt = mimeFilter.at( 1 );
-        mimeFilter.insert( mimeFilterIt, "application/x-tgz" );
-        mimeFilter.insert( mimeFilterIt, "text/xml" );
-        // Fill in filter combo
-        // Note: if currentFormat doesn't exist in mimeFilter, filterWidget
-        //       will default to the first item (native format)
-        setMimeFilter( mimeFilter, currentFormat.isEmpty() ? nativeFormat : currentFormat );
-        m_nativeFormat=nativeFormat;
-    }
-
-    QString currentMimeFilter() const // Note: this is not virtual!!!
-    {
-        const QString result ( KFileDialog::currentMimeFilter() );
-        if ( (result == "application/x-tgz") || (result == "text/xml"))
-            return m_nativeFormat;
-        else
-            return result;
-    }
-
-#endif
-
     int specialEntrySelected()
     {
@@ -783,5 +746,11 @@ bool KoMainWindow::saveDocument( bool sa
             dialog->setCaption( i18n("Export Document As") );
 
+#if KDE_IS_VERSION(3,1,92)
         dialog->setOperationMode( KFileDialog::Saving );
+#else
+        dialog->setOperationMode( KFileDialog::Other );
+        dialog->setKeepLocation( true );
+        dialog->okButton()->setGuiItem( KStdGuiItem::save() );
+#endif
         dialog->setSpecialMimeFilter( mimeFilter,
                                       isExporting() ? d->m_lastExportFormat : pDoc->mimeType(),


Comment 31 Nicolas Goutte 2003-12-24 13:39:14 UTC
*** Bug has been marked as fixed ***.
Comment 32 Nicolas Goutte 2004-07-31 17:14:46 UTC
*** Bug 86227 has been marked as a duplicate of this bug. ***
Comment 33 Nicolas Goutte 2004-12-31 16:55:27 UTC
*** Bug 71682 has been marked as a duplicate of this bug. ***