Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KDE Pim Libraries
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Unmaintained
KDE Pim Libraries
Commits
3d4a3792
Commit
3d4a3792
authored
Nov 09, 2014
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't close dialog when we press enter in lineedit
parent
ce10253d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
akonadi/tageditwidget.cpp
akonadi/tageditwidget.cpp
+11
-6
No files found.
akonadi/tageditwidget.cpp
View file @
3d4a3792
...
...
@@ -111,13 +111,15 @@ void TagEditWidget::Private::onRowsInserted(const QModelIndex &parent, int start
void
TagEditWidget
::
Private
::
slotCreateTag
()
{
Akonadi
::
TagCreateJob
*
createJob
=
new
Akonadi
::
TagCreateJob
(
Akonadi
::
Tag
(
m_newTagEdit
->
text
()),
this
);
connect
(
createJob
,
SIGNAL
(
finished
(
KJob
*
)),
this
,
SLOT
(
slotCreateTagFinished
(
KJob
*
)));
if
(
m_newTagButton
->
isEnabled
())
{
Akonadi
::
TagCreateJob
*
createJob
=
new
Akonadi
::
TagCreateJob
(
Akonadi
::
Tag
(
m_newTagEdit
->
text
()),
this
);
connect
(
createJob
,
SIGNAL
(
finished
(
KJob
*
)),
this
,
SLOT
(
slotCreateTagFinished
(
KJob
*
)));
m_newTagEdit
->
clear
();
m_newTagEdit
->
setEnabled
(
false
);
m_newTagButton
->
setEnabled
(
false
);
m_newTagEdit
->
clear
();
m_newTagEdit
->
setEnabled
(
false
);
m_newTagButton
->
setEnabled
(
false
);
}
}
void
TagEditWidget
::
Private
::
slotCreateTagFinished
(
KJob
*
job
)
...
...
@@ -214,9 +216,12 @@ TagEditWidget::TagEditWidget(Akonadi::TagModel *model, QWidget *parent, bool ena
d
.
data
(),
SLOT
(
slotItemEntered
(
QModelIndex
)));
d
->
m_newTagEdit
=
new
KLineEdit
(
this
);
d
->
m_newTagEdit
->
setTrapReturnKey
(
true
);
d
->
m_newTagEdit
->
setClearButtonShown
(
true
);
connect
(
d
->
m_newTagEdit
,
SIGNAL
(
textEdited
(
QString
)),
d
.
data
(),
SLOT
(
slotTextEdited
(
QString
)));
connect
(
d
->
m_newTagEdit
,
SIGNAL
(
returnPressed
()),
d
.
data
(),
SLOT
(
slotCreateTag
()));
d
->
m_newTagButton
=
new
QPushButton
(
i18nc
(
"@label"
,
"Create new tag"
));
d
->
m_newTagButton
->
setEnabled
(
false
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment