using Qt::UniqueConnection
This commit is contained in:
parent
217c722e71
commit
d58732d5ac
@ -136,8 +136,8 @@ int QskShortcutHandler::insert(
|
|||||||
{
|
{
|
||||||
if ( receiver )
|
if ( receiver )
|
||||||
{
|
{
|
||||||
receiver->disconnect( this );
|
connect( receiver, &QObject::destroyed,
|
||||||
connect( receiver, &QObject::destroyed, this, &QskShortcutHandler::cleanUp );
|
this, &QskShortcutHandler::cleanUp, Qt::UniqueConnection );
|
||||||
}
|
}
|
||||||
|
|
||||||
int id = 0;
|
int id = 0;
|
||||||
@ -148,8 +148,8 @@ int QskShortcutHandler::insert(
|
|||||||
{
|
{
|
||||||
if ( item != receiver )
|
if ( item != receiver )
|
||||||
{
|
{
|
||||||
item->disconnect( this );
|
connect( item, &QObject::destroyed,
|
||||||
connect( item, &QObject::destroyed, this, &QskShortcutHandler::cleanUp );
|
this, &QskShortcutHandler::cleanUp, Qt::UniqueConnection );
|
||||||
}
|
}
|
||||||
|
|
||||||
id = map->addShortcut( item, sequence, Qt::WindowShortcut, qskContextMatcher );
|
id = map->addShortcut( item, sequence, Qt::WindowShortcut, qskContextMatcher );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user