forked from qt-creator/qt-creator
Find: Fix display of Replace & Find button
Change-Id: I91674de50a18883baa4fe2014e5589a7f4dd08fb Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
e742fd26bf
commit
9891eec019
@@ -225,12 +225,12 @@ FindToolBar::FindToolBar(FindPlugin *plugin, CurrentDocumentFind *currentDocumen
|
|||||||
m_ui.replaceButton->setDefaultAction(m_localReplaceAction);
|
m_ui.replaceButton->setDefaultAction(m_localReplaceAction);
|
||||||
|
|
||||||
m_replaceNextAction = new QAction(tr("Replace && Find"), this);
|
m_replaceNextAction = new QAction(tr("Replace && Find"), this);
|
||||||
m_replaceNextAction->setIconText(tr("Replace && Find")); // work around bug in Qt that kills ampersands in tool button
|
|
||||||
cmd = Core::ActionManager::registerAction(m_replaceNextAction, Constants::REPLACE_NEXT, globalcontext);
|
cmd = Core::ActionManager::registerAction(m_replaceNextAction, Constants::REPLACE_NEXT, globalcontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+=")));
|
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+=")));
|
||||||
mfind->addAction(cmd, Constants::G_FIND_ACTIONS);
|
mfind->addAction(cmd, Constants::G_FIND_ACTIONS);
|
||||||
connect(m_replaceNextAction, SIGNAL(triggered()), this, SLOT(invokeGlobalReplaceNext()));
|
connect(m_replaceNextAction, SIGNAL(triggered()), this, SLOT(invokeGlobalReplaceNext()));
|
||||||
m_localReplaceNextAction = new QAction(m_replaceNextAction->text(), this);
|
m_localReplaceNextAction = new QAction(m_replaceNextAction->text(), this);
|
||||||
|
m_localReplaceNextAction->setIconText(m_replaceNextAction->text()); // Workaround QTBUG-23396
|
||||||
cmd = ActionManager::registerAction(m_localReplaceNextAction, Constants::REPLACE_NEXT, findcontext);
|
cmd = ActionManager::registerAction(m_localReplaceNextAction, Constants::REPLACE_NEXT, findcontext);
|
||||||
cmd->augmentActionWithShortcutToolTip(m_localReplaceNextAction);
|
cmd->augmentActionWithShortcutToolTip(m_localReplaceNextAction);
|
||||||
connect(m_localReplaceNextAction, &QAction::triggered, this, &FindToolBar::invokeReplaceNext);
|
connect(m_localReplaceNextAction, &QAction::triggered, this, &FindToolBar::invokeReplaceNext);
|
||||||
|
|||||||
Reference in New Issue
Block a user