aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/configuration/qt_specialization.cpp13
-rw-r--r--lib/configuration/qt_specialization.h1
2 files changed, 0 insertions, 14 deletions
diff --git a/lib/configuration/qt_specialization.cpp b/lib/configuration/qt_specialization.cpp
index 4e79492..c58a498 100644
--- a/lib/configuration/qt_specialization.cpp
+++ b/lib/configuration/qt_specialization.cpp
@@ -21,19 +21,6 @@ callable_when(unconsumed) [[nodiscard]] std::optional<QStringList> Configuration
return QString::fromStdString(v.value()).split(';');
}
-void setShortcut(QAction *action, const char *name)
-{
- Configuration conf;
-
- if(const auto shortcutText = conf.value<QString>(name)) {
- const QString tooltip = action->toolTip();
- action->setShortcut(QKeySequence::fromString(shortcutText.value()));
- action->setToolTip(QString("%1 (%2)").arg(tooltip, shortcutText.value()));
- } else {
- throw new std::runtime_error(std::string("fixme: setShortcut found no such value for ") + name);
- }
-}
-
template <>
callable_when(unconsumed) QAction &Configuration::shortcut(QAction &action, const char *name) const
{
diff --git a/lib/configuration/qt_specialization.h b/lib/configuration/qt_specialization.h
index 8aabf6b..ea16fe0 100644
--- a/lib/configuration/qt_specialization.h
+++ b/lib/configuration/qt_specialization.h
@@ -13,4 +13,3 @@ callable_when(unconsumed) QAction &Configuration::shortcut(QAction &, const char
template <>
callable_when(unconsumed) QKeySequence &Configuration::shortcut(QKeySequence &, const char *) const;
-[[deprecated("Use Configuration::shortcut<QAction>(name) instead")]] void setShortcut(QAction *action, const char *name);