Summary: | file truncated after preview | ||
---|---|---|---|
Product: | [Unmaintained] quanta | Reporter: | Tim Hunter <cyclists> |
Component: | general | Assignee: | András Manţia <amantia> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 3.1.1 | ||
Target Milestone: | --- | ||
Platform: | Mandrake RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | image.html.gz |
Description
Tim Hunter
2003-05-03 22:09:39 UTC
Subject: Re: New: file truncated after preview Hi, I cannot reproduce this. After the preview, the file changed dialog is not shown, and the files itself is not truncated. Is it possible to send me (eben in private) the file you were working on? Andras -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+tPrqTQdfac6L/08RAvWoAKCNMslyOfP7mAhIL8RzUsVXHbPAEwCgtCPN 45ZyMi/sRDr7wh3iUFCwm5w= =UEl4 -----END PGP SIGNATURE----- Subject: Re: file truncated after preview I've uploaded a tar file containing a set of files that reproduce this for me. The file "image.html" is the file that is truncated. http://home.nc.rr.com/rmagick/bug58080.tar.gz Please let me know if you need any more information. On Sunday 04 May 2003 07:37 am, you wrote: > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > > http://bugs.kde.org/show_bug.cgi?id=58080 > > > > > ------- Additional Comments From amantia@freemail.hu 2003-05-04 13:37 > ------- Subject: Re: New: file truncated after preview > > Hi, > > I cannot reproduce this. After the preview, the file changed dialog is not > shown, and the files itself is not truncated. Is it possible to send me > (eben in private) the file you were working on? > > Andras > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.1 (GNU/Linux) > > iD8DBQE+tPrqTQdfac6L/08RAvWoAKCNMslyOfP7mAhIL8RzUsVXHbPAEwCgtCPN > 45ZyMi/sRDr7wh3iUFCwm5w= > =UEl4 > -----END PGP SIGNATURE----- Subject: Re: file truncated after preview I see the truncated file and the images there, but I cannot find the original html file, which got truncated. Can you send that one also? Andras -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+tTQKTQdfac6L/08RAlxdAKDlvXT+i2LTVYCt91Yr8WQpkRoNiACfd1tN 5Kva/A714dg01MGQgK5KRHY= =Ige1 -----END PGP SIGNATURE----- Subject: Re: file truncated after preview I'm sorry. Here it is. This file should have 4905 lines. Please let me know if you need anything else. On Sunday 04 May 2003 11:39 am, you wrote: > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > > http://bugs.kde.org/show_bug.cgi?id=58080 > > > > > ------- Additional Comments From amantia@freemail.hu 2003-05-04 17:39 > ------- Subject: Re: file truncated after preview > > I see the truncated file and the images there, but I cannot find the > original html file, which got truncated. Can you send that one also? > > Andras > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.1 (GNU/Linux) > > iD8DBQE+tTQKTQdfac6L/08RAlxdAKDlvXT+i2LTVYCt91Yr8WQpkRoNiACfd1tN > 5Kva/A714dg01MGQgK5KRHY= > =Ige1 > -----END PGP SIGNATURE----- Created an attachment (id=1485) image.html.gz Subject: quanta CVS commit by amantia: Do not truncate the file after a preview. CCMAIL: 58080-done@bugs.kde.org M +3 -0 ChangeLog 1.160 M +4 -24 quanta/quanta.cpp 1.272 --- quanta/ChangeLog #1.159:1.160 @@ -36,4 +36,7 @@ - fix the syntax of DTD tag files - don't close a modified document if saving has failed [#58013] + - fix the selection of modified files in the upload dialog. Should be more + accurate now. + - do not truncate the file after a preview - new features: - "Replace selection" for script actions replaces the selection if --- quanta/quanta/quanta.cpp #1.271:1.272 @@ -69,4 +69,5 @@ #include <ktip.h> #include <kparts/componentfactory.h> +#include <kio/netaccess.h> #include <ktexteditor/editinterface.h> @@ -1067,8 +1068,4 @@ void QuantaApp::slotShowPreview() s->raiseWidget(id); -//FIXME: -//Restore the original doc from the temp file. -//We should find a better synchronous method to copy the temp file to the current one. -//which works also for non local files fileWatcher->stopScan(); if (m_doc->isModified()) @@ -1077,12 +1075,5 @@ void QuantaApp::slotShowPreview() KURL tempUrl; tempUrl.setPath(w->tempFileName()); - - KTextEditor::Document *doc2 = KParts::ComponentFactory::createPartInstanceFromQuery<KTextEditor::Document>( "KTextEditor/Document", - QString::null, - this, 0, - this, 0 ); - doc2->openURL(tempUrl); - doc2->saveAs(origUrl); - delete doc2; + KIO::NetAccess::file_copy(tempUrl, origUrl, -1, true, false, this); } fileWatcher->startScan(); @@ -1638,8 +1629,4 @@ void QuantaApp::slotSyntaxCheckDone() if (m_view->writeExists()) { - //FIXME: - //Restore the original doc from the temp file. - //We should find a better synchronous method to copy the temp file to the current one. - //A method for this is also a good idea. Document *w = m_view->write(); @@ -1650,12 +1637,5 @@ void QuantaApp::slotSyntaxCheckDone() KURL tempUrl; tempUrl.setPath(w->tempFileName()); - - KTextEditor::Document *doc2 = KParts::ComponentFactory::createPartInstanceFromQuery<KTextEditor::Document>( "KTextEditor/Document", - QString::null, - this, 0, - this, 0 ); - doc2->openURL(tempUrl); - doc2->saveAs(origUrl); - delete doc2; + KIO::NetAccess::file_copy(tempUrl, origUrl, -1, true, false, this); } fileWatcher->startScan(); Subject: Re: file truncated after preview I still cannot reproduce the error. It may be because I use KDE CVS HEAD and not KDE 3.1. Two questions: - - is it the same after doing a syntax check? - - can you update your Quanta from CVS and try with that one? I believe I've found the solution for the problem. Andras -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+tknfTQdfac6L/08RArybAJ9JXI9NC32pBZWN9qbx8Z9jB6dUJgCfZeCS Av4jdIxeD1Pimfj2JDICnxM= =cRTO -----END PGP SIGNATURE----- Subject: Re: file truncated after preview Yes, I'll try CVS HEAD but it may be next week. Thanks! On Monday 05 May 2003 07:29 am, you wrote: > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > > http://bugs.kde.org/show_bug.cgi?id=58080 > > > > > ------- Additional Comments From amantia@freemail.hu 2003-05-05 13:29 > ------- Subject: Re: file truncated after preview > > I still cannot reproduce the error. It may be because I use KDE CVS HEAD > and not KDE 3.1. Two questions: > - - is it the same after doing a syntax check? > - - can you update your Quanta from CVS and try with that one? I believe > I've found the solution for the problem. > > Andras Subject: Re: file truncated after preview On Monday 05 May 2003 07:29 am, you wrote: > I still cannot reproduce the error. It may be because I use KDE CVS HEAD > and not KDE 3.1. Two questions: > - - is it the same after doing a syntax check? No. I believe the bug requires that the file be "dirty" (changed in memory from the version on disk) before clicking the View button. > - - can you update your Quanta from CVS and try with that one? I believe > I've found the solution for the problem. Sorry, no. I don't have the required Qt headers and libraries installed. Let's clear something up! This is a MANDRAKE ONLY BUG. Reviewed even has a nice story about it: How the Quanta+ version in MDK 9.1 ruined my day at http://reviewed.homelinux.org/en/mandrakebadquanta.html I have tried this with other Linux distributions. The standard Mandrake 9.1. installation is the only one that seems to have this bug, probably because of a strange mix of KDE 3.1.godwhoknows and Quanta 3.1.1. |