aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2020-03-23 22:50:05 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2020-03-23 22:50:05 +0200
commita6a80f4bf83eaa1894b83755ec8785af5ed4559f (patch)
tree4635fba7cff12dc8848b19f26d8540d79cb35716 /lib
parentlib/configuration improvements (diff)
downloadsmolbote-a6a80f4bf83eaa1894b83755ec8785af5ed4559f.tar.xz
Fix various compiler warnings
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);