Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
7962e167
Commit
7962e167
authored
Nov 12, 2021
by
Jean-Baptiste Mardelle
Browse files
Remove old custom function to append shortcut to action tooltip, causing shortcuts to appear twice
parent
bbac0b22
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/mainwindow.cpp
View file @
7962e167
...
...
@@ -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
)
...
...
src/mainwindow.h
View file @
7962e167
...
...
@@ -290,7 +290,6 @@ private:
EffectBasket
*
m_effectBasket
;
/** @brief Update widget style. */
void
doChangeStyle
();
void
updateActionsToolTip
();
public
slots
:
void
slotReloadEffects
(
const
QStringList
&
paths
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment