[Patch:] KClipboard / klipper / kpaint bug fixes

Helge Deller deller at gmx.de
Mon Oct 28 22:39:23 GMT 2002


On Monday 28 October 2002 23:33, Carsten Pfeiffer wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
>
> On Monday 28 October 2002 20:52, Helge Deller wrote:
>
> Hi,
>
> > klipper will try to show your copied graphics as "text" which of course
> > fails and thus it displays you some weird strings instead.
>
> hmm, isn't that a bug in QClipboard? It should return QString::null if
> there is no text/* contents available.

Yes, QClipboard should definitively return QSting::null if it's not text.

> > The follwing patches to
> > - kdelibs/kdecore/kclipboard.[cpp|h],
> > - kdebase/klipper/toplevel.[cpp|h] and
> > - kdegraphics/kpaint/
>
> This is a rather large patch. Can you please separate the cleanups from the
> bugfixes? The cleanup using QClipboard::Mode from Qt 3.1is ok. But please
> don't remove commented out debug-output, I'm quite sure, I will need it
> again. Also, please put condition and action into different lines, e.g.
>
> if ( foo )
>   doSomething().

Ok. I'll fix this and send the patches one by one again.

> > - moves the clipboard syncronisation to kclipboard.cpp only. There should
> > be no such code in klipper.cpp.
>
> There is no synchronisation in klipper. But if you select an item in
> klipper's menu, you probably want it in both clipboard and selection,
> independent of the synchronization settings.

Sure, the functionality is still there. It shouldn't have changed in my implementation.

> Regarding the removal of KClipboard::MimeSource, you can get a crash when
> you do something like clip->setText( clip->text( QClipboard::Selection ),
> QClipboard::Clipboard ).

Hmm, people doing this should be shot :-)
Anyway, clip->text() returns a QString and thus it wouldn't crash.
Although using something like clip->setData( clip->data(QClipboard::Selection) )
might give problems.

Helge





More information about the kde-core-devel mailing list