Commit 4c247b08 authored by Laurent Montel's avatar Laurent Montel 😁

Remove old class

parent bb535ca7
......@@ -87,7 +87,6 @@ set(libpimcommon_widgets_SRCS
widgets/customtreeview.cpp
widgets/configureimmutablewidgetutils.cpp
widgets/kactionmenuchangecase.cpp
widgets/lineeditwithcompleter.cpp
widgets/spellchecklineedit.cpp
widgets/kpimprintpreviewdialog.cpp
widgets/lineeditpassword.cpp
......@@ -371,7 +370,6 @@ ecm_generate_headers(PimCommon_Camelcasewidgets_HEADERS
SpellCheckLineEdit
MinimumComboBox
ConfigureImmutableWidgetUtils
LineEditWithCompleter
RenameFileDialog
SimpleStringlistEditor
KActionMenuChangeCase
......
/*
Copyright (c) 2015-2017 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "lineeditwithcompleter.h"
#include <KLocalizedString>
#include <QContextMenuEvent>
#include <QMenu>
using namespace PimCommon;
LineEditWithCompleter::LineEditWithCompleter(QWidget *parent)
: KLineEdit(parent)
{
}
LineEditWithCompleter::~LineEditWithCompleter()
{
}
void LineEditWithCompleter::contextMenuEvent(QContextMenuEvent *e)
{
QMenu *popup = KLineEdit::createStandardContextMenu();
popup->addSeparator();
popup->addAction(QIcon::fromTheme(QStringLiteral("edit-clear-locationbar-rtl")), i18n("Clear History"), this, &LineEditWithCompleter::slotClearHistory);
popup->exec(e->globalPos());
delete popup;
}
void LineEditWithCompleter::slotClearHistory()
{
KCompletion *comp = completionObject();
comp->clear();
}
/*
Copyright (c) 2015-2017 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef LINEEDITWITHCOMPLETER_H
#define LINEEDITWITHCOMPLETER_H
#include <KLineEdit>
#include "pimcommon_export.h"
namespace PimCommon {
class PIMCOMMON_EXPORT LineEditWithCompleter : public KLineEdit
{
Q_OBJECT
public:
explicit LineEditWithCompleter(QWidget *parent = nullptr);
~LineEditWithCompleter();
protected:
void contextMenuEvent(QContextMenuEvent *e) override;
private Q_SLOTS:
void slotClearHistory();
};
}
#endif // LINEEDITWITHCOMPLETER_H
Markdown is supported
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