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
L
libksieve
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
PIM
libksieve
Commits
11704c16
Commit
11704c16
authored
May 17, 2017
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move indentation method in util file
parent
00fd6710
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
src/ksieveui/autocreatescripts/autocreatescriptutil.cpp
src/ksieveui/autocreatescripts/autocreatescriptutil.cpp
+5
-0
src/ksieveui/autocreatescripts/autocreatescriptutil_p.h
src/ksieveui/autocreatescripts/autocreatescriptutil_p.h
+1
-0
src/ksieveui/autocreatescripts/sieveactionwidgetlister.cpp
src/ksieveui/autocreatescripts/sieveactionwidgetlister.cpp
+2
-9
No files found.
src/ksieveui/autocreatescripts/autocreatescriptutil.cpp
View file @
11704c16
...
...
@@ -185,3 +185,8 @@ QString AutoCreateScriptUtil::createFullWhatsThis(const QString &help, const QSt
const
QString
fullWhatsThis
=
QLatin1String
(
"<qt>"
)
+
help
+
QStringLiteral
(
"<br><a href=
\'
%1
\'
>%2</a></qt>"
).
arg
(
href
,
i18n
(
"More information"
));
return
fullWhatsThis
;
}
QString
AutoCreateScriptUtil
::
indentation
()
{
return
QStringLiteral
(
" "
);
}
src/ksieveui/autocreatescripts/autocreatescriptutil_p.h
View file @
11704c16
...
...
@@ -41,6 +41,7 @@ QString quoteStr(QString str, bool protectSlash = true);
void
comboboxItemNotFound
(
const
QString
&
searchItem
,
const
QString
&
name
,
QString
&
error
);
QString
createFullWhatsThis
(
const
QString
&
help
,
const
QString
&
href
);
QString
protectSlash
(
QString
str
);
QString
indentation
();
}
}
#endif // AUTOCREATESCRIPTUTIL_H
src/ksieveui/autocreatescripts/sieveactionwidgetlister.cpp
View file @
11704c16
...
...
@@ -43,13 +43,6 @@ using namespace KSieveUi;
static
int
MINIMUMACTION
=
1
;
static
int
MAXIMUMACTION
=
8
;
namespace
{
inline
const
QString
indentation
()
{
return
QStringLiteral
(
" "
);
}
}
SieveActionWidget
::
SieveActionWidget
(
SieveEditorGraphicalModeWidget
*
graphicalModeWidget
,
QWidget
*
parent
)
:
QWidget
(
parent
)
,
mSieveGraphicalModeWidget
(
graphicalModeWidget
)
...
...
@@ -95,11 +88,11 @@ void SieveActionWidget::generatedScript(QString &script, QStringList &requires,
}
QString
comment
=
widgetAction
->
comment
();
if
(
!
comment
.
trimmed
().
isEmpty
())
{
const
QString
indent
=
(
onlyActions
?
QString
()
:
indentation
());
const
QString
indent
=
(
onlyActions
?
QString
()
:
AutoCreateScriptUtil
::
indentation
());
script
+=
indent
;
script
+=
QLatin1Char
(
'#'
)
+
comment
.
replace
(
QLatin1Char
(
'\n'
),
QStringLiteral
(
"
\n
%1#"
).
arg
(
indent
))
+
QLatin1Char
(
'\n'
);
}
script
+=
(
onlyActions
?
QString
()
:
indentation
())
+
widgetAction
->
code
(
currentWidget
)
+
QLatin1Char
(
'\n'
);
script
+=
(
onlyActions
?
QString
()
:
AutoCreateScriptUtil
::
indentation
())
+
widgetAction
->
code
(
currentWidget
)
+
QLatin1Char
(
'\n'
);
}
}
...
...
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