[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: QLineEdit
From:       Mickael Marchand <marchand () kde ! org>
Date:       2002-02-20 0:08:26
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 19 February 2002 21:55, Scott Wheeler wrote:
> No, that didn't do it for me.  I'm curious where you tracked that from, the
> only function that it's used for in qlineedit.cpp is insert().  I'll keep
> looking too.

i think i'm on it now :
- ----------------------------------------
void QLineEdit::clipboardChanged()
{
#if defined(Q_WS_X11)
    disconnect( QApplication::clipboard(), SIGNAL(dataChanged()),
        this, SLOT(clipboardChanged()) );
    disconnect( QApplication::clipboard(), SIGNAL(selectionChanged()),
        this, SLOT(clipboardChanged()) );
    deselect();
#endif
}

- --------------------------------------
it seems to be caused by this one (confirm ? ;p) 
but it looks correct to remove the selection when you select something in 
another app, so we can't simply remove the deselect() line
i think there is a wrong signal emit somewhere which causes a call to 
clipboardChanged() ...

if you look into the code you can see :
    connect( QApplication::clipboard(), SIGNAL(dataChanged()),
         this, SLOT(clipboardChanged()) );
    connect( QApplication::clipboard(), SIGNAL(selectionChanged()),
         this, SLOT(clipboardChanged()) );
in copy()

dataChanged() is emitted by the clipboard itself (kernel/qclipboard_x11.cpp)
selectionChanged() is defined in qlineedit and emitted quite some times

we need to go deeper in that way i think...

cheers,
Mik

- -- 
Mickael Marchand
Engineer student, Ecole des Mines de Douai - France
KDE Developer, http://www.kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8cukIyOYzc4nQ8j0RAqjvAJwIjSMsQvqjlnYLTAnc3EWxTHrj6ACff7De
IBZ7QcJbJTVPhn3Ra/XIXMA=
=ol3P
-----END PGP SIGNATURE-----
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic