forked from qt-creator/qt-creator
Git: Set default button for change-related actions by triggering action
Change-Id: I536618e9b80f3ed213c6c54dd6c2becbb64c709b Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
63e7fe19b9
commit
e81152acd5
@@ -249,6 +249,7 @@ ActionCommandPair
|
||||
{
|
||||
const ActionCommandPair rc = createRepositoryAction(ac, text, id, context, addToLocator);
|
||||
connect(rc.first, SIGNAL(triggered()), this, pluginSlot);
|
||||
rc.first->setData(id.uniqueIdentifier());
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -852,7 +853,9 @@ void GitPlugin::startChangeRelatedAction()
|
||||
if (!state.hasTopLevel())
|
||||
return;
|
||||
|
||||
ChangeSelectionDialog dialog(state.topLevel(), Core::ICore::mainWindow());
|
||||
QAction *action = qobject_cast<QAction *>(sender());
|
||||
Core::Id id = action ? Core::Id::fromUniqueIdentifier(action->data().toInt()) : Core::Id();
|
||||
ChangeSelectionDialog dialog(state.topLevel(), id, Core::ICore::mainWindow());
|
||||
|
||||
int result = dialog.exec();
|
||||
|
||||
|
Reference in New Issue
Block a user