Commit ce552f98 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Ensure add selection to library appears in the list of actions

parent cd8c64cc
Pipeline #278321 passed with stage
in 15 minutes and 12 seconds
......@@ -1073,6 +1073,11 @@ const QString Core::actionText(const QString &name)
return QString();
}
void Core::addActionToCollection(const QString &name, QAction *action)
{
m_mainWindow->actionCollection()->addAction(name, action);
}
void Core::clean()
{
m_self.reset();
......
......@@ -345,6 +345,8 @@ public slots:
void triggerAction(const QString &name);
/** @brief Get an action's descriptive text by its actionCollection name */
const QString actionText(const QString &name);
/** @brief Add an action to the app's actionCollection */
void addActionToCollection(const QString &name, QAction *action);
/** @brief display a user info/warning message in the project bin */
void displayBinMessage(const QString &text, int type, const QList<QAction *> &actions = QList<QAction *>(), bool showClose = false, BinMessage::BinCategory messageCategory = BinMessage::BinCategory::NoMessage);
void displayBinLogMessage(const QString &text, int type, const QString logInfo);
......
......@@ -235,6 +235,7 @@ void LibraryWidget::setupActions()
m_toolBar->addAction(addFolder);
QAction *sentToLibrary = new QAction(QIcon::fromTheme(QStringLiteral("bookmark-new")), i18n("Add Timeline Selection to Library"), this);
connect(sentToLibrary, &QAction::triggered, this, &LibraryWidget::slotAddToLibrary);
pCore->addActionToCollection(QStringLiteral("send_library"), sentToLibrary);
sentToLibrary->setEnabled(false);
m_toolBar->addAction(sentToLibrary);
menuList << sentToLibrary;
......
Supports Markdown
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