Commit e5648917 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

operator+/- is disabled for QFlags in qt6

parent 0fd6362b
......@@ -215,13 +215,13 @@ void KateFileTreePluginView::setupActions()
auto aPrev = actionCollection()->addAction(QStringLiteral("filetree_prev_document"));
aPrev->setText(i18n("Previous Document"));
aPrev->setIcon(QIcon::fromTheme(QStringLiteral("go-up")));
actionCollection()->setDefaultShortcut(aPrev, Qt::ALT + Qt::Key_Up);
actionCollection()->setDefaultShortcut(aPrev, Qt::ALT | Qt::Key_Up);
connect(aPrev, &QAction::triggered, m_fileTree, &KateFileTree::slotDocumentPrev);
auto aNext = actionCollection()->addAction(QStringLiteral("filetree_next_document"));
aNext->setText(i18n("Next Document"));
aNext->setIcon(QIcon::fromTheme(QStringLiteral("go-down")));
actionCollection()->setDefaultShortcut(aNext, Qt::ALT + Qt::Key_Down);
actionCollection()->setDefaultShortcut(aNext, Qt::ALT | Qt::Key_Down);
connect(aNext, &QAction::triggered, m_fileTree, &KateFileTree::slotDocumentNext);
auto aShowActive = actionCollection()->addAction(QStringLiteral("filetree_show_active_document"));
......
......@@ -149,13 +149,13 @@ KateBuildView::KateBuildView(KTextEditor::Plugin *plugin, KTextEditor::MainWindo
a = actionCollection()->addAction(QStringLiteral("goto_next"));
a->setText(i18n("Next Error"));
a->setIcon(QIcon::fromTheme(QStringLiteral("go-next")));
actionCollection()->setDefaultShortcut(a, Qt::SHIFT + Qt::ALT + Qt::Key_Right);
actionCollection()->setDefaultShortcut(a, Qt::SHIFT | Qt::ALT | Qt::Key_Right);
connect(a, &QAction::triggered, this, &KateBuildView::slotNext);
a = actionCollection()->addAction(QStringLiteral("goto_prev"));
a->setText(i18n("Previous Error"));
a->setIcon(QIcon::fromTheme(QStringLiteral("go-previous")));
actionCollection()->setDefaultShortcut(a, Qt::SHIFT + Qt::ALT + Qt::Key_Left);
actionCollection()->setDefaultShortcut(a, Qt::SHIFT | Qt::ALT | Qt::Key_Left);
connect(a, &QAction::triggered, this, &KateBuildView::slotPrev);
m_showMarks = a = actionCollection()->addAction(QStringLiteral("show_marks"));
......
......@@ -124,14 +124,14 @@ void KateSQLView::setupActions()
action = collection->addAction(QStringLiteral("query_run"));
action->setText(i18nc("@action:inmenu", "Run query"));
action->setIcon(QIcon::fromTheme(QStringLiteral("quickopen")));
collection->setDefaultShortcut(action, QKeySequence(Qt::CTRL + Qt::Key_E));
collection->setDefaultShortcut(action, QKeySequence(Qt::CTRL | Qt::Key_E));
connect(action, &QAction::triggered, this, &KateSQLView::slotRunQuery);
/// TODO: stop sql query
// action = collection->addAction("sql_stop");
// action->setText( i18n("Stop query") );
// action->setIcon( KIcon("process-stop") );
// action->setShortcut( QKeySequence(Qt::ALT + Qt::Key_F5) );
// action->setShortcut( QKeySequence(Qt::ALT | Qt::Key_F5) );
// connect( action , SIGNAL(triggered()) , this , SLOT(stopQuery()));
}
......
......@@ -150,7 +150,7 @@ KateConsole::KateConsole(KateKonsolePlugin *plugin, KTextEditor::MainWindow *mw,
a = actionCollection()->addAction(QStringLiteral("katekonsole_tools_toggle_focus"));
a->setIcon(QIcon::fromTheme(QStringLiteral("swap-panels")));
a->setText(i18nc("@action", "&Focus Terminal"));
actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_F4));
actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_F4));
connect(a, &QAction::triggered, this, &KateConsole::slotToggleFocus);
m_mw->guiFactory()->addClient(this);
......
......@@ -350,7 +350,7 @@ KatePluginSearchView::KatePluginSearchView(KTextEditor::Plugin *plugin, KTextEdi
connect(container, &ContainerWidget::nextFocus, this, &KatePluginSearchView::nextFocus);
QAction *a = actionCollection()->addAction(QStringLiteral("search_in_files"));
actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_F));
actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::CTRL | Qt::ALT | Qt::Key_F));
a->setText(i18n("Search in Files"));
connect(a, &QAction::triggered, this, &KatePluginSearchView::openSearchView);
......@@ -367,7 +367,7 @@ KatePluginSearchView::KatePluginSearchView(KTextEditor::Plugin *plugin, KTextEdi
a = actionCollection()->addAction(QStringLiteral("go_to_prev_match"));
a->setText(i18n("Go to Previous Match"));
actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::SHIFT + Qt::Key_F6));
actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::SHIFT | Qt::Key_F6));
connect(a, &QAction::triggered, this, &KatePluginSearchView::goToPreviousMatch);
m_ui.resultTabWidget->tabBar()->setSelectionBehaviorOnRemove(QTabBar::SelectLeftTab);
......
......@@ -215,7 +215,7 @@ QVariant detail::TabswitcherFilesModel::data(const QModelIndex &index, int role)
return row.fullPath();
} else if (role == Qt::TextAlignmentRole) {
if (index.column() == 0)
return Qt::AlignRight + Qt::AlignVCenter;
return Qt::AlignRight | Qt::AlignVCenter;
else
return Qt::AlignVCenter;
} else if (role == Qt::ForegroundRole) {
......
......@@ -239,7 +239,7 @@ PluginViewKateTextFilter::PluginViewKateTextFilter(PluginKateTextFilter *plugin,
// create our one and only action
QAction *a = actionCollection()->addAction(QStringLiteral("edit_filter"));
a->setText(i18n("&Filter Through Command..."));
actionCollection()->setDefaultShortcut(a, Qt::CTRL + Qt::Key_Backslash);
actionCollection()->setDefaultShortcut(a, Qt::CTRL | Qt::Key_Backslash);
connect(a, &QAction::triggered, plugin, &PluginKateTextFilter::slotEditFilter);
// register us at the UI
......
......@@ -121,12 +121,12 @@ PluginKateXMLToolsView::PluginKateXMLToolsView(KTextEditor::MainWindow *mainWin)
QAction *actionInsert = new QAction(i18n("&Insert Element..."), this);
connect(actionInsert, &QAction::triggered, &m_model, &PluginKateXMLToolsCompletionModel::slotInsertElement);
actionCollection()->addAction(QStringLiteral("xml_tool_insert_element"), actionInsert);
actionCollection()->setDefaultShortcut(actionInsert, Qt::CTRL + Qt::Key_Return);
actionCollection()->setDefaultShortcut(actionInsert, Qt::CTRL | Qt::Key_Return);
QAction *actionClose = new QAction(i18n("&Close Element"), this);
connect(actionClose, &QAction::triggered, &m_model, &PluginKateXMLToolsCompletionModel::slotCloseElement);
actionCollection()->addAction(QStringLiteral("xml_tool_close_element"), actionClose);
actionCollection()->setDefaultShortcut(actionClose, Qt::CTRL + Qt::Key_Less);
actionCollection()->setDefaultShortcut(actionClose, Qt::CTRL | Qt::Key_Less);
QAction *actionAssignDTD = new QAction(i18n("Assign Meta &DTD..."), this);
connect(actionAssignDTD, &QAction::triggered, &m_model, &PluginKateXMLToolsCompletionModel::getDTD);
......
......@@ -250,7 +250,7 @@ void KateMainWindow::setupImportantActions()
a = actionCollection()->addAction(QStringLiteral("view_quick_open"));
a->setIcon(QIcon::fromTheme(QStringLiteral("quickopen")));
a->setText(i18n("&Quick Open"));
actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_O));
actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::CTRL | Qt::ALT | Qt::Key_O));
connect(a, &QAction::triggered, this, &KateMainWindow::slotQuickOpen);
a->setWhatsThis(i18n("Open a form to quick open documents."));
}
......@@ -295,7 +295,7 @@ void KateMainWindow::setupActions()
a = actionCollection()->addAction(QStringLiteral("file_save_all"));
a->setIcon(QIcon::fromTheme(QStringLiteral("document-save-all")));
a->setText(i18n("Save A&ll"));
actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::CTRL + Qt::Key_L));
actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::CTRL | Qt::Key_L));
connect(a, &QAction::triggered, KateApp::self()->documentManager(), &KateDocManager::saveAll);
a->setWhatsThis(i18n("Save all open, modified documents to disk."));
......
......@@ -112,7 +112,7 @@ void KateViewManager::setupActions()
m_splitViewVert = m_mainWindow->actionCollection()->addAction(QStringLiteral("view_split_vert"));
m_splitViewVert->setIcon(QIcon::fromTheme(QStringLiteral("view-split-left-right")));
m_splitViewVert->setText(i18n("Split Ve&rtical"));
m_mainWindow->actionCollection()->setDefaultShortcut(m_splitViewVert, Qt::CTRL + Qt::SHIFT + Qt::Key_L);
m_mainWindow->actionCollection()->setDefaultShortcut(m_splitViewVert, Qt::CTRL | Qt::SHIFT | Qt::Key_L);
connect(m_splitViewVert, &QAction::triggered, this, &KateViewManager::slotSplitViewSpaceVert);
m_splitViewVert->setWhatsThis(i18n("Split the currently active view vertically into two views."));
......@@ -120,7 +120,7 @@ void KateViewManager::setupActions()
m_splitViewHoriz = m_mainWindow->actionCollection()->addAction(QStringLiteral("view_split_horiz"));
m_splitViewHoriz->setIcon(QIcon::fromTheme(QStringLiteral("view-split-top-bottom")));
m_splitViewHoriz->setText(i18n("Split &Horizontal"));
m_mainWindow->actionCollection()->setDefaultShortcut(m_splitViewHoriz, Qt::CTRL + Qt::SHIFT + Qt::Key_T);
m_mainWindow->actionCollection()->setDefaultShortcut(m_splitViewHoriz, Qt::CTRL | Qt::SHIFT | Qt::Key_T);
connect(m_splitViewHoriz, &QAction::triggered, this, &KateViewManager::slotSplitViewSpaceHoriz);
m_splitViewHoriz->setWhatsThis(i18n("Split the currently active view horizontally into two views."));
......@@ -128,7 +128,7 @@ void KateViewManager::setupActions()
m_closeView = m_mainWindow->actionCollection()->addAction(QStringLiteral("view_close_current_space"));
m_closeView->setIcon(QIcon::fromTheme(QStringLiteral("view-close")));
m_closeView->setText(i18n("Cl&ose Current View"));
m_mainWindow->actionCollection()->setDefaultShortcut(m_closeView, Qt::CTRL + Qt::SHIFT + Qt::Key_R);
m_mainWindow->actionCollection()->setDefaultShortcut(m_closeView, Qt::CTRL | Qt::SHIFT | Qt::Key_R);
connect(m_closeView, &QAction::triggered, this, &KateViewManager::slotCloseCurrentViewSpace, Qt::QueuedConnection);
m_closeView->setWhatsThis(i18n("Close the currently active split view"));
......@@ -163,7 +163,7 @@ void KateViewManager::setupActions()
goPrev = m_mainWindow->actionCollection()->addAction(QStringLiteral("go_prev_split_view"));
goPrev->setText(i18n("Previous Split View"));
m_mainWindow->actionCollection()->setDefaultShortcut(goPrev, Qt::SHIFT + Qt::Key_F8);
m_mainWindow->actionCollection()->setDefaultShortcut(goPrev, Qt::SHIFT | Qt::Key_F8);
connect(goPrev, &QAction::triggered, this, &KateViewManager::activatePrevView);
goPrev->setWhatsThis(i18n("Make the previous split view the active one."));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment