diff --git a/src/libs/utils/savedaction.cpp b/src/libs/utils/savedaction.cpp index 6e788a429b14b8d85fbb241e6ac42146704aaf25..165c08fa383dabbed9b9ffa518f4f24efc6f1108 100644 --- a/src/libs/utils/savedaction.cpp +++ b/src/libs/utils/savedaction.cpp @@ -173,16 +173,6 @@ void SavedAction::setSettingsGroup(const QString &group) m_settingsGroup = group; } -QString SavedAction::textPattern() const -{ - return m_textPattern; -} - -void SavedAction::setTextPattern(const QString &value) -{ - m_textPattern = value; -} - QString SavedAction::toString() const { return QLatin1String("value: ") + m_value.toString() @@ -191,40 +181,6 @@ QString SavedAction::toString() const + QLatin1Char('/') + m_settingsKey; } -/*! - Adjust the \c text() of the underlying action. - - This can be used to update the item shortly before e.g. a menu is shown. - - If the item's \c textPattern() is empty the \a text will be used - verbatim. - - Otherwise, the behaviour depends on \a text: if it is non-empty, - \c QString(textPattern()).arg(text), otherwise, \c textPattern() - with the "%1" placeholder removed will be used. - - \sa textPattern(), setTextPattern() -*/ -QAction *SavedAction::updatedAction(const QString &text0) -{ - QString text = text0; - bool enabled = true; - if (!m_textPattern.isEmpty()) { - if (text.isEmpty()) { - text = m_textPattern; - text.remove(QLatin1String("\"%1\"")); - text.remove(QLatin1String("%1")); - enabled = false; - } else { - text = m_textPattern.arg(text0); - } - } - this->setEnabled(enabled); - this->setData(text0); - this->setText(text); - return this; -} - /* Uses \c settingsGroup() and \c settingsKey() to restore the item from \a settings, diff --git a/src/libs/utils/savedaction.h b/src/libs/utils/savedaction.h index c005451674e0e0172d4cc7af26843cd5c7af68cd..bfeaa7b344b2eb15c802308b738ee7f2ab666451 100644 --- a/src/libs/utils/savedaction.h +++ b/src/libs/utils/savedaction.h @@ -56,7 +56,6 @@ public: QVariant defaultValue() const; Q_SLOT void setDefaultValue(const QVariant &value); - QAction *updatedAction(const QString &newText); Q_SLOT void trigger(const QVariant &data); // used for persistency @@ -74,9 +73,6 @@ public: void disconnectWidget(); Q_SLOT void apply(QSettings *settings); - QString textPattern() const; - Q_SLOT void setTextPattern(const QString &value); - QString toString() const; signals: @@ -96,8 +92,6 @@ private: QVariant m_defaultValue; QString m_settingsKey; QString m_settingsGroup; - QString m_textPattern; - QString m_textData; QWidget *m_widget; ApplyMode m_applyMode; };