Commit a1cbe45b authored by Boudewijn Rempt's avatar Boudewijn Rempt

Use KLineEdit in these two classes

We need the returnPressed signal to make the widgets work. Fortunately,
KLineEdit now is in the kcompletion framework, which we use elsewhere
already.

I also updated https://community.kde.org/Frameworks/Porting_Notes#General_2
to note that there's a klinedit outside of kdelibs4support now.
parent 3b77c52c
......@@ -110,8 +110,7 @@ ki18n_wrap_ui( kowidgets_LIB_SRCS
add_library(kowidgets SHARED ${kowidgets_LIB_SRCS})
generate_export_header(kowidgets BASE_NAME kowidgets)
target_link_libraries(kowidgets kotext pigmentcms kowidgetutils KF5::GuiAddons KF5::WidgetsAddons KF5::ConfigCore KF5::Codecs KF5::IconThemes )
target_link_libraries(kowidgets kotext pigmentcms kowidgetutils KF5::GuiAddons KF5::WidgetsAddons KF5::ConfigCore KF5::Codecs KF5::IconThemes KF5::Completion)
if(GHNS)
target_link_libraries(kowidgets KF5::NewStuff)
......
......@@ -26,7 +26,7 @@
#include <KoIcon.h>
#include <klocalizedstring.h>
#include <QLineEdit>
#include <klineedit.h>
#include "KoResource.h"
......@@ -37,7 +37,7 @@ KoLineEditAction::KoLineEditAction(QObject* parent)
QWidget* pWidget = new QWidget (NULL);
QHBoxLayout* pLayout = new QHBoxLayout();
m_label = new QLabel(NULL);
m_editBox = new QLineEdit(NULL);
m_editBox = new KLineEdit(NULL);
pLayout->addWidget(m_label);
pLayout->addWidget(m_editBox);
pWidget->setLayout(pLayout);
......
......@@ -24,9 +24,10 @@
#include <QMenu>
#include <QWidgetAction>
#include <QLabel>
class KLineEdit;
class KoResource;
class QLineEdit;
class ContextMenuExistingTagAction : public QAction
{
......@@ -72,7 +73,7 @@ protected Q_SLOTS:
private:
bool m_closeParentOnTrigger;
QLabel * m_label;
QLineEdit * m_editBox;
KLineEdit * m_editBox;
};
class NewTagAction : public KoLineEditAction
......
......@@ -29,7 +29,7 @@
#include <QAction>
#include <QGridLayout>
#include <QLineEdit>
#include <klineedit.h>
#include <klocalizedstring.h>
#include <KoIcon.h>
......@@ -39,7 +39,7 @@ class KoTagFilterWidget::Private
public:
QString tagSearchBarTooltip_saving_disabled;
QString tagSearchBarTooltip_saving_enabled;
QLineEdit* tagSearchLineEdit;
KLineEdit* tagSearchLineEdit;
QPushButton* tagSearchSaveButton;
QGridLayout* filterBarLayout;
};
......@@ -76,7 +76,7 @@ KoTagFilterWidget::KoTagFilterWidget(QWidget* parent): QWidget(parent)
QGridLayout* filterBarLayout = new QGridLayout;
d->tagSearchLineEdit = new QLineEdit(this);
d->tagSearchLineEdit = new KLineEdit(this);
d->tagSearchLineEdit->setClearButtonEnabled(true);
d->tagSearchLineEdit->setPlaceholderText(i18n("Enter resource filters here"));
d->tagSearchLineEdit->setToolTip(d->tagSearchBarTooltip_saving_disabled);
......
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