Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Winkelmann
QmlSlidePrinter
Commits
fe2aaa30
Commit
fe2aaa30
authored
Nov 02, 2018
by
Michael Winkelmann
Browse files
Error handling for printPdf
parent
59e57fea
Pipeline
#1167
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
qmlprinter.cpp
View file @
fe2aaa30
...
...
@@ -23,6 +23,10 @@ void QmlPrinter::changePrinterOrientation(QPrinter &printer, const int &width,
}
bool
QmlPrinter
::
printPdf
(
const
QString
&
location
,
QQuickItem
*
presentation
)
{
if
(
!
presentation
)
{
return
false
;
}
QVector
<
QQuickItem
*>
slides
,
masterSlideElements
;
presentation
->
setProperty
(
"allowDelay"
,
...
...
@@ -38,6 +42,7 @@ bool QmlPrinter::printPdf(const QString &location, QQuickItem *presentation) {
}
if
(
slides
.
length
()
==
0
)
{
qCWarning
(
lc
)
<<
QObject
::
tr
(
"No pages in %1, no PDF produced!"
).
arg
(
location
);
return
false
;
}
...
...
@@ -141,6 +146,7 @@ void QmlPrinter::paintItem(QQuickItem *item, QQuickWindow *window,
drawChildren
=
false
;
}
}
if
(
drawChildren
)
{
auto
items
=
item
->
childItems
();
...
...
Write
Preview
Supports
Markdown
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