fix merge conflict

This commit is contained in:
Xiao YiFang 2022-07-17 18:45:05 +08:00
commit 66b10495dd
2 changed files with 1034 additions and 697 deletions

File diff suppressed because it is too large Load diff

View file

@ -769,6 +769,11 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
ui.historyList->installEventFilter( this );
ui.favoritesTree->installEventFilter( this );
groupListInDock->installEventFilter( this );
groupListInToolbar->installEventFilter( this );
connect( &ftsIndexing, SIGNAL( newIndexingName( QString ) ), this, SLOT( showFTSIndexingName( QString ) ) );
#ifndef Q_OS_MAC
@ -1574,7 +1579,7 @@ void MainWindow::createTabList()
tabListButton->setToolTip( tr( "Open Tabs List" ) );
tabListButton->setPopupMode(QToolButton::InstantPopup);
ui.tabWidget->setCornerWidget(tabListButton);
tabListButton->setFocusPolicy(Qt::ClickFocus);
tabListButton->setFocusPolicy(Qt::NoFocus);
}
void MainWindow::fillWindowsMenu()
@ -2543,6 +2548,14 @@ bool MainWindow::eventFilter( QObject * obj, QEvent * ev )
if (ev->type() == QEvent::KeyPress)
{
QKeyEvent *keyevent = static_cast<QKeyEvent*>(ev);
bool handleCtrlTab = ( obj == translateLine
|| obj == wordList
|| obj == ui.historyList
|| obj == ui.favoritesTree
|| obj == ui.dictsList
|| obj == groupList );
if (keyevent->modifiers() == Qt::ControlModifier && keyevent->key() == Qt::Key_Tab)
{
if (cfg.preferences.mruTabOrder)
@ -2550,8 +2563,18 @@ bool MainWindow::eventFilter( QObject * obj, QEvent * ev )
ctrlTabPressed();
return true;
}
else if( handleCtrlTab )
{
QApplication::sendEvent( ui.tabWidget, ev );
return true;
}
return false;
}
if( handleCtrlTab && keyevent->matches( QKeySequence::PreviousChild ) ) // Handle only Ctrl+Shist+Tab here because Ctrl+Tab was already handled before
{
QApplication::sendEvent( ui.tabWidget, ev );
return true;
}
}
if ( obj == translateLine )
@ -2569,6 +2592,7 @@ bool MainWindow::eventFilter( QObject * obj, QEvent * ev )
return true;
}
}
}
if ( ev->type() == QEvent::FocusIn ) {