Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit f3e0fd54 authored by Laurent Montel's avatar Laurent Montel 😁

Fix warning found by cppcheck

parent ba35a6b4
......@@ -225,12 +225,11 @@ void AddresseeLineEdit::insert(const QString &t)
newText = KPIM::AddresseeLineEditUtil::adaptPasteMails(newText);
QString contents = text();
int start_sel = 0;
int pos = cursorPosition();
if (hasSelectedText()) {
// Cut away the selection.
start_sel = selectionStart();
int start_sel = selectionStart();
pos = start_sel;
contents = contents.left(start_sel) + contents.mid(start_sel + selectedText().length());
}
......
......@@ -103,6 +103,9 @@ public:
void AddresseeLineEditPrivate::init()
{
if (mToolButton) {
return;
}
mToolButton = new QToolButton(q);
mToolButton->setVisible(false);
mToolButton->setCursor(Qt::ArrowCursor);
......
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