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

Remove old custom function to append shortcut to action tooltip, causing shortcuts to appear twice

parent bbac0b22
......@@ -807,7 +807,6 @@ void MainWindow::init(const QString &mltPath)
if (!QDir(KdenliveSettings::currenttmpfolder()).isReadable())
KdenliveSettings::setCurrenttmpfolder(QStandardPaths::writableLocation(QStandardPaths::TempLocation));
updateActionsToolTip();
if (firstRun) {
// Load editing layout
layoutManager->loadLayout(QStringLiteral("kdenlive_editing"), true);
......@@ -872,29 +871,6 @@ void MainWindow::slotThemeChanged(const QString &name)
}
}
void MainWindow::updateActionsToolTip()
{
// Add shortcut to action tooltips
QList<KActionCollection *> collections = KActionCollection::allCollections();
for (int i = 0; i < collections.count(); ++i) {
KActionCollection *coll = collections.at(i);
foreach (QAction *tempAction, coll->actions()) {
if (tempAction == m_timeFormatButton) {
continue;
}
// find the shortcut pattern and delete (note the preceding space in the QRegularExpression)
QString toolTip = KLocalizedString::removeAcceleratorMarker(tempAction->toolTip());
QString strippedTooltip = toolTip.remove(QRegularExpression(QStringLiteral("\\s\\(.*\\)")));
QKeySequence shortCut = tempAction->shortcut();
if (shortCut == QKeySequence()) {
tempAction->setToolTip(strippedTooltip);
} else {
tempAction->setToolTip(QString("%1 (%2)").arg(strippedTooltip, shortCut.toString()));
}
}
}
}
MainWindow::~MainWindow()
{
pCore->prepareShutdown();
......@@ -2496,7 +2472,6 @@ void MainWindow::slotEditKeys()
}
dialog.addCollection(actionCollection(), i18nc("general keyboard shortcuts", "General"));
dialog.configure();
updateActionsToolTip();
}
void MainWindow::slotPreferences(int page, int option)
......
......@@ -290,7 +290,6 @@ private:
EffectBasket *m_effectBasket;
/** @brief Update widget style. */
void doChangeStyle();
void updateActionsToolTip();
public slots:
void slotReloadEffects(const QStringList &paths);
......
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