Commit de8d4e89 authored by Yuchen Deng's avatar Yuchen Deng Committed by hjk
Browse files

HistoryCompleter: Add removeHistoryItem member function



Change-Id: Ie17834da60d2cbe6082272e4c76b19dd8126583f
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent f85d575b
...@@ -185,6 +185,11 @@ HistoryCompleter::HistoryCompleter(QLineEdit *lineEdit, const QString &historyKe ...@@ -185,6 +185,11 @@ HistoryCompleter::HistoryCompleter(QLineEdit *lineEdit, const QString &historyKe
connect(lineEdit, SIGNAL(editingFinished()), this, SLOT(saveHistory())); connect(lineEdit, SIGNAL(editingFinished()), this, SLOT(saveHistory()));
} }
bool HistoryCompleter::removeHistoryItem(int index)
{
return d->removeRow(index);
}
HistoryCompleter::~HistoryCompleter() HistoryCompleter::~HistoryCompleter()
{ {
delete d; delete d;
......
...@@ -49,6 +49,7 @@ class QTCREATOR_UTILS_EXPORT HistoryCompleter : public QCompleter ...@@ -49,6 +49,7 @@ class QTCREATOR_UTILS_EXPORT HistoryCompleter : public QCompleter
public: public:
static void setSettings(QSettings *settings); static void setSettings(QSettings *settings);
HistoryCompleter(QLineEdit *lineEdit, const QString &historyKey, QObject *parent = 0); HistoryCompleter(QLineEdit *lineEdit, const QString &historyKey, QObject *parent = 0);
bool removeHistoryItem(int index);
private: private:
~HistoryCompleter(); ~HistoryCompleter();
......
Supports Markdown
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