Commit 611f2298 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

operator+/- is disabled for QFlags in qt6

parent fdbdb507
......@@ -183,7 +183,7 @@ FileOpsContextManagerItem::FileOpsContextManagerItem(ContextManager* manager, QL
mShowPropertiesAction = file->addAction(QStringLiteral("file_show_properties"), this, SLOT(showProperties()));
mShowPropertiesAction->setText(i18n("Properties"));
mShowPropertiesAction->setIcon(QIcon::fromTheme(QStringLiteral("document-properties")));
actionCollection->setDefaultShortcut(mShowPropertiesAction, QKeySequence(Qt::ALT + Qt::Key_Return));
actionCollection->setDefaultShortcut(mShowPropertiesAction, QKeySequence(Qt::ALT | Qt::Key_Return));
mCreateFolderAction = file->addAction(QStringLiteral("file_create_folder"), this, SLOT(createFolder()));
mCreateFolderAction->setText(i18n("Create Folder..."));
......
......@@ -286,7 +286,7 @@ FilterController::FilterController(QFrame* frame, SortedDirModel* dirModel)
addAction(i18nc("@action:inmenu", "Filter by Name"),
SLOT(addFilterByName()),
QKeySequence(Qt::CTRL + Qt::Key_I));
QKeySequence(Qt::CTRL | Qt::Key_I));
addAction(i18nc("@action:inmenu", "Filter by Date"),
SLOT(addFilterByDate()),
......
......@@ -87,13 +87,13 @@ struct ImageOpsContextManagerItem::Private
mRotateLeftAction->setText(i18n("Rotate Left"));
mRotateLeftAction->setToolTip(i18nc("@info:tooltip", "Rotate image to the left"));
mRotateLeftAction->setIcon(QIcon::fromTheme(QStringLiteral("object-rotate-left")));
actionCollection->setDefaultShortcut(mRotateLeftAction, Qt::CTRL + Qt::SHIFT + Qt::Key_R);
actionCollection->setDefaultShortcut(mRotateLeftAction, Qt::CTRL | Qt::SHIFT | Qt::Key_R);
mRotateRightAction = edit->addAction(QStringLiteral("rotate_right"), q, SLOT(rotateRight()));
mRotateRightAction->setText(i18n("Rotate Right"));
mRotateRightAction->setToolTip(i18nc("@info:tooltip", "Rotate image to the right"));
mRotateRightAction->setIcon(QIcon::fromTheme(QStringLiteral("object-rotate-right")));
actionCollection->setDefaultShortcut(mRotateRightAction, Qt::CTRL + Qt::Key_R);
actionCollection->setDefaultShortcut(mRotateRightAction, Qt::CTRL | Qt::Key_R);
mMirrorAction = edit->addAction(QStringLiteral("mirror"), q, SLOT(mirror()));
mMirrorAction->setText(i18n("Mirror"));
......@@ -106,17 +106,17 @@ struct ImageOpsContextManagerItem::Private
mResizeAction = edit->addAction("resize", q, SLOT(resizeImage()));
mResizeAction->setText(i18n("Resize"));
mResizeAction->setIcon(QIcon::fromTheme("transform-scale"));
actionCollection->setDefaultShortcut(mResizeAction, Qt::SHIFT + Qt::Key_R);
actionCollection->setDefaultShortcut(mResizeAction, Qt::SHIFT | Qt::Key_R);
mCropAction = edit->addAction("crop", q, SLOT(crop()));
mCropAction->setText(i18n("Crop"));
mCropAction->setIcon(QIcon::fromTheme("transform-crop-and-resize"));
actionCollection->setDefaultShortcut(mCropAction, Qt::SHIFT + Qt::Key_C);
actionCollection->setDefaultShortcut(mCropAction, Qt::SHIFT | Qt::Key_C);
mRedEyeReductionAction = edit->addAction("red_eye_reduction", q, SLOT(startRedEyeReduction()));
mRedEyeReductionAction->setText(i18n("Reduce Red Eye"));
mRedEyeReductionAction->setIcon(QIcon::fromTheme("redeyes"));
actionCollection->setDefaultShortcut(mRedEyeReductionAction, Qt::SHIFT + Qt::Key_E);
actionCollection->setDefaultShortcut(mRedEyeReductionAction, Qt::SHIFT | Qt::Key_E);
mActionList
<< mRotateLeftAction
......
......@@ -411,7 +411,7 @@ struct MainWindow::Private
QAction * replaceLocationAction = actionCollection->addAction(QStringLiteral("replace_location"));
replaceLocationAction->setText(i18nc("@action:inmenu Navigation Bar", "Replace Location"));
actionCollection->setDefaultShortcut(replaceLocationAction, Qt::CTRL + Qt::Key_L);
actionCollection->setDefaultShortcut(replaceLocationAction, Qt::CTRL | Qt::Key_L);
connect(replaceLocationAction, &QAction::triggered, q, &MainWindow::replaceLocation);
mBrowseAction = view->addAction("browse");
......
......@@ -197,7 +197,7 @@ struct SemanticInfoContextManagerItemPrivate : public Ui_SemanticInfoSideBarItem
mEditTagsAction = edit->addAction("edit_tags");
mEditTagsAction->setText(i18nc("@action", "Edit Tags"));
mEditTagsAction->setIcon(QIcon::fromTheme("tag"));
mActionCollection->setDefaultShortcut(mEditTagsAction, Qt::CTRL + Qt::Key_T);
mActionCollection->setDefaultShortcut(mEditTagsAction, Qt::CTRL | Qt::Key_T);
QObject::connect(mEditTagsAction, &QAction::triggered,
q, &SemanticInfoContextManagerItem::showSemanticInfoDialog);
mActions << mEditTagsAction;
......
......@@ -445,13 +445,13 @@ ViewMainPage::ViewMainPage(QWidget* parent, SlideShow* slideShow, KActionCollect
d->mToggleThumbnailBarAction = view->add<KToggleAction>(QStringLiteral("toggle_thumbnailbar"));
d->mToggleThumbnailBarAction->setText(i18n("Thumbnail Bar"));
d->mToggleThumbnailBarAction->setIcon(QIcon::fromTheme(QStringLiteral("folder-image")));
actionCollection->setDefaultShortcut(d->mToggleThumbnailBarAction, Qt::CTRL + Qt::Key_B);
actionCollection->setDefaultShortcut(d->mToggleThumbnailBarAction, Qt::CTRL | Qt::Key_B);
connect(d->mToggleThumbnailBarAction, &KToggleAction::triggered, this, &ViewMainPage::setThumbnailBarVisibility);
d->mToggleThumbnailBarButton->setDefaultAction(d->mToggleThumbnailBarAction);
d->mSynchronizeAction = view->add<KToggleAction>("synchronize_views");
d->mSynchronizeAction->setText(i18n("Synchronize"));
actionCollection->setDefaultShortcut(d->mSynchronizeAction, Qt::CTRL + Qt::Key_Y);
actionCollection->setDefaultShortcut(d->mSynchronizeAction, Qt::CTRL | Qt::Key_Y);
connect(d->mSynchronizeAction, &QAction::toggled,
d->mSynchronizer, &DocumentViewSynchronizer::setActive);
// Ensure mSynchronizeAction and mSynchronizeCheckBox are in sync
......
......@@ -68,7 +68,7 @@ struct DocumentViewControllerPrivate
mZoomToFitAction->setIconText(i18nc("@action:button Zoom to fit, shown in status bar, keep it short please", "Fit"));
mZoomToFillAction = view->addAction(QStringLiteral("view_zoom_to_fill"));
view->collection()->setDefaultShortcut(mZoomToFillAction, Qt::SHIFT + Qt::Key_F);
view->collection()->setDefaultShortcut(mZoomToFillAction, Qt::SHIFT | Qt::Key_F);
mZoomToFillAction->setCheckable(true);
mZoomToFillAction->setText(i18n("Zoom to fill window by fitting to width or height"));
mZoomToFillAction->setIcon(QIcon::fromTheme(QStringLiteral("zoom-fit-best")));
......
......@@ -78,7 +78,7 @@ GVPart::GVPart(QWidget* parentWidget, QObject* parent, const QVariantList& /*arg
QAction * action = new QAction(actionCollection());
action->setText(i18nc("@action", "Properties"));
action->setShortcut(QKeySequence(Qt::ALT + Qt::Key_Return));
action->setShortcut(QKeySequence(Qt::ALT | Qt::Key_Return));
connect(action, &QAction::triggered, this, &GVPart::showProperties);
actionCollection()->addAction(QStringLiteral("file_show_properties"), action);
......
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